File tree Expand file tree Collapse file tree 4 files changed +40
-0
lines changed
spine-ts/spine-construct3/src Expand file tree Collapse file tree 4 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 763763 }
764764 ]
765765 },
766+ {
767+ "id" : " bone-length" ,
768+ "expressionName" : " BoneLength" ,
769+ "highlight" : false ,
770+ "returnType" : " number" ,
771+ "params" : [
772+ {
773+ "id" : " bone-name" ,
774+ "type" : " string"
775+ }
776+ ]
777+ },
766778 {
767779 "id" : " bone-world-x" ,
768780 "expressionName" : " BoneWorldX" ,
Original file line number Diff line number Diff line change @@ -76,6 +76,14 @@ C3.Plugins.EsotericSoftware_SpineConstruct3.Exps =
7676 return this . getBoneRotation ( boneName ) ;
7777 } ,
7878
79+ BoneLength ( this : SpineC3Instance , boneName : string ) {
80+ const { skeleton } = this ;
81+ if ( ! skeleton ) return 0 ;
82+ const bone = skeleton . findBone ( boneName ) ;
83+ if ( ! bone ) return 0 ;
84+ return bone . data . length ;
85+ } ,
86+
7987 BoneWorldX ( this : SpineC3Instance , boneName : string ) {
8088 return this . getBoneWorldX ( boneName ) ;
8189 } ,
Original file line number Diff line number Diff line change 851851 }
852852 }
853853 },
854+ "bone-length" : {
855+ "description" : " Get the length of a bone." ,
856+ "translated-name" : " BoneLength" ,
857+ "params" : {
858+ "bone-name" : {
859+ "name" : " Bone name" ,
860+ "desc" : " Name of the bone"
861+ }
862+ }
863+ },
854864 "bone-world-x" : {
855865 "description" : " Get the C3 world X position of a bone." ,
856866 "translated-name" : " BoneWorldX" ,
Original file line number Diff line number Diff line change 851851 }
852852 }
853853 },
854+ "bone-length" : {
855+ "description" : " 获取骨骼的长度。" ,
856+ "translated-name" : " BoneLength" ,
857+ "params" : {
858+ "bone-name" : {
859+ "name" : " 骨骼名称" ,
860+ "desc" : " 骨骼的名称"
861+ }
862+ }
863+ },
854864 "bone-world-x" : {
855865 "description" : " 获取骨骼的C3世界X位置。" ,
856866 "translated-name" : " BoneWorldX" ,
You can’t perform that action at this time.
0 commit comments