-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcolors.html
More file actions
51 lines (38 loc) · 1.42 KB
/
colors.html
File metadata and controls
51 lines (38 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<html>
<head>
<meta charset="utf-8" />
<script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>
<script>
window.addEventListener("load", init);
function init() {
// Stageオブジェクトを作成します
var stage = new createjs.Stage("myCanvas");
var shape = new createjs.Shape();
shape.graphics.beginFill("red");
shape.graphics.drawCircle(100, 100, 50);
shape.graphics.beginFill("green");
shape.graphics.drawCircle(200, 100, 50);
shape.graphics.beginFill("blue");
shape.graphics.drawCircle(300, 100, 50);
shape.graphics.beginFill("#ff0000");
shape.graphics.drawCircle(100, 200, 50);
shape.graphics.beginFill("#00ff00");
shape.graphics.drawCircle(200, 200, 50);
shape.graphics.beginFill("#0000ff");
shape.graphics.drawCircle(300, 200, 50);
shape.graphics.beginFill(createjs.Graphics.getHSL(0, 100, 50));
shape.graphics.drawCircle(100, 300, 50);
shape.graphics.beginFill(createjs.Graphics.getHSL(0, 100, 20));
shape.graphics.drawCircle(200, 300, 50);
shape.graphics.beginFill(createjs.Graphics.getHSL(0, 100, 80));
shape.graphics.drawCircle(300, 300, 50);
stage.addChild(shape); // 表示リストに追加
// Stageの描画を更新します
stage.update();
}
</script>
</head>
<body>
<canvas id="myCanvas" width="1000" height="1000"></canvas>
</body>
</html>