Browse Source

Renamed Channels to Layers.

Mr.doob 9 years ago
parent
commit
8f0ceef122
4 changed files with 6 additions and 6 deletions
  1. 3 3
      src/core/Layers.js
  2. 1 1
      src/core/Object3D.js
  3. 1 1
      src/renderers/WebGLRenderer.js
  4. 1 1
      utils/build/includes/common.json

+ 3 - 3
src/core/Channels.js → src/core/Layers.js

@@ -2,15 +2,15 @@
  * @author mrdoob / http://mrdoob.com/
  */
 
-THREE.Channels = function () {
+THREE.Layers = function () {
 
 	this.mask = 1;
 
 };
 
-THREE.Channels.prototype = {
+THREE.Layers.prototype = {
 
-	constructor: THREE.Channels,
+	constructor: THREE.Layers,
 
 	set: function ( channel ) {
 

+ 1 - 1
src/core/Object3D.js

@@ -16,7 +16,6 @@ THREE.Object3D = function () {
 	this.type = 'Object3D';
 
 	this.parent = null;
-	this.channels = new THREE.Channels();
 	this.children = [];
 
 	this.up = THREE.Object3D.DefaultUp.clone();
@@ -74,6 +73,7 @@ THREE.Object3D = function () {
 	this.matrixAutoUpdate = THREE.Object3D.DefaultMatrixAutoUpdate;
 	this.matrixWorldNeedsUpdate = false;
 
+	this.layers = new THREE.Layers();
 	this.visible = true;
 
 	this.castShadow = false;

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -1240,7 +1240,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		if ( object.visible === false ) return;
 
-		if ( ( object.channels.mask & camera.channels.mask ) !== 0 ) {
+		if ( ( object.layers.mask & camera.layers.mask ) !== 0 ) {
 
 			if ( object instanceof THREE.Light ) {
 

+ 1 - 1
utils/build/includes/common.json

@@ -18,9 +18,9 @@
 	"src/math/Math.js",
 	"src/math/Spline.js",
 	"src/math/Triangle.js",
-	"src/core/Channels.js",
 	"src/core/Clock.js",
 	"src/core/EventDispatcher.js",
+	"src/core/Layers.js",
 	"src/core/Raycaster.js",
 	"src/core/Object3D.js",
 	"src/core/Face3.js",