Jump to content

Extending PIXI.utils


jasonsturges
 Share

Recommended Posts

Are there some examples of extending PIXI.utils namespace?

Taking a look at Pixi's debugging and editor tools, the Free Transform Tool appears to extend PIXI.utils - cool library, looks pretty alpha without npm or webpack.  Just references PIXI in a global scope and attempts to prototype utils.

If I want to extend Pixi through utilities, or maybe just provide webpack module libraries through npm, any recommendations such as good example projects to follow?

Link to comment
Share on other sites

Extending such way its supported with webpack is difficult. Most of my plugins work like that:

import * as PIXI from "pixi.js";
global.PIXI = PIXI;
require("pixi-spine");

then pixi-spine takes global PIXI and adds "PIXI.spine" inside, and also a few methods for existing classes in pixi.

You can use the same approach - make a library that works with global pixi. In future we'll provide a way that is free of problems like "there are two versions of pixi in node_modules now", we have some problems with peer dependencies.

Right now dont focus on webpack and just do this thing.

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...