From 43f54403060c1a825056e2c7368aa46404dcd410 Mon Sep 17 00:00:00 2001 From: Thebarda Date: Fri, 2 Dec 2016 04:57:30 +0200 Subject: [PATCH] coucou --- assets/FinalBaseMesh.obj | 2 -- scripts/demo.js | 43 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/assets/FinalBaseMesh.obj b/assets/FinalBaseMesh.obj index 87affb9..44414e5 100644 --- a/assets/FinalBaseMesh.obj +++ b/assets/FinalBaseMesh.obj @@ -1,8 +1,6 @@ # 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware # File Created: 21.08.2014 17:37:51 -mtllib FinalBaseMesh.mtl - # # object Group1 # diff --git a/scripts/demo.js b/scripts/demo.js index b0e2a4a..eed6845 100644 --- a/scripts/demo.js +++ b/scripts/demo.js @@ -151,19 +151,56 @@ function createObj(loader,scene){ }); }; - var noye1 = loader.addMeshTask("noye1", "", "assets/", "FinalBaseMesh.obj"); + var noye1 = loader.addMeshTask("noye1", "", "assets/", "generic_male_02.obj"); noye1.onSuccess = function(t){ t.loadedMeshes.forEach(function(m) {//m = model m.position.x = 10; - m.position.y = 0; + m.position.y = -3; m.position.z = 70; - m.position.x = -10; + m.position.x = 1; m.rotation.y = Math.PI / 2; m.scaling = new BABYLON.Vector3(1, 1, 1); m.checkCollisions = true; }); }; + var noye2 = loader.addMeshTask("noye2", "", "assets/", "generic_male_02.obj"); + noye2.onSuccess = function(t){ + t.loadedMeshes.forEach(function(m) {//m = model + m.position.x = 10; + m.position.y = -3; + m.position.z = 60; + m.position.x = 5; + m.scaling = new BABYLON.Vector3(1, 1, 1); + m.checkCollisions = true; + }); + }; + + var migrant1 = loader.addMeshTask("migrant1", "", "assets/", "generic_male_02.obj"); + migrant1.onSuccess = function(t){ + t.loadedMeshes.forEach(function(m) {//m = model + m.position.x = 10; + m.position.y = 0; + m.position.z = 130; + m.position.x = 1; + m.rotation.y = Math.PI / 2; + m.scaling = new BABYLON.Vector3(1, 1, 1); + m.checkCollisions = true; + }); + }; + + var migrant2 = loader.addMeshTask("migrant2", "", "assets/", "generic_male_02.obj"); + migrant2.onSuccess = function(t){ + t.loadedMeshes.forEach(function(m) {//m = model + m.position.x = 10; + m.position.y = 0; + m.position.z = 135; + m.position.x = 5; + m.scaling = new BABYLON.Vector3(1, 1, 1); + m.checkCollisions = true; + }); + }; + var boat1 = loader.addMeshTask("boat1", "", "assets/", "Cannoe.obj"); boat1.onSuccess = function(t){ t.loadedMeshes.forEach(function(m) {//m = model