瀏覽代碼

Removed deprecated animation entities

Mugen87 8 年之前
父節點
當前提交
c8b92befe3

+ 0 - 128
docs/examples/collada/Animation.html

@@ -1,128 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<base href="../../" />
-		<script src="list.js"></script>
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<div class="desc">This class animates an object based on an hierarchy. This hierarchy can be Object3ds or bones.</div>
-
-
-		<h2>Constructor</h2>
-
-
-		<h3>[name]([page:Object3d root], [page:String name])</h3>
-		<div>
-		root -- The mesh to animate. <br />
-		name -- The name of the animation.
-		</div>
-		<div>
-		Creates an animation for root. The animation data is gathered from AnimationHandler based on its name.
-		</div>
-
-		<h2>Properties</h2>
-
-		<h3>[property:Object3d root]</h3>
-		<div>
-		The root object of the animation.
-		</div>
-
-		<h3>[property:Object data]</h3>
-		<div>
-		The data containing the animation.
-		</div>
-
-		<h3>[property:Array hierarchy]</h3>
-		<div>
-		The objects that are influenced by the animation.
-		</div>
-
-		<h3>[property:number currentTime]</h3>
-		<div>
-		The time elapsed since the last start/restart of the animation.
-		</div>
-
-		<h3>[property:number timeScale]</h3>
-		<div>
-		How much to scale the speed of the animation. Defaults to 1.
-		</div>
-
-		<h3>[property:boolean isPlaying]</h3>
-		<div>
-		Indicates whether the animation is playing. This shouldn't be adapted by user code.
-		</div>
-
-		<h3>[property:boolean isPaused]</h3>
-		<div>
-		Indicates whether the animation is paused. This shouldn't be adapted by user code.
-		</div>
-
-		<h3>[property:boolean loop]</h3>
-		<div>
-		Set to make the animation restart when the animation ends.
-		</div>
-
-		<h3>[property:number interpolationType]</h3>
-		<div>
-		The type to indicate how to interpolate between 2 data points.
-		</div>
-
-		<h2>Methods</h2>
-
-		<h3>[method:null play]([page:Number startTime])</h3>
-		<div>
-		Starts the animation at the startTime (in seconds) of the animation.
-		</div>
-
-		<h3>[method:null stop]()</h3>
-		<div>
-		Stops the animation.
-		</div>
-
-		<h3>[method:Boolean update]([page:Number deltaTimeMS])</h3>
-		<div>
-		deltaTimeMS -- The time elapsed between the previous frame and this frame in milliseconds.
-		</div>
-		<div>
-		Updates the animation in time. This shouldn't be called by user code. The animationHandler calls this method.
-		</div>
-
-		<h3>[method:array interpolateCatmullRom]([page:Array points], [page:Number scale])</h3>
-		<div>
-		points -- The 4 control point to calculate CatMullRom. <br />
-		scale -- The scale between the previous key and the next key.
-		</div>
-		<div>
-		Interpolates the point based on the key. Is used in update.
-		</div>
-
-		<h3>[method:Object getNextKeyWith]([page:String type], [page:Object h], [page:Number key])</h3>
-		<div>
-		type -- The animationtype for the key. Can be "pos", "rot" and "scl".<br />
-		h -- The object of the hierarchy that contains the key. <br />
-		key -- The index of the next possible key.
-		</div>
-		<div>
-		Gets the next key. Is used in Update.
-		</div>
-
-		<h3>[method:Object getPrevKeyWith]([page:String type], [page:Object h], [page:Number key])</h3>
-		<div>
-		type -- The animationtype for the key. Can be "pos", "rot" and "scl".<br />
-		h -- The object of the hierarchy that contains the key. <br />
-		key -- The index of the prev possible key.
-		</div>
-		<div>
-		Gets the previous key. Is used in Update.
-		</div>
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/collada/[name].js examples/js/loaders/collada/[name].js]
-	</body>
-</html>

+ 0 - 102
docs/examples/collada/AnimationHandler.html

@@ -1,102 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<base href="../../" />
-		<script src="list.js"></script>
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<div class="desc">
-		The AnimationHandler handles the initialisation of the Animation data and
-		the animations itself. It keeps track of every animation and if it's active or not.
-		It also update all animations which are active if its method *update* is called.
-		</div>
-
-
-		<h2>Constructor</h2>
-
-
-		<h3>[name]()</h3>
-		<div>
-		The animationHandler can't be called as constructor.
-		</div>
-
-		<h2>Properties</h2>
-
-
-		<h3>[property:number CATMULLROM]</h3>
-		<div>
-		Enum Value to indicate that the animation needs to be interpolated as CATMULLROM.
-		</div>
-
-		<h3>[property:number CATMULLROM_FORWARD]</h3>
-		<div>
-		Enum Value to indicate that the animation needs to be interpolated as CATMULLROM_FORWARD.
-		</div>
-
-		<h3>[property:number LINEAR]</h3>
-		<div>
-		Enum Value to indicate that the animation needs to be interpolated as LINEAR.
-		</div>
-
-		<h2>Methods</h2>
-
-
-
-		<h3>[method:null removeFromUpdate]([page:Animation animation])</h3>
-		<div>
-		animation -- The Animation to remove from the update.
-		</div>
-		<div>
-		Removes the animation from the update cycle. This gets called when the animation stops. This shouldn't be called by usercode.
-		</div>
-
-		<h3>[method:Object get]([page:String name])</h3>
-		<div>
-		name -- The name of the animationData
-		</div>
-		<div>
-		Gets the animationData from its library.
-		</div>
-
-		<h3>[method:null update]([page:Number deltaTimeMS]) </h3>
-		<div>
-		deltaTimeMS -- Time elapsed since last update in milliseconds.
-		</div>
-		<div>
-		Updates all active animations with deltaTime.
-		</div>
-
-		<h3>[method:null parse]([page:Object root])</h3>
-		<div>
-		root -- object
-		</div>
-		<div>
-		Parses the object to get the hierachy.
-		</div>
-
-		<h3>[method:null add]([page:object data])</h3>
-		<div>
-		data -- The animationData
-		</div>
-		<div>
-		Adds the animationData from its library.
-		</div>
-
-		<h3>[method:null addToUpdate]([page:Animation animation]) </h3>
-		<div>
-		animation -- The Animation to add from the update.
-		</div>
-		<div>
-		Adds the animation from the update cycle. This gets called when the animation starts. This shouldn't be called by user code.
-		</div>
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/collada/[name].js examples/js/loaders/collada/[name].js]
-	</body>
-</html>

+ 0 - 116
docs/examples/collada/KeyFrameAnimation.html

@@ -1,116 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<base href="../../" />
-		<script src="list.js"></script>
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<div class="desc">Runs a keyframe animation as imported from the [page:ColladaLoader].</div>
-
-		<h2>Examples</h2>
-
-		<div>[example:webgl_loader_collada_keyframe loader / collada / keyframe ]</div>
-
-
-		<h2>Constructor</h2>
-
-
-		<h3>[name]([page:Object data])</h3>
-		<div>
-		data -- An individual animation object from a the [page:ColladaLoader], e.g. loadedColladaObj.animations[0] <br />
-		</div>
-		<div>
-		Creates a new keyframe animation and initializes it to the first keyframes.
-		</div>
-
-
-		<h2>Properties</h2>
-
-		<h3>[property:Object3D root]</h3>
-		<div>
-		The root object of the animation
-		</div>
-
-		<h3>[property:Object data]</h3>
-		<div>
-		The data containing the animation
-		</div>
-
-		<h3>[property:Array hierarchy]</h3>
-		<div>
-		The objects that are influenced by the animation.
-		</div>
-
-		<h3>[property:number currentTime]</h3>
-		<div>
-		The time elapsed since the last start/restart of the animation.
-		</div>
-
-		<h3>[property:number timeScale]</h3>
-		<div>
-		How much to scale the speed of the animation. Defaults to 1.
-		</div>
-
-		<h3>[property:boolean isPlaying]</h3>
-		<div>
-		Indicates whether the animation is playing. This shouldn't be adapted by user code.
-		</div>
-
-		<h3>[property:boolean isPaused]</h3>
-		<div>
-		Indicates whether the animation is paused. This shouldn't be adapted by user code.
-		</div>
-
-		<h3>[property:boolean loop]</h3>
-		<div>
-		Set to make the animation restart when the animation ends.
-		</div>
-
-		<h2>Methods</h2>
-
-		<h3>[method:null play]([page:Number startTime])</h3>
-		<div>
-		Starts the animation at the startTime (in seconds) of the animation.
-		</div>
-
-		<h3>[method:null stop]()</h3>
-		<div>
-		Stops the animation.
-		</div>
-
-		<h3>[method:null update]([page:Float deltaTime])</h3>
-		<div>
-		deltaTime -- The change in time in seconds
-		</div>
-		<div>
-		Updates the keyframe animation
-		</div>
-
-		<h3>[method:Object getNextKeyWith]([page:String sid], [page:Integer h], [page:Integer key])</h3>
-		<div>
-		sid -- The string id <br />
-		h -- The index in the heirarchy to use<br />
-		key -- The index of which key to start from
-		</div>
-		<div>
-		Used internally to traverse the animation
-		</div>
-
-		<h3>[method:Object getPrevKeyWith]([page:String sid], [page:Integer h], [page:Integer key])</h3>
-		<div>
-		sid -- The string id <br />
-		h -- The index in the heirarchy to use<br />
-		key -- The index of which key to start from
-		</div>
-		<div>
-		Used internally to traverse the animation
-		</div>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/collada/[name].js examples/js/loaders/collada/[name].js]
-	</body>
-</html>

+ 0 - 6
docs/list.js

@@ -332,12 +332,6 @@ var list = {
 
 	"Examples": {
 
-		"Collada Animation": {
-			"ColladaAnimation": "examples/collada/Animation",
-			"AnimationHandler": "examples/collada/AnimationHandler",
-			"KeyFrameAnimation": "examples/collada/KeyFrameAnimation"
-		},
-
 		"Geometries": {
 			"ConvexBufferGeometry": "examples/geometries/ConvexBufferGeometry",
 			"ConvexGeometry": "examples/geometries/ConvexGeometry"

+ 0 - 23
editor/js/Viewport.js

@@ -561,29 +561,6 @@ var Viewport = function ( editor ) {
 
 		requestAnimationFrame( animate );
 
-		/*
-
-		// animations
-
-		if ( THREE.AnimationHandler.animations.length > 0 ) {
-
-			THREE.AnimationHandler.update( 0.016 );
-
-			for ( var i = 0, l = sceneHelpers.children.length; i < l; i ++ ) {
-
-				var helper = sceneHelpers.children[ i ];
-
-				if ( helper instanceof THREE.SkeletonHelper ) {
-
-					helper.update();
-
-				}
-
-			}
-
-		}
-		*/
-
 		if ( vrEffect && vrEffect.isPresenting ) {
 
 			render();

+ 0 - 240
editor/js/libs/tern-threejs/threejs.js

@@ -969,246 +969,6 @@
       },
       "!doc": "A class containing useful utility functions for scene manipulation."
     },
-    "Animation": {
-      "!url": "http://threejs.org/docs/#Reference/extras/collada-animation/Animation",
-      "prototype": {
-        "root": {
-          "!type": "Object3d",
-          "!doc": "The root object of the animation."
-        },
-        "data": {
-          "!type": "object",
-          "!doc": "The data containing the animation"
-        },
-        "hierarchy": {
-          "!type": "[]",
-          "!doc": "The objects that are influenced by the animation."
-        },
-        "currentTime": {
-          "!type": "number",
-          "!doc": "The time elapsed since the last start/restart of the animation."
-        },
-        "timeScale": {
-          "!type": "number",
-          "!doc": "The timez"
-        },
-        "isPlaying": {
-          "!type": "boolean",
-          "!doc": "Indicates whether the animation is playing. This shouldn't be adapted by user code."
-        },
-        "isPaused": {
-          "!type": "boolean",
-          "!doc": "Indicates whether the animation is paused. This shouldn't be adapted by user code."
-        },
-        "loop": {
-          "!type": "boolean",
-          "!doc": "Set to make the animation restart when the animation ends."
-        },
-        "interpolationType": {
-          "!type": "number",
-          "!doc": "The type to indicate how to interpolate between 2 data points."
-        },
-        "play": {
-          "!type": "fn(startTime: number)",
-          "!doc": "Starts the animation from a moment startTime in the animation."
-        },
-        "stop": {
-          "!type": "fn()",
-          "!doc": "Stops the animation."
-        },
-        "update": {
-          "!type": "fn(deltaTimeMS: number) -> bool",
-          "!doc": "Updates the animation in time. This shouldn't be called by user code. The animationHandler calls this method."
-        },
-        "interpolateCatmullRom": {
-          "!type": "fn(points: [], scale: number) -> array",
-          "!doc": "Interpolates the point based on the key. Is used in update."
-        },
-        "getNextKeyWith": {
-          "!type": "fn(type: string, h: object, key: number) -> object",
-          "!doc": "Gets the next key. Is used in Update."
-        },
-        "getPrevKeyWith": {
-          "!type": "fn(type: string, h: object, key: number) -> object",
-          "!doc": "Gets the previous key. Is used in Update."
-        }
-      },
-      "!doc": "This class animates an object based on an hierarchy. This hierarchy can be Object3ds or bones.",
-      "!type": "fn(root: Object3d, name: string)"
-    },
-    "AnimationHandler": {
-      "!url": "http://threejs.org/docs/#Reference/extras/collada-animation/AnimationHandler",
-      "prototype": {
-        "CATMULLROM": {
-          "!type": "number",
-          "!doc": "Enum Value to indicate that the animation needs to be interpolated as CATMULLROM."
-        },
-        "CATMULLROM_FORWARD": {
-          "!type": "number",
-          "!doc": "Enum Value to indicate that the animation needs to be interpolated as CATMULLROM_FORWARD."
-        },
-        "LINEAR": {
-          "!type": "number",
-          "!doc": "Enum Value to indicate that the animation needs to be interpolated as LINEAR."
-        },
-        "removeFromUpdate": {
-          "!type": "fn(animation: +THREE.Animation)",
-          "!doc": "Removes the animation from the update cycle. This gets called when the animation stops. This shouldn't be called by usercode."
-        },
-        "get": {
-          "!type": "fn(name: string) -> object",
-          "!doc": "Gets the animationData from its library."
-        },
-        "update": {
-          "!type": "fn(deltaTimeMS: number)",
-          "!doc": "Updates all active animations with deltaTime."
-        },
-        "parse": {
-          "!type": "fn(root: object)",
-          "!doc": "Parses the object to get the hierachy."
-        },
-        "add": {
-          "!type": "fn(data: object)",
-          "!doc": "Adds the animationData from its library."
-        },
-        "addToUpdate": {
-          "!type": "fn(animation: +THREE.Animation)",
-          "!doc": "Adds the animation from the update cycle. This gets called when the animation starts. This shouldn't be called by user code."
-        }
-      },
-      "!doc": "The AnimationHandler handles the initialisation of the Animation data and \n\t\tthe animations itself. It keeps track of every animation and if it's active or not.\n\t\tIt also update all animations which are active if its method *update* is called.",
-      "!type": "fn()"
-    },
-    "AnimationMorphTarget": {
-      "!url": "http://threejs.org/docs/#Reference/extras/collada-animation/AnimationMorphTarget",
-      "prototype": {
-        "root": {
-          "!type": "todo",
-          "!doc": "todo"
-        },
-        "data": {
-          "!type": "todo",
-          "!doc": "todo"
-        },
-        "hierarchy": {
-          "!type": "todo",
-          "!doc": "todo"
-        },
-        "currentTime": {
-          "!type": "number",
-          "!doc": "todo"
-        },
-        "timeScale": {
-          "!type": "number",
-          "!doc": "todo"
-        },
-        "isPlaying": {
-          "!type": "boolean",
-          "!doc": "todo"
-        },
-        "isPaused": {
-          "!type": "boolean",
-          "!doc": "todo"
-        },
-        "loop": {
-          "!type": "boolean",
-          "!doc": "todo"
-        },
-        "influence": {
-          "!type": "number",
-          "!doc": "todo"
-        },
-        "play": {
-          "!type": "fn() -> todo",
-          "!doc": "todo"
-        },
-        "pause": {
-          "!type": "fn() -> todo",
-          "!doc": "todo"
-        },
-        "stop": {
-          "!type": "fn() -> todo",
-          "!doc": "todo"
-        },
-        "update": {
-          "!type": "fn(deltaTimeMS: todo) -> todo",
-          "!doc": "todo"
-        }
-      },
-      "!doc": "todo",
-      "!type": "fn(root: todo, data: todo)"
-    },
-    "KeyFrameAnimation": {
-      "!url": "http://threejs.org/docs/#Reference/extras/collada-animation/KeyFrameAnimation",
-      "prototype": {
-        "root": {
-          "!type": "todo",
-          "!doc": "todo"
-        },
-        "data": {
-          "!type": "todo",
-          "!doc": "todo"
-        },
-        "hierarchy": {
-          "!type": "todo",
-          "!doc": "todo"
-        },
-        "currentTime": {
-          "!type": "number",
-          "!doc": "todo"
-        },
-        "timeScale": {
-          "!type": "number",
-          "!doc": "todo"
-        },
-        "isPlaying": {
-          "!type": "boolean",
-          "!doc": "todo"
-        },
-        "isPaused": {
-          "!type": "boolean",
-          "!doc": "todo"
-        },
-        "loop": {
-          "!type": "boolean",
-          "!doc": "todo"
-        },
-        "JITCompile": {
-          "!type": "boolean",
-          "!doc": "todo"
-        },
-        "play": {
-          "!type": "fn() -> todo",
-          "!doc": "todo"
-        },
-        "pause": {
-          "!type": "fn() -> todo",
-          "!doc": "todo"
-        },
-        "stop": {
-          "!type": "fn() -> todo",
-          "!doc": "todo"
-        },
-        "update": {
-          "!type": "fn(deltaTimeMS: todo) -> todo",
-          "!doc": "todo"
-        },
-        "interpolateCatmullRom": {
-          "!type": "fn(points: todo, scale: todo) -> todo",
-          "!doc": "todo"
-        },
-        "getNextKeyWith": {
-          "!type": "fn(sid: todo, h: todo, key: todo) -> todo",
-          "!doc": "todo"
-        },
-        "getPrevKeyWith": {
-          "!type": "fn(sid: todo, h: todo, key: todo) -> todo",
-          "!doc": "todo"
-        }
-      },
-      "!doc": "todo",
-      "!type": "fn(root: todo, data: todo, JITCompile: todo)"
-    },
     "Curve": {
       "!url": "http://threejs.org/docs/#Reference/extras/core/Curve",
       "prototype": {

+ 0 - 1
examples/files.js

@@ -83,7 +83,6 @@ var files = {
 		"webgl_loader_babylon",
 		"webgl_loader_bvh",
 		"webgl_loader_collada",
-		"webgl_loader_collada_keyframe",
 		"webgl_loader_collada_kinematics",
 		"webgl_loader_collada_skinning",
 		"webgl_loader_ctm",

+ 0 - 407
examples/js/loaders/collada/Animation.js

@@ -1,407 +0,0 @@
-/**
- * @author mikael emtinger / http://gomo.se/
- * @author mrdoob / http://mrdoob.com/
- * @author alteredq / http://alteredqualia.com/
- */
-
-THREE.Animation = function ( root, data ) {
-
-	this.root = root;
-	this.data = THREE.AnimationHandler.init( data );
-	this.hierarchy = THREE.AnimationHandler.parse( root );
-
-	this.currentTime = 0;
-	this.timeScale = 1;
-
-	this.isPlaying = false;
-	this.loop = true;
-	this.weight = 0;
-
-	this.interpolationType = THREE.AnimationHandler.LINEAR;
-
-};
-
-THREE.Animation.prototype = {
-
-	constructor: THREE.Animation,
-
-	keyTypes:  [ "pos", "rot", "scl" ],
-
-	play: function ( startTime, weight ) {
-
-		this.currentTime = startTime !== undefined ? startTime : 0;
-		this.weight = weight !== undefined ? weight : 1;
-
-		this.isPlaying = true;
-
-		this.reset();
-
-		THREE.AnimationHandler.play( this );
-
-	},
-
-	stop: function() {
-
-		this.isPlaying = false;
-
-		THREE.AnimationHandler.stop( this );
-
-	},
-
-	reset: function () {
-
-		for ( var h = 0, hl = this.hierarchy.length; h < hl; h ++ ) {
-
-			var object = this.hierarchy[ h ];
-
-			if ( object.animationCache === undefined ) {
-
-				object.animationCache = {
-					animations: {},
-					blending: {
-						positionWeight: 0.0,
-						quaternionWeight: 0.0,
-						scaleWeight: 0.0
-					}
-				};
-
-			}
-
-			var name = this.data.name;
-			var animations = object.animationCache.animations;
-			var animationCache = animations[ name ];
-
-			if ( animationCache === undefined ) {
-
-				animationCache = {
-					prevKey: { pos: 0, rot: 0, scl: 0 },
-					nextKey: { pos: 0, rot: 0, scl: 0 },
-					originalMatrix: object.matrix
-				};
-
-				animations[ name ] = animationCache;
-
-			}
-
-			// Get keys to match our current time
-
-			for ( var t = 0; t < 3; t ++ ) {
-
-				var type = this.keyTypes[ t ];
-
-				var prevKey = this.data.hierarchy[ h ].keys[ 0 ];
-				var nextKey = this.getNextKeyWith( type, h, 1 );
-
-				while ( nextKey.time < this.currentTime && nextKey.index > prevKey.index ) {
-
-					prevKey = nextKey;
-					nextKey = this.getNextKeyWith( type, h, nextKey.index + 1 );
-
-				}
-
-				animationCache.prevKey[ type ] = prevKey;
-				animationCache.nextKey[ type ] = nextKey;
-
-			}
-
-		}
-
-	},
-
-	resetBlendWeights: function () {
-
-		for ( var h = 0, hl = this.hierarchy.length; h < hl; h ++ ) {
-
-			var object = this.hierarchy[ h ];
-			var animationCache = object.animationCache;
-
-			if ( animationCache !== undefined ) {
-
-				var blending = animationCache.blending;
-
-				blending.positionWeight = 0.0;
-				blending.quaternionWeight = 0.0;
-				blending.scaleWeight = 0.0;
-
-			}
-
-		}
-
-	},
-
-	update: ( function() {
-
-		var points = [];
-		var target = new THREE.Vector3();
-		var newVector = new THREE.Vector3();
-		var newQuat = new THREE.Quaternion();
-
-		// Catmull-Rom spline
-
-		var interpolateCatmullRom = function ( points, scale ) {
-
-			var c = [], v3 = [],
-			point, intPoint, weight, w2, w3,
-			pa, pb, pc, pd;
-
-			point = ( points.length - 1 ) * scale;
-			intPoint = Math.floor( point );
-			weight = point - intPoint;
-
-			c[ 0 ] = intPoint === 0 ? intPoint : intPoint - 1;
-			c[ 1 ] = intPoint;
-			c[ 2 ] = intPoint > points.length - 2 ? intPoint : intPoint + 1;
-			c[ 3 ] = intPoint > points.length - 3 ? intPoint : intPoint + 2;
-
-			pa = points[ c[ 0 ] ];
-			pb = points[ c[ 1 ] ];
-			pc = points[ c[ 2 ] ];
-			pd = points[ c[ 3 ] ];
-
-			w2 = weight * weight;
-			w3 = weight * w2;
-
-			v3[ 0 ] = interpolate( pa[ 0 ], pb[ 0 ], pc[ 0 ], pd[ 0 ], weight, w2, w3 );
-			v3[ 1 ] = interpolate( pa[ 1 ], pb[ 1 ], pc[ 1 ], pd[ 1 ], weight, w2, w3 );
-			v3[ 2 ] = interpolate( pa[ 2 ], pb[ 2 ], pc[ 2 ], pd[ 2 ], weight, w2, w3 );
-
-			return v3;
-
-		};
-
-		var interpolate = function ( p0, p1, p2, p3, t, t2, t3 ) {
-
-			var v0 = ( p2 - p0 ) * 0.5,
-				v1 = ( p3 - p1 ) * 0.5;
-
-			return ( 2 * ( p1 - p2 ) + v0 + v1 ) * t3 + ( - 3 * ( p1 - p2 ) - 2 * v0 - v1 ) * t2 + v0 * t + p1;
-
-		};
-
-		return function ( delta ) {
-
-			if ( this.isPlaying === false ) return;
-
-			this.currentTime += delta * this.timeScale;
-
-			if ( this.weight === 0 )
-				return;
-
-			//
-
-			var duration = this.data.length;
-
-			if ( this.currentTime > duration || this.currentTime < 0 ) {
-
-				if ( this.loop ) {
-
-					this.currentTime %= duration;
-
-					if ( this.currentTime < 0 )
-						this.currentTime += duration;
-
-					this.reset();
-
-				} else {
-
-					this.stop();
-
-				}
-
-			}
-
-			for ( var h = 0, hl = this.hierarchy.length; h < hl; h ++ ) {
-
-				var object = this.hierarchy[ h ];
-				var animationCache = object.animationCache.animations[ this.data.name ];
-				var blending = object.animationCache.blending;
-
-				// loop through pos/rot/scl
-
-				for ( var t = 0; t < 3; t ++ ) {
-
-					// get keys
-
-					var type    = this.keyTypes[ t ];
-					var prevKey = animationCache.prevKey[ type ];
-					var nextKey = animationCache.nextKey[ type ];
-
-					if ( ( this.timeScale > 0 && nextKey.time <= this.currentTime ) ||
-						( this.timeScale < 0 && prevKey.time >= this.currentTime ) ) {
-
-						prevKey = this.data.hierarchy[ h ].keys[ 0 ];
-						nextKey = this.getNextKeyWith( type, h, 1 );
-
-						while ( nextKey.time < this.currentTime && nextKey.index > prevKey.index ) {
-
-							prevKey = nextKey;
-							nextKey = this.getNextKeyWith( type, h, nextKey.index + 1 );
-
-						}
-
-						animationCache.prevKey[ type ] = prevKey;
-						animationCache.nextKey[ type ] = nextKey;
-
-					}
-
-					var scale = ( this.currentTime - prevKey.time ) / ( nextKey.time - prevKey.time );
-
-					var prevXYZ = prevKey[ type ];
-					var nextXYZ = nextKey[ type ];
-
-					if ( scale < 0 ) scale = 0;
-					if ( scale > 1 ) scale = 1;
-
-					// interpolate
-
-					if ( type === "pos" ) {
-
-						if ( this.interpolationType === THREE.AnimationHandler.LINEAR ) {
-
-							newVector.x = prevXYZ[ 0 ] + ( nextXYZ[ 0 ] - prevXYZ[ 0 ] ) * scale;
-							newVector.y = prevXYZ[ 1 ] + ( nextXYZ[ 1 ] - prevXYZ[ 1 ] ) * scale;
-							newVector.z = prevXYZ[ 2 ] + ( nextXYZ[ 2 ] - prevXYZ[ 2 ] ) * scale;
-
-							// blend
-							var proportionalWeight = this.weight / ( this.weight + blending.positionWeight );
-							object.position.lerp( newVector, proportionalWeight );
-							blending.positionWeight += this.weight;
-
-						} else if ( this.interpolationType === THREE.AnimationHandler.CATMULLROM ||
-									this.interpolationType === THREE.AnimationHandler.CATMULLROM_FORWARD ) {
-
-							points[ 0 ] = this.getPrevKeyWith( "pos", h, prevKey.index - 1 )[ "pos" ];
-							points[ 1 ] = prevXYZ;
-							points[ 2 ] = nextXYZ;
-							points[ 3 ] = this.getNextKeyWith( "pos", h, nextKey.index + 1 )[ "pos" ];
-
-							scale = scale * 0.33 + 0.33;
-
-							var currentPoint = interpolateCatmullRom( points, scale );
-							var proportionalWeight = this.weight / ( this.weight + blending.positionWeight );
-							blending.positionWeight += this.weight;
-
-							// blend
-
-							var vector = object.position;
-
-							vector.x = vector.x + ( currentPoint[ 0 ] - vector.x ) * proportionalWeight;
-							vector.y = vector.y + ( currentPoint[ 1 ] - vector.y ) * proportionalWeight;
-							vector.z = vector.z + ( currentPoint[ 2 ] - vector.z ) * proportionalWeight;
-
-							if ( this.interpolationType === THREE.AnimationHandler.CATMULLROM_FORWARD ) {
-
-								var forwardPoint = interpolateCatmullRom( points, scale * 1.01 );
-
-								target.set( forwardPoint[ 0 ], forwardPoint[ 1 ], forwardPoint[ 2 ] );
-								target.sub( vector );
-								target.y = 0;
-								target.normalize();
-
-								var angle = Math.atan2( target.x, target.z );
-								object.rotation.set( 0, angle, 0 );
-
-							}
-
-						}
-
-					} else if ( type === "rot" ) {
-
-						THREE.Quaternion.slerp( prevXYZ, nextXYZ, newQuat, scale );
-
-						// Avoid paying the cost of an additional slerp if we don't have to
-						if ( blending.quaternionWeight === 0 ) {
-
-							object.quaternion.copy( newQuat );
-							blending.quaternionWeight = this.weight;
-
-						} else {
-
-							var proportionalWeight = this.weight / ( this.weight + blending.quaternionWeight );
-							THREE.Quaternion.slerp( object.quaternion, newQuat, object.quaternion, proportionalWeight );
-							blending.quaternionWeight += this.weight;
-
-						}
-
-					} else if ( type === "scl" ) {
-
-						newVector.x = prevXYZ[ 0 ] + ( nextXYZ[ 0 ] - prevXYZ[ 0 ] ) * scale;
-						newVector.y = prevXYZ[ 1 ] + ( nextXYZ[ 1 ] - prevXYZ[ 1 ] ) * scale;
-						newVector.z = prevXYZ[ 2 ] + ( nextXYZ[ 2 ] - prevXYZ[ 2 ] ) * scale;
-
-						var proportionalWeight = this.weight / ( this.weight + blending.scaleWeight );
-						object.scale.lerp( newVector, proportionalWeight );
-						blending.scaleWeight += this.weight;
-
-					}
-
-				}
-
-			}
-
-			return true;
-
-		};
-
-	} )(),
-
-	getNextKeyWith: function ( type, h, key ) {
-
-		var keys = this.data.hierarchy[ h ].keys;
-
-		if ( this.interpolationType === THREE.AnimationHandler.CATMULLROM ||
-			 this.interpolationType === THREE.AnimationHandler.CATMULLROM_FORWARD ) {
-
-			key = key < keys.length - 1 ? key : keys.length - 1;
-
-		} else {
-
-			key = key % keys.length;
-
-		}
-
-		for ( ; key < keys.length; key ++ ) {
-
-			if ( keys[ key ][ type ] !== undefined ) {
-
-				return keys[ key ];
-
-			}
-
-		}
-
-		return this.data.hierarchy[ h ].keys[ 0 ];
-
-	},
-
-	getPrevKeyWith: function ( type, h, key ) {
-
-		var keys = this.data.hierarchy[ h ].keys;
-
-		if ( this.interpolationType === THREE.AnimationHandler.CATMULLROM ||
-			this.interpolationType === THREE.AnimationHandler.CATMULLROM_FORWARD ) {
-
-			key = key > 0 ? key : 0;
-
-		} else {
-
-			key = key >= 0 ? key : key + keys.length;
-
-		}
-
-
-		for ( ; key >= 0; key -- ) {
-
-			if ( keys[ key ][ type ] !== undefined ) {
-
-				return keys[ key ];
-
-			}
-
-		}
-
-		return this.data.hierarchy[ h ].keys[ keys.length - 1 ];
-
-	}
-
-};

+ 0 - 220
examples/js/loaders/collada/AnimationHandler.js

@@ -1,220 +0,0 @@
-/**
- * @author mikael emtinger / http://gomo.se/
- */
-
-THREE.AnimationHandler = {
-
-	LINEAR: 0,
-	CATMULLROM: 1,
-	CATMULLROM_FORWARD: 2,
-
-	//
-
-	add: function () {
-
-		console.warn( 'THREE.AnimationHandler.add() has been deprecated.' );
-
-	},
-	get: function () {
-
-		console.warn( 'THREE.AnimationHandler.get() has been deprecated.' );
-
-	},
-	remove: function () {
-
-		console.warn( 'THREE.AnimationHandler.remove() has been deprecated.' );
-
-	},
-
-	//
-
-	animations: [],
-
-	init: function ( data ) {
-
-		if ( data.initialized === true ) return data;
-
-		// loop through all keys
-
-		for ( var h = 0; h < data.hierarchy.length; h ++ ) {
-
-			for ( var k = 0; k < data.hierarchy[ h ].keys.length; k ++ ) {
-
-				// remove minus times
-
-				if ( data.hierarchy[ h ].keys[ k ].time < 0 ) {
-
-					 data.hierarchy[ h ].keys[ k ].time = 0;
-
-				}
-
-				// create quaternions
-
-				if ( data.hierarchy[ h ].keys[ k ].rot !== undefined &&
-				  ! ( data.hierarchy[ h ].keys[ k ].rot instanceof THREE.Quaternion ) ) {
-
-					var quat = data.hierarchy[ h ].keys[ k ].rot;
-					data.hierarchy[ h ].keys[ k ].rot = new THREE.Quaternion().fromArray( quat );
-
-				}
-
-			}
-
-			// prepare morph target keys
-
-			if ( data.hierarchy[ h ].keys.length && data.hierarchy[ h ].keys[ 0 ].morphTargets !== undefined ) {
-
-				// get all used
-
-				var usedMorphTargets = {};
-
-				for ( var k = 0; k < data.hierarchy[ h ].keys.length; k ++ ) {
-
-					for ( var m = 0; m < data.hierarchy[ h ].keys[ k ].morphTargets.length; m ++ ) {
-
-						var morphTargetName = data.hierarchy[ h ].keys[ k ].morphTargets[ m ];
-						usedMorphTargets[ morphTargetName ] = - 1;
-
-					}
-
-				}
-
-				data.hierarchy[ h ].usedMorphTargets = usedMorphTargets;
-
-
-				// set all used on all frames
-
-				for ( var k = 0; k < data.hierarchy[ h ].keys.length; k ++ ) {
-
-					var influences = {};
-
-					for ( var morphTargetName in usedMorphTargets ) {
-
-						for ( var m = 0; m < data.hierarchy[ h ].keys[ k ].morphTargets.length; m ++ ) {
-
-							if ( data.hierarchy[ h ].keys[ k ].morphTargets[ m ] === morphTargetName ) {
-
-								influences[ morphTargetName ] = data.hierarchy[ h ].keys[ k ].morphTargetsInfluences[ m ];
-								break;
-
-							}
-
-						}
-
-						if ( m === data.hierarchy[ h ].keys[ k ].morphTargets.length ) {
-
-							influences[ morphTargetName ] = 0;
-
-						}
-
-					}
-
-					data.hierarchy[ h ].keys[ k ].morphTargetsInfluences = influences;
-
-				}
-
-			}
-
-
-			// remove all keys that are on the same time
-
-			for ( var k = 1; k < data.hierarchy[ h ].keys.length; k ++ ) {
-
-				if ( data.hierarchy[ h ].keys[ k ].time === data.hierarchy[ h ].keys[ k - 1 ].time ) {
-
-					data.hierarchy[ h ].keys.splice( k, 1 );
-					k --;
-
-				}
-
-			}
-
-
-			// set index
-
-			for ( var k = 0; k < data.hierarchy[ h ].keys.length; k ++ ) {
-
-				data.hierarchy[ h ].keys[ k ].index = k;
-
-			}
-
-		}
-
-		data.initialized = true;
-
-		return data;
-
-	},
-
-	parse: function ( root ) {
-
-		var parseRecurseHierarchy = function ( root, hierarchy ) {
-
-			hierarchy.push( root );
-
-			for ( var c = 0; c < root.children.length; c ++ )
-				parseRecurseHierarchy( root.children[ c ], hierarchy );
-
-		};
-
-		// setup hierarchy
-
-		var hierarchy = [];
-
-		if ( root instanceof THREE.SkinnedMesh ) {
-
-			for ( var b = 0; b < root.skeleton.bones.length; b ++ ) {
-
-				hierarchy.push( root.skeleton.bones[ b ] );
-
-			}
-
-		} else {
-
-			parseRecurseHierarchy( root, hierarchy );
-
-		}
-
-		return hierarchy;
-
-	},
-
-	play: function ( animation ) {
-
-		if ( this.animations.indexOf( animation ) === - 1 ) {
-
-			this.animations.push( animation );
-
-		}
-
-	},
-
-	stop: function ( animation ) {
-
-		var index = this.animations.indexOf( animation );
-
-		if ( index !== - 1 ) {
-
-			this.animations.splice( index, 1 );
-
-		}
-
-	},
-
-	update: function ( deltaTimeMS ) {
-
-		for ( var i = 0; i < this.animations.length; i ++ ) {
-
-			this.animations[ i ].resetBlendWeights();
-
-		}
-
-		for ( var i = 0; i < this.animations.length; i ++ ) {
-
-			this.animations[ i ].update( deltaTimeMS );
-
-		}
-
-	}
-
-};

+ 0 - 236
examples/js/loaders/collada/KeyFrameAnimation.js

@@ -1,236 +0,0 @@
-/**
- * @author mikael emtinger / http://gomo.se/
- * @author mrdoob / http://mrdoob.com/
- * @author alteredq / http://alteredqualia.com/
- * @author khang duong
- * @author erik kitson
- */
-
-THREE.KeyFrameAnimation = function ( data ) {
-
-	this.root = data.node;
-	this.data = THREE.AnimationHandler.init( data );
-	this.hierarchy = THREE.AnimationHandler.parse( this.root );
-	this.currentTime = 0;
-	this.timeScale = 0.001;
-	this.isPlaying = false;
-	this.isPaused = true;
-	this.loop = true;
-
-	// initialize to first keyframes
-
-	for ( var h = 0, hl = this.hierarchy.length; h < hl; h ++ ) {
-
-		var keys = this.data.hierarchy[ h ].keys,
-			sids = this.data.hierarchy[ h ].sids,
-			obj = this.hierarchy[ h ];
-
-		if ( keys.length && sids ) {
-
-			for ( var s = 0; s < sids.length; s ++ ) {
-
-				var sid = sids[ s ],
-					next = this.getNextKeyWith( sid, h, 0 );
-
-				if ( next ) {
-
-					next.apply( sid );
-
-				}
-
-			}
-
-			obj.matrixAutoUpdate = false;
-			this.data.hierarchy[ h ].node.updateMatrix();
-			obj.matrixWorldNeedsUpdate = true;
-
-		}
-
-	}
-
-};
-
-THREE.KeyFrameAnimation.prototype = {
-
-	constructor: THREE.KeyFrameAnimation,
-
-	play: function ( startTime ) {
-
-		this.currentTime = startTime !== undefined ? startTime : 0;
-
-		if ( this.isPlaying === false ) {
-
-			this.isPlaying = true;
-
-			// reset key cache
-
-			var h, hl = this.hierarchy.length,
-				object,
-				node;
-
-			for ( h = 0; h < hl; h ++ ) {
-
-				object = this.hierarchy[ h ];
-				node = this.data.hierarchy[ h ];
-
-				if ( node.animationCache === undefined ) {
-
-					node.animationCache = {};
-					node.animationCache.prevKey = null;
-					node.animationCache.nextKey = null;
-					node.animationCache.originalMatrix = object.matrix;
-
-				}
-
-				var keys = this.data.hierarchy[ h ].keys;
-
-				if ( keys.length > 1 ) {
-
-					node.animationCache.prevKey = keys[ 0 ];
-					node.animationCache.nextKey = keys[ 1 ];
-
-					this.startTime = Math.min( keys[ 0 ].time, this.startTime );
-					this.endTime = Math.max( keys[ keys.length - 1 ].time, this.endTime );
-
-				}
-
-			}
-
-			this.update( 0 );
-
-		}
-
-		this.isPaused = false;
-	},
-
-	stop: function () {
-
-		this.isPlaying = false;
-		this.isPaused  = false;
-
-		// reset JIT matrix and remove cache
-
-		for ( var h = 0; h < this.data.hierarchy.length; h ++ ) {
-
-			var obj = this.hierarchy[ h ];
-			var node = this.data.hierarchy[ h ];
-
-			if ( node.animationCache !== undefined ) {
-
-				var original = node.animationCache.originalMatrix;
-
-				original.copy( obj.matrix );
-				obj.matrix = original;
-
-				delete node.animationCache;
-
-			}
-
-		}
-
-	},
-
-	update: function ( delta ) {
-
-		if ( this.isPlaying === false ) return;
-
-		this.currentTime += delta * this.timeScale;
-
-		//
-
-		var duration = this.data.length;
-
-		if ( this.loop === true && this.currentTime > duration ) {
-
-			this.currentTime %= duration;
-
-		}
-
-		this.currentTime = Math.min( this.currentTime, duration );
-
-		for ( var h = 0, hl = this.hierarchy.length; h < hl; h ++ ) {
-
-			var object = this.hierarchy[ h ];
-			var node = this.data.hierarchy[ h ];
-
-			var keys = node.keys,
-				animationCache = node.animationCache;
-
-
-			if ( keys.length ) {
-
-				var prevKey = animationCache.prevKey;
-				var nextKey = animationCache.nextKey;
-
-				if ( nextKey.time <= this.currentTime ) {
-
-					while ( nextKey.time < this.currentTime && nextKey.index > prevKey.index ) {
-
-						prevKey = nextKey;
-						nextKey = keys[ prevKey.index + 1 ];
-
-					}
-
-					animationCache.prevKey = prevKey;
-					animationCache.nextKey = nextKey;
-
-				}
-
-				if ( nextKey.time >= this.currentTime ) {
-
-					prevKey.interpolate( nextKey, this.currentTime );
-
-				} else {
-
-					prevKey.interpolate( nextKey, nextKey.time );
-
-				}
-
-				this.data.hierarchy[ h ].node.updateMatrix();
-				object.matrixWorldNeedsUpdate = true;
-
-			}
-
-		}
-
-	},
-
-	getNextKeyWith: function ( sid, h, key ) {
-
-		var keys = this.data.hierarchy[ h ].keys;
-		key = key % keys.length;
-
-		for ( ; key < keys.length; key ++ ) {
-
-			if ( keys[ key ].hasTarget( sid ) ) {
-
-				return keys[ key ];
-
-			}
-
-		}
-
-		return keys[ 0 ];
-
-	},
-
-	getPrevKeyWith: function ( sid, h, key ) {
-
-		var keys = this.data.hierarchy[ h ].keys;
-		key = key >= 0 ? key : key + keys.length;
-
-		for ( ; key >= 0; key -- ) {
-
-			if ( keys[ key ].hasTarget( sid ) ) {
-
-				return keys[ key ];
-
-			}
-
-		}
-
-		return keys[ keys.length - 1 ];
-
-	}
-
-};

+ 2 - 2
examples/webgl_animation_keyframes_json.html

@@ -30,8 +30,8 @@
 		<div id="container"></div>
 
 		<div id="info">
-		<a href="http://threejs.org" target="_blank">three.js</a> webgl - animation - keyframes<a href=""></a>
-		<br>(recreation of the <a href="https://threejs.org/examples/webgl_loader_collada_keyframe.html">collada keyframe example</a> - with much simpler code)</div>
+			<a href="http://threejs.org" target="_blank">three.js</a> webgl - animation - keyframes
+		</div>
 
 		<script src="../build/three.js"></script>
 

+ 0 - 225
examples/webgl_loader_collada_keyframe.html

@@ -1,225 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<title>three.js webgl - collada - keyframe</title>
-		<meta charset="utf-8">
-		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
-		<style>
-			body {
-				background:#777;
-				padding:0;
-				margin:0;
-				font-weight: bold;
-				overflow:hidden;
-			}
-
-			#info {
-				position: absolute;
-				top: 0px;
-				width: 100%;
-				color: #ffffff;
-				padding: 5px;
-				font-family:Monospace;
-				font-size:13px;
-				text-align:center;
-			}
-
-			a {
-				color: #ffffff;
-			}
-		</style>
-	</head>
-	<body>
-		<div id="info">
-			<a href="http://threejs.org" target="_blank">three.js</a> -
-			pump by <a href="http://code.google.com/p/kuda" target="_blank">Kuda</a>
-		</div>
-
-		<script src="../build/three.js"></script>
-
-		<script src="js/loaders/collada/Animation.js"></script>
-		<script src="js/loaders/collada/AnimationHandler.js"></script>
-		<script src="js/loaders/collada/KeyFrameAnimation.js"></script>
-
-		<script src="js/loaders/ColladaLoader.js"></script>
-
-		<script src="js/Detector.js"></script>
-		<script src="js/libs/stats.min.js"></script>
-
-		<script>
-
-			if ( ! Detector.webgl ) Detector.addGetWebGLMessage();
-
-			var stats;
-			var scene;
-			var pointLight;
-			var camera;
-			var renderer;
-			var model;
-			var animations;
-			var kfAnimations = [ ];
-			var kfAnimationsLength = 0;
-			var loader = new THREE.ColladaLoader();
-			var lastTimestamp = 0;
-			var progress = 0;
-
-			loader.load( './models/collada/pump/pump.dae', function ( collada ) {
-
-				model = collada.scene;
-				animations = collada.animations;
-				kfAnimationsLength = animations.length;
-				model.scale.x = model.scale.y = model.scale.z = 0.125; // 1/8 scale, modeled in cm
-
-				init();
-				start();
-				animate( lastTimestamp );
-
-			} );
-
-			function init() {
-
-				var container = document.createElement( 'div' );
-				document.body.appendChild( container );
-
-				// Camera
-
-				camera = new THREE.PerspectiveCamera( 40, window.innerWidth / window.innerHeight, 0.01, 1000 );
-				camera.position.set( -5.00181875, 3.42631375, 11.3102925 );
-				camera.lookAt( new THREE.Vector3( -1.224774125, 2.18410625, 4.57969125 ) );
-
-				// Scene
-
-				scene = new THREE.Scene();
-
-				// KeyFrame Animations
-
-				for ( var i = 0; i < kfAnimationsLength; ++i ) {
-
-					var animation = animations[ i ];
-
-					var kfAnimation = new THREE.KeyFrameAnimation( animation );
-					kfAnimation.timeScale = 1;
-					kfAnimations.push( kfAnimation );
-
-				}
-
-				// Grid
-
-				var grid = new THREE.GridHelper( 20, 20 );
-				scene.add( grid );
-
-				// Add the COLLADA
-
-				model.getObjectByName( 'camEye_camera', true ).visible = false;
-				model.getObjectByName( 'camTarget_camera', true ).visible = false;
-
-				scene.add( model );
-
-				// Lights
-
-				pointLight = new THREE.PointLight( 0xffffff, 1.75 );
-				scene.add( pointLight );
-
-				// Renderer
-
-				renderer = new THREE.WebGLRenderer( { antialias: true } );
-				renderer.setPixelRatio( window.devicePixelRatio );
-				renderer.setSize( window.innerWidth, window.innerHeight );
-				container.appendChild( renderer.domElement );
-
-				// Stats
-
-				stats = new Stats();
-				container.appendChild( stats.dom );
-
-				//
-
-				window.addEventListener( 'resize', onWindowResize, false );
-
-			}
-
-			function onWindowResize() {
-
-				camera.aspect = window.innerWidth / window.innerHeight;
-				camera.updateProjectionMatrix();
-
-				renderer.setSize( window.innerWidth, window.innerHeight );
-
-			}
-
-			function start() {
-
-				for ( var i = 0; i < kfAnimationsLength; ++i ) {
-
-					var animation = kfAnimations[i];
-
-					for ( var h = 0, hl = animation.hierarchy.length; h < hl; h++ ) {
-
-						var keys = animation.data.hierarchy[ h ].keys;
-						var sids = animation.data.hierarchy[ h ].sids;
-						var obj = animation.hierarchy[ h ];
-
-						if ( keys.length && sids ) {
-
-							for ( var s = 0; s < sids.length; s++ ) {
-
-								var sid = sids[ s ];
-								var next = animation.getNextKeyWith( sid, h, 0 );
-
-								if ( next ) next.apply( sid );
-
-							}
-
-							obj.matrixAutoUpdate = false;
-							animation.data.hierarchy[ h ].node.updateMatrix();
-							obj.matrixWorldNeedsUpdate = true;
-
-						}
-
-					}
-
-					animation.loop = false;
-					animation.play();
-
-				}
-
-			}
-
-			function animate( timestamp ) {
-
-				var frameTime = ( timestamp - lastTimestamp ) * 0.001;
-
-				if ( progress >= 0 && progress < 48 ) {
-
-					for ( var i = 0; i < kfAnimationsLength; ++i ) {
-
-						kfAnimations[ i ].update( frameTime );
-
-					}
-
-				} else if ( progress >= 48 ) {
-
-					for ( var i = 0; i < kfAnimationsLength; ++i ) {
-
-						kfAnimations[ i ].stop();
-
-					}
-
-					progress = 0;
-					start();
-
-				}
-
-				pointLight.position.copy( camera.position );
-
-				progress += frameTime;
-				lastTimestamp = timestamp;
-				renderer.render( scene, camera );
-				stats.update();
-				requestAnimationFrame( animate );
-
-			}
-
-		</script>
-	</body>
-</html>

+ 1 - 2
src/animation/AnimationClip.js

@@ -231,8 +231,7 @@ Object.assign( AnimationClip, {
 			// skip empty tracks
 			if ( ! animationKeys || animationKeys.length === 0 ) continue;
 
-			// process morph targets in a way exactly compatible
-			// with AnimationHandler.init( animation )
+			// process morph targets
 			if ( animationKeys[ 0 ].morphTargets ) {
 
 				// figure out all morph targets used in this track

+ 1 - 11
utils/exporters/max/annotate/README.md

@@ -10,7 +10,7 @@ This utility refactors THREE.js JSON model files that were exported using `Three
 
 * THREE.js JSON (.js)
 
-## Usage 
+## Usage
 
 ```
 annotate.py [-h] [-u] -i FILE -o FILE range [range ...]
@@ -50,16 +50,6 @@ example:
 ./annotate.py -i model.js -o model.new.js idle=1..10 walk=1..20
 ```
 
-```
-// ...
-this.animation = new THREE.Animation(
-    mesh,
-    geometry.animations.walk,
-    THREE.AnimationHandler.CATMULLROM
-);
-// ...
-```
-
 ## Contribution
 
 I highly encourage you to participate in the development of this utility.