Static Readonly versionIds of the top-level layers in rendering order (index 0 = bottom-most). An id's index here is the index moveLayer() expects for that position.
Get Dmd brightness
Get current dot size
Get current dot spacing
Get minimum dot spacing for the current shape
Perceptual brightness (HSP) of the off-dot background color.
Raw brightness value of the off-dot background (0–255).
Get the current off-dot color (RGB, each component 0–1).
Get current monochrome mode state.
Get the current monochrome tint color.
Get the number of visible dots horizontally at the current dot size.
Get the number of visible dots vertically at the current dot size.
Get the H5DMD library version (delegates to the static Dmd.version).
Get canvas
Get WebGPU canvas context (available after init)
Return width of the DND (dots)
Return height of the DND (dots)
Return width of the canvas (pixels)
Return height of the canvas (pixels)
Get current fps value
Show or hide the FPS overlay at runtime.
Add a LayerGroup to the DMD. The dedicated entry point for groups: a group has no content of its own, so it takes none of the loaded/updated/playback listeners leaf layers accept - those slots are internal plumbing a group uses to stay in sync with its children.
Optional options: Options<OptionsObject> | Partial<BaseLayerOptions>group options (dimensions, position, background, renderers, ...)
Optional options: Options<OptionsObject> | Partial<BaseLayerOptions>Optional layerLoadedListener: ((layer) => void | Promise<void>)Optional layerUpdatedListener: ((layer) => void | Promise<void>)Adding a LayerGroup through addLayer is deprecated and will be removed in the next major version - use addLayerGroup instead.
Add a new layer to the Dmd. The layer is created and added to the internal layers dictionary, and its position in the rendering order is determined by its zIndex (or the order of addition if zIndex is not specified).
concrete BaseLayer subclass to instantiate
unique layer id within the Dmd
Optional options: LayerOptionsByInstance<T>layer options (dimensions, position, class-specific settings, ...)
Optional layerLoadedListener: ((layer) => void | Promise<void>)called once the layer's content is loaded
Optional layerUpdatedListener: ((layer) => void | Promise<void>)called whenever the layer redraws its content
Optional layerOnPlayListener: LayerPlayListenerByInstance<T>video/animation layers only: called on play
Optional layerOnPauseListener: LayerPlayListenerByInstance<T>video/animation layers only: called on pause
Optional layerOnStopListener: LayerStopListenerByInstance<T>animation layers only: called on stop
the created layer instance
Fade a layer in (opacity 0 → 1). Makes the layer visible if it isn't already.
layer id
fade duration in ms
Optional easing: EasingFunctioneasing function (defaults to easeOutSine)
Fade a layer out (opacity → 0) then hide it.
layer id
fade duration in ms
Optional easing: EasingFunctioneasing function (defaults to easeOutSine)
Add a renderer instance to the Dmd TODO : Check if really a renderer class
(unique)
Change the dot shape at runtime.
H5DMD library version. Single source of truth for the version string (must be bumped together with package.json on release).