Herbert

Members
  • Content Count

    89
  • Joined

  • Last visited

About Herbert

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I prefer hack it in already built pixijs, but I am not so familiar with hacking. It uses some imported file in the function, how can I deal with it? any instruction would be grateful. import { Resource } from 'resource-loader'; import url from 'url'; import { Spritesheet } from '../core';
  2. Hi there, How can I load a list of sprite sheet with different query string e.g. image01.json?a01 image01.png?a01 image02.json?b02 image02.png?b02 before I use PIXI.loader.defaultQueryString to handle query string, but it applies to all resources.
  3. thank you guys, I got the idea~
  4. hi there, I have two overlap sprites both are interactive, how can I trigger both of their click Event?
  5. Herbert

    BitmapText anchor y is inaccurate

    It's resolved. anchor.y based on lineHeight, and in my .fnt file, I didn't set it correctly. Thanks @ivan.popelyshev
  6. Herbert

    BitmapText anchor y is inaccurate

    lineHeight it is, my lineHeight is not the same as char height before(as shown). So If I want the anchor.y based on char height, I need to make sure lineHeight is set to the same value, and as @ivan.popelyshev said, be aware of offset. <font> <info face="num_02" size="32" bold="0" italic="0" charset="" unicode="1" stretchH="100" smooth="1" aa="1" padding="0,0,0,0" spacing="1,1" outline="0"/> <common lineHeight="32" base="26" scaleW="256" scaleH="256" pages="1" packed="0" alphaChnl="0" redChnl="4" greenChnl="4" blueChnl="4"/> <pages> <page id="0" file="num_02.png" /> </pages> <chars count="11"> <char id="48" x="89" y="0" width="40" height="54" xoffset="0" yoffset="0" xadvance="40" page="0" chnl="15" /> <char id="49" x="130" y="0" width="40" height="54" xoffset="0" yoffset="0" xadvance="40" page="0" chnl="15" /> <char id="50" x="171" y="0" width="40" height="54" xoffset="0" yoffset="0" xadvance="40" page="0" chnl="15" /> <char id="51" x="212" y="0" width="40" height="54" xoffset="0" yoffset="0" xadvance="40" page="0" chnl="15" /> <char id="52" x="0" y="55" width="40" height="54" xoffset="0" yoffset="0" xadvance="40" page="0" chnl="15" /> <char id="53" x="41" y="55" width="40" height="54" xoffset="0" yoffset="0" xadvance="40" page="0" chnl="15" /> <char id="54" x="82" y="55" width="40" height="54" xoffset="0" yoffset="0" xadvance="40" page="0" chnl="15" /> <char id="55" x="123" y="55" width="40" height="54" xoffset="0" yoffset="0" xadvance="40" page="0" chnl="15" /> <char id="56" x="164" y="55" width="40" height="54" xoffset="0" yoffset="0" xadvance="40" page="0" chnl="15" /> <char id="57" x="205" y="55" width="40" height="54" xoffset="0" yoffset="0" xadvance="40" page="0" chnl="15" /> </chars> </font>
  7. Herbert

    BitmapText anchor y is inaccurate

    hi, I found out that the anchor.y is inaccurate for BitmapText. When I set it to 0.5, it doesn't align to center, but if I set anchor.y to 0 and add half of it's height to y, it will correctly locate at center.
  8. hi @ivan.popelyshev, Thanks for your hints, I got it works by calling updateTransform of all spines in my custom setInterval which will keep firing on blur. something like createSpine(data, opts) { const spine = new PIXI.spine.Spine(data, opts); this.updateList.push(spine); return spine; } updateOnBlur() { // update animatedSprite PIXI.ticker.shared.update(); // update spine this.updateList.forEach(spine => spine.updateTransform()); } I am wondering is there any setting that I can apply shared ticker to all spines, so I don't need to store them in an array.
  9. hi guys, How can I make a spine keep checking onComplete Event while losing tab focus? As I tested, if I run several spine animations(different length) at the same time, then switch to another tab immediately, the onComplete events won't fire, but they will fire at once when the tab get focus again.
  10. @jerome oh, got it, you mean I can detect it and control it by myself, then I think getHeightAtCoordinates will be a useful function, but I expect imposter to do these works for me, so I will just go for PlaneImposter.
  11. @jerome what do you mean? you mean I can use getHeightAtCoordinates to resolve it? or you mean I can use groundMesh instead of a plane? it is groundMesh already just I named it plane
  12. @mr_pinc well...but that is a ground, it is weird to use a box to replace it, I think I'll ignore the warning and go for PlaneImposter
  13. hi @mr_pinc PlaneImposter works, but I got this warning(confused "Attention, PlaneImposter might not behave as you expect. Consider using BoxImposter instead"
  14. Hey guys I try to make a simple sport game, so first, I want to make a person stand on a ground who can run and jump on it, and I have trouble on the jump part, the dude won't stop by the ground when he is dropping from a height(https://www.babylonjs-playground.com/#1BZJVJ#113) if the position.y is 0, then the dude can stand fine on the ground