splash.js 756 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. function SplashText(options) {
  2. var defaults = {
  3. speed: 3,
  4. color: 'purple',
  5. position: pt(200,200),
  6. innerRadius: 10,
  7. outerRadius: 20,
  8. spineRandomness: 2,
  9. spineDensity: 20,
  10. theta: 0,
  11. };
  12. var e = $.extend({}, defaults, options);
  13. for(x in e) this[x] = e[x];
  14. this.type = 'SplashText';
  15. this.render = function(ctx) {
  16. ctx.save();
  17. ctx.translate(this.position.x, this.position.y);
  18. // need to draw the text
  19. // ctx.lineWidth = 2;
  20. // ctx.closePath();
  21. ctx.fillStyle = 'yellow';
  22. ctx.fill();
  23. ctx.strokeStyle = 'red';
  24. ctx.stroke();
  25. ctx.restore();
  26. };
  27. this.frameMove = function(te) {
  28. };
  29. this.init = function() {
  30. }
  31. this.init();
  32. }