User prompt
add a function updateHeartType(heartType) in Projections
Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: heartFrames is not defined' in or related to this line: 'heartFrames[self.heartType][i].alpha = Math.max(0, Math.min(1, 1 - (tapCount - (5 - i) * 5) / 10));' Line Number: 155
User prompt
Please fix the bug: 'Uncaught ReferenceError: heartFrames is not defined' in or related to this line: 'heartFrames[self.heartType][i].alpha = Math.max(0, Math.min(1, 1 - (tapCount - (5 - i) * 5) / 10));' Line Number: 154
User prompt
Please fix the bug: 'Uncaught ReferenceError: heartFrames is not defined' in or related to this line: 'self.currentGraphic = heartFrames[self.heartType][frameIndex];' Line Number: 146
User prompt
Please fix the bug: 'Uncaught ReferenceError: heartFrames is not defined' in or related to this line: 'self.currentGraphic = heartFrames[self.heartType][frameIndex];' Line Number: 146
User prompt
Please fix the bug: 'Uncaught ReferenceError: heartFrames is not defined' in or related to this line: 'self.currentGraphic = heartFrames[self.heartType][frameIndex];' Line Number: 133
User prompt
Please fix the bug: 'Uncaught ReferenceError: heartFrames is not defined' in or related to this line: 'self.currentGraphic = heartFrames[self.heartType][frameIndex];' Line Number: 133
User prompt
Please fix the bug: 'ReferenceError: heartFrames is not defined' in or related to this line: 'self.currentGraphic = heartFrames[self.heartType][5];' Line Number: 259
User prompt
after the explosion, switch to next heart type
Code edit (1 edits merged)
Please save this source code
User prompt
Analyze BigHeart deeply then make the hardcoded 50 limit of taps a property
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'explosionTriggered')' in or related to this line: 'if (!self.explosionTriggered) {' Line Number: 245
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'explosionTriggered')' in or related to this line: 'if (!self.explosionTriggered) {' Line Number: 245
Code edit (2 edits merged)
Please save this source code
User prompt
now add the 10 types of hearts in the heartFrames
Code edit (1 edits merged)
Please save this source code
User prompt
also extract the shake anim in a separate function
User prompt
Make BigHeart code more readable by extracting code in sepate functions
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
in Projections, for create variables for important values like scale, gravity, etc.. like it was done for speed and nbProjections. it's easier to tweak
User prompt
Ok, now randomize their size and rotation
User prompt
with a bit more power toward up
===================================================================
--- original.js
+++ change.js
a big lovely heart
a big stone heart
a big used copper heart
face view of a big bronze heart
face view of a big silver heart
Big shining gold heart verly slightly ornate. face view.
Big precious shiny porcelain heart slightly ornate. face view.
Large precious heart in mother-of-pearl, lightly ornate. Front view.
Large heart in precious ruby, very lightly decorated. Front view.
The most precious large heart in diamond, Front view.
clean pink enamel board witha very thin border