()
| 105 | } |
| 106 | |
| 107 | function init(){ |
| 108 | particleArray=[]; |
| 109 | for(let y=0,y2=textCoordinates.height;y<y2;y++){ |
| 110 | for(let x=0,x2=textCoordinates.width;x<x2;x++){ |
| 111 | if(textCoordinates.data[(y*4*textCoordinates.width)+(x*4)+3]>128){ |
| 112 | let positionX=x +adjustX; |
| 113 | let positionY=y+adjustY; |
| 114 | particleArray.push(new Particle(positionX*10,positionY*10)); |
| 115 | } |
| 116 | } |
| 117 | }} |
| 118 | |
| 119 | init(); |
| 120 |