MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / constructor

Method constructor

assets/js/shooting_game.js:96–103  ·  view source on GitHub ↗
(x, y, radius, color, velocity)

Source from the content-addressed store, hash-verified

94const friction = 0.99
95class Particle {
96 constructor(x, y, radius, color, velocity) {
97 this.x = x
98 this.y = y
99 this.radius = radius
100 this.color = color
101 this.velocity = velocity
102 this.alpha = 1
103 }
104 draw() {
105 c.save()
106 c.globalAlpha = this.alpha

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected