1
0
Fork 0
This commit is contained in:
Thebarda 2016-12-02 00:38:24 +02:00
parent 100d60cb6f
commit cde258a425

View file

@ -111,11 +111,19 @@ function createDemoScene(scene) {
mur2.visibility = 0;
mur2.checkCollisions = true;
var mur3 = BABYLON.Mesh.CreatePlane("mur3", 50, scene);
mur3.rotation.z = Math.PI / 2;
mur3.position.z = 25;
mur3.visibility = 0;
mur3.checkCollisions = true;
var mur31Salle1 = BABYLON.Mesh.CreatePlane("mur31Salle1", 20, scene);
mur31Salle1.rotation.z = Math.PI / 2;
mur31Salle1.position.z = 25;
mur31Salle1.position.x = -15;
mur31Salle1.visibility = 0;
mur31Salle1.checkCollisions = true;
var mur32Salle1 = BABYLON.Mesh.CreatePlane("mur32Salle1", 20, scene);
mur32Salle1.rotation.z = Math.PI / 2;
mur32Salle1.position.z = 25;
mur32Salle1.position.x = 15;
mur32Salle1.visibility = 0;
mur32Salle1.checkCollisions = true;
var mur4 = BABYLON.Mesh.CreatePlane("mur4", 50, scene);
mur4.rotation.x = Math.PI;
@ -123,6 +131,27 @@ function createDemoScene(scene) {
mur4.visibility = 0;
mur4.checkCollisions = true;
/*-----------------COULOIR 1-------------------------*/
var groundCouloir1 = BABYLON.Mesh.CreateGround("groundCouloir1", 10, 20, 2, scene);
groundCouloir1.material = new BABYLON.StandardMaterial("gMaterial", scene);
groundCouloir1.material.diffuseTexture = new BABYLON.Texture("images/ground.png", scene);
groundCouloir1.position.z = 35;
groundCouloir1.checkCollisions = true;
var mur1Couloir2 = BABYLON.Mesh.CreatePlane("mur1Couloir2", 20, scene);
mur1Couloir2.rotation.y = Math.PI / 2;
mur1Couloir2.position.z = 105;
mur1Couloir2.position.x = 5;
mur1Couloir2.visibility = 0;
mur1Couloir2.checkCollisions = true;
var mur2Couloir2 = BABYLON.Mesh.CreatePlane("mur2Couloir2", 20, scene);
mur2Couloir2.rotation.y = -(Math.PI / 2);
mur2Couloir2.position.z = 105;
mur2Couloir2.position.x = -5;
mur2Couloir2.visibility = 0;
mur2Couloir2.checkCollisions = true;
/*-----------------SALLE 2----------------------------------*/
var groundSalle2 = BABYLON.Mesh.CreatePlane("groundSalle2", 50, scene);
@ -154,19 +183,19 @@ function createDemoScene(scene) {
mur2Salle2.visibility = 0;
mur2Salle2.checkCollisions = true;
var mur31Salle1 = BABYLON.Mesh.CreatePlane("mur31Salle1", 20, scene);
mur31Salle1.rotation.z = Math.PI / 2;
mur31Salle1.position.z = 95;
mur31Salle1.position.x = -15;
mur31Salle1.visibility = 0;
mur31Salle1.checkCollisions = true;
var mur31Salle2 = BABYLON.Mesh.CreatePlane("mur31Salle2", 20, scene);
mur31Salle2.rotation.z = Math.PI / 2;
mur31Salle2.position.z = 95;
mur31Salle2.position.x = -15;
mur31Salle2.visibility = 0;
mur31Salle2.checkCollisions = true;
var mur32Salle1 = BABYLON.Mesh.CreatePlane("mur32Salle1", 20, scene);
mur32Salle1.rotation.z = Math.PI / 2;
mur32Salle1.position.z = 95;
mur32Salle1.position.x = 15;
mur32Salle1.visibility = 0;
mur32Salle1.checkCollisions = true;
var mur32Salle2 = BABYLON.Mesh.CreatePlane("mur32Salle2", 20, scene);
mur32Salle2.rotation.z = Math.PI / 2;
mur32Salle2.position.z = 95;
mur32Salle2.position.x = 15;
mur32Salle2.visibility = 0;
mur32Salle2.checkCollisions = true;
var mur4Salle2 = BABYLON.Mesh.CreatePlane("mur4Salle2", 50, scene);
mur4Salle2.rotation.y = Math.PI / 2;