@galacean/engine-spine 0.0.0-experimental-engine-spine-20241116 → 0.0.0-experimental-engine-spine-caifu.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/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
 
2
2
 
3
- # Galacean Engine Spine Runtime
3
+ # Galacean Engine spine runtime
4
+ ![Jun-12-2021 18-37-22.gif](https://gw.alipayobjects.com/mdn/mybank_yul/afts/img/A*am1ySYTDBQAAAAAAAAAAAAAAARQnAQ)
4
5
 
5
6
 
6
7
  ![](https://img.shields.io/npm/v/@galacean/engine-spine#id=QfHW0&originHeight=20&originWidth=80&originalType=binary&ratio=1&status=done&style=none)
@@ -9,95 +10,72 @@
9
10
 
10
11
  ---
11
12
 
12
- [@galacean/engine-spine](https://www.npmjs.com/package/@galacean/engine-spine) is the Spine runtime module for the [Galacean engine](https://github.com/galacean/engine), providing efficient support for Spine animations. This package enables developers to seamlessly integrate and use Spine animations, delivering smooth skeletal animation effects optimized for both web and mobile platforms.
13
13
 
14
- ##
15
- ## Installation
16
14
 
17
- Install **@galacean/engine-spine** via npm:
15
+ Spine runtime for [Galacean engine](https://github.com/galacean/engine).
16
+ ##
17
+ ## Usage
18
18
 
19
- ```bash
20
- npm install @galacean/engine-spine
21
- ```
22
-
23
-
24
- ## Quick Start
25
-
26
- Here's a simple example to get started with **@galacean/engine-spine**:
27
19
 
28
20
  ```typescript
29
21
  import { SpineAnimationRenderer } from '@galacean/engine-spine';
30
22
 
31
- // First setup for galacean engine, get scene and create root entity.
32
- // Find setup code here:
33
-
34
- // And then load spine resource and instantiate a spine entity with the resource.
35
- const spineResource = await engine.resourceManager.load({
36
- url: 'https://mdn.alipayobjects.com/huamei_kz4wfo/uri/file/as/2/kz4wfo/4/mp/yKbdfgijyLGzQDyQ/spineboy/spineboy.json',
37
- type: 'spine',
38
- });
39
- const spineEntity = spineResource.instantiate();
40
- rootEntity.addChild(spineEntity);
23
+ // init oasis
24
+ addSpine();
25
+
26
+ async function addSpine() {
27
+ const resource = await engine.resourceManager.load(
28
+ {
29
+ url: 'https://mdn.alipayobjects.com/huamei_kz4wfo/uri/file/as/2/kz4wfo/4/mp/yKbdfgijyLGzQDyQ/spineboy/spineboy.json',
30
+ type: 'spine',
31
+ },
32
+ );
33
+ const spineEntity = new Entity(engine);
34
+ const spine = entity.addComponent(SpineAnimationRenderer);
35
+ spine.resource = resource;
36
+ spine.defaultState.animationName = 'walk';
37
+ rootEntity.addChild(spineEntity);
38
+ }
41
39
  ```
42
40
 
43
- ## API Documentation
44
41
 
45
- For a detailed overview of the API, including all classes, methods, and properties, please refer to the [Full API Documentation](https://galacean.antgroup.com/engine/en/docs/graphics/2D/spine/api/).
42
+ ## npm
43
+ ```sh
44
+ npm install @galacean/engine-spine
45
+ ```
46
46
 
47
47
 
48
- ## Version Compatibility
49
48
 
50
- ### Package and Spine Version Compatibility
51
49
 
52
- | Package Version | Spine Version |
53
- |-----------------|-----------------------|
54
- | Below 4.0 | Spine 3.8 |
55
- | 4.0 | Spine 4.0 |
56
- | 4.1 | Spine 4.1 |
57
- | 4.2 | Spine 4.2 |
58
- | 4.x (e.g., 4.0, 4.1) | Corresponds to Spine x.x |
59
- | 4.x.y (minor version `y`) | Independent from Spine |
50
+ ## Version
51
+ @galacean/engine-spine currently only supports spine version 3.8
60
52
 
61
- > Note: Ensure that the package version aligns with the corresponding Spine editor version for compatibility.
62
53
 
63
- ### Package and Galacean Engine Version Compatibility
54
+ ## Feature
64
55
 
65
- | Package Version | Galacean Engine Version |
66
- |-----------------|-------------------------|
67
- | 4.0 and above | 1.3 and above |
68
- | Below 4.0 (e.g., 1.2.0) | 1.2 |
56
+ - Simple in usage
57
+ - High performance.
58
+ - Intergrated with galacean engine.
59
+ - Component based API.
69
60
 
70
- > Note: Please verify that the versions of both the package and the Galacean Engine are compatible, as mismatched versions may cause unexpected issues.
71
61
 
72
62
 
73
- ## Building and Development
63
+ ## Contributing
64
+ Everyone is welcome to join us! Whether you find a bug, have a great feature request or you fancy owning a task from the road map feel free to get in touch.
65
+
74
66
 
75
- To set up the project for development and build it for production, follow these steps:
67
+ Make sure to read the [Contributing Guide](.github/HOW_TO_CONTRIBUTE.md) before submitting changes.
76
68
 
77
- 1. **Install dependencies**:
78
- ```bash
79
- npm install
80
- ```
81
- 2. **Start development environment**:
82
- ```bash
83
- npm run dev
84
- ```
85
- 3. **Build for production**:
86
- ```bash
87
- npm run build
88
- ```
89
- 4. **Run examples**:
90
- ```bash
91
- npm run example
92
- ```
93
69
 
70
+ ## Links
94
71
 
72
+ - [Examples](https://oasisengine.cn/#/examples/latest/spine-animation)
73
+ - [Documentation](https://oasisengine.cn/#/docs/latest/cn/spine)
74
+ - [GalaceanEngine](https://oasisengine.cn/)
95
75
 
96
- ## Links
97
- - [Examples](https://galacean.antgroup.com/engine/en/docs/graphics/2D/spine/example/) - View usage examples for common scenarios.
98
- - [User Guide](https://galacean.antgroup.com/engine/en/docs/graphics/2D/spine/overview/) - Comprehensive guide for using this package within the Galacean editor and in scripts.
99
- - [API Reference](https://galacean.antgroup.com/engine/en/docs/graphics/2D/spine/api/) - Complete API documentation for all available classes, methods, and properties.
100
76
 
101
77
 
102
78
  ## License
79
+
80
+
103
81
  The Galacean Engine is released under the [MIT](https://opensource.org/licenses/MIT) license. See LICENSE file.