浏览代码

Warnings for r71 code.

Mr.doob 10 年之前
父节点
当前提交
d15e48e6a7

+ 22 - 0
examples/js/loaders/BinaryLoader.js

@@ -4,6 +4,13 @@
 
 THREE.BinaryLoader = function ( manager ) {
 
+	if ( typeof manager === 'boolean' ) {
+
+		console.warn( 'THREE.BinaryLoader: showStatus parameter has been removed from constructor.' );
+		manager = undefined;
+
+	}
+
 	this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;
 
 };
@@ -12,6 +19,21 @@ THREE.BinaryLoader.prototype = {
 
 	constructor: THREE.BinaryLoader,
 
+	// Deprecated
+	
+	get statusDomElement () {
+
+		if ( this._statusDomElement === undefined ) {
+
+			this._statusDomElement = document.createElement( 'div' );
+
+		}
+
+		console.warn( 'THREE.BinaryLoader: .statusDomElement has been removed.' );
+		return this._statusDomElement;
+
+	},
+
 	// Load models generated by slim OBJ converter with BINARY option (converter_obj_three_slim.py -t binary)
 	//  - binary models consist of two files: JS and BIN
 	//  - parameters

+ 19 - 0
examples/js/loaders/ctm/CTMLoader.js

@@ -12,6 +12,25 @@ THREE.CTMLoader = function () {
 
 	THREE.Loader.call( this );
 
+	// Deprecated
+	
+	Object.defineProperties( this, {
+		statusDomElement: {
+			get: function () {
+
+				if ( this._statusDomElement === undefined ) {
+
+					this._statusDomElement = document.createElement( 'div' );
+
+				}
+
+				console.warn( 'THREE.BinaryLoader: .statusDomElement has been removed.' );
+				return this._statusDomElement;
+
+			}
+		},
+	} );
+
 };
 
 THREE.CTMLoader.prototype = Object.create( THREE.Loader.prototype );

+ 11 - 1
src/core/BufferAttribute.js

@@ -20,7 +20,7 @@ THREE.BufferAttribute.prototype = {
 
 	constructor: THREE.BufferAttribute,
 
-	get length () {
+	get length() {
 
 		console.warn( 'THREE.BufferAttribute: .length has been deprecated. Please use .count.' );
 		return this.array.length;
@@ -364,3 +364,13 @@ THREE.Float64Attribute = function ( array, itemSize ) {
 	return new THREE.BufferAttribute( new Float64Array( array ), itemSize );
 
 };
+
+
+// Deprecated
+
+THREE.DynamicBufferAttribute = function ( array, itemSize ) {
+
+	console.warn( 'THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead.' );
+	return new THREE.BufferAttribute( array, itemSize ).setDynamic( true );
+
+};

+ 2 - 0
src/loaders/JSONLoader.js

@@ -22,6 +22,8 @@ THREE.JSONLoader.prototype = {
 
 	constructor: THREE.JSONLoader,
 
+	// Deprecated
+	
 	get statusDomElement () {
 
 		if ( this._statusDomElement === undefined ) {

+ 21 - 0
src/materials/Material.js

@@ -235,6 +235,27 @@ THREE.Material.prototype = {
 
 		this.dispatchEvent( { type: 'dispose' } );
 
+	},
+
+	// Deprecated
+
+	get wrapAround () {
+
+		console.warn( 'THREE.' + this.type + ': .wrapAround has been removed.' );
+
+	},
+
+	set wrapAround ( boolean ) {
+
+		console.warn( 'THREE.' + this.type + ': .wrapAround has been removed.' );
+
+	},
+
+	get wrapRGB () {
+
+		console.warn( 'THREE.' + this.type + ': .wrapRGB has been removed.' );
+		return new THREE.Color();
+
 	}
 
 };