function applyLayoutFn(layout) {

        World.buttonRotate.translate.x = layout.offsetX;
        World.buttonRotate.translate.y = layout.offsetY;

        World.buttonSnap.translate.x = -layout.offsetX;
        World.buttonSnap.translate.y = -layout.offsetY;

        World.buttonRotate.scale.x = 1;
        World.buttonRotate.scale.y = 1;
        World.buttonSnap.scale.x = 1;
        World.buttonSnap.scale.y = 1;

        World.modelCar.scale = {
            x: layout.carScale,
            y: layout.carScale,
            z: layout.carScale
        };

        World.defaultScale = layout.carScale;

        World.modelCar.translate = {
            x: 0.0,
            y: layout.carTranslateY,
            z: 0.0
        };
    }
/*
        ApplyLayout is used to define position and scale of certain drawables in the scene for certain states. The
        different layouts are defined at the top of the World object.
    */
ApplyLayout is used to define position and scale of certain drawables in the scene for certain states. The
different layouts are defined at the top of the World object.
ApplyLayout is used to define position and scale of certain drawables in the scene for certain states . The different layouts are defined at the top of the World object .
function applyLayoutFn(layout) {
        World.buttonRotate.translate.x = layout.offsetX;
        World.buttonRotate.translate.y = layout.offsetY;
        World.buttonSnap.translate.x = -layout.offsetX;
        World.buttonSnap.translate.y = -layout.offsetY;
        World.buttonRotate.scale.x = 1;
        World.buttonRotate.scale.y = 1;
        World.buttonSnap.scale.x = 1;
        World.buttonSnap.scale.y = 1;
        World.modelCar.scale = {
            x: layout.carScale,
            y: layout.carScale,
            z: layout.carScale
        };
        World.defaultScale = layout.carScale;
        World.modelCar.translate = {
            x: 0.0,
            y: layout.carTranslateY,
            z: 0.0
        };
    }
function applyLayoutFn ( layout ) { World . buttonRotate . translate . x = layout . offsetX ; World . buttonRotate . translate . y = layout . offsetY ; World . buttonSnap . translate . x = - layout . offsetX ; World . buttonSnap . translate . y = - layout . offsetY ; World . buttonRotate . scale . x = 1 ; World . buttonRotate . scale . y = 1 ; World . buttonSnap . scale . x = 1 ; World . buttonSnap . scale . y = 1 ; World . modelCar . scale = { x : layout . carScale , y : layout . carScale , z : layout . carScale } ; World . defaultScale = layout . carScale ; World . modelCar . translate = { x : 0.0 , y : layout . carTranslateY , z : 0.0 } ; }
ApplyLayout is used to define position and scale of certain drawables in the scene for certain states.
ApplyLayout is used to define position and scale of certain drawables in the scene for certain states .