Skip to content

Commit

Permalink
Remove console warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Jos Dirksen committed Nov 30, 2013
1 parent 2935fb3 commit 4dc4099
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion chapter-07/01-particles.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

// create a render and set the size
var canvasRenderer = new THREE.CanvasRenderer();
canvasRenderer.setClearColorHex(0x000000, 1.0);
canvasRenderer.setClearColor(new THREE.Color(0x000000, 1.0));
canvasRenderer.setSize(window.innerWidth, window.innerHeight);

// position and point the camera to the center of the scene
Expand Down
2 changes: 1 addition & 1 deletion chapter-07/02-particles-webgl.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

// create a render and set the size
var webGLRenderer = new THREE.WebGLRenderer();
webGLRenderer.setClearColorHex(0x000000, 1.0);
webGLRenderer.setClearColor(new THREE.Color(0x000000, 1.0));
webGLRenderer.setSize(window.innerWidth, window.innerHeight);

// position and point the camera to the center of the scene
Expand Down
7 changes: 4 additions & 3 deletions chapter-07/03-basic-particle-system.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

// create a render and set the size
var webGLRenderer = new THREE.WebGLRenderer();
webGLRenderer.setClearColorHex(0x000000, 1.0);
webGLRenderer.setClearColor(new THREE.Color(0x000000, 1.0));
webGLRenderer.setSize(window.innerWidth, window.innerHeight);

// position and point the camera to the center of the scene
Expand All @@ -64,8 +64,8 @@
this.rotateSystem = true;

this.redraw = function () {
if (scene.getChildByName("particles")) {
scene.remove(scene.getChildByName("particles"));
if (scene.getObjectByName("particles")) {
scene.remove(scene.getObjectByName("particles"));
}
createParticles(controls.size, controls.transparent, controls.opacity, controls.vertexColors, controls.sizeAttenuation, controls.color);
};
Expand Down Expand Up @@ -108,6 +108,7 @@
}

system = new THREE.ParticleSystem(geom, material);
system.name="particles";
scene.add(system);
}

Expand Down
2 changes: 1 addition & 1 deletion chapter-07/04-program-based-particle-system.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

// create a render and set the size
var canvasRenderer = new THREE.CanvasRenderer();
canvasRenderer.setClearColorHex(0x000000, 1.0);
canvasRenderer.setClearColor(new THREE.Color(0x000000, 1.0));
canvasRenderer.setSize(window.innerWidth, window.innerHeight);

// position and point the camera to the center of the scene
Expand Down
6 changes: 3 additions & 3 deletions chapter-07/05-program-based-particle-system-webgl.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

// create a render and set the size
var webGLRenderer = new THREE.WebGLRenderer();
webGLRenderer.setClearColorHex(0x000000, 1.0);
webGLRenderer.setClearColor(new THREE.Color(0x000000, 1.0));
webGLRenderer.setSize(window.innerWidth, window.innerHeight);

// position and point the camera to the center of the scene
Expand Down Expand Up @@ -118,8 +118,8 @@
this.sizeAttenuation = true;

this.redraw = function () {
if (scene.getChildByName("particles")) {
scene.remove(scene.getChildByName("particles"));
if (scene.getObjectByName("particles")) {
scene.remove(scene.getObjectByName("particles"));
}
createParticles(controls.size, controls.transparent, controls.opacity, controls.sizeAttenuation, controls.color);
};
Expand Down
6 changes: 3 additions & 3 deletions chapter-07/06-rainy-scene.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

// create a render and set the size
var webGLRenderer = new THREE.WebGLRenderer();
webGLRenderer.setClearColorHex(0x000000, 1.0);
webGLRenderer.setClearColor(new THREE.Color(0x000000, 1.0));
webGLRenderer.setSize(window.innerWidth, window.innerHeight);

// position and point the camera to the center of the scene
Expand All @@ -65,8 +65,8 @@
this.sizeAttenuation = true;

this.redraw = function () {
scene.remove(scene.getChildByName("particles1"));
scene.remove(scene.getChildByName("particles2"));
scene.remove(scene.getObjectByName("particles1"));
scene.remove(scene.getObjectByName("particles2"));

createParticles(controls.size, controls.transparent, controls.opacity, controls.sizeAttenuation, controls.color);
};
Expand Down
2 changes: 1 addition & 1 deletion chapter-07/07-snowy-scene.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

// create a render and set the size
var webGLRenderer = new THREE.WebGLRenderer();
webGLRenderer.setClearColorHex(0x000000, 1.0);
webGLRenderer.setClearColor(new THREE.Color(0x000000, 1.0));
webGLRenderer.setSize(window.innerWidth, window.innerHeight);

// position and point the camera to the center of the scene
Expand Down
2 changes: 1 addition & 1 deletion chapter-07/10-create-particle-system-from-model.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

// create a render and set the size
var webGLRenderer = new THREE.WebGLRenderer();
webGLRenderer.setClearColorHex(0x000000, 1.0);
webGLRenderer.setClearColor(new THREE.Color(0x000000, 1.0));
webGLRenderer.setSize(window.innerWidth, window.innerHeight);
webGLRenderer.shadowMapEnabled = true;

Expand Down

0 comments on commit 4dc4099

Please sign in to comment.