summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryuan <y.yuan@berkeley.edu>2014-05-28 23:45:43 -0700
committeryuan <y.yuan@berkeley.edu>2014-05-28 23:45:43 -0700
commit8971d29adc0fbcb75b60dd58c3043c8eb2e150a1 (patch)
tree79951a2f2e55a83a12b1c8c8b41845ae31475afa
parent94ad721bfe5f63e6545abf96ca6349977c6b06fd (diff)
downloadsnap-yow-8971d29adc0fbcb75b60dd58c3043c8eb2e150a1.tar.gz
snap-yow-8971d29adc0fbcb75b60dd58c3043c8eb2e150a1.zip
cleaned up my comments
-rw-r--r--objects.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/objects.js b/objects.js
index 5eb481c..7d6ce14 100644
--- a/objects.js
+++ b/objects.js
@@ -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.
}