-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to display drawDebug #324
Comments
Nope, you are free to make PR to introduce them :) Just fill up a Graphics element with stuff. If they exist in original spine-ts, you can copy part of code from here: https://github.com/EsotericSoftware/spine-runtimes/tree/3.8/spine-ts |
It is recommended to add, or in the form of plugin. |
Whatever will be easy for you. Here's stub for drawMesh: https://codesandbox.io/s/laughing-robinson-oowcm Also, good idea is to call redraw on every update(), you can hack it easily from outside: const oldUpdate = Spine.prototype.update;
Spine.prototype.update = function( dt) { oldUpdate.call(this, dt); this.updateMyDebugGraphics(); }
Spine.prototype.updateMyDebugGraphics = function() { ... } Its not that I cant write it on my own, its just I prefer for people to do main part of work when I'm playing support. |
👍🏻Thank you. |
I had to reopen the theme. I find a lot of data is not available. For example: |
In pixi-spine implementation all matrix data is in
everyone else, and pixi too use
so compared to spine sources, our |
Ok i try to write a debug plugin If you have any questions, please ask |
On which object is The |
Vertices array is created when we create That's how we update them: https://github.com/pixijs/pixi-spine/blob/master/src/Spine.ts#L359 I have utterior motive - the way you're going, we'll have one more specialist on pixi-spine. If other Chinese users ask for questions, I'll mention you ;) |
Yes, it doesn't because we really don't need it, all computations are done in I don't know what to recommend there :( You can manually call that computeWorldVertices and give temp array that you copy and pass to graphics drawPolygon. |
oh,So easy |
If computeWorldVertices doesnt produce result you need, it ma be because right now we use |
The current result is indeed not a region
|
here it is: You can call |
Has been written |
Ok, added to https://github.com/pixijs/pixi.js/wiki/v5-Resources temporarily. I will think how to integrate this in main pixi-spine package. Its good, we can now reference your plugin for people who need debug right now. Usually I don't add N new fields, I just make a component, like
and spine object calls it: if (this.debug) {
this.debug.update(this);
} That way it'll be possible to share that component across many spine objects. |
If you make a screenshot how it looks, I can add it to https://github.com/pixijs/pixi-spine/blob/master/README.md#debug |
Good proposal.
let debug1 = new SpineDebug({
draw:['bones','paths,...],
list:[spine1,spine2,...]
});
debug1.add(spine5);
debug1.run(); |
Oh, yes, that's a good one :) Just don't implement it yet, i'll think about it more. No reason to rewrite good stuff before we have at least few users. |
update demo |
nice jobs guys this look very awesome for debug. |
Cannot find
drawRegionAttachments
,drawClipping
,drawBones
,drawMeshHull
,drawMeshTriangles
optionsIs this series of options not available in pixi-spine?
The text was updated successfully, but these errors were encountered: