Code edit (3 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'parent')' in or related to this line: 'if (obstacles[i].parent) {' Line Number: 276
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'parent')' in or related to this line: 'if (obstacles[i].parent) {' Line Number: 276
Code edit (4 edits merged)
Please save this source code
User prompt
modify ranbowcolors function to only create an array of 30 evenly distributed colors on a seamless rainbow
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught ReferenceError: i is not defined' in or related to this line: 'var orbitGraphics = self.attachAsset('orbit1', {' Line Number: 89
User prompt
set each new orbit on creation to the tint that is the next index in the rainbow colors array.
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: rainbowColors is not a function' in or related to this line: 'var colors = rainbowColors();' Line Number: 189
Code edit (13 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught ReferenceError: utils is not defined' in or related to this line: 'colors.push(utils.rgb2hex(utils.hsv2rgb(hue / 360, 1, 1)));' Line Number: 150
User prompt
make a global variable which is an array containing 60 values representing an even and looping rainbow of colors.
Code edit (6 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'width')' in or related to this line: 'if (orbits[i].width > 2700) {' Line Number: 216
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: angleSpeed is not defined' in or related to this line: 'self.angle = (self.angle || 0) + angleSpeed;' Line Number: 72
User prompt
Fix Bug: 'ReferenceError: angleSpeed is not defined' in or related to this line: 'self.angle = (self.angle || 0) + angleSpeed;' Line Number: 72
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: obstacleGraphics is not defined' in or related to this line: 'barrier.y = self.y + (self.height - obstacleGraphics.height) / 2 * Math.sin(barrier.angle);' Line Number: 109
User prompt
Fix Bug: 'ReferenceError: obstacleGraphics is not defined' in or related to this line: 'barrier.x = self.x + (self.width - obstacleGraphics.width) / 2 * Math.cos(barrier.angle);' Line Number: 108
User prompt
barriers should circle around their parent orbit's center at a distance equal to its width.
Code edit (6 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught ReferenceError: currentTargetOrbit is not defined' in or related to this line: 'if (!currentTargetOrbit == 0) {' Line Number: 84
===================================================================
--- original.js
+++ change.js
@@ -177,9 +177,8 @@
return colors;
}();
// Initialize assets used in this game.
// Game variables
-var colors = rainbowColors;
var player;
var orbits = [];
var obstacles = [];
var currentOrbitIndex = 0;