Browse Source

GLTFExporter: Check isInterpolantFactoryMethodGLTFCubicSpline property of factory method to detect cubic spline interpolant

Takahiro 7 years ago
parent
commit
53e8dc1e3c
1 changed files with 3 additions and 3 deletions
  1. 3 3
      examples/js/exporters/GLTFExporter.js

+ 3 - 3
examples/js/exporters/GLTFExporter.js

@@ -958,10 +958,10 @@ THREE.GLTFExporter.prototype = {
 
 				var interpolation;
 
-				// Detecting glTF cubic spline interpolant by checking factory method name because
+				// Detecting glTF cubic spline interpolant by checking factory method's special property
 				// GLTFCubicSplineInterpolant is a custom interpolant and doesn't return
-				// valid value from .getInterpolation().
-				if ( track.createInterpolant.name === 'InterpolantFactoryMethodGLTFCubicSpline' ) {
+				// valid value from track.getInterpolation().
+				if ( track.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === true ) {
 
 					interpolation = 'CUBICSPLINE';