Counter that keeps track of various potentially long-running tasks, including file loading and surface calculation.
Add the given component to the stage
the component to add
Add a zoom and a move animation with automatic targets
animation time in milliseconds
Create default representations for the given component
Cleanup when disposing of a stage object
Iterator over each representation and executing the callback
Get collection of components by name
Get collection of components by object
Get the current focus from the current clipNear value expressed as 0 (full view) to 100 (completely clipped) Negative values may be returned in some cases.
In 'camera' clipMode focus isn't applicable, this method returns 0.0
focus
Get stage parameters
Get collection of representations by name
Handle any size-changes of the container element
Load a file onto the stage
either a URL or an object containing the file data
loading parameters
A Promise object that resolves to a StructureComponent, a SurfaceComponent or a {@link ScriptComponent} object, depending on the type of the loaded file.
Make image from what is shown in a viewer canvas
Remove all components from the stage
Remove the given component
the component to remove
Set the focus, a value of 0 sets clipping planes to show full scene, while a value of 100 will compltely clip the scene.
focus
Set stage parameters
Set rock
if true start rocking and stop spinning
Set width and height
CSS width value
CSS height value
Set spin
if true start rocking and stop spinning
Toggle fullscreen
Toggle rock
Toggle spin
Generated using TypeDoc
Stage class, central for creating molecular scenes with NGL.
var stage = new Stage( "elementId", { backgroundColor: "white" } );