User prompt
the fourth screen can have 3 options : Continue Restart Next Slide
User prompt
Please fix the bug: 'RangeError: Maximum call stack size exceeded' in or related to this line: 'self.setText('Screen ' + (presentation.currentSlide + 1) + ' of ' + presentation.slides.length);' Line Number: 141
User prompt
Please fix the bug: 'ReferenceError: presentation is not defined' in or related to this line: 'self.setText('Screen ' + (presentation.currentSlide + 1) + ' of ' + presentation.slides.length);' Line Number: 141
User prompt
show this progress in game
User prompt
4th screen : Like canva is the common man's tool against figma, upit can be the common man's tool against Unteal / Unity
Code edit (3 edits merged)
Please save this source code
User prompt
make the text size on third screen smaller. Confine all the text to an inner box that is 30% smaller than the size of the screen, across all screens
User prompt
third screen content : Upit has enormous potential to disrupt the education sector worldwide
User prompt
remove " click for next slide" on firs screen
User prompt
center align all the text
User prompt
align the text on second screen in 3 lines
User prompt
move both icons inwards by 20%
Code edit (4 edits merged)
Please save this source code
User prompt
add two icons on left and right to go to next screen and previous screen
User prompt
show an indication on the first screen with text " click for next slide"
User prompt
make the screen clickable, and add the next screen with text " Upit is more than Just a Game Engine"
User prompt
change the font to default
Code edit (1 edits merged)
Please save this source code
/**** * Classes ****/ var HomePage = Container.expand(function () { var self = Container.call(this); var title = self.attachAsset('title', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1366 }); // Shapes do not have a setText method. If you want to display text, you should create a Text2 object. var titleText = new Text2('Upit \n Repositioning', { size: 200, fill: 0xFFFFFF }); titleText.anchor.set(0.5, 0.5); titleText.x = title.x; titleText.y = title.y; self.addChild(titleText); // Add an indication text to the first screen var indicationText = new Text2('\n \n click for next slide', { size: 100, fill: 0xFFFFFF }); indicationText.anchor.set(0.5, 0.5); indicationText.x = title.x; indicationText.y = title.y + 200; self.addChild(indicationText); }); var LeftIcon = Container.expand(function () { var self = Container.call(this); var icon = self.attachAsset('leftIcon', { anchorX: 0.5, anchorY: 0.5, x: 100, y: 1366 }); }); var NextScreen = Container.expand(function () { var self = Container.call(this); var title = self.attachAsset('title', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1366 }); var titleText = new Text2('Upit is \n more than \n Just a Game Engine', { size: 200, fill: 0xFFFFFF }); titleText.anchor.set(0.5, 0.5); titleText.x = title.x; titleText.y = title.y; self.addChild(titleText); }); var Presentation = Container.expand(function () { var self = Container.call(this); self.slides = []; self.currentSlide = 0; self.addSlide = function (slide) { self.slides.push(slide); }; self.nextSlide = function () { if (self.currentSlide < self.slides.length - 1) { self.currentSlide++; self.updateSlide(); } }; self.prevSlide = function () { if (self.currentSlide > 0) { self.currentSlide--; self.updateSlide(); } }; self.updateSlide = function () { // Update the displayed slide }; self.update = function () { // Update presentation content }; }); var RightIcon = Container.expand(function () { var self = Container.call(this); var icon = self.attachAsset('rightIcon', { anchorX: 0.5, anchorY: 0.5, x: 1948, y: 1366 }); }); var Slide = Container.expand(function () { var self = Container.call(this); self.update = function () { // Update slide content }; }); /**** * Initialize Game ****/ var game = new LK.Game({ title: "SlideDeck Pro", description: "An interactive presentation tool built with the LK game engine. Create dynamic slides with professional transitions, responsive layouts, and touch navigation. Engage your audience with interactive elements and animations for impactful meetings, pitches, or educational presentations.", backgroundColor: 0x000000 }); /**** * Game Code ****/ var homePage = game.addChild(new HomePage()); var nextScreen = game.addChild(new NextScreen()); nextScreen.visible = false; var leftIcon = game.addChild(new LeftIcon()); var rightIcon = game.addChild(new RightIcon()); leftIcon.down = function () { if (nextScreen.visible) { nextScreen.visible = false; homePage.visible = true; } }; rightIcon.down = function () { if (homePage.visible) { homePage.visible = false; nextScreen.visible = true; } };
===================================================================
--- original.js
+++ change.js
@@ -44,9 +44,9 @@
anchorY: 0.5,
x: 1024,
y: 1366
});
- var titleText = new Text2('Upit is more than Just a Game Engine', {
+ var titleText = new Text2('Upit is \n more than \n Just a Game Engine', {
size: 200,
fill: 0xFFFFFF
});
titleText.anchor.set(0.5, 0.5);
@@ -111,11 +111,9 @@
var homePage = game.addChild(new HomePage());
var nextScreen = game.addChild(new NextScreen());
nextScreen.visible = false;
var leftIcon = game.addChild(new LeftIcon());
-leftIcon.x = 2048 * 0.2; // Move the left icon inwards by 20%
var rightIcon = game.addChild(new RightIcon());
-rightIcon.x = 2048 - 2048 * 0.2; // Move the right icon inwards by 20%
leftIcon.down = function () {
if (nextScreen.visible) {
nextScreen.visible = false;
homePage.visible = true;