Constructors
constructor
- container: HTMLElement
- params: ViewerParams
Accessors
Utils
World
Methods
cancelLoad
- url: string
- (optional) unload: boolean
createExtension
- type: Extension subclass
dispose
getContainer
getExtension
getObjectProperties
- resourceURL: The id of the node where to start building properties.
- (optional) bypassCache: Enabled the use of the property cache. Default false
getRenderer
getViews
getWorldTree
hasExtension
true
if specified extension type exists, false
otherwise
Returns: boolean
init
loadObject
- loader: SpeckleLoader
- (optional) autoFit: boolean - Whether to automatically fit the view to the loaded object
on
- eventType: The ViewerEvent the handler needs to register to
- handler: The event handler
query
- query: The Query to run
requestRender
- (optional) flags: UpdateFlags. If no flags are provided it defaults to UpdateFlags.RENDER.
resize
screenshot
setLightConfiguration
unloadAll
unloadObject
- url: The resource id to unload.
Typedefs
LightConfiguration
- enabled: Enables direct lighting (sun).
- castShadow: Enables shadows.
- intensity: Direct light(sun) intensity.
- color: Direct light(sun) color.
- indirectLightIntensity: Indirect IBL intensity.
- shadowcatcher: Enables The Shadowcatcher. 🛸
ObjectLayers
PropertyInfo
- key: Property identifier, flattened.
- objectCount: Total number of objects that have this property.
- type: If the property is numeric or string based.
SelectionEvent
- multiple: Whether this is a multiple selection or not.
- event: The browser PointerEvent piggybacked.
- hits: The array of hits sorted by distance, where closest is first. node is the intersected TreeNode and point is it’s point of intersection.
SpeckleView
- origin: The origin (location) of the view
- target: The point where the view is “looking at”.
- (optional) name: Human readable name
- (optional) upDirection: The view’s basis up
- (optional) name: The view’s basis forward
SunLightConfiguration
- elevation: Sun elevation in polar coordinates.
- azimuth: Sun azimuth in polar coordinates.
- radius: Sun distance from World center.
UpdateFlags
UtilsInterface
ViewerEvent
ViewerEventPayload
ViewerParams
- showStats: Displays a stats panel.
- environmentSrc: The URL of the image used for indirect IBL.
- verbose: Enables viewer logs.
Asset
- id: Mandatory id of the asset.
- src: The URL of the asset. Supports inline base64 encoded assets
- type: AssetType
For correct asset caching use need to use unique asset ids!