Comments (1)
@kpotschi I can not reproduce this with e.g. this code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="//cdn.jsdelivr.net/npm/[email protected]/dist/phaser.js"></script>
<script src="../dist/iife/spine-phaser.js"></script>
<link rel="stylesheet" href="../../index.css" />
<title>Spine Phaser Example</title>
</head>
<body class="p-4 flex flex-col items-center">
<h1>Basic example</h1>
</body>
<script>
class Boi extends spine.SpineGameObject {
constructor(scene) {
super(scene, scene.spine, 0, 0, "spineboy-data", "spineboy-atlas");
}
}
class BasicExample extends Phaser.Scene {
preload() {
this.load.spineBinary("spineboy-data", "assets/spineboy-pro.skel");
this.load.spineAtlas("spineboy-atlas", "assets/spineboy-pma.atlas");
}
create() {
const spineboy = this.add.spine(
400,
500,
"spineboy-data",
"spineboy-atlas"
);
spineboy.setInteractive();
spineboy.displayWidth = 200;
spineboy.displayHeight = (spineboy.height / spineboy.width) * 200;
this.input.enableDebug(spineboy, 0xff00ff);
spineboy.animationState.setAnimation(0, "walk", true);
this.input.on('pointerup', (pointer, gameObject) => {
let x = pointer.x;
let y = pointer.y;
let boi = new Boi(this).setPosition(x, y);
this.add.existing(boi);
});
}
}
new Phaser.Game({
type: Phaser.AUTO,
width: 800,
height: 600,
type: Phaser.WEBGL,
scene: [BasicExample],
plugins: {
scene: [
{
key: "spine.SpinePlugin",
plugin: spine.SpinePlugin,
mapping: "spine",
},
],
},
});
</script>
</html>
Happy to reopen if you can adjust the above example so that it shows the issue.
from spine-runtimes.
Related Issues (20)
- [ts][threejs] Blending mode not working properly
- [cocos2dx] Double free warning in Spine Examples HOT 2
- [player] Allow loading different data files. HOT 1
- [sfml] Multiply blend mode + non-PMA doesn't look correct on Celestial Circus HOT 1
- [ts] WebGPU support and Spine-Pixi runtime HOT 2
- [c] Scale Problem after 4.2 Upgrade HOT 4
- [ue] The cast shadow is slightly off the skeleton's boundary when using `SpineLitNormalMaterial`. HOT 1
- [runtimes] Copy constructor for Constraints reference bones and slots of the original skeleton HOT 2
- [spine-csharp] Skeleton.PhysicsRotate references the field r instead of the parameter x HOT 1
- [unity] SkeletonGraphicRenderTexture example component RenderTexture distorted
- [godot] Crash in SpineSlotNode if SpineSprite parent does not have skeleton data set HOT 5
- [runtimes] Skeleton.getBounds() should apply clipping
- [godot] Leak in editor when scene with multiple SpineSpriteNodes is open
- [spine-csharp] MathUtils.Atan2Deg isn't defined when USE_FAST_SIN_COS_ATAN2_APPROXIMATIONS is defined HOT 1
- [TS] MixDuration setter issues HOT 3
- [unity] UpdateWhenInvisible incorrect when using SkeletonRenderSeparator
- [unity] SkeletonGraphicRenderTexture incorrect alpha blending
- [ue] The `SetSlotColor` node accepts only 0 or 1 `Color` value, despite its parameters being of byte types.
- [ue] Quickly support UE5.4.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spine-runtimes.