Compare commits

...

25 Commits

Author SHA1 Message Date
5f82e624c8 reconvert all animations to 1.3.11 2018-01-03 02:44:02 +07:00
1e7229e134 Fix possible mesh leak after scene switch 2018-01-03 02:34:48 +07:00
fbe1fc811e Fix trial version in Unity 2017 2018-01-03 02:17:07 +07:00
937e1807bc Added tag versions/1.3.10 for changeset 1c3c07ea2554 2017-11-24 08:40:20 +07:00
9c853ea943 reconvert all animations to 1.3.10 2017-11-24 08:34:52 +07:00
a74b616d21 Fix rasterization error with vector graphics in buttons 2017-11-24 08:12:03 +07:00
d4de173168 Fix (Parsing swf error: Failed to read past end of stream) 2017-11-24 07:31:53 +07:00
92645a0042 todo 2017-11-24 01:19:35 +07:00
cd69f3dcd3 Fix (conversion error: 'Error: scaleSelection: Argument number 1 is invalid.') 2017-08-10 22:05:29 +07:00
42060d5e00 new test animation 2017-08-10 22:02:49 +07:00
2743d968a1 Added tag versions/1.3.9 for changeset cc699669cef0 2017-08-06 16:56:40 +07:00
020e933092 reconvert all animations to 1.3.9 2017-08-06 16:50:00 +07:00
5f987eeea8 fix shader properties initialization 2017-08-06 16:44:51 +07:00
08ac4cc73e Replace mask shader "if + discard" instruction to "clip" 2017-08-06 02:34:37 +07:00
5611da7a7c Replace string shader properties to id 2017-08-06 02:24:45 +07:00
9f7f0e5a2b Replace shader "if" instruction to "step" 2017-08-06 02:07:09 +07:00
17a7a1f10e todo 2017-08-06 00:40:41 +07:00
0d42dd1b12 fix warning on add missing components 2017-08-06 00:34:16 +07:00
2aa7ca4a0a hideFlags for generated mesh 2017-08-05 18:53:38 +07:00
7638614d33 todo 2017-08-01 20:25:32 +07:00
262e1f8d40 Bug fix (At line 908 of file "FTMain.jsfl": ReferenceError: ft is not defined) 2017-07-01 23:16:13 +07:00
9b89bfc00b todo 2017-07-01 22:50:31 +07:00
6fe301153f more unsupported tags 2017-06-22 02:11:20 +07:00
f342c83a39 reconvert with new version export 2017-06-20 20:38:38 +07:00
36cc95cd60 Added tag versions/1.3.8 for changeset 7590116fb2e8 2017-06-20 19:55:46 +07:00
63 changed files with 37305 additions and 4753 deletions

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 541c3fcb14f854b1b842b41a866a6f48
folderAsset: yes
timeCreated: 1502375163
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e22aa0e3f511949eb89c7ec5ad32c7a3
timeCreated: 1502375167
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 0af1635387aab4e9cb5b38d8722cecf0
folderAsset: yes
timeCreated: 1511462526
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 78561fafa47094aea89ba0771c70c41b
folderAsset: yes
timeCreated: 1511482664
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5cecc5a6be854444ea6d0ee1bac1925f
timeCreated: 1511482664
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1 @@
> [FlashTools]</b> Parsing swf error: Failed to read past end of stream.

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 056a3e8eb97b34881be36dd1944cce02
timeCreated: 1511482664
licenseType: Free
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a63f9772f8c46490c99d421c9b89b497
folderAsset: yes
timeCreated: 1511483868
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1a360ba863a804a399e9cc7a7bf9885f
timeCreated: 1511485563
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,3 @@
Привет!
Принимай материал для исследования)
После конвертации получаем файл swf, но он не обрабатывается в Unity, пишет: http://prntscr.com/he4tv1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7db3e6a1b84754816afc32bb06622e8b
timeCreated: 1511485563
licenseType: Free
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,3 +1,21 @@
###### 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

View File

@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: e336e165518cf4d8680e2fff9c6b59ba
timeCreated: 1497547324
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}

View File

@@ -22,14 +22,94 @@ MonoBehaviour:
MeshData:
SubMeshes:
- StartVertex: 0
IndexCount: 6
IndexCount: 126
Vertices:
- {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: 00000000ff55ff5d
AddColors: 0000000000000000
MulColors: 0002000200020002
UVs: 0000ffbfff19fff1ff56ff37ff73ff50ff1affecff26fffe0000ff5eff3dff8cff1affbfff27ffd4ff52ff76ff65ff87ff56ff51ff66ff59ff67ff5eff72ff7bff76ff0fff7dff19ff3eff5eff51ff8cff560000ff75ff36ff73ff5eff7eff6bff7aff1aff7cff1cff76ff1aff79ff1cff760000ff7eff0eff1affd5ff26ffebff2cff8dff3fffc80000ff8dff2bffbeff67ff51ff74ff5aff52ff5eff66ff7500000000ff55ff5d
AddColors: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
MulColors: 000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200020002
Materials:
- {fileID: 2100000, guid: d58d9a5e482e8429f8d7d18a9538d94a, type: 2}

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: c1278c7f98af44db8a86e620305eb32b
timeCreated: 1497547327
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}

View File

@@ -22,8 +22,44 @@ 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.27924088, y: -0.41507185}
- {x: 0.19028847, y: -0.52116114}
@@ -128,8 +164,12 @@ MonoBehaviour:
- {x: 0.36222652, y: -0.596136}
- {x: 0.29327887, y: -0.7122002}
- {x: 0.19784872, y: -0.6555102}
UVs: fff3ff27fffa7f2e7f437fd77f4affdcfff3ff2e7ffaff35ff4a7fd77f50ffdcffb97f75ffcbff83ff47fff17f4f7ff9fff3ff157ff9ff1ffff9ff15fffeff1cfff3ff457ff7ff4dff40fff17f47fffaff47ffb0ff4d7fbb7ffb7f207fff7f277ffc00007fffff08ff40ffdd7f507ff1ffa07f757fb97f81fff30000fffb7f15ff507f89ff6bffa27f077ff97f0dfffe00007ff9ff06fffeff3bffbf7f4dffd67fe5ff63fff67f797fcc7f75ffd8ff86fff3ff2e7ffaff35fff37f20fffa7f27ff0d7ff9ff137ffeff3b7fd7ff42ffdc
AddColors: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
MulColors: 00020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002
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}

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: a799322aa44e44b38980bc9d307f0c38
timeCreated: 1497547325
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}

View File

@@ -22,12 +22,144 @@ 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.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.4714679, y: -1.242}
- {x: 1.4714679, y: -1.2697064}
@@ -36,8 +168,8 @@ MonoBehaviour:
- {x: 1.4802694, y: -1.2475}
- {x: 1.4802694, y: -1.2818046}
- {x: 1.3870001, y: -1.2818046}
UVs: 5f447f8a9f875fce00007f8a3f443fd37f8e0000fff47f6c
AddColors: 000000000000000000000000000000000000000000000000
MulColors: 000200020001000200020002000100020002000200010002
UVs: 3fcd9f875fd89f89df4f7fcedf673fd23f265fd33f41dfd83f119ffaff1c7fff1f255fec9f3cdff03f5e5fd21f773fd5dfdadf85ffe5df87ff677fcebf7f3fd2bf1dffdabf387fe0df4f1fee9f5bfff21f25fff09f3c7ff53f5e5fd5df753fd83fcd1f7abfda7f873fcd9f6cbfdaff79ffb89f6cffc2bf7e1fc39f6c1fcdbf7edfda9f6cffe53f7c1fe69f6c3ff13f7c1ff5ff1edfffdf323f11bfe7bf187ffaffa29f6cbfae3f821ff5ff323fffff4600005fd31f11fff51ff500007ffedf1e3f115fd31f26dfdafffa9f6cdffe5f7e5ff19f6cdffadf7e9ffddf4e5fffdf4fbf49fff95f4e1ffedf7f7fcedf84ffd1bf3cfff05f411ff5df4f1ff39f573ff95f447f8a9f875fce000000005f8e5f8a00007f8a3f443fd37f8e0000fff47f6c
AddColors: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
MulColors: 000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200010002000200020000000200020002000100020002000200010002
Materials:
- {fileID: 2100000, guid: d58d9a5e482e8429f8d7d18a9538d94a, type: 2}

View File

@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 47e46d443fd064d78ae33281e2840297
timeCreated: 1497547328
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}

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
var script_dir = fl.scriptURI.replace('FlashExport.jsfl', '');
fl.runScript(script_dir + 'Internal/FTBase.jsfl');
fl.runScript(script_dir + 'Internal/FTMain.jsfl', "ft_main", {
fl.runScript(script_dir + 'Internal/FTMain.jsfl', "ft_main", ft, {
graphics_scale : 1.0
});

View File

@@ -1,5 +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", {
fl.runScript(script_dir + 'Internal/FTMain.jsfl', "ft_main", ft, {
graphics_scale : 2.0
});

View File

@@ -1,5 +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", {
fl.runScript(script_dir + 'Internal/FTMain.jsfl', "ft_main", ft, {
graphics_scale : 0.5
});

View File

@@ -1,4 +1,5 @@
ft_main = function (opts) {
ft_main = function (external_ft, opts) {
ft = external_ft;
opts = opts || {};
//
@@ -81,78 +82,80 @@
ft.type_assert(doc, Document);
ft.type_assert(location_name, 'string');
ft.type_assert_if_defined(optional_item, LibraryItem);
var selection_r = doc.getSelectionRect();
var selection_w = selection_r.right - selection_r.left;
var selection_h = selection_r.bottom - selection_r.top;
var max_scale = cfg.max_convertible_selection / Math.max(selection_w, selection_h);
var prefer_scale = ftdoc.calculate_item_prefer_scale(doc, optional_item);
var final_scale = Math.min(prefer_scale, max_scale);
if (final_scale < prefer_scale) {
var down_scale = Math.floor(final_scale / prefer_scale * 1000) * 0.001;
ft.trace_fmt(
"[Warning] {0}\n" +
"- Converted element was downscaled ({1}x) to maximum allowed size ({2}px)",
location_name, down_scale, cfg.max_convertible_selection);
}
if (ft.approximately(final_scale, 1.0, cfg.scale_precision)) {
(function() {
var elem_r = doc.getSelectionRect();
var selection_r = doc.getSelectionRect();
if ( selection_r ) { // getSelectionRect returns 0 for empty clips
var selection_w = selection_r.right - selection_r.left;
var selection_h = selection_r.bottom - selection_r.top;
var elem_x = elem_r.left;
var elem_y = elem_r.top;
var elem_w = elem_r.right - elem_r.left;
var elem_h = elem_r.bottom - elem_r.top;
var max_scale = cfg.max_convertible_selection / Math.max(selection_w, selection_h);
var prefer_scale = ftdoc.calculate_item_prefer_scale(doc, optional_item);
var final_scale = Math.min(prefer_scale, max_scale);
var elem_dx = Math.round(elem_x) - elem_x;
var elem_dy = Math.round(elem_y) - elem_y;
var elem_dw = Math.round(elem_w) - elem_w;
var elem_dh = Math.round(elem_h) - elem_h;
if (final_scale < prefer_scale) {
var down_scale = Math.floor(final_scale / prefer_scale * 1000) * 0.001;
ft.trace_fmt(
"[Warning] {0}\n" +
"- Converted element was downscaled ({1}x) to maximum allowed size ({2}px)",
location_name, down_scale, cfg.max_convertible_selection);
}
if (ft.approximately(final_scale, 1.0, cfg.scale_precision)) {
(function() {
var elem_r = doc.getSelectionRect();
doc.convertSelectionToBitmap();
var elem = doc.selection[0];
var elem_x = elem_r.left;
var elem_y = elem_r.top;
var elem_w = elem_r.right - elem_r.left;
var elem_h = elem_r.bottom - elem_r.top;
elem.x -= elem_dx;
elem.y -= elem_dy;
elem.width -= elem_dw;
elem.height -= elem_dh;
})();
} else {
(function() {
var wrapper_item_name = ft.gen_unique_name();
var wrapper_item = doc.convertToSymbol("graphic", wrapper_item_name , "top left");
fttim.recursive_scale_filters(doc, wrapper_item, final_scale);
var elem_dx = Math.round(elem_x) - elem_x;
var elem_dy = Math.round(elem_y) - elem_y;
var elem_dw = Math.round(elem_w) - elem_w;
var elem_dh = Math.round(elem_h) - elem_h;
var elem = doc.selection[0];
elem.setTransformationPoint({x: 0, y: 0});
doc.scaleSelection(final_scale, final_scale);
doc.convertSelectionToBitmap();
var elem = doc.selection[0];
var elem_x = elem.x;
var elem_y = elem.y;
var elem_w = elem.width;
var elem_h = elem.height;
elem.x -= elem_dx;
elem.y -= elem_dy;
elem.width -= elem_dw;
elem.height -= elem_dh;
})();
} else {
(function() {
var wrapper_item_name = ft.gen_unique_name();
var wrapper_item = doc.convertToSymbol("graphic", wrapper_item_name , "top left");
fttim.recursive_scale_filters(doc, wrapper_item, final_scale);
var elem_dx = Math.round(elem_x) - elem_x;
var elem_dy = Math.round(elem_y) - elem_y;
var elem_dw = Math.round(elem_w) - elem_w;
var elem_dh = Math.round(elem_h) - elem_h;
var elem = doc.selection[0];
elem.setTransformationPoint({x: 0, y: 0});
doc.scaleSelection(final_scale, final_scale);
doc.convertSelectionToBitmap();
elem = doc.selection[0];
var elem_x = elem.x;
var elem_y = elem.y;
var elem_w = elem.width;
var elem_h = elem.height;
elem.x -= elem_dx;
elem.y -= elem_dy;
elem.width -= elem_dw;
elem.height -= elem_dh;
var elem_dx = Math.round(elem_x) - elem_x;
var elem_dy = Math.round(elem_y) - elem_y;
var elem_dw = Math.round(elem_w) - elem_w;
var elem_dh = Math.round(elem_h) - elem_h;
elem.setTransformationPoint({x: (elem_x - elem.x), y: (elem_y - elem.y)});
doc.scaleSelection(1.0 / final_scale, 1.0 / final_scale);
fttim.recursive_scale_filters(doc, wrapper_item, 1.0 / final_scale);
})();
doc.convertSelectionToBitmap();
elem = doc.selection[0];
elem.x -= elem_dx;
elem.y -= elem_dy;
elem.width -= elem_dw;
elem.height -= elem_dh;
elem.setTransformationPoint({x: (elem_x - elem.x), y: (elem_y - elem.y)});
doc.scaleSelection(1.0 / final_scale, 1.0 / final_scale);
fttim.recursive_scale_filters(doc, wrapper_item, 1.0 / final_scale);
})();
}
}
};
@@ -344,7 +347,7 @@
ftlib.is_symbol_item = function (item) {
ft.type_assert(item, LibraryItem);
return item.itemType == "graphic" || item.itemType == "movie clip";
return item.itemType == "button" || item.itemType == "graphic" || item.itemType == "movie clip";
};
ftlib.find_item_by_name = function (library, item_name) {

View File

@@ -137,9 +137,7 @@ inline fixed4 swf_frag(swf_v2f_t IN) : SV_Target {
fixed4 c = tex2D(_MainTex, IN.uv);
fixed4 a = tex2D(_AlphaTex, IN.uv).r;
c.a = lerp(c.a, a.r, _ExternalAlpha);
if ( c.a > 0.01 ) {
c = c * IN.mulcolor + IN.addcolor;
}
c = c * IN.mulcolor + step(0.01, c.a) * IN.addcolor;
c.rgb *= c.a;
return c;
}
@@ -148,10 +146,8 @@ inline fixed4 swf_grab_frag(swf_grab_v2f_t IN) : SV_Target {
fixed4 c = tex2D(_MainTex, IN.uv);
fixed4 a = tex2D(_AlphaTex, IN.uv).r;
c.a = lerp(c.a, a.r, _ExternalAlpha);
if ( c.a > 0.01 ) {
c = c * IN.mulcolor + IN.addcolor;
c = grab_blend(_GrabTexture, IN.screenpos, c);
}
c = c * IN.mulcolor + step(0.01, c.a) * IN.addcolor;
c = grab_blend(_GrabTexture, IN.screenpos, c);
c.rgb *= c.a;
return c;
}
@@ -160,9 +156,7 @@ inline fixed4 swf_mask_frag(swf_mask_v2f_t IN) : SV_Target {
fixed4 c = tex2D(_MainTex, IN.uv);
fixed4 a = tex2D(_AlphaTex, IN.uv).r;
c.a = lerp(c.a, a.r, _ExternalAlpha);
if ( c.a < 0.01 ) {
discard;
}
clip(c.a - 0.01);
return c;
}

View File

@@ -111,6 +111,24 @@ namespace FTEditor.Editors {
-10.0f);
}
static Camera GetCameraFromPreviewUtils(PreviewRenderUtility previewUtils) {
var cameraField = previewUtils.GetType().GetField("m_Camera");
var cameraFieldValue = cameraField != null
? cameraField.GetValue(previewUtils) as Camera
: null;
if ( cameraFieldValue ) {
return cameraFieldValue;
}
var cameraProperty = previewUtils.GetType().GetProperty("camera");
var cameraPropertyValue = cameraProperty != null
? cameraProperty.GetValue(previewUtils, null) as Camera
: null;
if ( cameraPropertyValue ) {
return cameraPropertyValue;
}
return null;
}
// ---------------------------------------------------------------------
//
// Functions
@@ -184,17 +202,20 @@ namespace FTEditor.Editors {
_matPropBlock.SetTexture("_AlphaTex", Texture2D.whiteTexture);
_matPropBlock.SetFloat("_ExternalAlpha", 0.0f);
}
ConfigureCameraForSequence(_previewUtils.m_Camera, targetSequence);
var frame = targetFrame;
for ( var i = 0; i < frame.Materials.Length; ++i ) {
_previewUtils.DrawMesh(
frame.CachedMesh,
Matrix4x4.identity,
frame.Materials[i],
i,
_matPropBlock);
var camera = GetCameraFromPreviewUtils(_previewUtils);
if ( camera ) {
ConfigureCameraForSequence(camera, targetSequence);
var frame = targetFrame;
for ( var i = 0; i < frame.Materials.Length; ++i ) {
_previewUtils.DrawMesh(
frame.CachedMesh,
Matrix4x4.identity,
frame.Materials[i],
i,
_matPropBlock);
}
camera.Render();
}
_previewUtils.m_Camera.Render();
}
_previewUtils.EndAndDrawPreview(r);
}

View File

@@ -378,7 +378,7 @@ namespace FTEditor.Postprocessors {
var bitmap = inst != null
? FindBitmapFromAssetData(data, inst.Bitmap)
: null;
if ( bitmap != null && IsVisibleInstance(inst) ) {
if ( bitmap != null ) {
var width = bitmap.RealWidth / 20.0f;
var height = bitmap.RealHeight / 20.0f;
@@ -491,11 +491,6 @@ namespace FTEditor.Postprocessors {
return null;
}
static bool IsVisibleInstance(SwfInstanceData inst) {
var result_color = inst.ColorTrans.ApplyToColor(Color.white);
return result_color.a >= 0.01f;
}
// ---------------------------------------------------------------------
//
// UpdateAssetClips

View File

@@ -198,6 +198,19 @@ namespace FTEditor.Postprocessors {
self_masks,
frame);
break;
case SwfDisplayInstanceType.Bitmap:
AddBitmapInstanceToFrame(
library,
inst as SwfDisplayBitmapInstance,
child_matrix,
child_blend_mode,
child_color_transform,
parent_masked,
parent_mask,
parent_masks,
self_masks,
frame);
break;
case SwfDisplayInstanceType.Sprite:
AddSpriteInstanceToFrame(
library,
@@ -268,6 +281,47 @@ namespace FTEditor.Postprocessors {
}
}
static void AddBitmapInstanceToFrame(
SwfLibrary library,
SwfDisplayBitmapInstance inst,
Matrix4x4 inst_matrix,
SwfBlendModeData inst_blend_mode,
SwfColorTransData inst_color_transform,
ushort parent_masked,
ushort parent_mask,
List<SwfInstanceData> parent_masks,
List<SwfInstanceData> self_masks,
SwfFrameData frame)
{
var bitmap_def = library.FindDefine<SwfLibraryBitmapDefine>(inst.Id);
if ( bitmap_def != null ) {
var frame_inst_type =
(parent_mask > 0 || inst.ClipDepth > 0)
? SwfInstanceData.Types.Mask
: (parent_masked > 0 || self_masks.Count > 0)
? SwfInstanceData.Types.Masked
: SwfInstanceData.Types.Group;
var frame_inst_clip_depth =
(parent_mask > 0)
? parent_mask
: (inst.ClipDepth > 0)
? inst.ClipDepth
: parent_masked + self_masks.Count;
frame.Instances.Add(new SwfInstanceData{
Type = frame_inst_type,
ClipDepth = (ushort)frame_inst_clip_depth,
Bitmap = inst.Id,
Matrix = SwfMatrixData.FromUMatrix(inst_matrix * Matrix4x4.Scale(new Vector3(20,20,1))),
BlendMode = inst_blend_mode,
ColorTrans = inst_color_transform});
if ( parent_mask > 0 ) {
parent_masks.Add(frame.Instances[frame.Instances.Count - 1]);
} else if ( inst.ClipDepth > 0 ) {
self_masks.Add(frame.Instances[frame.Instances.Count - 1]);
}
}
}
static void AddSpriteInstanceToFrame(
SwfLibrary library,
SwfDisplaySpriteInstance inst,

View File

@@ -154,14 +154,6 @@ namespace FTEditor {
public SwfVec4Data mulColor;
public SwfVec4Data addColor;
public Color ApplyToColor(Color color) {
return new Color(
Mathf.Clamp01(color.r * mulColor.x + addColor.x),
Mathf.Clamp01(color.g * mulColor.y + addColor.y),
Mathf.Clamp01(color.b * mulColor.z + addColor.z),
Mathf.Clamp01(color.a * mulColor.w + addColor.w));
}
public static SwfColorTransData identity {
get {
return new SwfColorTransData{

View File

@@ -71,6 +71,7 @@ namespace FTSwfTools {
public enum SwfDisplayInstanceType {
Shape,
Bitmap,
Sprite
}
@@ -93,6 +94,12 @@ namespace FTSwfTools {
}
}
public class SwfDisplayBitmapInstance : SwfDisplayInstance {
public override SwfDisplayInstanceType Type {
get { return SwfDisplayInstanceType.Bitmap; }
}
}
public class SwfDisplaySpriteInstance : SwfDisplayInstance {
public int CurrentTag = 0;
public SwfDisplayList DisplayList = new SwfDisplayList();

View File

@@ -33,10 +33,13 @@ namespace FTSwfTools {
public SwfDisplayList Visit(PlaceObjectTag tag, SwfDisplayList dl) {
var is_shape = Library.HasDefine<SwfLibraryShapeDefine >(tag.CharacterId);
var is_bitmap = Library.HasDefine<SwfLibraryBitmapDefine>(tag.CharacterId);
var is_sprite = Library.HasDefine<SwfLibrarySpriteDefine>(tag.CharacterId);
SwfDisplayInstance new_inst = null;
if ( is_shape ) {
new_inst = new SwfDisplayShapeInstance();
} else if ( is_bitmap ) {
new_inst = new SwfDisplayBitmapInstance();
} else if ( is_sprite ) {
new_inst = new SwfDisplaySpriteInstance();
}
@@ -56,6 +59,7 @@ namespace FTSwfTools {
public SwfDisplayList Visit(PlaceObject2Tag tag, SwfDisplayList dl) {
var is_shape = tag.HasCharacter && Library.HasDefine<SwfLibraryShapeDefine >(tag.CharacterId);
var is_bitmap = tag.HasCharacter && Library.HasDefine<SwfLibraryBitmapDefine>(tag.CharacterId);
var is_sprite = tag.HasCharacter && Library.HasDefine<SwfLibrarySpriteDefine>(tag.CharacterId);
if ( tag.HasCharacter ) {
SwfDisplayInstance old_inst = null;
@@ -68,6 +72,8 @@ namespace FTSwfTools {
SwfDisplayInstance new_inst = null;
if ( is_shape ) {
new_inst = new SwfDisplayShapeInstance();
} else if ( is_bitmap ) {
new_inst = new SwfDisplayBitmapInstance();
} else if ( is_sprite ) {
new_inst = new SwfDisplaySpriteInstance();
}
@@ -101,6 +107,7 @@ namespace FTSwfTools {
public SwfDisplayList Visit(PlaceObject3Tag tag, SwfDisplayList dl) {
var is_shape = tag.HasCharacter && Library.HasDefine<SwfLibraryShapeDefine >(tag.CharacterId);
var is_bitmap = tag.HasCharacter && Library.HasDefine<SwfLibraryBitmapDefine>(tag.CharacterId);
var is_sprite = tag.HasCharacter && Library.HasDefine<SwfLibrarySpriteDefine>(tag.CharacterId);
if ( tag.HasCharacter ) {
SwfDisplayInstance old_inst = null;
@@ -113,6 +120,8 @@ namespace FTSwfTools {
SwfDisplayInstance new_inst = null;
if ( is_shape ) {
new_inst = new SwfDisplayShapeInstance();
} else if ( is_bitmap ) {
new_inst = new SwfDisplayBitmapInstance();
} else if ( is_sprite ) {
new_inst = new SwfDisplaySpriteInstance();
}

View File

@@ -32,15 +32,21 @@ namespace FTSwfTools {
get { return Position >= Length; }
}
public long Length {
get { return _binaryReader.BaseStream.Length; }
public uint Length {
get {
var longLength = _binaryReader.BaseStream.Length;
return longLength < 0 ? 0 : (uint)longLength;
}
}
public long Position {
get { return _binaryReader.BaseStream.Position; }
public uint Position {
get {
var longPosition = _binaryReader.BaseStream.Position;
return longPosition < 0 ? 0 : (uint)longPosition;
}
}
public long BytesLeft {
public uint BytesLeft {
get { return Length - Position; }
}
@@ -50,7 +56,7 @@ namespace FTSwfTools {
}
public byte[] ReadRest() {
return ReadBytes((int)BytesLeft);
return ReadBytes(BytesLeft);
}
public bool ReadBit() {
@@ -66,20 +72,22 @@ namespace FTSwfTools {
return _binaryReader.ReadByte();
}
public byte[] ReadBytes(int count) {
return count <= 0
? new byte[0]
: _binaryReader.ReadBytes(count);
public byte[] ReadBytes(uint count) {
if ( count > (uint)int.MaxValue ) {
throw new IOException();
}
return _binaryReader.ReadBytes((int)count);
}
public char ReadChar() {
return _binaryReader.ReadChar();
}
public char[] ReadChars(int count) {
return count <= 0
? new char[0]
: _binaryReader.ReadChars(count);
public char[] ReadChars(uint count) {
if ( count > (uint)int.MaxValue ) {
throw new IOException();
}
return _binaryReader.ReadChars((int)count);
}
public short ReadInt16() {

View File

@@ -73,7 +73,7 @@ namespace FTSwfTools.SwfTags {
: (ushort)0;
tag.Matrix = tag.HasMatrix
? SwfMatrix.Read(reader, false)
? SwfMatrix.Read(reader)
: SwfMatrix.identity;
tag.ColorTransform = tag.HasColorTransform

View File

@@ -101,7 +101,7 @@ namespace FTSwfTools.SwfTags {
tag.HasFilterList = reader.ReadBit();
tag.Depth = reader.ReadUInt16();
tag.ClassName = (tag.HasClassName || (tag.HasImage && tag.HasCharacter))
tag.ClassName = tag.HasClassName
? reader.ReadString()
: string.Empty;
@@ -110,7 +110,7 @@ namespace FTSwfTools.SwfTags {
: (ushort)0;
tag.Matrix = tag.HasMatrix
? SwfMatrix.Read(reader, false)
? SwfMatrix.Read(reader)
: SwfMatrix.identity;
tag.ColorTransform = tag.HasColorTransform

View File

@@ -26,7 +26,7 @@ namespace FTSwfTools.SwfTags {
var tag = new PlaceObjectTag();
tag.CharacterId = reader.ReadUInt16();
tag.Depth = reader.ReadUInt16();
tag.Matrix = SwfMatrix.Read(reader, false);
tag.Matrix = SwfMatrix.Read(reader);
tag.ColorTransform = reader.IsEOF
? SwfColorTransform.identity
: SwfColorTransform.Read(reader, false);

View File

@@ -71,38 +71,38 @@
// Fonts and Text
// -----------------------------
DefineFont = 10,
DefineFontInfo = 13,
DefineFontInfo2 = 62,
DefineFont2 = 48,
DefineFont3 = 75,
DefineFontAlignZones = 73,
DefineFontName = 88,
DefineText = 11,
DefineText2 = 33,
DefineEditText = 37,
CSMTextSettings = 74,
DefineFont4 = 91,
DefineFont = 10, // Unsupported
DefineFontInfo = 13, // Unsupported
DefineFontInfo2 = 62, // Unsupported
DefineFont2 = 48, // Unsupported
DefineFont3 = 75, // Unsupported
DefineFontAlignZones = 73, // Unsupported
DefineFontName = 88, // Unsupported
DefineText = 11, // Unsupported
DefineText2 = 33, // Unsupported
DefineEditText = 37, // Unsupported
CSMTextSettings = 74, // Unsupported
DefineFont4 = 91, // Unsupported
// -----------------------------
// Sounds
// -----------------------------
//DefineSound = 14,
//StartSound = 15,
//StartSound2 = 89,
//SoundStreamHead = 18,
//SoundStreamHead2 = 45,
//SoundStreamBlock = 19,
DefineSound = 14, // Unsupported
StartSound = 15, // Unsupported
StartSound2 = 89, // Unsupported
SoundStreamHead = 18, // Unsupported
SoundStreamHead2 = 45, // Unsupported
SoundStreamBlock = 19, // Unsupported
// -----------------------------
// Buttons
// -----------------------------
//DefineButton = 7,
//DefineButton2 = 34,
//DefineButtonCxform = 23,
//DefineButtonSound = 17,
DefineButton = 7, // Unsupported
DefineButton2 = 34, // Unsupported
DefineButtonCxform = 23, // Unsupported
DefineButtonSound = 17, // Unsupported
// -----------------------------
// Sprites and Movie Clips
@@ -146,7 +146,7 @@
var type_and_size = reader.ReadUInt16();
var tag_id = type_and_size >> 6;
var short_size = type_and_size & 0x3f;
var size = short_size < 0x3f ? short_size : reader.ReadInt32();
var size = short_size < 0x3f ? (uint)short_size : reader.ReadUInt32();
var tag_data = reader.ReadBytes(size);
return Create(new SwfTagData{
TagId = tag_id,
@@ -212,6 +212,18 @@
case (int)SwfTagType.DefineEditText: return UnsupportedTag.Create(SwfTagType.DefineEditText);
case (int)SwfTagType.CSMTextSettings: return UnsupportedTag.Create(SwfTagType.CSMTextSettings);
case (int)SwfTagType.DefineFont4: return UnsupportedTag.Create(SwfTagType.DefineFont4);
// Sounds
case (int)SwfTagType.DefineSound: return UnsupportedTag.Create(SwfTagType.DefineSound);
case (int)SwfTagType.StartSound: return UnsupportedTag.Create(SwfTagType.StartSound);
case (int)SwfTagType.StartSound2: return UnsupportedTag.Create(SwfTagType.StartSound2);
case (int)SwfTagType.SoundStreamHead: return UnsupportedTag.Create(SwfTagType.SoundStreamHead);
case (int)SwfTagType.SoundStreamHead2: return UnsupportedTag.Create(SwfTagType.SoundStreamHead2);
case (int)SwfTagType.SoundStreamBlock: return UnsupportedTag.Create(SwfTagType.SoundStreamBlock);
// Buttons
case (int)SwfTagType.DefineButton: return UnsupportedTag.Create(SwfTagType.DefineButton);
case (int)SwfTagType.DefineButton2: return UnsupportedTag.Create(SwfTagType.DefineButton2);
case (int)SwfTagType.DefineButtonCxform: return UnsupportedTag.Create(SwfTagType.DefineButtonCxform);
case (int)SwfTagType.DefineButtonSound: return UnsupportedTag.Create(SwfTagType.DefineButtonSound);
// Sprites and Movie Clips
case (int)SwfTagType.DefineSprite: return DefineSpriteTag.Create(reader);
// Video

View File

@@ -19,7 +19,7 @@
}
}
public static SwfMatrix Read(SwfStreamReader reader, bool fill_style) {
public static SwfMatrix Read(SwfStreamReader reader) {
var matrix = SwfMatrix.identity;
var has_scale = reader.ReadBit();
if ( has_scale ) {

View File

@@ -98,7 +98,7 @@ namespace FTSwfTools.SwfTypes {
SwfColor.Read(reader, with_alpha);
}
if ( fill_style.Type.IsGradientType ) {
SwfMatrix.Read(reader, true); // GradientMatrix
SwfMatrix.Read(reader); // GradientMatrix
switch ( fill_style.Type.Value ) {
case SwfFillStyleType.Type.LinearGradient:
case SwfFillStyleType.Type.RadialGradient:
@@ -111,7 +111,7 @@ namespace FTSwfTools.SwfTypes {
}
if ( fill_style.Type.IsBitmapType ) {
fill_style.BitmapId = reader.ReadUInt16();
fill_style.BitmapMatrix = SwfMatrix.Read(reader, true);
fill_style.BitmapMatrix = SwfMatrix.Read(reader);
} else {
throw new System.Exception(
"Imported .swf file contains vector graphics. " +

View File

@@ -4,6 +4,10 @@ using System.Collections.Generic;
namespace FTRuntime.Internal {
static class SwfUtils {
//
// UnpackUV/UnpackFColorFromUInts
//
const ushort UShortMax = ushort.MaxValue;
const float FColorPrecision = 1.0f / 512.0f;
const float InvFColorPrecision = 1.0f / FColorPrecision;
@@ -24,18 +28,51 @@ namespace FTRuntime.Internal {
}
//
//
// Shader properties
//
public static T GetOrCreateComponent<T>(GameObject obj) where T : Component {
var comp = obj.GetComponent<T>();
return comp != null
? comp
: obj.AddComponent<T>();
public static int TintShaderProp {
get {
ShaderPropsCache.LazyInitialize();
return ShaderPropsCache.TintShaderProp;
}
}
public static int MainTexShaderProp {
get {
ShaderPropsCache.LazyInitialize();
return ShaderPropsCache.MainTexShaderProp;
}
}
public static int AlphaTexShaderProp {
get {
ShaderPropsCache.LazyInitialize();
return ShaderPropsCache.AlphaTexShaderProp;
}
}
public static int ExternalAlphaShaderProp {
get {
ShaderPropsCache.LazyInitialize();
return ShaderPropsCache.ExternalAlphaShaderProp;
}
}
//
// GetComponent<T>
//
public static T GetComponent<T>(GameObject obj, bool allow_create) where T : Component {
var comp = obj.GetComponent<T>();
if ( allow_create && !comp ) {
comp = obj.AddComponent<T>();
}
return comp;
}
//
// FillGeneratedMesh
//
public static void FillGeneratedMesh(Mesh mesh, SwfClipAsset.MeshData mesh_data) {
@@ -63,8 +100,28 @@ namespace FTRuntime.Internal {
}
}
// ShaderPropsCache
static class ShaderPropsCache {
public static int TintShaderProp = 0;
public static int MainTexShaderProp = 0;
public static int AlphaTexShaderProp = 0;
public static int ExternalAlphaShaderProp = 0;
static bool _initialized = false;
public static void LazyInitialize() {
if ( !_initialized ) {
_initialized = true;
TintShaderProp = Shader.PropertyToID("_Tint");
MainTexShaderProp = Shader.PropertyToID("_MainTex");
AlphaTexShaderProp = Shader.PropertyToID("_AlphaTex");
ExternalAlphaShaderProp = Shader.PropertyToID("_ExternalAlpha");
}
}
}
//
//
// GeneratedMeshCache
//
static class GeneratedMeshCache {

View File

@@ -11,15 +11,15 @@ namespace FTRuntime {
#endif
public class SwfClip : MonoBehaviour {
MeshFilter _meshFilter = null;
MeshRenderer _meshRenderer = null;
MeshFilter _meshFilter = null;
MeshRenderer _meshRenderer = null;
#if UNITY_5_6_OR_NEWER
SortingGroup _sortingGroup = null;
SortingGroup _sortingGroup = null;
#endif
bool _dirtyMesh = true;
SwfClipAsset.Sequence _curSequence = null;
MaterialPropertyBlock _curPropBlock = null;
bool _dirtyMesh = true;
SwfClipAsset.Sequence _curSequence = null;
MaterialPropertyBlock _curPropBlock = null;
// ---------------------------------------------------------------------
//
@@ -301,7 +301,7 @@ namespace FTRuntime {
/// Update all animation properties (for internal use only)
/// </summary>
public void Internal_UpdateAllProperties() {
ClearCache();
ClearCache(false);
ChangeTint();
ChangeClip();
ChangeSequence();
@@ -309,11 +309,11 @@ namespace FTRuntime {
ChangeSortingProperties();
}
void ClearCache() {
_meshFilter = SwfUtils.GetOrCreateComponent<MeshFilter>(gameObject);
_meshRenderer = SwfUtils.GetOrCreateComponent<MeshRenderer>(gameObject);
void ClearCache(bool allow_to_create_components) {
_meshFilter = SwfUtils.GetComponent<MeshFilter> (gameObject, allow_to_create_components);
_meshRenderer = SwfUtils.GetComponent<MeshRenderer>(gameObject, allow_to_create_components);
#if UNITY_5_6_OR_NEWER
_sortingGroup = SwfUtils.GetOrCreateComponent<SortingGroup>(gameObject);
_sortingGroup = SwfUtils.GetComponent<SortingGroup>(gameObject, allow_to_create_components);
#endif
_dirtyMesh = true;
_curSequence = null;
@@ -389,19 +389,19 @@ namespace FTRuntime {
_curPropBlock = new MaterialPropertyBlock();
}
_meshRenderer.GetPropertyBlock(_curPropBlock);
_curPropBlock.SetColor("_Tint", tint);
_curPropBlock.SetColor(SwfUtils.TintShaderProp, tint);
var sprite = clip ? clip.Sprite : null;
var atlas = sprite && sprite.texture ? sprite.texture : Texture2D.whiteTexture;
var atlasA = sprite ? sprite.associatedAlphaSplitTexture : null;
_curPropBlock.SetTexture(
"_MainTex",
SwfUtils.MainTexShaderProp,
atlas ? atlas : Texture2D.whiteTexture);
if ( atlasA ) {
_curPropBlock.SetTexture("_AlphaTex", atlasA);
_curPropBlock.SetFloat("_ExternalAlpha", 1.0f);
_curPropBlock.SetTexture(SwfUtils.AlphaTexShaderProp, atlasA);
_curPropBlock.SetFloat(SwfUtils.ExternalAlphaShaderProp, 1.0f);
} else {
_curPropBlock.SetTexture("_AlphaTex", Texture2D.whiteTexture);
_curPropBlock.SetFloat("_ExternalAlpha", 0.0f);
_curPropBlock.SetTexture(SwfUtils.AlphaTexShaderProp, Texture2D.whiteTexture);
_curPropBlock.SetFloat(SwfUtils.ExternalAlphaShaderProp, 0.0f);
}
_meshRenderer.SetPropertyBlock(_curPropBlock);
}
@@ -432,11 +432,9 @@ namespace FTRuntime {
//
// ---------------------------------------------------------------------
void Awake() {
Internal_UpdateAllProperties();
}
void Start() {
ClearCache(true);
Internal_UpdateAllProperties();
EmitChangeEvents(true, true, true);
}

View File

@@ -42,6 +42,7 @@ namespace FTRuntime {
get {
if ( !_cachedMesh ) {
_cachedMesh = new Mesh();
_cachedMesh.hideFlags = HideFlags.DontSaveInBuild | HideFlags.DontSaveInEditor;
SwfUtils.FillGeneratedMesh(_cachedMesh, MeshData);
}
return _cachedMesh;

View File

@@ -2,7 +2,7 @@
public static class SwfVersion {
public const int Major = 1;
public const int Minor = 3;
public const int Revision = 8;
public const int Revision = 11;
public static string AsString {
get {
@@ -12,4 +12,4 @@
}
}
}
}
}

View File

@@ -22,7 +22,7 @@ GraphicsSettings:
- {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_ShaderSettings:
useScreenSpaceShadows: 0
useScreenSpaceShadows: 1
m_BuildTargetShaderSettings: []
m_LightmapStripping: 0
m_FogStripping: 0

View File

@@ -42,7 +42,6 @@ PlayerSettings:
runInBackground: 1
captureSingleScreen: 0
Override IPod Music: 0
muteOtherAudioSources: 0
Prepare IOS For Recording: 0
submitAnalytics: 1
usePlayerLog: 1
@@ -162,9 +161,6 @@ PlayerSettings:
iOSLaunchScreeniPadCustomXibPath:
iOSDeviceRequirements: []
appleDeveloperTeamID:
iOSManualSigningProvisioningProfileID:
tvOSManualSigningProvisioningProfileID:
appleEnableAutomaticSigning: 0
AndroidTargetDevice: 0
AndroidSplashScreenScale: 0
androidSplashScreen: {fileID: 0}

View File

@@ -1,2 +1,2 @@
m_EditorVersion: 5.3.7p2
m_EditorVersion: 5.3.7f1
m_StandardAssetsVersion: 0

View File

@@ -0,0 +1,3 @@
Привет!
Принимай материал для исследования)
После конвертации получаем файл swf, но он не обрабатывается в Unity, пишет: http://prntscr.com/he4tv1

View File

@@ -47,7 +47,7 @@ https://github.com/MattRix/UnityDecompiled/blob/master/UnityEditor/UnityEditor/P
**** Нужен ворнинг на использование флеш-ide старой версии
**** Возможность конфигурировать параметры групп в редакторе, а не только в рантайме
https://gist.github.com/talecrafter/111ea3345911bd238f4998b4d5a04bf3
** TODO Версия 1.3.9
** TODO Версия 1.3.12
*** Общее
**** TODO Написать гайд по качеству выгружаемых анимаций
**** TODO Гайд по использованию ETC1 текстур для анимаций
@@ -66,7 +66,32 @@ https://gist.github.com/talecrafter/111ea3345911bd238f4998b4d5a04bf3
**** TODO Возможно проблемы с DX9
UNITY_UV_STARTS_AT_TOP
UNITY_HALF_TEXEL_OFFSET
** TODO Версия 1.3.8
** DONE Версия 1.3.11
*** Баги
**** DONE Триальная версия не поддерживает Unity 2017
**** DONE Возможная утечка мешей из-за DontSave
** DONE Версия 1.3.10
*** Баги
**** DONE Кнопки с вектором не растеризовались
(mapResources.fla)
**** DONE Parsing swf error: Failed to read past end of stream
Из-за помеченых для экспорта битмапов (blockers_tmp_0.fla)
**** DONE conversion error: 'Error: scaleSelection: Argument number 1 is invalid.'
HsiyaoWang/magoichi-test.fla
** DONE Версия 1.3.9
*** Улучшения
**** DONE При создании ассет бандлов со сценами где есть анимации - сцены разбухают из-за наличия мешей в анимации
можно использовать ISerializationCallbackReceiver
можно в hideFlags на меше поиграться!
**** DONE Заменить установку пропертей шейдера с текстовых имён на id
**** DONE Заюзать step вместо if в шейдере
https://web.archive.org/web/20161214092913/http://http.developer.nvidia.com:80/Cg/step.html
**** DONE if + discard заменить на clip
*** Баги
**** DONE Ворнинг при авто-добавлении SortingGroup
**** DONE Проблема с инклюдами в jsfl
At line 908 of file "FTMain.jsfl": ReferenceError: ft is not defined
** DONE Версия 1.3.8
*** Улучшения
**** DONE Ворнинг на shape-tween
**** DONE Скрипты для выгрузки в разных масштабах

Binary file not shown.