Skip to content

Commit

Permalink
Add example json file of animated layer
Browse files Browse the repository at this point in the history
  • Loading branch information
p-x9 committed Apr 9, 2024
1 parent a666819 commit f0bfdd4
Showing 1 changed file with 146 additions and 0 deletions.
146 changes: 146 additions & 0 deletions Example/json/anim.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"class": "CAReplicatorLayer",
"layerModel": {
"sublayers": [
{
"layerModel": {
"position": [
100,
100
],
"bounds": [
[
0,
0
],
[
200,
200
]
],
"animations": {
"ripple": {
"class": "CAAnimationGroup",
"animationModel": {
"beginTime": 0,
"duration": 3,
"timeOffset": 0,
"autoreverses": false,
"fillMode": {
"rawValue": "removed"
},
"isRemovedOnCompletion": false,
"speed": 1,
"repeatDuration": 0,
"repeatCount": 3.4028235e+38,
"animations": [
{
"animationModel": {
"autoreverses": false,
"repeatDuration": 0,
"timeOffset": 0,
"fillMode": {
"rawValue": "forwards"
},
"isRemovedOnCompletion": false,
"fromValue": {
"type": "float",
"value": 0
},
"speed": 1,
"isAdditive": false,
"duration": 3,
"repeatCount": 0,
"isCumulative": false,
"toValue": {
"value": 1,
"type": "int"
},
"keyPath": "transform.scale.xy",
"beginTime": 0
},
"class": "CABasicAnimation"
},
{
"class": "CAKeyframeAnimation",
"animationModel": {
"repeatCount": 0,
"repeatDuration": 0,
"keyPath": "opacity",
"fillMode": {
"rawValue": "forwards"
},
"beginTime": 0,
"isCumulative": false,
"calculationMode": {
"rawValue": "linear"
},
"autoreverses": false,
"isRemovedOnCompletion": false,
"keyTimes": [
0,
0.5,
1
],
"values": [
{
"type": "float",
"value": 0.8
},
{
"type": "float",
"value": 0.4
},
{
"type": "float",
"value": 0
}
],
"isAdditive": false,
"speed": 1,
"timeOffset": 0,
"duration": 3
}
}
],
"timingFunction": "linear"
}
}
},
"backgroundColor": {
"code": "FF00FFFF"
},
"allowsEdgeAntialiasing": false,
"contentsFormat": {
"rawValue": "RGBA8"
},
"cornerRadius": 100,
"opacity": 0,
"allowsGroupOpacity": true
},
"class": "CALayer"
}
],
"instanceCount": 3,
"contentsFormat": {
"rawValue": "RGBA8"
},
"allowsEdgeAntialiasing": false,
"instanceDelay": 1,
"position": [
196.5,
426
],
"bounds": [
[
0,
0
],
[
200,
200
]
],
"allowsGroupOpacity": true
}
}

0 comments on commit f0bfdd4

Please sign in to comment.