pixi3d: Textures smaller than 200x200 pixels do not render with Sprite3D
Using pixiJS v7.2.4 with pixi3d v2.3.1
// Does not work
let a = new PIXI3D.Sprite3D(commonAssets.rabbit1); // 25x25 PNG
let b = new PIXI3D.Sprite3D(commonAssets.rabbit2); // 199x199 PNG
// Works!
let c = new PIXI3D.Sprite3D(commonAssets.rabbit3); // 200x200 PNG
let d = new PIXI3D.Sprite3D(commonAssets.rabbit4); // 400x400 PNG
Many thanks for any ideas. Amazing library!
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (6 by maintainers)
There is already a way to render to a texture, check https://api.pixi3d.org/classes/CompositeSprite.html and https://codesandbox.io/s/github/jnsmalm/pixi3d-sandbox/tree/master/post-processing-sprite
Found why this happens at https://github.com/jnsmalm/pixi3d/blob/fde244fc4054aeee4ad2c616ed4aea7e827785ab/src/sprite/projection-sprite.ts#L66
Maybe I should just disable that behaviour?