diff --git a/.gitignore b/.gitignore index cdc868da6..7b2f386e8 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,8 @@ target .idea/ build/ cmake-build-debug/ +.vscode/settings.json +spine-runtimes.code-workspace spine-as3/spine-as3/.settings/com.powerflasher.fdt.core.metaDataTags.prefs diff --git a/spine-as3/README.md b/spine-as3/README.md index 48ff0583e..bab86e8dc 100644 --- a/spine-as3/README.md +++ b/spine-as3/README.md @@ -16,9 +16,7 @@ For the official legal terms governing the Spine Runtimes, please read the [Spin spine-as3 works with data exported from Spine 3.8.xx. -spine-as3 supports all Spine features, including meshes. If using the `spine.flash` classes for rendering, meshes are not supported. - -spine-as3 does not yet support loading the binary format. +spine-as3 supports all Spine features, including meshes. If using the `spine.flash` classes for rendering, meshes and two color tinting are not supported. ## Usage 1. Create a new Flex or Adobe AIR project in your preferred IDE. @@ -26,25 +24,23 @@ spine-as3 does not yet support loading the binary format. 3. Add the sources from `spine-as3/spine-as3/src/` to your project ## Example -The Spine AS3 example works on Windows, Linux and Mac OS X. This guide assumes you are using [FDT Free](http://fdt.powerflasher.com/) as your development environment. +The Spine AS3 example works on Windows, Linux and Mac OS X. This guide assumes you are using [Visual Studio Code](https://code.visualstudio.com/) together with the [ActionScript & MXML extension for Visual Studio Code](https://github.com/BowlerHatLLC/vscode-as3mxml/wiki) as your development environment. -1. Download [FDT free](http://fdt.powerflasher.com/buy-download/) for your operating system. -3. Download and install [Adobe Flash Player 23 with debugging support](https://www.adobe.com/support/flashplayer/debug_downloads.html#fp15) -2. Download the latest [Flex SDK](http://www.adobe.com/devnet/flex/flex-sdk-download.html). We assume it will be installed to some folder on your disk called `flex_sdk`. -3. Download the latest [Adobe AIR SDK](http://www.adobe.com/devnet/air/air-sdk-download.html) -4. Extract the AIR SDK contents, and copy them to your `flex_sdk` folder. This will replace the Adobe AIR version shipped with Flex. -5. Open FDT, go to `Preferences -> FDT -> Installed SDKs` -6. Click `Add` and browse to `flex_sdk` -7. Go to `File -> Import -> General -> Existing Projects into Workspace` -6. Browse to `spine-as3/`. You should see both the `spine-as3` and `spine-as3-example` project in the import dialog. Click `Finish` -8. Right click the `Main.as` file in `spine-as3-example/src/spine` in the FDT explorer and select `Debug As -> FDT SWF Application` +1. Install [Visual Studio Code](https://code.visualstudio.com/). +2. Install the [ActionScript & MXML extension for Visual Studio Code](https://github.com/BowlerHatLLC/vscode-as3mxml/wiki). +3. Install [Adobe Flash Player Projector version 32 with debugging support](https://www.adobe.com/support/flashplayer/debug_downloads.html#fp15). +4. Install the [Adobe AIR SDK 32](http://www.adobe.com/devnet/air/air-sdk-download.html) by simply extracting it to a known location. -**Note**: FDT Free does not allow project dependencies. If you modify the sources of `spine-as3`, you will have to compile the project to an `.swc` and place it in `spine-as3-example/libs`. +To run the Flash example project `spine-as3-example`. -## Demos +1. Open the `spine-as3-example/` folder in Visual Studio Code. +2. Set the AIR SDK location when prompted. +3. Launch the `Launch Spine AS3 Example` launch configuration. -* [Flash Demo](http://esotericsoftware.com/files/runtimes/spine-as3/spineboy/index.html) - [Flash Demo source](spine-as3-example/src/spine/Main.as#L43) +Instead of directly adding the sources of from `spine-as3/src` to your project, you can also link the SWC file `spine-as3/lib/spine-as3.swc`. To (re-)compile this file yourself with Visual Studio Code: + +1. Open the `spine-as3/` folder in Visual Studio Code. +2. Press `CTRL + SHIFT + B` (`CMD + SHIFT + B` on macOS) and select `ActionScript: compile release - asconfig.json` ## Notes diff --git a/spine-as3/spine-as3-example/.vscode/launch.json b/spine-as3/spine-as3-example/.vscode/launch.json new file mode 100644 index 000000000..d43380a99 --- /dev/null +++ b/spine-as3/spine-as3-example/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "swf", + "request": "launch", + "name": "Launch Spine AS3 SWF", + "preLaunchTask": "ActionScript: compile debug - asconfig.json" + } + ] +} \ No newline at end of file diff --git a/spine-as3/spine-as3-example/asconfig.json b/spine-as3/spine-as3-example/asconfig.json new file mode 100644 index 000000000..13c1202ea --- /dev/null +++ b/spine-as3/spine-as3-example/asconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "output": "bin/spine-as3-example.swf", + "source-path": [ + "src", + "../spine-as3/src" + ], + "default-size": { + "width": 550, + "height": 500 + }, + "target-player": "32.0", + "swf-version": 43 + }, + "files": [ + "src/spine/examples/Main.as" + ] +} \ No newline at end of file diff --git a/spine-as3/spine-as3/asconfig.json b/spine-as3/spine-as3/asconfig.json new file mode 100644 index 000000000..a9204a80f --- /dev/null +++ b/spine-as3/spine-as3/asconfig.json @@ -0,0 +1,13 @@ +{ + "type": "lib", + "compilerOptions": { + "source-path": [ + "src" + ], + "include-sources": [ + "src" + ], + "output": "../spine-as3/lib/spine-as3.swc", + "target-player": "32.0" + } +} \ No newline at end of file diff --git a/spine-as3/spine-as3/lib/spine-as3.swc b/spine-as3/spine-as3/lib/spine-as3.swc new file mode 100644 index 000000000..7ab431b61 Binary files /dev/null and b/spine-as3/spine-as3/lib/spine-as3.swc differ diff --git a/spine-starling/README.md b/spine-starling/README.md index 79104a27d..dce1bc3aa 100644 --- a/spine-starling/README.md +++ b/spine-starling/README.md @@ -18,33 +18,28 @@ spine-starling works with data exported from Spine 3.8.xx. spine-starling supports all Spine features. -spine-starling does not yet support loading the binary format. - # Usage 1. Create a new Starling 2.0 project as per the [documentation]. 2. Download the Spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it as a zip via the download button above. 3. Copy the sources in `spine-as3/spine-as3/src/` and `spine-starling/spine-starling/src/` into your project's source directory ## Example -The Spine AS3 example works on Windows, Linux and Mac OS X. This guide assumes you are using [FDT Free](http://fdt.powerflasher.com/) as your development environment. +The Spine Starling example works on Windows, Linux and Mac OS X. This guide assumes you are using [Visual Studio Code](https://code.visualstudio.com/) together with the [ActionScript & MXML extension for Visual Studio Code](https://github.com/BowlerHatLLC/vscode-as3mxml/wiki) as your development environment. -1. Download [FDT free](http://fdt.powerflasher.com/buy-download/) for your operating system. -3. Download and install Adobe Flash Player 22 with debugging support](https://www.adobe.com/support/flashplayer/debug_downloads.html#fp15) -2. Download the latest [Flex SDK](http://www.adobe.com/devnet/flex/flex-sdk-download.html). We assume it will be installed to some folder on your disk called `flex_sdk`. -3. Download the latest [Adobe AIR SDK](http://www.adobe.com/devnet/air/air-sdk-download.html) -4. Extract the AIR SDK contents, and copy them to your `flex_sdk` folder. This will replace the Adobe AIR version shipped with Flex. -5. Open FDT, go to `Preferences -> FDT -> Installed SDKs` -6. Click `Add` and browse to `flex_sdk` -7. Go to `File -> Import -> General -> Existing Projects into Workspace` -6. Browse to `spine-as3/`. You should see both the `spine-as3` and `spine-as3-example` project in the import dialog. Click `Finish` -7. Go to `File -> Import -> General -> Existing Projects into Workspace` -6. Browse to `spine-starling/`. You should see both the `spine-starling` and `spine-starling-example` project in the import dialog. Click `Finish` -8. Right click the `Main.as` file in `spine-starling-example/src/spine` in the FDT explorer and select `Debug As -> FDT SWF Application` +1. Install [Visual Studio Code](https://code.visualstudio.com/). +2. Install the [ActionScript & MXML extension for Visual Studio Code](https://github.com/BowlerHatLLC/vscode-as3mxml/wiki). +3. Install [Adobe Flash Player Projector version 32 with debugging support](https://www.adobe.com/support/flashplayer/debug_downloads.html#fp15). +4. Install the [Adobe AIR SDK 32](http://www.adobe.com/devnet/air/air-sdk-download.html) by simply extracting it to a known location. -**Note**: FDT Free does not allow project dependencies. If you modify the sources of `spine-as3` or `spine-starling`, you will have to compile the project to an `.swc` and place it in `spine-starling-example/libs`. +To run the Flash example project `spine-starling-example`. -## Examples +1. Open the `spine-starling-example/` folder in Visual Studio Code. +2. Set the AIR SDK location when prompted. +3. Launch the `Launch Spine Starling Example` launch configuration. -- [Spine atlas example](spine-starling-example/src/AtlasExample.as#L21) -- [Starling atlas example](spine-starling-example/src/StarlingAtlasExample.as#L18) -- [Skin example](spine-starling-example/src/GoblinsExample.as#L21) +Instead of directly adding the sources of from `spine-starling/src` to your project, you can also link the SWC file `spine-starling/lib/spine-starling.swc`. To (re-)compile this file yourself with Visual Studio Code: + +1. Open the `spine-starling/` folder in Visual Studio Code. +2. Press `CTRL + SHIFT + B` (`CMD + SHIFT + B` on macOS) and select `ActionScript: compile release - asconfig.json` + +Note that `spine-starling` depends on the sources of the `spine-as3` project. See the `asconfig.json` file more information on dependencies. \ No newline at end of file diff --git a/spine-starling/spine-starling-example/.vscode/launch.json b/spine-starling/spine-starling-example/.vscode/launch.json new file mode 100644 index 000000000..38add36ee --- /dev/null +++ b/spine-starling/spine-starling-example/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "swf", + "request": "launch", + "name": "Launch Spine Starling Example", + "preLaunchTask": "ActionScript: compile debug - asconfig.json" + } + ] +} \ No newline at end of file diff --git a/spine-starling/spine-starling-example/.vscode/settings.json b/spine-starling/spine-starling-example/.vscode/settings.json new file mode 100644 index 000000000..14d49200d --- /dev/null +++ b/spine-starling/spine-starling-example/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "as3mxml.sdk.framework": "/Applications/air-sdk" +} \ No newline at end of file diff --git a/spine-starling/spine-starling-example/asconfig.json b/spine-starling/spine-starling-example/asconfig.json new file mode 100644 index 000000000..f179362d2 --- /dev/null +++ b/spine-starling/spine-starling-example/asconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "output": "bin/spine-starling-example.swf", + "source-path": [ + "src", + "../../spine-as3/spine-as3/src", + "../../spine-starling/spine-starling/src" + ], + "library-path": [ + "../../spine-starling/spine-starling/starling-2.4.swc" + ], + "default-size": { + "width": 550, + "height": 500 + }, + "target-player": "32.0", + "swf-version": 43 + }, + "files": [ + "src/spine/examples/Main.as" + ] +} \ No newline at end of file diff --git a/spine-starling/spine-starling/.vscode/settings.json b/spine-starling/spine-starling/.vscode/settings.json new file mode 100644 index 000000000..14d49200d --- /dev/null +++ b/spine-starling/spine-starling/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "as3mxml.sdk.framework": "/Applications/air-sdk" +} \ No newline at end of file diff --git a/spine-starling/spine-starling/asconfig.json b/spine-starling/spine-starling/asconfig.json new file mode 100644 index 000000000..e4a1bc9af --- /dev/null +++ b/spine-starling/spine-starling/asconfig.json @@ -0,0 +1,18 @@ +{ + "type": "lib", + "compilerOptions": { + "source-path": [ + "src", + "../../spine-as3/spine-as3/src" + ], + "include-sources": [ + "src", + "../../spine-as3/spine-as3/src" + ], + "external-library-path": [ + "starling-2.4.swc" + ], + "output": "lib/spine-starling.swc", + "target-player": "32.0" + } +} \ No newline at end of file diff --git a/spine-starling/spine-starling/lib/spine-starling.swc b/spine-starling/spine-starling/lib/spine-starling.swc new file mode 100644 index 000000000..47990d6ae Binary files /dev/null and b/spine-starling/spine-starling/lib/spine-starling.swc differ diff --git a/spine-starling/spine-starling/starling-2.4.swc b/spine-starling/spine-starling/starling-2.4.swc new file mode 100644 index 000000000..92d52da0b Binary files /dev/null and b/spine-starling/spine-starling/starling-2.4.swc differ