-
-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
https://pixijs.com/8.x/guides/basics/svg
pixijs.com/docs/guides/basics/svg.mdx
Lines 63 to 68 in 2897bc3
| ```ts | |
| const svgTexture = await Assets.load('path/to.svg', { | |
| resolution: 4 // will be 4 times as big! | |
| }); | |
| const mySprite = new Sprite(svgTexture); | |
| ``` |
Assets.load expects a callback for it second argument. This code fails.
I tracked down what the example code is actually doing, and I see now that the first input to Assets.load can be an object:
pixijs.com/docs/examples/graphics/svg-texture-large.js
Lines 14 to 19 in 2897bc3
| const tigerTexture = await Assets.load({ | |
| src: 'https://pixijs.com/assets/tiger.svg', | |
| data: { | |
| resolution: 4 | |
| } | |
| }); |
Metadata
Metadata
Assignees
Labels
No labels