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
2 changes: 1 addition & 1 deletion examples/jsm/loaders/VRMLLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class VRMLLoader extends Loader {

//

const StringLiteral = createToken( { name: 'StringLiteral', pattern: /"(?:[^\\"\n\r]|\\[bfnrtv"\\/]|\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])*"/ } );
const StringLiteral = createToken( { name: 'StringLiteral', pattern: /"(?:[^\\"]|\\[bfnrtv"\\/]|\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])*"/ } );
const HexLiteral = createToken( { name: 'HexLiteral', pattern: /0[xX][0-9a-fA-F]+/ } );
const NumberLiteral = createToken( { name: 'NumberLiteral', pattern: /[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/ } );
const TrueLiteral = createToken( { name: 'TrueLiteral', pattern: /TRUE/ } );
Expand Down
24 changes: 24 additions & 0 deletions examples/models/vrml/multilineString.wrl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#VRML V2.0 utf8
WorldInfo { title "Multi-line string literal test" }
NavigationInfo { type "EXAMINE" }
Background { skyColor [ 0.2 0.2 0.3 ] }

Transform {
translation 0 0 0
children [
Shape {
appearance Appearance {
material Material { diffuseColor 0.2 0.8 0.4 }
}
geometry Box { size 1 1 1 }
}
]
}

DEF S Script {
url "javascript:
function touched(value) {
console.log('Box was touched at ' + value);
}
"
}
3 changes: 2 additions & 1 deletion examples/webgl_loader_vrml.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
'meshWithTexture',
'pixelTexture',
'points',
'camera'
'camera',
'multilineString'
];

let vrmlScene;
Expand Down
17 changes: 15 additions & 2 deletions src/animation/AnimationAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class AnimationAction {
this._byClipCacheIndex = null; // for the memory manager

this._timeScaleInterpolant = null;
this._restoreTimeScale = null;
this._weightInterpolant = null;

/**
Expand Down Expand Up @@ -343,6 +344,10 @@ class AnimationAction {
startEndRatio = fadeOutDuration / fadeInDuration,
endStartRatio = fadeInDuration / fadeOutDuration;


fadeOutAction._restoreTimeScale = fadeOutAction.timeScale;
this._restoreTimeScale = this.timeScale;

fadeOutAction.warp( 1.0, startEndRatio, duration );
this.warp( endStartRatio, 1.0, duration );

Expand Down Expand Up @@ -511,6 +516,8 @@ class AnimationAction {

}

this._restoreTimeScale = null;

return this;

}
Expand Down Expand Up @@ -683,20 +690,26 @@ class AnimationAction {

if ( time > interpolant.parameterPositions[ 1 ] ) {

this.stopWarping();

if ( timeScale === 0 ) {

// motion has halted, pause
this.paused = true;

} else {

if ( this._restoreTimeScale !== null ) {

timeScale = this._restoreTimeScale;

}

// warp done - apply final time scale
this.timeScale = timeScale;

}

this.stopWarping();

}

}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/src/extras/curves/CatmullRomCurve3.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ export default QUnit.module( 'Extras', () => {
assert.deepEqual( points, expectedPoints, 'Correct points calculated' );

} );

QUnit.test( 'two points', ( assert ) => {

const curve = new CatmullRomCurve3( [
Expand Down