Compare commits
79 Commits
versions/1
...
versions/1
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f82e624c8 | |||
| 1e7229e134 | |||
| fbe1fc811e | |||
| 937e1807bc | |||
| 9c853ea943 | |||
| a74b616d21 | |||
| d4de173168 | |||
| 92645a0042 | |||
| cd69f3dcd3 | |||
| 42060d5e00 | |||
| 2743d968a1 | |||
| 020e933092 | |||
| 5f987eeea8 | |||
| 08ac4cc73e | |||
| 5611da7a7c | |||
| 9f7f0e5a2b | |||
| 17a7a1f10e | |||
| 0d42dd1b12 | |||
| 2aa7ca4a0a | |||
| 7638614d33 | |||
| 262e1f8d40 | |||
| 9b89bfc00b | |||
| 6fe301153f | |||
| f342c83a39 | |||
| 36cc95cd60 | |||
| abaaced469 | |||
| 5f24a7dfd9 | |||
| 5f3302b459 | |||
| 4471d05910 | |||
| 9d0846d7dc | |||
| 8142f49e90 | |||
| 4033ca68e8 | |||
| f0fafc4314 | |||
| 47973918ad | |||
| 8b165ba45f | |||
| 0a9aa0c5de | |||
| a56825cf4b | |||
| 90b2d90157 | |||
| 84a7539b56 | |||
| f26d1f1f2e | |||
| 3b775751a2 | |||
| 26fde9fe89 | |||
| f0f18e6aec | |||
| 9ea77def56 | |||
| fa15c96de4 | |||
| a147b74ddf | |||
| 7ef01ccc2e | |||
| ee998c3770 | |||
| 26427f2220 | |||
| 1341a47f09 | |||
| 29dc1b3253 | |||
| 8ca72bf194 | |||
| d5575c005a | |||
| 94c44c37cb | |||
| f9b9acd3b7 | |||
| 26e30e45f2 | |||
| 4451018727 | |||
| b1feaec2c9 | |||
| a38e05f955 | |||
| d591379acc | |||
| 8ded077428 | |||
| 3c5f3784e5 | |||
| 513e477214 | |||
| 55d7df349e | |||
| faff1d4c6e | |||
| 103190fcc7 | |||
| 8867ed855a | |||
| df364244b4 | |||
| 5012b53ac1 | |||
| b7e026e8ff | |||
| 4df50242cc | |||
| 3f4fc9f8aa | |||
| 1976d315c4 | |||
| 1abb0878b9 | |||
| 294c6bba91 | |||
| df9d7ccd43 | |||
| 8981016d57 | |||
| bc8ea51463 | |||
| ce4c644ef2 |
0
.projectile
Normal file
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e3bddf96333643c8a12fd862ebc9ec7
|
||||
guid: 2d8762b6bff92457aa59aaf03193018c
|
||||
folderAsset: yes
|
||||
timeCreated: 1480709542
|
||||
timeCreated: 1487860932
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Elefun/android.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 489500abc518741b59e7a95b93295317
|
||||
timeCreated: 1497866267
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Elefun/open.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d481c08b811dc41eda079968a32efbb9
|
||||
timeCreated: 1487860937
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/DevTests/Animations/AlphaTests/HsiyaoWang.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 541c3fcb14f854b1b842b41a866a6f48
|
||||
folderAsset: yes
|
||||
timeCreated: 1502375163
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e22aa0e3f511949eb89c7ec5ad32c7a3
|
||||
timeCreated: 1502375167
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/DevTests/Animations/AlphaTests/Tests.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 31fd11df111b54e3dbf8f0b135da45d9
|
||||
folderAsset: yes
|
||||
timeCreated: 1494224348
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Tests/Characters_1.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b15c852977e54b3b8b1dfc4fa6fc920
|
||||
timeCreated: 1495641252
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Tests/FX_overlay.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b037662f7f638455d9cc6d4251710ee2
|
||||
timeCreated: 1495627091
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Tests/Torch.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 667a3cd1a987d40d5a4c9b6495da5480
|
||||
timeCreated: 1494255165
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Tests/charexp.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12654680c0cae45d3a44f4fc666262bd
|
||||
timeCreated: 1494492625
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Tests/cyclops_test.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7dc9a5d8bf33d4b30b9a58e370cad87e
|
||||
timeCreated: 1494508632
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Tests/pyromancer_body.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f878ff9c96174385bb57a48f18a6335
|
||||
timeCreated: 1495910510
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Tests/pyromancer_ci.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c82e30d4e993d450f8a475c408afc80f
|
||||
timeCreated: 1495664549
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Tests/pyromancer_head.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89dfadc78afc648c3a5aaf39c5cec6e2
|
||||
timeCreated: 1495655881
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c9df19bccf1d4987a1c2359f55b921f
|
||||
timeCreated: 1495661693
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Tests/tweens.fla
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b209e60e405544f2bbdc7a9db61b81d
|
||||
timeCreated: 1495206863
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Tests/分镜修改版.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8006ea931faa744169bb2c56d2b04da8
|
||||
timeCreated: 1495311730
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Tortuga/cyclop.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b35790b065a454a32a0518138e64d15f
|
||||
timeCreated: 1491582789
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/DevTests/Animations/BugTests.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0af1635387aab4e9cb5b38d8722cecf0
|
||||
folderAsset: yes
|
||||
timeCreated: 1511462526
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 78561fafa47094aea89ba0771c70c41b
|
||||
folderAsset: yes
|
||||
timeCreated: 1511482664
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5cecc5a6be854444ea6d0ee1bac1925f
|
||||
timeCreated: 1511482664
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1 @@
|
||||
> [FlashTools]</b> Parsing swf error: Failed to read past end of stream.
|
||||
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ffe731bf74d034b948a5ec392ba8e284
|
||||
timeCreated: 1476541234
|
||||
guid: 056a3e8eb97b34881be36dd1944cce02
|
||||
timeCreated: 1511482664
|
||||
licenseType: Free
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a63f9772f8c46490c99d421c9b89b497
|
||||
folderAsset: yes
|
||||
timeCreated: 1511483868
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a360ba863a804a399e9cc7a7bf9885f
|
||||
timeCreated: 1511485563
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,3 @@
|
||||
Привет!
|
||||
Принимай материал для исследования)
|
||||
После конвертации получаем файл swf, но он не обрабатывается в Unity, пишет: http://prntscr.com/he4tv1
|
||||
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfa1591b561424bf6a952fcb68bebbc0
|
||||
timeCreated: 1472651507
|
||||
guid: 7db3e6a1b84754816afc32bb06622e8b
|
||||
timeCreated: 1511485563
|
||||
licenseType: Free
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
BIN
Assets/DevTests/Animations/FeatureTests/10_unlocks.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c95e140e6cc841508d2f6a21b33068b
|
||||
timeCreated: 1495287492
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/FeatureTests/9.1_groups.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad3f6a723d9604fe9b44fe73494e6899
|
||||
timeCreated: 1494279688
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/FeatureTests/9.2_groups.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 221b4d2156b3446cbbf03c70db9e69fd
|
||||
timeCreated: 1495746942
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/FeatureTests/9.3_groups.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16c36ac5146fc41799851c3b081b6846
|
||||
timeCreated: 1495749347
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/FeatureTests/9.4_groups.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 137690fcc02e7478f8f0c6733fe7889c
|
||||
timeCreated: 1495903354
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/FeatureTests/9_groups.fla
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95dbb06a4f0c9413480c9e92aba982d3
|
||||
timeCreated: 1494272922
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
103
Assets/FlashTools/Docs/CHANGELOG.md
Normal file
@@ -0,0 +1,103 @@
|
||||
###### Version 1.3.11
|
||||
* Fix trial version in Unity 2017
|
||||
* Fix warnings in Unity 2017
|
||||
* Fix possible mesh leak after scene switch
|
||||
|
||||
###### Version 1.3.10
|
||||
* Fix (conversion error: 'Error: scaleSelection: Argument number 1 is invalid.')
|
||||
* Fix (Parsing swf error: Failed to read past end of stream)
|
||||
* Fix rasterization error with vector graphics in buttons
|
||||
|
||||
###### Version 1.3.9
|
||||
* Not save generated meshes in scene
|
||||
* Fix (At line 908 of file "FTMain.jsfl": ReferenceError: ft is not defined)
|
||||
* Fix warning on add missing components
|
||||
* Replace string shader properties to id
|
||||
* Replace shader "if" instruction to "step"
|
||||
* Replace mask shader "if + discard" instruction to "clip"
|
||||
|
||||
###### Version 1.3.8
|
||||
* Fix shape groups in tweens problems
|
||||
* Fix drawing object shape problems
|
||||
* Fix locked elements problem
|
||||
* Fix optimizator bitmap trim problems
|
||||
* Fix Unity 5.6 submesh sorting bug
|
||||
* Fix convertSelectionToBitmap for big item (over 4000px)
|
||||
* Fix overlay blending mode
|
||||
* Add HD, SD script export
|
||||
* Add shape tween warning
|
||||
* Add SwfClip bounds functions (currentLocalBounds, currentWorldBounds)
|
||||
* Remove excess "if" instruction from shaders
|
||||
* Remove excess animation reimports
|
||||
|
||||
###### Version 1.3.7
|
||||
* Fix multiple import
|
||||
* Fix single frame optimization
|
||||
|
||||
###### Version 1.3.6
|
||||
* Fix for scale very small vector items
|
||||
* Big vector item optimization
|
||||
* More yield instructions and extensions
|
||||
|
||||
###### Version 1.3.5
|
||||
* Fix sprite import problem
|
||||
|
||||
###### Version 1.3.4
|
||||
* Fix CS6 export problem
|
||||
* Fix unity postprocessor problems
|
||||
|
||||
###### Version 1.3.3
|
||||
* Fix undefined unusedItems in CS6
|
||||
|
||||
###### Version 1.3.2
|
||||
* Fix bug custom scale export with small items optimization
|
||||
|
||||
###### Version 1.3.1
|
||||
* Fix some Unity 5.5 deprecated functions
|
||||
|
||||
###### Version 1.3.0
|
||||
* ETC separated alpha support
|
||||
* Export animations with custom scale (for retina)
|
||||
* New small vector scaled items optimization
|
||||
|
||||
###### Version 1.2.0
|
||||
* Add Yield instructions for wait in coroutines(SwfWaitPlayStopped, SwfWaitRewindPlaying, SwfWaitStopPlaying)
|
||||
* Add unscaled delta time support(for separate animations, groups of animations or for all)
|
||||
* Fix guide type flash layers
|
||||
* Some fixes for reconvert asset problem
|
||||
|
||||
###### Version 1.1.1
|
||||
* Add conversion error by shape tween in CS6
|
||||
* Fix life after death (problem about destroying with big lag by frame event)
|
||||
|
||||
###### Version 1.1.0
|
||||
* Sequence separator is anchor frame label (not common frame label)
|
||||
* SwfClip access to frame labels (currentLabelCount, GetCurrentFrameLabel)
|
||||
* SwfClip events (OnChangeClipEvent, OnChangeSequenceEvent, OnChangeCurrentFrameEvent)
|
||||
|
||||
###### Version 1.0.0
|
||||
* Initial asset store version
|
||||
* Sources to dll
|
||||
* Palette bitmaps support
|
||||
|
||||
###### Version 0.5.0
|
||||
* Flash optimizer twicks
|
||||
* Blending modes (except Alpha and Erase)
|
||||
|
||||
###### Version 0.4.0
|
||||
* Clip groups
|
||||
* Fix move assets bug
|
||||
* Tint color for clips
|
||||
* Animation API improvements
|
||||
|
||||
###### Version 0.3.0
|
||||
* Preview for animation assets and clips
|
||||
* Animation API improvements
|
||||
* Memory optimizations
|
||||
|
||||
###### Version 0.2.0
|
||||
* Export optimizations
|
||||
* Export clips with export names
|
||||
|
||||
###### Version 0.1.0
|
||||
* Initial alpha version
|
||||
8
Assets/FlashTools/Docs/CHANGELOG.md.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 309e798efeb2741c6853f2402363a067
|
||||
timeCreated: 1487174180
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,77 +0,0 @@
|
||||
-- Version 1.3.5 --
|
||||
|
||||
Fix sprite import problem
|
||||
|
||||
-- Version 1.3.4 --
|
||||
|
||||
Fix CS6 export problem
|
||||
Fix unity postprocessor problems
|
||||
|
||||
-- Version 1.3.3 --
|
||||
|
||||
Fix undefined unusedItems in CS6
|
||||
|
||||
-- Version 1.3.2 --
|
||||
|
||||
Fix bug custom scale export with small items optimization
|
||||
|
||||
-- Version 1.3.1 --
|
||||
|
||||
Fix some Unity 5.5 deprecated functions
|
||||
|
||||
-- Version 1.3.0 --
|
||||
|
||||
ETC separated alpha support
|
||||
Export animations with custom scale (for retina)
|
||||
New small vector scaled items optimization
|
||||
|
||||
-- Version 1.2.0 --
|
||||
|
||||
Add Yield instructions for wait in coroutines(SwfWaitPlayStopped, SwfWaitRewindPlaying, SwfWaitStopPlaying)
|
||||
Add unscaled delta time support(for separate animations, groups of animations or for all)
|
||||
Fix guide type flash layers
|
||||
Some fixes for reconvert asset problem
|
||||
|
||||
-- Version 1.1.1 --
|
||||
|
||||
Add conversion error by shape tween in CS6
|
||||
Fix life after death (problem about destroying with big lag by frame event)
|
||||
|
||||
-- Version 1.1.0 --
|
||||
|
||||
Sequence separator is anchor frame label (not common frame label)
|
||||
SwfClip access to frame labels (currentLabelCount, GetCurrentFrameLabel)
|
||||
SwfClip events (OnChangeClipEvent, OnChangeSequenceEvent, OnChangeCurrentFrameEvent)
|
||||
|
||||
-- Version 1.0.0 --
|
||||
|
||||
Initial asset store version
|
||||
Sources to dll
|
||||
Palette bitmaps support
|
||||
|
||||
-- Version 0.5.0 --
|
||||
|
||||
Flash optimizer twicks
|
||||
Blending modes (except Alpha and Erase)
|
||||
|
||||
-- Version 0.4.0 --
|
||||
|
||||
Clip groups
|
||||
Fix move assets bug
|
||||
Tint color for clips
|
||||
Animation API improvements
|
||||
|
||||
-- Version 0.3.0 --
|
||||
|
||||
Preview for animation assets and clips
|
||||
Animation API improvements
|
||||
Memory optimizations
|
||||
|
||||
-- Version 0.2.0 --
|
||||
|
||||
Export optimizations
|
||||
Export clips with export names
|
||||
|
||||
-- Version 0.1.0 --
|
||||
|
||||
Initial alpha version
|
||||
33
Assets/FlashTools/Docs/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
##### Flash Animation Toolset
|
||||
|
||||
Convert your flash animation for Unity easy!
|
||||
|
||||
* [Usage video](http://www.youtube.com/watch?v=uE_XRWZ5KHA)
|
||||
|
||||
* [Blog](http://matov.me)
|
||||
* [Site](http://matov.me/flash-animation-toolset)
|
||||
* [Web demo](http://matov.me/public/blog_share/flash_tools/web_demo)
|
||||
* [User guide](http://matov.me/flash-animation-toolset-user-guide)
|
||||
|
||||
* [Trial version](https://www.assetstore.unity3d.com/#!/content/73896)
|
||||
* [Full version](https://www.assetstore.unity3d.com/#!/content/73323)
|
||||
|
||||
###### Features
|
||||
* Support all transformations like 'rotation', 'skew' and 'scale' (except 3D)
|
||||
* Support all tweens(classic, motion and etc), keyframes and layers
|
||||
* Support mask layers
|
||||
* Support bitmap and vector graphics
|
||||
* Support all clip color effects like 'brightness', 'tint', 'alpha' and etc
|
||||
* Support most blending modes (all except Alpha and Erase)
|
||||
* Simple runtime API for controlling your animations in Unity
|
||||
* Automatic packing texture atlases of animations with different settings
|
||||
* Great performance with zero allocations in update loop
|
||||
* Frame labels to separate sequences in one timeline
|
||||
* Export marked "for export" clips and main timeline
|
||||
* Live preview of animations in the Unity editor
|
||||
|
||||
Supports Unity 5.3 and newer, both Personal and Pro. Full C# source code included.
|
||||
|
||||
Leave your rating for this Asset. It is very important for me and the development of the project :) Thank you!
|
||||
|
||||
Samples use "Creative Commons CC0 1.0 Universal License" animations from [Glitch game](http://www.glitchthegame.com/public-domain-game-art)
|
||||
8
Assets/FlashTools/Docs/README.md.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 67cb565c063ff409697ad8b538d2a46a
|
||||
timeCreated: 1487174181
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,35 +0,0 @@
|
||||
-----------------------------
|
||||
-- Flash Animation Toolset --
|
||||
-----------------------------
|
||||
|
||||
Convert your flash animation for Unity easy!
|
||||
|
||||
- Usage video "http://www.youtube.com/watch?v=uE_XRWZ5KHA"
|
||||
|
||||
- Blog "http://matov.me"
|
||||
- Site "http://matov.me/flash-animation-toolset"
|
||||
- Web demo "http://matov.me/public/blog_share/flash_tools/web_demo"
|
||||
- User guide "http://matov.me/flash-animation-toolset-user-guide"
|
||||
|
||||
- Trial version https://www.assetstore.unity3d.com/#!/content/73896
|
||||
- Full version https://www.assetstore.unity3d.com/#!/content/73323
|
||||
|
||||
Features
|
||||
- Support all transformations like 'rotation', 'skew' and 'scale' (except 3D)
|
||||
- Support all tweens(classic, motion and etc), keyframes and layers
|
||||
- Support mask layers
|
||||
- Support bitmap and vector graphics
|
||||
- Support all clip color effects like 'brightness', 'tint', 'alpha' and etc
|
||||
- Support most blending modes (all except Alpha and Erase)
|
||||
- Simple runtime API for controlling your animations in Unity
|
||||
- Automatic packing texture atlases of animations with different settings
|
||||
- Great performance with zero allocations in update loop
|
||||
- Frame labels to separate sequences in one timeline
|
||||
- Export marked "for export" clips and main timeline
|
||||
- Live preview of animations in the Unity editor
|
||||
|
||||
Supports Unity 5.3 and newer, both Personal and Pro. Full C# source code included.
|
||||
|
||||
Leave your rating for this Asset. It is very important for me and the development of the project :) Thank you!
|
||||
|
||||
Samples use "Creative Commons CC0 1.0 Universal License" animations from Glitch game "http://www.glitchthegame.com/public-domain-game-art"
|
||||
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 29 KiB |
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e336e165518cf4d8680e2fff9c6b59ba
|
||||
timeCreated: 1486894953
|
||||
timeCreated: 1514922180
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
@@ -37,9 +37,10 @@ TextureImporter:
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
|
||||
@@ -22,14 +22,94 @@ MonoBehaviour:
|
||||
MeshData:
|
||||
SubMeshes:
|
||||
- StartVertex: 0
|
||||
IndexCount: 6
|
||||
IndexCount: 126
|
||||
Vertices:
|
||||
- {x: 0.028839836, y: -0.03892601}
|
||||
- {x: 0.9771797, y: -0.03892601}
|
||||
- {x: 0.9771797, y: -0.8959397}
|
||||
- {x: 0.028839836, y: -0.8959397}
|
||||
UVs: 00000000ff4aff52
|
||||
AddColors: 0000000000000000
|
||||
MulColors: 0002000200020002
|
||||
- {x: 0.093291655, y: -0.5527766}
|
||||
- {x: 0.5906427, y: -0.49855503}
|
||||
- {x: 0.5825955, y: -0.7595181}
|
||||
- {x: 0.08524446, y: -0.81373966}
|
||||
- {x: 0.6724206, y: -0.36256573}
|
||||
- {x: 0.8942103, y: -0.48526812}
|
||||
- {x: 0.7557899, y: -0.7355155}
|
||||
- {x: 0.5340002, y: -0.6128131}
|
||||
- {x: 0.66955954, y: -0.7525534}
|
||||
- {x: 0.8318795, y: -0.6832502}
|
||||
- {x: 0.8691911, y: -0.79836786}
|
||||
- {x: 0.70687115, y: -0.8676711}
|
||||
- {x: 0.43360725, y: -0.12802117}
|
||||
- {x: 0.88885266, y: -0.18992838}
|
||||
- {x: 0.80472267, y: -0.8087083}
|
||||
- {x: 0.3494773, y: -0.7468011}
|
||||
- {x: 0.37824008, y: -0.69763076}
|
||||
- {x: 0.49014634, y: -0.8738549}
|
||||
- {x: 0.38391614, y: -0.941326}
|
||||
- {x: 0.27200988, y: -0.76510197}
|
||||
- {x: 0.4438706, y: -0.5868737}
|
||||
- {x: 0.56574404, y: -0.6853528}
|
||||
- {x: 0.45655966, y: -0.82049984}
|
||||
- {x: 0.33468625, y: -0.7220208}
|
||||
- {x: 0.6787334, y: -0.4077256}
|
||||
- {x: 0.7619559, y: -0.41904274}
|
||||
- {x: 0.74033403, y: -0.5780727}
|
||||
- {x: 0.6571115, y: -0.5667556}
|
||||
- {x: 0.46749952, y: -0.34338287}
|
||||
- {x: 0.7503639, y: -0.3818486}
|
||||
- {x: 0.7349386, y: -0.49530196}
|
||||
- {x: 0.4520743, y: -0.45683625}
|
||||
- {x: 0.86364335, y: -0.09722355}
|
||||
- {x: 0.96060354, y: -0.09934438}
|
||||
- {x: 0.9590185, y: -0.17182186}
|
||||
- {x: 0.86205834, y: -0.16970102}
|
||||
- {x: 0.5517408, y: -0.22355518}
|
||||
- {x: 1.0120615, y: -0.23362388}
|
||||
- {x: 1.0079622, y: -0.42106485}
|
||||
- {x: 0.54764163, y: -0.41099614}
|
||||
- {x: 0.49390063, y: -0.07256326}
|
||||
- {x: 1.039184, y: -0.08449037}
|
||||
- {x: 1.032505, y: -0.38989362}
|
||||
- {x: 0.48722172, y: -0.3779665}
|
||||
- {x: 0.6388158, y: -0.13516656}
|
||||
- {x: 0.7662644, y: -0.13795426}
|
||||
- {x: 0.7637611, y: -0.25242078}
|
||||
- {x: 0.63631254, y: -0.24963307}
|
||||
- {x: 0.69845474, y: -0.20390525}
|
||||
- {x: 0.7184471, y: -0.20434254}
|
||||
- {x: 0.7180098, y: -0.22433674}
|
||||
- {x: 0.6980175, y: -0.22389945}
|
||||
- {x: 0.7316064, y: -0.20348743}
|
||||
- {x: 0.74759996, y: -0.20383726}
|
||||
- {x: 0.74697685, y: -0.23232873}
|
||||
- {x: 0.7309833, y: -0.2319789}
|
||||
- {x: 0.6183724, y: -0.18158044}
|
||||
- {x: 0.7728118, y: -0.18495853}
|
||||
- {x: 0.77112836, y: -0.26193565}
|
||||
- {x: 0.61668897, y: -0.2585576}
|
||||
- {x: 0.6127337, y: -0.099736005}
|
||||
- {x: 0.7977926, y: -0.10378384}
|
||||
- {x: 0.79564387, y: -0.20203815}
|
||||
- {x: 0.610585, y: -0.19799031}
|
||||
- {x: 0.507205, y: -0.11742941}
|
||||
- {x: 1.0924743, y: -0.13023114}
|
||||
- {x: 1.088419, y: -0.31567165}
|
||||
- {x: 0.50314957, y: -0.30286992}
|
||||
- {x: 0.42519823, y: -0.00019747685}
|
||||
- {x: 0.9140025, y: -0.010889203}
|
||||
- {x: 0.90442663, y: -0.44875968}
|
||||
- {x: 0.41562238, y: -0.43806794}
|
||||
- {x: 0.4386289, y: -0.40727332}
|
||||
- {x: 0.5306043, y: -0.40566462}
|
||||
- {x: 0.53292096, y: -0.5381406}
|
||||
- {x: 0.44094557, y: -0.53974926}
|
||||
- {x: 0.46142825, y: -0.5042712}
|
||||
- {x: 0.6632915, y: -0.4016091}
|
||||
- {x: 0.7555196, y: -0.58299005}
|
||||
- {x: 0.5536564, y: -0.68565214}
|
||||
- {x: 0.029411115, y: -0.035497963}
|
||||
- {x: 0.97329503, y: -0.035497963}
|
||||
- {x: 0.97329503, y: -0.8919796}
|
||||
- {x: 0.029411115, y: -0.8919796}
|
||||
UVs: 0000ffbfff19fff1ff56ff37ff73ff50ff1affecff26fffe0000ff5eff3dff8cff1affbfff27ffd4ff52ff76ff65ff87ff56ff51ff66ff59ff67ff5eff72ff7bff76ff0fff7dff19ff3eff5eff51ff8cff560000ff75ff36ff73ff5eff7eff6bff7aff1aff7cff1cff76ff1aff79ff1cff760000ff7eff0eff1affd5ff26ffebff2cff8dff3fffc80000ff8dff2bffbeff67ff51ff74ff5aff52ff5eff66ff7500000000ff55ff5d
|
||||
AddColors: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
MulColors: 000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200020002
|
||||
Materials:
|
||||
- {fileID: 2100000, guid: d58d9a5e482e8429f8d7d18a9538d94a, type: 2}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a25723a1cd8b141a6b489606584a6f65
|
||||
timeCreated: 1480707413
|
||||
timeCreated: 1494801036
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
|
||||
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 66 KiB |
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1278c7f98af44db8a86e620305eb32b
|
||||
timeCreated: 1486894967
|
||||
timeCreated: 1514922177
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
@@ -37,9 +37,10 @@ TextureImporter:
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
|
||||
@@ -22,114 +22,154 @@ MonoBehaviour:
|
||||
MeshData:
|
||||
SubMeshes:
|
||||
- StartVertex: 0
|
||||
IndexCount: 6
|
||||
- StartVertex: 4
|
||||
IndexCount: 6
|
||||
- StartVertex: 8
|
||||
IndexCount: 24
|
||||
- StartVertex: 24
|
||||
IndexCount: 6
|
||||
- StartVertex: 28
|
||||
IndexCount: 156
|
||||
Vertices:
|
||||
- {x: 0.106315956, y: 0.12643726}
|
||||
- {x: 0.2629222, y: 0.12643726}
|
||||
- {x: 0.2629222, y: 0.0341479}
|
||||
- {x: 0.106315956, y: 0.0341479}
|
||||
- {x: 0.06176914, y: 0.14451343}
|
||||
- {x: 0.30489662, y: 0.14451343}
|
||||
- {x: 0.30489662, y: 0.05434666}
|
||||
- {x: 0.06176914, y: 0.05434666}
|
||||
- {x: 0.096862756, y: 0.1299182}
|
||||
- {x: 0.1545074, y: 0.1299182}
|
||||
- {x: 0.1545074, y: 0.050229903}
|
||||
- {x: 0.096862756, y: 0.050229903}
|
||||
- {x: 0.17279011, y: 0.12516041}
|
||||
- {x: 0.19912747, y: 0.12392976}
|
||||
- {x: 0.19211169, y: 0.04833745}
|
||||
- {x: 0.16577433, y: 0.049568094}
|
||||
- {x: 0.19564708, y: 0.121027105}
|
||||
- {x: 0.23835461, y: 0.12022791}
|
||||
- {x: 0.23566528, y: 0.048127156}
|
||||
- {x: 0.19295773, y: 0.048926346}
|
||||
- {x: 0.20316595, y: 0.11463966}
|
||||
- {x: 0.24947853, y: 0.11463966}
|
||||
- {x: 0.24947853, y: 0.047944065}
|
||||
- {x: 0.20316595, y: 0.047944065}
|
||||
- {x: 0.06176914, y: 0.14451343}
|
||||
- {x: 0.30489662, y: 0.14451343}
|
||||
- {x: 0.30489662, y: 0.05434666}
|
||||
- {x: 0.06176914, y: 0.05434666}
|
||||
- {x: 0.17883545, y: -0.33088514}
|
||||
- {x: 0.27845198, y: -0.41441038}
|
||||
- {x: 0.18850175, y: -0.5216897}
|
||||
- {x: 0.0888852, y: -0.4381645}
|
||||
- {x: 0.27924088, y: -0.41507185}
|
||||
- {x: 0.19028847, y: -0.52116114}
|
||||
- {x: 0.08988304, y: -0.43697444}
|
||||
- {x: 0.04699825, y: -0.5018102}
|
||||
- {x: 0.13128917, y: -0.5724854}
|
||||
- {x: 0.041338928, y: -0.67976475}
|
||||
- {x: -0.042951997, y: -0.60908955}
|
||||
- {x: 0.13262679, y: -0.57360697}
|
||||
- {x: 0.04558219, y: -0.67742085}
|
||||
- {x: -0.040046353, y: -0.60562414}
|
||||
- {x: 0.28633544, y: -0.32388517}
|
||||
- {x: 0.3936148, y: -0.4138354}
|
||||
- {x: 0.31008956, y: -0.51345193}
|
||||
- {x: 0.20281021, y: -0.4235017}
|
||||
- {x: 0.21864823, y: -0.34363583}
|
||||
- {x: 0.30293915, y: -0.41431102}
|
||||
- {x: 0.23868898, y: -0.49093914}
|
||||
- {x: 0.15439805, y: -0.42026395}
|
||||
- {x: 0.122, y: -0.39949995}
|
||||
- {x: 0.412, y: -0.39949995}
|
||||
- {x: 0.412, y: -0.7594999}
|
||||
- {x: 0.122, y: -0.7594999}
|
||||
- {x: 0.3912854, y: -0.4118823}
|
||||
- {x: 0.30582932, y: -0.5138017}
|
||||
- {x: 0.20087935, y: -0.42580456}
|
||||
- {x: 0.22631103, y: -0.35006085}
|
||||
- {x: 0.30587783, y: -0.41677502}
|
||||
- {x: 0.23916365, y: -0.49634182}
|
||||
- {x: 0.15959686, y: -0.42962766}
|
||||
- {x: 0.122, y: -0.40399995}
|
||||
- {x: 0.40749973, y: -0.40399995}
|
||||
- {x: 0.40749973, y: -0.7604953}
|
||||
- {x: 0.122, y: -0.7604953}
|
||||
- {x: 0.2266193, y: -0.65309644}
|
||||
- {x: 0.32225987, y: -0.60883987}
|
||||
- {x: 0.35238072, y: -0.7319035}
|
||||
- {x: 0.25674015, y: -0.7761601}
|
||||
- {x: 0.32643726, y: -0.6069068}
|
||||
- {x: 0.3576628, y: -0.7344838}
|
||||
- {x: 0.2578448, y: -0.7806734}
|
||||
- {x: 0.173, y: -0.71999997}
|
||||
- {x: 0.313, y: -0.71999997}
|
||||
- {x: 0.313, y: -0.79999995}
|
||||
- {x: 0.173, y: -0.79999995}
|
||||
- {x: 0.31064036, y: -0.71999997}
|
||||
- {x: 0.31064036, y: -0.79705167}
|
||||
- {x: 0.173, y: -0.79705167}
|
||||
- {x: 0.2075, y: -0.69649994}
|
||||
- {x: 0.3075, y: -0.69649994}
|
||||
- {x: 0.3075, y: -0.76649994}
|
||||
- {x: 0.2075, y: -0.76649994}
|
||||
- {x: 0.19299999, y: -0.6795}
|
||||
- {x: 0.30299997, y: -0.6795}
|
||||
- {x: 0.30299997, y: -0.7295}
|
||||
- {x: 0.19299999, y: -0.7295}
|
||||
- {x: 0.3041623, y: -0.69649994}
|
||||
- {x: 0.3041623, y: -0.7633929}
|
||||
- {x: 0.2075, y: -0.7633929}
|
||||
- {x: 0.19299999, y: -0.66949993}
|
||||
- {x: 0.30682567, y: -0.66949993}
|
||||
- {x: 0.30682567, y: -0.71853286}
|
||||
- {x: 0.19299999, y: -0.71853286}
|
||||
- {x: 0.315, y: -0.63199997}
|
||||
- {x: 0.45499998, y: -0.63199997}
|
||||
- {x: 0.45499998, y: -0.732}
|
||||
- {x: 0.315, y: -0.732}
|
||||
- {x: 0.45133758, y: -0.63199997}
|
||||
- {x: 0.45133758, y: -0.73108685}
|
||||
- {x: 0.315, y: -0.73108685}
|
||||
- {x: 0.305, y: -0.752}
|
||||
- {x: 0.45499998, y: -0.752}
|
||||
- {x: 0.45499998, y: -0.83199996}
|
||||
- {x: 0.305, y: -0.83199996}
|
||||
- {x: 0.44998062, y: -0.752}
|
||||
- {x: 0.44998062, y: -0.8315501}
|
||||
- {x: 0.305, y: -0.8315501}
|
||||
- {x: 0.337, y: -0.71599996}
|
||||
- {x: 0.447, y: -0.71599996}
|
||||
- {x: 0.447, y: -0.77599996}
|
||||
- {x: 0.337, y: -0.77599996}
|
||||
- {x: 0.3195, y: -0.70399994}
|
||||
- {x: 0.4495, y: -0.70399994}
|
||||
- {x: 0.4495, y: -0.74399996}
|
||||
- {x: 0.3195, y: -0.74399996}
|
||||
- {x: 0.18099998, y: -0.36449996}
|
||||
- {x: 0.571, y: -0.36449996}
|
||||
- {x: 0.571, y: -0.6744999}
|
||||
- {x: 0.18099998, y: -0.6744999}
|
||||
- {x: 0.3995, y: -0.32349998}
|
||||
- {x: 0.6395, y: -0.32349998}
|
||||
- {x: 0.6395, y: -0.8135}
|
||||
- {x: 0.3995, y: -0.8135}
|
||||
- {x: 0.1625, y: -0.49149996}
|
||||
- {x: 0.5925, y: -0.49149996}
|
||||
- {x: 0.5925, y: -0.6514999}
|
||||
- {x: 0.1625, y: -0.6514999}
|
||||
- {x: 0.13650002, y: 0.087000005}
|
||||
- {x: 0.6465, y: 0.087000005}
|
||||
- {x: 0.6465, y: -0.45299998}
|
||||
- {x: 0.13650002, y: -0.45299998}
|
||||
- {x: 0.442047, y: -0.71599996}
|
||||
- {x: 0.442047, y: -0.7778359}
|
||||
- {x: 0.337, y: -0.7778359}
|
||||
- {x: 0.3295, y: -0.70399994}
|
||||
- {x: 0.46136615, y: -0.70399994}
|
||||
- {x: 0.46136615, y: -0.7479553}
|
||||
- {x: 0.3295, y: -0.7479553}
|
||||
- {x: 0.17849998, y: -0.36099997}
|
||||
- {x: 0.5664945, y: -0.36099997}
|
||||
- {x: 0.5664945, y: -0.67049855}
|
||||
- {x: 0.17849998, y: -0.67049855}
|
||||
- {x: 0.40300003, y: -0.32099998}
|
||||
- {x: 0.6404988, y: -0.32099998}
|
||||
- {x: 0.6404988, y: -0.8089962}
|
||||
- {x: 0.40300003, y: -0.8089962}
|
||||
- {x: 0.1575, y: -0.49599996}
|
||||
- {x: 0.5875, y: -0.49599996}
|
||||
- {x: 0.5875, y: -0.65249896}
|
||||
- {x: 0.1575, y: -0.65249896}
|
||||
- {x: 0.13700001, y: 0.08049999}
|
||||
- {x: 0.65149796, y: 0.08049999}
|
||||
- {x: 0.65149796, y: -0.45499286}
|
||||
- {x: 0.13700001, y: -0.45499286}
|
||||
- {x: 0.262, y: -0.17849998}
|
||||
- {x: 0.362, y: -0.17849998}
|
||||
- {x: 0.362, y: -0.28849998}
|
||||
- {x: 0.262, y: -0.28849998}
|
||||
- {x: 0.36318973, y: -0.17849998}
|
||||
- {x: 0.36318973, y: -0.2919961}
|
||||
- {x: 0.262, y: -0.2919961}
|
||||
- {x: 0.13250002, y: -0.16}
|
||||
- {x: 0.22250001, y: -0.16}
|
||||
- {x: 0.22250001, y: -0.28}
|
||||
- {x: 0.13250002, y: -0.28}
|
||||
- {x: 0.21949664, y: -0.16}
|
||||
- {x: 0.21949664, y: -0.27586058}
|
||||
- {x: 0.13250002, y: -0.27586058}
|
||||
- {x: 0.11150001, y: -0.17449999}
|
||||
- {x: 0.5215, y: -0.17449999}
|
||||
- {x: 0.5215, y: -0.48449996}
|
||||
- {x: 0.11150001, y: -0.48449996}
|
||||
- {x: 0.09650002, y: 0.017000007}
|
||||
- {x: 0.5265, y: 0.017000007}
|
||||
- {x: 0.5265, y: -0.33299997}
|
||||
- {x: 0.09650002, y: -0.33299997}
|
||||
- {x: -0.020737303, y: -0.44349837}
|
||||
- {x: 0.3277887, y: -0.47559524}
|
||||
- {x: 0.30486238, y: -0.7245424}
|
||||
- {x: -0.043663636, y: -0.6924455}
|
||||
- {x: 0.4193734, y: -0.45619494}
|
||||
- {x: 0.559305, y: -0.45187333}
|
||||
- {x: 0.56331795, y: -0.5818099}
|
||||
- {x: 0.4233863, y: -0.58613145}
|
||||
- {x: 0.31538656, y: -0.5147328}
|
||||
- {x: 0.45426717, y: -0.5323866}
|
||||
- {x: 0.43661335, y: -0.6712672}
|
||||
- {x: 0.29773277, y: -0.6536134}
|
||||
- {x: 0.52488655, y: -0.17449999}
|
||||
- {x: 0.52488655, y: -0.48745242}
|
||||
- {x: 0.11150001, y: -0.48745242}
|
||||
- {x: 0.09200001, y: 0.015500011}
|
||||
- {x: 0.5254972, y: 0.015500011}
|
||||
- {x: 0.5254972, y: -0.3314986}
|
||||
- {x: 0.09200001, y: -0.3314986}
|
||||
- {x: -0.016302101, y: -0.44440895}
|
||||
- {x: 0.33271846, y: -0.47655135}
|
||||
- {x: 0.31025076, y: -0.72051847}
|
||||
- {x: -0.038769808, y: -0.68837607}
|
||||
- {x: 0.42293343, y: -0.45808592}
|
||||
- {x: 0.5598651, y: -0.45385697}
|
||||
- {x: 0.5639706, y: -0.5867913}
|
||||
- {x: 0.4270389, y: -0.5910202}
|
||||
- {x: 0.31725287, y: -0.5119459}
|
||||
- {x: 0.4556355, y: -0.5295364}
|
||||
- {x: 0.43754044, y: -0.6718882}
|
||||
- {x: 0.29915783, y: -0.6542977}
|
||||
- {x: 0.37866077, y: -0.5215725}
|
||||
- {x: 0.47755602, y: -0.50675315}
|
||||
- {x: 0.49533924, y: -0.6254274}
|
||||
- {x: 0.39644396, y: -0.6402468}
|
||||
- {x: 0.26616642, y: -0.5326745}
|
||||
- {x: 0.36073795, y: -0.58885443}
|
||||
- {x: 0.2892362, y: -0.7092182}
|
||||
- {x: 0.19466466, y: -0.65303826}
|
||||
UVs: ffbaff22ffc17f29fff7ff05fffe7f0bffbaff297fc1ff307fe57f0c7feaff117f3c7fc87f4effd6ffeaff11ffefff167fbeff417fc2ff48fff07f117ff47f167f4c7fabff4effb07f497fd77f4e7fde7fbeff317fc27f397f4c7fa57f4fffaa7f4c7fc17f4effc77f3c7fb4ff4bffc7ffde00007ff7ff0bff447fe9ff4cfffe7fc300007fde7f19ffea7f0c7ff07f11fff07f0cfff6ff107f3c7f9fff4bffb37f3c7f89ff4dff9e7f3c7fd7ff48ffe8ffbaff297fc1ff30ffba7f1bffc17f22ffde7f0cffe47f11fff70000fffe7f05
|
||||
AddColors: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
MulColors: 00020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002
|
||||
- {x: 0.47597006, y: -0.5069908}
|
||||
- {x: 0.49384904, y: -0.6263043}
|
||||
- {x: 0.39653975, y: -0.640886}
|
||||
- {x: 0.26679638, y: -0.53944594}
|
||||
- {x: 0.36222652, y: -0.596136}
|
||||
- {x: 0.29327887, y: -0.7122002}
|
||||
- {x: 0.19784872, y: -0.6555102}
|
||||
UVs: ffa000007ff37f63000000007f507f9a0000ff9a7f477fbfffa0ff63ffe4ff740000ffdd7f40fff80000ffbf7f3b7fdd000000007f507f9afff3ff27fffa7f2e7f437fd77f4affdcfff3ff2e7ffaff35ff4a7fd77f50ffdcffb97f75ffcbff83ff47fff17f4f7ff9fff3ff157ff9ff1ffff9ff15fffeff1cfff3ff457ff7ff4dff40fff17f47fffaff47ffb0ff4d7fbb7ffb7f207fff7f277ffc00007fffff08ff40ffdd7f507ff1ffa07f757fb97f81fff30000fffb7f15ff507f89ff6bffa27f077ff97f0dfffe00007ff9ff06fffeff3bffbf7f4dffd67fe5ff63fff67f797fcc7f75ffd8ff86fff3ff2e7ffaff35fff37f20fffa7f27ff0d7ff9ff137ffeff3b7fd7ff42ffdc
|
||||
AddColors: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
MulColors: 000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002
|
||||
Materials:
|
||||
- {fileID: 2100000, guid: d58d9a5e482e8429f8d7d18a9538d94a, type: 2}
|
||||
- {fileID: 2100000, guid: 3c29e337d2fa54be7af8d125c34562b7, type: 2}
|
||||
- {fileID: 2100000, guid: fd62ebda9455442f4a7861e78484f3b6, type: 2}
|
||||
- {fileID: 2100000, guid: 69837dba6d9e9419a8e22a6b25de0008, type: 2}
|
||||
- {fileID: 2100000, guid: d58d9a5e482e8429f8d7d18a9538d94a, type: 2}
|
||||
|
||||
|
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 1.4 MiB |
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a799322aa44e44b38980bc9d307f0c38
|
||||
timeCreated: 1486894960
|
||||
timeCreated: 1514922168
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
@@ -37,9 +37,10 @@ TextureImporter:
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
|
||||
@@ -22,22 +22,154 @@ MonoBehaviour:
|
||||
MeshData:
|
||||
SubMeshes:
|
||||
- StartVertex: 0
|
||||
IndexCount: 18
|
||||
IndexCount: 216
|
||||
Vertices:
|
||||
- {x: 1.139, y: -2.095}
|
||||
- {x: 1.2790855, y: -2.095}
|
||||
- {x: 1.2790855, y: -2.8981402}
|
||||
- {x: 1.139, y: -2.8981402}
|
||||
- {x: 1.1025, y: -1.056}
|
||||
- {x: 1.3759177, y: -1.056}
|
||||
- {x: 1.3759177, y: -2.7861564}
|
||||
- {x: 1.1025, y: -2.7861564}
|
||||
- {x: 1.126, y: -1.0004998}
|
||||
- {x: 1.5205874, y: -1.0004998}
|
||||
- {x: 1.5205874, y: -2.9477496}
|
||||
- {x: 1.126, y: -2.9477496}
|
||||
- {x: 0.8705, y: -1.6520001}
|
||||
- {x: 1.2186888, y: -1.6520001}
|
||||
- {x: 1.2186888, y: -2.4983816}
|
||||
- {x: 0.8705, y: -2.4983816}
|
||||
- {x: 1.0625, y: -1.0354998}
|
||||
- {x: 1.3845642, y: -1.0354998}
|
||||
- {x: 1.3845642, y: -2.7268858}
|
||||
- {x: 1.0625, y: -2.7268858}
|
||||
- {x: 1.253, y: -1.2565002}
|
||||
- {x: 1.4584018, y: -1.2565002}
|
||||
- {x: 1.4584018, y: -3.0470023}
|
||||
- {x: 1.253, y: -3.0470023}
|
||||
- {x: 1.563, y: -2.0925}
|
||||
- {x: 1.7030854, y: -2.0925}
|
||||
- {x: 1.7030854, y: -2.8960884}
|
||||
- {x: 1.563, y: -2.8960884}
|
||||
- {x: 1.4990001, y: -1.0945001}
|
||||
- {x: 1.7719691, y: -1.0945001}
|
||||
- {x: 1.7719691, y: -2.8084314}
|
||||
- {x: 1.4990001, y: -2.8084314}
|
||||
- {x: 1.35, y: -1.0004998}
|
||||
- {x: 1.7445874, y: -1.0004998}
|
||||
- {x: 1.7445874, y: -2.9477496}
|
||||
- {x: 1.35, y: -2.9477496}
|
||||
- {x: 1.549, y: -1.547}
|
||||
- {x: 1.8971888, y: -1.547}
|
||||
- {x: 1.8971888, y: -2.3933816}
|
||||
- {x: 1.549, y: -2.3933816}
|
||||
- {x: 1.4805, y: -1.1229999}
|
||||
- {x: 1.8025641, y: -1.1229999}
|
||||
- {x: 1.8025641, y: -2.8139558}
|
||||
- {x: 1.4805, y: -2.8139558}
|
||||
- {x: 1.4475, y: -1.1140002}
|
||||
- {x: 1.6529018, y: -1.1140002}
|
||||
- {x: 1.6529018, y: -2.812595}
|
||||
- {x: 1.4475, y: -2.812595}
|
||||
- {x: 0.5695001, y: 0.005499954}
|
||||
- {x: 1.5321016, y: 0.005499954}
|
||||
- {x: 1.5321016, y: -0.96880054}
|
||||
- {x: 0.5695001, y: -0.96880054}
|
||||
- {x: 1.3535, y: 0.005499954}
|
||||
- {x: 2.3156445, y: 0.005499954}
|
||||
- {x: 2.3156445, y: -0.96880054}
|
||||
- {x: 1.3535, y: -0.96880054}
|
||||
- {x: -0.0025, y: -0.82850003}
|
||||
- {x: 1.305124, y: -0.82850003}
|
||||
- {x: 1.305124, y: -1.5514493}
|
||||
- {x: -0.0025, y: -1.5514493}
|
||||
- {x: 1.54, y: -0.829}
|
||||
- {x: 2.847624, y: -0.829}
|
||||
- {x: 2.847624, y: -1.5519493}
|
||||
- {x: 1.54, y: -1.5519493}
|
||||
- {x: 1.4375, y: -1.4825}
|
||||
- {x: 2.5618057, y: -1.4825}
|
||||
- {x: 2.5618057, y: -2.2865365}
|
||||
- {x: 1.4375, y: -2.2865365}
|
||||
- {x: 0.36249998, y: -1.4825}
|
||||
- {x: 1.4868057, y: -1.4825}
|
||||
- {x: 1.4868057, y: -2.2869847}
|
||||
- {x: 0.36249998, y: -2.2869847}
|
||||
- {x: 0.7260001, y: -1.1345}
|
||||
- {x: 2.1597319, y: -1.1345}
|
||||
- {x: 2.1597319, y: -1.9128515}
|
||||
- {x: 0.7260001, y: -1.9128515}
|
||||
- {x: 0.778, y: -1.3199999}
|
||||
- {x: 2.1261826, y: -1.3199999}
|
||||
- {x: 2.1261826, y: -1.8591814}
|
||||
- {x: 0.778, y: -1.8591814}
|
||||
- {x: 0.66600007, y: -0.48749998}
|
||||
- {x: 2.2209303, y: -0.48749998}
|
||||
- {x: 2.2209303, y: -1.3311706}
|
||||
- {x: 0.66600007, y: -1.3311706}
|
||||
- {x: 0.7415001, y: -0.57449996}
|
||||
- {x: 2.1793175, y: -0.57449996}
|
||||
- {x: 2.1793175, y: -1.3046691}
|
||||
- {x: 0.7415001, y: -1.3046691}
|
||||
- {x: 0.7995001, y: -1.148}
|
||||
- {x: 2.0819185, y: -1.148}
|
||||
- {x: 2.0819185, y: -1.7824947}
|
||||
- {x: 0.7995001, y: -1.7824947}
|
||||
- {x: 0.8690001, y: -1.366}
|
||||
- {x: 2.0115485, y: -1.366}
|
||||
- {x: 2.0115485, y: -1.7135457}
|
||||
- {x: 0.8690001, y: -1.7135457}
|
||||
- {x: 1.2855, y: -1.458}
|
||||
- {x: 1.6248952, y: -1.458}
|
||||
- {x: 1.6248952, y: -2.4030576}
|
||||
- {x: 1.2855, y: -2.4030576}
|
||||
- {x: 0.8095001, y: -1.2175}
|
||||
- {x: 2.0860398, y: -1.2175}
|
||||
- {x: 2.0860398, y: -1.5008262}
|
||||
- {x: 0.8095001, y: -1.5008262}
|
||||
- {x: 0.788, y: -0.67550004}
|
||||
- {x: 2.098783, y: -0.67550004}
|
||||
- {x: 2.098783, y: -1.3583705}
|
||||
- {x: 0.788, y: -1.3583705}
|
||||
- {x: 0.81250006, y: -1.163}
|
||||
- {x: 0.8850208, y: -1.163}
|
||||
- {x: 0.8850208, y: -1.290926}
|
||||
- {x: 0.81250006, y: -1.290926}
|
||||
- {x: 1.7355, y: -0.92499995}
|
||||
- {x: 2.035947, y: -0.92499995}
|
||||
- {x: 2.035947, y: -1.2623844}
|
||||
- {x: 1.7355, y: -1.2623844}
|
||||
- {x: 1.8845, y: -1.153}
|
||||
- {x: 2.1408007, y: -1.153}
|
||||
- {x: 2.1408007, y: -0.79580396}
|
||||
- {x: 1.8845, y: -0.79580396}
|
||||
- {x: 1.7355, y: -0.92499995}
|
||||
- {x: 2.035947, y: -0.92499995}
|
||||
- {x: 2.035947, y: -1.2623844}
|
||||
- {x: 1.7355, y: -1.2623844}
|
||||
- {x: 0.7215001, y: -0.92499995}
|
||||
- {x: 1.1629382, y: -0.92499995}
|
||||
- {x: 1.1629382, y: -1.4857965}
|
||||
- {x: 0.7215001, y: -1.4857965}
|
||||
- {x: 1.4074999, y: -1.2465}
|
||||
- {x: 1.4567962, y: -1.2465}
|
||||
- {x: 1.4567962, y: -1.265126}
|
||||
- {x: 1.4074999, y: -1.265126}
|
||||
- {x: 1.4563452, y: -1.2465}
|
||||
- {x: 1.4563452, y: -1.2653537}
|
||||
- {x: 1.4074999, y: -1.2653537}
|
||||
- {x: 1.3113072, y: -1.1273378}
|
||||
- {x: 1.6636108, y: -1.226211}
|
||||
- {x: 1.4024341, y: -1.3672544}
|
||||
- {x: 1.0501305, y: -1.2683811}
|
||||
- {x: 1.3955, y: -1.242}
|
||||
- {x: 1.4708942, y: -1.242}
|
||||
- {x: 1.4708942, y: -1.2696567}
|
||||
- {x: 1.3955, y: -1.2696567}
|
||||
- {x: 1.4714679, y: -1.242}
|
||||
- {x: 1.4714679, y: -1.2697064}
|
||||
- {x: 1.3955, y: -1.2697064}
|
||||
- {x: 1.3870001, y: -1.2475}
|
||||
- {x: 1.4810733, y: -1.2475}
|
||||
- {x: 1.4810733, y: -1.2815095}
|
||||
- {x: 1.3870001, y: -1.2815095}
|
||||
UVs: bf443fa4ff4cbfacff0f7ff23f1c7fff7f1c7fee3f26fff8
|
||||
AddColors: 000000000000000000000000000000000000000000000000
|
||||
MulColors: 000200020001000200020002000100020002000200010002
|
||||
- {x: 1.4802694, y: -1.2475}
|
||||
- {x: 1.4802694, y: -1.2818046}
|
||||
- {x: 1.3870001, y: -1.2818046}
|
||||
UVs: 3fcd9f875fd89f89df4f7fcedf673fd23f265fd33f41dfd83f119ffaff1c7fff1f255fec9f3cdff03f5e5fd21f773fd5dfdadf85ffe5df87ff677fcebf7f3fd2bf1dffdabf387fe0df4f1fee9f5bfff21f25fff09f3c7ff53f5e5fd5df753fd83fcd1f7abfda7f873fcd9f6cbfdaff79ffb89f6cffc2bf7e1fc39f6c1fcdbf7edfda9f6cffe53f7c1fe69f6c3ff13f7c1ff5ff1edfffdf323f11bfe7bf187ffaffa29f6cbfae3f821ff5ff323fffff4600005fd31f11fff51ff500007ffedf1e3f115fd31f26dfdafffa9f6cdffe5f7e5ff19f6cdffadf7e9ffddf4e5fffdf4fbf49fff95f4e1ffedf7f7fcedf84ffd1bf3cfff05f411ff5df4f1ff39f573ff95f447f8a9f875fce000000005f8e5f8a00007f8a3f443fd37f8e0000fff47f6c
|
||||
AddColors: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
MulColors: 000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200010002000200020000000200020002000100020002000200010002
|
||||
Materials:
|
||||
- {fileID: 2100000, guid: d58d9a5e482e8429f8d7d18a9538d94a, type: 2}
|
||||
|
||||
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 133 KiB |
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 47e46d443fd064d78ae33281e2840297
|
||||
timeCreated: 1486894975
|
||||
timeCreated: 1514922172
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
@@ -37,9 +37,10 @@ TextureImporter:
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
|
||||
@@ -18,22 +18,25 @@ namespace FlashTools.Examples {
|
||||
|
||||
IEnumerator StartCoro(SwfClipController ctrl) {
|
||||
while ( true ) {
|
||||
ctrl.Play(_fadeInSequence);
|
||||
yield return new SwfWaitStopPlaying(ctrl);
|
||||
|
||||
yield return ctrl.PlayAndWaitStopOrRewind(_fadeInSequence);
|
||||
for ( var i = 0; i < 3; ++i ) {
|
||||
var last_seq = ctrl.clip.sequence;
|
||||
do {
|
||||
var seq_index = Random.Range(0, _idleSequences.Length);
|
||||
ctrl.Play(_idleSequences[seq_index]);
|
||||
} while ( last_seq == ctrl.clip.sequence );
|
||||
yield return new SwfWaitStopPlaying(ctrl);
|
||||
var idle_seq = GetRandomIdleSequence(ctrl);
|
||||
yield return ctrl.PlayAndWaitStopOrRewind(idle_seq);
|
||||
}
|
||||
|
||||
ctrl.Play(_fadeOutSequence);
|
||||
yield return new SwfWaitStopPlaying(ctrl);
|
||||
yield return ctrl.PlayAndWaitStopOrRewind(_fadeOutSequence);
|
||||
yield return new WaitForSeconds(2.0f);
|
||||
}
|
||||
}
|
||||
|
||||
string GetRandomIdleSequence(SwfClipController ctrl) {
|
||||
var cur_seq = ctrl.clip.sequence;
|
||||
do {
|
||||
var seq_index = Random.Range(0, _idleSequences.Length);
|
||||
var new_sequence = _idleSequences[seq_index];
|
||||
if ( new_sequence != cur_seq ) {
|
||||
return new_sequence;
|
||||
}
|
||||
} while ( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,832 +1,5 @@
|
||||
if (!String.prototype.format) {
|
||||
String.prototype.format = function () {
|
||||
var args = arguments;
|
||||
return this.replace(/{(\d+)}/g, function (match, number) {
|
||||
return typeof args[number] != 'undefined' ? args[number] : match;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
//
|
||||
// ft config
|
||||
//
|
||||
|
||||
var ft = {
|
||||
profile_mode : false,
|
||||
verbose_mode : false,
|
||||
graphics_scale : 1.0,
|
||||
optimize_small_items : true,
|
||||
optimize_static_items : true,
|
||||
optimize_single_graphics : true
|
||||
};
|
||||
|
||||
//
|
||||
// ft base functions
|
||||
//
|
||||
|
||||
ft.trace = function () {
|
||||
fl.outputPanel.trace(
|
||||
Array.prototype.join.call(arguments, " "));
|
||||
};
|
||||
|
||||
ft.trace_fmt = function (format) {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
ft.trace(format.format.apply(format, args));
|
||||
};
|
||||
|
||||
ft.clear_output = function () {
|
||||
fl.outputPanel.clear();
|
||||
};
|
||||
|
||||
ft.assert = function (expr, format) {
|
||||
if (!expr) {
|
||||
if (format === undefined) {
|
||||
throw "!!!Assert!!!";
|
||||
} else {
|
||||
var args = Array.prototype.slice.call(arguments, 2);
|
||||
throw "!!!Assert!!! " + format.format.apply(format, args);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ft.type_assert = function (item, type) {
|
||||
var type_is_string = (typeof type === 'string');
|
||||
ft.assert(
|
||||
(type_is_string && typeof item === type) ||
|
||||
(!type_is_string && item instanceof type),
|
||||
"Type error: {0} != {1}",
|
||||
typeof item,
|
||||
type_is_string ? type : type.constructor.name);
|
||||
};
|
||||
|
||||
ft.type_assert_if_defined = function (item, type) {
|
||||
if (item && item !== undefined) {
|
||||
ft.type_assert(item, type);
|
||||
}
|
||||
};
|
||||
|
||||
ft.is_function = function (func) {
|
||||
return func && typeof(func) === 'function';
|
||||
};
|
||||
|
||||
ft.profile_function = function (func, msg) {
|
||||
ft.type_assert(func, Function);
|
||||
ft.type_assert(msg, 'string');
|
||||
if (!ft.profile_function_stack) {
|
||||
ft.profile_function_stack = [];
|
||||
}
|
||||
if (!ft.profile_function_level) {
|
||||
ft.profile_function_level = 0;
|
||||
}
|
||||
var stack_index = ft.profile_function_stack.length;
|
||||
ft.profile_function_stack.push({
|
||||
msg: msg,
|
||||
level: ft.profile_function_level,
|
||||
time: 0
|
||||
});
|
||||
++ft.profile_function_level;
|
||||
var func_time = ft.get_call_function_time(func);
|
||||
--ft.profile_function_level;
|
||||
ft.profile_function_stack[stack_index].time = func_time;
|
||||
if (stack_index == 0) {
|
||||
for (var i = 0; i < ft.profile_function_stack.length; ++i) {
|
||||
var info = ft.profile_function_stack[i];
|
||||
var ident = "--";
|
||||
for (var j = 0; j < info.level; ++j) {
|
||||
ident += "--";
|
||||
}
|
||||
if (ft.profile_mode) {
|
||||
ft.trace_fmt("{0} Profile: '{1}' : {2}", ident, info.msg, info.time);
|
||||
}
|
||||
}
|
||||
ft.profile_function_stack = [];
|
||||
}
|
||||
};
|
||||
|
||||
ft.get_call_function_time = function (func) {
|
||||
ft.type_assert(func, Function);
|
||||
var b_time = Date.now();
|
||||
func();
|
||||
var e_time = Date.now();
|
||||
return (e_time - b_time) / 1000;
|
||||
};
|
||||
|
||||
ft.escape_path = function (path) {
|
||||
ft.type_assert(path, 'string');
|
||||
return path.replace(/ /g, '%20');
|
||||
};
|
||||
|
||||
ft.escape_string = function (str) {
|
||||
ft.type_assert(str, 'string');
|
||||
return str
|
||||
.replace(/\&/g, '&')
|
||||
.replace(/\"/g, '"')
|
||||
.replace(/\'/g, ''')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
};
|
||||
|
||||
ft.combine_path = function (lhs, rhs) {
|
||||
ft.type_assert(lhs, 'string');
|
||||
ft.type_assert(rhs, 'string');
|
||||
return ft.escape_path(lhs) + ft.escape_path(rhs);
|
||||
};
|
||||
|
||||
ft.array_foldl = function (arr, func, acc) {
|
||||
ft.type_assert(arr, Array);
|
||||
ft.type_assert(func, Function);
|
||||
for (var index = 0; index < arr.length; ++index) {
|
||||
var value = arr[index];
|
||||
acc = func(value, acc);
|
||||
}
|
||||
return acc;
|
||||
};
|
||||
|
||||
ft.array_foldr = function (arr, func, acc) {
|
||||
ft.type_assert(arr, Array);
|
||||
ft.type_assert(func, Function);
|
||||
for (var index = arr.length - 1; index >= 0; --index) {
|
||||
var value = arr[index];
|
||||
acc = func(value, acc);
|
||||
}
|
||||
return acc;
|
||||
};
|
||||
|
||||
ft.array_filter = function (arr, filter) {
|
||||
ft.type_assert(arr, Array);
|
||||
ft.type_assert(filter, Function);
|
||||
var new_arr = [];
|
||||
for (var index = 0; index < arr.length; ++index) {
|
||||
var value = arr[index];
|
||||
if (filter(value, index)) {
|
||||
new_arr.push(value);
|
||||
}
|
||||
}
|
||||
return new_arr;
|
||||
};
|
||||
|
||||
ft.array_foreach = function (arr, func, filter) {
|
||||
ft.type_assert(arr, Array);
|
||||
ft.type_assert(func, Function);
|
||||
ft.type_assert_if_defined(filter, Function);
|
||||
for (var index = 0; index < arr.length; ++index) {
|
||||
var value = arr[index];
|
||||
if (filter === undefined || filter(value, index)) {
|
||||
func(value, index);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ft.array_reverse_foreach = function (arr, func, filter) {
|
||||
ft.type_assert(arr, Array);
|
||||
ft.type_assert(func, Function);
|
||||
ft.type_assert_if_defined(filter, Function);
|
||||
for (var index = arr.length - 1; index >= 0; --index) {
|
||||
var value = arr[index];
|
||||
if (filter === undefined || filter(value, index)) {
|
||||
func(value, index);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ft.approximately = function(a, b, precision) {
|
||||
ft.type_assert(a, 'number');
|
||||
ft.type_assert(b, 'number');
|
||||
ft.type_assert(precision, 'number');
|
||||
return Math.abs(b - a) < Math.abs(precision);
|
||||
};
|
||||
|
||||
ft.gen_unique_name = function () {
|
||||
if (!ft.gen_unique_name_index) {
|
||||
ft.gen_unique_name_index = 0;
|
||||
}
|
||||
++ft.gen_unique_name_index;
|
||||
return "ft_unique_name_" + ft.gen_unique_name_index;
|
||||
};
|
||||
|
||||
//
|
||||
// document
|
||||
//
|
||||
|
||||
var ftdoc = {};
|
||||
|
||||
ftdoc.prepare = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.profile_function(function() { ftdoc.prepare_folders(doc); }, "Prepare folders");
|
||||
ft.profile_function(function() { ftdoc.full_exit_edit_mode(doc); }, "Full exit edit mode");
|
||||
ft.profile_function(function() { ftdoc.remove_unused_items(doc); }, "Remove unused items");
|
||||
ft.profile_function(function() { ftdoc.prepare_all_bitmaps(doc); }, "Prepare all bitmaps");
|
||||
ft.profile_function(function() { ftdoc.unlock_all_timelines(doc); }, "Unlock all timelines");
|
||||
ft.profile_function(function() { ftdoc.optimize_all_timelines(doc); }, "Optimize all timelines");
|
||||
ft.profile_function(function() { ftdoc.rasterize_all_shapes(doc); }, "Rasterize all shapes");
|
||||
ft.profile_function(function() { ftdoc.export_swf(doc); }, "Export swf");
|
||||
};
|
||||
|
||||
ftdoc.get_temp = function (doc) {
|
||||
if (!ftdoc.hasOwnProperty("temp")) {
|
||||
ftdoc["temp"] = {
|
||||
x_max_scales : {},
|
||||
y_max_scales : {}
|
||||
}
|
||||
}
|
||||
return ftdoc["temp"];
|
||||
};
|
||||
|
||||
ftdoc.calculate_item_final_scale = function (doc, optional_item) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert_if_defined(optional_item, LibraryItem);
|
||||
var final_scale = ft.graphics_scale;
|
||||
if (optional_item && ft.optimize_small_items) {
|
||||
var item_name = optional_item.name;
|
||||
var x_max_scales = ftdoc.get_temp(doc).x_max_scales;
|
||||
var y_max_scales = ftdoc.get_temp(doc).y_max_scales;
|
||||
if (x_max_scales.hasOwnProperty(item_name) && y_max_scales.hasOwnProperty(item_name)) {
|
||||
var max_x_scale = x_max_scales[item_name];
|
||||
var max_y_scale = y_max_scales[item_name];
|
||||
var max_c_scale = Math.max(max_x_scale, max_y_scale);
|
||||
if (max_c_scale < 1.0) {
|
||||
final_scale *= max_c_scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
return final_scale;
|
||||
};
|
||||
|
||||
ftdoc.convert_selection_to_bitmap = function (doc, optional_item) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert_if_defined(optional_item, LibraryItem);
|
||||
var final_scale = ftdoc.calculate_item_final_scale(doc, optional_item);
|
||||
if (ft.approximately(final_scale, 1.0, 0.01)) {
|
||||
doc.convertSelectionToBitmap();
|
||||
} else {
|
||||
var wrapper_item_name = ft.gen_unique_name();
|
||||
var wrapper_item = doc.convertToSymbol("graphic", wrapper_item_name , "center");
|
||||
fttim.recursive_scale_filters(doc, wrapper_item.timeline, final_scale);
|
||||
doc.scaleSelection(final_scale, final_scale);
|
||||
doc.convertSelectionToBitmap();
|
||||
doc.scaleSelection(1.0 / final_scale, 1.0 / final_scale);
|
||||
}
|
||||
};
|
||||
|
||||
ftdoc.prepare_folders = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
var export_folder = ftdoc.get_export_folder(doc);
|
||||
if (!FLfile.exists(export_folder) && !FLfile.createFolder(export_folder)) {
|
||||
throw "Can't create document export folder ({0})!"
|
||||
.format(export_folder);
|
||||
}
|
||||
};
|
||||
|
||||
ftdoc.get_export_folder = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
return ft.combine_path(
|
||||
ft.escape_path(doc.pathURI),
|
||||
"_export/");
|
||||
};
|
||||
|
||||
ftdoc.full_exit_edit_mode = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
for (var i = 0; i < 100; ++i) {
|
||||
doc.exitEditMode();
|
||||
}
|
||||
};
|
||||
|
||||
ftdoc.remove_unused_items = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
var unused_items = doc.library.unusedItems;
|
||||
if (unused_items && unused_items !== undefined) {
|
||||
ft.array_reverse_foreach(unused_items, function(item) {
|
||||
if (ft.verbose_mode) {
|
||||
ft.trace_fmt("Remove unused item: {0}", item.name);
|
||||
}
|
||||
doc.library.deleteItem(item.name);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
ftdoc.unlock_all_timelines = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
ftlib.unlock_all_timelines(doc, doc.library);
|
||||
fttim.unlock(doc.getTimeline());
|
||||
};
|
||||
|
||||
ftdoc.optimize_all_timelines = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
if (ft.optimize_small_items) {
|
||||
ft.profile_function(function () {
|
||||
ftlib.optimize_small_items(doc, doc.library);
|
||||
}, "Optimize small items");
|
||||
}
|
||||
if (ft.optimize_static_items) {
|
||||
ft.profile_function(function () {
|
||||
ftlib.optimize_static_items(doc, doc.library);
|
||||
}, "Optimize static items");
|
||||
}
|
||||
if (ft.optimize_single_graphics) {
|
||||
ft.profile_function(function () {
|
||||
ftlib.optimize_single_graphics(doc, doc.library);
|
||||
}, "Optimize single graphics");
|
||||
}
|
||||
};
|
||||
|
||||
ftdoc.rasterize_all_shapes = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
ftlib.rasterize_all_shapes(doc, doc.library);
|
||||
fttim.rasterize_all_shapes(doc, doc.getTimeline());
|
||||
};
|
||||
|
||||
ftdoc.prepare_all_bitmaps = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
ftlib.prepare_all_bitmaps(doc.library);
|
||||
};
|
||||
|
||||
ftdoc.export_swf = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.trace_fmt("!!!Document!!!: '{0}' conversion complete!", doc.name);
|
||||
doc.exportSWF(ftdoc.get_export_swf_path(doc));
|
||||
};
|
||||
|
||||
ftdoc.get_export_swf_path = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
return ft.combine_path(
|
||||
ftdoc.get_export_folder(doc),
|
||||
doc.name + ".swf");
|
||||
};
|
||||
|
||||
//
|
||||
// library
|
||||
//
|
||||
|
||||
var ftlib = {};
|
||||
|
||||
ftlib.is_folder_item = function (item) {
|
||||
ft.type_assert(item, LibraryItem);
|
||||
return item.itemType == "folder";
|
||||
};
|
||||
|
||||
ftlib.is_bitmap_item = function (item) {
|
||||
ft.type_assert(item, LibraryItem);
|
||||
return item.itemType == "bitmap";
|
||||
};
|
||||
|
||||
ftlib.is_symbol_item = function (item) {
|
||||
ft.type_assert(item, LibraryItem);
|
||||
return item.itemType == "graphic" || item.itemType == "movie clip";
|
||||
};
|
||||
|
||||
ftlib.find_item_by_name = function (library, item_name) {
|
||||
ft.type_assert(library, Library);
|
||||
ft.type_assert(item_name, 'string');
|
||||
for (var i = 0; i < library.items.length; ++i) {
|
||||
var item = library.items[i];
|
||||
if (item.name == item_name) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
ftlib.edit_all_items = function (doc, library, func, filter) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(library, Library);
|
||||
ft.type_assert(func, Function);
|
||||
ft.type_assert_if_defined(filter, Function);
|
||||
ft.array_foreach(library.items, function (item) {
|
||||
if (library.editItem(item.name)) {
|
||||
func(item);
|
||||
doc.exitEditMode();
|
||||
}
|
||||
}, filter);
|
||||
};
|
||||
|
||||
ftlib.edit_all_symbol_items = function (doc, library, func) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(library, Library);
|
||||
ft.type_assert(func, Function);
|
||||
ftlib.edit_all_items(doc, library, func, ftlib.is_symbol_item);
|
||||
};
|
||||
|
||||
ftlib.unlock_all_timelines = function (doc, library) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(library, Library);
|
||||
ftlib.edit_all_symbol_items(doc, library, function (item) {
|
||||
fttim.unlock(item.timeline);
|
||||
});
|
||||
};
|
||||
|
||||
ftlib.optimize_small_items = function (doc, library) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(library, Library);
|
||||
|
||||
var x_max_scales = ftdoc.get_temp(doc).x_max_scales;
|
||||
var y_max_scales = ftdoc.get_temp(doc).y_max_scales;
|
||||
|
||||
var walk_by_timeline = function(timeline, func, acc) {
|
||||
ft.type_assert(timeline, Timeline);
|
||||
ft.type_assert(func, Function);
|
||||
ft.array_foreach(timeline.layers, function (layer) {
|
||||
ft.array_foreach(layer.frames, function (frame) {
|
||||
ft.array_foreach(frame.elements, function (elem) {
|
||||
walk_by_timeline(
|
||||
elem.libraryItem.timeline,
|
||||
func,
|
||||
func(elem, acc));
|
||||
}, fttim.is_symbol_instance);
|
||||
}, fttim.is_keyframe);
|
||||
});
|
||||
};
|
||||
|
||||
var walk_by_library = function(lib, func, acc) {
|
||||
ft.type_assert(lib, Library);
|
||||
ft.type_assert(func, Function);
|
||||
ft.array_foreach(lib.items, function (item) {
|
||||
walk_by_timeline(item.timeline, func, acc)
|
||||
}, ftlib.is_symbol_item);
|
||||
};
|
||||
|
||||
var x_func = function(elem, acc) {
|
||||
var elem_sx = elem.scaleX * acc;
|
||||
var item_name = elem.libraryItem.name;
|
||||
x_max_scales[item_name] = Math.max(
|
||||
x_max_scales.hasOwnProperty(item_name) ? x_max_scales[item_name] : elem_sx,
|
||||
elem_sx);
|
||||
return elem_sx;
|
||||
};
|
||||
|
||||
var y_func = function(elem, acc) {
|
||||
var elem_sy = elem.scaleY * acc;
|
||||
var item_name = elem.libraryItem.name;
|
||||
y_max_scales[item_name] = Math.max(
|
||||
y_max_scales.hasOwnProperty(item_name) ? y_max_scales[item_name] : elem_sy,
|
||||
elem_sy);
|
||||
return elem_sy;
|
||||
};
|
||||
|
||||
walk_by_library(library, x_func, 1.0);
|
||||
walk_by_timeline(doc.getTimeline(), x_func, 1.0);
|
||||
|
||||
walk_by_library(library, y_func, 1.0);
|
||||
walk_by_timeline(doc.getTimeline(), y_func, 1.0);
|
||||
|
||||
if (ft.verbose_mode) {
|
||||
for (var item_name in x_max_scales) {
|
||||
var max_x_scale = x_max_scales.hasOwnProperty(item_name) ? x_max_scales[item_name] : 1.0;
|
||||
var max_y_scale = y_max_scales.hasOwnProperty(item_name) ? y_max_scales[item_name] : 1.0;
|
||||
var max_c_scale = Math.max(max_x_scale, max_y_scale);
|
||||
if (max_c_scale < 1.0) {
|
||||
ft.trace_fmt("Small item for optimize: {0} - {1}", item_name, max_c_scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ftlib.optimize_static_items = function (doc, library) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(library, Library);
|
||||
|
||||
var replaces = {};
|
||||
ft.array_reverse_foreach(library.items, function (item) {
|
||||
var new_item_name = ft.gen_unique_name();
|
||||
if (ftlib.bake_symbol_item(doc, library, item.name, new_item_name, 0)) {
|
||||
replaces[item.name] = new_item_name;
|
||||
if (ft.verbose_mode) {
|
||||
ft.trace_fmt("Optimize static item: '{0}'", item.name);
|
||||
}
|
||||
} else {
|
||||
if (ft.verbose_mode) {
|
||||
ft.trace_fmt("NOT Optimize static item: '{0}'", item.name);
|
||||
}
|
||||
}
|
||||
}, function (item) {
|
||||
return ftlib.is_symbol_item(item) && fttim.is_static(item.timeline);
|
||||
});
|
||||
|
||||
ftlib.edit_all_symbol_items(doc, library, function (item) {
|
||||
fttim.replace_baked_symbols(doc, item.timeline, replaces);
|
||||
});
|
||||
fttim.replace_baked_symbols(doc, doc.getTimeline(), replaces);
|
||||
};
|
||||
|
||||
ftlib.bake_symbol_item = function (doc, library, item_name, new_item_name, first_frame) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(library, Library);
|
||||
ft.type_assert(item_name, 'string');
|
||||
ft.type_assert(new_item_name, 'string');
|
||||
ft.type_assert(first_frame, 'number');
|
||||
|
||||
if (library.itemExists(new_item_name)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var item = ftlib.find_item_by_name(library, item_name);
|
||||
if (!item) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var item_frame_area = fttim.calculate_frame_area(item.timeline, first_frame);
|
||||
var item_elems_area = fttim.calculate_elems_area(item.timeline, first_frame);
|
||||
|
||||
if (ft.verbose_mode) {
|
||||
ft.trace_fmt(
|
||||
"Library item: '{0}'\n- frame area: {1}\n- elems area: {2}",
|
||||
item_name, item_frame_area, item_elems_area);
|
||||
}
|
||||
|
||||
if (item_frame_area >= item_elems_area) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!library.addNewItem("graphic", new_item_name)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!library.editItem(new_item_name)) {
|
||||
library.deleteItem(new_item_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (library.addItemToDocument({x: 0, y: 0}, item_name)) {
|
||||
var new_item_elem = doc.selection[0];
|
||||
new_item_elem.symbolType = "graphic";
|
||||
new_item_elem.firstFrame = first_frame;
|
||||
new_item_elem.setTransformationPoint({x: 0, y: 0});
|
||||
new_item_elem.transformX = 0;
|
||||
new_item_elem.transformY = 0;
|
||||
ftdoc.convert_selection_to_bitmap(doc, item);
|
||||
return true;
|
||||
} else {
|
||||
doc.exitEditMode();
|
||||
library.deleteItem(new_item_name);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
ftlib.optimize_single_graphics = function (doc, library) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(library, Library);
|
||||
ft.array_reverse_foreach(library.items, function (item) {
|
||||
fttim.optimize_single_graphics(doc, item.timeline, item);
|
||||
}, ftlib.is_symbol_item);
|
||||
fttim.optimize_single_graphics(doc, doc.getTimeline(), null);
|
||||
};
|
||||
|
||||
ftlib.rasterize_all_shapes = function (doc, library) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(library, Library);
|
||||
ftlib.edit_all_symbol_items(doc, library, function (item) {
|
||||
fttim.rasterize_all_shapes(doc, item.timeline);
|
||||
});
|
||||
};
|
||||
|
||||
ftlib.prepare_all_bitmaps = function (library) {
|
||||
ft.type_assert(library, Library);
|
||||
ft.array_foreach(library.items, function (item) {
|
||||
item.compressionType = "lossless";
|
||||
}, ftlib.is_bitmap_item);
|
||||
};
|
||||
|
||||
//
|
||||
// timeline
|
||||
//
|
||||
|
||||
var fttim = {};
|
||||
|
||||
fttim.is_shape_instance = function (elem) {
|
||||
return elem.elementType == "shape";
|
||||
};
|
||||
|
||||
fttim.is_symbol_instance = function (elem) {
|
||||
return elem.elementType == "instance" && elem.instanceType == "symbol";
|
||||
};
|
||||
|
||||
fttim.is_symbol_graphic_instance = function (elem) {
|
||||
return fttim.is_symbol_instance(elem) && elem.symbolType == "graphic";
|
||||
};
|
||||
|
||||
fttim.is_symbol_graphic_single_frame_instance = function (elem) {
|
||||
return fttim.is_symbol_instance(elem) && elem.symbolType == "graphic" && elem.loop == "single frame";
|
||||
};
|
||||
|
||||
fttim.is_symbol_movie_clip_instance = function (elem) {
|
||||
return fttim.is_symbol_instance(elem) && elem.symbolType == "movie clip";
|
||||
};
|
||||
|
||||
fttim.is_shape_frame = function (frame) {
|
||||
ft.type_assert(frame, Frame);
|
||||
return frame.tweenType == "shape";
|
||||
};
|
||||
|
||||
fttim.is_keyframe = function (frame, frame_index) {
|
||||
ft.type_assert(frame, Frame);
|
||||
ft.type_assert(frame_index, 'number');
|
||||
return frame.startFrame == frame_index;
|
||||
};
|
||||
|
||||
fttim.is_not_guide_layer = function(layer) {
|
||||
ft.type_assert(layer, Layer);
|
||||
return layer.layerType != "guide";
|
||||
};
|
||||
|
||||
fttim.unlock = function (timeline) {
|
||||
ft.type_assert(timeline, Timeline);
|
||||
ft.array_foreach(timeline.layers, function (layer) {
|
||||
layer.locked = false;
|
||||
layer.visible = true;
|
||||
});
|
||||
};
|
||||
|
||||
fttim.calculate_elems_area = function (timeline, frame_index) {
|
||||
ft.type_assert(timeline, Timeline);
|
||||
ft.type_assert(frame_index, 'number');
|
||||
return ft.array_foldl(timeline.layers, function (layer, acc) {
|
||||
if (frame_index >= 0 && frame_index < layer.frames.length) {
|
||||
return ft.array_foldl(layer.frames[frame_index].elements, function (elem, acc2) {
|
||||
return acc2 + Math.round(elem.width) * Math.round(elem.height);
|
||||
}, acc);
|
||||
} else {
|
||||
return acc;
|
||||
}
|
||||
}, 0);
|
||||
};
|
||||
|
||||
fttim.calculate_frame_area = function (timeline, frame_index) {
|
||||
ft.type_assert(timeline, Timeline);
|
||||
ft.type_assert(frame_index, 'number');
|
||||
var bounds = ft.array_foldl(timeline.layers, function (layer, acc) {
|
||||
if (frame_index >= 0 && frame_index < layer.frames.length) {
|
||||
return ft.array_foldl(layer.frames[frame_index].elements, function (elem, acc2) {
|
||||
acc2.left = Math.min(acc2.left, elem.left);
|
||||
acc2.right = Math.max(acc2.right, elem.left + elem.width);
|
||||
acc2.top = Math.min(acc2.top, elem.top);
|
||||
acc2.bottom = Math.max(acc2.bottom, elem.top + elem.height);
|
||||
return acc2;
|
||||
}, acc);
|
||||
} else {
|
||||
return acc;
|
||||
}
|
||||
}, {
|
||||
left: Number.POSITIVE_INFINITY,
|
||||
right: Number.NEGATIVE_INFINITY,
|
||||
top: Number.POSITIVE_INFINITY,
|
||||
bottom: Number.NEGATIVE_INFINITY
|
||||
});
|
||||
var frame_width = Math.max(0, bounds.right - bounds.left);
|
||||
var frame_height = Math.max(0, bounds.bottom - bounds.top);
|
||||
return Math.round(frame_width) * Math.round(frame_height);
|
||||
}
|
||||
|
||||
fttim.recursive_scale_filters = function (doc, timeline, scale) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(timeline, Timeline);
|
||||
ft.array_foreach(timeline.layers, function (layer) {
|
||||
ft.array_foreach(layer.frames, function (frame, frame_index) {
|
||||
ft.array_foreach(frame.elements, function (elem) {
|
||||
var elem_filters = elem.filters;
|
||||
if (elem_filters && elem_filters !== undefined) {
|
||||
ft.array_foreach(elem_filters, function (elem_filter, filter_index) {
|
||||
elem_filter.blurX *= scale;
|
||||
elem_filter.blurY *= scale;
|
||||
});
|
||||
elem.filters = elem_filters;
|
||||
}
|
||||
fttim.recursive_scale_filters(doc, elem.libraryItem.timeline, scale);
|
||||
}, fttim.is_symbol_instance);
|
||||
}, fttim.is_keyframe);
|
||||
}, fttim.is_not_guide_layer);
|
||||
};
|
||||
|
||||
fttim.replace_baked_symbols = function (doc, timeline, replaces) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(timeline, Timeline);
|
||||
ft.array_foreach(timeline.layers, function (layer) {
|
||||
ft.array_foreach(layer.frames, function (frame, frame_index) {
|
||||
if (timeline.currentFrame != frame_index) {
|
||||
timeline.currentFrame = frame_index;
|
||||
}
|
||||
ft.array_foreach(frame.elements, function (elem) {
|
||||
if (replaces.hasOwnProperty(elem.libraryItem.name)) {
|
||||
doc.selectNone();
|
||||
doc.selection = [elem];
|
||||
doc.swapElement(replaces[elem.libraryItem.name]);
|
||||
}
|
||||
}, fttim.is_symbol_instance);
|
||||
}, fttim.is_keyframe);
|
||||
}, fttim.is_not_guide_layer);
|
||||
};
|
||||
|
||||
fttim.optimize_single_graphics = function (doc, timeline, opt_item) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(timeline, Timeline);
|
||||
ft.array_foreach(timeline.layers, function (layer) {
|
||||
ft.array_foreach(layer.frames, function (frame, frame_index) {
|
||||
ft.array_foreach(frame.elements, function (elem) {
|
||||
var lib_item_name = elem.libraryItem.name;
|
||||
var lib_item_cache_name = "ft_cache_name_" + lib_item_name + "_" + elem.firstFrame;
|
||||
if (ftlib.bake_symbol_item(doc, doc.library, lib_item_name, lib_item_cache_name, elem.firstFrame)) {
|
||||
if (ft.verbose_mode) {
|
||||
ft.trace_fmt("Optimize single graphic '{0}' for frame '{1}' in '{2}'",
|
||||
lib_item_name, elem.firstFrame, timeline.name);
|
||||
}
|
||||
if (opt_item == null || doc.library.editItem(opt_item.name)) {
|
||||
if (timeline.currentFrame != frame_index) {
|
||||
timeline.currentFrame = frame_index;
|
||||
}
|
||||
doc.selectNone();
|
||||
doc.selection = [elem];
|
||||
doc.swapElement(lib_item_cache_name);
|
||||
doc.selection[0].firstFrame = 0;
|
||||
doc.exitEditMode();
|
||||
}
|
||||
} else {
|
||||
if (ft.verbose_mode) {
|
||||
ft.trace_fmt("NOT Optimize single graphic '{0}' for frame '{1}' in '{2}'",
|
||||
lib_item_name, elem.firstFrame, timeline.name);
|
||||
}
|
||||
}
|
||||
}, function (elem) {
|
||||
return fttim.is_symbol_graphic_single_frame_instance(elem) && !fttim.is_static(elem.libraryItem.timeline);
|
||||
});
|
||||
}, fttim.is_keyframe);
|
||||
}, fttim.is_not_guide_layer);
|
||||
};
|
||||
|
||||
fttim.is_static = function (timeline) {
|
||||
ft.type_assert(timeline, Timeline);
|
||||
if (timeline.frameCount > 1) {
|
||||
return false;
|
||||
}
|
||||
return ft.array_foldl(timeline.layers, function (layer, acc) {
|
||||
return ft.array_foldl(layer.frames, function (frame, acc2) {
|
||||
return ft.array_foldl(frame.elements, function (elem, acc3) {
|
||||
return acc3 && fttim.is_symbol_instance(elem) ? elem.blendMode != "erase" && (fttim.is_symbol_graphic_single_frame_instance(elem) || fttim.is_static(elem.libraryItem.timeline)) : acc3;
|
||||
}, acc2);
|
||||
}, acc);
|
||||
}, true);
|
||||
};
|
||||
|
||||
fttim.rasterize_all_shapes = function (doc, timeline) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(timeline, Timeline);
|
||||
|
||||
ft.array_reverse_foreach(timeline.layers, function (layer, layer_index) {
|
||||
timeline.setSelectedLayers(layer_index);
|
||||
ft.array_foreach(layer.frames, function (frame, frame_index) {
|
||||
if ( ft.is_function(frame.convertToFrameByFrameAnimation) ) {
|
||||
frame.convertToFrameByFrameAnimation();
|
||||
} else {
|
||||
throw "Animation uses shape tweens. To export this animation you should use Adobe Animate CC or higher!";
|
||||
}
|
||||
}, function (frame, frame_index) {
|
||||
return fttim.is_keyframe(frame, frame_index) && fttim.is_shape_frame(frame);
|
||||
});
|
||||
}, fttim.is_not_guide_layer);
|
||||
|
||||
var any_rasterize = false;
|
||||
ft.array_reverse_foreach(timeline.layers, function (layer, layer_index) {
|
||||
timeline.setSelectedLayers(layer_index);
|
||||
ft.array_foreach(layer.frames, function (frame, frame_index) {
|
||||
timeline.currentFrame = frame_index;
|
||||
timeline.setSelectedFrames(frame_index, frame_index + 1, true);
|
||||
doc.selectNone();
|
||||
doc.selection = ft.array_filter(frame.elements, fttim.is_shape_instance);
|
||||
if (doc.selection.length > 0) {
|
||||
ftdoc.convert_selection_to_bitmap(doc, timeline.libraryItem);
|
||||
doc.arrange("back");
|
||||
any_rasterize = true;
|
||||
}
|
||||
}, fttim.is_keyframe);
|
||||
}, fttim.is_not_guide_layer);
|
||||
if (any_rasterize && ft.verbose_mode) {
|
||||
ft.trace_fmt("Rasterize vector shapes in '{0}'", timeline.name);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// main
|
||||
//
|
||||
|
||||
(function () {
|
||||
ft.clear_output();
|
||||
fl.showIdleMessage(false);
|
||||
ft.trace("- Start -");
|
||||
ft.array_foreach(fl.documents, function (doc) {
|
||||
try {
|
||||
ft.trace_fmt("!!!Document!!!: '{0}'", doc.name);
|
||||
ftdoc.prepare(doc);
|
||||
} catch (e) {
|
||||
ft.trace_fmt("!!!Document!!!: '{0}' conversion error: '{1}'", doc.name, e);
|
||||
}
|
||||
});
|
||||
ft.profile_function(function () {
|
||||
ft.array_foreach(fl.documents, function (doc) {
|
||||
if (doc.canRevert()) {
|
||||
fl.revertDocument(doc);
|
||||
}
|
||||
});
|
||||
}, "Revert documents");
|
||||
ft.trace("- Finish -");
|
||||
})();
|
||||
})();
|
||||
var script_dir = fl.scriptURI.replace('FlashExport.jsfl', '');
|
||||
fl.runScript(script_dir + 'Internal/FTBase.jsfl');
|
||||
fl.runScript(script_dir + 'Internal/FTMain.jsfl', "ft_main", ft, {
|
||||
graphics_scale : 1.0
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a1ba4a960de04365b94351f8c3f24d0
|
||||
timeCreated: 1472974636
|
||||
guid: 7646daba632cc4e63997be01363bc478
|
||||
timeCreated: 1495135907
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
|
||||
5
Assets/FlashTools/FlashExport/FlashExport_HD.jsfl
Normal file
@@ -0,0 +1,5 @@
|
||||
var script_dir = fl.scriptURI.replace('FlashExport_HD.jsfl', '');
|
||||
fl.runScript(script_dir + 'Internal/FTBase.jsfl');
|
||||
fl.runScript(script_dir + 'Internal/FTMain.jsfl', "ft_main", ft, {
|
||||
graphics_scale : 2.0
|
||||
});
|
||||
8
Assets/FlashTools/FlashExport/FlashExport_HD.jsfl.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da5312cca96fd439c854e5cea0aa8eb5
|
||||
timeCreated: 1495136101
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
5
Assets/FlashTools/FlashExport/FlashExport_SD.jsfl
Normal file
@@ -0,0 +1,5 @@
|
||||
var script_dir = fl.scriptURI.replace('FlashExport_SD.jsfl', '');
|
||||
fl.runScript(script_dir + 'Internal/FTBase.jsfl');
|
||||
fl.runScript(script_dir + 'Internal/FTMain.jsfl', "ft_main", ft, {
|
||||
graphics_scale : 0.5
|
||||
});
|
||||
8
Assets/FlashTools/FlashExport/FlashExport_SD.jsfl.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16e7c78934deb4375b76aebfee58b550
|
||||
timeCreated: 1495136690
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/FlashTools/FlashExport/Internal.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c77692aa8dc1141c6897240794676fd8
|
||||
folderAsset: yes
|
||||
timeCreated: 1495136428
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||