Closed alteregogi closed 1 year ago
This approach is mostly correct but you just need to fake3D
a reactive variable, as spriteDepth
is initially undefined and gets set after the first render.
I took a quick minute to recreate the vanilla js example with svelte-pixi here: https://stackblitz.com/edit/vitejs-vite-nart7d?file=src/App.svelte
(the effect seems slightly more distorted - not too sure why, the vanilla example is using an older version of pixi though)
This approach is mostly correct but you just need to
fake3D
a reactive variable, asspriteDepth
is initially undefined and gets set after the first render.I took a quick minute to recreate the vanilla js example with svelte-pixi here: https://stackblitz.com/edit/vitejs-vite-nart7d?file=src/App.svelte
(the effect seems slightly more distorted - not too sure why, the vanilla example is using an older version of pixi though)
awesome, thank you!
so i was try to create a fake 3D Effect using DisplacementFilter, and still not fully understand how to convert it to svelte-pixi because it need another sprite on DisplacementFilter argument.
references for vanilla js here https://codepen.io/lightmyfire/pen/PoZrqbm