bigtimebuddy / pixi-svg

SVG to Graphics DisplayObject for pixi.js

Home Page:https://npmjs.com/pixi-svg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use generated Graphic as PIXI.DisplayObject?

richard-unterberg opened this issue · comments

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)