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

PIXI.Texture.fromCanvas with CanvasRenderer doesn't work #11

Closed
MarxGames opened this issue Mar 18, 2013 · 7 comments
Closed

PIXI.Texture.fromCanvas with CanvasRenderer doesn't work #11

MarxGames opened this issue Mar 18, 2013 · 7 comments

Comments

@MarxGames
Copy link

I created a CanvasRenderer and tried to save a big rendered map to texture to optimize it a bit since it was a static map. However it only seemed to work when I was using a WebGLRenderer.

Made a demo http://jsfiddle.net/3SVGY/2/
Just switch the renderer to Canvas to see that it doesnt work

@GoodBoyDigital
Copy link
Member

Thanks for this, I will be working on renderTextures next so that will fix this issue for sure :)

@yomotsu
Copy link

yomotsu commented Mar 23, 2013

it seems the issue has been caused from missing pass to img
http://jsfiddle.net/3SVGY/6/

@yomotsu
Copy link

yomotsu commented Mar 23, 2013

however, CanvasRenderer has another issue which caused from drawImage() and frame of PIXI.Texture

drawImage() doesn't work when large size was applied as argument
this means, CanvasRenderer can't display objects which has too large size frame

here are demos

@GoodBoyDigital
Copy link
Member

Is that because the frame is bigger than the image being drawn itself?

@yomotsu
Copy link

yomotsu commented Mar 24, 2013

that's right. so when frame was set, it may be better to check sizes

@GoodBoyDigital
Copy link
Member

Sounds like a plan!
Will figure out a neat way to check when textures are created / updated that the frame is not too large. That way we wouldn't have to introduce a check every frame.

@lock
Copy link

lock bot commented Feb 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants