@galacean/engine-spine 0.0.0-experimental-2024071901 → 0.0.0-experimental-engine-spine-20240821
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 +6 -8
- 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 +8 -62
- package/types/{src/SpineAnimationRenderer.d.ts → SpineAnimationRenderer.d.ts} +1 -1
- package/types/SpineGenerator.d.ts +7 -6
- package/types/index.d.ts +2 -2
- package/types/loader/EditorSpineAtlasLoader.d.ts +1 -1
- package/types/loader/LoaderUtils.d.ts +1 -1
- package/types/loader/SkeletonDataResource.d.ts +1 -1
- package/types/loader/SpineLoader.d.ts +1 -1
- package/types/spine-core/Animation.d.ts +378 -0
- package/types/spine-core/AnimationState.d.ts +365 -0
- package/types/spine-core/AnimationStateData.d.ts +23 -0
- package/types/spine-core/AssetManager.d.ts +36 -0
- package/types/spine-core/AtlasAttachmentLoader.d.ts +23 -0
- package/types/spine-core/BlendMode.d.ts +7 -0
- package/types/spine-core/Bone.d.ts +110 -0
- package/types/spine-core/BoneData.d.ts +44 -0
- package/types/spine-core/ConstraintData.d.ts +7 -0
- package/types/spine-core/Event.d.ts +16 -0
- package/types/spine-core/EventData.d.ts +13 -0
- package/types/spine-core/IkConstraint.d.ts +38 -0
- package/types/spine-core/IkConstraintData.d.ts +26 -0
- package/types/spine-core/PathConstraint.d.ts +46 -0
- package/types/spine-core/PathConstraintData.d.ts +52 -0
- package/types/spine-core/SharedAssetManager.d.ts +19 -0
- package/types/spine-core/Skeleton.d.ts +134 -0
- package/types/spine-core/SkeletonBinary.d.ts +49 -0
- package/types/spine-core/SkeletonBounds.d.ts +48 -0
- package/types/spine-core/SkeletonClipping.d.ts +22 -0
- package/types/spine-core/SkeletonData.d.ts +89 -0
- package/types/spine-core/SkeletonJson.d.ts +34 -0
- package/types/spine-core/Skin.d.ts +43 -0
- package/types/spine-core/Slot.d.ts +42 -0
- package/types/spine-core/SlotData.d.ts +23 -0
- package/types/spine-core/Texture.d.ts +43 -0
- package/types/spine-core/TextureAtlas.d.ts +30 -0
- package/types/spine-core/TransformConstraint.d.ts +36 -0
- package/types/spine-core/TransformConstraintData.d.ts +34 -0
- package/types/spine-core/Triangulator.d.ts +14 -0
- package/types/spine-core/Updatable.d.ts +9 -0
- package/types/spine-core/Utils.d.ts +124 -0
- package/types/spine-core/VertexEffect.d.ts +7 -0
- package/types/spine-core/attachments/Attachment.d.ts +43 -0
- package/types/spine-core/attachments/AttachmentLoader.d.ts +25 -0
- package/types/spine-core/attachments/AttachmentType.d.ts +9 -0
- package/types/spine-core/attachments/BoundingBoxAttachment.d.ts +12 -0
- package/types/spine-core/attachments/ClippingAttachment.d.ts +14 -0
- package/types/spine-core/attachments/MeshAttachment.d.ts +46 -0
- package/types/spine-core/attachments/PathAttachment.d.ts +19 -0
- package/types/spine-core/attachments/PointAttachment.d.ts +20 -0
- package/types/spine-core/attachments/RegionAttachment.d.ts +88 -0
- package/types/spine-core/index.d.ts +45 -0
- package/types/spine-core/vertexeffects/JitterEffect.d.ts +11 -0
- package/types/spine-core/vertexeffects/SwirlEffect.d.ts +16 -0
- package/types/util/BlendMode.d.ts +1 -1
- package/types/SpineAnimation.d.ts +0 -147
- package/types/core/MeshGenerator.d.ts +0 -43
- package/types/core/SpineGenerator.d.ts +0 -42
- package/types/core/SpineMesh.d.ts +0 -11
- package/types/core/SpinePrimitive.d.ts +0 -15
- package/types/cypress.config.d.ts +0 -2
- package/types/e2e/case/.mockForE2E.d.ts +0 -3
- package/types/e2e/case/raptor.d.ts +0 -1
- package/types/e2e/case/spine-boy.d.ts +0 -1
- package/types/e2e/config.d.ts +0 -19
- package/types/e2e/support/commands.d.ts +0 -8
- package/types/e2e/support/e2e.d.ts +0 -1
- package/types/e2e/tests/index.cy.d.ts +0 -1
- package/types/example/main.d.ts +0 -1
- package/types/example/outline.d.ts +0 -11
- package/types/jest.setup.d.ts +0 -5
- package/types/loader/BufferReader.d.ts +0 -9
- package/types/loader/EditorSkeletonDataLoader.d.ts +0 -6
- package/types/src/SpineGenerator.d.ts +0 -37
- package/types/src/SpineMaterial.d.ts +0 -6
- package/types/src/index.d.ts +0 -7
- package/types/src/loader/EditorSpineAtlasLoader.d.ts +0 -6
- package/types/src/loader/LoaderUtils.d.ts +0 -18
- package/types/src/loader/SkeletonDataResource.d.ts +0 -12
- package/types/src/loader/SpineLoader.d.ts +0 -29
- package/types/src/util/BlendMode.d.ts +0 -4
- package/types/src/util/BufferReader.d.ts +0 -10
- package/types/src/util/ClearablePool.d.ts +0 -8
- package/types/src/util/ReturnablePool.d.ts +0 -8
- package/types/tests/SpineAnimation.test.d.ts +0 -1
- package/types/tests/SpineGenerator.test.d.ts +0 -1
- package/types/tests/SpineMaterial.test.d.ts +0 -1
- package/types/tests/loader/EditorSpineAtlasLoader.test.d.ts +0 -1
- package/types/tests/loader/SkeletonDataResource.test.d.ts +0 -1
- package/types/tests/loader/SpineLoader.test.d.ts +0 -1
- package/types/tests/loader/loaderUtil.test.d.ts +0 -0
- package/types/tests/testUtils.d.ts +0 -3
- package/types/tests/util/BlendMode.test.d.ts +0 -1
- package/types/tests/util/BufferReader.test.d.ts +0 -1
- package/types/tests/util/ClearablePool.test.d.ts +0 -1
- package/types/tests/util/ReturnablePool.test.d.ts +0 -1
- package/types/types.d.ts +0 -4
- package/types/util/Cache.d.ts +0 -19
- /package/types/{e2e/case/mix-and-match.d.ts → spine-core/polyfills.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -18,23 +18,21 @@ Spine runtime for [Galacean engine](https://github.com/galacean/engine).
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
import {
|
|
21
|
+
import { SpineAnimation } from '@galacean/engine-spine';
|
|
22
22
|
|
|
23
23
|
// init oasis
|
|
24
24
|
addSpine();
|
|
25
25
|
|
|
26
26
|
async function addSpine() {
|
|
27
|
-
const
|
|
27
|
+
const spineEntity = await engine.resourceManager.load(
|
|
28
28
|
{
|
|
29
|
-
url: 'https://
|
|
29
|
+
url: 'https://sbfkcel.github.io/pixi-spine-debug/assets/spine/spineboy-pro.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';
|
|
37
33
|
rootEntity.addChild(spineEntity);
|
|
34
|
+
const spineAnimation = spineEntity.getComponent(SpineAnimation);
|
|
35
|
+
spineAnimation.state.setAnimation(0, 'walk', true);
|
|
38
36
|
}
|
|
39
37
|
```
|
|
40
38
|
|
|
@@ -78,4 +76,4 @@ Make sure to read the [Contributing Guide](.github/HOW_TO_CONTRIBUTE.md) before
|
|
|
78
76
|
## License
|
|
79
77
|
|
|
80
78
|
|
|
81
|
-
The
|
|
79
|
+
The Oasis Engine is released under the [MIT](https://opensource.org/licenses/MIT) license. See LICENSE file.
|