Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 13 additions & 146 deletions build/three.cjs

Large diffs are not rendered by default.

145 changes: 6 additions & 139 deletions build/three.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright 2010-2026 Three.js Authors
* SPDX-License-Identifier: MIT
*/
const REVISION = '184';
const REVISION = '185dev';

/**
* Represents mouse buttons and interaction types in context of controls.
Expand Down Expand Up @@ -43031,144 +43031,6 @@ class AnimationClip {

}

/**
* Parses the `animation.hierarchy` format and returns a new animation clip.
*
* @static
* @deprecated since r175.
* @param {Object} animation - A serialized animation clip as JSON.
* @param {Array<Bone>} bones - An array of bones.
* @return {?AnimationClip} The new animation clip.
*/
static parseAnimation( animation, bones ) {

warn( 'AnimationClip: parseAnimation() is deprecated and will be removed with r185' );

if ( ! animation ) {

error( 'AnimationClip: No animation in JSONLoader data.' );
return null;

}

const addNonemptyTrack = function ( trackType, trackName, animationKeys, propertyName, destTracks ) {

// only return track if there are actually keys.
if ( animationKeys.length !== 0 ) {

const times = [];
const values = [];

flattenJSON( animationKeys, times, values, propertyName );

// empty keys are filtered out, so check again
if ( times.length !== 0 ) {

destTracks.push( new trackType( trackName, times, values ) );

}

}

};

const tracks = [];

const clipName = animation.name || 'default';
const fps = animation.fps || 30;
const blendMode = animation.blendMode;

// automatic length determination in AnimationClip.
let duration = animation.length || -1;

const hierarchyTracks = animation.hierarchy || [];

for ( let h = 0; h < hierarchyTracks.length; h ++ ) {

const animationKeys = hierarchyTracks[ h ].keys;

// skip empty tracks
if ( ! animationKeys || animationKeys.length === 0 ) continue;

// process morph targets
if ( animationKeys[ 0 ].morphTargets ) {

// figure out all morph targets used in this track
const morphTargetNames = {};

let k;

for ( k = 0; k < animationKeys.length; k ++ ) {

if ( animationKeys[ k ].morphTargets ) {

for ( let m = 0; m < animationKeys[ k ].morphTargets.length; m ++ ) {

morphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = -1;

}

}

}

// create a track for each morph target with all zero
// morphTargetInfluences except for the keys in which
// the morphTarget is named.
for ( const morphTargetName in morphTargetNames ) {

const times = [];
const values = [];

for ( let m = 0; m !== animationKeys[ k ].morphTargets.length; ++ m ) {

const animationKey = animationKeys[ k ];

times.push( animationKey.time );
values.push( ( animationKey.morphTarget === morphTargetName ) ? 1 : 0 );

}

tracks.push( new NumberKeyframeTrack( '.morphTargetInfluence[' + morphTargetName + ']', times, values ) );

}

duration = morphTargetNames.length * fps;

} else {

// ...assume skeletal animation

const boneName = '.bones[' + bones[ h ].name + ']';

addNonemptyTrack(
VectorKeyframeTrack, boneName + '.position',
animationKeys, 'pos', tracks );

addNonemptyTrack(
QuaternionKeyframeTrack, boneName + '.quaternion',
animationKeys, 'rot', tracks );

addNonemptyTrack(
VectorKeyframeTrack, boneName + '.scale',
animationKeys, 'scl', tracks );

}

}

if ( tracks.length === 0 ) {

return null;

}

const clip = new this( clipName, duration, tracks, blendMode );

return clip;

}

/**
* Sets the duration of this clip to the duration of its longest keyframe track.
*
Expand Down Expand Up @@ -43633,6 +43495,11 @@ class LoadingManager {
*/
this.resolveURL = function ( url ) {

// Normalize to NFC so that Unicode URIs (e.g. from glTF)
// are percent-encoded correctly per RFC 3987.

url = url.normalize( 'NFC' );

if ( urlModifier ) {

return urlModifier( url );
Expand Down
2 changes: 1 addition & 1 deletion build/three.core.min.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions build/three.module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/three.module.min.js

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions build/three.tsl.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/three.tsl.min.js

Large diffs are not rendered by default.

Loading
Loading