Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: easingFunctionsIn is not defined' in or related to this line: 'randomEasing = easingFunctionsIn[Math.floor(Math.random() * easingFunctionsIn.length)];' Line Number: 70
User prompt
when logo is out, automatically call it in witha random "...In" easing (no need to tap again)
User prompt
When tapping, if logo is out animate the logo with a random "...In" easing and if logo is in, animate it gouing out with a random "...out" easing
User prompt
instead of tween.bounceInOut, use a random easing from all available ones
Code edit (1 edits merged)
Please save this source code
User prompt
use Elastic, and replay the anim when screen us tapped
User prompt
try Back easing
User prompt
try Elastic
User prompt
try bounce
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'tween is undefined' in or related to this line: 'tween(logo, {' Line Number: 39 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Please fix the bug: 'tween is undefined' in or related to this line: 'tween(logo, {' Line Number: 38 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Please fix the bug: 'TypeError: tween is undefined' in or related to this line: 'tween(logo, {' Line Number: 37 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Please fix the bug: 'ReferenceError: tween is not defined' in or related to this line: 'tween(logo, {' Line Number: 37 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Please fix the bug: 'TypeError: LK.import is not a function' in or related to this line: 'var tween = LK.import("@upit/tween.v1");' Line Number: 9
User prompt
Use Tween plugin to animate logo entrance ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Please fix the bug: 'TypeError: LK.import is not a function' in or related to this line: 'var tween = LK.import("@upit/tween.v1");' Line Number: 9
User prompt
add the logo in the game but out of the screen
User prompt
Please fix the bug: 'TypeError: LK.import is not a function' in or related to this line: 'var tween = LK.import("@upit/tween.v1");' Line Number: 9
User prompt
Use Tween plugin to animate logo entrance ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Initial prompt
Test non public 2
/**** * Classes ****/ // The LK.import function is not supported, so it has been removed. // The LK.import function is not supported, so it has been removed. // The LK.import function is not supported, so it has been removed. // The LK.import function is not supported, so it has been removed. //<Assets used in the game will automatically appear here> // Logo class var Logo = Container.expand(function () { var self = Container.call(this); var logoGraphics = self.attachAsset('logo', { anchorX: 0.5, anchorY: 0.5 }); }); /**** * Initialize Game ****/ //<Write entity 'classes' with empty functions for important behavior here> var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ // Create a logo instance and add it to the game var logo = game.addChild(new Logo()); // Position the logo out of the screen logo.x = -logo.width; logo.y = -logo.height; // Create a tween to animate the logo entrance tween(logo, { x: 1024, y: 1366 }, { duration: 2000, easing: tween.easeInOut }); var tween = function tween(target, properties, config) { var startValues = {}; var changeValues = {}; for (var prop in properties) { startValues[prop] = target[prop]; changeValues[prop] = properties[prop] - startValues[prop]; } var startTime = Date.now(); var duration = config.duration || 0; var easing = config.easing || function (t) { return t; }; // default to linear easing var _update = function update() { var elapsed = Date.now() - startTime; var t = elapsed / duration; if (t > 1) { t = 1; } for (var prop in properties) { target[prop] = startValues[prop] + changeValues[prop] * easing(t); } if (t < 1) { requestAnimationFrame(_update); } else if (config.onFinish) { config.onFinish(); } }; _update(); };
===================================================================
--- original.js
+++ change.js
@@ -3,8 +3,9 @@
****/
// The LK.import function is not supported, so it has been removed.
// The LK.import function is not supported, so it has been removed.
// The LK.import function is not supported, so it has been removed.
+// The LK.import function is not supported, so it has been removed.
//<Assets used in the game will automatically appear here>
// Logo class
var Logo = Container.expand(function () {
var self = Container.call(this);