Skip to content

Commit

Permalink
Merge pull request #7 from MikalDev/data-aces
Browse files Browse the repository at this point in the history
Data aces
  • Loading branch information
MikalDev authored Feb 22, 2021
2 parents 6d1d6ba + 72176b6 commit 7dafab3
Show file tree
Hide file tree
Showing 9 changed files with 195 additions and 10 deletions.
Binary file added dist/Spine-v1.37.0.c3addon
Binary file not shown.
38 changes: 38 additions & 0 deletions src/aces.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
{
"data": {
"conditions": [
],
"actions": [
{
"id": "set-value",
"scriptName": "SetValue",
"highlight": true,
"params": [
{
"id": "value",
"type": "any"
},
{
"id": "path",
"type": "string",
"initial-value": ""
}
]
}
],
"expressions": [
{
"id": "get-value",
"scriptName": "GetValue",
"expressionName": "GetValue",
"returnType": "any",
"highlight": false,
"params": [
{
"id": "path",
"type": "string",
"initial-value": ""
}
]
}
]
},
"spine": {
"conditions": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/addon.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "plugin",
"name": "Spine",
"id": "Gritsenko_Spine",
"version": "1.36.9",
"version": "1.37.0",
"author": "Mikal and Igor Gritsenko",
"website": "https://gritsenko.github.io/c3_spine_plugin",
"documentation": "https://gritsenko.github.io/c3_spine_plugin",
Expand Down
6 changes: 6 additions & 0 deletions src/c3runtime/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,12 @@
{
this._sdkType._skeletonData = this._sdkType._skeletonJson.readSkeletonData(assetManager.get(assetTag, this._sdkType._jsonURI) [this.skeletonName] );
}
},

SetValue(value, pathString)
{
let path = pathString.split(".");
this.SetValuePath(value, path);
}

};
Expand Down
7 changes: 7 additions & 0 deletions src/c3runtime/expressions.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,5 +284,12 @@

return this.spineBoneControl.bones[bone].scaleY;
},
GetValue(pathString){
if(pathString === '') return '';
let path = pathString.split('.');
let value = this.GetValuePath(path,false);
if (typeof value === 'object' || value === null) return '';
return value;
}
};
}
Loading

0 comments on commit 7dafab3

Please sign in to comment.