@melonjs/spine-plugin 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +46 -0
- package/dist/@melonjs/spine-plugin.d.ts +4130 -0
- package/dist/@melonjs/spine-plugin.js +15235 -0
- package/package.json +77 -0
- package/src/AssetManager.js +42 -0
- package/src/SkeletonRenderer.js +82 -0
- package/src/index.js +231 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# melonJS Spine Plugin
|
|
2
|
+
|
|
3
|
+
a [Spine](http://en.esotericsoftware.com/spine-in-depth) 4.1 plugin implementation for [melonJS 2](www.melonjs.org)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
>Note: although functional, this plugin is still a work in progress. Feedback and especially contributions are welcome!
|
|
8
|
+
|
|
9
|
+
[](https://github.com/melonjs/es6-boilerplate/blob/master/LICENSE)
|
|
10
|
+
[](https://www.npmjs.com/package/@melonjs/spine-plugin)
|
|
11
|
+
[](https://www.jsdelivr.com/package/npm/@melonjs/spine-plugin)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
Installation
|
|
15
|
+
-------------------------------------------------------------------------------
|
|
16
|
+
this plugin is already bundled with the require Spine runtime, so there is no need to install it separately.
|
|
17
|
+
>Note: this plugin requires melonJS version 15.9 or higher.
|
|
18
|
+
|
|
19
|
+
To install the plugin using npm :
|
|
20
|
+
`$ [sudo] npm install @melonjs/spine-plugin`
|
|
21
|
+
|
|
22
|
+
Then import and use the plugin in your project. For example:
|
|
23
|
+
```JavaScript
|
|
24
|
+
import * as Spine from '@melonjs/spine-plugin';
|
|
25
|
+
|
|
26
|
+
// load assets
|
|
27
|
+
Spine.assetManager.setPrefix("data/spine/")
|
|
28
|
+
Spine.assetManager.loadAsset("alien.atlas", "alien-ess.json");
|
|
29
|
+
|
|
30
|
+
// create new Spine Renderable
|
|
31
|
+
export default class AlienSpine extends Spine {
|
|
32
|
+
constructor(x, y, settings ){
|
|
33
|
+
super(x, y, settings);
|
|
34
|
+
...
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
for more details, see a complete usage example in the [test](test) folder
|
|
40
|
+
|
|
41
|
+
Questions, need help ?
|
|
42
|
+
-------------------------------------------------------------------------------
|
|
43
|
+
If you need technical support, you can contact us through the following channels :
|
|
44
|
+
* Forums: with melonJS 2 we moved to a new discourse [forum](https://melonjs.discourse.group), but we can still also find the previous one [here](http://www.html5gamedevs.com/forum/32-melonjs/)
|
|
45
|
+
* Chat: come and chat with us on [discord](https://discord.gg/aur7JMk), or [gitter](https://gitter.im/melonjs/public)
|
|
46
|
+
* we tried to keep our [wikipage](https://github.com/melonjs/melonJS/wiki) up-to-date with useful links, tutorials, and anything related melonJS.
|