Jump to content

[PIXI v4.3] generateTexture moved renderer


d13
 Share

Recommended Posts

Hi Everyone,

I've got some old v3.x code that looks like this:

let o = new this.Graphics();

let texture = o.generateTexture()

In v4.3 it's giving me this deprecation warning:

Deprecation Warning: graphics generate texture has moved to the renderer. Or to render a graphics to a texture using canvas please use generateCanvasTexture.

The doc for `generateTexture` take me here:

http://pixijs.download/release/docs/PIXI.SystemRenderer.html#generateTexture

... but that indicates that it's a method of PIXI.Texture..?

 

Can anyone suggest what I need to do to update my existing code?

 

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...