Three.js doesn't start rendering automatically on Plunker


Why Three.js doesn’t start rendering automatically on Plunker?


I got a random example from the topic:

Copied it to Plunker: Plunker - Three.js Topic. Mouse wheel rotate geometry Preview works nice. Maybe this problem is related to Fetch API (that I use to load models from Collada by loadAsync) on Plunker, but I am not sure. I will try to use callbacks instead of loadAsync.

I replaced loader.loadAsync to loader.load. It starts rendering automatically. Is it Plunker’s bug? But I don’t want to see the objects being loaded one by one. Can I upload everything first and then start drawing? I cannot use loader.loadAsync now. I tried a lot of Sandboxes but I cannot find analog of Plunker that allows to use imports for object loaders.

Yes, it seems so. I don’t believe that it’s related to three.js.

Probably best to report this issue to Plunker if you want to have it fixed. Or you just use a different service.

1 Like

Can’t find where to create an issue. I sent a message about where I can create it on Twitter:

I created the issue: Three.js doesn’t start rendering automatically on Plunker · Issue #566 · plnkr/feedback · GitHub

The issue was solved by ggoodman here: Three.js doesn’t start rendering automatically on Plunker · Issue #566 · plnkr/feedback · GitHub

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.