Skip to content

Commit 51134ac

Browse files
committed
feat: add type fill on hilo engine
1 parent 8c6a52d commit 51134ac

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

src/scripts/hilo.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,21 @@ class HiloEngine extends Engine {
7979
x: x,
8080
y: y,
8181
});
82-
circle
83-
.lineStyle(1, '#ffffff')
84-
.drawCircle(1, 1, size - 1)
85-
.closePath()
86-
.endFill()
87-
.addTo(this.graphicScene);
82+
if (this.type === 'stroke')
83+
circle
84+
.lineStyle(1, '#ffffff')
85+
.drawCircle(1, 1, size - 1)
86+
.closePath()
87+
.endFill()
88+
.addTo(this.graphicScene);
89+
else if (this.type === 'fill')
90+
circle
91+
.beginFill('#fff')
92+
.lineStyle(1, '#000000')
93+
.drawCircle(1, 1, size - 1)
94+
.closePath()
95+
.endFill()
96+
.addTo(this.graphicScene);
8897
particles[i] = { x, y, size: size, dx, dy, el: circle };
8998
}
9099
this.particles = particles;

0 commit comments

Comments
 (0)