===================================================================
--- original.js
+++ change.js
@@ -5,9 +5,10 @@
var Coloring = Container.expand(function () {
var self = Container.call(this);
var coloringGraphics = self.attachAsset('coloring', {
anchorX: 0.5,
- anchorY: 0.5
+ anchorY: 0.5,
+ depth: 0.5 // Add depth for 3D effect
});
self.color = function (color) {
coloringGraphics.tint = color;
};
@@ -17,9 +18,10 @@
var Doll = Container.expand(function () {
var self = Container.call(this);
var dollGraphics = self.attachAsset('doll', {
anchorX: 0.5,
- anchorY: 0.5
+ anchorY: 0.5,
+ depth: 0.5 // Add depth for 3D effect
});
self.dress = function (dressAsset) {
var dress = self.attachAsset(dressAsset, {
anchorX: 0.5,
@@ -36,9 +38,10 @@
var House = Container.expand(function () {
var self = Container.call(this);
var houseGraphics = self.attachAsset('house', {
anchorX: 0.5,
- anchorY: 0.5
+ anchorY: 0.5,
+ depth: 0.5 // Add depth for 3D effect
});
self.clean = function () {
// Cleaning logic
console.log("House cleaned");
@@ -48,9 +51,10 @@
var Puzzle = Container.expand(function () {
var self = Container.call(this);
var puzzleGraphics = self.attachAsset('puzzle', {
anchorX: 0.5,
- anchorY: 0.5
+ anchorY: 0.5,
+ depth: 0.5 // Add depth for 3D effect
});
self.solve = function () {
// Puzzle solving logic
console.log("Puzzle solved");
@@ -60,9 +64,11 @@
/****
* Initialize Game
****/
var game = new LK.Game({
- backgroundColor: 0x000000 //Init game with black background
+ backgroundColor: 0x000000,
+ //Init game with black background
+ renderer: '3d' // Enable 3D rendering
});
/****
* Game Code