Skip to content

Commit 327819d

Browse files
committed
Updated builds.
1 parent 1e7102a commit 327819d

5 files changed

Lines changed: 1539 additions & 703 deletions

File tree

build/three.core.js

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41728,6 +41728,18 @@ function convertArray( array, type ) {
4172841728

4172941729
}
4173041730

41731+
/**
41732+
* Returns `true` if the given keyframe track settings hold Bezier tangent data.
41733+
*
41734+
* @param {?Object} settings - The settings of a keyframe track.
41735+
* @return {boolean} Whether both tangent arrays are defined or not.
41736+
*/
41737+
function hasTangents( settings ) {
41738+
41739+
return settings !== undefined && settings.inTangents !== undefined && settings.outTangents !== undefined;
41740+
41741+
}
41742+
4173141743
/**
4173241744
* Returns an array by which times and values can be sorted.
4173341745
*
@@ -42110,6 +42122,19 @@ class AnimationUtils {
4211042122

4211142123
}
4211242124

42125+
/**
42126+
* Returns `true` if the given keyframe track settings hold Bezier tangent data.
42127+
*
42128+
* @static
42129+
* @param {?Object} settings - The settings of a keyframe track.
42130+
* @return {boolean} Whether both tangent arrays are defined or not.
42131+
*/
42132+
static hasTangents( settings ) {
42133+
42134+
return hasTangents( settings );
42135+
42136+
}
42137+
4211342138
/**
4211442139
* Returns an array by which times and values can be sorted.
4211542140
*
@@ -42939,6 +42964,15 @@ class KeyframeTrack {
4293942964

4294042965
}
4294142966

42967+
if ( hasTangents( track.settings ) ) {
42968+
42969+
json.settings = {
42970+
inTangents: convertArray( track.settings.inTangents, Array ),
42971+
outTangents: convertArray( track.settings.outTangents, Array )
42972+
};
42973+
42974+
}
42975+
4294242976
}
4294342977

4294442978
json.type = track.ValueTypeName; // mandatory
@@ -43164,6 +43198,13 @@ class KeyframeTrack {
4316443198

4316543199
}
4316643200

43201+
if ( hasTangents( this.settings ) ) {
43202+
43203+
scaleTangentTimes( this.settings.inTangents, timeScale );
43204+
scaleTangentTimes( this.settings.outTangents, timeScale );
43205+
43206+
}
43207+
4316743208
}
4316843209

4316943210
return this;
@@ -43439,12 +43480,33 @@ class KeyframeTrack {
4343943480
// Interpolant argument to constructor is not saved, so copy the factory method directly.
4344043481
track.createInterpolant = this.createInterpolant;
4344143482

43483+
if ( hasTangents( this.settings ) ) {
43484+
43485+
track.settings = {
43486+
inTangents: this.settings.inTangents.slice(),
43487+
outTangents: this.settings.outTangents.slice()
43488+
};
43489+
43490+
}
43491+
4344243492
return track;
4344343493

4344443494
}
4344543495

4344643496
}
4344743497

43498+
function scaleTangentTimes( tangents, timeScale ) {
43499+
43500+
// tangents are [ time, value ] pairs, so only every second entry is a time
43501+
43502+
for ( let i = 0, n = tangents.length; i !== n; i += 2 ) {
43503+
43504+
tangents[ i ] *= timeScale;
43505+
43506+
}
43507+
43508+
}
43509+
4344843510
/**
4344943511
* The value type name.
4345043512
*
@@ -44225,18 +44287,31 @@ function parseKeyframeTrack( json ) {
4422544287

4422644288
}
4422744289

44290+
let track;
44291+
4422844292
// derived classes can define a static parse method
4422944293
if ( trackType.parse !== undefined ) {
4423044294

44231-
return trackType.parse( json );
44295+
track = trackType.parse( json );
4423244296

4423344297
} else {
4423444298

4423544299
// by default, we assume a constructor compatible with the base
44236-
return new trackType( json.name, json.times, json.values, json.interpolation );
44300+
track = new trackType( json.name, json.times, json.values, json.interpolation );
4423744301

4423844302
}
4423944303

44304+
if ( hasTangents( json.settings ) ) {
44305+
44306+
track.settings = {
44307+
inTangents: convertArray( json.settings.inTangents, Float32Array ),
44308+
outTangents: convertArray( json.settings.outTangents, Float32Array )
44309+
};
44310+
44311+
}
44312+
44313+
return track;
44314+
4424044315
}
4424144316

4424244317
/**

build/three.module.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17556,9 +17556,9 @@ class WebGLRenderer {
1755617556
const materialProperties = properties.get( material );
1755717557
const program = materialProperties.currentProgram;
1755817558

17559-
if ( program.isReady() ) {
17559+
if ( program === undefined || program.isReady() ) {
1756017560

17561-
// remove any programs that report they're ready to use from the list
17561+
// stop waiting for materials that are ready to use or have been disposed
1756217562
materials.delete( material );
1756317563

1756417564
}

0 commit comments

Comments
 (0)