Skip to content

Make the renderer work without a loop #112

@liberostelios

Description

@liberostelios

In the current examples, you use a loop to render the scene. I believe that there are many use cases for the renderer that do not really require a loop and a more conservative strategy (like only rendering when orbiting or due to certain events) would benefit performance and, mostly, energy efficiency (especially for laptops and mobile devices).

I've experimented with this and for the most part it works fine. Thanks to the onLoadModel event, you can force three.js to render every time a new tile is a available. Unfortunately, the problem is at the first load of the page. When you create the instance of the renderer, you have to wait for it to receive and parse the tileset json and then run a couple of renders before it fires up.

Maybe this could be fixed by firing an event when the tileset response arrives and the parsing is done? It's, also, unclear how many times you need to update the renderer before it starts downloading the actual tiles. Sometimes it need two updates, I think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions