Optional
alphaOptional flag for the enabled XR features (getContext("webgl", attributes)
Optional
assetOptional callback invoked when Asset resource finished loading. Id = Cogs.AssetResource Resource id, code = 0 Success, 1 = failure
Optional
bufferOptional callback invoked when Buffer resource finished loading. Id = Buffer Resource id, code = 0 Success, 1 = failure
Optional
canvasOwning HTML5 Canvas for Cogs. Created by Cogs Control if not set here. To enable Keyboard input for Cogs Debug GUI. Set tabIndex Property for canvas. E.g. canvas.tabIndex = 1 or suitable for application.
Optional
continuousSet to true to enable continuous updates
Optional
decompressionOptional override the max number of webworkers doing data decompression (Default = 2).
Optional
distPath to the Cogs.js distribution folder for runtime loading of wasm code and resources
Optional
effectOptional callback invoked when Effect resource finished loading. Id = Effect Resource id, code = 0 Success, 1 = failure
Declaration of extensions to enable for application. This is required for load-time dynamic linking. Applications should also use runtime.loadExtensionModule to make the dependency explicit. This is good in general for code understanding. In the future with runtime dynamic linking we can relax the requirement for declaring extensions at startup and the application should then still work.
Optional
fetchOptional override of how to handle data loading requests
Optional
fontOptional callback invoked when Font resource finished loading. Id = Font Resource id, code = 0 Success, 1 = failure
Optional
forceClears the canvas alpha channel to opaque after rendering, useful as a temporary quick-fix but might have a performance impact.
Optional
image360Optional callback From Image360Component.
Optional
locateCogsInternal locateFile callback. initialized in by cogs. This is put onto the emscripten module object, see.
Optional
logOptional log callback.
Optional
logOptional log level.
Optional
materialOptional callback invoked when MaterialInstance resource finished loading. Id = Cogs.MaterialInstance Resource id, code = 0 Success, 1 = failure
Optional
materialOptional callback invoked when Material resource finished loading. Id = Cogs.MaterialResource Resource id, code = 0 Success, 1 = failure
Optional
meshOptional callback invoked when Mesh resource finished loading. Id = Cogs.Mesh Resource id, code = 0 Success, 1 = failure
Optional
modelOptional callback invoked when Model resource finished loading. Id = Cogs.ModelResource Resource id, code = 0 Success, 1 = failure
Optional
ogc3DTilesOptional notification callback for OGC3DTilesComponent.
Optional
onOptional callback when Cogs initialized.
Optional
parentOptional explicit setting of Control.parentElement. If not set the canvas is used as parentElement
Optional
potreeOptional notification callback for PotreeComponent.
Optional
printOptional callback for processing stdout.
Optional
printOptional callback for processing stderr.
Optional
progressOptional GUI progressElement. Used to display Cogs status if both statusElement & progressElement set.
Optional
statusOptional GUI statusElement. Used to display Cogs status if both statusElement & progressElement set.
Optional
textureOptional callback invoked when Texture resource finished loading. Id = Cogs.TextureResource Resource id, code = 0 Success, 1 = failure
Optional
totalDon't use this with ALLOW_MEMORY_GROWTH=1
Optional
variablesOptional Advanced Variables to be passed to the Cogs WASM module.
Optional
variantBuild variant to use. default is a limited set. set to 'sdk' for all extensions.
Optional
webglOptional selection of WebGl version. 1 = old WebGL1, 2 = WebGL2 (Default)
Optional
xrOptional flag to enable XR features
Optional
xrOptional flag to show a screen overlay triggering XR features
Parameters to
See
Control.create() for Cogs initialization