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

Three.js doesn’t start rendering automatically on Plunker #566

Closed
8Observer8 opened this issue Jul 2, 2022 · 2 comments
Closed

Three.js doesn’t start rendering automatically on Plunker #566

8Observer8 opened this issue Jul 2, 2022 · 2 comments
Labels
bug Something isn't working needs-triage This is an un-triaged issue

Comments

@8Observer8
Copy link

Rendering starts when you move the center border:
image

Try it: https://plnkr.co/edit/uIUCVLrPkzT1rHMg?preview

I described this question on Three.js forum but they said that it is Plunker bug: Three.js doesn’t start rendering automatically on Plunker

I think it is related to Fetch API. Because this version with callbacks works: https://plnkr.co/edit/tAubSKoAOWRmS02r?preview

@8Observer8 8Observer8 added bug Something isn't working needs-triage This is an un-triaged issue labels Jul 2, 2022
@ggoodman
Copy link
Contributor

ggoodman commented Jul 4, 2022

Hi @8Observer8, I'm not familiar with Three.js but I notice that if I call onWindowResize() prior to calling render() at the end of init(), the scene does render. I forked your example and made this change in this plunk.

I also notice that subsequent renders work fine (either based on changes to code, manual refresh or even preview window resizing).

I'm trying to think of what might be unique about how Plunker sets up the preview iframe that could be getting in the way and am falling short.

In fact, if you run your project as a static page, the issue is also present. This makes me believe that there is some bit of initialization that is being omitted.

@ggoodman ggoodman closed this as completed Jul 4, 2022
@8Observer8
Copy link
Author

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage This is an un-triaged issue
Projects
None yet
Development

No branches or pull requests

2 participants