Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: self.addBiteMark is not a function' in this line: 'self.addBiteMark();' Line Number: 107
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'push')' in this line: 'bowls.push(bowl);' Line Number: 104
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 172
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 172
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 172
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 174
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 173
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(butter);' Line Number: 183
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 188
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 173
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(eggs[eggs.length - 1]);' Line Number: 173
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 173
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'for (var i = 0; i < 8; i++) {}' Line Number: 175
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'LK.on('tick', function () {});' Line Number: 176
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'Game.prototype.startGame = function () {};' Line Number: 177
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'stage.on('move', function (obj) {});' Line Number: 178
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'stage.on('up', function (obj) {});' Line Number: 179
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.x = newX;' Line Number: 89
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 174
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(eggs[eggs.length - 1]);' Line Number: 174
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.addChild(egg);' Line Number: 174
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'for (var i = 0; i < 8; i++) {}' Line Number: 176
===================================================================
--- original.js
+++ change.js
@@ -1,4 +1,33 @@
+var hsvToRgb = function (h, s, v) {
+ var r, g, b;
+ var i = Math.floor(h * 6);
+ var f = h * 6 - i;
+ var p = v * (1 - s);
+ var q = v * (1 - f * s);
+ var t = v * (1 - (1 - f) * s);
+ switch (i % 6) {
+ case 0:
+ (r = v, g = t, b = p);
+ break;
+ case 1:
+ (r = q, g = v, b = p);
+ break;
+ case 2:
+ (r = p, g = v, b = t);
+ break;
+ case 3:
+ (r = p, g = q, b = v);
+ break;
+ case 4:
+ (r = t, g = p, b = v);
+ break;
+ case 5:
+ (r = v, g = p, b = q);
+ break;
+ }
+ return (r * 255 << 16) + (g * 255 << 8) + b * 255;
+};
var Bowl = Container.expand(function () {
var self = Container.call(this);
var bowlGraphics = self.createAsset('bowl', 'Bowl Graphics', 0, 1);
self.x = 0;
@@ -54,8 +83,12 @@
self.addBiteMark = function () {
var biteMarkGraphics = self.createAsset('bitemark', 'Bite Mark Graphics', .5, .5);
biteMarkGraphics.x = cookieGraphics.x;
biteMarkGraphics.y = cookieGraphics.y;
+ var h = 1 / 32;
+ var s = 0.8;
+ var v = 0.8;
+ biteMarkGraphics.tint = hsvToRgb(h, s, v);
self.addChild(biteMarkGraphics);
};
self.flyToRandomPosition = function () {
var randomX = Math.random() * 2048;
egg. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
sugar in a bag. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a butter stik in its wrapper. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a pink kithen bowl. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pile of sugar. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cracked egg white and yolk seeping. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
soft butter stick. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A delicious plain vanilla cookie. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A delicious plain vanilla cookie, where three bites have been taken. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cute kawaian bakery interior with strawberry tiles. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cute girl happily eating way too many vanilla cookies. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.