-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Organize turtle avatars as skin settings #20513
Conversation
apps/src/turtle/skins.js
Outdated
width: 73, | ||
height: 100, | ||
numHeadings: 36, | ||
image: new Image(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a specific reason this declaration was moved here rather than staying in turtle? All the others make sense, but I don't love the idea of creating a new Image in a config file
apps/src/turtle/turtle.js
Outdated
@@ -727,18 +711,9 @@ Artist.prototype.drawImages = function () { | |||
*/ | |||
Artist.prototype.loadTurtle = function (initializing = true) { | |||
const onloadCallback = initializing ? this.display : this.drawTurtle; | |||
this.avatarImage.onload = _.bind(onloadCallback, this); | |||
this.avatar.image.onload = _.bind(onloadCallback, this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll need to declare the new Image()
somewhere. I vote here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, of course 🤦
b81607d
to
b4e3091
Compare
No description provided.