|
@@ -136,7 +136,7 @@ var createScene = function() {
|
|
|
camera.setTarget(BABYLON.Vector3.Zero());
|
|
|
|
|
|
// This attaches the camera to the canvas
|
|
|
- camera.attachControl(true);
|
|
|
+ camera.attachControl(canvas, true);
|
|
|
|
|
|
return scene;
|
|
|
};`);
|
|
@@ -155,7 +155,7 @@ class Playground {
|
|
|
camera.setTarget(BABYLON.Vector3.Zero());
|
|
|
|
|
|
// This attaches the camera to the canvas
|
|
|
- camera.attachControl(true);
|
|
|
+ camera.attachControl(canvas, true);
|
|
|
|
|
|
return scene;
|
|
|
}
|
|
@@ -287,7 +287,7 @@ class Playground {
|
|
|
camera.setTarget(BABYLON.Vector3.Zero());
|
|
|
|
|
|
// This attaches the camera to the canvas
|
|
|
- camera.attachControl(true);
|
|
|
+ camera.attachControl(canvas, true);
|
|
|
|
|
|
// This creates a light, aiming 0,1,0 - to the sky (non-mesh)
|
|
|
var light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(0, 1, 0), scene);
|
|
@@ -305,7 +305,6 @@ class Playground {
|
|
|
var ground = BABYLON.MeshBuilder.CreateGround("ground", {width: 6, height: 6}, scene);
|
|
|
|
|
|
return scene;
|
|
|
-
|
|
|
};`);
|
|
|
} else {
|
|
|
this._editor.setValue(`class Playground {
|
|
@@ -320,7 +319,7 @@ class Playground {
|
|
|
camera.setTarget(BABYLON.Vector3.Zero());
|
|
|
|
|
|
// This attaches the camera to the canvas
|
|
|
- camera.attachControl(true);
|
|
|
+ camera.attachControl(canvas, true);
|
|
|
|
|
|
// This creates a light, aiming 0,1,0 - to the sky (non-mesh)
|
|
|
var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
|