Skip to content

v0.3.2: Control viewer rendering

Compare
Choose a tag to compare
@mkkellogg mkkellogg released this 11 Mar 20:17
· 200 commits to main since this release

The Viewer class now accepts a new parameter renderMode, which lets you control when the viewer renders. It is of the type RenderMode:

const RenderMode = {
    Always: 0,
    OnChange: 1,
    Never: 2
};
  • Always is the default and will cause the viewer to render every frame.
  • OnChange will make the viewer only render when a visual element in the scene changes (camera position, camera orientation etc.)
  • Never prevents the viewer from doing any rendering

Additionally the new function Viewer.setRenderMode() allows this setting to be changed at runtime