|
@@ -15461,6 +15461,7 @@ class DataTexture2DArray extends Texture {
|
|
|
|
|
|
this.generateMipmaps = false;
|
|
this.generateMipmaps = false;
|
|
this.flipY = false;
|
|
this.flipY = false;
|
|
|
|
+ this.unpackAlignment = 1;
|
|
|
|
|
|
this.needsUpdate = true;
|
|
this.needsUpdate = true;
|
|
|
|
|
|
@@ -15493,6 +15494,7 @@ class DataTexture3D extends Texture {
|
|
|
|
|
|
this.generateMipmaps = false;
|
|
this.generateMipmaps = false;
|
|
this.flipY = false;
|
|
this.flipY = false;
|
|
|
|
+ this.unpackAlignment = 1;
|
|
|
|
|
|
this.needsUpdate = true;
|
|
this.needsUpdate = true;
|
|
|
|
|
|
@@ -32821,21 +32823,24 @@ const AnimationUtils = {
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
|
|
|
|
-function Interpolant( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
|
|
|
|
|
|
+class Interpolant {
|
|
|
|
|
|
- this.parameterPositions = parameterPositions;
|
|
|
|
- this._cachedIndex = 0;
|
|
|
|
|
|
+ constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
|
|
|
|
|
|
- this.resultBuffer = resultBuffer !== undefined ?
|
|
|
|
- resultBuffer : new sampleValues.constructor( sampleSize );
|
|
|
|
- this.sampleValues = sampleValues;
|
|
|
|
- this.valueSize = sampleSize;
|
|
|
|
|
|
+ this.parameterPositions = parameterPositions;
|
|
|
|
+ this._cachedIndex = 0;
|
|
|
|
|
|
-}
|
|
|
|
|
|
+ this.resultBuffer = resultBuffer !== undefined ?
|
|
|
|
+ resultBuffer : new sampleValues.constructor( sampleSize );
|
|
|
|
+ this.sampleValues = sampleValues;
|
|
|
|
+ this.valueSize = sampleSize;
|
|
|
|
|
|
-Object.assign( Interpolant.prototype, {
|
|
|
|
|
|
+ this.settings = null;
|
|
|
|
+ this.DefaultSettings_ = {};
|
|
|
|
|
|
- evaluate: function ( t ) {
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ evaluate( t ) {
|
|
|
|
|
|
const pp = this.parameterPositions;
|
|
const pp = this.parameterPositions;
|
|
let i1 = this._cachedIndex,
|
|
let i1 = this._cachedIndex,
|
|
@@ -32993,22 +32998,15 @@ Object.assign( Interpolant.prototype, {
|
|
|
|
|
|
return this.interpolate_( i1, t0, t, t1 );
|
|
return this.interpolate_( i1, t0, t, t1 );
|
|
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- settings: null, // optional, subclass-specific settings structure
|
|
|
|
- // Note: The indirection allows central control of many interpolants.
|
|
|
|
-
|
|
|
|
- // --- Protected interface
|
|
|
|
-
|
|
|
|
- DefaultSettings_: {},
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- getSettings_: function () {
|
|
|
|
|
|
+ getSettings_() {
|
|
|
|
|
|
return this.settings || this.DefaultSettings_;
|
|
return this.settings || this.DefaultSettings_;
|
|
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- copySampleValue_: function ( index ) {
|
|
|
|
|
|
+ copySampleValue_( index ) {
|
|
|
|
|
|
// copies a sample value to the result buffer
|
|
// copies a sample value to the result buffer
|
|
|
|
|
|
@@ -33025,35 +33023,29 @@ Object.assign( Interpolant.prototype, {
|
|
|
|
|
|
return result;
|
|
return result;
|
|
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
|
|
// Template methods for derived classes:
|
|
// Template methods for derived classes:
|
|
|
|
|
|
- interpolate_: function ( /* i1, t0, t, t1 */ ) {
|
|
|
|
|
|
+ interpolate_( /* i1, t0, t, t1 */ ) {
|
|
|
|
|
|
throw new Error( 'call to abstract method' );
|
|
throw new Error( 'call to abstract method' );
|
|
// implementations shall return this.resultBuffer
|
|
// implementations shall return this.resultBuffer
|
|
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- intervalChanged_: function ( /* i1, t0, t1 */ ) {
|
|
|
|
|
|
+ intervalChanged_( /* i1, t0, t1 */ ) {
|
|
|
|
|
|
// empty
|
|
// empty
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-} );
|
|
|
|
-
|
|
|
|
-// DECLARE ALIAS AFTER assign prototype
|
|
|
|
-Object.assign( Interpolant.prototype, {
|
|
|
|
-
|
|
|
|
- //( 0, t, t0 ), returns this.resultBuffer
|
|
|
|
- beforeStart_: Interpolant.prototype.copySampleValue_,
|
|
|
|
|
|
+}
|
|
|
|
|
|
- //( N-1, tN-1, t ), returns this.resultBuffer
|
|
|
|
- afterEnd_: Interpolant.prototype.copySampleValue_,
|
|
|
|
|
|
+// ALIAS DEFINITIONS
|
|
|
|
|
|
-} );
|
|
|
|
|
|
+Interpolant.prototype.beforeStart_ = Interpolant.prototype.copySampleValue_;
|
|
|
|
+Interpolant.prototype.afterEnd_ = Interpolant.prototype.copySampleValue_;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Fast and simple cubic spline interpolant.
|
|
* Fast and simple cubic spline interpolant.
|
|
@@ -33063,29 +33055,27 @@ Object.assign( Interpolant.prototype, {
|
|
* over their parameter interval.
|
|
* over their parameter interval.
|
|
*/
|
|
*/
|
|
|
|
|
|
-function CubicInterpolant( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
|
|
|
|
|
|
+class CubicInterpolant extends Interpolant {
|
|
|
|
|
|
- Interpolant.call( this, parameterPositions, sampleValues, sampleSize, resultBuffer );
|
|
|
|
|
|
+ constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
|
|
|
|
|
|
- this._weightPrev = - 0;
|
|
|
|
- this._offsetPrev = - 0;
|
|
|
|
- this._weightNext = - 0;
|
|
|
|
- this._offsetNext = - 0;
|
|
|
|
|
|
+ super( parameterPositions, sampleValues, sampleSize, resultBuffer );
|
|
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-CubicInterpolant.prototype = Object.assign( Object.create( Interpolant.prototype ), {
|
|
|
|
|
|
+ this._weightPrev = - 0;
|
|
|
|
+ this._offsetPrev = - 0;
|
|
|
|
+ this._weightNext = - 0;
|
|
|
|
+ this._offsetNext = - 0;
|
|
|
|
|
|
- constructor: CubicInterpolant,
|
|
|
|
|
|
+ this.DefaultSettings_ = {
|
|
|
|
|
|
- DefaultSettings_: {
|
|
|
|
|
|
+ endingStart: ZeroCurvatureEnding,
|
|
|
|
+ endingEnd: ZeroCurvatureEnding
|
|
|
|
|
|
- endingStart: ZeroCurvatureEnding,
|
|
|
|
- endingEnd: ZeroCurvatureEnding
|
|
|
|
|
|
+ };
|
|
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- intervalChanged_: function ( i1, t0, t1 ) {
|
|
|
|
|
|
+ intervalChanged_( i1, t0, t1 ) {
|
|
|
|
|
|
const pp = this.parameterPositions;
|
|
const pp = this.parameterPositions;
|
|
let iPrev = i1 - 2,
|
|
let iPrev = i1 - 2,
|
|
@@ -33162,9 +33152,9 @@ CubicInterpolant.prototype = Object.assign( Object.create( Interpolant.prototype
|
|
this._offsetPrev = iPrev * stride;
|
|
this._offsetPrev = iPrev * stride;
|
|
this._offsetNext = iNext * stride;
|
|
this._offsetNext = iNext * stride;
|
|
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- interpolate_: function ( i1, t0, t, t1 ) {
|
|
|
|
|
|
+ interpolate_( i1, t0, t, t1 ) {
|
|
|
|
|
|
const result = this.resultBuffer,
|
|
const result = this.resultBuffer,
|
|
values = this.sampleValues,
|
|
values = this.sampleValues,
|
|
@@ -33201,19 +33191,17 @@ CubicInterpolant.prototype = Object.assign( Object.create( Interpolant.prototype
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-} );
|
|
|
|
-
|
|
|
|
-function LinearInterpolant( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
|
|
|
|
|
|
+}
|
|
|
|
|
|
- Interpolant.call( this, parameterPositions, sampleValues, sampleSize, resultBuffer );
|
|
|
|
|
|
+class LinearInterpolant extends Interpolant {
|
|
|
|
|
|
-}
|
|
|
|
|
|
+ constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
|
|
|
|
|
|
-LinearInterpolant.prototype = Object.assign( Object.create( Interpolant.prototype ), {
|
|
|
|
|
|
+ super( parameterPositions, sampleValues, sampleSize, resultBuffer );
|
|
|
|
|
|
- constructor: LinearInterpolant,
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- interpolate_: function ( i1, t0, t, t1 ) {
|
|
|
|
|
|
+ interpolate_( i1, t0, t, t1 ) {
|
|
|
|
|
|
const result = this.resultBuffer,
|
|
const result = this.resultBuffer,
|
|
values = this.sampleValues,
|
|
values = this.sampleValues,
|
|
@@ -33237,7 +33225,7 @@ LinearInterpolant.prototype = Object.assign( Object.create( Interpolant.prototyp
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-} );
|
|
|
|
|
|
+}
|
|
|
|
|
|
/**
|
|
/**
|
|
*
|
|
*
|
|
@@ -33245,23 +33233,21 @@ LinearInterpolant.prototype = Object.assign( Object.create( Interpolant.prototyp
|
|
* the parameter.
|
|
* the parameter.
|
|
*/
|
|
*/
|
|
|
|
|
|
-function DiscreteInterpolant( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
|
|
|
|
-
|
|
|
|
- Interpolant.call( this, parameterPositions, sampleValues, sampleSize, resultBuffer );
|
|
|
|
|
|
+class DiscreteInterpolant extends Interpolant {
|
|
|
|
|
|
-}
|
|
|
|
|
|
+ constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
|
|
|
|
|
|
-DiscreteInterpolant.prototype = Object.assign( Object.create( Interpolant.prototype ), {
|
|
|
|
|
|
+ super( parameterPositions, sampleValues, sampleSize, resultBuffer );
|
|
|
|
|
|
- constructor: DiscreteInterpolant,
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- interpolate_: function ( i1 /*, t0, t, t1 */ ) {
|
|
|
|
|
|
+ interpolate_( i1 /*, t0, t, t1 */ ) {
|
|
|
|
|
|
return this.copySampleValue_( i1 - 1 );
|
|
return this.copySampleValue_( i1 - 1 );
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-} );
|
|
|
|
|
|
+}
|
|
|
|
|
|
class KeyframeTrack {
|
|
class KeyframeTrack {
|
|
|
|
|
|
@@ -33743,17 +33729,15 @@ NumberKeyframeTrack.prototype.ValueTypeName = 'number';
|
|
* Spherical linear unit quaternion interpolant.
|
|
* Spherical linear unit quaternion interpolant.
|
|
*/
|
|
*/
|
|
|
|
|
|
-function QuaternionLinearInterpolant( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
|
|
|
|
|
|
+class QuaternionLinearInterpolant extends Interpolant {
|
|
|
|
|
|
- Interpolant.call( this, parameterPositions, sampleValues, sampleSize, resultBuffer );
|
|
|
|
|
|
+ constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
|
|
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-QuaternionLinearInterpolant.prototype = Object.assign( Object.create( Interpolant.prototype ), {
|
|
|
|
|
|
+ super( parameterPositions, sampleValues, sampleSize, resultBuffer );
|
|
|
|
|
|
- constructor: QuaternionLinearInterpolant,
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- interpolate_: function ( i1, t0, t, t1 ) {
|
|
|
|
|
|
+ interpolate_( i1, t0, t, t1 ) {
|
|
|
|
|
|
const result = this.resultBuffer,
|
|
const result = this.resultBuffer,
|
|
values = this.sampleValues,
|
|
values = this.sampleValues,
|
|
@@ -33773,7 +33757,7 @@ QuaternionLinearInterpolant.prototype = Object.assign( Object.create( Interpolan
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-} );
|
|
|
|
|
|
+}
|
|
|
|
|
|
/**
|
|
/**
|
|
* A Track of quaternion keyframe values.
|
|
* A Track of quaternion keyframe values.
|