Skip to content

Commit

Permalink
support motionstreak (cocos2d#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
minggo authored Dec 6, 2017
1 parent 36b95e1 commit f263e1b
Show file tree
Hide file tree
Showing 15 changed files with 1,551 additions and 736 deletions.
1,701 changes: 971 additions & 730 deletions creator_project/assets/scenes/Main.fire

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions creator_project/assets/scenes/motionstreak.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ver": "1.0.1",
"uuid": "38b55249-e036-4be4-a0d9-c4aaafcf988e",
"isGroup": false,
"subMetas": {}
}
58 changes: 58 additions & 0 deletions creator_project/assets/scenes/motionstreak/anim1.anim
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"__type__": "cc.AnimationClip",
"_name": "anim1",
"_objFlags": 0,
"_rawFiles": null,
"_duration": 0.67,
"sample": 60,
"speed": 1,
"wrapMode": 2,
"curveData": {
"props": {
"position": [
{
"frame": 0,
"value": [
467,
353
],
"motionPath": []
},
{
"frame": 0.16666666666666666,
"value": [
689,
630
],
"motionPath": []
},
{
"frame": 0.3333333333333333,
"value": [
945,
351
],
"motionPath": []
},
{
"frame": 0.5,
"value": [
631,
19
],
"motionPath": [],
"curve": "linear"
},
{
"frame": 0.6666666666666666,
"value": [
466,
351
],
"motionPath": []
}
]
}
},
"events": []
}
5 changes: 5 additions & 0 deletions creator_project/assets/scenes/motionstreak/anim1.anim.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "6b379618-5b80-4cbb-a0eb-ac8cc70054f7",
"subMetas": {}
}
249 changes: 249 additions & 0 deletions creator_project/assets/scenes/motionstreak/motionstreak.fire
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_rawFiles": null,
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 4
}
],
"_tag": -1,
"_active": true,
"_components": [],
"_prefab": null,
"_id": "f0411265-6205-4f4d-9fe8-53cf39d89c4d",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0,
"autoReleaseAssets": false
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": null,
"_id": "4fc08CyklVH36iDgDKgYWc6",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 480,
"y": 320
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 960,
"height": 640
},
"_fitWidth": false,
"_fitHeight": true
},
{
"__type__": "cc.Node",
"_name": "sprite",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 5
},
{
"__id__": 6
},
{
"__id__": 7
}
],
"_prefab": null,
"_id": "94abaJi8F1P+IP4r4Ql5HNx",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 22,
"height": 22
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 467,
"y": 353
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "ffdcbcf9-b72c-4668-9443-c8e7e9fd7624"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": {
"__uuid__": "5ad0d74a-bf8c-454a-863d-dd0cc29a4989"
}
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
},
"_enabled": true,
"_defaultClip": {
"__uuid__": "6b379618-5b80-4cbb-a0eb-ac8cc70054f7"
},
"_clips": [
{
"__uuid__": "6b379618-5b80-4cbb-a0eb-ac8cc70054f7"
}
],
"playOnLoad": true
},
{
"__type__": "cc.MotionStreak",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
},
"_enabled": true,
"_fadeTime": 1,
"_minSeg": 1,
"_stroke": 64,
"_texture": {
"__uuid__": "dbdd0d88-1e19-4f8e-82d9-70f46352e251"
},
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_fastMode": false,
"_N$preview": false
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ver": "1.0.0",
"uuid": "f0411265-6205-4f4d-9fe8-53cf39d89c4d",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions creator_project/assets/scenes/motionstreak/streak.png.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"ver": "1.0.0",
"uuid": "dbdd0d88-1e19-4f8e-82d9-70f46352e251",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"streak": {
"ver": "1.0.3",
"uuid": "c7daf059-9b9c-4ad0-9d5e-2a3515ee22db",
"rawTextureUuid": "dbdd0d88-1e19-4f8e-82d9-70f46352e251",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 64,
"height": 64,
"rawWidth": 64,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ enum ColliderType:byte {BoxCollider, PolygonCollider, CircleCollider}
// New nodes should be added at the end of the union
// no more than 255 union objects can be added
union AnyNode {Scene, Sprite, Label, Particle, TileMap, Node, Button, ProgressBar, ScrollView, CreatorScene,
EditBox, RichText, SpineSkeleton, VideoPlayer, WebView, Slider, Toggle, ToggleGroup, PageView, Mask, DragonBones}
EditBox, RichText, SpineSkeleton, VideoPlayer, WebView, Slider, Toggle, ToggleGroup, PageView, Mask, DragonBones, MotionStreak}

table SceneGraph
{
Expand Down Expand Up @@ -308,6 +308,17 @@ table PageView
background:PageViewBackground;
}

table MotionStreak
{
node:Node;
timeToFade:float;
minSeg:float;
strokeWidth:float;
strokeColor:ColorRGB;
texturePath:string;
fastMode:bool;
}

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Misc Nodes and extensions
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Expand Down
Loading

0 comments on commit f263e1b

Please sign in to comment.