Jump to content

PixiJs Sprite to Fabric Stage


dazzafact
 Share

Recommended Posts

Hello, how can i convert a PixiJs Sprite to add it to my Canvas stage (fabricJs)?
iam getting this error: 
fabric.min.js:8168 Uncaught TypeError: obj._set is not a function

slideBildMesh =  PIXI.Sprite.from($jsonDefault.img);

$app =  new fabric.Canvas('itemcontent1', {
  backgroundColor: 'lightgrey',
  width: divWidth,
  height: divHeight
});

 $app.add(slideBildMesh); //<--- error 

 

Link to comment
Share on other sites

You can try to share context2d, you have to use pixi.js-legacy package (aka pixi-legacy.js) https://www.npmjs.com/package/pixi.js-legacy , create CanvasRenderer (not just Renderer), and make sure that Fabric nor PixiJS changes state of context2d between them.

In that case, only knowledge of CanvasRenderingContext2d is required )

Edited by ivan.popelyshev
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...