Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background Image instead of Background Color #19

Open
knotdvn opened this issue Oct 19, 2021 · 3 comments
Open

Background Image instead of Background Color #19

knotdvn opened this issue Oct 19, 2021 · 3 comments

Comments

@knotdvn
Copy link

knotdvn commented Oct 19, 2021

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

Specifically for the Stage.

@andrewstart
Copy link
Collaborator

That is not a feature in the current editor.

@knotdvn
Copy link
Author

knotdvn commented Oct 20, 2021

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

@andrewstart
Copy link
Collaborator

andrewstart commented Oct 20, 2021

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>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants