pixi-particles-editor icon indicating copy to clipboard operation
pixi-particles-editor copied to clipboard

Background Image instead of Background Color

Open knotdvn opened this issue 4 years ago • 3 comments

Could anyone point me in the right direction to set a Background Image instead of a Background Color?

Specifically for the Stage.

knotdvn avatar Oct 19 '21 18:10 knotdvn

That is not a feature in the current editor.

andrewstart avatar Oct 19 '21 19:10 andrewstart

I'd be satisfied with a hacky few lines of JS to enter in the console. I found: this.app.editor.webgl.stage.children[0] and this.app.editor.canvas2d.stage.children[0] depending on the renderer toggle

seems to be the ref to the background sprite but modifying the _texture._baseTexture.imageUrl doesn't seem to do the trick.

Heck, if there were a few lines to set the background alpha to 0 for the stage and the canvas I could hacky add an image behind it in the dom

end goal is our creative team to test+modify+tweak particle animations on top of a screenshot of where it will be used in final media without having to run build pipelines.

I can't decide whether to solve from this.app or from this.PIXI , plz forgive, thanks a-plenty

knotdvn avatar Oct 20 '21 00:10 knotdvn

Going into the private variables of Sprite/Texture definitely won't get you anywhere in this case. I think you'd want something like ...children[0].texture = this.PIXI.Texture.from(<background url of hosted file somewhere>)

andrewstart avatar Oct 20 '21 02:10 andrewstart