Added namespaces
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -33,7 +33,7 @@ function init() {
|
||||
scene.add(ambient_light);
|
||||
|
||||
// on initialise la camera que l’on 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 l’ajoute à 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);
|
||||
|
||||
Reference in New Issue
Block a user