AntoniaChimp

Hexi as extension

Recommended Posts

Hey !
I want to start a project with Pixi. But I really like some functions Hexi gives me.
So I would like to mix them both.

My plan was to use Hexi as main script and since its based on Pixi, call Pixi methods if needed.
But unfortunately I dont know how to access the Pixi object from Hexi.

On github it says I can relate to specific modules just by:

hexi.bump.hit(spriteOne, spriteTwo);

So I figured I could touch Pixi through hexi.pixi/ hexi.PIXI, but thats not the case.

Does anyone has experience with it ? It would make it much more easier to do things than in plain Pixi.

Share this post


Link to post
Share on other sites

If I'm not mistaken hexi hasn't got an update in 2 years which means it's a dead project. If you want to experiment that's fine but you'll be missing on the latest pixi updates/versions. As for working on a REAL project it's a NO, NO, NO, don't do that.

Share this post


Link to post
Share on other sites
2 hours ago, botmaster said:

If I'm not mistaken hexi hasn't got an update in 2 years which means it's a dead project. If you want to experiment that's fine but you'll be missing on the latest pixi updates/versions. As for working on a REAL project it's a NO, NO, NO, don't do that.

Ok thanks for your answer ! there were some cool functions like grid or shoot, which made me write less code, but then I should do plain Pixi. Thanks! What was the stablest version ?

Share this post


Link to post
Share on other sites

you can have equivalence on hit check for pixi like this.

 

    hitCheck(a, b){ // colision
        var ab = a._boundsRect;
        var bb = b._boundsRect;
        return ab.x + ab.width > bb.x && ab.x < bb.x + bb.width && ab.y + ab.height > bb.y && ab.y < bb.y + bb.height;
    };

http://pixijs.download/dev/docs/PIXI.DisplayObject.html#getBounds

100% stable with all plugins it v4.8.6
v5 also but not all plugins are available for now, will need wait maybe ~1 or 2 week maybe for update.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.