Преглед изворни кода

ColladaExporter: clean up.

Don McCurdy пре 6 година
родитељ
комит
cc1a502ed1
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      examples/jsm/exporters/ColladaExporter.js

+ 4 - 4
examples/jsm/exporters/ColladaExporter.js

@@ -211,7 +211,7 @@ ColladaExporter.prototype = {
 
 
 				// convert the geometry to bufferGeometry if it isn't already
 				// convert the geometry to bufferGeometry if it isn't already
 				var bufferGeometry = g;
 				var bufferGeometry = g;
-				if ( bufferGeometry instanceof Geometry ) {
+				if ( bufferGeometry.isGeometry ) {
 
 
 					bufferGeometry = ( new BufferGeometry() ).fromGeometry( bufferGeometry );
 					bufferGeometry = ( new BufferGeometry() ).fromGeometry( bufferGeometry );
 
 
@@ -362,11 +362,11 @@ ColladaExporter.prototype = {
 
 
 				var type = 'phong';
 				var type = 'phong';
 
 
-				if ( m instanceof MeshLambertMaterial ) {
+				if ( m.isMeshLambertMaterial ) {
 
 
 					type = 'lambert';
 					type = 'lambert';
 
 
-				} else if ( m instanceof MeshBasicMaterial ) {
+				} else if ( m.isMeshBasicMaterial ) {
 
 
 					type = 'constant';
 					type = 'constant';
 
 
@@ -519,7 +519,7 @@ ColladaExporter.prototype = {
 
 
 			node += getTransform( o );
 			node += getTransform( o );
 
 
-			if ( o instanceof Mesh && o.geometry != null ) {
+			if ( o.isMesh && o.geometry != null ) {
 
 
 				// function returns the id associated with the mesh and a "BufferGeometry" version
 				// function returns the id associated with the mesh and a "BufferGeometry" version
 				// of the geometry in case it's not a geometry.
 				// of the geometry in case it's not a geometry.