diff --git a/SkeletonAnimationDesignPanelDemos/Cyborg(AnimationMixing).fla b/SkeletonAnimationDesignPanelDemos/Cyborg(AnimationMixing).fla
new file mode 100644
index 0000000..bdadf4e
Binary files /dev/null and b/SkeletonAnimationDesignPanelDemos/Cyborg(AnimationMixing).fla differ
diff --git a/SkeletonAnimationDesignPanelDemos/Dragon.fla b/SkeletonAnimationDesignPanelDemos/Dragon.fla
index fe8f65c..e744ec3 100644
Binary files a/SkeletonAnimationDesignPanelDemos/Dragon.fla and b/SkeletonAnimationDesignPanelDemos/Dragon.fla differ
diff --git a/SkeletonAnimationDesignPanelDemos/FrameAnimation.fla b/SkeletonAnimationDesignPanelDemos/FrameAnimation.fla
index 38693f6..e0bb507 100644
Binary files a/SkeletonAnimationDesignPanelDemos/FrameAnimation.fla and b/SkeletonAnimationDesignPanelDemos/FrameAnimation.fla differ
diff --git a/SkeletonAnimationDesignPanelDemos/Knight.fla b/SkeletonAnimationDesignPanelDemos/Knight.fla
index d4d628b..df00508 100644
Binary files a/SkeletonAnimationDesignPanelDemos/Knight.fla and b/SkeletonAnimationDesignPanelDemos/Knight.fla differ
diff --git a/SkeletonAnimationDesignPanelDemos/Shark.fla b/SkeletonAnimationDesignPanelDemos/Shark.fla
new file mode 100644
index 0000000..31baa2b
Binary files /dev/null and b/SkeletonAnimationDesignPanelDemos/Shark.fla differ
diff --git a/SkeletonAnimationDesignPanelDemos/spineDemo.zip b/SkeletonAnimationDesignPanelDemos/spineDemo.zip
new file mode 100644
index 0000000..ce1a859
Binary files /dev/null and b/SkeletonAnimationDesignPanelDemos/spineDemo.zip differ
diff --git a/SkeletonAnimationLibraryDemos/assets/Cyborg_AnimationMixing.dbswf b/SkeletonAnimationLibraryDemos/assets/Cyborg_AnimationMixing.dbswf
new file mode 100644
index 0000000..5590536
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/Cyborg_AnimationMixing.dbswf differ
diff --git a/SkeletonAnimationLibraryDemos/assets/Cyborg_output.swf b/SkeletonAnimationLibraryDemos/assets/Cyborg_output.swf
index d13c0ef..cdb5849 100644
Binary files a/SkeletonAnimationLibraryDemos/assets/Cyborg_output.swf and b/SkeletonAnimationLibraryDemos/assets/Cyborg_output.swf differ
diff --git a/SkeletonAnimationLibraryDemos/assets/DragonWithClothes.png b/SkeletonAnimationLibraryDemos/assets/DragonWithClothes.png
index 4e2c634..7c98607 100644
Binary files a/SkeletonAnimationLibraryDemos/assets/DragonWithClothes.png and b/SkeletonAnimationLibraryDemos/assets/DragonWithClothes.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/Knight/skeleton.json b/SkeletonAnimationLibraryDemos/assets/Knight/skeleton.json
new file mode 100644
index 0000000..e664da3
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/assets/Knight/skeleton.json
@@ -0,0 +1 @@
+{"frameRate":36,"name":"Knight","version":2.3,"armature":[{"bone":[{"transform":{"scX":1,"scY":1,"x":-5,"skY":0,"y":-14,"skX":0},"name":"armOutside","parent":"body"},{"transform":{"scX":1,"scY":1,"x":0,"skY":0,"y":-2,"skX":0},"name":"body","parent":"horseBody"},{"transform":{"scX":1,"scY":1,"x":-3,"skY":-45,"y":-1,"skX":-45},"name":"legOutside","parent":"body"},{"transform":{"scX":1,"scY":1,"x":0,"skY":0,"y":-16,"skX":0},"name":"head","parent":"body"},{"transform":{"scX":1,"scY":1,"x":5,"skY":15,"y":-15,"skX":15},"name":"armInside","parent":"body"},{"transform":{"scX":1,"scY":1,"x":0,"skY":0,"y":0,"skX":0},"name":"horseBody"},{"transform":{"scX":1,"scY":1,"x":20,"skY":0,"y":0,"skX":0},"name":"horseHead","parent":"horseBody"},{"transform":{"scX":1,"scY":1,"x":-20,"skY":0,"y":2,"skX":0},"name":"horseTail","parent":"horseBody"},{"transform":{"scX":1,"scY":1,"x":7,"skY":0,"y":16,"skX":0},"name":"horseLegR1","parent":"horseBody"},{"transform":{"scX":1,"scY":1,"x":-14,"skY":0,"y":16,"skX":0},"name":"horseLegR2","parent":"horseBody"},{"transform":{"scX":1,"scY":1,"x":13,"skY":0,"y":16,"skX":0},"name":"horseLegL1","parent":"horseBody"},{"transform":{"scX":1,"scY":1,"x":-8,"skY":0,"y":16,"skX":0},"name":"horseLegL2","parent":"horseBody"}],"name":"knight","skin":[{"slot":[{"name":"horseLegL2","z":0,"display":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":4,"scY":1,"skY":0,"skX":0},"name":"knightFolder/horseLeg","type":"image"}],"parent":"horseLegL2"},{"name":"horseLegL1","z":1,"display":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":4,"scY":1,"skY":0,"skX":0},"name":"knightFolder/horseLeg","type":"image"}],"parent":"horseLegL1"},{"name":"horseLegR2","z":2,"display":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":4,"scY":1,"skY":0,"skX":0},"name":"knightFolder/horseLeg","type":"image"}],"parent":"horseLegR2"},{"name":"horseLegR1","z":3,"display":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":4,"scY":1,"skY":0,"skX":0},"name":"knightFolder/horseLeg","type":"image"}],"parent":"horseLegR1"},{"name":"horseTail","z":4,"display":[{"transform":{"pY":2,"x":0,"y":0,"scX":1,"pX":6,"scY":1,"skY":0,"skX":0},"name":"knightFolder/horseTail","type":"image"}],"parent":"horseTail"},{"name":"horseHead","z":5,"display":[{"transform":{"scX":1,"scY":1,"x":0,"skY":0,"y":0,"skX":0},"name":"knightFolder/horseHead","type":"armature"}],"parent":"horseHead"},{"name":"horseBody","z":6,"display":[{"transform":{"pY":2,"x":0,"y":0,"scX":1,"pX":20,"scY":1,"skY":0,"skX":0},"name":"knightFolder/horseBody","type":"image"}],"parent":"horseBody"},{"name":"armInside","z":7,"display":[{"transform":{"pY":4,"x":0,"y":0,"scX":1,"pX":2,"scY":1,"skY":0,"skX":0},"name":"knightFolder/arm","type":"image"}],"parent":"armInside"},{"name":"head","z":8,"display":[{"transform":{"pY":37.95,"x":0,"y":0,"scX":1,"pX":22,"scY":1,"skY":0,"skX":0},"name":"knightFolder/head","type":"image"}],"parent":"head"},{"name":"legOutside","z":9,"display":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":4,"scY":1,"skY":0,"skX":0},"name":"knightFolder/leg","type":"image"}],"parent":"legOutside"},{"name":"body","z":10,"display":[{"transform":{"pY":14,"x":0,"y":0,"scX":1,"pX":7,"scY":1,"skY":0,"skX":0},"name":"knightFolder/body","type":"image"}],"parent":"body"},{"name":"armOutside","z":11,"display":[{"transform":{"scX":1,"scY":1,"x":0,"skY":0,"y":0,"skX":0},"name":"knightFolder/armOutside","type":"armature"}],"parent":"armOutside"}],"name":0}],"animation":[{"name":"stand","tweenEasing":2,"scale":15,"loop":0,"fadeInTime":0.167,"timeline":[{"name":"horseLegL2","scale":1,"frame":[{"transform":{"pY":0,"x":-8,"y":16,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":0,"duration":1},{"transform":{"pY":0,"x":-8,"y":16,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":0,"duration":1}],"offset":0},{"name":"horseLegL1","scale":1,"frame":[{"transform":{"pY":0,"x":13,"y":16,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":1,"duration":1},{"transform":{"pY":0,"x":13,"y":16,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":1,"duration":1}],"offset":0},{"name":"horseLegR2","scale":1,"frame":[{"transform":{"pY":0,"x":-14,"y":16,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":2,"duration":1},{"transform":{"pY":0,"x":-14,"y":16,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":2,"duration":1}],"offset":0},{"name":"horseLegR1","scale":1,"frame":[{"transform":{"pY":0,"x":7,"y":16,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":3,"duration":1},{"transform":{"pY":0,"x":7,"y":16,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":3,"duration":1}],"offset":0},{"name":"horseTail","scale":1,"frame":[{"transform":{"pY":0,"x":-20,"y":2,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":4,"duration":1},{"transform":{"pY":0,"x":-20,"y":2.95,"scX":1,"pX":0,"scY":1,"skY":15,"skX":15},"z":4,"duration":1}],"offset":0.8},{"name":"horseHead","scale":1,"frame":[{"transform":{"pY":0,"x":20,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":5,"duration":1},{"transform":{"pY":0,"x":20.1,"y":1,"scX":1,"pX":0,"scY":1,"skY":5,"skX":5},"z":5,"duration":1}],"offset":0.9},{"name":"horseBody","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":6,"duration":1},{"transform":{"pY":0,"x":0,"y":1,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":6,"duration":1}],"offset":0},{"name":"armInside","scale":1,"frame":[{"transform":{"pY":0,"x":5,"y":-15,"scX":1,"pX":0,"scY":1,"skY":15,"skX":15},"z":7,"duration":1},{"transform":{"pY":0,"x":5,"y":-14,"scX":1,"pX":0,"scY":1,"skY":21,"skX":21},"z":7,"duration":1}],"offset":0.8},{"name":"head","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":-16,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":8,"duration":1},{"transform":{"pY":0,"x":0,"y":-14,"scX":1,"pX":0,"scY":1,"skY":8,"skX":8},"z":8,"duration":1}],"offset":0.8},{"name":"legOutside","scale":1,"frame":[{"transform":{"pY":0,"x":-3,"y":-1,"scX":1,"pX":0,"scY":1,"skY":-45,"skX":-45},"z":9,"duration":1},{"transform":{"pY":0,"x":-3,"y":0,"scX":1,"pX":0,"scY":1,"skY":-45,"skX":-45},"z":9,"duration":1}],"offset":0},{"name":"body","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":-2,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":10,"duration":1},{"transform":{"pY":0,"x":0,"y":-1,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":10,"duration":1}],"offset":0},{"name":"armOutside","scale":1,"frame":[{"transform":{"pY":0,"x":-5,"y":-14,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":11,"duration":1},{"transform":{"pY":0,"x":-5,"y":-13,"scX":1,"pX":0,"scY":1,"skY":6,"skX":6},"z":11,"duration":1}],"offset":0}],"duration":2},{"name":"run","tweenEasing":2,"scale":9,"loop":0,"fadeInTime":0.111,"timeline":[{"name":"horseLegL2","scale":1,"frame":[{"transform":{"pY":0,"x":-4.85,"y":7.2,"scX":1,"pX":0,"scY":1,"skY":64.3,"skX":64.3},"z":0,"duration":1},{"transform":{"pY":0,"x":-8,"y":16,"scX":1,"pX":0,"scY":1,"skY":-45,"skX":-45},"z":0,"duration":1}],"offset":0},{"name":"horseLegL1","scale":1,"frame":[{"transform":{"pY":0,"x":15.75,"y":3.3,"scX":1,"pX":0,"scY":1,"skY":-70.7,"skX":-70.7},"z":1,"duration":1},{"transform":{"pY":0,"x":10.95,"y":17.5,"scX":1,"pX":0,"scY":1,"skY":52,"skX":52},"z":1,"duration":1}],"offset":0},{"name":"horseLegR2","scale":1,"frame":[{"transform":{"pY":0,"x":-10.7,"y":8.35,"scX":1,"pX":0,"scY":1,"skY":64.3,"skX":64.3},"z":2,"duration":1},{"transform":{"pY":0,"x":-15.85,"y":14.2,"scX":1,"pX":0,"scY":1,"skY":-38,"skX":-38},"z":2,"duration":1}],"offset":0.9},{"name":"horseLegR1","scale":1,"frame":[{"transform":{"pY":0,"x":9.9,"y":4.45,"scX":1,"pX":0,"scY":1,"skY":-70.7,"skX":-70.7},"z":3,"duration":1},{"transform":{"pY":0,"x":5,"y":16.75,"scX":1,"pX":0,"scY":1,"skY":52,"skX":52},"z":3,"duration":1}],"offset":0.9},{"name":"horseTail","scale":1,"frame":[{"transform":{"pY":0,"x":-19.25,"y":-4.3,"scX":1,"pX":0,"scY":1,"skY":64.3,"skX":64.3},"z":4,"duration":1},{"transform":{"pY":0,"x":-20.1,"y":-0.45,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":4,"duration":1}],"offset":0.4},{"name":"horseHead","scale":1,"frame":[{"transform":{"pY":0,"x":19.65,"y":-13.75,"scX":1,"pX":0,"scY":1,"skY":-20,"skX":-20},"z":5,"duration":1},{"transform":{"pY":0,"x":19.85,"y":2.45,"scX":1,"pX":0,"scY":1,"skY":27,"skX":27},"z":5,"duration":1}],"offset":0.8},{"name":"horseBody","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":-10,"scX":1,"pX":0,"scY":1,"skY":-10.7,"skX":-10.7},"z":6,"duration":1},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":6.99,"skX":6.99},"z":6,"duration":1}],"offset":0.1},{"name":"armInside","scale":1,"frame":[{"transform":{"pY":0,"x":2.65,"y":-25.65,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":7,"duration":1},{"transform":{"pY":0,"x":7.15,"y":-13.95,"scX":1,"pX":0,"scY":1,"skY":30,"skX":30},"z":7,"duration":1}],"offset":0.8},{"name":"head","scale":1,"frame":[{"transform":{"pY":0,"x":-2.6,"y":-26.75,"scX":1,"pX":0,"scY":1,"skY":-22,"skX":-22},"z":8,"duration":1},{"transform":{"pY":0,"x":2.1,"y":-13.8,"scX":1,"pX":0,"scY":1,"skY":20,"skX":20},"z":8,"duration":1}],"offset":0.7},{"name":"legOutside","scale":1,"frame":[{"transform":{"pY":0,"x":-2.8,"y":-10.5,"scX":1,"pX":0,"scY":1,"skY":-34.25,"skX":-34.25},"z":9,"duration":1},{"transform":{"pY":0,"x":-3.1,"y":-1.5,"scX":1,"pX":0,"scY":1,"skY":-5,"skX":-5},"z":9,"duration":1}],"offset":0},{"name":"body","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":-12,"scX":1,"pX":0,"scY":1,"skY":-10,"skX":-10},"z":10,"duration":1},{"transform":{"pY":0,"x":0,"y":-2,"scX":1,"pX":0,"scY":1,"skY":10,"skX":10},"z":10,"duration":1}],"offset":0},{"name":"armOutside","scale":1,"frame":[{"transform":{"pY":0,"x":-7,"y":-22.95,"scX":1,"pX":0,"scY":1,"skY":-15,"skX":-15},"z":11,"duration":1},{"transform":{"pY":0,"x":-2.8,"y":-14.65,"scX":1,"pX":0,"scY":1,"skY":15,"skX":15},"z":11,"duration":1}],"offset":0}],"duration":2},{"name":"jump","tweenEasing":null,"scale":1,"loop":1,"fadeInTime":0.167,"timeline":[{"name":"horseLegL2","scale":1,"frame":[{"transform":{"pY":0,"x":-7.2,"y":16.4,"scX":1,"pX":0,"scY":1,"skY":72.3,"skX":72.29},"z":0,"duration":8},{"transform":{"pY":0,"x":-7.2,"y":16.4,"scX":1,"pX":0,"scY":1,"skY":72.3,"skX":72.29},"z":0,"duration":1}],"offset":0},{"name":"horseLegL1","scale":1,"frame":[{"transform":{"pY":0,"x":13.75,"y":15.35,"scX":1,"pX":0,"scY":1,"skY":-62.7,"skX":-62.7},"z":1,"duration":8},{"transform":{"pY":0,"x":13.75,"y":15.35,"scX":1,"pX":0,"scY":1,"skY":-32.7,"skX":-32.7},"z":1,"duration":1}],"offset":0},{"name":"horseLegR2","scale":1,"frame":[{"transform":{"pY":0,"x":-13.15,"y":16.65,"scX":1,"pX":0,"scY":1,"skY":72.3,"skX":72.29},"z":2,"duration":8},{"transform":{"pY":0,"x":-13.15,"y":16.65,"scX":1,"pX":0,"scY":1,"skY":72.3,"skX":72.29},"z":2,"duration":1}],"offset":0},{"name":"horseLegR1","scale":1,"frame":[{"transform":{"pY":0,"x":7.8,"y":15.7,"scX":1,"pX":0,"scY":1,"skY":-62.7,"skX":-62.7},"z":3,"duration":8},{"transform":{"pY":0,"x":7.8,"y":15.7,"scX":1,"pX":0,"scY":1,"skY":-32.7,"skX":-32.7},"z":3,"duration":1}],"offset":0},{"name":"horseTail","scale":1,"frame":[{"transform":{"pY":0,"x":-19.8,"y":3,"scX":1,"pX":0,"scY":1,"skY":12.29,"skX":12.29},"z":4,"duration":8},{"transform":{"pY":0,"x":-19.8,"y":3,"scX":1,"pX":0,"scY":1,"skY":102.29,"skX":102.29},"z":4,"duration":1}],"offset":0},{"name":"horseHead","scale":1,"frame":[{"transform":{"pY":0,"x":19.95,"y":-0.95,"scX":1,"pX":0,"scY":1,"skY":-12.01,"skX":-12.01},"z":5,"duration":8},{"transform":{"pY":0,"x":19.95,"y":-0.95,"scX":1,"pX":0,"scY":1,"skY":21.72,"skX":21.72},"z":5,"duration":1}],"offset":0},{"name":"horseBody","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-2.7,"skX":-2.7},"z":6,"duration":8},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-2.7,"skX":-2.7},"z":6,"duration":1}],"offset":0},{"name":"armInside","scale":1,"frame":[{"transform":{"pY":0,"x":4.8,"y":-15.15,"scX":1,"pX":0,"scY":1,"skY":7.99,"skX":7.99},"z":7,"duration":8},{"transform":{"pY":0,"x":4.8,"y":-15.15,"scX":1,"pX":0,"scY":1,"skY":37.99,"skX":37.99},"z":7,"duration":1}],"offset":0},{"name":"head","scale":1,"frame":[{"transform":{"pY":0,"x":-0.2,"y":-16.95,"scX":1,"pX":0,"scY":1,"skY":-14,"skX":-14},"z":8,"duration":8},{"transform":{"pY":0,"x":-0.2,"y":-16.95,"scX":1,"pX":0,"scY":1,"skY":15.99,"skX":15.99},"z":8,"duration":1}],"offset":0},{"name":"legOutside","scale":1,"frame":[{"transform":{"pY":0,"x":-2.7,"y":-0.9,"scX":1,"pX":0,"scY":1,"skY":-26.26,"skX":-26.26},"z":9,"duration":8},{"transform":{"pY":0,"x":-2.7,"y":-0.9,"scX":1,"pX":0,"scY":1,"skY":-26.26,"skX":-26.26},"z":9,"duration":1}],"offset":0},{"name":"body","scale":1,"frame":[{"transform":{"pY":0,"x":0.3,"y":-2,"scX":1,"pX":0,"scY":1,"skY":-2,"skX":-2},"z":10,"duration":8},{"transform":{"pY":0,"x":0.3,"y":-2,"scX":1,"pX":0,"scY":1,"skY":-2,"skX":-2},"z":10,"duration":1}],"offset":0},{"name":"armOutside","scale":1,"frame":[{"transform":{"pY":0,"x":-7,"y":-12.95,"scX":1,"pX":0,"scY":1,"skY":-15,"skX":-15},"z":11,"duration":8},{"transform":{"pY":0,"x":-7,"y":-12.95,"scX":1,"pX":0,"scY":1,"skY":12.49,"skX":12.49},"z":11,"duration":1}],"offset":0}],"duration":9}]},{"bone":[{"transform":{"scX":1,"scY":1,"x":17.35,"skY":0,"y":-24.05,"skX":0},"name":"eye"},{"transform":{"scX":1,"scY":1,"x":-2,"skY":0,"y":2,"skX":0},"name":"head"}],"name":"knightFolder/horseHead","skin":[{"slot":[{"name":"head","z":0,"display":[{"transform":{"pY":48,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"name":"knightFolder/horseHead_","type":"image"}],"parent":"head"},{"name":"eye","z":1,"display":[{"transform":{"pY":6.2,"x":0,"y":0,"scX":1,"pX":6.2,"scY":1,"skY":0,"skX":0},"name":"knightFolder/horseEye","type":"image"}],"parent":"eye"}],"name":0}],"animation":[{"name":"unnamed","tweenEasing":null,"scale":1,"loop":0,"fadeInTime":0.167,"timeline":[{"name":"head","scale":1,"frame":[{"transform":{"pY":0,"x":-2,"y":2,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":0,"duration":60}],"offset":0},{"name":"eye","scale":1,"frame":[{"transform":{"pY":0,"x":17.35,"y":-24.05,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":1,"duration":4},{"z":1,"tweenEasing":1,"duration":3,"transform":{"pY":0,"x":17.35,"y":-24.05,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0}},{"z":1,"tweenEasing":0,"duration":3,"transform":{"pY":0,"x":17.35,"y":-24.05,"scX":1,"pX":0,"scY":0.04,"skY":0,"skX":0}},{"transform":{"pY":0,"x":17.35,"y":-24.05,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":1,"duration":50}],"offset":0}],"duration":60}]},{"bone":[{"transform":{"scX":1,"scY":1,"x":26,"skY":10,"y":3,"skX":10},"name":"bow"},{"transform":{"scX":1,"scY":1,"x":0,"skY":120,"y":0,"skX":120},"name":"arm"},{"transform":{"scX":1,"scY":1,"x":-6,"skY":30,"y":14,"skX":30},"name":"weapon","parent":"arm"}],"name":"knightFolder/armOutside","skin":[{"slot":[{"name":"weapon","z":1,"display":[{"transform":{"pY":9,"x":0,"y":0,"scX":1,"pX":11,"scY":1,"skY":0,"skX":0},"name":"knightFolder/sword_1","type":"image"},{"transform":{"pY":8,"x":-27.15,"y":0.399,"scX":1,"pX":26,"scY":1,"skY":0,"skX":0},"name":"knightFolder/pike_1","type":"image"},{"transform":{"pY":9,"x":-17.55,"y":-0.35,"scX":1,"pX":6,"scY":1,"skY":0,"skX":0},"name":"knightFolder/axe_1","type":"image"}],"parent":"weapon"},{"name":"arm","z":2,"display":[{"transform":{"pY":4,"x":0,"y":0,"scX":1,"pX":2,"scY":1,"skY":0,"skX":0},"name":"knightFolder/arm","type":"image"}],"parent":"arm"},{"name":"bow","z":0,"display":[{"transform":{"scX":1,"scY":1,"x":0,"skY":0,"y":0,"skX":0},"name":"knightFolder/bow","type":"armature"}],"parent":"bow"}],"name":0}],"animation":[{"name":"ready_sword","tweenEasing":null,"scale":0,"loop":1,"fadeInTime":0.167,"timeline":[{"name":"weapon","scale":1,"frame":[{"transform":{"pY":0,"x":-6,"y":14,"scX":1,"pX":0,"scY":1,"skY":30,"skX":30},"z":1,"duration":1}],"offset":0},{"name":"arm","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":120,"skX":120},"z":2,"duration":1}],"offset":0}],"duration":1},{"name":"attack_sword_0","tweenEasing":null,"scale":1,"loop":1,"frame":[{"duration":10},{"duration":8,"event":"ready"}],"fadeInTime":0.3,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"tweenEasing":1,"duration":8,"transform":{"pY":0,"x":10,"y":-12,"scX":1,"pX":0,"scY":1,"skY":-134.79,"skX":-134.79}},{"transform":{"pY":0,"x":-14,"y":6,"scX":1,"pX":0,"scY":1,"skY":60,"skX":60},"z":1,"duration":10}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":1,"duration":8,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-44.35,"skX":-44.35},"tweenRotate":1},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":165,"skX":165},"z":2,"duration":10}],"offset":0}],"duration":18},{"name":"attack_sword_1","tweenEasing":null,"scale":1,"loop":1,"frame":[{"duration":10},{"duration":8,"event":"ready"}],"fadeInTime":0.3,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"tweenEasing":1,"duration":8,"transform":{"pY":0,"x":5.7,"y":15.4,"scX":1,"pX":0,"scY":1,"skY":105,"skX":105}},{"transform":{"pY":0,"x":15.7,"y":-5.6,"scX":1,"pX":0,"scY":1,"skY":-60,"skX":-60},"z":1,"duration":10}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":1,"duration":8,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":75,"skX":75}},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-12,"skX":-12},"z":2,"duration":10}],"offset":0}],"duration":18},{"name":"attack_sword_2","tweenEasing":null,"scale":1,"loop":1,"frame":[{"duration":11},{"duration":10,"event":"ready"}],"fadeInTime":0.3,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"tweenEasing":1,"duration":9,"transform":{"pY":0,"x":13.7,"y":-7.6,"scX":1,"pX":0,"scY":1,"skY":-89.99,"skX":-89.99}},{"transform":{"pY":0,"x":-14.1,"y":7.3,"scX":1,"pX":0,"scY":1,"skY":150,"skX":150},"z":1,"duration":12}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":1,"duration":9,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-20,"skX":-20}},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":160,"skX":160},"z":2,"duration":12}],"offset":0}],"duration":21},{"name":"attack_sword_3","tweenEasing":null,"scale":1,"loop":1,"frame":[{"duration":16},{"action":"ready_sword","duration":1}],"fadeInTime":0.167,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"tweenEasing":1,"duration":9,"transform":{"pY":0,"x":-14.1,"y":7.3,"scX":1,"pX":0,"scY":1,"skY":150,"skX":150}},{"transform":{"pY":0,"x":9.95,"y":13.05,"scX":1,"pX":0,"scY":1,"skY":60,"skX":60},"z":1,"duration":8}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":1,"duration":9,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":160,"skX":160},"tweenRotate":1},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":60,"skX":60},"z":2,"duration":8}],"offset":0}],"duration":17},{"name":"attack_sword_5","tweenEasing":null,"scale":1,"loop":0,"fadeInTime":0.167,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"tweenEasing":0,"duration":7,"transform":{"pY":0,"x":1.65,"y":15.7,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0}},{"transform":{"pY":0,"x":1.65,"y":15.7,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":1,"duration":1}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":0,"duration":7,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":89.99,"skX":89.99},"tweenRotate":2},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":89.99,"skX":89.99},"z":2,"duration":1}],"offset":0}],"duration":8},{"name":"ready_pike","tweenEasing":null,"scale":1,"loop":1,"fadeInTime":0.3,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"duration":1,"transform":{"pY":0,"x":2.05,"y":16,"scX":1,"pX":0,"scY":1,"skY":5,"skX":5},"displayIndex":1}],"offset":0},{"name":"arm","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":89.99,"skX":89.99},"z":2,"duration":1}],"offset":0}],"duration":1},{"name":"attack_pike_1","tweenEasing":null,"scale":1,"loop":1,"frame":[{"duration":12},{"duration":10,"event":"ready"}],"fadeInTime":0.3,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"tweenEasing":1,"duration":9,"transform":{"pY":-0.4,"x":9,"y":-13.25,"scX":1,"pX":27.15,"scY":1,"skY":-135,"skX":-135},"displayIndex":1},{"z":1,"duration":13,"transform":{"pY":-0.4,"x":-15,"y":6,"scX":1,"pX":27.15,"scY":1,"skY":60,"skX":60},"displayIndex":1}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":1,"duration":9,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-45,"skX":-45},"tweenRotate":1},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":165,"skX":165},"z":2,"duration":13}],"offset":0}],"duration":22},{"name":"attack_pike_2","tweenEasing":null,"scale":1,"loop":1,"frame":[{"duration":13},{"duration":9,"event":"ready"}],"fadeInTime":0.3,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"tweenEasing":1,"duration":9,"transform":{"pY":-0.4,"x":6,"y":15,"scX":1,"pX":27.15,"scY":1,"skY":135,"skX":135},"displayIndex":1},{"z":1,"duration":13,"transform":{"pY":-0.4,"x":15,"y":-5,"scX":1,"pX":27.15,"scY":1,"skY":-60,"skX":-60},"displayIndex":1}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":1,"duration":9,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":75,"skX":75}},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-12,"skX":-12},"z":2,"duration":13}],"offset":0}],"duration":22},{"name":"attack_pike_3","tweenEasing":null,"scale":1,"loop":1,"frame":[{"duration":21},{"action":"ready_pike","duration":1}],"fadeInTime":0,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"tweenEasing":1,"duration":3,"transform":{"pY":-0.4,"x":15,"y":-5,"scX":1,"pX":27.15,"scY":1,"skY":-60,"skX":-60},"displayIndex":1},{"z":1,"tweenEasing":1,"duration":9,"transform":{"pY":0,"x":-17,"y":2,"scX":1,"pX":-38.85,"scY":1,"skY":0,"skX":0},"displayIndex":1},{"z":1,"duration":10,"transform":{"pY":0,"x":16,"y":1,"scX":1,"pX":35.15,"scY":1,"skY":0,"skX":0},"displayIndex":1}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":1,"duration":3,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-12,"skX":-12},"tweenRotate":1},{"z":2,"tweenEasing":1,"duration":9,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":180,"skX":180}},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":10,"skX":10},"z":2,"duration":10}],"offset":0}],"duration":22},{"name":"attack_pike_5","tweenEasing":null,"scale":1,"loop":0,"fadeInTime":0.167,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"tweenEasing":1,"duration":5,"transform":{"pY":-0.95,"x":-16,"y":0,"scX":1,"pX":-38.6,"scY":1,"skY":15,"skX":15},"displayIndex":1},{"z":1,"duration":1,"transform":{"pY":-1,"x":13,"y":9.05,"scX":1,"pX":35.4,"scY":1,"skY":15,"skX":15},"displayIndex":1},{"z":1,"tweenEasing":1,"duration":5,"transform":{"pY":-0.4,"x":-16,"y":-1,"scX":1,"pX":-39.85,"scY":1,"skY":0,"skX":0},"displayIndex":1},{"z":1,"duration":1,"transform":{"pY":-0.4,"x":16,"y":2,"scX":1,"pX":36.15,"scY":1,"skY":0,"skX":0},"displayIndex":1},{"z":1,"tweenEasing":1,"duration":5,"transform":{"pY":-0.95,"x":-15,"y":5.05,"scX":1,"pX":-39.25,"scY":1,"skY":-15,"skX":-15},"displayIndex":1},{"z":1,"duration":1,"transform":{"pY":-0.4,"x":16,"y":-1,"scX":1,"pX":36.15,"scY":1,"skY":-15,"skX":-15},"displayIndex":1},{"z":1,"tweenEasing":1,"duration":5,"transform":{"pY":-0.4,"x":-16,"y":-1,"scX":1,"pX":-39.85,"scY":1,"skY":0,"skX":0},"displayIndex":1},{"z":1,"duration":1,"transform":{"pY":-0.4,"x":16,"y":2,"scX":1,"pX":36.15,"scY":1,"skY":0,"skX":0},"displayIndex":1}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":1,"duration":5,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-170,"skX":-170}},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":40,"skX":40},"z":2,"duration":1},{"z":2,"tweenEasing":1,"duration":5,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-170,"skX":-170}},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":15,"skX":15},"z":2,"duration":1},{"z":2,"tweenEasing":1,"duration":5,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":170,"skX":170}},{"z":2,"tweenEasing":0,"duration":1,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"tweenRotate":-1},{"z":2,"tweenEasing":1,"duration":5,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-170,"skX":-170}},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":15,"skX":15},"z":2,"duration":1}],"offset":0}],"duration":24},{"name":"ready_axe","tweenEasing":null,"scale":1,"loop":1,"fadeInTime":0.3,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"duration":1,"transform":{"pY":0,"x":2,"y":16,"scX":1,"pX":0,"scY":1,"skY":15,"skX":15},"displayIndex":2}],"offset":0},{"name":"arm","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":89.99,"skX":89.99},"z":2,"duration":1}],"offset":0}],"duration":1},{"name":"attack_axe_1","tweenEasing":null,"scale":1,"loop":1,"frame":[{"duration":15},{"duration":8,"event":"ready"}],"fadeInTime":0.167,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"tweenEasing":1,"duration":10,"transform":{"pY":0.35,"x":-8,"y":14,"scX":1,"pX":17.55,"scY":1,"skY":135,"skX":-45},"displayIndex":2},{"z":1,"duration":12,"transform":{"pY":0.35,"x":10,"y":-12,"scX":1,"pX":17.55,"scY":1,"skY":-60,"skX":120},"displayIndex":2},{"z":1,"tweenEasing":null,"duration":1,"transform":{"pY":0.35,"x":10,"y":-12,"scX":1,"pX":17.55,"scY":1,"skY":-60,"skX":120},"displayIndex":2}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":1,"duration":10,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":125,"skX":125}},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-45,"skX":-45},"z":2,"duration":13}],"offset":0}],"duration":23},{"name":"attack_axe_2","tweenEasing":null,"scale":1,"loop":1,"frame":[{"duration":14},{"duration":8,"event":"ready"}],"fadeInTime":0.3,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"tweenEasing":1,"duration":9,"transform":{"pY":0.35,"x":10,"y":-12,"scX":1,"pX":17.55,"scY":1,"skY":-120,"skX":-120},"displayIndex":2},{"z":1,"duration":13,"transform":{"pY":0.35,"x":-15,"y":5,"scX":1,"pX":17.55,"scY":1,"skY":120,"skX":120},"displayIndex":2}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":1,"duration":9,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-45,"skX":-45},"tweenRotate":1},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":170,"skX":170},"z":2,"duration":13}],"offset":0}],"duration":22},{"name":"attack_axe_3","tweenEasing":null,"scale":1,"loop":1,"frame":[{"duration":20},{"action":"ready_axe","duration":1}],"fadeInTime":0.3,"timeline":[{"name":"weapon","scale":1,"frame":[{"z":1,"tweenEasing":1,"duration":12,"transform":{"pY":0.35,"x":-15,"y":5,"scX":1,"pX":17.55,"scY":1,"skY":120,"skX":120},"displayIndex":2,"tweenRotate":1},{"z":1,"duration":9,"transform":{"pY":0.6,"x":11.05,"y":12,"scX":1,"pX":31.4,"scY":1,"skY":45,"skX":45},"displayIndex":2}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":1,"duration":12,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":170,"skX":170},"tweenRotate":1},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":55,"skX":55},"z":2,"duration":9}],"offset":0}],"duration":21},{"name":"ready_bow","tweenEasing":null,"scale":1,"loop":1,"fadeInTime":0.167,"timeline":[{"name":"bow","scale":1,"frame":[{"transform":{"pY":0,"x":26,"y":3,"scX":1,"pX":0,"scY":1,"skY":10,"skX":10},"z":0,"duration":1}],"offset":0},{"name":"arm","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":10,"skX":10},"z":2,"duration":1}],"offset":0}],"duration":1},{"name":"attack_bow_1","tweenEasing":null,"scale":1,"loop":1,"frame":[{"duration":3},{"duration":5,"event":"fire"},{"action":"ready_bow","duration":1}],"fadeInTime":0.167,"timeline":[{"name":"bow","scale":1,"frame":[{"transform":{"pY":0,"x":25,"y":0,"scX":1,"pX":0,"scY":1,"skY":-10,"skX":-10},"z":0,"duration":9}],"offset":0},{"name":"arm","scale":1,"frame":[{"z":2,"tweenEasing":0,"duration":3,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":141.7,"skX":-38.3}},{"z":2,"tweenEasing":1,"duration":5,"transform":{"pY":0,"x":0,"y":0,"scX":0.61,"pX":0,"scY":1,"skY":-143.07,"skX":36.93}},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":10,"skX":10},"z":2,"duration":1}],"offset":0}],"duration":9}]},{"bone":[{"transform":{"scX":0.2,"scY":1,"x":-33,"skY":120,"y":-10,"skX":120},"name":"arrowBackup"},{"transform":{"scX":1,"scY":1,"x":0,"skY":0,"y":0,"skX":0},"name":"a"},{"transform":{"scX":1,"scY":1,"x":0,"skY":0,"y":0,"skX":0},"name":"ba"},{"transform":{"scX":1,"scY":1,"x":0,"skY":0,"y":0,"skX":180},"name":"bb"},{"transform":{"scX":1,"scY":1,"x":-8,"skY":0,"y":0,"skX":0},"name":"arrow"},{"transform":{"scX":1,"scY":1,"x":-9,"skY":0,"y":0,"skX":0},"name":"ca"},{"transform":{"scX":1,"scY":1,"x":-9,"skY":0,"y":0,"skX":180},"name":"cb"}],"name":"knightFolder/bow","skin":[{"slot":[{"name":"cb","z":0,"display":[{"transform":{"pY":30,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"name":"knightFolder/bow_b","type":"image"}],"parent":"cb"},{"name":"ca","z":1,"display":[{"transform":{"pY":30,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"name":"knightFolder/bow_b","type":"image"}],"parent":"ca"},{"name":"arrow","z":2,"display":[{"transform":{"pY":5,"x":0,"y":0,"scX":1,"pX":10,"scY":1,"skY":0,"skX":0},"name":"knightFolder/arrow_1","type":"image"}],"parent":"arrow"},{"name":"bb","z":4,"display":[{"transform":{"pY":50,"x":0,"y":0,"scX":1,"pX":11,"scY":1,"skY":0,"skX":0},"name":"knightFolder/bow_1","type":"image"}],"parent":"bb"},{"name":"ba","z":5,"display":[{"transform":{"pY":50,"x":0,"y":0,"scX":1,"pX":11,"scY":1,"skY":0,"skX":0},"name":"knightFolder/bow_1","type":"image"}],"parent":"ba"},{"name":"a","z":6,"display":[{"transform":{"pY":4,"x":0,"y":0,"scX":1,"pX":4,"scY":1,"skY":0,"skX":0},"name":"knightFolder/bow_a","type":"image"}],"parent":"a"},{"name":"arrowBackup","z":3,"display":[{"transform":{"pY":5,"x":0,"y":0,"scX":1,"pX":10,"scY":1,"skY":0,"skX":0},"name":"knightFolder/arrow_1","type":"image"}],"parent":"arrowBackup"}],"name":0}],"animation":[{"name":"ready_bow","tweenEasing":null,"scale":1,"loop":1,"fadeInTime":0.3,"timeline":[{"name":"cb","scale":1,"frame":[{"transform":{"pY":0,"x":-9,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":180},"z":0,"duration":1}],"offset":0},{"name":"ca","scale":1,"frame":[{"transform":{"pY":0,"x":-9,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":1,"duration":1}],"offset":0},{"name":"arrow","scale":1,"frame":[{"transform":{"pY":0,"x":-8,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":2,"duration":1}],"offset":0},{"name":"bb","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":180},"z":4,"duration":1}],"offset":0},{"name":"ba","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":5,"duration":1}],"offset":0},{"name":"a","scale":1,"frame":[{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":6,"duration":1}],"offset":0}],"duration":1},{"name":"attack_bow_1","tweenEasing":null,"scale":1,"loop":1,"fadeInTime":0.167,"timeline":[{"name":"cb","scale":1,"frame":[{"z":0,"tweenEasing":1,"duration":3,"transform":{"pY":0,"x":-39,"y":0,"scX":1,"pX":0,"scY":1,"skY":-30,"skX":150}},{"transform":{"pY":0,"x":-9,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":180},"z":0,"duration":6}],"offset":0},{"name":"ca","scale":1,"frame":[{"z":1,"tweenEasing":1,"duration":3,"transform":{"pY":0,"x":-39,"y":0,"scX":1,"pX":0,"scY":1,"skY":30,"skX":30}},{"transform":{"pY":0,"x":-9,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":1,"duration":6}],"offset":0},{"name":"arrow","scale":1,"frame":[{"z":2,"tweenEasing":1,"duration":3,"transform":{"pY":0,"x":-38,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0}},{"z":2,"duration":5,"transform":{"pY":0,"x":-13,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"hide":1},{"transform":{"pY":0,"x":-8,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":2,"duration":1}],"offset":0},{"name":"arrowBackup","scale":1,"frame":[{"displayIndex":-1,"duration":1},{"z":3,"tweenEasing":0,"duration":7,"transform":{"pY":0,"x":-33,"y":-10,"scX":0.2,"pX":0,"scY":1,"skY":120,"skX":120},"tweenRotate":1},{"z":3,"duration":1,"transform":{"pY":0,"x":-8,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"hide":1}],"offset":0},{"name":"bb","scale":1,"frame":[{"z":4,"tweenEasing":1,"duration":3,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":24,"skX":-156}},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":180},"z":4,"duration":6}],"offset":0},{"name":"ba","scale":1,"frame":[{"z":5,"tweenEasing":1,"duration":3,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":-24,"skX":-24}},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":5,"duration":6}],"offset":0},{"name":"a","scale":1,"frame":[{"z":6,"tweenEasing":1,"duration":3,"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0}},{"transform":{"pY":0,"x":0,"y":0,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":6,"duration":6}],"offset":0}],"duration":9}]},{"bone":[{"transform":{"scX":1,"scY":1,"x":180,"skY":0,"y":240,"skX":0},"name":"arrow_3"},{"transform":{"scX":1,"scY":1,"x":180,"skY":0,"y":220,"skX":0},"name":"arrow_2"},{"transform":{"scX":1,"scY":1,"x":180,"skY":0,"y":200,"skX":0},"name":"arrow_1"},{"transform":{"scX":1,"scY":1,"x":170,"skY":0,"y":320,"skX":0},"name":"bow_3"},{"transform":{"scX":1,"scY":1,"x":135,"skY":0,"y":220,"skX":0},"name":"bow_1"},{"transform":{"scX":1,"scY":1,"x":136.55,"skY":0,"y":271,"skX":0},"name":"bow_2"},{"transform":{"scX":1,"scY":1,"x":8,"skY":0,"y":175,"skX":0},"name":"axe_1"},{"transform":{"scX":1,"scY":1,"x":5,"skY":0,"y":230,"skX":0},"name":"axe_2"},{"transform":{"scX":1,"scY":1,"x":7,"skY":0,"y":297,"skX":0},"name":"axe_3"},{"transform":{"scX":1,"scY":1,"x":30,"skY":0,"y":100,"skX":0},"name":"pike_1"},{"transform":{"scX":1,"scY":1,"x":30,"skY":0,"y":150,"skX":-0.01},"name":"pike_3"},{"transform":{"scX":1,"scY":1,"x":30,"skY":0,"y":120,"skX":-0.01},"name":"pike_2"},{"transform":{"scX":1,"scY":1,"x":8,"skY":0,"y":9,"skX":0},"name":"sword_1"},{"transform":{"scX":1,"scY":1,"x":14,"skY":0,"y":67,"skX":0},"name":"sword_3"},{"transform":{"scX":1,"scY":1,"x":10,"skY":0,"y":34,"skX":0},"name":"sword_2"}],"name":"images","skin":[{"slot":[{"name":"sword_2","z":0,"display":[{"transform":{"pY":14,"x":0,"y":0,"scX":1,"pX":13,"scY":1,"skY":0,"skX":0},"name":"knightFolder/sword_2","type":"image"}],"parent":"sword_2"},{"name":"sword_3","z":1,"display":[{"transform":{"pY":18,"x":0,"y":0,"scX":1,"pX":14,"scY":1,"skY":0,"skX":0},"name":"knightFolder/sword_3","type":"image"}],"parent":"sword_3"},{"name":"sword_1","z":2,"display":[{"transform":{"pY":9,"x":0,"y":0,"scX":1,"pX":11,"scY":1,"skY":0,"skX":0},"name":"knightFolder/sword_1","type":"image"}],"parent":"sword_1"},{"name":"pike_2","z":3,"display":[{"transform":{"pY":12,"x":0,"y":0,"scX":1,"pX":32,"scY":1,"skY":0,"skX":0},"name":"knightFolder/pike_2","type":"image"}],"parent":"pike_2"},{"name":"pike_3","z":4,"display":[{"transform":{"pY":16,"x":0,"y":0,"scX":1,"pX":36,"scY":1,"skY":0,"skX":0},"name":"knightFolder/pike_3","type":"image"}],"parent":"pike_3"},{"name":"pike_1","z":5,"display":[{"transform":{"pY":8,"x":0,"y":0,"scX":1,"pX":26,"scY":1,"skY":0,"skX":0},"name":"knightFolder/pike_1","type":"image"}],"parent":"pike_1"},{"name":"axe_3","z":6,"display":[{"transform":{"pY":32,"x":0,"y":0,"scX":1,"pX":6,"scY":1,"skY":0,"skX":0},"name":"knightFolder/axe_3","type":"image"}],"parent":"axe_3"},{"name":"axe_2","z":7,"display":[{"transform":{"pY":20,"x":0,"y":0,"scX":1,"pX":6,"scY":1,"skY":0,"skX":0},"name":"knightFolder/axe_2","type":"image"}],"parent":"axe_2"},{"name":"axe_1","z":8,"display":[{"transform":{"pY":9,"x":0,"y":0,"scX":1,"pX":6,"scY":1,"skY":0,"skX":0},"name":"knightFolder/axe_1","type":"image"}],"parent":"axe_1"},{"name":"bow_2","z":9,"display":[{"transform":{"pY":50,"x":0,"y":0,"scX":1,"pX":16,"scY":1,"skY":0,"skX":0},"name":"knightFolder/bow_2","type":"image"}],"parent":"bow_2"},{"name":"bow_1","z":10,"display":[{"transform":{"pY":50,"x":0,"y":0,"scX":1,"pX":11,"scY":1,"skY":0,"skX":0},"name":"knightFolder/bow_1","type":"image"}],"parent":"bow_1"},{"name":"bow_3","z":11,"display":[{"transform":{"pY":64,"x":0,"y":0,"scX":1,"pX":23,"scY":1,"skY":0,"skX":0},"name":"knightFolder/bow_3","type":"image"}],"parent":"bow_3"},{"name":"arrow_1","z":12,"display":[{"transform":{"pY":5,"x":0,"y":0,"scX":1,"pX":10,"scY":1,"skY":0,"skX":0},"name":"knightFolder/arrow_1","type":"image"}],"parent":"arrow_1"},{"name":"arrow_2","z":13,"display":[{"transform":{"pY":8.75,"x":0,"y":0,"scX":1,"pX":10.25,"scY":1,"skY":0,"skX":0},"name":"knightFolder/arrow_2","type":"image"}],"parent":"arrow_2"},{"name":"arrow_3","z":14,"display":[{"transform":{"pY":12.5,"x":0,"y":0,"scX":1,"pX":10.45,"scY":1,"skY":0,"skX":0},"name":"knightFolder/arrow_3","type":"image"}],"parent":"arrow_3"}],"name":0}],"animation":[{"name":1,"tweenEasing":null,"scale":1,"loop":1,"fadeInTime":0.3,"timeline":[{"name":"sword_2","scale":1,"frame":[{"transform":{"pY":0,"x":10,"y":34,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":0,"duration":1}],"offset":0},{"name":"sword_3","scale":1,"frame":[{"transform":{"pY":0,"x":14,"y":67,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":1,"duration":1}],"offset":0},{"name":"sword_1","scale":1,"frame":[{"transform":{"pY":0,"x":8,"y":9,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":2,"duration":1}],"offset":0},{"name":"pike_2","scale":1,"frame":[{"transform":{"pY":0,"x":30,"y":120,"scX":1,"pX":0,"scY":1,"skY":0,"skX":-0.01},"z":3,"duration":1}],"offset":0},{"name":"pike_3","scale":1,"frame":[{"transform":{"pY":0,"x":30,"y":150,"scX":1,"pX":0,"scY":1,"skY":0,"skX":-0.01},"z":4,"duration":1}],"offset":0},{"name":"pike_1","scale":1,"frame":[{"transform":{"pY":0,"x":30,"y":100,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":5,"duration":1}],"offset":0},{"name":"axe_3","scale":1,"frame":[{"transform":{"pY":0,"x":7,"y":297,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":6,"duration":1}],"offset":0},{"name":"axe_2","scale":1,"frame":[{"transform":{"pY":0,"x":5,"y":230,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":7,"duration":1}],"offset":0},{"name":"axe_1","scale":1,"frame":[{"transform":{"pY":0,"x":8,"y":175,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":8,"duration":1}],"offset":0},{"name":"bow_2","scale":1,"frame":[{"transform":{"pY":0,"x":136.55,"y":271,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":9,"duration":1}],"offset":0},{"name":"bow_1","scale":1,"frame":[{"transform":{"pY":0,"x":135,"y":220,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":10,"duration":1}],"offset":0},{"name":"bow_3","scale":1,"frame":[{"transform":{"pY":0,"x":170,"y":320,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":11,"duration":1}],"offset":0},{"name":"arrow_1","scale":1,"frame":[{"transform":{"pY":0,"x":180,"y":200,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":12,"duration":1}],"offset":0},{"name":"arrow_2","scale":1,"frame":[{"transform":{"pY":0,"x":180,"y":220,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":13,"duration":1}],"offset":0},{"name":"arrow_3","scale":1,"frame":[{"transform":{"pY":0,"x":180,"y":240,"scX":1,"pX":0,"scY":1,"skY":0,"skX":0},"z":14,"duration":1}],"offset":0}],"duration":1}]}]}
\ No newline at end of file
diff --git a/SkeletonAnimationLibraryDemos/assets/Knight/texture.json b/SkeletonAnimationLibraryDemos/assets/Knight/texture.json
new file mode 100644
index 0000000..defe399
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/assets/Knight/texture.json
@@ -0,0 +1 @@
+{"SubTexture":[{"name":"knightFolder/arrow_3","x":0,"width":83,"y":207,"height":25},{"name":"knightFolder/arrow_2","x":84,"width":83,"y":216,"height":18},{"name":"knightFolder/bow_3","x":182,"width":30,"y":0,"height":64},{"name":"knightFolder/bow_2","x":160,"width":20,"y":34,"height":50},{"name":"knightFolder/axe_2","x":0,"width":104,"y":125,"height":50},{"name":"knightFolder/axe_3","x":0,"width":106,"y":60,"height":64},{"name":"knightFolder/pike_3","x":0,"width":180,"y":0,"height":32},{"name":"knightFolder/pike_2","x":0,"width":159,"y":34,"height":24},{"name":"knightFolder/sword_3","x":106,"width":105,"y":136,"height":36},{"name":"knightFolder/sword_2","x":0,"width":90,"y":177,"height":28},{"name":"knightFolder/bow_a","x":243,"width":8,"y":80,"height":8},{"name":"knightFolder/bow_1","x":214,"width":14,"y":50,"height":50},{"name":"knightFolder/arrow_1","x":0,"width":82,"y":234,"height":10},{"name":"knightFolder/bow_b","x":230,"width":1,"y":50,"height":30},{"name":"knightFolder/axe_1","x":106,"width":85,"y":174,"height":40},{"name":"knightFolder/pike_1","x":108,"width":139,"y":118,"height":16},{"name":"knightFolder/sword_1","x":168,"width":80,"y":216,"height":18},{"name":"knightFolder/horseEye","x":182,"width":13,"y":66,"height":13},{"name":"knightFolder/horseHead_","x":214,"width":40,"y":0,"height":48},{"name":"knightFolder/body","x":233,"width":14,"y":62,"height":16},{"name":"knightFolder/leg","x":196,"width":8,"y":66,"height":16},{"name":"knightFolder/head","x":108,"width":44,"y":60,"height":40},{"name":"knightFolder/arm","x":233,"width":20,"y":50,"height":10},{"name":"knightFolder/horseBody","x":154,"width":40,"y":96,"height":20},{"name":"knightFolder/horseTail","x":233,"width":8,"y":80,"height":12},{"name":"knightFolder/horseLeg","x":182,"width":8,"y":80,"height":14}],"name":"Knight"}
\ No newline at end of file
diff --git a/SkeletonAnimationLibraryDemos/assets/Knight/texture.png b/SkeletonAnimationLibraryDemos/assets/Knight/texture.png
new file mode 100644
index 0000000..42fa69a
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/Knight/texture.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/Knight_output.swf b/SkeletonAnimationLibraryDemos/assets/Knight_output.swf
index 262e91b..21231d2 100644
Binary files a/SkeletonAnimationLibraryDemos/assets/Knight_output.swf and b/SkeletonAnimationLibraryDemos/assets/Knight_output.swf differ
diff --git a/SkeletonAnimationLibraryDemos/assets/Motorcycle_output.png b/SkeletonAnimationLibraryDemos/assets/Motorcycle_output.png
index 27d5d54..1e29534 100644
Binary files a/SkeletonAnimationLibraryDemos/assets/Motorcycle_output.png and b/SkeletonAnimationLibraryDemos/assets/Motorcycle_output.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/Warrior_output/texture@2x.png b/SkeletonAnimationLibraryDemos/assets/Warrior_output/texture@2x.png
new file mode 100644
index 0000000..d60e937
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/Warrior_output/texture@2x.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/Warrior_output/texture@2x.xml b/SkeletonAnimationLibraryDemos/assets/Warrior_output/texture@2x.xml
new file mode 100644
index 0000000..9c7c175
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/assets/Warrior_output/texture@2x.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon.png
new file mode 100644
index 0000000..bd53e0a
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon.tps b/SkeletonAnimationLibraryDemos/assets/images/aeon.tps
new file mode 100644
index 0000000..9d74771
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/assets/images/aeon.tps
@@ -0,0 +1,147 @@
+
+
+
+ variation
+ main
+ verbose
+
+ autoSDSettings
+
+ allowRotation
+
+ quiet
+
+ premultiplyAlpha
+
+ shapeDebug
+
+ dpi
+ 72
+ allowFreeSize
+
+ dataFormat
+ sparrow
+ textureFileName
+ aeon.png
+ flipPVR
+
+ ditherType
+ NearestNeighbour
+ backgroundColor
+ 0
+ libGdx
+
+ filtering
+
+ x
+ Linear
+ y
+ Linear
+
+
+ shapePadding
+ 2
+ jpgQuality
+ 80
+ textureSubPath
+
+ textureFormat
+ png
+ borderPadding
+ 2
+ maxTextureSize
+
+ width
+ 2048
+ height
+ 2048
+
+ fixedTextureSize
+
+ width
+ -1
+ height
+ -1
+
+ reduceBorderArtifacts
+
+ algorithmSettings
+
+ algorithm
+ MaxRects
+ freeSizeMode
+ Best
+ maxRects
+
+ heuristic
+ Best
+
+ basic
+
+ sortBy
+ Best
+ order
+ Ascending
+
+
+ andEngine
+
+ minFilter
+ Linear
+ packageName
+ Texture
+ javaFileName
+ aeon.java
+ wrap
+
+ s
+ Clamp
+ t
+ Clamp
+
+ magFilter
+ MagLinear
+
+ dataFileName
+ aeon.xml
+ defaultExtension
+
+ outputFormat
+ RGBA8888
+ autoAliasEnabled
+
+ trimSpriteNames
+
+ globalSpriteSettings
+
+ scale
+ 1
+ scaleMode
+ Smooth
+ crop
+
+ innerPadding
+ 0
+ extrude
+ 1
+ trimThreshold
+ 1
+ trim
+
+ heuristicMask
+
+
+ fileList
+
+ aeon
+
+ ignoreFileList
+
+ replaceList
+
+ commonDivisorX
+ 1
+ commonDivisorY
+ 1
+
+
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon.xml b/SkeletonAnimationLibraryDemos/assets/images/aeon.xml
new file mode 100644
index 0000000..3025f49
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/assets/images/aeon.xml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/button-disabled-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-disabled-skin.png
new file mode 100644
index 0000000..3986fce
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-disabled-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/button-down-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-down-skin.png
new file mode 100644
index 0000000..c6f475c
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-down-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/button-hover-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-hover-skin.png
new file mode 100644
index 0000000..05114fd
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-hover-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/button-selected-disabled-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-selected-disabled-skin.png
new file mode 100644
index 0000000..1356dd4
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-selected-disabled-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/button-selected-down-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-selected-down-skin.png
new file mode 100644
index 0000000..c339578
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-selected-down-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/button-selected-hover-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-selected-hover-skin.png
new file mode 100644
index 0000000..5b64dab
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-selected-hover-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/button-selected-up-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-selected-up-skin.png
new file mode 100644
index 0000000..5f743c2
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-selected-up-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/button-up-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-up-skin.png
new file mode 100644
index 0000000..0b92b4d
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/button-up-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/check-disabled-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-disabled-icon.png
new file mode 100644
index 0000000..7c8c208
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-disabled-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/check-down-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-down-icon.png
new file mode 100644
index 0000000..a526ade
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-down-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/check-hover-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-hover-icon.png
new file mode 100644
index 0000000..71d9889
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-hover-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/check-selected-disabled-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-selected-disabled-icon.png
new file mode 100644
index 0000000..d849a76
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-selected-disabled-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/check-selected-down-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-selected-down-icon.png
new file mode 100644
index 0000000..fa3d619
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-selected-down-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/check-selected-hover-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-selected-hover-icon.png
new file mode 100644
index 0000000..11ef095
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-selected-hover-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/check-selected-up-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-selected-up-icon.png
new file mode 100644
index 0000000..5ad7bb4
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-selected-up-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/check-up-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-up-icon.png
new file mode 100644
index 0000000..2e56339
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/check-up-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/grouped-list-header-background-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/grouped-list-header-background-skin.png
new file mode 100644
index 0000000..9ac450f
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/grouped-list-header-background-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/header-background-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/header-background-skin.png
new file mode 100644
index 0000000..b7de879
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/header-background-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-decrement-button-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-decrement-button-icon.png
new file mode 100644
index 0000000..c948abc
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-decrement-button-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-increment-button-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-increment-button-icon.png
new file mode 100644
index 0000000..4f8ac73
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-increment-button-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-step-button-disabled-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-step-button-disabled-skin.png
new file mode 100644
index 0000000..cd4967b
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-step-button-disabled-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-step-button-down-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-step-button-down-skin.png
new file mode 100644
index 0000000..85ad949
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-step-button-down-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-step-button-hover-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-step-button-hover-skin.png
new file mode 100644
index 0000000..fcc0513
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-step-button-hover-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-step-button-up-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-step-button-up-skin.png
new file mode 100644
index 0000000..fe08a82
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-step-button-up-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-thumb-down-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-thumb-down-skin.png
new file mode 100644
index 0000000..2c07e35
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-thumb-down-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-thumb-hover-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-thumb-hover-skin.png
new file mode 100644
index 0000000..3d1506a
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-thumb-hover-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-thumb-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-thumb-icon.png
new file mode 100644
index 0000000..a4d67b8
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-thumb-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-thumb-up-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-thumb-up-skin.png
new file mode 100644
index 0000000..6398923
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-thumb-up-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-track-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-track-skin.png
new file mode 100644
index 0000000..107f8bf
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/horizontal-scroll-bar-track-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-thumb-disabled-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-thumb-disabled-skin.png
new file mode 100644
index 0000000..8559174
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-thumb-disabled-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-thumb-down-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-thumb-down-skin.png
new file mode 100644
index 0000000..80b3087
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-thumb-down-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-thumb-hover-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-thumb-hover-skin.png
new file mode 100644
index 0000000..f4b9346
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-thumb-hover-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-thumb-up-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-thumb-up-skin.png
new file mode 100644
index 0000000..d664326
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-thumb-up-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-track-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-track-skin.png
new file mode 100644
index 0000000..03c6cc1
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/hslider-track-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/item-renderer-hover-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/item-renderer-hover-skin.png
new file mode 100644
index 0000000..0f55dc3
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/item-renderer-hover-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/item-renderer-selected-up-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/item-renderer-selected-up-skin.png
new file mode 100644
index 0000000..9e109de
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/item-renderer-selected-up-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/item-renderer-up-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/item-renderer-up-skin.png
new file mode 100644
index 0000000..1b7b6c7
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/item-renderer-up-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/list-accessory-drill-down-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/list-accessory-drill-down-icon.png
new file mode 100644
index 0000000..af72058
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/list-accessory-drill-down-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/page-indicator-normal-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/page-indicator-normal-skin.png
new file mode 100644
index 0000000..f320dcc
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/page-indicator-normal-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/page-indicator-selected-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/page-indicator-selected-skin.png
new file mode 100644
index 0000000..b2853ae
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/page-indicator-selected-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/panel-background-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/panel-background-skin.png
new file mode 100644
index 0000000..806e1a1
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/panel-background-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/picker-list-disabled-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/picker-list-disabled-icon.png
new file mode 100644
index 0000000..2629020
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/picker-list-disabled-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/picker-list-down-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/picker-list-down-icon.png
new file mode 100644
index 0000000..88ef35c
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/picker-list-down-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/picker-list-hover-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/picker-list-hover-icon.png
new file mode 100644
index 0000000..3fd0214
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/picker-list-hover-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/picker-list-up-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/picker-list-up-icon.png
new file mode 100644
index 0000000..43a8878
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/picker-list-up-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/progress-bar-fill-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/progress-bar-fill-skin.png
new file mode 100644
index 0000000..a3de41c
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/progress-bar-fill-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-disabled-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-disabled-icon.png
new file mode 100644
index 0000000..952f66d
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-disabled-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-down-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-down-icon.png
new file mode 100644
index 0000000..8d84502
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-down-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-hover-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-hover-icon.png
new file mode 100644
index 0000000..6b8a87c
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-hover-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-selected-disabled-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-selected-disabled-icon.png
new file mode 100644
index 0000000..0ebdd6e
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-selected-disabled-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-selected-down-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-selected-down-icon.png
new file mode 100644
index 0000000..1934b94
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-selected-down-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-selected-hover-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-selected-hover-icon.png
new file mode 100644
index 0000000..39cbbbe
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-selected-hover-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-selected-up-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-selected-up-icon.png
new file mode 100644
index 0000000..7a6c966
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-selected-up-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-up-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-up-icon.png
new file mode 100644
index 0000000..b8c1331
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/radio-up-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/simple-border-background-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/simple-border-background-skin.png
new file mode 100644
index 0000000..9005879
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/simple-border-background-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/text-input-background-disabled-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/text-input-background-disabled-skin.png
new file mode 100644
index 0000000..85b55eb
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/text-input-background-disabled-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/text-input-background-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/text-input-background-skin.png
new file mode 100644
index 0000000..bae5a1e
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/text-input-background-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-decrement-button-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-decrement-button-icon.png
new file mode 100644
index 0000000..4c4feb8
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-decrement-button-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-increment-button-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-increment-button-icon.png
new file mode 100644
index 0000000..2eb87bb
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-increment-button-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-step-button-disabled-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-step-button-disabled-skin.png
new file mode 100644
index 0000000..72e9981
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-step-button-disabled-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-step-button-down-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-step-button-down-skin.png
new file mode 100644
index 0000000..c10acff
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-step-button-down-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-step-button-hover-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-step-button-hover-skin.png
new file mode 100644
index 0000000..c84a74f
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-step-button-hover-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-step-button-up-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-step-button-up-skin.png
new file mode 100644
index 0000000..b9636f2
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-step-button-up-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-thumb-down-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-thumb-down-skin.png
new file mode 100644
index 0000000..34500df
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-thumb-down-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-thumb-hover-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-thumb-hover-skin.png
new file mode 100644
index 0000000..a8f76bd
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-thumb-hover-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-thumb-icon.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-thumb-icon.png
new file mode 100644
index 0000000..f64bee5
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-thumb-icon.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-thumb-up-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-thumb-up-skin.png
new file mode 100644
index 0000000..92c8619
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-thumb-up-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-track-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-track-skin.png
new file mode 100644
index 0000000..30b62a3
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vertical-scroll-bar-track-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-thumb-disabled-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-thumb-disabled-skin.png
new file mode 100644
index 0000000..4bd4a78
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-thumb-disabled-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-thumb-down-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-thumb-down-skin.png
new file mode 100644
index 0000000..472a747
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-thumb-down-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-thumb-hover-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-thumb-hover-skin.png
new file mode 100644
index 0000000..b1247c2
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-thumb-hover-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-thumb-up-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-thumb-up-skin.png
new file mode 100644
index 0000000..3500066
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-thumb-up-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-track-skin.png b/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-track-skin.png
new file mode 100644
index 0000000..050a9c0
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/images/aeon/vslider-track-skin.png differ
diff --git a/SkeletonAnimationLibraryDemos/assets/particles/particle.pex b/SkeletonAnimationLibraryDemos/assets/particles/particle.pex
new file mode 100644
index 0000000..763c2bf
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/assets/particles/particle.pex
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SkeletonAnimationLibraryDemos/assets/particles/texture.png b/SkeletonAnimationLibraryDemos/assets/particles/texture.png
new file mode 100644
index 0000000..b5f5e13
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/assets/particles/texture.png differ
diff --git a/SkeletonAnimationLibraryDemos/libs/feathers.swc b/SkeletonAnimationLibraryDemos/libs/feathers.swc
new file mode 100644
index 0000000..3c0380a
Binary files /dev/null and b/SkeletonAnimationLibraryDemos/libs/feathers.swc differ
diff --git a/SkeletonAnimationLibraryDemos/src/Dragon_ChaseStarling.as b/SkeletonAnimationLibraryDemos/src/Dragon_ChaseStarling.as
index e6a70e8..802808c 100644
--- a/SkeletonAnimationLibraryDemos/src/Dragon_ChaseStarling.as
+++ b/SkeletonAnimationLibraryDemos/src/Dragon_ChaseStarling.as
@@ -97,11 +97,16 @@
private function onMouseMoveHandler(_e:TouchEvent):void
{
- var _p:Point = _e.getTouch(stage).getLocation(stage);
- mouseX = _p.x;
- mouseY = _p.y;
- starlingBird.x=mouseX-73;
- starlingBird.y=mouseY-73;
+ try
+ {
+ var _p:Point = _e.getTouch(stage).getLocation(stage);
+ mouseX = _p.x;
+ mouseY = _p.y;
+ starlingBird.x=mouseX-73;
+ starlingBird.y=mouseY-73;
+ }
+ catch(e:Error)
+ {}
}
private function updateBehavior(dir:int):void
{
diff --git a/SkeletonAnimationLibraryDemos/src/Example_Animation.as b/SkeletonAnimationLibraryDemos/src/Example_AnimationCopy.as
similarity index 96%
rename from SkeletonAnimationLibraryDemos/src/Example_Animation.as
rename to SkeletonAnimationLibraryDemos/src/Example_AnimationCopy.as
index 445abcb..2bcdb15 100644
--- a/SkeletonAnimationLibraryDemos/src/Example_Animation.as
+++ b/SkeletonAnimationLibraryDemos/src/Example_AnimationCopy.as
@@ -5,9 +5,9 @@
import starling.core.Starling;
[SWF(width="800", height="600", frameRate="30", backgroundColor="#cccccc")]
- public class Example_Animation extends flash.display.Sprite {
+ public class Example_AnimationCopy extends flash.display.Sprite {
- public function Example_Animation() {
+ public function Example_AnimationCopy() {
stage.addEventListener(MouseEvent.CLICK, mouseHandler);
starlingInit();
}
diff --git a/SkeletonAnimationLibraryDemos/src/Example_Cyborg_AnimationMixing.as b/SkeletonAnimationLibraryDemos/src/Example_Cyborg_AnimationMixing.as
new file mode 100644
index 0000000..b12dad8
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/src/Example_Cyborg_AnimationMixing.as
@@ -0,0 +1,362 @@
+package
+{
+ import flash.display.Sprite;
+
+ import starling.core.Starling;
+
+ [SWF(width="800", height="600", frameRate="60", backgroundColor="#cccccc")]
+ public class Example_Cyborg_AnimationMixing extends flash.display.Sprite
+ {
+
+ public function Example_Cyborg_AnimationMixing()
+ {
+ starlingInit();
+ }
+
+ private function starlingInit():void
+ {
+ var starling:Starling = new Starling(StarlingGame, stage);
+ starling.showStats = true;
+ starling.start();
+ }
+ }
+}
+
+import flash.geom.Point;
+import flash.events.Event;
+
+import starling.display.Sprite;
+import starling.events.EnterFrameEvent;
+import starling.events.TouchEvent;
+import starling.events.KeyboardEvent;
+import starling.text.TextField;
+
+import dragonBones.Armature;
+import dragonBones.Bone;
+import dragonBones.animation.WorldClock;
+import dragonBones.factorys.StarlingFactory;
+
+import dragonBones.events.AnimationEvent;
+
+class StarlingGame extends Sprite
+{
+ [Embed(source = "../assets/Cyborg_AnimationMixing.dbswf", mimeType = "application/octet-stream")]
+ private static const ResourcesData:Class;
+
+ private static const WEAPON_ANIMATION_GROUP:String = "weaponAnimationGroup";
+
+ private var _textField:TextField;
+ private var _factory:StarlingFactory;
+ private var _armature:Armature;
+ private var _armatureDisplay:Sprite;
+
+ private var _body:Bone;
+ private var _chest:Bone;
+ private var _head:Bone;
+ private var _armR:Bone;
+ private var _armL:Bone;
+ private var _weapon:Bone;
+
+ private var _left:Boolean;
+ private var _right:Boolean;
+
+ private var _mouseX:Number = 0;
+ private var _mouseY:Number = 0;
+ private var _isJumping:Boolean;
+ private var _isSquat:Boolean;
+ private var _moveDir:int;
+ private var _face:int;
+
+ private var _weaponID:int = -1;
+
+ private var _speedX:Number = 0;
+ private var _speedY:Number = 0;
+
+ public function StarlingGame()
+ {
+ _factory = new StarlingFactory();
+ _factory.parseData(new ResourcesData());
+ _factory.addEventListener(Event.COMPLETE, textureCompleteHandler);
+ }
+
+ private function textureCompleteHandler(e:Event):void
+ {
+ _armature = _factory.buildArmature("cyborg");
+ _body = _armature.getBone("body");
+ _chest = _armature.getBone("chest");
+ _head = _armature.getBone("head");
+ _armR = _armature.getBone("upperarmR");
+ _armL = _armature.getBone("upperarmL");
+ _weapon = _armature.getBone("weapon");
+
+ _armatureDisplay = _armature.display as Sprite;
+ _armatureDisplay.x = 400;
+ _armatureDisplay.y = 500;
+
+ WorldClock.clock.add(_armature);
+
+ changeWeapon();
+
+ _textField = new TextField(700, 30, "Press W/A/S/D to move. Press SPACE to switch weapens. Move mouse to aim.", "Verdana", 16, 0, true)
+ _textField.x = 60;
+ _textField.y = 5;
+
+ this.addChild(_armatureDisplay);
+ this.addChild(_textField);
+ this.addEventListener(EnterFrameEvent.ENTER_FRAME, onEnterFrameHandler);
+ this.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyEventHandler);
+ this.stage.addEventListener(KeyboardEvent.KEY_UP, onKeyEventHandler);
+ }
+
+ private function onKeyEventHandler(e:KeyboardEvent):void
+ {
+ switch (e.keyCode)
+ {
+ case 37 :
+ case 65 :
+ _left = e.type == KeyboardEvent.KEY_DOWN;
+ updateMove(-1);
+ break;
+ case 39 :
+ case 68 :
+ _right = e.type == KeyboardEvent.KEY_DOWN;
+ updateMove(1);
+ break;
+ case 38 :
+ case 87 :
+ if(e.type == KeyboardEvent.KEY_DOWN)
+ {
+ jump();
+ }
+ break;
+ case 83 :
+ case 40 :
+ squat(e.type == KeyboardEvent.KEY_DOWN);
+ break;
+ case 32 :
+ if(e.type == KeyboardEvent.KEY_UP)
+ {
+ changeWeapon();
+ }
+ break;
+ }
+ }
+
+ private function updateMove(dir:int):void
+ {
+ if(_left && _right)
+ {
+ move(dir);
+ }
+ else if(_left)
+ {
+ move(-1);
+ }
+ else if(_right)
+ {
+ move(1);
+ }
+ else
+ {
+ move(0);
+ }
+ }
+
+ private function onMouseMoveHandler(e:TouchEvent):void
+ {
+ try
+ {
+ var p:Point = e.getTouch(stage).getLocation(stage);
+ _mouseX = p.x;
+ _mouseY = p.y;
+ }
+ catch(e:Error)
+ {
+ }
+ }
+
+ private function onEnterFrameHandler(e:EnterFrameEvent):void
+ {
+ if(stage && !stage.hasEventListener(TouchEvent.TOUCH))
+ {
+ stage.addEventListener(TouchEvent.TOUCH, onMouseMoveHandler);
+ }
+ updateSpeed();
+ updateWeapon();
+ WorldClock.clock.advanceTime(-1);
+ }
+
+ private function move(dir:int):void
+ {
+ if(_moveDir == dir)
+ {
+ return;
+ }
+ _moveDir = dir;
+ updateMovement();
+ }
+
+ private function jump():void
+ {
+ if(_isJumping)
+ {
+ return;
+ }
+ _speedY = -15;
+ _isJumping = true;
+ _armature.animation.gotoAndPlay("jump");
+ }
+
+ private function squat(isDown:Boolean):void
+ {
+ if(_isSquat == isDown)
+ {
+ return;
+ }
+ _isSquat = isDown;
+ updateMovement();
+ }
+
+ private function changeWeapon():void
+ {
+ _weaponID ++;
+ if(_weaponID >= 4)
+ {
+ _weaponID -= 4;
+ }
+
+ var animationName:String = "weapon" + (_weaponID + 1);
+
+ //Animation Mixing
+ _armature.animation.gotoAndPlay(animationName, -1, -1, NaN, 0, WEAPON_ANIMATION_GROUP, "sameGroup");
+
+ _weapon.displayController = animationName;
+ }
+
+ private function updateMovement():void
+ {
+ if(_isJumping)
+ {
+ return;
+ }
+
+ if(_isSquat)
+ {
+ _speedX = 0;
+ _armature.animation.gotoAndPlay("squat");
+ return;
+ }
+
+ if(_moveDir == 0)
+ {
+ _speedX = 0;
+ _armature.animation.gotoAndPlay("stand");
+ }
+ else
+ {
+ if(_moveDir * _face > 0)
+ {
+ _speedX = 4* _face;
+ _armature.animation.gotoAndPlay("run");
+ }
+ else
+ {
+ _speedX = -3 * _face;
+ _armature.animation.gotoAndPlay("runBack");
+ }
+ }
+ }
+
+ private function updateSpeed():void
+ {
+ if(_isJumping)
+ {
+ if(_speedY <= 0 && _speedY + 0.5 > 0 )
+ {
+ _armature.animation.gotoAndPlay("fall");
+ }
+ _speedY += 0.5;
+ }
+ if(_speedX != 0)
+ {
+ _armatureDisplay.x += _speedX;
+ if(_armatureDisplay.x < 0)
+ {
+ _armatureDisplay.x = 0;
+ }
+ else if(_armatureDisplay.x > 800)
+ {
+ _armatureDisplay.x = 800;
+ }
+ }
+ if(_speedY != 0)
+ {
+ _armatureDisplay.y += _speedY;
+ if(_armatureDisplay.y > 500)
+ {
+ _armatureDisplay.y = 500;
+ _isJumping = false;
+ _speedY = 0;
+ _speedX = 0;
+ _armature.animation.gotoAndPlay("fallEnd");
+ _armature.addEventListener(AnimationEvent.MOVEMENT_CHANGE, armatureMovementChangeHandler);
+ }
+ }
+ }
+
+ private function armatureMovementChangeHandler(e:AnimationEvent):void
+ {
+ switch(e.movementID)
+ {
+ case "stand":
+ _armature.removeEventListener(AnimationEvent.MOVEMENT_CHANGE, armatureMovementChangeHandler);
+ updateMovement();
+ break;
+ }
+ }
+
+ private function updateWeapon():void
+ {
+ _face = _mouseX > _armatureDisplay.x?1: -1;
+ if(_armatureDisplay.scaleX * _face < 0)
+ {
+ _armatureDisplay.scaleX *= -1;
+ updateMovement();
+ }
+
+ var r:Number;
+ if(_face>0)
+ {
+ r = Math.atan2(_mouseY - _armatureDisplay.y, _mouseX - _armatureDisplay.x);
+ }
+ else
+ {
+ r = Math.PI - Math.atan2(_mouseY - _armatureDisplay.y, _mouseX - _armatureDisplay.x);
+ if(r > Math.PI)
+ {
+ r -= Math.PI * 2;
+ }
+ }
+
+ _body.node.rotation = r * 0.25;
+ _chest.node.rotation = r * 0.25;
+ if(r > 0)
+ {
+ _head.node.rotation = r * 0.2;
+ }
+ else
+ {
+ _head.node.rotation = r * 0.4;
+ }
+
+ _armR.node.rotation = r * 0.5;
+ if(r > 0)
+ {
+ _armL.node.rotation = r * 0.8;
+ }
+ else
+ {
+ _armL.node.rotation = r * 0.6;
+ }
+ }
+}
\ No newline at end of file
diff --git a/SkeletonAnimationLibraryDemos/src/Example_Cyborg_SwitchWeapon.as b/SkeletonAnimationLibraryDemos/src/Example_Cyborg_SwitchWeapon.as
index f3796eb..e6cecf0 100644
--- a/SkeletonAnimationLibraryDemos/src/Example_Cyborg_SwitchWeapon.as
+++ b/SkeletonAnimationLibraryDemos/src/Example_Cyborg_SwitchWeapon.as
@@ -119,9 +119,14 @@ class StarlingGame extends Sprite {
}
private function onMouseMoveHandler(_e:TouchEvent):void {
- var _p:Point = _e.getTouch(stage).getLocation(stage);
- mouseX = _p.x;
- mouseY = _p.y;
+ try
+ {
+ var _p:Point = _e.getTouch(stage).getLocation(stage);
+ mouseX = _p.x;
+ mouseY = _p.y;
+ }
+ catch(e:Error)
+ {}
}
private function onEnterFrameHandler(_e:EnterFrameEvent):void {
@@ -247,8 +252,8 @@ class StarlingGame extends Sprite {
private function updateWeapon():void {
face = mouseX > armatureClip.x?1: -1;
- if (armatureClip.scaleX != face) {
- armatureClip.scaleX = face;
+ if (armatureClip.scaleX * face < 0) {
+ armatureClip.scaleX *= -1;
updateMovement();
}
diff --git a/SkeletonAnimationLibraryDemos/src/Example_DisplayListAndStarling.as b/SkeletonAnimationLibraryDemos/src/Example_DisplayListAndStarling.as
index 17a58cf..be85ecf 100644
--- a/SkeletonAnimationLibraryDemos/src/Example_DisplayListAndStarling.as
+++ b/SkeletonAnimationLibraryDemos/src/Example_DisplayListAndStarling.as
@@ -4,7 +4,7 @@
import dragonBones.Armature;
import dragonBones.animation.WorldClock;
- import dragonBones.factorys.BaseFactory;
+ import dragonBones.factorys.NativeFactory;
import starling.core.Starling;
@@ -21,11 +21,11 @@
starlingInit();
}
- private var factory:BaseFactory;
+ private var factory:NativeFactory;
private var knight:Armature;
private var cyborg:Armature;
private function baseInit():void {
- factory = new BaseFactory();
+ factory = new NativeFactory();
factory.addEventListener(Event.COMPLETE, textureCompleteHandler);
factory.parseData(new KnightData());
diff --git a/SkeletonAnimationLibraryDemos/src/Example_Dragon_DemoEntry.as b/SkeletonAnimationLibraryDemos/src/Example_Dragon_DemoEntry.as
index d7c7b73..730e018 100644
--- a/SkeletonAnimationLibraryDemos/src/Example_Dragon_DemoEntry.as
+++ b/SkeletonAnimationLibraryDemos/src/Example_Dragon_DemoEntry.as
@@ -10,8 +10,8 @@
{
public function Example_Dragon_DemoEntry()
{
- //var _starling:Starling = new Starling(Dragon_SwitchClothes, stage);
- var _starling:Starling = new Starling(Dragon_ChaseStarling, stage);
+ var _starling:Starling = new Starling(Dragon_SwitchClothes, stage);
+ //var _starling:Starling = new Starling(Dragon_ChaseStarling, stage);
//_starling.antiAliasing = 1;
_starling.showStats = true;
diff --git a/SkeletonAnimationLibraryDemos/src/Example_Knight_TimelineEvent.as b/SkeletonAnimationLibraryDemos/src/Example_Knight_TimelineEvent.as
index 67d3113..d588f69 100644
--- a/SkeletonAnimationLibraryDemos/src/Example_Knight_TimelineEvent.as
+++ b/SkeletonAnimationLibraryDemos/src/Example_Knight_TimelineEvent.as
@@ -1,27 +1,30 @@
-package {
+package
+{
import flash.display.Sprite;
import starling.core.Starling;
[SWF(width="800", height="600", frameRate="60", backgroundColor="#cccccc")]
- public class Example_Knight_TimelineEvent extends flash.display.Sprite {
-
- public function Example_Knight_TimelineEvent() {
+ public class Example_Knight_TimelineEvent extends flash.display.Sprite
+ {
+ public function Example_Knight_TimelineEvent()
+ {
starlingInit();
}
- private function starlingInit():void {
- var _starling:Starling = new Starling(StarlingGame, stage);
- //_starling.antiAliasing = 1;
- _starling.showStats = true;
- _starling.start();
+ private function starlingInit():void
+ {
+ var starling:Starling = new Starling(StarlingGame, stage);
+ starling.showStats = true;
+ starling.start();
}
}
}
import flash.geom.Point;
-import flash.events.Event;
+import starling.core.Starling;
+import starling.textures.Texture;
import starling.display.Image;
import starling.display.Sprite;
import starling.events.EnterFrameEvent;
@@ -29,95 +32,162 @@ import starling.events.KeyboardEvent;
import starling.events.TouchEvent;
import starling.events.Touch;
import starling.events.TouchPhase;
+import starling.events.Event;
import starling.text.TextField;
+import starling.extensions.PDParticleSystem;
+
import dragonBones.Armature;
import dragonBones.Bone;
+import dragonBones.Slot;
import dragonBones.animation.WorldClock;
import dragonBones.factorys.StarlingFactory;
+import dragonBones.objects.DataParser;
+import dragonBones.objects.SkeletonData;
+import dragonBones.textures.StarlingTextureAtlas;
+
+import dragonBones.display.StarlingDisplayBridge;
import dragonBones.events.AnimationEvent;
import dragonBones.events.FrameEvent;
-class StarlingGame extends Sprite {
- [Embed(source = "../assets/Knight_output.swf", mimeType = "application/octet-stream")]
- public static const ResourcesData:Class;
-
- private var factory:StarlingFactory;
- private var armature:Armature;
- private var armatureDisplay:Sprite;
+class StarlingGame extends Sprite
+{
+ [Embed(source = "../assets/Knight/skeleton.json", mimeType = "application/octet-stream")]
+ public static const SkeletonJSONData:Class;
+
+ [Embed(source = "../assets/Knight/texture.png")]
+ public static const TextureData:Class;
+
+ [Embed(source = "../assets/Knight/texture.json", mimeType = "application/octet-stream")]
+ public static const TextureJSONData:Class;
- private var arm:Bone;
+ [Embed(source = "../assets/particles/particle.pex", mimeType = "application/octet-stream")]
+ private static const ParticleCFG:Class;
+
+ [Embed(source = "../assets/particles/texture.png")]
+ private static const ParticleImage:Class;
+
+ private var _factory:StarlingFactory;
+ private var _armature:Armature;
+ private var _armatureDisplay:Sprite;
- private var textField:TextField;
+ private var _arm:Bone;
+
+ private var _textField:TextField;
- public function StarlingGame() {
- factory = new StarlingFactory();
- factory.parseData(new ResourcesData());
- factory.addEventListener(Event.COMPLETE, textureCompleteHandler);
+ public function StarlingGame()
+ {
+ _factory = new StarlingFactory();
+
+ var skeletonData:SkeletonData = DataParser.parseData(JSON.parse(new SkeletonJSONData()));
+ _factory.addSkeletonData(skeletonData, "knightSkeleton");
+
+ var textureAtlas:StarlingTextureAtlas = new StarlingTextureAtlas(
+ Texture.fromBitmapData(new TextureData().bitmapData, false, false, 1),
+ JSON.parse(new TextureJSONData())
+ );
+ _factory.addTextureAtlas(textureAtlas, "knightSkeleton");
+
+ this.addEventListener(Event.ADDED_TO_STAGE, addToStageHandler);
}
-
- private function textureCompleteHandler(e:Event):void {
- armature = factory.buildArmature("knight");
- armatureDisplay = armature.display as Sprite;
- armatureDisplay.x = 400;
- armatureDisplay.y = 400;
- addChild(armatureDisplay);
+
+ private function addToStageHandler(e:Event):void
+ {
+ _armature = _factory.buildArmature("knight");
+ _armatureDisplay = _armature.display as Sprite;
+ _armatureDisplay.x = 400;
+ _armatureDisplay.y = 400;
- WorldClock.clock.add(armature);
+ this.addChild(_armatureDisplay);
+ WorldClock.clock.add(_armature);
updateMovement();
- arm = armature.getBone("armOutside");
- arm.childArmature.addEventListener(AnimationEvent.MOVEMENT_CHANGE, armMovementHandler);
- arm.childArmature.addEventListener(AnimationEvent.COMPLETE, armMovementHandler);
- arm.childArmature.addEventListener(FrameEvent.MOVEMENT_FRAME_EVENT, armFrameEventHandler);
+ _arm = _armature.getBone("armOutside");
+ _arm.childArmature.addEventListener(AnimationEvent.MOVEMENT_CHANGE, armMovementHandler);
+ _arm.childArmature.addEventListener(AnimationEvent.COMPLETE, armMovementHandler);
+ _arm.childArmature.addEventListener(FrameEvent.MOVEMENT_FRAME_EVENT, armFrameEventHandler);
- addEventListener(EnterFrameEvent.ENTER_FRAME, onEnterFrameHandler);
+ initParticles();
+
+ this.addEventListener(EnterFrameEvent.ENTER_FRAME, enterFrameHandler);
- stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyEventHandler);
- stage.addEventListener(KeyboardEvent.KEY_UP, onKeyEventHandler);
- stage.addEventListener(TouchEvent.TOUCH, onTouch);
+ stage.addEventListener(KeyboardEvent.KEY_DOWN, keyEventHandler);
+ stage.addEventListener(KeyboardEvent.KEY_UP, keyEventHandler);
+ stage.addEventListener(TouchEvent.TOUCH, touchHandler);
+
+ _textField = new TextField(700, 30, "Press W/A/D to move. Press S to upgrade weapon.\nPress SPACE to switch weapens. Click mouse to attack.", "Verdana", 16, 0, true)
+ _textField.height = 40;
+ _textField.x = 60;
+ _textField.y = 5;
+ this.addChild(_textField);
+ }
+
+ private function initParticles():void
+ {
+ var horseHead:Bone = _armature.getBone("horseHead");
+ var horseEye:Bone = horseHead.childArmature.getBone("eye");
- textField = new TextField(700, 30, "Press W/A/D to move. Press SPACE to switch weapens. Click mouse to attack.", "Verdana", 16, 0, true)
- textField.x = 60;
- textField.y = 5;
- addChild(textField);
+ var exhaust:PDParticleSystem = new PDParticleSystem(new XML(new ParticleCFG()), Texture.fromBitmap(new ParticleImage()));
+ var particle:Slot = new Slot(new StarlingDisplayBridge());
+ particle.fixedRotation = true;
+ particle.display = exhaust;
+ particle.origin.x = horseEye.global.x;
+ particle.origin.y = horseEye.global.y;
+
+ particle.zOrder = 100;
+
+ horseHead.addChild(particle);
+ exhaust.start();
+ Starling.juggler.add(exhaust);
}
- private function onEnterFrameHandler(_e:EnterFrameEvent):void {
+ private function enterFrameHandler(e:EnterFrameEvent):void
+ {
updateSpeed();
WorldClock.clock.advanceTime(-1);
updateArrows();
}
- private function onKeyEventHandler(e:KeyboardEvent):void {
- switch (e.keyCode) {
+ private function keyEventHandler(e:KeyboardEvent):void
+ {
+ switch (e.keyCode)
+ {
case 37 :
case 65 :
- left = e.type == KeyboardEvent.KEY_DOWN;
+ _isLeftDown = e.type == KeyboardEvent.KEY_DOWN;
move(-1);
break;
case 39 :
case 68 :
- right = e.type == KeyboardEvent.KEY_DOWN;
+ _isRightDown = e.type == KeyboardEvent.KEY_DOWN;
move(1);
break;
case 38 :
case 87 :
- if (e.type == KeyboardEvent.KEY_DOWN) {
+ if (e.type == KeyboardEvent.KEY_DOWN)
+ {
jump();
}
break;
+ case 83 :
+ case 40 :
+ if (e.type == KeyboardEvent.KEY_DOWN)
+ {
+ upgradeWeapon();
+ }
+ break;
case 32 :
- if (e.type == KeyboardEvent.KEY_UP) {
+ if (e.type == KeyboardEvent.KEY_UP)
+ {
changeWeapon();
}
break;
}
}
- private function onTouch(event:TouchEvent):void
+ private function touchHandler(event:TouchEvent):void
{
var touch:Touch = event.getTouch(stage);
if(touch)
@@ -129,67 +199,127 @@ class StarlingGame extends Sprite {
}
}
- private var isJumping:Boolean;
- private var left:Boolean;
- private var right:Boolean;
- private var moveDir:int;
-
- private var speedX:Number = 0;
- private var speedY:Number = 0;
-
- public function move(_dir:int):void {
- if (left && right) {
- }else if (left){
- _dir = -1;
- }else if (right){
- _dir = 1;
- }else {
- _dir = 0;
+ private var _isJumping:Boolean;
+ private var _isLeftDown:Boolean;
+ private var _isRightDown:Boolean;
+ private var _moveDir:int;
+
+ private var _speedX:Number = 0;
+ private var _speedY:Number = 0;
+
+ private function move(dir:int):void
+ {
+ if (_isLeftDown && _isRightDown)
+ {
+ }
+ else if (_isLeftDown)
+ {
+ dir = -1;
+ }
+ else if (_isRightDown)
+ {
+ dir = 1;
+ }
+ else
+ {
+ dir = 0;
}
- if (moveDir == _dir) {
+ if (_moveDir == dir)
+ {
return;
}
- moveDir = _dir;
+ _moveDir = dir;
updateMovement();
}
- public function jump():void {
- if (isJumping) {
+ private function jump():void
+ {
+ if (_isJumping)
+ {
return;
}
- speedY = -15;
- isJumping = true;
- armature.animation.gotoAndPlay("jump");
+ _speedY = -15;
+ _isJumping = true;
+ _armature.animation.gotoAndPlay("jump");
}
-
- private var weaponID:int = 0;
- private const weaponNames:Array = ["sword", "pike", "axe", "bow"];
- public function changeWeapon():void {
- weaponID ++;
- if (weaponID >= 4) {
- weaponID -= 4;
+
+ private const SWORD:String = "sword";
+ private const PIKE:String = "pike";
+ private const AXE:String = "axe";
+ private const BOW:String = "bow";
+ private const WEAPON_NAMES:Array = [SWORD, PIKE, AXE, BOW];
+ private var _weaponID:int = 0;
+ private function changeWeapon():void
+ {
+ _weaponID ++;
+ if (_weaponID >= 4)
+ {
+ _weaponID -= 4;
}
- var _weaponName:String = weaponNames[weaponID];
- var _movementName:String = "ready_" + _weaponName;
+ var weaponName:String = WEAPON_NAMES[_weaponID];
+ var movementName:String = "ready_" + weaponName;
- arm.childArmature.animation.gotoAndPlay(_movementName);
+ _arm.childArmature.animation.gotoAndPlay(movementName);
}
+ private var _weaponLevels:Vector. = new [0, 0, 0, 0];
+ private function upgradeWeapon():void
+ {
+ var weaponLevel:int = _weaponLevels[_weaponID];
+ weaponLevel ++;
+ if (weaponLevel >= 3)
+ {
+ weaponLevel -= 3;
+ }
+ _weaponLevels[_weaponID] = weaponLevel;
+
+ var weaponName:String = WEAPON_NAMES[_weaponID];
+ switch(weaponName)
+ {
+ case SWORD:
+ case PIKE:
+ case AXE:
+ var weapon:Bone = _arm.childArmature.getBone("weapon");
+
+ weapon.display.dispose();
+ weapon.display = _factory.getTextureDisplay("knightFolder/" + weaponName + "_" + (weaponLevel + 1)) as Image;
+ break;
+ case BOW:
+ var bow:Bone = _arm.childArmature.getBone("bow");
+
+ var bowBA:Bone = bow.childArmature.getBone("ba");
+ var bowBB:Bone = bow.childArmature.getBone("bb");
+ var bowArrow:Bone = bow.childArmature.getBone("arrow");
+ var bowArrowB:Bone = bow.childArmature.getBone("arrowBackup");
+
+ bowBA.display.dispose();
+ bowBB.display.dispose();
+ bowArrow.display.dispose();
+ bowArrowB.display.dispose();
+ bowBA.display = _factory.getTextureDisplay("knightFolder/" + weaponName + "_" + (weaponLevel + 1)) as Image;
+ bowBB.display = _factory.getTextureDisplay("knightFolder/" + weaponName + "_" + (weaponLevel + 1)) as Image;
+ bowArrow.display = _factory.getTextureDisplay("knightFolder/arrow_" + (weaponLevel + 1)) as Image;
+ bowArrowB.display = _factory.getTextureDisplay("knightFolder/arrow_" + (weaponLevel + 1)) as Image;
+ break;
+ }
+ }
- private var isAttacking:Boolean;
- private var isComboAttack:Boolean;
- private var hitCount:uint = 1;
- public function attack():void {
- if (isAttacking) {
+ private var _isAttacking:Boolean;
+ private var _isComboAttack:Boolean;
+ private var _hitCount:uint = 1;
+ private function attack():void
+ {
+ if (_isAttacking)
+ {
return;
}
- isAttacking = true;
- var _weaponName:String = weaponNames[weaponID];
- var _movementName:String = "attack_" + _weaponName + "_" + hitCount;
+ _isAttacking = true;
+ var weaponName:String = WEAPON_NAMES[_weaponID];
+ var movementName:String = "attack_" + weaponName + "_" + _hitCount;
- arm.childArmature.animation.gotoAndPlay(_movementName);
+ _arm.childArmature.animation.gotoAndPlay(movementName);
}
private function armMovementHandler(e:AnimationEvent):void
@@ -197,20 +327,20 @@ class StarlingGame extends Sprite {
switch(e.type)
{
case AnimationEvent.MOVEMENT_CHANGE:
- isComboAttack = false;
+ _isComboAttack = false;
break;
case AnimationEvent.COMPLETE:
- if(isComboAttack)
+ if(_isComboAttack)
{
- var _weaponName:String = weaponNames[weaponID];
- var _movementName:String = "ready_" + _weaponName;
- arm.childArmature.animation.gotoAndPlay(_movementName);
+ var weaponName:String = WEAPON_NAMES[_weaponID];
+ var movementName:String = "ready_" + weaponName;
+ _arm.childArmature.animation.gotoAndPlay(movementName);
}
else
{
- isAttacking = false;
- hitCount = 1;
- isComboAttack = false;
+ _isAttacking = false;
+ _hitCount = 1;
+ _isComboAttack = false;
}
break;
}
@@ -221,99 +351,131 @@ class StarlingGame extends Sprite {
switch(e.frameLabel)
{
case "fire":
- createArrow();
+ var bow:Bone = _arm.childArmature.getBone("bow");
+ bow.display.localToGlobal(_localPoint, _resultPoint);
+ if (_armatureDisplay.scaleX > 0)
+ {
+ var r:Number = _armatureDisplay.rotation + bow.global.rotation;
+ }
+ else
+ {
+ r = _armatureDisplay.rotation - bow.global.rotation + Math.PI;
+ }
+
+ switch(_weaponLevels[_weaponID])
+ {
+ case 0:
+ createArrow(r, _resultPoint);
+ break;
+ case 1:
+ createArrow(3 / 180 * Math.PI + r, _resultPoint);
+ createArrow(-3 / 180 * Math.PI+ r, _resultPoint);
+ break;
+ case 2:
+ createArrow(6 / 180 * Math.PI + r, _resultPoint);
+ createArrow(r, _resultPoint);
+ createArrow(-6 / 180 * Math.PI + r, _resultPoint);
+ break;
+ }
+
trace("frameEvent:" + e.frameLabel);
break;
case "ready":
- isAttacking = false;
- isComboAttack = true;
- hitCount ++;
+ _isAttacking = false;
+ _isComboAttack = true;
+ _hitCount ++;
break;
}
}
- private var arrows:Array = [];
- private var localPoint:Point = new Point();
- private var resultPoint:Point = new Point();
- private function createArrow():void {
-
- var _arrowDisplay:Image = factory.getTextureDisplay("knightFolder/arrow_1") as Image;
- var _bow:Bone = arm.childArmature.getBone("bow");
- _bow.display.localToGlobal(localPoint, resultPoint);
-
- var _r:Number;
- if (armatureDisplay.scaleX > 0) {
- _r = armatureDisplay.rotation + _bow.global.rotation;
- }else {
- _r = armatureDisplay.rotation - _bow.global.rotation + Math.PI;
- }
-
- _arrowDisplay.x = resultPoint.x;
- _arrowDisplay.y = resultPoint.y;
- _arrowDisplay.rotation = _r;
-
- var _vx:Number = Math.cos(_r) * 36;
- var _vy:Number = Math.sin(_r) * 36;
- var _arrow:Object = { display:_arrowDisplay, vx:_vx, vy:_vy };
- arrows.push(_arrow);
- addChild(_arrowDisplay);
+ private var _arrows:Array = [];
+ private var _localPoint:Point = new Point();
+ private var _resultPoint:Point = new Point();
+ private function createArrow(r:Number, point:Point):void
+ {
+ var arrowDisplay:Image = _factory.getTextureDisplay("knightFolder/arrow_1") as Image;
+ arrowDisplay.x = point.x;
+ arrowDisplay.y = point.y;
+ arrowDisplay.rotation = r;
+
+ var vx:Number = Math.cos(r) * 36;
+ var vy:Number = Math.sin(r) * 36;
+ var arrow:Object = { display:arrowDisplay, vx:vx, vy:vy };
+ _arrows.push(arrow);
+ this.addChild(arrowDisplay);
}
- private function updateArrows():void {
- var _arrow:Object;
- var _length:uint = arrows.length;
- for (var _i:int = _length - 1; _i >= 0; _i --) {
- _arrow = arrows[_i];
- _arrow.vy += 1;
- _arrow.display.x += _arrow.vx;
- _arrow.display.y += _arrow.vy;
- _arrow.display.rotation = Math.atan2(_arrow.vy, _arrow.vx);
- if (_arrow.display.y > 850) {
- arrows.splice(_i, 1);
- removeChild(_arrow.display);
- _arrow.display.dispose();
- _arrow.display = null;
+ private function updateArrows():void
+ {
+ var arrow:Object;
+ var length:uint = _arrows.length;
+ for (var i:int = length - 1; i >= 0; i --)
+ {
+ arrow = _arrows[i];
+ arrow.vy += 1;
+ arrow.display.x += arrow.vx;
+ arrow.display.y += arrow.vy;
+ arrow.display.rotation = Math.atan2(arrow.vy, arrow.vx);
+ if (arrow.display.y > 850)
+ {
+ _arrows.splice(i, 1);
+ removeChild(arrow.display);
+ arrow.display.dispose();
+ arrow.display = null;
}
}
}
- private function updateMovement():void {
- if (isJumping) {
+ private function updateMovement():void
+ {
+ if (_isJumping)
+ {
return;
}
- if (moveDir == 0) {
- speedX = 0;
- armature.animation.gotoAndPlay("stand");
- }else {
- speedX = moveDir * 4;
- armature.animation.gotoAndPlay("run");
- armatureDisplay.scaleX = moveDir;
+ if (_moveDir == 0)
+ {
+ _speedX = 0;
+ _armature.animation.gotoAndPlay("stand");
+ }
+ else
+ {
+ _speedX = _moveDir * 4;
+ _armature.animation.gotoAndPlay("run");
+ _armatureDisplay.scaleX = _moveDir;
}
}
- private function updateSpeed():void {
- if (isJumping) {
- speedY += 0.6;
+ private function updateSpeed():void
+ {
+ if (_isJumping)
+ {
+ _speedY += 0.6;
}
- if (speedX != 0) {
- armatureDisplay.x += speedX;
- if (armatureDisplay.x < 0) {
- armatureDisplay.x = 0;
- }else if (armatureDisplay.x > 800) {
- armatureDisplay.x = 800;
+ if (_speedX != 0)
+ {
+ _armatureDisplay.x += _speedX;
+ if (_armatureDisplay.x < 0)
+ {
+ _armatureDisplay.x = 0;
+ }
+ else if (_armatureDisplay.x > 800)
+ {
+ _armatureDisplay.x = 800;
}
}
- if (speedY != 0) {
- armatureDisplay.rotation = speedY * 0.02 * armatureDisplay.scaleX;
- armatureDisplay.y += speedY;
- if (armatureDisplay.y > 400) {
- armatureDisplay.y = 400;
- isJumping = false;
- speedY = 0;
- armatureDisplay.rotation = 0;
+ if (_speedY != 0)
+ {
+ _armatureDisplay.rotation = _speedY * 0.02 * _armatureDisplay.scaleX;
+ _armatureDisplay.y += _speedY;
+ if (_armatureDisplay.y > 400)
+ {
+ _armatureDisplay.y = 400;
+ _isJumping = false;
+ _speedY = 0;
+ _armatureDisplay.rotation = 0;
updateMovement();
}
}
diff --git a/SkeletonAnimationLibraryDemos/src/Example_Robot_ChangeSpeed.as b/SkeletonAnimationLibraryDemos/src/Example_Robot_ChangeSpeed_BoneScale.as
similarity index 50%
rename from SkeletonAnimationLibraryDemos/src/Example_Robot_ChangeSpeed.as
rename to SkeletonAnimationLibraryDemos/src/Example_Robot_ChangeSpeed_BoneScale.as
index 6946f3d..7c77ac9 100644
--- a/SkeletonAnimationLibraryDemos/src/Example_Robot_ChangeSpeed.as
+++ b/SkeletonAnimationLibraryDemos/src/Example_Robot_ChangeSpeed_BoneScale.as
@@ -5,20 +5,16 @@
import starling.core.Starling;
[SWF(width="800", height="600", frameRate="30", backgroundColor="#cccccc")]
- public class Example_Robot_ChangeSpeed extends flash.display.Sprite {
+ public class Example_Robot_ChangeSpeed_BoneScale extends flash.display.Sprite {
- public function Example_Robot_ChangeSpeed() {
+ public function Example_Robot_ChangeSpeed_BoneScale() {
starlingInit();
- stage.addEventListener(MouseEvent.CLICK, mouseHandler);
stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseHandler);
}
private function mouseHandler(e:MouseEvent):void
{
switch(e.type) {
- case MouseEvent.CLICK:
- StarlingGame.instance.changeMovement();
- break;
case MouseEvent.MOUSE_WHEEL:
StarlingGame.instance.changeAnimationScale(e.delta > 0?1: -1);
break;
@@ -35,14 +31,22 @@
}
}
+import flash.events.Event;
+import flash.utils.Dictionary;
+
import starling.display.Sprite;
+import starling.events.Event;
import starling.events.EnterFrameEvent;
import starling.text.TextField;
+import feathers.controls.Slider;
+import feathers.controls.Button;
+import feathers.themes.AeonDesktopTheme;
+
import dragonBones.Armature;
+import dragonBones.Bone;
import dragonBones.animation.WorldClock;
import dragonBones.factorys.StarlingFactory;
-import flash.events.Event;
class StarlingGame extends Sprite {
[Embed(source = "../assets/Robot_output.swf", mimeType = "application/octet-stream")]
@@ -52,31 +56,37 @@ class StarlingGame extends Sprite {
private var factory:StarlingFactory;
private var armature:Armature;
+
private var textField:TextField;
public function StarlingGame() {
instance = this;
-
factory = new StarlingFactory();
+ //
+ factory.scaleForTexture = 2;
+
factory.parseData(new ResourcesData());
- factory.addEventListener(Event.COMPLETE, textureCompleteHandler);
+ factory.addEventListener(flash.events.Event.COMPLETE, textureCompleteHandler);
}
- private function textureCompleteHandler(e:Event):void {
+ private function textureCompleteHandler(_e:flash.events.Event):void {
armature = factory.buildArmature("robot");
var _display:Sprite = armature.display as Sprite;
_display.x = 400;
_display.y = 300;
+
addChild(_display);
armature.animation.gotoAndPlay("stop");
WorldClock.clock.add(armature);
addEventListener(EnterFrameEvent.ENTER_FRAME, onEnterFrameHandler);
- textField = new TextField(700, 30, "Click mouse to switch robot's postures. Scroll mouse wheel to change speed.", "Verdana", 16, 0, true);
+ textField = new TextField(700, 30, "Scroll mouse wheel to change speed.", "Verdana", 16, 0, true);
textField.x = 60;
textField.y = 5;
addChild(textField);
+
+ createUI();
}
public function changeMovement():void
@@ -99,7 +109,70 @@ class StarlingGame extends Sprite {
}
}
}
-
+
+ private function createUI():void
+ {
+ var _slidersDic:Dictionary = new Dictionary();
+ var _theme:AeonDesktopTheme = new AeonDesktopTheme(this.stage);
+
+ var _bones:Vector. = armature.getBones();
+ var _i:uint = 1;
+
+
+ this.addChild(createTextField((_bones[6] as Bone).name));
+ this.addChild(createSlider((_bones[6] as Bone).name));
+ _i++;
+ this.addChild(createTextField((_bones[11] as Bone).name));
+ this.addChild(createSlider((_bones[11] as Bone).name));
+ _i++;
+ this.addChild(createTextField((_bones[14] as Bone).name));
+ this.addChild(createSlider((_bones[14] as Bone).name));
+ _i++;
+ var _button:Button = new Button();
+ _button.x = 20;
+ _button.y = _i * 30;
+ _button.label = "Switch postures";
+ this.addChild(_button);
+
+ _button.addEventListener(starling.events.Event.TRIGGERED, buttonTriggeredHandler);
+
+
+ function createTextField(text:String):TextField
+ {
+ var textField:TextField = new TextField(70, 30, text, "Verdana", 10, 0, true);
+ textField.x = 10;
+ textField.y = _i*30;
+ return textField;
+ }
+
+ function createSlider(name:String):Slider
+ {
+ var _slider:Slider = new Slider();
+ _slider.minimum = 0.5;
+ _slider.maximum = 2;
+ _slider.step = 0.1;
+ _slider.value = 1;
+ _slider.liveDragging = true;
+ _slider.addEventListener(starling.events.Event.CHANGE, sliderChangeHandler);
+ _slider.x = 80;
+ _slider.y = _i * 30 + 15;
+ _slidersDic[_slider] = armature.getBone(name);
+ return _slider;
+ }
+
+ function sliderChangeHandler(_e:starling.events.Event):void
+ {
+ var _slider:Slider = _e.target as Slider;
+ var _bone:Bone = _slidersDic[_slider];
+ _bone.node.scaleX = _bone.node.scaleY = _slider.value;
+ }
+
+ function buttonTriggeredHandler(_e:starling.events.Event):void
+ {
+ changeMovement();
+ }
+ }
+
private function onEnterFrameHandler(_e:EnterFrameEvent):void {
WorldClock.clock.advanceTime(-1);
}
diff --git a/SkeletonAnimationLibraryDemos/src/Example_WarriorFight_ColorAndZOrder.as b/SkeletonAnimationLibraryDemos/src/Example_WarriorFight_ColorAndZOrder.as
index c84b20d..6587c6e 100644
--- a/SkeletonAnimationLibraryDemos/src/Example_WarriorFight_ColorAndZOrder.as
+++ b/SkeletonAnimationLibraryDemos/src/Example_WarriorFight_ColorAndZOrder.as
@@ -97,6 +97,8 @@ class StarlingGame extends Sprite {
textField.x = 75;
textField.y = 5;
addChild(textField);*/
+
+ this.alpha = 0.999999;
}
private function animationEventHandler(e:AnimationEvent):void
diff --git a/SkeletonAnimationLibraryDemos/src/Example_WarriorImitateRobot_AnimationCopy.as b/SkeletonAnimationLibraryDemos/src/Example_WarriorImitateRobot_AnimationCopy.as
index 458952f..511105a 100644
--- a/SkeletonAnimationLibraryDemos/src/Example_WarriorImitateRobot_AnimationCopy.as
+++ b/SkeletonAnimationLibraryDemos/src/Example_WarriorImitateRobot_AnimationCopy.as
@@ -79,7 +79,8 @@ class StarlingGame extends Sprite {
var textureAtlas:StarlingTextureAtlas = new StarlingTextureAtlas(
Texture.fromBitmapData(new WarriorTextureData().bitmapData, true, false, 0.5),
- XML(new WarriorTextureXMLData())
+ XML(new WarriorTextureXMLData()),
+ false
);
factory.addTextureAtlas(textureAtlas, "warriorData");
diff --git a/SkeletonAnimationLibraryDemos/src/Example_Warrior_MultiResolution.as b/SkeletonAnimationLibraryDemos/src/Example_Warrior_MultiResolution.as
index 6329f72..dbe2ab1 100644
--- a/SkeletonAnimationLibraryDemos/src/Example_Warrior_MultiResolution.as
+++ b/SkeletonAnimationLibraryDemos/src/Example_Warrior_MultiResolution.as
@@ -1,6 +1,8 @@
package {
import flash.display.Stage;
import flash.display.Sprite;
+ import flash.geom.Rectangle;
+
import flash.events.MouseEvent;
import starling.core.Starling;
@@ -8,9 +10,6 @@
[SWF(width="800", height="600", frameRate="60", backgroundColor="#cccccc")]
public class Example_Warrior_MultiResolution extends flash.display.Sprite
{
- [Embed(source = "../assets/Warrior_output/texture.png")]
- public static const WarriorTextureHDData:Class;
-
public var myStage:Stage;
public function Example_Warrior_MultiResolution()
{
@@ -29,8 +28,7 @@
private function starlingInit():void
{
- myStage = (stage!= null)? stage : this.parent.stage;
- var _starling:Starling = new Starling(StarlingGame, myStage);
+ var _starling:Starling = new Starling(StarlingGame, stage);
//_starling.antiAliasing = 1;
_starling.showStats = true;
_starling.start();
@@ -58,15 +56,21 @@ class StarlingGame extends Sprite {
[Embed(source = "../assets/Warrior_output/skeleton.xml", mimeType = "application/octet-stream")]
public static const WarriorSkeletonXMLData:Class;
+ [Embed(source = "../assets/Warrior_output/texture@2x.xml", mimeType = "application/octet-stream")]
+ public static const WarriorTextureHDXMLData:Class;
+
[Embed(source = "../assets/Warrior_output/texture.xml", mimeType = "application/octet-stream")]
- public static const WarriorTextureXMLData:Class;
+ public static const WarriorTextureSDXMLData:Class;
[Embed(source = "../assets/Warrior_output/texture@0.3x.xml", mimeType = "application/octet-stream")]
- public static const WarriorTextureXMLSD2Data:Class;
+ public static const WarriorTextureSD2XMLData:Class;
- [Embed(source = "../assets/Warrior_output/texture.png")]
+ [Embed(source = "../assets/Warrior_output/texture@2x.png")]
public static const WarriorTextureHDData:Class;
+ [Embed(source = "../assets/Warrior_output/texture.png")]
+ public static const WarriorTextureSDData:Class;
+
[Embed(source = "../assets/Warrior_output/texture@0.5x.png")]
public static const WarriorTextureSD1Data:Class;
@@ -93,54 +97,86 @@ class StarlingGame extends Sprite {
var textureAtlas:TextureAtlas;
- //HD
+ //contentScaleFactor == 2
+ //HD 2x(use different textureXML 2x)
+ //高清贴图,由面板导出时设置scale为2输出,textureXML与texture对应
textureAtlas = new StarlingTextureAtlas(
- Texture.fromBitmapData(new WarriorTextureHDData().bitmapData),
- XML(new WarriorTextureXMLData())
+ Texture.fromBitmapData(new WarriorTextureHDData().bitmapData, false, false, 2),
+ XML(new WarriorTextureHDXMLData()),
+ true
);
+ /*
+ textureAtlas = new TextureAtlas(
+ Texture.fromBitmapData(new WarriorTextureHDData().bitmapData, false, false, 2),
+ XML(new WarriorTextureHDXMLData())
+ );
+ */
factory.addTextureAtlas(textureAtlas, "warriorHD");
- //SD1 with same textureXML
+ //contentScaleFactor == 1
+ //SD 1x
+ //标准贴图,由面板导出时设置scale为1输出,textureXML与texture对应
textureAtlas = new StarlingTextureAtlas(
- Texture.fromBitmapData(new WarriorTextureSD1Data().bitmapData, true, false, 0.5),
- XML(new WarriorTextureXMLData())
+ Texture.fromBitmapData(new WarriorTextureSDData().bitmapData, false, false, 1),
+ XML(new WarriorTextureSDXMLData()),
+ false
);
- factory.addTextureAtlas(textureAtlas, "warriorSD1");
+ factory.addTextureAtlas(textureAtlas, "warriorSD");
- //SD2 with different textureXML
- /*
+ //contentScaleFactor == 0.5
+ //SD1 0.5x(use same textureXML 1x)
+ //缩放为0.5的贴图,由1x的texture缩放直接缩放得到,使用1x的textureXML
textureAtlas = new StarlingTextureAtlas(
- Texture.fromBitmapData(new WarriorTextureSD1Data().bitmapData, true, false, 0.5),
- XML(new WarriorTextureXMLData()),
- true
+ Texture.fromBitmapData(new WarriorTextureSD1Data().bitmapData, false, false, 0.5),
+ XML(new WarriorTextureSDXMLData()),
+ false
);
- */
+ factory.addTextureAtlas(textureAtlas, "warriorSD1");
+
+ //contentScaleFactor == 0.3
+ //SD2 0.3x(use different textureXML 0.3x)
+ //缩放为0.3的贴图,由面板导出时设置scale为0.3输出,textureXML与texture对应
+
+ /*textureAtlas = new StarlingTextureAtlas(
+ Texture.fromBitmapData(new WarriorTextureSD2Data().bitmapData, false, false, 0.3),
+ XML(new WarriorTextureSD2XMLData()),
+ true
+ );*/
textureAtlas = new TextureAtlas(
- Texture.fromBitmapData(new WarriorTextureSD2Data().bitmapData, true, false, 0.3),
- XML(new WarriorTextureXMLSD2Data())
+ Texture.fromBitmapData(new WarriorTextureSD2Data().bitmapData, false, false, 0.3),
+ XML(new WarriorTextureSD2XMLData())
);
+
factory.addTextureAtlas(textureAtlas, "warriorSD2");
//
var armature:Armature;
- armature = factory.buildArmature("warrior", null, "warrior", "warriorSD2");
- armature.display.x = 100;
+ armature = factory.buildArmature("warrior", null, "warrior", "warriorHD");
+ armature.display.x = 150;
armature.display.y = 300;
- armature.display.scaleX = armature.display.scaleY = 0.3;
+ //armature.display.scaleX = armature.display.scaleY = 0.3;
+ addChild(armature.display as Sprite);
+ WorldClock.clock.add(armature);
+ armatures.push(armature);
+
+ armature = factory.buildArmature("warrior", null, "warrior", "warriorSD");
+ armature.display.x = 300;
+ armature.display.y = 300;
+ //armature.display.scaleX = armature.display.scaleY = 0.3;
addChild(armature.display as Sprite);
WorldClock.clock.add(armature);
armatures.push(armature);
armature = factory.buildArmature("warrior", null, "warrior", "warriorSD1");
- armature.display.x = 270;
+ armature.display.x = 450;
armature.display.y = 300;
- armature.display.scaleX = armature.display.scaleY = 0.5;
+ //armature.display.scaleX = armature.display.scaleY = 0.5;
addChild(armature.display as Sprite);
WorldClock.clock.add(armature);
armatures.push(armature);
- armature = factory.buildArmature("warrior", null, "warrior", "warriorHD");
+ armature = factory.buildArmature("warrior", null, "warrior", "warriorSD2");
armature.display.x = 600;
armature.display.y = 300;
addChild(armature.display as Sprite);
@@ -151,7 +187,7 @@ class StarlingGame extends Sprite {
addEventListener(EnterFrameEvent.ENTER_FRAME, onEnterFrameHandler);
- textField = new TextField(700, 30, "Multi-Resolution support. Click mouse to switch animation", "Verdana", 16, 0, true);
+ textField = new TextField(700, 50, "Multi-Resolution support. Click mouse to switch animation\nHD SD SD1 SD2", "Verdana", 16, 0, true);
textField.x = 75;
textField.y = 5;
addChild(textField);
diff --git a/SkeletonAnimationLibraryDemos/src/feathers/themes/AeonDesktopTheme.as b/SkeletonAnimationLibraryDemos/src/feathers/themes/AeonDesktopTheme.as
new file mode 100644
index 0000000..5269c7c
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/src/feathers/themes/AeonDesktopTheme.as
@@ -0,0 +1,810 @@
+/*
+ Copyright (c) 2012 Josh Tynjala
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+ */
+package feathers.themes
+{
+ import feathers.controls.Button;
+ import feathers.controls.ButtonGroup;
+ import feathers.controls.Callout;
+ import feathers.controls.Check;
+ import feathers.controls.GroupedList;
+ import feathers.controls.Header;
+ import feathers.controls.Label;
+ import feathers.controls.List;
+ import feathers.controls.PageIndicator;
+ import feathers.controls.PickerList;
+ import feathers.controls.ProgressBar;
+ import feathers.controls.Radio;
+ import feathers.controls.Screen;
+ import feathers.controls.ScrollBar;
+ import feathers.controls.ScrollText;
+ import feathers.controls.Scroller;
+ import feathers.controls.SimpleScrollBar;
+ import feathers.controls.Slider;
+ import feathers.controls.TextInput;
+ import feathers.controls.ToggleSwitch;
+ import feathers.controls.popups.DropDownPopUpContentManager;
+ import feathers.controls.renderers.BaseDefaultItemRenderer;
+ import feathers.controls.renderers.DefaultGroupedListHeaderOrFooterRenderer;
+ import feathers.controls.renderers.DefaultGroupedListItemRenderer;
+ import feathers.controls.renderers.DefaultListItemRenderer;
+ import feathers.controls.text.BitmapFontTextRenderer;
+ import feathers.controls.text.TextFieldTextEditor;
+ import feathers.controls.text.TextFieldTextRenderer;
+ import feathers.core.DisplayListWatcher;
+ import feathers.core.FeathersControl;
+ import feathers.core.IFeathersControl;
+ import feathers.core.ITextEditor;
+ import feathers.core.ITextRenderer;
+ import feathers.display.Scale3Image;
+ import feathers.display.Scale9Image;
+ import feathers.layout.VerticalLayout;
+ import feathers.skins.StandardIcons;
+ import feathers.system.DeviceCapabilities;
+ import feathers.textures.Scale3Textures;
+ import feathers.textures.Scale9Textures;
+
+ import flash.display.BitmapData;
+ import flash.geom.Rectangle;
+ import flash.text.TextFormat;
+ import flash.text.TextFormatAlign;
+
+ import starling.core.Starling;
+ import starling.display.DisplayObject;
+ import starling.display.DisplayObjectContainer;
+ import starling.display.Image;
+ import starling.display.Quad;
+ import starling.events.Event;
+ import starling.textures.Texture;
+ import starling.textures.TextureAtlas;
+
+ public class AeonDesktopTheme extends DisplayListWatcher
+ {
+ [Embed(source="/../assets/images/aeon.png")]
+ protected static const ATLAS_IMAGE:Class;
+
+ [Embed(source="/../assets/images/aeon.xml",mimeType="application/octet-stream")]
+ protected static const ATLAS_XML:Class;
+
+ protected static const BUTTON_SCALE_9_GRID:Rectangle = new Rectangle(6, 6, 70, 10);
+ protected static const SELECTED_BUTTON_SCALE_9_GRID:Rectangle = new Rectangle(6, 6, 52, 10);
+ protected static const HSLIDER_FIRST_REGION:Number = 2;
+ protected static const HSLIDER_SECOND_REGION:Number = 75;
+ protected static const TEXT_INPUT_SCALE_9_GRID:Rectangle = new Rectangle(2, 2, 148, 18);
+ protected static const VERTICAL_SCROLL_BAR_THUMB_SCALE_9_GRID:Rectangle = new Rectangle(2, 5, 6, 42);
+ protected static const VERTICAL_SCROLL_BAR_TRACK_SCALE_9_GRID:Rectangle = new Rectangle(2, 1, 11, 2);
+ protected static const VERTICAL_SCROLL_BAR_STEP_BUTTON_SCALE_9_GRID:Rectangle = new Rectangle(2, 2, 11, 10);
+ protected static const HORIZONTAL_SCROLL_BAR_THUMB_SCALE_9_GRID:Rectangle = new Rectangle(5, 2, 42, 6);
+ protected static const HORIZONTAL_SCROLL_BAR_TRACK_SCALE_9_GRID:Rectangle = new Rectangle(1, 2, 2, 11);
+ protected static const HORIZONTAL_SCROLL_BAR_STEP_BUTTON_SCALE_9_GRID:Rectangle = new Rectangle(2, 2, 10, 11);
+ protected static const SIMPLE_BORDER_SCALE_9_GRID:Rectangle = new Rectangle(2, 2, 2, 2);
+ protected static const PANEL_BORDER_SCALE_9_GRID:Rectangle = new Rectangle(6, 6, 2, 2);
+ protected static const HEADER_SCALE_9_GRID:Rectangle = new Rectangle(0, 0, 4, 28);
+
+ protected static const BACKGROUND_COLOR:uint = 0x869CA7;
+ protected static const PRIMARY_TEXT_COLOR:uint = 0x0B333C;
+ protected static const DISABLED_TEXT_COLOR:uint = 0xAAB3B3;
+
+ protected static function verticalScrollBarFactory():ScrollBar
+ {
+ const scrollBar:ScrollBar = new ScrollBar();
+ scrollBar.direction = ScrollBar.DIRECTION_VERTICAL;
+ return scrollBar;
+ }
+
+ protected static function horizontalScrollBarFactory():ScrollBar
+ {
+ const scrollBar:ScrollBar = new ScrollBar();
+ scrollBar.direction = ScrollBar.DIRECTION_HORIZONTAL;
+ return scrollBar;
+ }
+
+ protected static function textRendererFactory():ITextRenderer
+ {
+ return new TextFieldTextRenderer();
+ }
+
+ protected static function textEditorFactory():ITextEditor
+ {
+ return new TextFieldTextEditor();
+ }
+
+ public function AeonDesktopTheme(root:DisplayObjectContainer)
+ {
+ super(root);
+ Starling.current.nativeStage.color = BACKGROUND_COLOR;
+ if(root.stage)
+ {
+ root.stage.color = BACKGROUND_COLOR;
+ }
+ else
+ {
+ root.addEventListener(Event.ADDED_TO_STAGE, root_addedToStageHandler);
+ }
+ this.initialize();
+ }
+
+ public function get originalDPI():int
+ {
+ return DeviceCapabilities.dpi;
+ }
+
+ public function get scaleToDPI():Boolean
+ {
+ return false;
+ }
+
+ protected var atlas:TextureAtlas;
+ protected var atlasBitmapData:BitmapData;
+
+ protected var defaultTextFormat:TextFormat;
+ protected var disabledTextFormat:TextFormat;
+
+ protected var buttonUpSkinTextures:Scale9Textures;
+ protected var buttonHoverSkinTextures:Scale9Textures;
+ protected var buttonDownSkinTextures:Scale9Textures;
+ protected var buttonDisabledSkinTextures:Scale9Textures;
+ protected var buttonSelectedUpSkinTextures:Scale9Textures;
+ protected var buttonSelectedHoverSkinTextures:Scale9Textures;
+ protected var buttonSelectedDownSkinTextures:Scale9Textures;
+ protected var buttonSelectedDisabledSkinTextures:Scale9Textures;
+
+ protected var hSliderThumbUpSkinTexture:Texture;
+ protected var hSliderThumbHoverSkinTexture:Texture;
+ protected var hSliderThumbDownSkinTexture:Texture;
+ protected var hSliderThumbDisabledSkinTexture:Texture;
+ protected var hSliderTrackSkinTextures:Scale3Textures;
+
+ protected var vSliderThumbUpSkinTexture:Texture;
+ protected var vSliderThumbHoverSkinTexture:Texture;
+ protected var vSliderThumbDownSkinTexture:Texture;
+ protected var vSliderThumbDisabledSkinTexture:Texture;
+ protected var vSliderTrackSkinTextures:Scale3Textures;
+
+ protected var itemRendererUpSkinTexture:Texture;
+ protected var itemRendererHoverSkinTexture:Texture;
+ protected var itemRendererSelectedUpSkinTexture:Texture;
+
+ protected var headerBackgroundSkinTextures:Scale9Textures;
+ protected var groupedListHeaderBackgroundSkinTextures:Scale9Textures;
+
+ protected var checkUpIconTexture:Texture;
+ protected var checkHoverIconTexture:Texture;
+ protected var checkDownIconTexture:Texture;
+ protected var checkDisabledIconTexture:Texture;
+ protected var checkSelectedUpIconTexture:Texture;
+ protected var checkSelectedHoverIconTexture:Texture;
+ protected var checkSelectedDownIconTexture:Texture;
+ protected var checkSelectedDisabledIconTexture:Texture;
+
+ protected var radioUpIconTexture:Texture;
+ protected var radioHoverIconTexture:Texture;
+ protected var radioDownIconTexture:Texture;
+ protected var radioDisabledIconTexture:Texture;
+ protected var radioSelectedUpIconTexture:Texture;
+ protected var radioSelectedHoverIconTexture:Texture;
+ protected var radioSelectedDownIconTexture:Texture;
+ protected var radioSelectedDisabledIconTexture:Texture;
+
+ protected var pageIndicatorNormalSkinTexture:Texture;
+ protected var pageIndicatorSelectedSkinTexture:Texture;
+
+ protected var pickerListUpIconTexture:Texture;
+ protected var pickerListHoverIconTexture:Texture;
+ protected var pickerListDownIconTexture:Texture;
+ protected var pickerListDisabledIconTexture:Texture;
+
+ protected var textInputBackgroundSkinTextures:Scale9Textures;
+ protected var textInputBackgroundDisabledSkinTextures:Scale9Textures;
+
+ protected var vScrollBarThumbUpSkinTextures:Scale9Textures;
+ protected var vScrollBarThumbHoverSkinTextures:Scale9Textures;
+ protected var vScrollBarThumbDownSkinTextures:Scale9Textures;
+ protected var vScrollBarTrackSkinTextures:Scale9Textures;
+ protected var vScrollBarThumbIconTexture:Texture;
+ protected var vScrollBarStepButtonUpSkinTextures:Scale9Textures;
+ protected var vScrollBarStepButtonHoverSkinTextures:Scale9Textures;
+ protected var vScrollBarStepButtonDownSkinTextures:Scale9Textures;
+ protected var vScrollBarStepButtonDisabledSkinTextures:Scale9Textures;
+ protected var vScrollBarDecrementButtonIconTexture:Texture;
+ protected var vScrollBarIncrementButtonIconTexture:Texture;
+
+ protected var hScrollBarThumbUpSkinTextures:Scale9Textures;
+ protected var hScrollBarThumbHoverSkinTextures:Scale9Textures;
+ protected var hScrollBarThumbDownSkinTextures:Scale9Textures;
+ protected var hScrollBarTrackTextures:Scale9Textures;
+ protected var hScrollBarThumbIconTexture:Texture;
+ protected var hScrollBarStepButtonUpSkinTextures:Scale9Textures;
+ protected var hScrollBarStepButtonHoverSkinTextures:Scale9Textures;
+ protected var hScrollBarStepButtonDownSkinTextures:Scale9Textures;
+ protected var hScrollBarStepButtonDisabledSkinTextures:Scale9Textures;
+ protected var hScrollBarDecrementButtonIconTexture:Texture;
+ protected var hScrollBarIncrementButtonIconTexture:Texture;
+
+ protected var simpleBorderBackgroundSkinTextures:Scale9Textures;
+ protected var panelBorderBackgroundSkinTextures:Scale9Textures;
+
+ protected var progressBarFillSkinTexture:Texture;
+
+ override public function dispose():void
+ {
+ if(this.root)
+ {
+ this.root.removeEventListener(Event.ADDED_TO_STAGE, root_addedToStageHandler);
+ }
+ if(this.atlas)
+ {
+ this.atlas.dispose();
+ this.atlas = null;
+ }
+ if(this.atlasBitmapData)
+ {
+ this.atlasBitmapData.dispose();
+ this.atlasBitmapData = null;
+ }
+ super.dispose();
+ }
+
+ protected function initialize():void
+ {
+ FeathersControl.defaultTextRendererFactory = textRendererFactory;
+ FeathersControl.defaultTextEditorFactory = textEditorFactory;
+
+ Callout.stagePaddingTop = Callout.stagePaddingRight = Callout.stagePaddingBottom =
+ Callout.stagePaddingLeft = 16;
+
+ const atlasBitmapData:BitmapData = (new ATLAS_IMAGE()).bitmapData;
+ this.atlas = new TextureAtlas(Texture.fromBitmapData(atlasBitmapData, false), XML(new ATLAS_XML()));
+ if(Starling.handleLostContext)
+ {
+ this.atlasBitmapData = atlasBitmapData;
+ }
+ else
+ {
+ atlasBitmapData.dispose();
+ }
+
+ this.defaultTextFormat = new TextFormat("_sans", 11, PRIMARY_TEXT_COLOR, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0);
+ this.disabledTextFormat = new TextFormat("_sans", 11, DISABLED_TEXT_COLOR, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0);
+
+ this.buttonUpSkinTextures = new Scale9Textures(this.atlas.getTexture("button-up-skin"), BUTTON_SCALE_9_GRID);
+ this.buttonHoverSkinTextures = new Scale9Textures(this.atlas.getTexture("button-hover-skin"), BUTTON_SCALE_9_GRID);
+ this.buttonDownSkinTextures = new Scale9Textures(this.atlas.getTexture("button-down-skin"), BUTTON_SCALE_9_GRID);
+ this.buttonDisabledSkinTextures = new Scale9Textures(this.atlas.getTexture("button-disabled-skin"), BUTTON_SCALE_9_GRID);
+ this.buttonSelectedUpSkinTextures = new Scale9Textures(this.atlas.getTexture("button-selected-up-skin"), SELECTED_BUTTON_SCALE_9_GRID);
+ this.buttonSelectedHoverSkinTextures = new Scale9Textures(this.atlas.getTexture("button-selected-hover-skin"), SELECTED_BUTTON_SCALE_9_GRID);
+ this.buttonSelectedDownSkinTextures = new Scale9Textures(this.atlas.getTexture("button-selected-down-skin"), SELECTED_BUTTON_SCALE_9_GRID);
+ this.buttonSelectedDisabledSkinTextures = new Scale9Textures(this.atlas.getTexture("button-selected-disabled-skin"), SELECTED_BUTTON_SCALE_9_GRID);
+
+ this.hSliderThumbUpSkinTexture = this.atlas.getTexture("hslider-thumb-up-skin");
+ this.hSliderThumbHoverSkinTexture = this.atlas.getTexture("hslider-thumb-hover-skin");
+ this.hSliderThumbDownSkinTexture = this.atlas.getTexture("hslider-thumb-down-skin");
+ this.hSliderThumbDisabledSkinTexture = this.atlas.getTexture("hslider-thumb-disabled-skin");
+ this.hSliderTrackSkinTextures = new Scale3Textures(this.atlas.getTexture("hslider-track-skin"), HSLIDER_FIRST_REGION, HSLIDER_SECOND_REGION, Scale3Textures.DIRECTION_HORIZONTAL);
+
+ this.vSliderThumbUpSkinTexture = this.atlas.getTexture("vslider-thumb-up-skin");
+ this.vSliderThumbHoverSkinTexture = this.atlas.getTexture("vslider-thumb-hover-skin");
+ this.vSliderThumbDownSkinTexture = this.atlas.getTexture("vslider-thumb-down-skin");
+ this.vSliderThumbDisabledSkinTexture = this.atlas.getTexture("vslider-thumb-disabled-skin");
+ this.vSliderTrackSkinTextures = new Scale3Textures(this.atlas.getTexture("vslider-track-skin"), HSLIDER_FIRST_REGION, HSLIDER_SECOND_REGION, Scale3Textures.DIRECTION_VERTICAL);
+
+ this.itemRendererUpSkinTexture = this.atlas.getTexture("item-renderer-up-skin");
+ this.itemRendererHoverSkinTexture = this.atlas.getTexture("item-renderer-hover-skin");
+ this.itemRendererSelectedUpSkinTexture = this.atlas.getTexture("item-renderer-selected-up-skin");
+
+ this.headerBackgroundSkinTextures = new Scale9Textures(this.atlas.getTexture("header-background-skin"), HEADER_SCALE_9_GRID);
+ this.groupedListHeaderBackgroundSkinTextures = new Scale9Textures(this.atlas.getTexture("grouped-list-header-background-skin"), HEADER_SCALE_9_GRID);
+
+ this.checkUpIconTexture = this.atlas.getTexture("check-up-icon");
+ this.checkHoverIconTexture = this.atlas.getTexture("check-hover-icon");
+ this.checkDownIconTexture = this.atlas.getTexture("check-down-icon");
+ this.checkDisabledIconTexture = this.atlas.getTexture("check-disabled-icon");
+ this.checkSelectedUpIconTexture = this.atlas.getTexture("check-selected-up-icon");
+ this.checkSelectedHoverIconTexture = this.atlas.getTexture("check-selected-hover-icon");
+ this.checkSelectedDownIconTexture = this.atlas.getTexture("check-selected-down-icon");
+ this.checkSelectedDisabledIconTexture = this.atlas.getTexture("check-selected-disabled-icon");
+
+ this.radioUpIconTexture = this.atlas.getTexture("radio-up-icon");
+ this.radioHoverIconTexture = this.atlas.getTexture("radio-hover-icon");
+ this.radioDownIconTexture = this.atlas.getTexture("radio-down-icon");
+ this.radioDisabledIconTexture = this.atlas.getTexture("radio-disabled-icon");
+ this.radioSelectedUpIconTexture = this.atlas.getTexture("radio-selected-up-icon");
+ this.radioSelectedHoverIconTexture = this.atlas.getTexture("radio-selected-hover-icon");
+ this.radioSelectedDownIconTexture = this.atlas.getTexture("radio-selected-down-icon");
+ this.radioSelectedDisabledIconTexture = this.atlas.getTexture("radio-selected-disabled-icon");
+
+ this.pageIndicatorNormalSkinTexture = this.atlas.getTexture("page-indicator-normal-skin");
+ this.pageIndicatorSelectedSkinTexture = this.atlas.getTexture("page-indicator-selected-skin");
+
+ this.pickerListUpIconTexture = this.atlas.getTexture("picker-list-up-icon");
+ this.pickerListHoverIconTexture = this.atlas.getTexture("picker-list-hover-icon");
+ this.pickerListDownIconTexture = this.atlas.getTexture("picker-list-down-icon");
+ this.pickerListDisabledIconTexture = this.atlas.getTexture("picker-list-disabled-icon");
+
+ this.textInputBackgroundSkinTextures = new Scale9Textures(this.atlas.getTexture("text-input-background-skin"), TEXT_INPUT_SCALE_9_GRID);
+ this.textInputBackgroundDisabledSkinTextures = new Scale9Textures(this.atlas.getTexture("text-input-background-disabled-skin"), TEXT_INPUT_SCALE_9_GRID);
+
+ this.vScrollBarThumbUpSkinTextures = new Scale9Textures(this.atlas.getTexture("vertical-scroll-bar-thumb-up-skin"), VERTICAL_SCROLL_BAR_THUMB_SCALE_9_GRID);
+ this.vScrollBarThumbHoverSkinTextures = new Scale9Textures(this.atlas.getTexture("vertical-scroll-bar-thumb-hover-skin"), VERTICAL_SCROLL_BAR_THUMB_SCALE_9_GRID);
+ this.vScrollBarThumbDownSkinTextures = new Scale9Textures(this.atlas.getTexture("vertical-scroll-bar-thumb-down-skin"), VERTICAL_SCROLL_BAR_THUMB_SCALE_9_GRID);
+ this.vScrollBarTrackSkinTextures = new Scale9Textures(this.atlas.getTexture("vertical-scroll-bar-track-skin"), VERTICAL_SCROLL_BAR_TRACK_SCALE_9_GRID);
+ this.vScrollBarThumbIconTexture = this.atlas.getTexture("vertical-scroll-bar-thumb-icon");
+ this.vScrollBarStepButtonUpSkinTextures = new Scale9Textures(this.atlas.getTexture("vertical-scroll-bar-step-button-up-skin"), VERTICAL_SCROLL_BAR_STEP_BUTTON_SCALE_9_GRID);
+ this.vScrollBarStepButtonHoverSkinTextures = new Scale9Textures(this.atlas.getTexture("vertical-scroll-bar-step-button-hover-skin"), VERTICAL_SCROLL_BAR_STEP_BUTTON_SCALE_9_GRID);
+ this.vScrollBarStepButtonDownSkinTextures = new Scale9Textures(this.atlas.getTexture("vertical-scroll-bar-step-button-down-skin"), VERTICAL_SCROLL_BAR_STEP_BUTTON_SCALE_9_GRID);
+ this.vScrollBarStepButtonDisabledSkinTextures = new Scale9Textures(this.atlas.getTexture("vertical-scroll-bar-step-button-disabled-skin"), VERTICAL_SCROLL_BAR_STEP_BUTTON_SCALE_9_GRID);
+ this.vScrollBarDecrementButtonIconTexture = this.atlas.getTexture("vertical-scroll-bar-decrement-button-icon");
+ this.vScrollBarIncrementButtonIconTexture = this.atlas.getTexture("vertical-scroll-bar-increment-button-icon");
+
+ this.hScrollBarThumbUpSkinTextures = new Scale9Textures(this.atlas.getTexture("horizontal-scroll-bar-thumb-up-skin"), HORIZONTAL_SCROLL_BAR_THUMB_SCALE_9_GRID);
+ this.hScrollBarThumbHoverSkinTextures = new Scale9Textures(this.atlas.getTexture("horizontal-scroll-bar-thumb-hover-skin"), HORIZONTAL_SCROLL_BAR_THUMB_SCALE_9_GRID);
+ this.hScrollBarThumbDownSkinTextures = new Scale9Textures(this.atlas.getTexture("horizontal-scroll-bar-thumb-down-skin"), HORIZONTAL_SCROLL_BAR_THUMB_SCALE_9_GRID);
+ this.hScrollBarTrackTextures = new Scale9Textures(this.atlas.getTexture("horizontal-scroll-bar-track-skin"), HORIZONTAL_SCROLL_BAR_TRACK_SCALE_9_GRID);
+ this.hScrollBarThumbIconTexture = this.atlas.getTexture("horizontal-scroll-bar-thumb-icon");
+ this.hScrollBarStepButtonUpSkinTextures = new Scale9Textures(this.atlas.getTexture("horizontal-scroll-bar-step-button-up-skin"), HORIZONTAL_SCROLL_BAR_STEP_BUTTON_SCALE_9_GRID);
+ this.hScrollBarStepButtonHoverSkinTextures = new Scale9Textures(this.atlas.getTexture("horizontal-scroll-bar-step-button-hover-skin"), HORIZONTAL_SCROLL_BAR_STEP_BUTTON_SCALE_9_GRID);
+ this.hScrollBarStepButtonDownSkinTextures = new Scale9Textures(this.atlas.getTexture("horizontal-scroll-bar-step-button-down-skin"), HORIZONTAL_SCROLL_BAR_STEP_BUTTON_SCALE_9_GRID);
+ this.hScrollBarStepButtonDisabledSkinTextures = new Scale9Textures(this.atlas.getTexture("horizontal-scroll-bar-step-button-disabled-skin"), HORIZONTAL_SCROLL_BAR_STEP_BUTTON_SCALE_9_GRID);
+ this.hScrollBarDecrementButtonIconTexture = this.atlas.getTexture("horizontal-scroll-bar-decrement-button-icon");
+ this.hScrollBarIncrementButtonIconTexture = this.atlas.getTexture("horizontal-scroll-bar-increment-button-icon");
+
+ this.simpleBorderBackgroundSkinTextures = new Scale9Textures(this.atlas.getTexture("simple-border-background-skin"), SIMPLE_BORDER_SCALE_9_GRID);
+ this.panelBorderBackgroundSkinTextures = new Scale9Textures(this.atlas.getTexture("panel-background-skin"), PANEL_BORDER_SCALE_9_GRID);
+
+ this.progressBarFillSkinTexture = this.atlas.getTexture("progress-bar-fill-skin");
+
+ StandardIcons.listDrillDownAccessoryTexture = this.atlas.getTexture("list-accessory-drill-down-icon");
+
+ this.setInitializerForClassAndSubclasses(Screen, screenInitializer);
+ this.setInitializerForClass(Label, labelInitializer);
+ this.setInitializerForClass(ScrollText, scrollTextInitializer);
+ this.setInitializerForClass(BitmapFontTextRenderer, itemRendererAccessoryLabelInitializer, BaseDefaultItemRenderer.DEFAULT_CHILD_NAME_ACCESSORY_LABEL);
+ this.setInitializerForClass(Button, buttonInitializer);
+ this.setInitializerForClass(Button, toggleSwitchOnTrackInitializer, ToggleSwitch.DEFAULT_CHILD_NAME_ON_TRACK);
+ this.setInitializerForClass(Button, toggleSwitchThumbInitializer, ToggleSwitch.DEFAULT_CHILD_NAME_THUMB);
+ this.setInitializerForClass(Button, pickerListButtonInitializer, PickerList.DEFAULT_CHILD_NAME_BUTTON);
+ this.setInitializerForClass(Button, nothingInitializer, SimpleScrollBar.DEFAULT_CHILD_NAME_THUMB);
+ this.setInitializerForClass(Button, nothingInitializer, ScrollBar.DEFAULT_CHILD_NAME_THUMB);
+ this.setInitializerForClass(Button, nothingInitializer, ScrollBar.DEFAULT_CHILD_NAME_DECREMENT_BUTTON);
+ this.setInitializerForClass(Button, nothingInitializer, ScrollBar.DEFAULT_CHILD_NAME_INCREMENT_BUTTON);
+ this.setInitializerForClass(Button, nothingInitializer, ScrollBar.DEFAULT_CHILD_NAME_MINIMUM_TRACK);
+ this.setInitializerForClass(Button, nothingInitializer, ScrollBar.DEFAULT_CHILD_NAME_MAXIMUM_TRACK);
+ this.setInitializerForClass(Button, nothingInitializer, Slider.DEFAULT_CHILD_NAME_THUMB);
+ this.setInitializerForClass(Button, nothingInitializer, Slider.DEFAULT_CHILD_NAME_MINIMUM_TRACK);
+ this.setInitializerForClass(Button, nothingInitializer, Slider.DEFAULT_CHILD_NAME_MAXIMUM_TRACK);
+ this.setInitializerForClass(ButtonGroup, buttonGroupInitializer);
+ this.setInitializerForClass(Check, checkInitializer);
+ this.setInitializerForClass(Radio, radioInitializer);
+ this.setInitializerForClass(ToggleSwitch, toggleSwitchInitializer);
+ this.setInitializerForClass(Slider, sliderInitializer);
+ this.setInitializerForClass(SimpleScrollBar, simpleScrollBarInitializer);
+ this.setInitializerForClass(ScrollBar, scrollBarInitializer);
+ this.setInitializerForClass(TextInput, textInputInitializer);
+ this.setInitializerForClass(PageIndicator, pageIndicatorInitializer);
+ this.setInitializerForClass(ProgressBar, progressBarInitializer);
+ this.setInitializerForClass(Scroller, scrollerInitializer);
+ this.setInitializerForClass(List, listInitializer);
+ this.setInitializerForClass(List, nothingInitializer, PickerList.DEFAULT_CHILD_NAME_LIST);
+ this.setInitializerForClass(GroupedList, groupedListInitializer);
+ this.setInitializerForClass(PickerList, pickerListInitializer);
+ this.setInitializerForClass(DefaultListItemRenderer, defaultItemRendererInitializer);
+ this.setInitializerForClass(DefaultGroupedListItemRenderer, defaultItemRendererInitializer);
+ this.setInitializerForClass(DefaultGroupedListHeaderOrFooterRenderer, defaultHeaderOrFooterRendererInitializer);
+ this.setInitializerForClass(Header, headerInitializer);
+ this.setInitializerForClass(Callout, calloutInitializer);
+ }
+
+ protected function pageIndicatorNormalSymbolFactory():Image
+ {
+ return new Image(this.pageIndicatorNormalSkinTexture);
+ }
+
+ protected function pageIndicatorSelectedSymbolFactory():Image
+ {
+ return new Image(this.pageIndicatorSelectedSkinTexture);
+ }
+
+ protected function nothingInitializer(target:IFeathersControl):void
+ {
+ //do nothing
+ }
+
+ protected function screenInitializer(screen:Screen):void
+ {
+ screen.originalDPI = this.originalDPI;
+ }
+
+ protected function labelInitializer(label:Label):void
+ {
+ label.textRendererProperties.textFormat = this.defaultTextFormat;
+ }
+
+ protected function scrollTextInitializer(text:ScrollText):void
+ {
+ text.textFormat = this.defaultTextFormat;
+ text.paddingTop = text.paddingRight = text.paddingBottom = text.paddingLeft = 8;
+ }
+
+ protected function itemRendererAccessoryLabelInitializer(renderer:TextFieldTextRenderer):void
+ {
+ renderer.textFormat = this.defaultTextFormat;
+ }
+
+ protected function buttonInitializer(button:Button):void
+ {
+ button.defaultSkin = new Scale9Image(buttonUpSkinTextures);
+ button.hoverSkin = new Scale9Image(buttonHoverSkinTextures);
+ button.downSkin = new Scale9Image(buttonDownSkinTextures);
+ button.disabledSkin = new Scale9Image(buttonDisabledSkinTextures);
+ button.defaultSelectedSkin = new Scale9Image(buttonSelectedUpSkinTextures);
+ button.selectedHoverSkin = new Scale9Image(buttonSelectedHoverSkinTextures);
+ button.selectedDownSkin = new Scale9Image(buttonSelectedDownSkinTextures);
+ button.selectedDisabledSkin = new Scale9Image(buttonSelectedDisabledSkinTextures);
+
+ button.defaultLabelProperties.textFormat = this.defaultTextFormat;
+ button.disabledLabelProperties.textFormat = this.disabledTextFormat;
+
+ button.paddingTop = button.paddingBottom = 2;
+ button.paddingLeft = button.paddingRight = 10;
+ button.gap = 2;
+ button.minWidth = button.minHeight = 12;
+ }
+
+ protected function pickerListButtonInitializer(button:Button):void
+ {
+ this.buttonInitializer(button);
+
+ button.defaultIcon = new Image(pickerListUpIconTexture);
+ button.hoverIcon = new Image(pickerListHoverIconTexture);
+ button.downIcon = new Image(pickerListDownIconTexture);
+ button.disabledIcon = new Image(pickerListDisabledIconTexture);
+ button.gap = Number.POSITIVE_INFINITY; //fill as completely as possible
+ button.horizontalAlign = Button.HORIZONTAL_ALIGN_LEFT;
+ button.iconPosition = Button.ICON_POSITION_RIGHT;
+ button.paddingRight = 6;
+ }
+
+ protected function toggleSwitchOnTrackInitializer(track:Button):void
+ {
+ track.defaultSkin = new Scale9Image(buttonSelectedUpSkinTextures);
+ }
+
+ protected function toggleSwitchThumbInitializer(thumb:Button):void
+ {
+ this.buttonInitializer(thumb);
+ thumb.width = thumb.height = buttonUpSkinTextures.texture.frame.height;
+ }
+
+ protected function checkInitializer(check:Check):void
+ {
+ check.defaultIcon = new Image(checkUpIconTexture);
+ check.hoverIcon = new Image(checkHoverIconTexture);
+ check.downIcon = new Image(checkDownIconTexture);
+ check.disabledIcon = new Image(checkDisabledIconTexture);
+ check.defaultSelectedIcon = new Image(checkSelectedUpIconTexture);
+ check.selectedHoverIcon = new Image(checkSelectedHoverIconTexture);
+ check.selectedDownIcon = new Image(checkSelectedDownIconTexture);
+ check.selectedDisabledIcon = new Image(checkSelectedDisabledIconTexture);
+
+ check.defaultLabelProperties.textFormat = this.defaultTextFormat;
+ check.disabledLabelProperties.textFormat = this.disabledTextFormat;
+
+ check.horizontalAlign = Button.HORIZONTAL_ALIGN_LEFT;
+ check.verticalAlign = Button.VERTICAL_ALIGN_MIDDLE;
+
+ check.gap = 4;
+ }
+
+ protected function radioInitializer(radio:Radio):void
+ {
+ radio.defaultIcon = new Image(radioUpIconTexture);
+ radio.hoverIcon = new Image(radioHoverIconTexture);
+ radio.downIcon = new Image(radioDownIconTexture);
+ radio.disabledIcon = new Image(radioDisabledIconTexture);
+ radio.defaultSelectedIcon = new Image(radioSelectedUpIconTexture);
+ radio.selectedHoverIcon = new Image(radioSelectedHoverIconTexture);
+ radio.selectedDownIcon = new Image(radioSelectedDownIconTexture);
+ radio.selectedDisabledIcon = new Image(radioSelectedDisabledIconTexture);
+
+ radio.defaultLabelProperties.textFormat = this.defaultTextFormat;
+ radio.disabledLabelProperties.textFormat = this.disabledTextFormat;
+
+ radio.horizontalAlign = Button.HORIZONTAL_ALIGN_LEFT;
+ radio.verticalAlign = Button.VERTICAL_ALIGN_MIDDLE;
+
+ radio.gap = 4;
+ }
+
+ protected function toggleSwitchInitializer(toggle:ToggleSwitch):void
+ {
+ toggle.trackLayoutMode = ToggleSwitch.TRACK_LAYOUT_MODE_SINGLE;
+ toggle.labelAlign = ToggleSwitch.LABEL_ALIGN_MIDDLE;
+ toggle.defaultLabelProperties.textFormat = this.defaultTextFormat;
+ toggle.disabledLabelProperties.textFormat = this.disabledTextFormat;
+ }
+
+ protected function buttonGroupInitializer(group:ButtonGroup):void
+ {
+ group.gap = 4;
+ }
+
+ protected function sliderInitializer(slider:Slider):void
+ {
+ slider.trackLayoutMode = Slider.TRACK_LAYOUT_MODE_SINGLE;
+ slider.minimumPadding = slider.maximumPadding = -vSliderThumbUpSkinTexture.height / 2;
+
+ if(slider.direction == Slider.DIRECTION_VERTICAL)
+ {
+ slider.thumbProperties.defaultSkin = new Image(vSliderThumbUpSkinTexture);
+ slider.thumbProperties.hoverSkin = new Image(vSliderThumbHoverSkinTexture);
+ slider.thumbProperties.downSkin = new Image(vSliderThumbDownSkinTexture);
+ slider.thumbProperties.disabledSkin = new Image(vSliderThumbDisabledSkinTexture);
+ slider.minimumTrackProperties.defaultSkin = new Scale3Image(vSliderTrackSkinTextures);
+ }
+ else //horizontal
+ {
+ slider.thumbProperties.defaultSkin = new Image(hSliderThumbUpSkinTexture);
+ slider.thumbProperties.hoverSkin = new Image(hSliderThumbHoverSkinTexture);
+ slider.thumbProperties.downSkin = new Image(hSliderThumbDownSkinTexture);
+ slider.thumbProperties.disabledSkin = new Image(hSliderThumbDisabledSkinTexture);
+ slider.minimumTrackProperties.defaultSkin = new Scale3Image(hSliderTrackSkinTextures);
+ }
+ }
+
+ protected function simpleScrollBarInitializer(scrollBar:SimpleScrollBar):void
+ {
+ if(scrollBar.direction == Slider.DIRECTION_VERTICAL)
+ {
+ scrollBar.thumbProperties.defaultSkin = new Scale9Image(vScrollBarThumbUpSkinTextures);
+ scrollBar.thumbProperties.hoverSkin = new Scale9Image(vScrollBarThumbHoverSkinTextures);
+ scrollBar.thumbProperties.downSkin = new Scale9Image(vScrollBarThumbDownSkinTextures);
+ scrollBar.thumbProperties.defaultIcon = new Image(vScrollBarThumbIconTexture);
+ scrollBar.thumbProperties.horizontalAlign = Button.HORIZONTAL_ALIGN_LEFT;
+ scrollBar.thumbProperties.paddingLeft = 4;
+ }
+ else //horizontal
+ {
+ scrollBar.thumbProperties.defaultSkin = new Scale9Image(hScrollBarThumbUpSkinTextures);
+ scrollBar.thumbProperties.hoverSkin = new Scale9Image(hScrollBarThumbHoverSkinTextures);
+ scrollBar.thumbProperties.downSkin = new Scale9Image(hScrollBarThumbDownSkinTextures);
+ scrollBar.thumbProperties.defaultIcon = new Image(hScrollBarThumbIconTexture);
+ scrollBar.thumbProperties.verticalAlign = Button.VERTICAL_ALIGN_TOP;
+ scrollBar.thumbProperties.paddingTop = 4;
+ }
+ }
+
+ protected function scrollBarInitializer(scrollBar:ScrollBar):void
+ {
+ scrollBar.trackLayoutMode = ScrollBar.TRACK_LAYOUT_MODE_SINGLE;
+
+ const decrementButtonDisabledIcon:Quad = new Quad(1, 1, 0xff00ff);
+ decrementButtonDisabledIcon.alpha = 0;
+ scrollBar.decrementButtonProperties.disabledIcon = decrementButtonDisabledIcon;
+
+ const incrementButtonDisabledIcon:Quad = new Quad(1, 1, 0xff00ff);
+ incrementButtonDisabledIcon.alpha = 0;
+ scrollBar.incrementButtonProperties.disabledIcon = incrementButtonDisabledIcon;
+
+ if(scrollBar.direction == Slider.DIRECTION_VERTICAL)
+ {
+ scrollBar.decrementButtonProperties.defaultSkin = new Scale9Image(vScrollBarStepButtonUpSkinTextures);
+ scrollBar.decrementButtonProperties.hoverSkin = new Scale9Image(vScrollBarStepButtonHoverSkinTextures);
+ scrollBar.decrementButtonProperties.downSkin = new Scale9Image(vScrollBarStepButtonDownSkinTextures);
+ scrollBar.decrementButtonProperties.disabledSkin = new Scale9Image(vScrollBarStepButtonDisabledSkinTextures);
+ scrollBar.decrementButtonProperties.defaultIcon = new Image(vScrollBarDecrementButtonIconTexture);
+
+ scrollBar.incrementButtonProperties.defaultSkin = new Scale9Image(vScrollBarStepButtonUpSkinTextures);
+ scrollBar.incrementButtonProperties.hoverSkin = new Scale9Image(vScrollBarStepButtonHoverSkinTextures);
+ scrollBar.incrementButtonProperties.downSkin = new Scale9Image(vScrollBarStepButtonDownSkinTextures);
+ scrollBar.incrementButtonProperties.disabledSkin = new Scale9Image(vScrollBarStepButtonDisabledSkinTextures);
+ scrollBar.incrementButtonProperties.defaultIcon = new Image(vScrollBarIncrementButtonIconTexture);
+
+ var thumbSkin:Scale9Image = new Scale9Image(vScrollBarThumbUpSkinTextures);
+ thumbSkin.height = thumbSkin.width;
+ scrollBar.thumbProperties.defaultSkin = thumbSkin;
+ thumbSkin = new Scale9Image(vScrollBarThumbHoverSkinTextures);
+ thumbSkin.height = thumbSkin.width;
+ scrollBar.thumbProperties.hoverSkin = thumbSkin;
+ thumbSkin = new Scale9Image(vScrollBarThumbDownSkinTextures);
+ thumbSkin.height = thumbSkin.width;
+ scrollBar.thumbProperties.downSkin = thumbSkin;
+ scrollBar.thumbProperties.defaultIcon = new Image(vScrollBarThumbIconTexture);
+ scrollBar.thumbProperties.horizontalAlign = Button.HORIZONTAL_ALIGN_LEFT;
+ scrollBar.thumbProperties.paddingLeft = 4;
+
+ scrollBar.minimumTrackProperties.defaultSkin = new Scale9Image(vScrollBarTrackSkinTextures);
+ }
+ else //horizontal
+ {
+ scrollBar.decrementButtonProperties.defaultSkin = new Scale9Image(hScrollBarStepButtonUpSkinTextures);
+ scrollBar.decrementButtonProperties.hoverSkin = new Scale9Image(hScrollBarStepButtonHoverSkinTextures);
+ scrollBar.decrementButtonProperties.downSkin = new Scale9Image(hScrollBarStepButtonDownSkinTextures);
+ scrollBar.decrementButtonProperties.disabledSkin = new Scale9Image(hScrollBarStepButtonDisabledSkinTextures);
+ scrollBar.decrementButtonProperties.defaultIcon = new Image(hScrollBarDecrementButtonIconTexture);
+
+ scrollBar.incrementButtonProperties.defaultSkin = new Scale9Image(hScrollBarStepButtonUpSkinTextures);
+ scrollBar.incrementButtonProperties.hoverSkin = new Scale9Image(hScrollBarStepButtonHoverSkinTextures);
+ scrollBar.incrementButtonProperties.downSkin = new Scale9Image(hScrollBarStepButtonDownSkinTextures);
+ scrollBar.incrementButtonProperties.disabledSkin = new Scale9Image(hScrollBarStepButtonDisabledSkinTextures);
+ scrollBar.incrementButtonProperties.defaultIcon = new Image(hScrollBarIncrementButtonIconTexture);
+
+ thumbSkin = new Scale9Image(hScrollBarThumbUpSkinTextures);
+ thumbSkin.width = thumbSkin.height;
+ scrollBar.thumbProperties.defaultSkin = thumbSkin;
+ thumbSkin = new Scale9Image(hScrollBarThumbHoverSkinTextures);
+ thumbSkin.width = thumbSkin.height;
+ scrollBar.thumbProperties.hoverSkin = thumbSkin;
+ thumbSkin = new Scale9Image(hScrollBarThumbDownSkinTextures);
+ thumbSkin.width = thumbSkin.height;
+ scrollBar.thumbProperties.downSkin = thumbSkin;
+ scrollBar.thumbProperties.defaultIcon = new Image(hScrollBarThumbIconTexture);
+ scrollBar.thumbProperties.verticalAlign = Button.VERTICAL_ALIGN_TOP;
+ scrollBar.thumbProperties.paddingTop = 4;
+
+ scrollBar.minimumTrackProperties.defaultSkin = new Scale9Image(hScrollBarTrackTextures);
+ }
+ }
+
+ protected function textInputInitializer(input:TextInput):void
+ {
+ input.minWidth = input.minHeight = 22;
+ input.paddingTop = input.paddingBottom = 2;
+ input.paddingRight = input.paddingLeft = 4;
+ input.textEditorProperties.textFormat = this.defaultTextFormat;
+
+ input.backgroundSkin = new Scale9Image(textInputBackgroundSkinTextures);
+ input.backgroundDisabledSkin = new Scale9Image(textInputBackgroundDisabledSkinTextures);
+ }
+
+ protected function pageIndicatorInitializer(pageIndicator:PageIndicator):void
+ {
+ pageIndicator.normalSymbolFactory = this.pageIndicatorNormalSymbolFactory;
+ pageIndicator.selectedSymbolFactory = this.pageIndicatorSelectedSymbolFactory;
+ pageIndicator.gap = 12;
+ pageIndicator.paddingTop = pageIndicator.paddingRight = pageIndicator.paddingBottom =
+ pageIndicator.paddingLeft = 12;
+ pageIndicator.minTouchWidth = pageIndicator.minTouchHeight = 12;
+ }
+
+ protected function progressBarInitializer(progress:ProgressBar):void
+ {
+ const backgroundSkin:Scale9Image = new Scale9Image(simpleBorderBackgroundSkinTextures);
+ backgroundSkin.width = backgroundSkin.height * 30;
+ progress.backgroundSkin = backgroundSkin;
+ progress.fillSkin = new Image(progressBarFillSkinTexture);
+
+ progress.paddingTop = progress.paddingRight = progress.paddingBottom =
+ progress.paddingLeft = 1;
+ }
+
+ protected function scrollerInitializer(scroller:Scroller):void
+ {
+ scroller.horizontalScrollBarFactory = horizontalScrollBarFactory;
+ scroller.verticalScrollBarFactory = verticalScrollBarFactory;
+
+ scroller.interactionMode = Scroller.INTERACTION_MODE_MOUSE;
+ scroller.scrollBarDisplayMode = Scroller.SCROLL_BAR_DISPLAY_MODE_FIXED;
+
+ scroller.verticalScrollPolicy = Scroller.SCROLL_POLICY_AUTO;
+ scroller.horizontalScrollPolicy = Scroller.SCROLL_POLICY_AUTO;
+ }
+
+ protected function listInitializer(list:List):void
+ {
+ list.backgroundSkin = new Scale9Image(simpleBorderBackgroundSkinTextures);
+
+ list.paddingTop = list.paddingRight = list.paddingBottom =
+ list.paddingLeft = 1;
+ }
+
+ protected function groupedListInitializer(list:GroupedList):void
+ {
+ list.backgroundSkin = new Scale9Image(simpleBorderBackgroundSkinTextures);
+
+ const layout:VerticalLayout = new VerticalLayout();
+ layout.useVirtualLayout = true;
+ layout.paddingTop = layout.paddingRight = layout.paddingBottom =
+ layout.paddingLeft = 0;
+ layout.gap = 0;
+ layout.horizontalAlign = VerticalLayout.HORIZONTAL_ALIGN_JUSTIFY;
+ layout.verticalAlign = VerticalLayout.VERTICAL_ALIGN_TOP;
+ list.layout = layout;
+
+ list.paddingTop = list.paddingRight = list.paddingBottom =
+ list.paddingLeft = 1;
+ }
+
+ protected function pickerListInitializer(list:PickerList):void
+ {
+ list.popUpContentManager = new DropDownPopUpContentManager();
+ list.listProperties.maxHeight = 110;
+
+ list.listProperties.backgroundSkin = new Scale9Image(simpleBorderBackgroundSkinTextures);
+
+ list.listProperties.paddingTop = list.listProperties.paddingRight = list.listProperties.paddingBottom =
+ list.listProperties.paddingLeft = 1;
+ }
+
+ protected function defaultItemRendererInitializer(renderer:BaseDefaultItemRenderer):void
+ {
+ renderer.defaultSkin = new Image(itemRendererUpSkinTexture);
+ renderer.hoverSkin = new Image(itemRendererHoverSkinTexture);
+ renderer.downSkin = new Image(itemRendererSelectedUpSkinTexture);
+ renderer.defaultSelectedSkin = new Image(itemRendererSelectedUpSkinTexture);
+
+ renderer.defaultLabelProperties.textFormat = this.defaultTextFormat;
+ renderer.disabledLabelProperties.textFormat = this.disabledTextFormat;
+
+ renderer.horizontalAlign = Button.HORIZONTAL_ALIGN_LEFT;
+
+ renderer.iconPosition = Button.ICON_POSITION_LEFT;
+ renderer.accessoryPosition = BaseDefaultItemRenderer.ACCESSORY_POSITION_RIGHT;
+
+ renderer.paddingTop = renderer.paddingBottom = 2;
+ renderer.paddingRight = renderer.paddingLeft = 6;
+ renderer.gap = 2;
+ renderer.accessoryGap = Number.POSITIVE_INFINITY;
+ renderer.minWidth = renderer.minHeight = 22;
+ }
+
+ protected function defaultHeaderOrFooterRendererInitializer(renderer:DefaultGroupedListHeaderOrFooterRenderer):void
+ {
+ renderer.backgroundSkin = new Scale9Image(groupedListHeaderBackgroundSkinTextures);
+ renderer.backgroundSkin.height = 18;
+
+ renderer.contentLabelProperties.textFormat = this.defaultTextFormat;
+
+ renderer.paddingTop = renderer.paddingBottom = 2;
+ renderer.paddingRight = renderer.paddingLeft = 6;
+ renderer.minWidth = renderer.minHeight = 18;
+ }
+
+ protected function calloutInitializer(callout:Callout):void
+ {
+ callout.backgroundSkin = new Scale9Image(panelBorderBackgroundSkinTextures);
+ const arrowSkin:Quad = new Quad(8, 8, 0xff00ff);
+ arrowSkin.alpha = 0;
+ callout.topArrowSkin = callout.rightArrowSkin = callout.bottomArrowSkin =
+ callout.leftArrowSkin = arrowSkin;
+
+ callout.paddingTop = callout.paddingBottom = 6;
+ callout.paddingRight = callout.paddingLeft = 10;
+ }
+
+ protected function headerInitializer(header:Header):void
+ {
+ header.backgroundSkin = new Scale9Image(headerBackgroundSkinTextures);
+
+ header.titleProperties.textFormat = this.defaultTextFormat;
+
+ header.paddingTop = header.paddingBottom = 2;
+ header.paddingRight = header.paddingLeft = 6;
+ }
+
+ protected function root_addedToStageHandler(event:Event):void
+ {
+ DisplayObject(event.currentTarget).stage.color = BACKGROUND_COLOR;
+ }
+ }
+}
diff --git a/SkeletonAnimationLibraryDemos/src/starling/extensions/ColorArgb.as b/SkeletonAnimationLibraryDemos/src/starling/extensions/ColorArgb.as
new file mode 100644
index 0000000..14c3e41
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/src/starling/extensions/ColorArgb.as
@@ -0,0 +1,84 @@
+// =================================================================================================
+//
+// Starling Framework - Particle System Extension
+// Copyright 2011 Gamua OG. All Rights Reserved.
+//
+// This program is free software. You can redistribute and/or modify it
+// in accordance with the terms of the accompanying license agreement.
+//
+// =================================================================================================
+
+package starling.extensions
+{
+ public class ColorArgb
+ {
+ public var red:Number;
+ public var green:Number;
+ public var blue:Number;
+ public var alpha:Number;
+
+ public static function fromRgb(color:uint):ColorArgb
+ {
+ var rgb:ColorArgb = new ColorArgb();
+ rgb.fromRgb(color);
+ return rgb;
+ }
+
+ public static function fromArgb(color:uint):ColorArgb
+ {
+ var argb:ColorArgb = new ColorArgb();
+ argb.fromArgb(color);
+ return argb;
+ }
+
+ public function ColorArgb(red:Number=0, green:Number=0, blue:Number=0, alpha:Number=0)
+ {
+ this.red = red;
+ this.green = green;
+ this.blue = blue;
+ this.alpha = alpha;
+ }
+
+ public function toRgb():uint
+ {
+ var r:Number = red; if (r < 0.0) r = 0.0; else if (r > 1.0) r = 1.0;
+ var g:Number = green; if (g < 0.0) g = 0.0; else if (g > 1.0) g = 1.0;
+ var b:Number = blue; if (b < 0.0) b = 0.0; else if (b > 1.0) b = 1.0;
+
+ return int(r * 255) << 16 | int(g * 255) << 8 | int(b * 255);
+ }
+
+ public function toArgb():uint
+ {
+ var a:Number = alpha; if (a < 0.0) a = 0.0; else if (a > 1.0) a = 1.0;
+ var r:Number = red; if (r < 0.0) r = 0.0; else if (r > 1.0) r = 1.0;
+ var g:Number = green; if (g < 0.0) g = 0.0; else if (g > 1.0) g = 1.0;
+ var b:Number = blue; if (b < 0.0) b = 0.0; else if (b > 1.0) b = 1.0;
+
+ return int(a * 255) << 24 | int(r * 255) << 16 | int(g * 255) << 8 | int(b * 255);
+ }
+
+ public function fromRgb(color:uint):void
+ {
+ red = (color >> 16 & 0xFF) / 255.0;
+ green = (color >> 8 & 0xFF) / 255.0;
+ blue = (color & 0xFF) / 255.0;
+ }
+
+ public function fromArgb(color:uint):void
+ {
+ red = (color >> 16 & 0xFF) / 255.0;
+ green = (color >> 8 & 0xFF) / 255.0;
+ blue = (color & 0xFF) / 255.0;
+ alpha = (color >> 24 & 0xFF) / 255.0;
+ }
+
+ public function copyFrom(argb:ColorArgb):void
+ {
+ red = argb.red;
+ green = argb.green;
+ blue = argb.blue;
+ alpha = argb.alpha;
+ }
+ }
+}
\ No newline at end of file
diff --git a/SkeletonAnimationLibraryDemos/src/starling/extensions/PDParticle.as b/SkeletonAnimationLibraryDemos/src/starling/extensions/PDParticle.as
new file mode 100644
index 0000000..4b82b9a
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/src/starling/extensions/PDParticle.as
@@ -0,0 +1,32 @@
+// =================================================================================================
+//
+// Starling Framework - Particle System Extension
+// Copyright 2012 Gamua OG. All Rights Reserved.
+//
+// This program is free software. You can redistribute and/or modify it
+// in accordance with the terms of the accompanying license agreement.
+//
+// =================================================================================================
+
+package starling.extensions
+{
+ public class PDParticle extends Particle
+ {
+ public var colorArgb:ColorArgb;
+ public var colorArgbDelta:ColorArgb;
+ public var startX:Number, startY:Number;
+ public var velocityX:Number, velocityY:Number;
+ public var radialAcceleration:Number;
+ public var tangentialAcceleration:Number;
+ public var emitRadius:Number, emitRadiusDelta:Number;
+ public var emitRotation:Number, emitRotationDelta:Number;
+ public var rotationDelta:Number;
+ public var scaleDelta:Number;
+
+ public function PDParticle()
+ {
+ colorArgb = new ColorArgb();
+ colorArgbDelta = new ColorArgb();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SkeletonAnimationLibraryDemos/src/starling/extensions/PDParticleSystem.as b/SkeletonAnimationLibraryDemos/src/starling/extensions/PDParticleSystem.as
new file mode 100644
index 0000000..b703165
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/src/starling/extensions/PDParticleSystem.as
@@ -0,0 +1,407 @@
+// =================================================================================================
+//
+// Starling Framework - Particle System Extension
+// Copyright 2012 Gamua OG. All Rights Reserved.
+//
+// This program is free software. You can redistribute and/or modify it
+// in accordance with the terms of the accompanying license agreement.
+//
+// =================================================================================================
+
+package starling.extensions
+{
+ import flash.display3D.Context3DBlendFactor;
+
+ import starling.textures.Texture;
+ import starling.utils.deg2rad;
+
+ public class PDParticleSystem extends ParticleSystem
+ {
+ private const EMITTER_TYPE_GRAVITY:int = 0;
+ private const EMITTER_TYPE_RADIAL:int = 1;
+
+ // THESE PRIVATE VARIABLES MADE PUBLIC FOR ACCESS FROM PARTICLEDISPLAY.AS -DW
+
+ // emitter configuration // .pex element name
+ public var mEmitterType:int; // emitterType
+ public var mEmitterXVariance:Number; // sourcePositionVariance x
+ public var mEmitterYVariance:Number; // sourcePositionVariance y
+
+ // particle configuration
+ public var mMaxNumParticles:int; // maxParticles
+ public var mLifespan:Number; // particleLifeSpan
+ public var mLifespanVariance:Number; // particleLifeSpanVariance
+ public var mStartSize:Number; // startParticleSize
+ public var mStartSizeVariance:Number; // startParticleSizeVariance
+ public var mEndSize:Number; // finishParticleSize
+ public var mEndSizeVariance:Number; // finishParticleSizeVariance
+ public var mEmitAngle:Number; // angle
+ public var mEmitAngleVariance:Number; // angleVariance
+ public var mStartRotation:Number; // rotationStart
+ public var mStartRotationVariance:Number; // rotationStartVariance
+ public var mEndRotation:Number; // rotationEnd
+ public var mEndRotationVariance:Number; // rotationEndVariance
+
+ // gravity configuration
+ public var mSpeed:Number; // speed
+ public var mSpeedVariance:Number; // speedVariance
+ public var mGravityX:Number; // gravity x
+ public var mGravityY:Number; // gravity y
+ public var mRadialAcceleration:Number; // radialAcceleration
+ public var mRadialAccelerationVariance:Number; // radialAccelerationVariance
+ public var mTangentialAcceleration:Number; // tangentialAcceleration
+ public var mTangentialAccelerationVariance:Number; // tangentialAccelerationVariance
+
+ // radial configuration
+ public var mMaxRadius:Number; // maxRadius
+ public var mMaxRadiusVariance:Number; // maxRadiusVariance
+ public var mMinRadius:Number; // minRadius
+ public var mRotatePerSecond:Number; // rotatePerSecond
+ public var mRotatePerSecondVariance:Number; // rotatePerSecondVariance
+
+ // color configuration
+ public var mStartColor:ColorArgb; // startColor
+ public var mStartColorVariance:ColorArgb; // startColorVariance
+ public var mEndColor:ColorArgb; // finishColor
+ public var mEndColorVariance:ColorArgb; // finishColorVariance
+
+ public function PDParticleSystem(config:XML, texture:Texture)
+ {
+ parseConfig(config);
+
+ var emissionRate:Number = mMaxNumParticles / mLifespan;
+ super(texture, emissionRate, mMaxNumParticles, mMaxNumParticles,
+ mBlendFactorSource, mBlendFactorDestination);
+
+ mPremultipliedAlpha = false;
+ }
+
+ protected override function createParticle():Particle
+ {
+ return new PDParticle();
+ }
+
+ protected override function initParticle(aParticle:Particle):void
+ {
+ var particle:PDParticle = aParticle as PDParticle;
+
+ // for performance reasons, the random variances are calculated inline instead
+ // of calling a function
+
+ var lifespan:Number = mLifespan + mLifespanVariance * (Math.random() * 2.0 - 1.0);
+ if (lifespan <= 0.0) return;
+
+ particle.currentTime = 0.0;
+ particle.totalTime = lifespan;
+
+ particle.x = mEmitterX + mEmitterXVariance * (Math.random() * 2.0 - 1.0);
+ particle.y = mEmitterY + mEmitterYVariance * (Math.random() * 2.0 - 1.0);
+ particle.startX = mEmitterX;
+ particle.startY = mEmitterY;
+
+ var angle:Number = mEmitAngle + mEmitAngleVariance * (Math.random() * 2.0 - 1.0);
+ var speed:Number = mSpeed + mSpeedVariance * (Math.random() * 2.0 - 1.0);
+ particle.velocityX = speed * Math.cos(angle);
+ particle.velocityY = speed * Math.sin(angle);
+
+ particle.emitRadius = mMaxRadius + mMaxRadiusVariance * (Math.random() * 2.0 - 1.0);
+ particle.emitRadiusDelta = mMaxRadius / lifespan;
+ particle.emitRotation = mEmitAngle + mEmitAngleVariance * (Math.random() * 2.0 - 1.0);
+ particle.emitRotationDelta = mRotatePerSecond + mRotatePerSecondVariance * (Math.random() * 2.0 - 1.0);
+ particle.radialAcceleration = mRadialAcceleration + mRadialAccelerationVariance * (Math.random() * 2.0 - 1.0);
+ particle.tangentialAcceleration = mTangentialAcceleration + mTangentialAccelerationVariance * (Math.random() * 2.0 - 1.0);
+
+ var startSize:Number = mStartSize + mStartSizeVariance * (Math.random() * 2.0 - 1.0);
+ var endSize:Number = mEndSize + mEndSizeVariance * (Math.random() * 2.0 - 1.0);
+ if (startSize < 0.1) startSize = 0.1;
+ if (endSize < 0.1) endSize = 0.1;
+ particle.scale = startSize / texture.width;
+ particle.scaleDelta = ((endSize - startSize) / lifespan) / texture.width;
+
+ // colors
+
+ var startColor:ColorArgb = particle.colorArgb;
+ var colorDelta:ColorArgb = particle.colorArgbDelta;
+
+ startColor.red = mStartColor.red;
+ startColor.green = mStartColor.green;
+ startColor.blue = mStartColor.blue;
+ startColor.alpha = mStartColor.alpha;
+
+ if (mStartColorVariance.red != 0) startColor.red += mStartColorVariance.red * (Math.random() * 2.0 - 1.0);
+ if (mStartColorVariance.green != 0) startColor.green += mStartColorVariance.green * (Math.random() * 2.0 - 1.0);
+ if (mStartColorVariance.blue != 0) startColor.blue += mStartColorVariance.blue * (Math.random() * 2.0 - 1.0);
+ if (mStartColorVariance.alpha != 0) startColor.alpha += mStartColorVariance.alpha * (Math.random() * 2.0 - 1.0);
+
+ var endColorRed:Number = mEndColor.red;
+ var endColorGreen:Number = mEndColor.green;
+ var endColorBlue:Number = mEndColor.blue;
+ var endColorAlpha:Number = mEndColor.alpha;
+
+ if (mEndColorVariance.red != 0) endColorRed += mEndColorVariance.red * (Math.random() * 2.0 - 1.0);
+ if (mEndColorVariance.green != 0) endColorGreen += mEndColorVariance.green * (Math.random() * 2.0 - 1.0);
+ if (mEndColorVariance.blue != 0) endColorBlue += mEndColorVariance.blue * (Math.random() * 2.0 - 1.0);
+ if (mEndColorVariance.alpha != 0) endColorAlpha += mEndColorVariance.alpha * (Math.random() * 2.0 - 1.0);
+
+ colorDelta.red = (endColorRed - startColor.red) / lifespan;
+ colorDelta.green = (endColorGreen - startColor.green) / lifespan;
+ colorDelta.blue = (endColorBlue - startColor.blue) / lifespan;
+ colorDelta.alpha = (endColorAlpha - startColor.alpha) / lifespan;
+
+ // rotation
+
+ var startRotation:Number = mStartRotation + mStartRotationVariance * (Math.random() * 2.0 - 1.0);
+ var endRotation:Number = mEndRotation + mEndRotationVariance * (Math.random() * 2.0 - 1.0);
+
+ particle.rotation = startRotation;
+ particle.rotationDelta = (endRotation - startRotation) / lifespan;
+ }
+
+ protected override function advanceParticle(aParticle:Particle, passedTime:Number):void
+ {
+ var particle:PDParticle = aParticle as PDParticle;
+
+ var restTime:Number = particle.totalTime - particle.currentTime;
+ passedTime = restTime > passedTime ? passedTime : restTime;
+ particle.currentTime += passedTime;
+
+ if (mEmitterType == EMITTER_TYPE_RADIAL)
+ {
+ particle.emitRotation += particle.emitRotationDelta * passedTime;
+ particle.emitRadius -= particle.emitRadiusDelta * passedTime;
+ particle.x = mEmitterX - Math.cos(particle.emitRotation) * particle.emitRadius;
+ particle.y = mEmitterY - Math.sin(particle.emitRotation) * particle.emitRadius;
+
+ if (particle.emitRadius < mMinRadius)
+ particle.currentTime = particle.totalTime;
+ }
+ else
+ {
+ var distanceX:Number = particle.x - particle.startX;
+ var distanceY:Number = particle.y - particle.startY;
+ var distanceScalar:Number = Math.sqrt(distanceX*distanceX + distanceY*distanceY);
+ if (distanceScalar < 0.01) distanceScalar = 0.01;
+
+ var radialX:Number = distanceX / distanceScalar;
+ var radialY:Number = distanceY / distanceScalar;
+ var tangentialX:Number = radialX;
+ var tangentialY:Number = radialY;
+
+ radialX *= particle.radialAcceleration;
+ radialY *= particle.radialAcceleration;
+
+ var newY:Number = tangentialX;
+ tangentialX = -tangentialY * particle.tangentialAcceleration;
+ tangentialY = newY * particle.tangentialAcceleration;
+
+ particle.velocityX += passedTime * (mGravityX + radialX + tangentialX);
+ particle.velocityY += passedTime * (mGravityY + radialY + tangentialY);
+ particle.x += particle.velocityX * passedTime;
+ particle.y += particle.velocityY * passedTime;
+ }
+
+ particle.scale += particle.scaleDelta * passedTime;
+ particle.rotation += particle.rotationDelta * passedTime;
+
+ particle.colorArgb.red += particle.colorArgbDelta.red * passedTime;
+ particle.colorArgb.green += particle.colorArgbDelta.green * passedTime;
+ particle.colorArgb.blue += particle.colorArgbDelta.blue * passedTime;
+ particle.colorArgb.alpha += particle.colorArgbDelta.alpha * passedTime;
+
+ particle.color = particle.colorArgb.toRgb();
+ particle.alpha = particle.colorArgb.alpha;
+ }
+
+ private function updateEmissionRate():void
+ {
+ emissionRate = mMaxNumParticles / mLifespan;
+ }
+
+ private function parseConfig(config:XML):void
+ {
+ mEmitterXVariance = parseFloat(config.sourcePositionVariance.attribute("x"));
+ mEmitterYVariance = parseFloat(config.sourcePositionVariance.attribute("y"));
+ mGravityX = parseFloat(config.gravity.attribute("x"));
+ mGravityY = parseFloat(config.gravity.attribute("y"));
+ mEmitterType = getIntValue(config.emitterType);
+ mMaxNumParticles = getIntValue(config.maxParticles);
+ mLifespan = Math.max(0.01, getFloatValue(config.particleLifeSpan));
+ mLifespanVariance = getFloatValue(config.particleLifespanVariance);
+ mStartSize = getFloatValue(config.startParticleSize);
+ mStartSizeVariance = getFloatValue(config.startParticleSizeVariance);
+ mEndSize = getFloatValue(config.finishParticleSize);
+ mEndSizeVariance = getFloatValue(config.FinishParticleSizeVariance);
+ mEmitAngle = deg2rad(getFloatValue(config.angle));
+ mEmitAngleVariance = deg2rad(getFloatValue(config.angleVariance));
+ mStartRotation = deg2rad(getFloatValue(config.rotationStart));
+ mStartRotationVariance = deg2rad(getFloatValue(config.rotationStartVariance));
+ mEndRotation = deg2rad(getFloatValue(config.rotationEnd));
+ mEndRotationVariance = deg2rad(getFloatValue(config.rotationEndVariance));
+ mSpeed = getFloatValue(config.speed);
+ mSpeedVariance = getFloatValue(config.speedVariance);
+ mRadialAcceleration = getFloatValue(config.radialAcceleration);
+ mRadialAccelerationVariance = getFloatValue(config.radialAccelVariance);
+ mTangentialAcceleration = getFloatValue(config.tangentialAcceleration);
+ mTangentialAccelerationVariance = getFloatValue(config.tangentialAccelVariance);
+ mMaxRadius = getFloatValue(config.maxRadius);
+ mMaxRadiusVariance = getFloatValue(config.maxRadiusVariance);
+ mMinRadius = getFloatValue(config.minRadius);
+ mRotatePerSecond = deg2rad(getFloatValue(config.rotatePerSecond));
+ mRotatePerSecondVariance = deg2rad(getFloatValue(config.rotatePerSecondVariance));
+ mStartColor = getColor(config.startColor);
+ mStartColorVariance = getColor(config.startColorVariance);
+ mEndColor = getColor(config.finishColor);
+ mEndColorVariance = getColor(config.finishColorVariance);
+ mBlendFactorSource = getBlendFunc(config.blendFuncSource);
+ mBlendFactorDestination = getBlendFunc(config.blendFuncDestination);
+
+ function getIntValue(element:XMLList):int
+ {
+ return parseInt(element.attribute("value"));
+ }
+
+ function getFloatValue(element:XMLList):Number
+ {
+ return parseFloat(element.attribute("value"));
+ }
+
+ function getColor(element:XMLList):ColorArgb
+ {
+ var color:ColorArgb = new ColorArgb();
+ color.red = parseFloat(element.attribute("red"));
+ color.green = parseFloat(element.attribute("green"));
+ color.blue = parseFloat(element.attribute("blue"));
+ color.alpha = parseFloat(element.attribute("alpha"));
+ return color;
+ }
+
+ function getBlendFunc(element:XMLList):String
+ {
+ var value:int = getIntValue(element);
+ switch (value)
+ {
+ case 0: return Context3DBlendFactor.ZERO; break;
+ case 1: return Context3DBlendFactor.ONE; break;
+ case 0x300: return Context3DBlendFactor.SOURCE_COLOR; break;
+ case 0x301: return Context3DBlendFactor.ONE_MINUS_SOURCE_COLOR; break;
+ case 0x302: return Context3DBlendFactor.SOURCE_ALPHA; break;
+ case 0x303: return Context3DBlendFactor.ONE_MINUS_SOURCE_ALPHA; break;
+ case 0x304: return Context3DBlendFactor.DESTINATION_ALPHA; break;
+ case 0x305: return Context3DBlendFactor.ONE_MINUS_DESTINATION_ALPHA; break;
+ case 0x306: return Context3DBlendFactor.DESTINATION_COLOR; break;
+ case 0x307: return Context3DBlendFactor.ONE_MINUS_DESTINATION_COLOR; break;
+ default: throw new ArgumentError("unsupported blending function: " + value);
+ }
+ }
+ }
+
+ public function get emitterType():int { return mEmitterType; }
+ public function set emitterType(value:int):void { mEmitterType = value; }
+
+ public function get emitterXVariance():Number { return mEmitterXVariance; }
+ public function set emitterXVariance(value:Number):void { mEmitterXVariance = value; }
+
+ public function get emitterYVariance():Number { return mEmitterYVariance; }
+ public function set emitterYVariance(value:Number):void { mEmitterYVariance = value; }
+
+ public function get maxNumParticles():int { return mMaxNumParticles; }
+ public function set maxNumParticles(value:int):void
+ {
+ maxCapacity = value;
+ mMaxNumParticles = maxCapacity;
+ updateEmissionRate();
+ }
+
+ public function get lifespan():Number { return mLifespan; }
+ public function set lifespan(value:Number):void
+ {
+ mLifespan = Math.max(0.01, value);
+ updateEmissionRate();
+ }
+
+ public function get lifespanVariance():Number { return mLifespanVariance; }
+ public function set lifespanVariance(value:Number):void { mLifespanVariance = value; }
+
+ public function get startSize():Number { return mStartSize; }
+ public function set startSize(value:Number):void { mStartSize = value; }
+
+ public function get startSizeVariance():Number { return mStartSizeVariance; }
+ public function set startSizeVariance(value:Number):void { mStartSizeVariance = value; }
+
+ public function get endSize():Number { return mEndSize; }
+ public function set endSize(value:Number):void { mEndSize = value; }
+
+ public function get endSizeVariance():Number { return mEndSizeVariance; }
+ public function set endSizeVariance(value:Number):void { mEndSizeVariance = value; }
+
+ public function get emitAngle():Number { return mEmitAngle; }
+ public function set emitAngle(value:Number):void { mEmitAngle = value; }
+
+ public function get emitAngleVariance():Number { return mEmitAngleVariance; }
+ public function set emitAngleVariance(value:Number):void { mEmitAngleVariance = value; }
+
+ public function get startRotation():Number { return mStartRotation; }
+ public function set startRotation(value:Number):void { mStartRotation = value; }
+
+ public function get startRotationVariance():Number { return mStartRotationVariance; }
+ public function set startRotationVariance(value:Number):void { mStartRotationVariance = value; }
+
+ public function get endRotation():Number { return mEndRotation; }
+ public function set endRotation(value:Number):void { mEndRotation = value; }
+
+ public function get endRotationVariance():Number { return mEndRotationVariance; }
+ public function set endRotationVariance(value:Number):void { mEndRotationVariance = value; }
+
+ public function get speed():Number { return mSpeed; }
+ public function set speed(value:Number):void { mSpeed = value; }
+
+ public function get speedVariance():Number { return mSpeedVariance; }
+ public function set speedVariance(value:Number):void { mSpeedVariance = value; }
+
+ public function get gravityX():Number { return mGravityX; }
+ public function set gravityX(value:Number):void { mGravityX = value; }
+
+ public function get gravityY():Number { return mGravityY; }
+ public function set gravityY(value:Number):void { mGravityY = value; }
+
+ public function get radialAcceleration():Number { return mRadialAcceleration; }
+ public function set radialAcceleration(value:Number):void { mRadialAcceleration = value; }
+
+ public function get radialAccelerationVariance():Number { return mRadialAccelerationVariance; }
+ public function set radialAccelerationVariance(value:Number):void { mRadialAccelerationVariance = value; }
+
+ public function get tangentialAcceleration():Number { return mTangentialAcceleration; }
+ public function set tangentialAcceleration(value:Number):void { mTangentialAcceleration = value; }
+
+ public function get tangentialAccelerationVariance():Number { return mTangentialAccelerationVariance; }
+ public function set tangentialAccelerationVariance(value:Number):void { mTangentialAccelerationVariance = value; }
+
+ public function get maxRadius():Number { return mMaxRadius; }
+ public function set maxRadius(value:Number):void { mMaxRadius = value; }
+
+ public function get maxRadiusVariance():Number { return mMaxRadiusVariance; }
+ public function set maxRadiusVariance(value:Number):void { mMaxRadiusVariance = value; }
+
+ public function get minRadius():Number { return mMinRadius; }
+ public function set minRadius(value:Number):void { mMinRadius = value; }
+
+ public function get rotatePerSecond():Number { return mRotatePerSecond; }
+ public function set rotatePerSecond(value:Number):void { mRotatePerSecond = value; }
+
+ public function get rotatePerSecondVariance():Number { return mRotatePerSecondVariance; }
+ public function set rotatePerSecondVariance(value:Number):void { mRotatePerSecondVariance = value; }
+
+ public function get startColor():ColorArgb { return mStartColor; }
+ public function set startColor(value:ColorArgb):void { mStartColor = value; }
+
+ public function get startColorVariance():ColorArgb { return mStartColorVariance; }
+ public function set startColorVariance(value:ColorArgb):void { mStartColorVariance = value; }
+
+ public function get endColor():ColorArgb { return mEndColor; }
+ public function set endColor(value:ColorArgb):void { mEndColor = value; }
+
+ public function get endColorVariance():ColorArgb { return mEndColorVariance; }
+ public function set endColorVariance(value:ColorArgb):void { mEndColorVariance = value; }
+ }
+}
+
diff --git a/SkeletonAnimationLibraryDemos/src/starling/extensions/Particle.as b/SkeletonAnimationLibraryDemos/src/starling/extensions/Particle.as
new file mode 100644
index 0000000..d85bced
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/src/starling/extensions/Particle.as
@@ -0,0 +1,31 @@
+// =================================================================================================
+//
+// Starling Framework - Particle System Extension
+// Copyright 2011 Gamua OG. All Rights Reserved.
+//
+// This program is free software. You can redistribute and/or modify it
+// in accordance with the terms of the accompanying license agreement.
+//
+// =================================================================================================
+
+package starling.extensions
+{
+ public class Particle
+ {
+ public var x:Number;
+ public var y:Number;
+ public var scale:Number;
+ public var rotation:Number;
+ public var color:uint;
+ public var alpha:Number;
+ public var currentTime:Number;
+ public var totalTime:Number;
+
+ public function Particle()
+ {
+ x = y = rotation = currentTime = 0.0;
+ totalTime = alpha = scale = 1.0;
+ color = 0xffffff;
+ }
+ }
+}
\ No newline at end of file
diff --git a/SkeletonAnimationLibraryDemos/src/starling/extensions/ParticleDesignerPS.as b/SkeletonAnimationLibraryDemos/src/starling/extensions/ParticleDesignerPS.as
new file mode 100644
index 0000000..6491261
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/src/starling/extensions/ParticleDesignerPS.as
@@ -0,0 +1,32 @@
+// =================================================================================================
+//
+// Starling Framework - Particle System Extension
+// Copyright 2012 Gamua OG. All Rights Reserved.
+//
+// This program is free software. You can redistribute and/or modify it
+// in accordance with the terms of the accompanying license agreement.
+//
+// =================================================================================================
+
+package starling.extensions
+{
+ import starling.textures.Texture;
+
+ /** This class is only available for backwards-compatibility.
+ * This was the old name of the 'PDParticleSystem' class. */
+ public class ParticleDesignerPS extends PDParticleSystem
+ {
+ private static var sDeprecationNotified:Boolean = false;
+
+ public function ParticleDesignerPS(config:XML, texture:Texture)
+ {
+ if (!sDeprecationNotified)
+ {
+ sDeprecationNotified = true;
+ trace("[Starling] The class 'ParticleDesignerPS' is deprecated. " +
+ "Please use 'PDParticleSystem' instead.");
+ }
+ super(config, texture);
+ }
+ }
+}
\ No newline at end of file
diff --git a/SkeletonAnimationLibraryDemos/src/starling/extensions/ParticleSystem.as b/SkeletonAnimationLibraryDemos/src/starling/extensions/ParticleSystem.as
new file mode 100644
index 0000000..8c951fc
--- /dev/null
+++ b/SkeletonAnimationLibraryDemos/src/starling/extensions/ParticleSystem.as
@@ -0,0 +1,437 @@
+// =================================================================================================
+//
+// Starling Framework - Particle System Extension
+// Copyright 2012 Gamua OG. All Rights Reserved.
+//
+// This program is free software. You can redistribute and/or modify it
+// in accordance with the terms of the accompanying license agreement.
+//
+// =================================================================================================
+
+package starling.extensions
+{
+ import com.adobe.utils.AGALMiniAssembler;
+
+ import flash.display3D.Context3D;
+ import flash.display3D.Context3DBlendFactor;
+ import flash.display3D.Context3DProgramType;
+ import flash.display3D.Context3DTextureFormat;
+ import flash.display3D.Context3DVertexBufferFormat;
+ import flash.display3D.IndexBuffer3D;
+ import flash.display3D.Program3D;
+ import flash.display3D.VertexBuffer3D;
+ import flash.geom.Matrix;
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+
+ import starling.animation.IAnimatable;
+ import starling.core.RenderSupport;
+ import starling.core.Starling;
+ import starling.display.DisplayObject;
+ import starling.errors.MissingContextError;
+ import starling.events.Event;
+ import starling.textures.Texture;
+ import starling.utils.MatrixUtil;
+ import starling.utils.VertexData;
+
+ /** Dispatched when emission of particles is finished. */
+ [Event(name="complete", type="starling.events.Event")]
+
+ public class ParticleSystem extends DisplayObject implements IAnimatable
+ {
+ private var mTexture:Texture;
+ private var mParticles:Vector.;
+ private var mFrameTime:Number;
+
+ private var mProgram:Program3D;
+ private var mVertexData:VertexData;
+ private var mVertexBuffer:VertexBuffer3D;
+ private var mIndices:Vector.;
+ private var mIndexBuffer:IndexBuffer3D;
+
+ private var mNumParticles:int;
+ private var mMaxCapacity:int;
+ private var mEmissionRate:Number; // emitted particles per second
+ private var mEmissionTime:Number;
+
+ /** Helper objects. */
+ private static var sHelperMatrix:Matrix = new Matrix();
+ private static var sHelperPoint:Point = new Point();
+ private static var sRenderAlpha:Vector. = new [1.0, 1.0, 1.0, 1.0];
+
+ protected var mEmitterX:Number;
+ protected var mEmitterY:Number;
+ protected var mPremultipliedAlpha:Boolean;
+ protected var mBlendFactorSource:String;
+ protected var mBlendFactorDestination:String;
+
+ public function ParticleSystem(texture:Texture, emissionRate:Number,
+ initialCapacity:int=128, maxCapacity:int=8192,
+ blendFactorSource:String=null, blendFactorDest:String=null)
+ {
+ if (texture == null) throw new ArgumentError("texture must not be null");
+
+ mTexture = texture;
+ mPremultipliedAlpha = texture.premultipliedAlpha;
+ mParticles = new Vector.(0, false);
+ mVertexData = new VertexData(0);
+ mIndices = new [];
+ mEmissionRate = emissionRate;
+ mEmissionTime = 0.0;
+ mFrameTime = 0.0;
+ mEmitterX = mEmitterY = 0;
+ mMaxCapacity = Math.min(8192, maxCapacity);
+
+ mBlendFactorDestination = blendFactorDest || Context3DBlendFactor.ONE_MINUS_SOURCE_ALPHA;
+ mBlendFactorSource = blendFactorSource ||
+ (mPremultipliedAlpha ? Context3DBlendFactor.ONE : Context3DBlendFactor.SOURCE_ALPHA);
+
+ createProgram();
+ raiseCapacity(initialCapacity);
+
+ // handle a lost device context
+ Starling.current.stage3D.addEventListener(Event.CONTEXT3D_CREATE,
+ onContextCreated, false, 0, true);
+ }
+
+ public override function dispose():void
+ {
+ Starling.current.stage3D.removeEventListener(Event.CONTEXT3D_CREATE, onContextCreated);
+
+ if (mVertexBuffer) mVertexBuffer.dispose();
+ if (mIndexBuffer) mIndexBuffer.dispose();
+ if (mProgram) mProgram.dispose();
+
+ super.dispose();
+ }
+
+ private function onContextCreated(event:Object):void
+ {
+ createProgram();
+ raiseCapacity(0);
+ }
+
+ protected function createParticle():Particle
+ {
+ return new Particle();
+ }
+
+ protected function initParticle(particle:Particle):void
+ {
+ particle.x = mEmitterX;
+ particle.y = mEmitterY;
+ particle.currentTime = 0;
+ particle.totalTime = 1;
+ particle.color = Math.random() * 0xffffff;
+ }
+
+ protected function advanceParticle(particle:Particle, passedTime:Number):void
+ {
+ particle.y += passedTime * 250;
+ particle.alpha = 1.0 - particle.currentTime / particle.totalTime;
+ particle.scale = 1.0 - particle.alpha;
+ particle.currentTime += passedTime;
+ }
+
+ private function raiseCapacity(byAmount:int):void
+ {
+ var oldCapacity:int = capacity;
+ var newCapacity:int = Math.min(mMaxCapacity, capacity + byAmount);
+ var context:Context3D = Starling.context;
+
+ if (context == null) throw new MissingContextError();
+
+ var baseVertexData:VertexData = new VertexData(4);
+ baseVertexData.setTexCoords(0, 0.0, 0.0);
+ baseVertexData.setTexCoords(1, 1.0, 0.0);
+ baseVertexData.setTexCoords(2, 0.0, 1.0);
+ baseVertexData.setTexCoords(3, 1.0, 1.0);
+ mTexture.adjustVertexData(baseVertexData, 0, 4);
+
+ mParticles.fixed = false;
+ mIndices.fixed = false;
+
+ for (var i:int=oldCapacity; i 0)
+ {
+ var timeBetweenParticles:Number = 1.0 / mEmissionRate;
+ mFrameTime += passedTime;
+
+ while (mFrameTime > 0)
+ {
+ if (mNumParticles < mMaxCapacity)
+ {
+ if (mNumParticles == capacity)
+ raiseCapacity(capacity);
+
+ particle = mParticles[int(mNumParticles++)] as Particle;
+ initParticle(particle);
+ advanceParticle(particle, mFrameTime);
+ }
+
+ mFrameTime -= timeBetweenParticles;
+ }
+
+ if (mEmissionTime != Number.MAX_VALUE)
+ mEmissionTime = Math.max(0.0, mEmissionTime - passedTime);
+ }
+
+ // update vertex data
+
+ var vertexID:int = 0;
+ var color:uint;
+ var alpha:Number;
+ var rotation:Number;
+ var x:Number, y:Number;
+ var xOffset:Number, yOffset:Number;
+ var textureWidth:Number = mTexture.width;
+ var textureHeight:Number = mTexture.height;
+
+ for (var i:int=0; i> 1;
+ yOffset = textureHeight * particle.scale >> 1;
+
+ for (var j:int=0; j<4; ++j)
+ {
+ mVertexData.setColor(vertexID+j, color);
+ mVertexData.setAlpha(vertexID+j, alpha);
+ }
+
+ if (rotation)
+ {
+ var cos:Number = Math.cos(rotation);
+ var sin:Number = Math.sin(rotation);
+ var cosX:Number = cos * xOffset;
+ var cosY:Number = cos * yOffset;
+ var sinX:Number = sin * xOffset;
+ var sinY:Number = sin * yOffset;
+
+ mVertexData.setPosition(vertexID, x - cosX + sinY, y - sinX - cosY);
+ mVertexData.setPosition(vertexID+1, x + cosX + sinY, y + sinX - cosY);
+ mVertexData.setPosition(vertexID+2, x - cosX - sinY, y - sinX + cosY);
+ mVertexData.setPosition(vertexID+3, x + cosX - sinY, y + sinX + cosY);
+ }
+ else
+ {
+ // optimization for rotation == 0
+ mVertexData.setPosition(vertexID, x - xOffset, y - yOffset);
+ mVertexData.setPosition(vertexID+1, x + xOffset, y - yOffset);
+ mVertexData.setPosition(vertexID+2, x - xOffset, y + yOffset);
+ mVertexData.setPosition(vertexID+3, x + xOffset, y + yOffset);
+ }
+ }
+ }
+
+ public override function render(support:RenderSupport, alpha:Number):void
+ {
+ if (mNumParticles == 0) return;
+
+ // always call this method when you write custom rendering code!
+ // it causes all previously batched quads/images to render.
+ support.finishQuadBatch();
+
+ // make this call to keep the statistics display in sync.
+ // to play it safe, it's done in a backwards-compatible way here.
+ if (support.hasOwnProperty("raiseDrawCount"))
+ support.raiseDrawCount();
+
+ alpha *= this.alpha;
+
+ var context:Context3D = Starling.context;
+ var pma:Boolean = texture.premultipliedAlpha;
+
+ sRenderAlpha[0] = sRenderAlpha[1] = sRenderAlpha[2] = pma ? alpha : 1.0;
+ sRenderAlpha[3] = alpha;
+
+ if (context == null) throw new MissingContextError();
+
+ mVertexBuffer.uploadFromVector(mVertexData.rawData, 0, mNumParticles * 4);
+ mIndexBuffer.uploadFromVector(mIndices, 0, mNumParticles * 6);
+
+ context.setBlendFactors(mBlendFactorSource, mBlendFactorDestination);
+ context.setTextureAt(0, mTexture.base);
+
+ context.setProgram(mProgram);
+ context.setProgramConstantsFromMatrix(Context3DProgramType.VERTEX, 0, support.mvpMatrix3D, true);
+ context.setProgramConstantsFromVector(Context3DProgramType.VERTEX, 4, sRenderAlpha, 1);
+ context.setVertexBufferAt(0, mVertexBuffer, VertexData.POSITION_OFFSET, Context3DVertexBufferFormat.FLOAT_2);
+ context.setVertexBufferAt(1, mVertexBuffer, VertexData.COLOR_OFFSET, Context3DVertexBufferFormat.FLOAT_4);
+ context.setVertexBufferAt(2, mVertexBuffer, VertexData.TEXCOORD_OFFSET, Context3DVertexBufferFormat.FLOAT_2);
+
+ context.drawTriangles(mIndexBuffer, 0, mNumParticles * 2);
+
+ context.setTextureAt(0, null);
+ context.setVertexBufferAt(0, null);
+ context.setVertexBufferAt(1, null);
+ context.setVertexBufferAt(2, null);
+ }
+
+ // program management
+
+ private function createProgram():void
+ {
+ var mipmap:Boolean = mTexture.mipMapping;
+ var textureFormat:String = mTexture.format;
+ var context:Context3D = Starling.context;
+
+ if (context == null) throw new MissingContextError();
+ if (mProgram) mProgram.dispose();
+
+ // create vertex and fragment programs from assembly.
+
+ var textureOptions:String = "2d, clamp, linear, " + (mipmap ? "mipnearest" : "mipnone");
+
+ if (textureFormat == Context3DTextureFormat.COMPRESSED)
+ textureOptions += ", dxt1";
+ else if (textureFormat == "compressedAlpha")
+ textureOptions += ", dxt5";
+
+ var vertexProgramCode:String =
+ "m44 op, va0, vc0 \n" + // 4x4 matrix transform to output clipspace
+ "mul v0, va1, vc4 \n" + // multiply color with alpha and pass to fragment program
+ "mov v1, va2 \n"; // pass texture coordinates to fragment program
+
+ var fragmentProgramCode:String =
+ "tex ft1, v1, fs0 <" + textureOptions + "> \n" + // sample texture 0
+ "mul oc, ft1, v0"; // multiply color with texel color
+
+ var vertexProgramAssembler:AGALMiniAssembler = new AGALMiniAssembler();
+ vertexProgramAssembler.assemble(Context3DProgramType.VERTEX, vertexProgramCode);
+
+ var fragmentProgramAssembler:AGALMiniAssembler = new AGALMiniAssembler();
+ fragmentProgramAssembler.assemble(Context3DProgramType.FRAGMENT, fragmentProgramCode);
+
+ mProgram = context.createProgram();
+ mProgram.upload(vertexProgramAssembler.agalcode, fragmentProgramAssembler.agalcode);
+ }
+
+ public function get isEmitting():Boolean { return mEmissionTime > 0 && mEmissionRate > 0; }
+ public function get capacity():int { return mVertexData.numVertices / 4; }
+ public function get numParticles():int { return mNumParticles; }
+
+ public function get maxCapacity():int { return mMaxCapacity; }
+ public function set maxCapacity(value:int):void { mMaxCapacity = Math.min(8192, value); }
+
+ public function get emissionRate():Number { return mEmissionRate; }
+ public function set emissionRate(value:Number):void { mEmissionRate = value; }
+
+ public function get emitterX():Number { return mEmitterX; }
+ public function set emitterX(value:Number):void { mEmitterX = value; }
+
+ public function get emitterY():Number { return mEmitterY; }
+ public function set emitterY(value:Number):void { mEmitterY = value; }
+
+ public function get blendFactorSource():String { return mBlendFactorSource; }
+ public function set blendFactorSource(value:String):void { mBlendFactorSource = value; }
+
+ public function get blendFactorDestination():String { return mBlendFactorDestination; }
+ public function set blendFactorDestination(value:String):void { mBlendFactorDestination = value; }
+
+ public function get texture():Texture { return mTexture; }
+ public function set texture(value:Texture):void { mTexture = value; createProgram(); }
+ }
+}
\ No newline at end of file