@galacean/engine-spine 1.2.0 → 4.2.0-beta.1

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 (71) hide show
  1. package/README.md +8 -6
  2. package/dist/browser.js +1 -1
  3. package/dist/main.js +1 -1
  4. package/dist/main.js.map +1 -1
  5. package/dist/miniprogram.js +1 -0
  6. package/dist/module.js +1 -1
  7. package/dist/module.js.map +1 -1
  8. package/package.json +65 -11
  9. package/types/SpineAnimationRenderer.d.ts +213 -0
  10. package/types/SpineGenerator.d.ts +38 -0
  11. package/types/index.d.ts +6 -9
  12. package/types/loader/EditorSpineAtlasLoader.d.ts +6 -0
  13. package/types/loader/LoaderUtils.d.ts +18 -0
  14. package/types/loader/SkeletonDataResource.d.ts +12 -0
  15. package/types/loader/SpineLoader.d.ts +29 -0
  16. package/types/util/BlendMode.d.ts +4 -0
  17. package/types/util/BufferReader.d.ts +10 -0
  18. package/types/util/ClearablePool.d.ts +8 -0
  19. package/types/util/ReturnablePool.d.ts +8 -0
  20. package/types/AntGSpineLoader.d.ts +0 -22
  21. package/types/SpineAnimation.d.ts +0 -45
  22. package/types/SpineLoader.d.ts +0 -32
  23. package/types/SpineRenderer.d.ts +0 -38
  24. package/types/core/MeshGenerator.d.ts +0 -43
  25. package/types/core/SpineMesh.d.ts +0 -11
  26. package/types/spine-core/Animation.d.ts +0 -378
  27. package/types/spine-core/AnimationState.d.ts +0 -365
  28. package/types/spine-core/AnimationStateData.d.ts +0 -23
  29. package/types/spine-core/AssetManager.d.ts +0 -36
  30. package/types/spine-core/AtlasAttachmentLoader.d.ts +0 -23
  31. package/types/spine-core/BlendMode.d.ts +0 -7
  32. package/types/spine-core/Bone.d.ts +0 -110
  33. package/types/spine-core/BoneData.d.ts +0 -44
  34. package/types/spine-core/ConstraintData.d.ts +0 -7
  35. package/types/spine-core/Event.d.ts +0 -16
  36. package/types/spine-core/EventData.d.ts +0 -13
  37. package/types/spine-core/IkConstraint.d.ts +0 -38
  38. package/types/spine-core/IkConstraintData.d.ts +0 -26
  39. package/types/spine-core/PathConstraint.d.ts +0 -46
  40. package/types/spine-core/PathConstraintData.d.ts +0 -52
  41. package/types/spine-core/SharedAssetManager.d.ts +0 -19
  42. package/types/spine-core/Skeleton.d.ts +0 -134
  43. package/types/spine-core/SkeletonBinary.d.ts +0 -49
  44. package/types/spine-core/SkeletonBounds.d.ts +0 -48
  45. package/types/spine-core/SkeletonClipping.d.ts +0 -22
  46. package/types/spine-core/SkeletonData.d.ts +0 -89
  47. package/types/spine-core/SkeletonJson.d.ts +0 -34
  48. package/types/spine-core/Skin.d.ts +0 -43
  49. package/types/spine-core/Slot.d.ts +0 -42
  50. package/types/spine-core/SlotData.d.ts +0 -23
  51. package/types/spine-core/Texture.d.ts +0 -46
  52. package/types/spine-core/TextureAtlas.d.ts +0 -30
  53. package/types/spine-core/TransformConstraint.d.ts +0 -36
  54. package/types/spine-core/TransformConstraintData.d.ts +0 -34
  55. package/types/spine-core/Triangulator.d.ts +0 -14
  56. package/types/spine-core/Updatable.d.ts +0 -9
  57. package/types/spine-core/Utils.d.ts +0 -124
  58. package/types/spine-core/VertexEffect.d.ts +0 -7
  59. package/types/spine-core/attachments/Attachment.d.ts +0 -43
  60. package/types/spine-core/attachments/AttachmentLoader.d.ts +0 -25
  61. package/types/spine-core/attachments/AttachmentType.d.ts +0 -9
  62. package/types/spine-core/attachments/BoundingBoxAttachment.d.ts +0 -12
  63. package/types/spine-core/attachments/ClippingAttachment.d.ts +0 -14
  64. package/types/spine-core/attachments/MeshAttachment.d.ts +0 -46
  65. package/types/spine-core/attachments/PathAttachment.d.ts +0 -19
  66. package/types/spine-core/attachments/PointAttachment.d.ts +0 -20
  67. package/types/spine-core/attachments/RegionAttachment.d.ts +0 -88
  68. package/types/spine-core/polyfills.d.ts +0 -3
  69. package/types/spine-core/vertexeffects/JitterEffect.d.ts +0 -11
  70. package/types/spine-core/vertexeffects/SwirlEffect.d.ts +0 -16
  71. package/types/types.d.ts +0 -4
package/README.md CHANGED
@@ -18,21 +18,23 @@ Spine runtime for [Galacean engine](https://github.com/galacean/engine).
18
18
 
19
19
 
20
20
  ```typescript
21
- import { SpineAnimation } from '@galacean/engine-spine';
21
+ import { SpineAnimationRenderer } from '@galacean/engine-spine';
22
22
 
23
23
  // init oasis
24
24
  addSpine();
25
25
 
26
26
  async function addSpine() {
27
- const spineEntity = await engine.resourceManager.load(
27
+ const resource = await engine.resourceManager.load(
28
28
  {
29
- url: 'https://sbfkcel.github.io/pixi-spine-debug/assets/spine/spineboy-pro.json',
29
+ url: 'https://mdn.alipayobjects.com/huamei_kz4wfo/uri/file/as/2/kz4wfo/4/mp/yKbdfgijyLGzQDyQ/spineboy/spineboy.json',
30
30
  type: 'spine',
31
31
  },
32
32
  );
33
+ const spineEntity = new Entity(engine);
34
+ const spine = entity.addComponent(SpineAnimationRenderer);
35
+ spine.resource = resource;
36
+ spine.defaultState.animationName = 'walk';
33
37
  rootEntity.addChild(spineEntity);
34
- const spineAnimation = spineEntity.getComponent(SpineAnimation);
35
- spineAnimation.state.setAnimation(0, 'walk', true);
36
38
  }
37
39
  ```
38
40
 
@@ -76,4 +78,4 @@ Make sure to read the [Contributing Guide](.github/HOW_TO_CONTRIBUTE.md) before
76
78
  ## License
77
79
 
78
80
 
79
- The Oasis Engine is released under the [MIT](https://opensource.org/licenses/MIT) license. See LICENSE file.
81
+ The Galacean Engine is released under the [MIT](https://opensource.org/licenses/MIT) license. See LICENSE file.