Ver código fonte

WebGLGeometries: Removed Geometry support.

Mr.doob 4 anos atrás
pai
commit
48466ae3e8

+ 1 - 2
src/renderers/webgl/WebGLGeometries.d.ts

@@ -2,7 +2,6 @@ import { WebGLAttributes } from './WebGLAttributes';
 import { WebGLInfo } from './WebGLInfo';
 import { BufferAttribute } from '../../core/BufferAttribute';
 import { BufferGeometry } from '../../core/BufferGeometry';
-import { Geometry } from '../../core/Geometry';
 import { Object3D } from '../../core/Object3D';
 
 export class WebGLGeometries {
@@ -10,7 +9,7 @@ export class WebGLGeometries {
 	constructor( gl: WebGLRenderingContext, attributes: WebGLAttributes, info: WebGLInfo );
 
 	get( object: Object3D, geometry: Geometry | BufferGeometry ): BufferGeometry;
-	update( geometry: Geometry | BufferGeometry ): void;
+	update( geometry: BufferGeometry ): void;
 	getWireframeAttribute( geometry: Geometry | BufferGeometry ): BufferAttribute;
 
 }

+ 2 - 9
src/renderers/webgl/WebGLGeometries.js

@@ -1,5 +1,4 @@
 import { Uint16BufferAttribute, Uint32BufferAttribute } from '../../core/BufferAttribute.js';
-import { BufferGeometry } from '../../core/BufferGeometry.js';
 import { arrayMax } from '../../utils.js';
 
 function WebGLGeometries( gl, attributes, info, bindingStates ) {
@@ -63,15 +62,9 @@ function WebGLGeometries( gl, attributes, info, bindingStates ) {
 
 			buffergeometry = geometry;
 
-		} else if ( geometry.isGeometry ) {
-
-			if ( geometry._bufferGeometry === undefined ) {
-
-				geometry._bufferGeometry = new BufferGeometry().setFromObject( object );
-
-			}
+		} else {
 
-			buffergeometry = geometry._bufferGeometry;
+			console.log( 'TODO: Remove this', geometry );
 
 		}