Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use generated Graphic as PIXI.DisplayObject? #30

Open
richard-unterberg opened this issue May 18, 2022 · 0 comments
Open

How to use generated Graphic as PIXI.DisplayObject? #30

richard-unterberg opened this issue May 18, 2022 · 0 comments

Comments

@richard-unterberg
Copy link

richard-unterberg commented May 18, 2022

I´m wondering if it is possible to access the PIXI.DisplayObject properties from from the generated Graphics like so:

const svgSrc = PIXI.Loader.shared.resources['assets/frame.svg'].data;
const createdGraphic = new SVG(svgSrc);
createdGraphic.width = 100;

If I´m logging createdGraphic the output looks like the usual DisplayObject Data, but I can´t access it´s methods.

(I´m using loader.shared to fetch all resources before init)

@richard-unterberg richard-unterberg changed the title a how to use generated Graphic as PIXI.DisplayObject May 18, 2022
@richard-unterberg richard-unterberg changed the title how to use generated Graphic as PIXI.DisplayObject How to use generated Graphic as PIXI.DisplayObject? May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant