浏览代码

BufferAttribute: Moved deprecated code.

Mr.doob 9 年之前
父节点
当前提交
4471bd6562
共有 2 个文件被更改,包括 11 次插入7 次删除
  1. 11 0
      src/Three.Legacy.js
  2. 0 7
      src/core/BufferAttribute.js

+ 11 - 0
src/Three.Legacy.js

@@ -310,6 +310,17 @@ Object.defineProperties( THREE.Light.prototype, {
 
 
 //
 //
 
 
+Object.defineProperties( THREE.BufferAttribute.prototype, {
+	length: {
+		get: function () {
+			console.warn( 'THREE.BufferAttribute: .length has been deprecated. Please use .count.' );
+			return this.array.length;
+		}
+	}
+} );
+
+//
+
 Object.defineProperties( THREE.Material.prototype, {
 Object.defineProperties( THREE.Material.prototype, {
 	wrapAround: {
 	wrapAround: {
 		get: function () {
 		get: function () {

+ 0 - 7
src/core/BufferAttribute.js

@@ -20,13 +20,6 @@ THREE.BufferAttribute.prototype = {
 
 
 	constructor: THREE.BufferAttribute,
 	constructor: THREE.BufferAttribute,
 
 
-	get length() {
-
-		console.warn( 'THREE.BufferAttribute: .length has been deprecated. Please use .count.' );
-		return this.array.length;
-
-	},
-
 	get count() {
 	get count() {
 
 
 		return this.array.length / this.itemSize;
 		return this.array.length / this.itemSize;