@galacean/engine-spine 0.0.0-experimental-engine-spine-4.2.1 → 0.0.0-experimental-engine-spine-2025509

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.
Files changed (62) hide show
  1. package/README.md +43 -67
  2. package/dist/browser.js +1 -1
  3. package/dist/main.js +1 -11747
  4. package/dist/main.js.map +1 -1
  5. package/dist/module.js +1 -11634
  6. package/dist/module.js.map +1 -1
  7. package/package.json +27 -94
  8. package/types/SpineAnimation.d.ts +48 -0
  9. package/types/SpineLoader.d.ts +32 -0
  10. package/types/SpineMaterial.d.ts +6 -0
  11. package/types/SpineRenderer.d.ts +38 -0
  12. package/types/core/MeshGenerator.d.ts +43 -0
  13. package/types/core/SpineMesh.d.ts +11 -0
  14. package/types/index.d.ts +9 -3
  15. package/types/renderer/SpineAnimationRenderer.d.ts +1 -1
  16. package/types/spine-core/Animation.d.ts +378 -0
  17. package/types/spine-core/AnimationState.d.ts +365 -0
  18. package/types/spine-core/AnimationStateData.d.ts +23 -0
  19. package/types/spine-core/AssetManager.d.ts +36 -0
  20. package/types/spine-core/AtlasAttachmentLoader.d.ts +23 -0
  21. package/types/spine-core/BlendMode.d.ts +7 -0
  22. package/types/spine-core/Bone.d.ts +110 -0
  23. package/types/spine-core/BoneData.d.ts +44 -0
  24. package/types/spine-core/ConstraintData.d.ts +7 -0
  25. package/types/spine-core/Event.d.ts +16 -0
  26. package/types/spine-core/EventData.d.ts +13 -0
  27. package/types/spine-core/IkConstraint.d.ts +38 -0
  28. package/types/spine-core/IkConstraintData.d.ts +26 -0
  29. package/types/spine-core/PathConstraint.d.ts +46 -0
  30. package/types/spine-core/PathConstraintData.d.ts +52 -0
  31. package/types/spine-core/SharedAssetManager.d.ts +19 -0
  32. package/types/spine-core/Skeleton.d.ts +134 -0
  33. package/types/spine-core/SkeletonBinary.d.ts +49 -0
  34. package/types/spine-core/SkeletonBounds.d.ts +48 -0
  35. package/types/spine-core/SkeletonClipping.d.ts +22 -0
  36. package/types/spine-core/SkeletonData.d.ts +89 -0
  37. package/types/spine-core/SkeletonJson.d.ts +34 -0
  38. package/types/spine-core/Skin.d.ts +43 -0
  39. package/types/spine-core/Slot.d.ts +42 -0
  40. package/types/spine-core/SlotData.d.ts +23 -0
  41. package/types/spine-core/Texture.d.ts +46 -0
  42. package/types/spine-core/TextureAtlas.d.ts +30 -0
  43. package/types/spine-core/TransformConstraint.d.ts +36 -0
  44. package/types/spine-core/TransformConstraintData.d.ts +34 -0
  45. package/types/spine-core/Triangulator.d.ts +14 -0
  46. package/types/spine-core/Updatable.d.ts +9 -0
  47. package/types/spine-core/Utils.d.ts +124 -0
  48. package/types/spine-core/VertexEffect.d.ts +7 -0
  49. package/types/spine-core/attachments/Attachment.d.ts +43 -0
  50. package/types/spine-core/attachments/AttachmentLoader.d.ts +25 -0
  51. package/types/spine-core/attachments/AttachmentType.d.ts +9 -0
  52. package/types/spine-core/attachments/BoundingBoxAttachment.d.ts +12 -0
  53. package/types/spine-core/attachments/ClippingAttachment.d.ts +14 -0
  54. package/types/spine-core/attachments/MeshAttachment.d.ts +46 -0
  55. package/types/spine-core/attachments/PathAttachment.d.ts +19 -0
  56. package/types/spine-core/attachments/PointAttachment.d.ts +20 -0
  57. package/types/spine-core/attachments/RegionAttachment.d.ts +88 -0
  58. package/types/spine-core/polyfills.d.ts +3 -0
  59. package/types/spine-core/vertexeffects/JitterEffect.d.ts +11 -0
  60. package/types/spine-core/vertexeffects/SwirlEffect.d.ts +16 -0
  61. package/types/types.d.ts +4 -0
  62. package/dist/miniprogram.js +0 -11748
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,70 @@
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
- import { SpineAnimationRenderer } from '@galacean/engine-spine';
30
-
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);
21
+ import { SpineAnimation } from '@galacean/engine-spine';
22
+
23
+ // init oasis
24
+ addSpine();
25
+
26
+ async function addSpine() {
27
+ const spineEntity = await engine.resourceManager.load(
28
+ {
29
+ url: 'https://sbfkcel.github.io/pixi-spine-debug/assets/spine/spineboy-pro.json',
30
+ type: 'spine',
31
+ },
32
+ );
33
+ rootEntity.addChild(spineEntity);
34
+ const spineAnimation = spineEntity.getComponent(SpineAnimation);
35
+ spineAnimation.state.setAnimation(0, 'walk', true);
36
+ }
41
37
  ```
42
38
 
43
- ## API Documentation
44
39
 
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/).
40
+ ## npm
41
+ ```sh
42
+ npm install @galacean/engine-spine
43
+ ```
46
44
 
47
45
 
48
- ## Version Compatibility
49
46
 
50
- ### Package and Spine Version Compatibility
51
47
 
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 |
48
+ ## Version
49
+ @galacean/engine-spine currently only supports spine version 3.8
60
50
 
61
- > Note: Ensure that the package version aligns with the corresponding Spine editor version for compatibility.
62
51
 
63
- ### Package and Galacean Engine Version Compatibility
52
+ ## Feature
64
53
 
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 |
54
+ - Simple in usage
55
+ - High performance.
56
+ - Intergrated with galacean engine.
57
+ - Component based API.
69
58
 
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
59
 
72
60
 
73
- ## Building and Development
61
+ ## Contributing
62
+ 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.
63
+
74
64
 
75
- To set up the project for development and build it for production, follow these steps:
65
+ Make sure to read the [Contributing Guide](.github/HOW_TO_CONTRIBUTE.md) before submitting changes.
76
66
 
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
67
 
68
+ ## Links
94
69
 
70
+ - [Examples](https://oasisengine.cn/#/examples/latest/spine-animation)
71
+ - [Documentation](https://oasisengine.cn/#/docs/latest/cn/spine)
72
+ - [GalaceanEngine](https://oasisengine.cn/)
95
73
 
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
74
 
101
75
 
102
76
  ## License
103
- The Galacean Engine is released under the [MIT](https://opensource.org/licenses/MIT) license. See LICENSE file.
77
+
78
+
79
+ The Oasis Engine is released under the [MIT](https://opensource.org/licenses/MIT) license. See LICENSE file.