User prompt
Add 3d to the house
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.timeOfDayText.setText('Time of Day: ' + hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0'));' Line Number: 518
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.timeOfDayText.setText('Time of Day: ' + hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0'));' Line Number: 519
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.timeOfDayText.setText('Time of Day: ' + hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0'));' Line Number: 518
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.timeOfDayText.setText('Time of Day: ' + hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0'));' Line Number: 516
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.timeOfDayText.setText('Time of Day: ' + hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0'));' Line Number: 516
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.timeOfDayText.setText('Time of Day: ' + hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0'));' Line Number: 516
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.timeOfDayText.setText('Time of Day: ' + hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0'));' Line Number: 515
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.timeOfDayText.setText('Time of Day: ' + hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0'));' Line Number: 515
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'self.timeOfDayText.setText('Time of Day: ' + hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0'));' Line Number: 515
User prompt
Fix Bug: 'Uncaught TypeError: Graphics is not a constructor' in this line: 'var reflectionMask = new Graphics();' Line Number: 18
User prompt
Fix Bug: 'Uncaught TypeError: Graphics is not a constructor' in this line: 'var reflectionMask = new Graphics();' Line Number: 18
User prompt
Fix Bug: 'Uncaught TypeError: Graphics is not a constructor' in this line: 'var reflectionMask = new Graphics();' Line Number: 18
User prompt
Fix Bug: 'Uncaught TypeError: Sprite is not a constructor' in this line: 'var reflectionSprite = new Sprite(reflectionTexture);' Line Number: 15
User prompt
Fix Bug: 'Uncaught TypeError: Graphics is not a constructor' in this line: 'var reflectionGradient = new Graphics();' Line Number: 12
User prompt
Improve reflection
User prompt
Add réflection on the background
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'var shadow = new filters.DropShadowFilter();' Line Number: 336
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'var shadow = new filters.DropShadowFilter();' Line Number: 336
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'var shadow = new filters.DropShadowFilter();' Line Number: 336
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'var shadow = new filters.DropShadowFilter();' Line Number: 336
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'var shadow = new filters.DropShadowFilter();' Line Number: 336
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'var shadow = new filters.DropShadowFilter();' Line Number: 336
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'var shadow = new filters.DropShadowFilter();' Line Number: 336
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'var shadow = new filters.DropShadowFilter();' Line Number: 336
===================================================================
--- original.js
+++ change.js
@@ -1,29 +1,4 @@
-var BackgroundWithReflection = Container.expand(function () {
- var self = Container.call(this);
- var backgroundGraphics = self.createAsset('background', 'Background Graphics', 0.5, 0.5);
- backgroundGraphics.width = 4096 * 0.8;
- backgroundGraphics.height = 5464 * 0.8;
- backgroundGraphics.y = -backgroundGraphics.height / 2 - 400;
- var reflectionGraphics = self.createAsset('background', 'Background Reflection', 0.5, 0.5);
- reflectionGraphics.width = backgroundGraphics.width;
- reflectionGraphics.height = backgroundGraphics.height;
- reflectionGraphics.y = backgroundGraphics.height / 2 - 400;
- reflectionGraphics.scale.y = -1;
- var reflectionTexture = LK.getAsset('reflectionGradient', 'Reflection Gradient', 0, 0);
- reflectionTexture.width = reflectionGraphics.width;
- reflectionTexture.height = reflectionGraphics.height;
- var reflectionSprite = LK.getAsset('reflectionGradient', 'Reflection Gradient', 0.5, 0.5);
- reflectionSprite.y = reflectionGraphics.y;
- reflectionSprite.alpha = 0.5;
- var reflectionMask = LK.getAsset('reflectionMask', 'Reflection Mask', 0, 0);
- reflectionMask.width = reflectionGraphics.width;
- reflectionMask.height = reflectionGraphics.height;
- reflectionSprite.mask = reflectionMask;
- self.addChild(reflectionSprite);
- self.addChild(backgroundGraphics);
- self.addChild(reflectionGraphics);
-});
var Market = Container.expand(function () {
var self = Container.call(this);
var marketGraphics = self.createAsset('market', 'Market Graphics', .5, .5);
self.x = 2048 / 2;
@@ -276,9 +251,10 @@
House.prototype.initializeRandomPosition = function () {
this.x = Math.random() * 2048;
this.y = Math.random() * 2732;
};
- var houseGraphics = self.createAsset('house', 'House Graphics', .5, .5);
+ var houseGraphics = self.createAsset('house3D', '3D House Graphics', .5, .5);
+ houseGraphics.scale.set(1.2);
self.isOccupiable = true;
House.prototype.occupy = function (villager) {
if (!this.isOccupiable) return;
this.isOccupiable = false;
@@ -423,9 +399,13 @@
var resources = createResources();
self.addChild(resources.wood);
self.addChild(resources.rock);
self.addChild(resources.food);
- var background = new BackgroundWithReflection();
+ var background = self.createAsset('background', 'Background Graphics', 0, 0);
+ background.width = 4096 * 0.8;
+ background.height = 5464 * 0.8;
+ background.x = (2048 - background.width) / 2;
+ background.y = (2732 - background.height) / 2 - 400;
self.addChildAt(background, 0);
Game.prototype.createVillager = function (x, y, isBaby) {
var villager = new Villager(this.resources);
villager.x = x;
@@ -509,17 +489,11 @@
var time = (Date.now() - self.startTime) % cycleDuration;
var dayProgress = time / cycleDuration * 2 * Math.PI;
var alpha = 0.15 + 0.2 * Math.cos(dayProgress - Math.PI) * -0.5;
LK.stageContainer.alpha = alpha;
- var hours = Math.floor((Date.now() - self.startTime) / (1000 * 60 * 60) % 24);
- var minutes = Math.floor((Date.now() - self.startTime) / (1000 * 60) % 60);
- var hours = Math.floor((Date.now() - self.startTime) / (1000 * 60 * 60) % 24);
- var minutes = Math.floor((Date.now() - self.startTime) / (1000 * 60) % 60);
- if (self.timeOfDayText && typeof self.timeOfDayText.setText === 'function') {
- var hours = Math.floor((Date.now() - self.startTime) / (1000 * 60 * 60) % 24);
- var minutes = Math.floor((Date.now() - self.startTime) / (1000 * 60) % 60);
- self.timeOfDayText.setText('Time of Day: ' + hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0'));
- }
+ var hours = Math.floor(time / 3600000) % 24;
+ var minutes = Math.floor(time % 3600000 / 60000);
+ self.timeOfDayText.setText('Time of Day: ' + hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0'));
};
self.timeOfDayText = new Text2('Time of Day: 00:00', {
size: 50,
fill: "#ffffff"
A background of a paysage with plain and without tree or montainbut no water see from the top in the air 100m by 100m Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
One human medieval villager in a warcraft 2 style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a house in a warcraft 2 style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A tree a rock and crambery in a RTS style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A heart comic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cloud in a comic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A market in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An Inn in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An school in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An bakery in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A well in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A tree in a rts style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An apple in a rts style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A rock in a rts style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A home in a RTS and fantasy style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A brewery in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A lumberjack in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a marketplace in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a festival in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.