Skip to content

Commit bc06967

Browse files
takahiroxmrdoob
authored andcommitted
Add Delimiter to regex for trackName (mrdoob#9696)
1 parent 019d313 commit bc06967

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/animation/PropertyBinding.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,11 @@ PropertyBinding.parseTrackName = function( trackName ) {
540540
// uuid.objectName[objectIndex].propertyName[propertyIndex]
541541
// parentName/nodeName.property
542542
// parentName/parentName/nodeName.property[index]
543-
// .bone[Armature.DEF_cog].position
543+
// .bone[Armature.DEF_cog].position
544+
// scene:helium_balloon_model:helium_balloon_model.position
544545
// created and tested via https://regex101.com/#javascript
545546

546-
var re = /^((?:\w+\/)*)(\w+)?(?:\.(\w+)(?:\[(.+)\])?)?\.(\w+)(?:\[(.+)\])?$/;
547+
var re = /^((?:\w+[\/:])*)(\w+)?(?:\.(\w+)(?:\[(.+)\])?)?\.(\w+)(?:\[(.+)\])?$/;
547548
var matches = re.exec( trackName );
548549

549550
if ( ! matches ) {

0 commit comments

Comments
 (0)