Skip to content

Commit

Permalink
Merge pull request #2 from simplabs/make-more-glimmery
Browse files Browse the repository at this point in the history
Make Glimmeroids a bit more glimmery
  • Loading branch information
Turbo87 authored May 5, 2017
2 parents e18f13a + c50c6de commit 3933ca0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/utils/asteroid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { Entity, Position } from './entity';
import { asteroidVertices, randomNumBetween } from './helper';
import Particle from './Particle';

const FILL_IMAGE = new Image();
FILL_IMAGE.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAfkklEQVR42uxdfYgU5xkfK2msQtOkaQiNSdokQpMmfxSNKcY/av6phmrO9XZ3ds+7HHrZ7M3OzK13h54fpyMSRCQECVKCiJQgkoQgQYIEEZEjlKAhmCBWDrHn3s7s3LrdXrfb47oc2/e3d8t7YtW7nXdm39l9H3hQN7cfuf09z/t7Pl+pXC6/KAlxJMFyeeHt/5SfIr/L35f+Pb72v6O3uievXzUmrlwyChfOGvnPThi5Px8ysod2Gfb+XsPeoxjW9i2GpUeh+Dsew3/Dz+BnK88pXvzKmPz+8sDk374PljKjb5SLxRWZQvkJ6dPyQkmIUxHYdyLlYHBhpr19ibkj9ky27+3l9t7ExtuDimJv39JnJzsG06pspOMBIx0jGm810go0dKeqMvSux/GzeA6ea8UD+zJqeCCTbE/afZ3xTG/Hn7J6dHlKCb4wrLX99HJs+UOSECFuy83OzkWjWmCppUVXZpTQ+owe6TIT4V5LlQcJII2sLhs2AbNFdBbAmShe055R8l5QPLaPaL+VCHebWjgwpkRW34qFn/9nd/TRsmH8SBIixIlk+tuXpPToMkJR1phqZHNGjWg2AXuOgC+fnAahrc8Avg5qzTKIXHJaLTyekHeYmvyOpYbXpdTgK+Pbgo8JgxAyJzH7Io+bqryCgCdI/twGQAHsAL1NlIKdT7Wg1Cgqf1bokypvtZTQmpHuTc+ltgV/IgkRMhv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Hy0GYytyi7uXCs8t+YU3pG8fD4VzHrLsZnhQEwyEkwaQHQOx+nDanlnx7bNhyR2MAvt1tK2yGIwsDOIfkl4sTlK2GjVoDoV9Sk7bU0S6WRCvHmiDwJC7QnYMD0ORHe+NOWAuFLk5hBU+IWkCx+sZHQF86JoYfWaJbkeJlAeimQ9Oxh+eKUbl0TLcJ1kabmtXijHSPjZv9aRTGlX6pSwOXwbRw+D9i7I8dmY58I6uCOctvCfem/347SNN0z34st9i7BzfpHvX0vT5dH397QfLC+9s/H7j3Y2ff5hqUPWI1W+vom0pehCgkoSqOCHnxqsy8DDwGt/Dz/A76ndXqbPj+vffVe/9+pPYuP3HiQdJeCRN7792M0lJfJbyCp+NAex9CF2Ayck1B9WVAAAAAElFTkSuQmCC';

export default class Asteroid implements Entity {
position: Position;
velocity: Position;
Expand Down Expand Up @@ -109,6 +112,8 @@ export default class Asteroid implements Entity {
context.lineTo(this.vertices[i].x, this.vertices[i].y);
}
context.closePath();
context.clip();
context.drawImage(FILL_IMAGE, -this.radius * 1.5, -this.radius * 1.5, this.radius * 3, this.radius * 3);
context.stroke();
context.restore();
}
Expand Down

0 comments on commit 3933ca0

Please sign in to comment.