Code edit (1 edits merged)
Please save this source code
User prompt
augment power of projections in up direction
Code edit (1 edits merged)
Please save this source code
User prompt
in updateHeartType, switch visibility of heart assets in the heartpool objects depending on their heartType
User prompt
ok change Projections algorithm : in Projections constructor add all heat types assets in the heart Container and only make visible current heatType ones
User prompt
ok change Projections algorithm : add all heat types assets in the heart Container and only make visible current heatType ones
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: newHeartAsset is not defined' in or related to this line: 'heart.addChild(newHeartAsset);' Line Number: 240
User prompt
add a flag to avoid using hearts in popHearts while updateHeartType is running
Code edit (1 edits merged)
Please save this source code
User prompt
in updateHeartType remember to update the heartPool using preloadedAssets. don't use `clone` which do not exists and don't use attachAsset neither LK.getasset() inside updateHeartType to avoid performence issues
User prompt
in updateHeartType remember to update the heartPool using preloadedAssets. don't use `clone` which do not exists and don't use attachAsset/getasset to avoid performence issues
User prompt
in updateHeartType remember to update the heartPool using preloadedAssets. don't use `clone` which do not exists and don't use attachAsset to avoid performence issues
User prompt
in updateHeartType remember to update the heartPool using preloadedAssets. don't use `clone` which do not exists and don't use attachAsset to avoid performence issues
User prompt
Please fix the bug: 'TypeError: heartAsset.clone is not a function' in or related to this line: 'heart.addChild(heartAsset.clone());' Line Number: 236
User prompt
in updateHeartType remember to update the heartPool using preloadedAssets
User prompt
in updateHeartType remember to update the heartPool
User prompt
Please fix the bug: 'heartType is not defined' in or related to this line: 'var heartAsset = heart.attachAsset('heart_' + heartType + '_frame_0', {' Line Number: 184
User prompt
review updateHeartType and popHearts because from heartType >= 1 only 1 heart is generatedby popHearts
User prompt
Please fix the bug: 'Error: getChildAt: Supplied index 0 does not exist in the child list, or the supplied DisplayObject must be a child of the caller' in or related to this line: 'heart.removeChildAt(0); // Remove the current heart asset' Line Number: 232
User prompt
in Projections, preload all needed assets the use them in updateHeartType instead of calling heart.attachAsset() at run time
User prompt
No, neither `LK.setTimeout(_updateHearts, 16);` nor requestAnimationFrame are solution. find something from those two
User prompt
requestAnimationFrame(_updateHearts); won't work.; not available on platform
User prompt
find a better solution than ` if (index < self.heartPool.length) { LK.setTimeout(_updateHearts, 16); // Schedule next batch update }` to avoid flicker
User prompt
ok but like I said it make new hearts created by popHearts to flicker
===================================================================
--- original.js
+++ change.js
@@ -164,16 +164,16 @@
self.heartPool.forEach(function (heart) {
if (heart.children.length > 0) {
heart.removeChildAt(0); // Remove the current heart asset
}
- // Use preloaded assets to update the heartPool
- var heartAsset = LK.getAsset('heart_' + heartType + '_frame_0', {
- anchorX: 0.5,
- anchorY: 0.5,
- scaleX: 0.5,
- scaleY: 0.5
+ var heartAsset = self.preloadedAssets[heartType];
+ var newHeartAsset = LK.getAsset(heartAsset.id, {
+ anchorX: heartAsset.anchorX,
+ anchorY: heartAsset.anchorY,
+ scaleX: heartAsset.scaleX,
+ scaleY: heartAsset.scaleY
});
- heart.addChild(heartAsset);
+ heart.addChild(newHeartAsset);
});
};
});
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