Browse Source

remove ConstantTrack and Track classes, not needed.

Ben Houston 10 years ago
parent
commit
c873ac866f
3 changed files with 1 additions and 80 deletions
  1. 0 27
      src/animation/ConstantTrack.js
  2. 1 2
      src/animation/KeyframeTrack.js
  3. 0 51
      src/animation/Track.js

+ 0 - 27
src/animation/ConstantTrack.js

@@ -1,27 +0,0 @@
-/**
- *
- * A Track that returns a constant value.
- * 
- * @author Ben Houston / http://clara.io/
- * @author David Sarno / http://lighthaus.us/
- */
-
-THREE.ConstantTrack = function ( name, value ) {
-
-	this.value = value || null;
-
-	THREE.Track.call( this, name );
-
-};
-
-THREE.ConstantTrack.prototype = {
-
-	constructor: THREE.ConstantTrack,
-
-	getAt: function( time ) {
-
-		return this.value;
-
-	}
-
-};

+ 1 - 2
src/animation/KeyframeTrack.js

@@ -10,13 +10,12 @@
 
 
 THREE.KeyframeTrack = function ( name, keys ) {
 THREE.KeyframeTrack = function ( name, keys ) {
 
 
+	this.name = name;
 	this.keys = keys || [];	// time in seconds, value as value
 	this.keys = keys || [];	// time in seconds, value as value
 
 
 	// TODO: sort keys via their times
 	// TODO: sort keys via their times
 	this.keys.sort( function( a, b ) { return a.time < b.time; } );
 	this.keys.sort( function( a, b ) { return a.time < b.time; } );
 
 
-	THREE.Track.call( this, name );
-
 };
 };
 
 
 THREE.KeyframeTrack.prototype = {
 THREE.KeyframeTrack.prototype = {

+ 0 - 51
src/animation/Track.js

@@ -1,51 +0,0 @@
-/**
- *
- * A Track base class that has a getAt function and name handling.
- *
- * TODO: Add support for bone indices via a number rather than a name?
- * TODO: Add support for explicitly setting the nodeName and propertyName?
- * 
- * @author Ben Houston / http://clara.io/
- * @author David Sarno / http://lighthaus.us/
- */
-
-THREE.Track = function ( name ) {
-
-	this.name = name;
-
-	var nodeName = "";
-	var propertyName = "";
-
-	if( name.indexOf( '.') >= 0 ) {
-		var nameTokens = name.split( '.' );
-		if( nameTokens.length > 1 ) {
-			nodeName = nameTokens[0];
-		}
-		if( nameTokens.length > 2 ) {
-			propertyName = nameTokens[1];
-		}
-	}
-
-	if( nodeName.indexOf( '/' ) >= 0 ) {
-		var nodeNameTokens = nodeName.split( '/' );
-		if( nameTokens.length > 1 ) {
-			nodeName = nameTokens[nameTokens.length - 1];
-		}		
-	}
-
-	this.nodeName = nodeName;
-	this.propertyName = propertyName;
-
-};
-
-THREE.Track.prototype = {
-
-	constructor: THREE.Track,
-
-	getAt: function( time ) {
-
-		return null;
-
-	}
-
-};