diff options
| author | yuan <y.yuan@berkeley.edu> | 2014-05-28 23:45:43 -0700 |
|---|---|---|
| committer | yuan <y.yuan@berkeley.edu> | 2014-05-28 23:45:43 -0700 |
| commit | 8971d29adc0fbcb75b60dd58c3043c8eb2e150a1 (patch) | |
| tree | 79951a2f2e55a83a12b1c8c8b41845ae31475afa | |
| parent | 94ad721bfe5f63e6545abf96ca6349977c6b06fd (diff) | |
| download | snap-byow-8971d29adc0fbcb75b60dd58c3043c8eb2e150a1.tar.gz snap-byow-8971d29adc0fbcb75b60dd58c3043c8eb2e150a1.zip | |
cleaned up my comments
| -rw-r--r-- | objects.js | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -2847,7 +2847,7 @@ SpriteMorph.prototype.changeScale = function (delta) { this.setScale(this.getScale() + (+delta || 0)); }; -//spritemorph graphics effects +// Spritemorph graphics effects SpriteMorph.prototype.graphicsChanged = function () { var myself = this; @@ -4209,13 +4209,13 @@ StageMorph.prototype.setScale = function (number) { StageMorph.prototype.drawNew = function () { var ctx; StageMorph.uber.drawNew.call(this); - if (this.costume) { //if wearing a costume + if (this.costume) { ctx = this.image.getContext('2d'); ctx.scale(this.scale, this.scale); - ctx.drawImage( //drawimage on this new 2d canvas with these inputs: image, x and y - this.costume.contents, //this is the image - (this.width() / this.scale - this.costume.width()) / 2, //width = canvas wdith - costume width/2 - (this.height() / this.scale - this.costume.height()) / 2 //this is the y + ctx.drawImage( + this.costume.contents, + (this.width() / this.scale - this.costume.width()) / 2, + (this.height() / this.scale - this.costume.height()) / 2 ); this.image = this.applyGraphicsEffects(this.image) //apply graphics effects to this image. } |
