OptionalalphaOptional flag for the enabled XR features (getContext("webgl", attributes)
OptionalassetOptional callback invoked when Asset resource finished loading. Id = Cogs.AssetResource Resource id, code = 0 Success, 1 = failure
OptionalbufferOptional callback invoked when Buffer resource finished loading. Id = Buffer Resource id, code = 0 Success, 1 = failure
OptionalcanvasOwning 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.
OptionalcontinuousSet to true to enable continuous updates
OptionaldecompressionOptional override the max number of webworkers doing data decompression (Default = 2).
OptionaldistPath to the Cogs.js distribution folder for runtime loading of wasm code and resources
OptionaleffectOptional 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. NOTE: this is currently ignored.
OptionalfetchOptional override of how to handle data loading requests
OptionalfontOptional callback invoked when Font resource finished loading. Id = Font Resource id, code = 0 Success, 1 = failure
OptionalforceClears the canvas alpha channel to opaque after rendering, useful as a temporary quick-fix but might have a performance impact.
OptionalglobalOptional override, number in [0,1], you probably should leave this as is. The current concurrency is multiplied with this to give the number of threads in the global queue.
OptionalglobalOptional override, the maximum number of threads to use in the global queue.
Optionalimage360Optional callback From Image360Component.
OptionallocateCogsInternal locateFile callback. initialized in by cogs. This is put onto the emscripten module object, see.
OptionallogOptional log callback.
OptionallogOptional log level.
OptionalmaterialOptional callback invoked when MaterialInstance resource finished loading. Id = Cogs.MaterialInstance Resource id, code = 0 Success, 1 = failure
OptionalmaterialOptional callback invoked when Material resource finished loading. Id = Cogs.MaterialResource Resource id, code = 0 Success, 1 = failure
OptionalmeshOptional callback invoked when Mesh resource finished loading. Id = Cogs.Mesh Resource id, code = 0 Success, 1 = failure
OptionalmodelOptional callback invoked when Model resource finished loading. Id = Cogs.ModelResource Resource id, code = 0 Success, 1 = failure
Optionalogc3DTilesOptional notification callback for OGC3DTilesComponent.
OptionalonOptional callback when Cogs initialized.
OptionalparentOptional explicit setting of Control.parentElement. If not set the canvas is used as parentElement
OptionalpotreeOptional notification callback for PotreeComponent.
OptionalprintOptional callback for processing stdout.
OptionalprintOptional callback for processing stderr.
OptionalprogressOptional GUI progressElement. Used to display Cogs status if both statusElement & progressElement set.
OptionalresourceOptional override, number in [0,1], you probably should leave this as is. The current concurrency is multiplied with this to give the number of threads in the resource queue.
OptionalresourceOptional override, the maximum number of threads to use in the resource queue.
OptionalstatusOptional GUI statusElement. Used to display Cogs status if both statusElement & progressElement set.
OptionaltextureOptional callback invoked when Texture resource finished loading. Id = Cogs.TextureResource Resource id, code = 0 Success, 1 = failure
OptionaltotalDon't use this with ALLOW_MEMORY_GROWTH=1
OptionalvariablesOptional Advanced Variables to be passed to the Cogs WASM module.
OptionalwebglOptional selection of WebGl version. 1 = old WebGL1, 2 = WebGL2 (Default)
OptionalwebgpuOptional actication of WebGPU.
OptionalxrOptional flag to enable XR features
OptionalxrOptional flag to show a screen overlay triggering XR features
Parameters to
See
Control.create() for Cogs initialization