@galacean/engine-spine 1.1.0-beta.9 → 4.2.0-beta.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 +9 -7
- package/dist/browser.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +1 -1
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/package.json +65 -11
- package/types/SpineAnimationRenderer.d.ts +213 -0
- package/types/SpineGenerator.d.ts +37 -0
- package/types/index.d.ts +6 -9
- package/types/loader/EditorSpineAtlasLoader.d.ts +6 -0
- package/types/loader/LoaderUtils.d.ts +18 -0
- package/types/loader/SkeletonDataResource.d.ts +12 -0
- package/types/loader/SpineLoader.d.ts +29 -0
- package/types/util/BlendMode.d.ts +4 -0
- package/types/util/BufferReader.d.ts +10 -0
- package/types/util/ClearablePool.d.ts +8 -0
- package/types/util/ReturnablePool.d.ts +8 -0
- package/types/AntGSpineLoader.d.ts +0 -22
- package/types/SpineAnimation.d.ts +0 -46
- package/types/SpineComponent.d.ts +0 -17
- package/types/SpineLoader.d.ts +0 -32
- package/types/SpineRenderer.d.ts +0 -26
- package/types/core/MeshGenerator.d.ts +0 -36
- package/types/core/SpineMesh.d.ts +0 -11
- package/types/spine-core/Animation.d.ts +0 -378
- package/types/spine-core/AnimationState.d.ts +0 -365
- package/types/spine-core/AnimationStateData.d.ts +0 -23
- package/types/spine-core/AssetManager.d.ts +0 -32
- package/types/spine-core/AtlasAttachmentLoader.d.ts +0 -23
- package/types/spine-core/BlendMode.d.ts +0 -7
- package/types/spine-core/Bone.d.ts +0 -110
- package/types/spine-core/BoneData.d.ts +0 -44
- package/types/spine-core/ConstraintData.d.ts +0 -7
- package/types/spine-core/Event.d.ts +0 -16
- package/types/spine-core/EventData.d.ts +0 -13
- package/types/spine-core/IkConstraint.d.ts +0 -38
- package/types/spine-core/IkConstraintData.d.ts +0 -26
- package/types/spine-core/PathConstraint.d.ts +0 -46
- package/types/spine-core/PathConstraintData.d.ts +0 -52
- package/types/spine-core/SharedAssetManager.d.ts +0 -19
- package/types/spine-core/Skeleton.d.ts +0 -134
- package/types/spine-core/SkeletonBinary.d.ts +0 -49
- package/types/spine-core/SkeletonBounds.d.ts +0 -48
- package/types/spine-core/SkeletonClipping.d.ts +0 -22
- package/types/spine-core/SkeletonData.d.ts +0 -89
- package/types/spine-core/SkeletonJson.d.ts +0 -34
- package/types/spine-core/Skin.d.ts +0 -43
- package/types/spine-core/Slot.d.ts +0 -42
- package/types/spine-core/SlotData.d.ts +0 -23
- package/types/spine-core/Texture.d.ts +0 -43
- package/types/spine-core/TextureAtlas.d.ts +0 -30
- package/types/spine-core/TransformConstraint.d.ts +0 -36
- package/types/spine-core/TransformConstraintData.d.ts +0 -34
- package/types/spine-core/Triangulator.d.ts +0 -14
- package/types/spine-core/Updatable.d.ts +0 -9
- package/types/spine-core/Utils.d.ts +0 -124
- package/types/spine-core/VertexEffect.d.ts +0 -7
- package/types/spine-core/attachments/Attachment.d.ts +0 -43
- package/types/spine-core/attachments/AttachmentLoader.d.ts +0 -25
- package/types/spine-core/attachments/AttachmentType.d.ts +0 -9
- package/types/spine-core/attachments/BoundingBoxAttachment.d.ts +0 -12
- package/types/spine-core/attachments/ClippingAttachment.d.ts +0 -14
- package/types/spine-core/attachments/MeshAttachment.d.ts +0 -46
- package/types/spine-core/attachments/PathAttachment.d.ts +0 -19
- package/types/spine-core/attachments/PointAttachment.d.ts +0 -20
- package/types/spine-core/attachments/RegionAttachment.d.ts +0 -88
- package/types/spine-core/polyfills.d.ts +0 -3
- package/types/spine-core/vertexeffects/JitterEffect.d.ts +0 -11
- package/types/spine-core/vertexeffects/SwirlEffect.d.ts +0 -16
- package/types/types.d.ts +0 -4
package/README.md
CHANGED
|
@@ -18,28 +18,30 @@ Spine runtime for [Galacean engine](https://github.com/galacean/engine).
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
import {
|
|
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
|
|
27
|
+
const resource = await engine.resourceManager.load(
|
|
28
28
|
{
|
|
29
|
-
url: 'https://
|
|
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
|
|
|
39
41
|
|
|
40
42
|
## npm
|
|
41
43
|
```sh
|
|
42
|
-
npm install @galacean-
|
|
44
|
+
npm install @galacean/engine-spine
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
|
|
@@ -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
|
|
81
|
+
The Galacean Engine is released under the [MIT](https://opensource.org/licenses/MIT) license. See LICENSE file.
|