Added namespaces

This commit is contained in:
Thomas FORGIONE
2015-07-01 16:31:43 +02:00
parent 5e0551179e
commit 9c7350d41b
38 changed files with 552 additions and 556 deletions

View File

@@ -1,12 +1,12 @@
var BouncingCube = function(size, style) {
Cube.call(this, size, style);
L3D.Cube.call(this, size, style);
this.fixed_center = new THREE.Vector3();
this.center = new THREE.Vector3();
this.speed = new THREE.Vector3(0,0,300);
};
BouncingCube.prototype = Object.create(Cube.prototype);
BouncingCube.prototype = Object.create(L3D.Cube.prototype);
BouncingCube.prototype.constructor = BouncingCube;
BouncingCube.prototype.update = function() {

View File

@@ -33,7 +33,7 @@ function init() {
scene.add(ambient_light);
// on initialise la camera que lon place ensuite sur la scène
camera = new Camera(50, container_size.width / container_size.height, 1, 10000);
camera = new L3D.Camera(50, container_size.width / container_size.height, 1, 10000);
scene.add(camera);
window.addEventListener('resize', onWindowResize, false);
@@ -42,7 +42,7 @@ function init() {
// on créé un cube au quel on définie un matériau puis on lajoute à la scène
cube = new BouncingCube(200, {color: "red"});
plane = new Plane(1000,1000);
plane = new L3D.Plane(1000,1000);
plane.translate(0,0,-100);
cube.addToScene(scene);