Skip to content

Commit

Permalink
[haxe] Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Sep 8, 2023
1 parent 4f33a2a commit ec0ff67
Show file tree
Hide file tree
Showing 154 changed files with 49,771 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,4 @@ spine-flutter/src/spine-cpp
spine-godot/godot-nuget
spine-godot/godot-spine-csharp
spine-ue4/Plugins/Developer
spine-haxe/export
53 changes: 53 additions & 0 deletions examples/export/runtimes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,59 @@ cp -f ../mix-and-match/export/mix-and-match-pro.json "$ROOT/spine-monogame/spine
cp -f ../mix-and-match/export/mix-and-match.atlas "$ROOT/spine-monogame/spine-monogame-example/data/"
cp -f ../mix-and-match/export/mix-and-match.png "$ROOT/spine-monogame/spine-monogame-example/data/"

echo "spine-haxe"
rm "$ROOT/spine-haxe/example/assets/"*
cp -f ../coin/export/coin-pro.json "$ROOT/spine-haxe/example/assets/"
cp -f ../coin/export/coin-pro.skel "$ROOT/spine-haxe/example/assets/"
cp -f ../coin/export/coin.atlas "$ROOT/spine-haxe/example/assets/"
cp -f ../coin/export/coin.png "$ROOT/spine-haxe/example/assets/"

cp -f ../goblins/export/goblins-pro.json "$ROOT/spine-haxe/example/assets/"
cp -f ../goblins/export/goblins-pro.skel "$ROOT/spine-haxe/example/assets/"
cp -f ../goblins/export/goblins.atlas "$ROOT/spine-haxe/example/assets/"
cp -f ../goblins/export/goblins.png "$ROOT/spine-haxe/example/assets/"

cp -f ../dragon/export/dragon-ess.json "$ROOT/spine-haxe/example/assets/"
cp -f ../dragon/export/dragon-ess.skel "$ROOT/spine-haxe/example/assets/"
cp -f ../dragon/export/dragon.atlas "$ROOT/spine-haxe/example/assets/"
cp -f ../dragon/export/dragon*.png "$ROOT/spine-haxe/example/assets/"

cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-haxe/example/assets/"
cp -f ../raptor/export/raptor-pro.skel "$ROOT/spine-haxe/example/assets/"
cp -f ../raptor/export/raptor.atlas "$ROOT/spine-haxe/example/assets/"
cp -f ../raptor/export/raptor.png "$ROOT/spine-haxe/example/assets/"

cp -f ../spineboy/export/spineboy-pro.json "$ROOT/spine-haxe/example/assets/"
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-haxe/example/assets/"
cp -f ../spineboy/export/spineboy.atlas "$ROOT/spine-haxe/example/assets/"
cp -f ../spineboy/export/spineboy.png "$ROOT/spine-haxe/example/assets/"
cp -f ../spineboy/export/spineboy.png "$ROOT/spine-haxe/example/assets/"

cp -f ../tank/export/tank-pro.json "$ROOT/spine-haxe/example/assets/"
cp -f ../tank/export/tank-pro.skel "$ROOT/spine-haxe/example/assets/"
cp -f ../tank/export/tank.atlas "$ROOT/spine-haxe/example/assets/"
cp -f ../tank/export/tank.png "$ROOT/spine-haxe/example/assets/"

cp -f ../vine/export/vine-pro.json "$ROOT/spine-haxe/example/assets/"
cp -f ../vine/export/vine-pro.skel "$ROOT/spine-haxe/example/assets/"
cp -f ../vine/export/vine.atlas "$ROOT/spine-haxe/example/assets/"
cp -f ../vine/export/vine.png "$ROOT/spine-haxe/example/assets/"

cp -f ../owl/export/owl-pro.json "$ROOT/spine-haxe/example/assets/"
cp -f ../owl/export/owl-pro.skel "$ROOT/spine-haxe/example/assets/"
cp -f ../owl/export/owl.atlas "$ROOT/spine-haxe/example/assets/"
cp -f ../owl/export/owl.png "$ROOT/spine-haxe/example/assets/"

cp -f ../stretchyman/export/stretchyman-pro.json "$ROOT/spine-haxe/example/assets/"
cp -f ../stretchyman/export/stretchyman-pro.skel "$ROOT/spine-haxe/example/assets/"
cp -f ../stretchyman/export/stretchyman.atlas "$ROOT/spine-haxe/example/assets/"
cp -f ../stretchyman/export/stretchyman.png "$ROOT/spine-haxe/example/assets/"

cp -f ../mix-and-match/export/mix-and-match-pro.json "$ROOT/spine-haxe/example/assets/"
cp -f ../mix-and-match/export/mix-and-match-pro.skel "$ROOT/spine-haxe/example/assets/"
cp -f ../mix-and-match/export/mix-and-match.atlas "$ROOT/spine-haxe/example/assets/"
cp -f ../mix-and-match/export/mix-and-match.png "$ROOT/spine-haxe/example/assets/"

echo "spine-ue4"
rm "$ROOT/spine-ue4/Content/GettingStarted/Assets/Raptor/raptor.json"
rm "$ROOT/spine-ue4/Content/GettingStarted/Assets/Raptor/raptor.atlas"
Expand Down
20 changes: 20 additions & 0 deletions spine-haxe/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// 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": [
{
"name": "web",
"request": "launch",
"type": "chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
},
{
"name": "lime",
"type": "lime",
"request": "launch"
}
]
}
54 changes: 54 additions & 0 deletions spine-haxe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# spine-haxe

The spine-haxe runtime provides functionality to load, manipulate and render [Spine](http://esotericsoftware.com) skeletal animation data using [Haxe](https://haxe.org/) in combination with [OpenFL](https://www.openfl.org/) and [Lime](https://lime.openfl.org/).

## Licensing

You are welcome to evaluate the Spine Runtimes and the examples we provide in this repository free of charge.

You can integrate the Spine Runtimes into your software free of charge, but users of your software must have their own [Spine license](https://esotericsoftware.com/spine-purchase). Please make your users aware of this requirement! This option is often chosen by those making development tools, such as an SDK, game toolkit, or software library.

In order to distribute your software containing the Spine Runtimes to others that don't have a Spine license, you need a [Spine license](https://esotericsoftware.com/spine-purchase) at the time of integration. Then you can distribute your software containing the Spine Runtimes however you like, provided others don't modify it or use it to create new software. If others want to do that, they'll need their own Spine license.

For the official legal terms governing the Spine Runtimes, please read the [Spine Runtimes License Agreement](http://esotericsoftware.com/spine-runtimes-license) and Section 2 of the [Spine Editor License Agreement](http://esotericsoftware.com/spine-editor-license#s2).

## Spine version

spine-haxe works with data exported from Spine 4.1.xx.

## Setup

TBD

## Example

TBD

## Development

To setup the development environment install the following:

1. [Haxe](https://haxe.org/download/), ensure it's available on the command line through your `PATH` if you use the binaries instead of the installer.
2. On the command line, run:
```
haxelib setup
haxelib install openfl
haxelib run openfl setup
haxelib install starling
```
3. Clone the `spine-runtimes` repository, and use `haxelib` to setup a dev library:
```
git clone https://github.com/esotericsoftware/spine-runtimes
cd spine-runtimes
haxelib dev spine-haxe .
```

As an IDE, we recommend [Visual Studio Code](https://code.visualstudio.com/) with the following extension:

1. [Haxe extension](https://marketplace.visualstudio.com/items?itemName=nadako.vshaxe)
2. [HXCPP debugger extension](https://marketplace.visualstudio.com/items?itemName=vshaxe.hxcpp-debugger)
3. [Lime extension](https://marketplace.visualstudio.com/items?itemName=openfl.lime-vscode-extension)

The extensions provide IDE features like auto-completion, debugging, and build support.

To debug the HTML5 build, set the Lime target in the status bar at the bottom of VS Code to `HTML5 / Debug`. Next, press `CTRL+SHIFT+B` (`CMD+SHIFT+B` on macOS) to build the project. Run the `lime` run configuration by pressing `F5`. This will start a webserver at `http://localhost:3000`. Finally, start the `web` run configuration. If you modify code, rebuild and restart the `web` configuration.
Loading

0 comments on commit ec0ff67

Please sign in to comment.