diff --git a/images/noir.png b/images/noir.png new file mode 100644 index 0000000..1fe8f47 Binary files /dev/null and b/images/noir.png differ diff --git a/images/textCouloir2.png b/images/textCouloir2.png new file mode 100644 index 0000000..d847b49 Binary files /dev/null and b/images/textCouloir2.png differ diff --git a/scripts/demo.js b/scripts/demo.js index e41102d..d451f3e 100644 --- a/scripts/demo.js +++ b/scripts/demo.js @@ -145,6 +145,11 @@ function createDemoScene(scene) { var textCouloir1 = new BABYLON.StandardMaterial("texture3", scene); textCouloir1.diffuseTexture = new BABYLON.Texture("images/textCouloir1.png", scene); + textCouloir1.specularColor = new BABYLON.Color3(0, 0, 0); + + var textCouloir11 = new BABYLON.StandardMaterial("texture4", scene); + textCouloir11.diffuseTexture = new BABYLON.Texture("images/noir.png", scene); + textCouloir11.specularColor = new BABYLON.Color3(0, 0, 0); var groundCouloir1 = BABYLON.Mesh.CreateGround("groundCouloir1", 10, 20, 2, scene); groundCouloir1.material = new BABYLON.StandardMaterial("gMaterial", scene); @@ -161,10 +166,11 @@ function createDemoScene(scene) { mur1Couloir1.checkCollisions = true; var mur2Couloir1 = BABYLON.Mesh.CreatePlane("mur2Couloir1", 20, scene); + mur2Couloir1.material = textCouloir11; mur2Couloir1.rotation.y = -(Math.PI / 2); mur2Couloir1.position.z = 35; mur2Couloir1.position.x = -5; - mur2Couloir1.visibility = 0; + mur2Couloir1.visibility = 1; mur2Couloir1.checkCollisions = true; /*-----------------SALLE 2----------------------------------*/ @@ -222,6 +228,10 @@ function createDemoScene(scene) { /*--------------COULOIR 2--------------------*/ + var textCouloir2 = new BABYLON.StandardMaterial("texture5", scene); + textCouloir2.diffuseTexture = new BABYLON.Texture("images/textCouloir2.png", scene); + textCouloir2.specularColor = new BABYLON.Color3(0, 0, 0); + var groundCouloir2 = BABYLON.Mesh.CreateGround("groundCouloir2", 10, 20, 2, scene); groundCouloir2.material = new BABYLON.StandardMaterial("gMaterial", scene); groundCouloir2.material = groundMaterial; @@ -232,14 +242,16 @@ function createDemoScene(scene) { mur1Couloir2.rotation.y = Math.PI / 2; mur1Couloir2.position.z = 105; mur1Couloir2.position.x = 5; - mur1Couloir2.visibility = 0; + mur1Couloir2.visibility = 1; + mur1Couloir2.material = textCouloir2; 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.visibility = 1; + mur2Couloir2.material = textCouloir11; mur2Couloir2.checkCollisions = true; /*----------------SALLE 3-------------------------*/