Skip to content

Helios

class

Back to Helios Web API

Kind
class
Source
src/Helios.js:2236

Description

Main Helios Web visualization controller for one helios-network graph.

Signature

export class Helios extends EventTarget {

Parameters

NameTypeAttributesDefaultDescription
networkHeliosNetworkWASM-backed graph store that supplies topology, attributes, and serialization.
optionsObjectoptionalRenderer, layout, behavior, mapper, interface, persistence, touch, camera, and quality options.
containerElement|stringoptionaldocument.bodyElement or selector that receives the Helios canvas, SVG overlays, and interaction layers.
renderer'auto'|'webgpu'|'webgl'optional'auto'Preferred renderer backend. auto chooses WebGPU when available and falls back to WebGL2.
mode'2d'|'3d'optional'2d'Initial dimensional mode.
projection'perspective'|'orthographic'optional'perspective'Initial 3D camera projection.
layoutObject|LayoutoptionalLayout configuration or a layout instance to use for graph positions.
typestringoptional'gpu-force'Built-in layout key used when options.layout is a configuration object.
optionsObjectoptionalLayout-specific options passed to the selected layout implementation.
startupObject|falseoptionalFirst-frame startup behavior, or false to disable the loading overlay, canvas hiding, and layout warmup.
loadingOverlaybooleanoptionaltrueShow a centered loading spinner while Helios is preparing the first visible frame.
hideCanvasUntilFirstFramebooleanoptionaltrueKeep the canvas hidden until the first intended graph frame is rendered.
layoutIterationsnumberoptional100Optional number of layout updates to wait before the first visible graph frame.
layoutDurationMsnumberoptional1000Optional layout warmup time to wait before the first visible graph frame. When both layout warmup limits are set, the first one reached releases the frame. Large initial networks use a 5000 ms default duration unless this option is set.
behaviorsObject|falseoptionalBuilt-in behavior options, custom behavior instances, or false to disable default behaviors.
mappersObject|nulloptionalInitial node and edge mapper configuration. Pass null to skip default mapper setup.
interpolationObject|falseoptionalPosition interpolation controls used when switching layouts or applying saved positions.
labelsObjectoptionalInitial label overlay options handled by LabelsBehavior.
legendsObjectoptionalInitial legend overlay options handled by LegendsBehavior.
densityboolean|ObjectoptionalfalseDensity layer enablement or density layer options.
transparencyModeEdgesstringoptional'weighted'Edge transparency mode. The default weighted mode accumulates overlapping edges without forcing every edge through the same alpha curve.
cameraObjectoptionalCamera framing, controls, and target tracking options.
largeNetworkStartupFitbooleanoptionaltrueStart large initial networks from a wider fit and settle toward the normal fit while automatic fitting remains enabled.
largeNetworkStartupNodeThresholdnumberoptional1000000Node count threshold for wide startup fitting.
largeNetworkStartupEdgeThresholdnumberoptional1000000Edge count threshold for wide startup fitting.
largeNetworkStartupScalenumberoptional4Multiplier used to move the startup fit farther from the graph before settling.
largeNetworkStartupDurationMsnumberoptional2200Duration of the automatic startup settle animation.
quickControlsboolean|ObjectoptionaltrueCompact top-right auto-fit, layout pause/run, and zoom controls. Pass false to disable all controls, or disable individual groups with autoFit, layout, or zoom.
uiboolean|ObjectoptionalfalseOptional HeliosUI creation. Pass true to create the standard panel set, or an object with HeliosUI options and panels set to a panel name, array of names, true, or false.
networkSourceObjectoptionalMetadata for the active network, such as name, baseName, format, and provenance fields used by persistence and file actions.
fileDropboolean|ObjectoptionaltrueFile-drop behavior for loading supported network files into the active view.
storageboolean|ObjectoptionalStorage backend configuration. Pass false to disable persistent sessions, true for browser storage, or an object accepted by createHeliosStorageManager.
sessionboolean|Object|stringoptionalSession persistence controls or explicit session id used by browser/native storage backends.
workspaceIdstringoptional'default'Workspace namespace for persisted preferences and sessions.
persistNetworkbooleanoptionalfalsePersist the network payload as part of browser/native session saves.
networkPersistenceObjectoptionalNetwork payload persistence policy, size limits, and backend-specific options.
positionPersistenceObjectoptionalSeparate layout-position persistence policy for storage backends that support split payloads.
sessionThumbnailboolean|ObjectoptionalThumbnail capture policy for saved sessions.
suppressBrowserGesturesbooleanoptionaltruePrevent native browser pan, zoom, and selection gestures over the visualization.
autoCleanupbooleanoptionaltrueDestroy this Helios instance when its root or container is removed from the DOM.
disposeNetworkOnDestroybooleanoptionaltrueDispose the active network when destroy() runs.
manualRenderingbooleanoptionalfalseDisable automatic scheduler rendering so the host application can request frames explicitly.
maxFpsnumberoptionalOptional scheduler FPS cap.
powerPreference'high-performance'|'low-power'optional'high-performance'Preferred GPU class for WebGL and WebGPU initialization.
webglContextAttributesWebGLContextAttributesoptionalExtra WebGL2 context attributes merged over Helios defaults.
webgpuAdapterOptionsGPURequestAdapterOptionsoptionalExtra WebGPU adapter options merged over Helios defaults.
webgpuDeviceDescriptorGPUDeviceDescriptoroptionalExtra WebGPU device descriptor options. Explicit requiredLimits are merged with Helios' graph-oriented limit requests.
webgpuCanvasConfigurationPartial<GPUCanvasConfiguration>optionalExtra WebGPU canvas configuration values merged over Helios defaults.
supersamplingboolean|string|numberoptionalCanvas supersampling mode or scale factor.
theme'dark'|'light'|stringoptionalInitial renderer/UI theme. When omitted, Helios follows data-helios-theme, data-theme, data-md-color-scheme, or the browser color-scheme preference.
backgroundstring|Array<number>optionalRenderer background color. Takes precedence over theme-derived defaults.
clearColorstring|Array<number>optionalRenderer clear color. Takes precedence over theme-derived defaults.

Returns

Visualization controller with a ready promise that resolves after renderer, scheduler, layers, behaviors, and initial geometry are initialized.

Type Helios

Notes

options.container should be an element or selector that already has stable dimensions. options.renderer can prefer webgpu or webgl; Helios falls back according to renderer availability. Built-in behaviors are attached by default; options.behaviors accepts behavior options or custom behavior instances when an app needs to tune or extend them. Set suppressBrowserGestures: true for touch-first embedded canvases. Helios automatically destroys itself when its root or container is removed from the DOM unless options.autoCleanup is false. Destroying Helios disposes the current network by default; pass disposeNetworkOnDestroy: false when the application will keep using the same network after unmount.

Static Properties

Constants and metadata exposed directly on the class.

STATES → {Object}

Source: src/Helios.js:2244

Built-in bit flags used by node and edge interaction state.

Returns

State bit constants for filtered, selected, and highlighted items.

Type Object

STATE_BITS → {Object}

Source: src/Helios.js:2257

Alias for STATES kept for compatibility with earlier public APIs.

Returns

State bit constants.

Type Object

UI_BINDINGS → {Object}

Source: src/Helios.js:2266

Metadata describing settings that can be bound to controls in the UI.

Returns

UI binding descriptors keyed by Helios setting name.

Type Object

Lifecycle

Creation, initialization, prewarming, cleanup, and renderer lifetime.

initialize() → {Promise<void>}

Source: src/Helios.js:8257

Initialize layout, renderer, picking, attribute tracking, and scheduler state.

Returns

Resolves when the first renderer and layout setup is complete.

Type Promise<void>

Notes

The constructor calls this automatically and exposes the promise as helios.ready; applications usually await ready instead of calling this directly.

prewarm(options = {}) → {Promise<void>}

Source: src/Helios.js:12610

Pre-runs mapper application before first render. Useful for large graphs where the first geometry pass is expensive. Can be awaited before helios.ready to shorten time to first render.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalReserved for future prewarm controls.

Returns

Resolves when mapper prewarm work has completed.

Type Promise<void>

Example


helios.prewarm({
  enabled: true,
});

destroy() → {void}

Source: src/Helios.js:15281

Dispose renderer resources, UI bindings, workers, timers, and event listeners owned by this instance.

Returns

Type void

Behaviors

Behavior registration and state. Built-in behavior implementations are documented under Behaviors.

hasBehavior(name) → {boolean}

Source: src/Helios.js:3858

Check whether a behavior is active or registered.

Parameters

NameTypeAttributesDefaultDescription
namestringBehavior id.

Returns

True when the behavior is active or available in the registry.

Type boolean

getBehavior(name) → {Behavior|null}

Source: src/Helios.js:3872

Return an active behavior, lazily creating registered built-ins when needed.

Parameters

NameTypeAttributesDefaultDescription
namestringBehavior id.

Returns

Active behavior instance, or null when unavailable.

Type Behavior|null

registerBehavior(name, behaviorCtor) → {Helios}

Source: src/Helios.js:3890

Register a behavior constructor or factory for later activation.

Parameters

NameTypeAttributesDefaultDescription
namestringBehavior id.
behaviorCtorFunctionConstructor or factory that creates a behavior.

Returns

This Helios instance.

Type Helios

useBehavior(name, behaviorOrOptions) → {Behavior}

Source: src/Helios.js:3907

Activate a behavior, update an existing behavior, or return the active one.

Parameters

NameTypeAttributesDefaultDescription
namestringBehavior id.
behaviorOrOptionsBehavior|Object|booleanoptionalBehavior instance, behavior options, or true to activate with defaults.

Returns

Active behavior instance.

Type Behavior

Example


const selection = helios.useBehavior('selection', { multiple: true });

serializeBehaviorState() → {Object}

Source: src/Helios.js:7023

Serialize state held by active behaviors.

Returns

Behavior state keyed by behavior id.

Type Object

restoreBehaviorState(snapshot = {}) → {Helios}

Source: src/Helios.js:7035

Restore state for active behaviors.

Parameters

NameTypeAttributesDefaultDescription
snapshotObjectoptionalBehavior state keyed by behavior id.

Returns

This Helios instance.

Type Helios

Filtering And State

Graph filtering and interaction state. When active, FilterBehavior and SelectionBehavior coordinate this area.

getGraphFilter() → {Object}

Source: src/Helios.js:6446

Return the active graph filter state and filtered graph sizes.

Returns

Filter state with enabled, scope, normalized options, filtered/base node and edge counts, and the last filter error.

Type Object

Example


const state = helios.getGraphFilter();
if (state.enabled) console.log(state.nodeCount, state.edgeCount);

graphFilter(options) → {Object|Helios}

Source: src/Helios.js:6479

Read or replace the active graph filter.

Parameters

NameTypeAttributesDefaultDescription
optionsObject|false|nulloptionalFilter options, false, or null. Omit the argument to read the current state.

Returns

Current filter state when called without arguments, otherwise this Helios instance for chaining.

Type Object|Helios

Example


helios.graphFilter({
  nodeRules: [{ attribute: 'degree', operator: '>=', value: 3 }],
  scope: 'render',
});

setGraphFilter(options = {}) → {Helios}

Source: src/Helios.js:6508

Apply a render or render-and-layout graph filter.

Parameters

NameTypeAttributesDefaultDescription
optionsObject|HeliosFilterFilter rule set or reusable HeliosFilter instance.
nodeRulesArray.<Object>optionalNode rules to apply.
edgeRulesArray.<Object>optionalEdge rules to apply.
scope'render'|'render+layout'optionalFilter scope.

Returns

This Helios instance.

Type Helios

Notes

render hides filtered items without changing dynamic layout forces. render+layout also feeds the filtered graph to the active layout.

Example


helios.setGraphFilter({
  nodeRules: [{ attribute: 'group', operator: '==', value: 'core' }],
  scope: 'render+layout',
});

activateHeliosFilter(filter) → {Helios}

Source: src/Helios.js:6560

Activate a reusable HeliosFilter instance.

Parameters

NameTypeAttributesDefaultDescription
filterHeliosFilter|null|falseFilter instance to activate, or null/false to clear filtering.

Returns

This Helios instance.

Type Helios

Example


const filter = new HeliosFilter({ nodeRules: [{ attribute: 'kind', value: 'paper' }] });
helios.activateHeliosFilter(filter);

getActiveHeliosFilter() → {HeliosFilter|null}

Source: src/Helios.js:6578

Return the reusable filter currently attached to this view.

Returns

Active reusable filter, if one was supplied.

Type HeliosFilter|null

Example


const value = helios.getActiveHeliosFilter();

reapplyActiveHeliosFilter() → {Helios}

Source: src/Helios.js:6589

Re-run the active reusable filter after its rules or source data changed.

Returns

This Helios instance.

Type Helios

clearGraphFilter() → {Helios}

Source: src/Helios.js:6603

Remove the active graph filter and restore the base graph view.

Returns

This Helios instance.

Type Helios

Example


helios.clearGraphFilter();

Network And Persistence

Network replacement, serialization, and visualization state persistence. ExporterBehavior and InterfaceBehavior can surface parts of this flow in the UI.

replaceNetwork(nextNetwork, options = {}) → {Promise<Helios>}

Source: src/Helios.js:6642

Replace the graph store while preserving visualization state by default.

Parameters

NameTypeAttributesDefaultDescription
nextNetworkHeliosNetworkReplacement graph.
optionsObjectoptionalReplacement behavior options.
disposeOldbooleanoptionaltrueDispose the previous network.
keepCamerabooleanoptionaltruePreserve the current camera.
keepMappersbooleanoptionaltruePreserve mapper settings.
markNetworkDirtybooleanoptionaltrueMark persistence network data dirty after replacement.

Returns

This Helios instance after the renderer and layout are rebound to the new graph.

Type Promise<Helios>

Example


await helios.replaceNetwork(nextNetwork, { keepCamera: false });

loadNetwork(source, options = {}) → {Promise<HeliosNetwork>}

Source: src/Helios.js:6908

Load a serialized network and replace the active graph.

Parameters

NameTypeAttributesDefaultDescription
sourceBlob|ArrayBuffer|string|FileNetwork payload or file-like object.
optionsObjectoptionalLoad and replacement options.
format'xnet'|'zxnet'|'bxnet'|'gml'|'gt'optionalInput format when it cannot be inferred from source.name.

Returns

Loaded network instance.

Type Promise<HeliosNetwork>

Example


const network = await helios.loadNetwork(file, { format: 'bxnet' });

saveNetwork(format = 'bxnet', options = {}) → {Promise<Blob|string|ArrayBuffer>}

Source: src/Helios.js:6985

Serialize the active graph in a Helios Network format.

Parameters

NameTypeAttributesDefaultDescription
format'xnet'|'zxnet'|'bxnet'|'gml'|'gt'optional'bxnet'Output format.
optionsObjectoptionalSave options forwarded to the network serializer.

Returns

Serialized network payload.

Type Promise<Blob|string|ArrayBuffer>

serializeVisualizationState(options = {}) → {Object}

Source: src/Helios.js:7084

Build a portable visualization-state envelope.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalSerialization options.

Returns

Visualization-state envelope containing UI, behavior, camera, and network-source state.

Type Object

Example


helios.serializeVisualizationState({
  enabled: true,
});

serializeVisualizationStateAsync(options = {}) → {Promise<Object>}

Source: src/Helios.js:7111

Build a portable visualization-state envelope and await async layout snapshots.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalSerialization options.

Returns

Visualization-state envelope containing UI, behavior, camera, network-source, storage, and async layout runtime state.

Type Promise<Object>

Example


helios.serializeVisualizationStateAsync({
  enabled: true,
});

importVisualizationState(source, options = {}) → {Promise<Object>}

Source: src/Helios.js:7137

Import a visualization-state envelope and apply it to this view.

Parameters

NameTypeAttributesDefaultDescription
sourceObject|string|BlobVisualization-state envelope or JSON payload.
optionsObjectoptionalRestore options forwarded to behaviors.

Returns

Parsed persistence envelope.

Type Promise<Object>

restoreVisualizationState(source, options = {}) → {Promise<Object>}

Source: src/Helios.js:7214

Alias for importVisualizationState.

Parameters

NameTypeAttributesDefaultDescription
sourceObject|string|BlobVisualization-state envelope or JSON payload.
optionsObjectoptionalRestore options.

Returns

Parsed persistence envelope.

Type Promise<Object>

exportVisualizationState(options = {}) → {Object|string|Blob}

Source: src/Helios.js:7227

Export visualization state as an object, JSON string, or Blob.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalExport options.
format'Object'|'string'|'blob'optional'object'Output shape.

Returns

Visualization-state payload.

Type Object|string|Blob

Example


helios.exportVisualizationState({
  enabled: true,
});

serializeTrackedVisualizationState(options = {}) → {Object}

Source: src/Helios.js:7246

Build a sparse visualization-state envelope from tracked state overrides.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalSerialization options.
includeLayoutRuntimebooleanoptionaltrueInclude layout runtime state.

Returns

Sparse visualization-state envelope suitable for portable state attachment.

Type Object

Example


helios.serializeTrackedVisualizationState({
  enabled: true,
});

serializeTrackedVisualizationStateAsync(options = {}) → {Promise<Object>}

Source: src/Helios.js:7275

Build a sparse visualization-state envelope and await async layout snapshots.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalSerialization options.
includeLayoutRuntimebooleanoptionaltrueInclude layout runtime state.

Returns

Sparse visualization-state envelope suitable for portable state attachment.

Type Promise<Object>

Example


helios.serializeTrackedVisualizationStateAsync({
  enabled: true,
});

getAttachedVisualizationState(network = this.network, options = {}) → {Object|null}

Source: src/Helios.js:7304

Read a visualization-state envelope stored on a network attribute.

Parameters

NameTypeAttributesDefaultDescription
networkHeliosNetworkoptionalthis.networkNetwork to inspect.
optionsObjectoptionalAttribute lookup options.

Returns

Parsed envelope, or null when no valid state is attached.

Type Object|null

attachVisualizationStateToNetwork(snapshot = null, options = {}) → {Helios}

Source: src/Helios.js:7325

Store visualization state on a network string attribute.

Parameters

NameTypeAttributesDefaultDescription
snapshotObject|nulloptionalnullExisting envelope, or null to capture current state.
optionsObjectoptionalAttachment options.

Returns

This Helios instance.

Type Helios

clearAttachedVisualizationState(options = {}) → {Helios}

Source: src/Helios.js:7345

Remove visualization state attached to the active network.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalAttribute removal options.

Returns

This Helios instance.

Type Helios

Example


helios.clearAttachedVisualizationState({
  enabled: true,
});

savePortableNetwork(format = 'bxnet', options = {}) → {Promise<Blob|string|ArrayBuffer>}

Source: src/Helios.js:7364

Save the graph with optional embedded visualization state.

Parameters

NameTypeAttributesDefaultDescription
format'xnet'|'zxnet'|'bxnet'|'gml'|'gt'optional'bxnet'Output network format.
optionsObjectoptionalPortable save options.
includeVisualizationbooleanoptionalfalseAttach current visualization state before saving.

Returns

Serialized network payload.

Type Promise<Blob|string|ArrayBuffer>

addNodes(count, initializer) → {Uint32Array}

Source: src/Helios.js:12687

Add nodes to the backing network and initialize their visual state.

Parameters

NameTypeAttributesDefaultDescription
countnumberNumber of nodes to add.
initializerFunctionoptionalOptional callback receiving created node ids and the visual attribute manager.

Returns

Created node indices.

Type Uint32Array

addEdges(edges, initializer) → {Uint32Array}

Source: src/Helios.js:12716

Add edges to the backing network and initialize their visual state.

Parameters

NameTypeAttributesDefaultDescription
edgesArray<Array<number>>|TypedArrayEdge pairs to insert.
initializerFunctionoptionalOptional callback receiving created edge ids and the visual attribute manager.

Returns

Created edge indices.

Type Uint32Array

Figure Export

High-resolution figure capture and download. ExporterBehavior provides the built-in export interface.

getFigureExportCapabilities(options = {}) → {{maxBitmapDimension:number,maxFigureDimension:number,defaultPreset:string,presets:Array.<Object>}}

Source: src/Helios.js:7552

Return renderer-aware figure export limits and preset availability.

Parameters

NameTypeAttributesDefaultDescription
options{supersampling?: number|string}optionalSupersampling request used when computing max safe output dimensions.

Returns

Export capability record for the current renderer and viewport.

Type {maxBitmapDimension:number,maxFigureDimension:number,defaultPreset:string,presets:Array.<Object>}

Notes

WebGL and WebGPU expose different maximum texture dimensions, so this method should be called after await helios.ready and whenever supersampling changes.

Example


helios.getFigureExportCapabilities({
  enabled: true,
});

exportFigureBlob(options = {}) → {Promise<Blob>}

Source: src/Helios.js:7973

Capture the current visualization as a PNG or SVG Blob.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalFigure export options including format, preset, width, height, supersampling, includeLabels, includeLegends, includeInterface, transparentBackground, and legendScale.

Returns

Image blob for the requested figure.

Type Promise<Blob>

Example


const blob = await helios.exportFigureBlob({
  format: 'png',
  width: 1920,
  height: 1080,
  includeLabels: true,
  includeLegends: true,
});

exportFigurePreviewBlob(options = {}, previewOptions = {}) → {Promise<Blob>}

Source: src/Helios.js:8013

Capture a scaled PNG preview for a full-size figure export request.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalFull export options that should be previewed.
previewOptions{maxWidth?:number,maxHeight?:number,supersampling?:number|string}optionalPreview output constraints.

Returns

PNG preview blob.

Type Promise<Blob>

Notes

Preview capture keeps the full export's framing and overlay intent while using smaller raster dimensions for UI previews.

Example


helios.exportFigurePreviewBlob({
  enabled: true,
});

exportFigure(filenameOrOptions, maybeOptions = {}) → {Promise<Object>}

Source: src/Helios.js:8066

Capture and download the current visualization.

Parameters

NameTypeAttributesDefaultDescription
filenameOrOptionsstring|ObjectoptionalDownload filename or figure export options.
maybeOptionsObjectoptionalFigure export options when the first argument is a filename.

Returns

Download metadata containing blob, filename, format, logical dimensions, bitmap dimensions, and supersampling.

Type Promise<Object>

Notes

In non-browser runtimes the method still creates the figure blob and returns metadata, but no download link is clicked.

Events

Event subscription helpers and emitted interaction events.

on(type, handler, options) → {Function}

Source: src/Helios.js:8109

Add an event listener and receive an unsubscribe function.

Parameters

NameTypeAttributesDefaultDescription
typestringEvent type, usually one of the EVENTS constants.
handlerFunctionListener function.
optionsObject|booleanoptionalDOM addEventListener options.

Returns

Function that removes the listener.

Type Function

Example


const unsubscribe = helios.on(EVENTS.NODE_CLICK, (event) => {
  console.log(event.detail.index);
});

listen(typeWithNamespace, handler, options) → {Helios}

Source: src/Helios.js:8137

Add or replace a namespaced event listener.

Parameters

NameTypeAttributesDefaultDescription
typeWithNamespacestringEvent type, optionally followed by .namespace for replacement/removal.
handlerFunction|nullListener function, or null to remove.
optionsObject|booleanoptionalDOM listener options.

Returns

This Helios instance.

Type Helios

Example


helios.listen(`${EVENTS.NODE_HOVER}.tooltip`, ({ detail }) => {
  updateTooltip(detail);
});

off(type, handler, options)

Source: src/Helios.js:8195

Remove an event listener.

Parameters

NameTypeAttributesDefaultDescription
typestringEvent type.
handlerFunctionListener function originally registered.
optionsObject|booleanoptionalDOM listener options.

onAny(handler, options) → {Function}

Source: src/Helios.js:8208

Observe every event emitted through Helios.

Parameters

NameTypeAttributesDefaultDescription
handlerFunctionListener receiving { type, detail, event, target }.
optionsObjectoptionalListener options, including signal.

Returns

Function that removes the listener.

Type Function

Example


const stop = helios.onAny(EVENTS.NODE_CLICK, (event) => {
  console.log(event.detail);
});

emit(type, detail) → {CustomEvent}

Source: src/Helios.js:8232

Dispatch a Helios event.

Parameters

NameTypeAttributesDefaultDescription
typestringEvent type.
detailObjectoptionalEvent detail payload.

Returns

Dispatched event object.

Type CustomEvent

Camera And View

Camera framing, target following, dimensional mode, and transitions. InterfaceBehavior can expose these controls.

requestFrameNetwork(options = {}) → {Helios}

Source: src/Helios.js:6829

Queue a camera fit once the renderer and graph bounds are ready.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalCamera fit options.
maxAttemptsnumberoptional25Maximum geometry ticks to retry.

Returns

This Helios instance.

Type Helios

Example


helios.requestFrameNetwork({
  enabled: true,
});

frameNetwork(options = {}) → {boolean}

Source: src/Helios.js:6863

Fit the camera to the current visible graph or selected node set.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalCamera fit options.
nodeIndicesArray<number>|TypedArrayoptionalNode indices to frame.
animatebooleanoptionalfalseAnimate the transition.
paddingRationumberoptionalExtra viewport padding ratio.

Returns

True when a camera pose was applied.

Type boolean

Example


helios.frameNetwork({ animate: true, paddingRatio: 0.08 });

cameraPose() → {Object|null}

Source: src/Helios.js:10977

Capture the current camera pose.

Returns

Serializable camera pose, or null before a renderer is available.

Type Object|null

cameraControls(options, stateOptions = {}) → {Object|Helios}

Source: src/Helios.js:10990

Read or update automatic camera-control policy.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalCamera-control fields to update. Omit to read the current snapshot.
stateOptionsObjectoptionalState tracking options for persistence-aware writes.

Returns

Current camera-control snapshot when called without arguments; otherwise this Helios instance.

Type Object|Helios

Example


helios.cameraControls({
  enabled: true,
});

cameraTargetNodes(nodeIndices, options = {}) → {Array<number>|Helios}

Source: src/Helios.js:11052

Focus the camera on a set of node indices.

Parameters

NameTypeAttributesDefaultDescription
nodeIndicesArray<number>|TypedArrayoptionalNode indices to target. Omit to read the current target list.
optionsObjectoptionalFocus, zoom, animation, and follow options.

Returns

Current target list when called without arguments; otherwise this Helios instance.

Type Array<number>|Helios

Example


helios.cameraTargetNodes([0, 1, 2]);

cameraFollowNodes(nodeIndices, options = {}) → {Array<number>|Helios}

Source: src/Helios.js:11107

Keep the camera centered on moving node indices.

Parameters

NameTypeAttributesDefaultDescription
nodeIndicesArray<number>|TypedArrayoptionalNode indices to follow. Pass an empty list to disable following.
optionsObjectoptionalFollow interval, framing, zoom, and animation options.

Returns

Current followed node list when called without arguments; otherwise this Helios instance.

Type Array<number>|Helios

Example


helios.cameraFollowNodes([0, 1, 2]);

setCameraPose(pose, options = {}) → {Helios}

Source: src/Helios.js:11149

Apply a camera pose immediately.

Parameters

NameTypeAttributesDefaultDescription
poseObjectCamera pose fields to merge into the current pose.
optionsObjectoptionalRender, state tracking, and manual-interaction options.

Returns

This Helios instance.

Type Helios

transitionCamera(pose, options = {}) → {Promise<Helios>}

Source: src/Helios.js:11211

Animate the camera from its current pose to a target pose.

Parameters

NameTypeAttributesDefaultDescription
poseObjectTarget camera pose fields.
optionsObjectoptionalTransition duration, starting pose, render, and interaction options.

Returns

This Helios instance after the transition completes.

Type Promise<Helios>

stopCameraTransition() → {Helios}

Source: src/Helios.js:11241

Stop any active camera transition.

Returns

This Helios instance.

Type Helios

mode() → {'2d'|'3d'}

Source: src/Helios.js:11253

Return the active dimensional rendering mode.

Returns

Current camera/rendering mode.

Type '2d'|'3d'

setMode(mode, options = {}) → {Promise<Helios>}

Source: src/Helios.js:11266

Switch between 2D and 3D rendering modes.

Parameters

NameTypeAttributesDefaultDescription
mode'2d'|'3d'Target dimensional mode.
optionsObjectoptionalAnimation, delegate-sync, and camera framing options.

Returns

This Helios instance after the mode switch completes.

Type Promise<Helios>

Example


await helios.setMode('2d');

Layout And Positions

Layout selection, position sources, interpolation, and position snapshots. LayoutBehavior handles the built-in layout UI.

createLayout(layoutOption) → {Layout}

Source: src/Helios.js:12642

Create a layout instance from a layout option object or return an existing layout.

Parameters

NameTypeAttributesDefaultDescription
layoutOptionObject|LayoutLayout instance or descriptor such as { type: 'gpu-force' }.

Returns

Layout instance bound to the current render network.

Type Layout

layout(layout) → {Layout|Helios}

Source: src/Helios.js:13432

Read or replace the active layout instance.

Parameters

NameTypeAttributesDefaultDescription
layoutLayoutoptionalLayout instance extending the Helios layout base class.

Returns

Current layout when omitted; otherwise this Helios instance.

Type Layout|Helios

getLayoutPositionAttributeChoices(options = {}) → {Array.<Object>}

Source: src/Helios.js:13490

List node attributes that can seed layout positions.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalChoice discovery options.
networkHeliosNetworkoptionalNetwork to inspect. Defaults to the active network.
mode'2d'|'3d'optionalMode used to label random seed choices.

Returns

Position choices with value, label, and dimension fields.

Type Array.<Object>

Example


helios.getLayoutPositionAttributeChoices({
  enabled: true,
});

setLayoutPositionsFromNodeAttribute(name, options = {}) → {boolean}

Source: src/Helios.js:13545

Copy a numeric node attribute into the canonical layout-position attribute.

Parameters

NameTypeAttributesDefaultDescription
namestringSource node attribute name, or the random seed choice value.
optionsObjectoptionalPosition-copy options.
networkHeliosNetworkoptionalNetwork to update. Defaults to the active network.

Returns

true when positions were written.

Type boolean

positions(options) → {Object|Helios}

Source: src/Helios.js:13680

Read or update the active position source used for rendering and layout handoff.

Parameters

NameTypeAttributesDefaultDescription
optionsObject|nulloptionalPosition pipeline options, or null to reset to network-backed positions.
source'network'|'delegate'optionalSource for current positions.
delegatePositionDelegateoptionalDelegate used when source is delegate.

Returns

Current position source when omitted; otherwise this Helios instance.

Type Object|Helios

Example


helios.positions({
  enabled: true,
});

snapshotDelegatePositions(options = {}) → {Promise<Float32Array|null>}

Source: src/Helios.js:13711

Snapshot all node positions from the active or supplied position delegate.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalDelegate readback options.
delegatePositionDelegateoptionalDelegate to read. Defaults to the active delegate.

Returns

Packed x,y,z positions, or null when no delegate is available.

Type Promise<Float32Array|null>

Example


helios.snapshotDelegatePositions({
  enabled: true,
});

snapshotNodePositions(nodeIds, options = {}) → {Promise<Object>}

Source: src/Helios.js:13739

Snapshot selected node positions from the active position source.

Parameters

NameTypeAttributesDefaultDescription
nodeIdsArray<number>|TypedArray|numberNode indices to read.
optionsObjectoptionalReadback options.
outFloat32ArrayoptionalOptional output buffer.
delegatePositionDelegateoptionalDelegate override.

Returns

Readback result with ids, packed positions, count, version, and source.

Type Promise<Object>

Example


helios.snapshotNodePositions([0, 1, 2]);

snapshotNodePosition(nodeId, options = {}) → {Promise<Object>}

Source: src/Helios.js:13816

Snapshot one node position from the active position source.

Parameters

NameTypeAttributesDefaultDescription
nodeIdnumberNode index to read.
optionsObjectoptionalReadback options.
outFloat32ArrayoptionalOptional output buffer with length at least three.

Returns

Readback result with id, position, version, and source.

Type Promise<Object>

snapshotNodeCentroid(nodeIds, options = {}) → {Promise<Object>}

Source: src/Helios.js:13848

Compute the centroid of selected nodes from the active position source.

Parameters

NameTypeAttributesDefaultDescription
nodeIdsArray<number>|TypedArray|numberNode indices to include.
optionsObjectoptionalReadback options.
outFloat32ArrayoptionalOptional output buffer with length at least three.

Returns

Centroid result with centroid, count, version, and source.

Type Promise<Object>

Example


helios.snapshotNodeCentroid([0, 1, 2]);

syncDelegatePositionsToNetwork(options = {}) → {Promise<boolean>}

Source: src/Helios.js:13885

Write the active delegate position snapshot back into the network position attribute.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalDelegate synchronization options.
delegatePositionDelegateoptionalDelegate to synchronize. Defaults to the active delegate.

Returns

true when network positions were updated.

Type Promise<boolean>

Example


helios.syncDelegatePositionsToNetwork({
  enabled: true,
});

interpolation(options) → {Object|Helios}

Source: src/Helios.js:13915

Read or update GPU position interpolation settings.

Parameters

NameTypeAttributesDefaultDescription
optionsObject|string|nulloptionalInterpolation options, mode string, or null to disable interpolation.
enabledbooleanoptionalEnable position interpolation.
durationMode'adaptive'|'fixed'optionalDuration strategy.
durationMsnumberoptionalFixed interpolation duration in milliseconds.

Returns

Current interpolation snapshot when omitted; otherwise this Helios instance.

Type Object|Helios

Example


helios.interpolation({
  enabled: true,
});

setLayout(layout) → {Layout|Helios}

Source: src/Helios.js:14065

Alias for layout(layout).

Parameters

NameTypeAttributesDefaultDescription
layoutLayoutReplacement layout.

Returns

Result of layout(layout).

Type Layout|Helios

setPositions(options) → {Object|Helios}

Source: src/Helios.js:14074

Alias for positions(options).

Parameters

NameTypeAttributesDefaultDescription
optionsObject|nullPosition pipeline options.

Returns

Result of positions(options).

Type Object|Helios

Example


helios.setPositions({
  enabled: true,
});

setInterpolation(options) → {Object|Helios}

Source: src/Helios.js:14083

Alias for interpolation(options).

Parameters

NameTypeAttributesDefaultDescription
optionsObject|string|nullInterpolation options.

Returns

Result of interpolation(options).

Type Object|Helios

Example


helios.setInterpolation({
  enabled: true,
});

startLayout(algo = null, params = null) → {Helios}

Source: src/Helios.js:14226

Enable layout execution and optionally request a layout algorithm or parameters.

Parameters

NameTypeAttributesDefaultDescription
algostring|Object|nulloptionalnullOptional layout type or parameter object.
paramsObject|nulloptionalnullOptional parameters when algo is a string.

Returns

This Helios instance.

Type Helios

stopLayout(reason = 'user') → {Helios}

Source: src/Helios.js:14246

Disable layout execution.

Parameters

NameTypeAttributesDefaultDescription
reasonstringoptional'user'Reason recorded for the scheduler state change.

Returns

This Helios instance.

Type Helios

Mappers

Mapper configuration for node and edge visual channels. MappersBehavior handles mapper UI state.

mappers({ nodeMapper, edgeMapper } = {}) → {Object|Helios}

Source: src/Helios.js:13386

Read, replace, or reset the default node and edge mapper collections.

Parameters

NameTypeAttributesDefaultDescription
mappersObjectoptionalMapper replacements. Omit to read active mapper collections.
nodeMapperMapperoptionalReplacement default node mapper.
edgeMapperMapperoptionalReplacement default edge mapper.
nodeMapperValue passed to mappers.
edgeMapperoptional{}Value passed to mappers.

Returns

Current mapper collections when omitted; otherwise this Helios instance.

Type Object|Helios

setMappers(mappers) → {Object|Helios}

Source: src/Helios.js:14119

Alias for mappers(mappers).

Parameters

NameTypeAttributesDefaultDescription
mappersObjectMapper replacements.

Returns

Result of mappers(mappers).

Type Object|Helios

Appearance

Visual rendering settings for nodes, edges, labels, legends, density, shading, and background. AppearanceBehavior, LabelsBehavior, and LegendsBehavior cover the built-in controls.

edgeWidthScale(value) → {number|Helios}

Source: src/Helios.js:10104

Read or set the multiplier applied to edge width attributes.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalEdge width scale multiplier.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.edgeWidthScale(1);

edgeWidthBase(value) → {number|Helios}

Source: src/Helios.js:10117

Read or set the constant edge width added before scaling.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalBase edge width in render units.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.edgeWidthBase(1);

edgeOpacityScale(value) → {number|Helios}

Source: src/Helios.js:10130

Read or set the multiplier applied to edge opacity attributes.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalEdge opacity scale multiplier.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.edgeOpacityScale(1);

edgeOpacityBase(value) → {number|Helios}

Source: src/Helios.js:10143

Read or set the constant edge opacity added before scaling.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalBase edge opacity.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.edgeOpacityBase(1);

nodeOpacityScale(value) → {number|Helios}

Source: src/Helios.js:10156

Read or set the multiplier applied to node opacity attributes.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalNode opacity scale multiplier.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.nodeOpacityScale(1);

nodeOpacityBase(value) → {number|Helios}

Source: src/Helios.js:10169

Read or set the constant node opacity added before scaling.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalBase node opacity.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.nodeOpacityBase(1);

nodeSizeScale(value) → {number|Helios}

Source: src/Helios.js:10182

Read or set the multiplier applied to node size attributes.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalNode size scale multiplier.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.nodeSizeScale(true);

nodeSizeBase(value) → {number|Helios}

Source: src/Helios.js:10195

Read or set the constant node radius added before scaling.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalBase node radius in render units.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.nodeSizeBase(true);

semanticZoomExponent(value) → {number|Helios}

Source: src/Helios.js:10208

Read or set semantic zoom compensation for node and label sizing.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalExponent controlling how strongly zoom affects apparent size.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.semanticZoomExponent(1);

nodeOutlineWidthScale(value) → {number|Helios}

Source: src/Helios.js:10223

Read or set the multiplier applied to node outline width attributes.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalNode outline width scale multiplier.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.nodeOutlineWidthScale(1);

nodeOutlineWidthBase(value) → {number|Helios}

Source: src/Helios.js:10236

Read or set the constant node outline width added before scaling.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalBase node outline width in render units.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.nodeOutlineWidthBase(1);

nodeOutlineColor(color) → {Array<number>|Helios}

Source: src/Helios.js:10249

Read or set the default node outline color.

Parameters

NameTypeAttributesDefaultDescription
colorstring|Array<number>optionalCSS hex color or normalized RGBA tuple.

Returns

Current RGBA color when omitted; otherwise this Helios instance.

Type Array<number>|Helios

Example


helios.nodeOutlineColor('#4aa3ff');

nodeOutlineUseAttributes(value) → {boolean|Helios}

Source: src/Helios.js:10266

Read or set whether outline attributes participate in node styling.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable outline attribute mapping.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.nodeOutlineUseAttributes(1);

edgeEndpointTrim(value) → {number|Helios}

Source: src/Helios.js:10279

Read or set how far edge geometry is trimmed away from node centers.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalTrim amount in node-radius units.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.edgeEndpointTrim(1);

edgeWidthClampToNodeDiameter(value) → {boolean|Helios}

Source: src/Helios.js:10292

Read or set whether rendered edge width is clamped by endpoint node diameter.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalClamp thick edges to avoid overpowering small nodes.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.edgeWidthClampToNodeDiameter(1);

nodeBlendWithEdges(value) → {boolean|Helios}

Source: src/Helios.js:10308

Read or set whether node rendering blends visually with adjacent edges.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable node/edge blending.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.nodeBlendWithEdges(true);

edgeDepthWrite(value) → {boolean|Helios}

Source: src/Helios.js:10321

Read or set whether edge fragments write to the depth buffer.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable depth writes for edges.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.edgeDepthWrite(true);

edgeFastRendering(value) → {boolean|Helios}

Source: src/Helios.js:10334

Read or set the manual fast edge-rendering override.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable the fast edge rendering path.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.edgeFastRendering(true);

shadedEnabled(value) → {boolean|Helios}

Source: src/Helios.js:10347

Read or set whether shaded rendering is enabled.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable lighting-based shading.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.shadedEnabled(true);

shadedNodes(value) → {boolean|Helios}

Source: src/Helios.js:10363

Read or set whether node geometry receives shaded lighting.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable shading for nodes.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.shadedNodes(true);

shadedEdges(value) → {boolean|Helios}

Source: src/Helios.js:10379

Read or set whether edge geometry receives shaded lighting.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable shading for edges.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.shadedEdges(true);

shadedLightDirection(value) → {Array<number>|Helios}

Source: src/Helios.js:10395

Read or set the directional light vector used by shaded rendering.

Parameters

NameTypeAttributesDefaultDescription
valueArray<number>|ObjectoptionalLight direction as [x,y,z] or direction-like object.

Returns

Current direction when omitted; otherwise this Helios instance.

Type Array<number>|Helios

Example


helios.shadedLightDirection(1);

shadedLightDirectionX(value) → {number|Helios}

Source: src/Helios.js:10410

Read or set the x component of the shaded light direction.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalX component.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.shadedLightDirectionX(1);

shadedLightDirectionY(value) → {number|Helios}

Source: src/Helios.js:10425

Read or set the y component of the shaded light direction.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalY component.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.shadedLightDirectionY(1);

shadedLightDirectionZ(value) → {number|Helios}

Source: src/Helios.js:10440

Read or set the z component of the shaded light direction.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalZ component.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.shadedLightDirectionZ(1);

shadedLightColor(color) → {Array<number>|Helios}

Source: src/Helios.js:10455

Read or set the direct light color used by shaded rendering.

Parameters

NameTypeAttributesDefaultDescription
colorstring|Array<number>optionalCSS hex color or normalized RGBA tuple.

Returns

Current RGBA color when omitted; otherwise this Helios instance.

Type Array<number>|Helios

Example


helios.shadedLightColor('#4aa3ff');

shadedAmbientTopColor(color) → {Array<number>|Helios}

Source: src/Helios.js:10474

Read or set the upper hemisphere ambient color for shaded rendering.

Parameters

NameTypeAttributesDefaultDescription
colorstring|Array<number>optionalCSS hex color or normalized RGBA tuple.

Returns

Current RGBA color when omitted; otherwise this Helios instance.

Type Array<number>|Helios

Example


helios.shadedAmbientTopColor('#4aa3ff');

shadedAmbientBottomColor(color) → {Array<number>|Helios}

Source: src/Helios.js:10493

Read or set the lower hemisphere ambient color for shaded rendering.

Parameters

NameTypeAttributesDefaultDescription
colorstring|Array<number>optionalCSS hex color or normalized RGBA tuple.

Returns

Current RGBA color when omitted; otherwise this Helios instance.

Type Array<number>|Helios

Example


helios.shadedAmbientBottomColor('#4aa3ff');

shadedDiffuseStrength(value) → {number|Helios}

Source: src/Helios.js:10512

Read or set diffuse lighting strength for shaded rendering.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalNon-negative diffuse strength.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.shadedDiffuseStrength(1);

shadedAmbientStrength(value) → {number|Helios}

Source: src/Helios.js:10530

Read or set ambient lighting strength for shaded rendering.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalNon-negative ambient strength.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.shadedAmbientStrength(1);

shadedSpecularColor(color) → {Array<number>|Helios}

Source: src/Helios.js:10548

Read or set the specular highlight color for shaded rendering.

Parameters

NameTypeAttributesDefaultDescription
colorstring|Array<number>optionalCSS hex color or normalized RGBA tuple.

Returns

Current RGBA color when omitted; otherwise this Helios instance.

Type Array<number>|Helios

Example


helios.shadedSpecularColor('#4aa3ff');

shadedSpecularStrength(value) → {number|Helios}

Source: src/Helios.js:10567

Read or set specular highlight strength for shaded rendering.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalNon-negative specular strength.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.shadedSpecularStrength(1);

shadedShininess(value) → {number|Helios}

Source: src/Helios.js:10585

Read or set specular shininess for shaded rendering.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalShininess exponent.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.shadedShininess(1);

ambientOcclusionEnabled(value) → {boolean|Helios}

Source: src/Helios.js:10603

Read or set whether screen-space ambient occlusion is enabled.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable ambient occlusion when the renderer supports it.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.ambientOcclusionEnabled(true);

ambientOcclusionNodes(value) → {boolean|Helios}

Source: src/Helios.js:10619

Read or set whether ambient occlusion is applied to nodes.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable node occlusion.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.ambientOcclusionNodes(true);

ambientOcclusionEdges(value) → {boolean|Helios}

Source: src/Helios.js:10635

Read or set whether ambient occlusion is applied to edges.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable edge occlusion.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.ambientOcclusionEdges(true);

ambientOcclusionStrength(value) → {number|Helios}

Source: src/Helios.js:10651

Read or set ambient occlusion strength.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalNon-negative occlusion strength.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.ambientOcclusionStrength(1);

ambientOcclusionRadius(value) → {number|Helios}

Source: src/Helios.js:10669

Read or set ambient occlusion sampling radius.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalRadius in screen-space sample units.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.ambientOcclusionRadius(1);

ambientOcclusionBias(value) → {number|Helios}

Source: src/Helios.js:10687

Read or set ambient occlusion depth bias.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalNon-negative depth bias.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.ambientOcclusionBias(1);

ambientOcclusionMode(value) → {string|Helios}

Source: src/Helios.js:10705

Read or set ambient occlusion compositing mode.

Parameters

NameTypeAttributesDefaultDescription
valuestringoptionalAmbient occlusion mode identifier.

Returns

Current mode when omitted; otherwise this Helios instance.

Type string|Helios

Example


helios.ambientOcclusionMode('auto');

ambientOcclusionIntensityScale(value) → {number|Helios}

Source: src/Helios.js:10725

Read or set ambient occlusion intensity scaling.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalNon-negative intensity multiplier.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.ambientOcclusionIntensityScale(1);

ambientOcclusionIntensityShift(value) → {number|Helios}

Source: src/Helios.js:10743

Read or set ambient occlusion intensity offset.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalNon-negative intensity offset.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.ambientOcclusionIntensityShift(1);

ambientOcclusionQuality(value) → {string|Helios}

Source: src/Helios.js:10761

Read or set ambient occlusion quality preset.

Parameters

NameTypeAttributesDefaultDescription
valuestringoptionalAmbient occlusion quality preset.

Returns

Current quality when omitted; otherwise this Helios instance.

Type string|Helios

Example


helios.ambientOcclusionQuality('auto');

edgeAdaptiveQuality(options) → {Object|Helios}

Source: src/Helios.js:10781

Read or update the adaptive edge-quality policy used to switch fast edge rendering on slow frames.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalAdaptive quality configuration. Omit to read the current configuration and runtime status.

Returns

Current policy snapshot when omitted; otherwise this Helios instance.

Type Object|Helios

Example


helios.edgeAdaptiveQuality({
  enabled: true,
});

edgeAdaptiveQualityEnabled(value) → {boolean|Helios}

Source: src/Helios.js:10824

Read or set whether adaptive edge quality is enabled.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable adaptive edge quality.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.edgeAdaptiveQualityEnabled(true);

edgeAdaptiveQualitySlowFrameThresholdMs(value) → {number|Helios}

Source: src/Helios.js:10838

Read or set the frame-time threshold that counts as slow for adaptive edge quality.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalSlow-frame threshold in milliseconds.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.edgeAdaptiveQualitySlowFrameThresholdMs(1);

edgeAdaptiveQualitySlowFrameConsecutiveFrames(value) → {number|Helios}

Source: src/Helios.js:10852

Read or set how many recent frames are averaged before adaptive quality changes.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalFrame sample window size.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.edgeAdaptiveQualitySlowFrameConsecutiveFrames('auto');

edgeAdaptiveQualityProbeIntervalMs(value) → {number|Helios}

Source: src/Helios.js:10866

Read or set how often adaptive quality probes full-quality edge rendering.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalProbe interval in milliseconds.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.edgeAdaptiveQualityProbeIntervalMs(1);

edgeAdaptiveQualityInteractionHoldMs(value) → {number|Helios}

Source: src/Helios.js:10880

Read or set how long adaptive quality stays fast after interaction.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalHold duration in milliseconds.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.edgeAdaptiveQualityInteractionHoldMs('auto');

edgeAdaptiveQualityFastDuringCamera(value) → {boolean|Helios}

Source: src/Helios.js:10894

Read or set whether camera interaction forces fast edge rendering.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalUse fast edges while the camera is moving.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.edgeAdaptiveQualityFastDuringCamera(true);

edgeAdaptiveQualityFastDuringLayout(value) → {boolean|Helios}

Source: src/Helios.js:10908

Read or set whether active layout ticks force fast edge rendering.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalUse fast edges while layout is running.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.edgeAdaptiveQualityFastDuringLayout(true);

background(color) → {Array<number>|Helios}

Source: src/Helios.js:10922

Read or set the renderer background color.

Parameters

NameTypeAttributesDefaultDescription
colorstring|Array<number>optionalCSS hex color or normalized RGBA tuple.

Returns

Current RGBA color when omitted; otherwise this Helios instance.

Type Array<number>|Helios

Example


helios.background('#4aa3ff');

clearColor(color) → {Array<number>|Helios}

Source: src/Helios.js:10939

Alias for background(color).

Parameters

NameTypeAttributesDefaultDescription
colorstring|Array<number>optionalCSS hex color or normalized RGBA tuple.

Returns

Current RGBA color when omitted; otherwise this Helios instance.

Type Array<number>|Helios

Example


helios.clearColor('#4aa3ff');

supersampling(value) → {string|Helios}

Source: src/Helios.js:10952

Read or set the renderer supersampling preset.

Parameters

NameTypeAttributesDefaultDescription
value'auto'|'on'|'off'|booleanoptionalSupersampling preset or legacy boolean.

Returns

Current preset when omitted; otherwise this Helios instance.

Type string|Helios

Example


helios.supersampling(1);

edgeTransparencyMode(mode) → {string|Helios}

Source: src/Helios.js:11757

Read or set the edge transparency compositing mode.

Parameters

NameTypeAttributesDefaultDescription
modestringoptionalTransparency mode supported by the active renderer.

Returns

Current mode when omitted; otherwise this Helios instance.

Type string|Helios

Example


helios.edgeTransparencyMode('2d');

Rendering And Picking

Render requests, picking, framebuffer inspection, and attribute tracking. HoverBehavior and SelectionBehavior use these lower-level hooks.

requestRender() → {Helios}

Source: src/Helios.js:14258

Schedule a render frame.

Returns

This Helios instance.

Type Helios

performRendering() → {void}

Source: src/Helios.js:14270

Render one frame immediately when manual rendering is enabled.

Returns

Type void

enableAttributeTracking(nodeAttribute = '$index', edgeAttribute = null, options = {}) → {AttributeTracker|null}

Source: src/Helios.js:14319

Enable offscreen attribute tracking for picking.

Parameters

NameTypeAttributesDefaultDescription
nodeAttributestringoptional'$index'Node attribute to encode into the tracking target.
edgeAttributestring|nulloptionalnullEdge attribute to encode into the tracking target.
optionsObjectoptionalTracking resolution and auto-update options.

Returns

Attribute tracker instance, or null before renderer initialization.

Type AttributeTracker|null

disableAttributeTracking(scope) → {void}

Source: src/Helios.js:14342

Disable attribute tracking for a scope or for all scopes.

Parameters

NameTypeAttributesDefaultDescription
scope'node'|'edge'|stringoptionalScope to disable. Omit to disable all configured tracking.

Returns

Type void

renderAttributeTracking() → {Promise<Object|null>}

Source: src/Helios.js:14353

Render the attribute-tracking target for the current frame.

Returns

Tracking render result, or null when tracking is disabled.

Type Promise<Object|null>

pickAttributesAt(clientX, clientY) → {Promise<{node:number, edge:number}>}

Source: src/Helios.js:14373

Pick encoded node and edge attributes at viewport coordinates.

Parameters

NameTypeAttributesDefaultDescription
clientXnumberViewport x coordinate.
clientYnumberViewport y coordinate.

Returns

Picked node and edge ids, or -1 for misses.

Type Promise<{node:number, edge:number}>

getFramebufferVersionsByRefMap()

Source: src/Helios.js:14386

Returns a Map of framebuffer/attachment references to monotonically increasing "version" counters (wrapping at Number.MAX_SAFE_INTEGER). Keys are live object references (e.g. RenderTarget instances, WebGLFramebuffer, GPUTexture) so they can be used for identity comparisons.

Example


const value = helios.getFramebufferVersionsByRefMap();

getFramebufferInformation()

Source: src/Helios.js:14428

Returns framebuffer/attachment information keyed by a meaningful name. Values include the version counter and a minimal shape description. Key format conventions: - attributes.<attributeName>.<scope>.<tracking|picking>[.<depth>] - render.<variation>

Example


const value = helios.getFramebufferInformation();

getFramebufferVersions()

Source: src/Helios.js:14558

Returns an object keyed by a meaningful framebuffer name, where each value is the version counter. Key format conventions: - attributes.<attributeName>.<scope>.<tracking|picking>[.<depth>] - render.<variation>

Example


const value = helios.getFramebufferVersions();

getFramebufferVersionsByRef() → {Object}

Source: src/Helios.js:14626

Return framebuffer resource versions keyed by reference for renderer diagnostics.

Returns

Plain object mapping framebuffer references to version numbers.

Type Object

Example


const value = helios.getFramebufferVersionsByRef();

enableNodePicking(options = {}) → {Helios}

Source: src/Helios.js:14638

Enable pointer picking for nodes.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalPicking behavior options.

Returns

This Helios instance.

Type Helios

Example


helios.enableNodePicking({
  enabled: true,
});

enableEdgePicking(options = {}) → {Helios}

Source: src/Helios.js:14654

Enable pointer picking for edges.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalPicking behavior options.

Returns

This Helios instance.

Type Helios

Example


helios.enableEdgePicking({
  enabled: true,
});

disableNodePicking() → {Helios}

Source: src/Helios.js:14669

Disable node pointer picking.

Returns

This Helios instance.

Type Helios

disableEdgePicking() → {Helios}

Source: src/Helios.js:14682

Disable edge pointer picking.

Returns

This Helios instance.

Type Helios

Configuration

General configuration setters and compatibility helpers.

uiBindingInfo(name) → {Object|null}

Source: src/Helios.js:2733

Return the UI control metadata registered for one Helios setting.

Parameters

NameTypeAttributesDefaultDescription
namestringUI binding name such as nodeSizeScale or labelsEnabled.

Returns

Binding descriptor, or null when the name is unknown.

Type Object|null

Density And Labels

density(options) → {Object|Helios}

Source: src/Helios.js:11429

Read or update the screen-space density overlay configuration.

Parameters

NameTypeAttributesDefaultDescription
optionsObject|false|nulloptionalDensity configuration, or false/null to disable the overlay.
enabledbooleanoptionalEnable density rendering.
qualityScalenumberoptionalDensity texture scale relative to the viewport.
propertystringoptionalNode attribute used as the primary density weight.
comparePropertystringoptionalOptional comparison attribute for diverging/log-ratio density.
colormapstringoptionalSequential colormap name.
divergingColormapstringoptionalDiverging colormap name.

Returns

Current density snapshot when omitted; otherwise this Helios instance.

Type Object|Helios

Example


helios.density({
  enabled: true,
});

densityEnabled(value) → {boolean|Helios}

Source: src/Helios.js:11590

Read or set whether the density overlay is enabled.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable density rendering.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.densityEnabled(true);

densityScale(value) → {number|Helios}

Source: src/Helios.js:11603

Read or set the density overlay quality scale.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalTexture scale relative to the viewport.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.densityScale(1);

densityTopographic(value) → {boolean|Helios}

Source: src/Helios.js:11616

Read or set whether density is rendered with topographic contours.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable contour-style rendering.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.densityTopographic(true);

densityScaleWithZoom(value) → {boolean|Helios}

Source: src/Helios.js:11629

Read or set whether density bandwidth scales with camera zoom.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalScale density evaluation with zoom.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.densityScaleWithZoom(1);

densityBandwidth(value) → {number|Helios}

Source: src/Helios.js:11642

Read or set the density kernel bandwidth.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalPositive kernel bandwidth.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.densityBandwidth(1);

densityWeight(value) → {number|Helios}

Source: src/Helios.js:11655

Read or set the scalar multiplier applied to density weights.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalDensity weight multiplier.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.densityWeight(1);

densityProperty(value) → {string|Helios}

Source: src/Helios.js:11668

Read or set the node attribute used as the primary density property.

Parameters

NameTypeAttributesDefaultDescription
valuestringoptionalNode attribute name.

Returns

Current attribute name when omitted; otherwise this Helios instance.

Type string|Helios

Example


helios.densityProperty('auto');

densityVsProperty(value) → {string|Helios}

Source: src/Helios.js:11681

Read or set the comparison property used for diverging density views.

Parameters

NameTypeAttributesDefaultDescription
valuestringoptionalNode attribute name to compare against the primary property.

Returns

Current comparison attribute when omitted; otherwise this Helios instance.

Type string|Helios

Example


helios.densityVsProperty('auto');

densityNormalizeVs(value) → {boolean|Helios}

Source: src/Helios.js:11694

Read or set whether comparison density values are normalized before differencing.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalNormalize comparison density.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.densityNormalizeVs(true);

densityColormap(value) → {string|Helios}

Source: src/Helios.js:11707

Read or set the sequential colormap used by the density overlay.

Parameters

NameTypeAttributesDefaultDescription
valuestringoptionalColormap name.

Returns

Current colormap when omitted; otherwise this Helios instance.

Type string|Helios

Example


helios.densityColormap('auto');

densityDivergingColormap(value) → {string|Helios}

Source: src/Helios.js:11720

Read or set the diverging colormap used by comparison density overlays.

Parameters

NameTypeAttributesDefaultDescription
valuestringoptionalDiverging colormap name.

Returns

Current colormap when omitted; otherwise this Helios instance.

Type string|Helios

Example


helios.densityDivergingColormap('auto');

updateDensityMap() → {Helios}

Source: src/Helios.js:11732

Request a density overlay update on the next render frame.

Returns

This Helios instance.

Type Helios

redrawDensityMap() → {Helios}

Source: src/Helios.js:11744

Alias for updateDensityMap().

Returns

This Helios instance.

Type Helios

labels(options) → {Object|Helios}

Source: src/Helios.js:11779

Read or update label rendering options.

Parameters

NameTypeAttributesDefaultDescription
optionsObject|nulloptionalLabel options, or null to disable labels.
enabledbooleanoptionalEnable ranked or selected labels.
selectionMode'ranked'|'selected-only'optionalLabel selection policy.
maxVisiblenumberoptionalMaximum number of labels to render.
sourcestring|FunctionoptionalAttribute name or callback used for label text.

Returns

Current label configuration when omitted; otherwise this Helios instance.

Type Object|Helios

Example


helios.labels({
  enabled: true,
});

legends(options) → {Object|Helios}

Source: src/Helios.js:11839

Read or update legend rendering options.

Parameters

NameTypeAttributesDefaultDescription
optionsObject|false|nulloptionalLegend configuration, or false/null to disable legends.
enabledbooleanoptionalEnable legend rendering.

Returns

Current legend configuration when omitted; otherwise this Helios instance.

Type Object|Helios

Example


helios.legends({
  enabled: true,
});

legendsEnabled(value) → {boolean|Helios}

Source: src/Helios.js:11859

Read or set whether legends are enabled.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable legends.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.legendsEnabled(true);

overlayInsets(insets) → {Object|Helios}

Source: src/Helios.js:12344

Read or set reserved viewport insets for overlays such as labels and legends.

Parameters

NameTypeAttributesDefaultDescription
insetsObjectoptionalInsets in CSS pixels.
topnumberoptionalTop inset.
rightnumberoptionalRight inset.
bottomnumberoptionalBottom inset.
leftnumberoptionalLeft inset.

Returns

Current inset object when omitted; otherwise this Helios instance.

Type Object|Helios

labelsEnabled(value) → {boolean|Helios}

Source: src/Helios.js:12368

Read or set whether labels are enabled.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable labels.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.labelsEnabled(true);

labelsMode(value) → {string|Helios}

Source: src/Helios.js:12384

Read or set the label selection mode.

Parameters

NameTypeAttributesDefaultDescription
value'auto'|'selected-only'|'off'optionalLabel mode.

Returns

Current mode when omitted; otherwise this Helios instance.

Type string|Helios

Example


helios.labelsMode('auto');

labelsMaxVisible(value) → {number|Helios}

Source: src/Helios.js:12414

Read or set the maximum number of visible labels.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalMaximum label count.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.labelsMaxVisible(1);

labelsSelectedOnlySpaceAware(value) → {boolean|Helios}

Source: src/Helios.js:12429

Read or set whether selected-only labels still avoid spatial collisions.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable collision-aware selected labels.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.labelsSelectedOnlySpaceAware(1);

labelsFontSizeScale(value) → {number|Helios}

Source: src/Helios.js:12442

Read or set the label font-size multiplier.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalFont-size scale.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.labelsFontSizeScale(1);

labelsMinScreenRadius(value) → {number|Helios}

Source: src/Helios.js:12457

Read or set the minimum on-screen node radius required for label candidates.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalMinimum radius in CSS pixels.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.labelsMinScreenRadius(1);

labelsOutlineWidth(value) → {number|Helios}

Source: src/Helios.js:12472

Read or set label outline width.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalOutline width in CSS pixels.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.labelsOutlineWidth(1);

labelsOffsetRadiusFactor(value) → {number|Helios}

Source: src/Helios.js:12487

Read or set the radial node-size multiplier used to offset labels.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalOffset radius multiplier.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.labelsOffsetRadiusFactor(1);

labelsOffsetPx(value) → {number|Helios}

Source: src/Helios.js:12502

Read or set the fixed pixel offset added to label placement.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalOffset in CSS pixels.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.labelsOffsetPx(1);

labelsMaxChars(value) → {number|Helios}

Source: src/Helios.js:12517

Read or set the maximum number of characters per label row.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalMaximum characters, or zero for no truncation.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.labelsMaxChars(1);

labelsMaxRows(value) → {number|Helios}

Source: src/Helios.js:12532

Read or set the maximum number of rows per wrapped label.

Parameters

NameTypeAttributesDefaultDescription
valuenumberoptionalMaximum rows.

Returns

Current value when omitted; otherwise this Helios instance.

Type number|Helios

Example


helios.labelsMaxRows(1);

labelFill(color) → {string|Array<number>|Helios|null}

Source: src/Helios.js:12547

Read or set label fill color.

Parameters

NameTypeAttributesDefaultDescription
colorstring|Array<number>optionalCSS color string or normalized RGBA tuple.

Returns

Current color when omitted; otherwise this Helios instance.

Type string|Array<number>|Helios|null

Example


helios.labelFill('#4aa3ff');

labelOutlineColor(color) → {string|Array<number>|Helios|null}

Source: src/Helios.js:12563

Read or set label outline color.

Parameters

NameTypeAttributesDefaultDescription
colorstring|Array<number>optionalCSS color string or normalized RGBA tuple.

Returns

Current color when omitted; otherwise this Helios instance.

Type string|Array<number>|Helios|null

Example


helios.labelOutlineColor('#4aa3ff');

labelFontFamily(value) → {string|Helios}

Source: src/Helios.js:12579

Read or set the CSS font-family used by labels.

Parameters

NameTypeAttributesDefaultDescription
valuestringoptionalFont family string.

Returns

Current font family when omitted; otherwise this Helios instance.

Type string|Helios

Example


helios.labelFontFamily('auto');

labelSource(value) → {string|Function|null|Helios}

Source: src/Helios.js:12593

Read or set the label text source.

Parameters

NameTypeAttributesDefaultDescription
valuestring|Function|nulloptionalAttribute name, callback, or null for default labels.

Returns

Current source when omitted; otherwise this Helios instance.

Type string|Function|null|Helios

Example


helios.labelSource('auto');

setDensity(options) → {Object|Helios}

Source: src/Helios.js:14092

Alias for density(options).

Parameters

NameTypeAttributesDefaultDescription
optionsObject|false|nullDensity options.

Returns

Result of density(options).

Type Object|Helios

Example


helios.setDensity({
  enabled: true,
});

setLabels(options) → {Object|Helios}

Source: src/Helios.js:14101

Alias for labels(options).

Parameters

NameTypeAttributesDefaultDescription
optionsObject|nullLabel options.

Returns

Result of labels(options).

Type Object|Helios

Example


helios.setLabels({
  enabled: true,
});

setLegends(options) → {Object|Helios}

Source: src/Helios.js:14110

Alias for legends(options).

Parameters

NameTypeAttributesDefaultDescription
optionsObject|false|nullLegend options.

Returns

Result of legends(options).

Type Object|Helios

Example


helios.setLegends({
  enabled: true,
});

Interaction

interactionRenderOrder(value) → {boolean|Helios}

Source: src/Helios.js:12796

Read or set whether selected and highlighted items are promoted later in render order.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable interaction-aware render-order promotion.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.interactionRenderOrder(1);

nodeState(indices, mask, options = {}) → {Helios}

Source: src/Helios.js:12867

Apply a state bitmask to node indices.

Parameters

NameTypeAttributesDefaultDescription
indicesArray<number>|TypedArray|numberNode indices to update.
masknumber|string|Array<string>State bitmask or named state such as SELECTED or HIGHLIGHTED.
optionsObjectoptionalState update options.
mode'replace'|'add'|'remove'|'toggle'optional'replace'How to combine the mask with the existing state.

Returns

This Helios instance.

Type Helios

Example


helios.nodeState([0, 1, 2]);

edgeState(indices, mask, options = {}) → {Helios}

Source: src/Helios.js:12924

Apply a state bitmask to edge indices.

Parameters

NameTypeAttributesDefaultDescription
indicesArray<number>|TypedArray|numberEdge indices to update.
masknumber|string|Array<string>State bitmask or named state such as SELECTED or HIGHLIGHTED.
optionsObjectoptionalState update options.
mode'replace'|'add'|'remove'|'toggle'optional'replace'How to combine the mask with the existing state.

Returns

This Helios instance.

Type Helios

Example


helios.edgeState([0, 1, 2]);

hoverNodeState(index, mask) → {Helios}

Source: src/Helios.js:12970

Set transient hover state for a node.

Parameters

NameTypeAttributesDefaultDescription
indexnumber|nullHovered node index, or null to clear.
masknumber|string|Array<string>optional'HOVERED'State mask applied while hovered.

Returns

This Helios instance.

Type Helios

hoverEdgeState(index, mask) → {Helios}

Source: src/Helios.js:13008

Set transient hover state for an edge.

Parameters

NameTypeAttributesDefaultDescription
indexnumber|nullHovered edge index, or null to clear.
masknumber|string|Array<string>optional'HOVERED'State mask applied while hovered.

Returns

This Helios instance.

Type Helios

highlightConnectedEdges(value) → {boolean|Helios}

Source: src/Helios.js:13110

Read or set whether highlighted nodes also highlight their connected edges.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalEnable connected-edge highlighting.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.highlightConnectedEdges(true);

nodeStateStyle(slot, style) → {Object|null|Helios}

Source: src/Helios.js:13130

Read or set styling for nodes carrying a state bit.

Parameters

NameTypeAttributesDefaultDescription
slotnumber|stringState slot index or name.
styleObjectoptionalNode state style with scale, opacity, outline, discard, and color fields.

Returns

Current style when style is omitted; otherwise this Helios instance.

Type Object|null|Helios

nodeNoStateStyle(style) → {Object|null|Helios}

Source: src/Helios.js:13174

Read or set styling for nodes with no active state bits.

Parameters

NameTypeAttributesDefaultDescription
styleObjectoptionalNode style applied to unselected/unhighlighted nodes.

Returns

Current style when omitted; otherwise this Helios instance.

Type Object|null|Helios

edgeStateStyle(slot, style) → {Object|null|Helios}

Source: src/Helios.js:13206

Read or set styling for edges carrying a state bit.

Parameters

NameTypeAttributesDefaultDescription
slotnumber|stringState slot index or name.
styleObjectoptionalEdge state style with width, opacity, discard, and color fields.

Returns

Current style when style is omitted; otherwise this Helios instance.

Type Object|null|Helios

edgeNoStateStyle(style) → {Object|null|Helios}

Source: src/Helios.js:13249

Read or set styling for edges with no active state bits.

Parameters

NameTypeAttributesDefaultDescription
styleObjectoptionalEdge style applied to unselected/unhighlighted edges.

Returns

Current style when omitted; otherwise this Helios instance.

Type Object|null|Helios

nodeHoverStyle(style) → {Object|null|Helios}

Source: src/Helios.js:13279

Read or set the transient hover style for nodes.

Parameters

NameTypeAttributesDefaultDescription
styleObjectoptionalNode hover style.

Returns

Current style when omitted; otherwise this Helios instance.

Type Object|null|Helios

edgeHoverStyle(style) → {Object|null|Helios}

Source: src/Helios.js:13308

Read or set the transient hover style for edges.

Parameters

NameTypeAttributesDefaultDescription
styleObjectoptionalEdge hover style.

Returns

Current style when omitted; otherwise this Helios instance.

Type Object|null|Helios

hoverStyleFromHighlight(value) → {boolean|Helios}

Source: src/Helios.js:13344

Read or set whether hover style follows the highlighted-state style.

Parameters

NameTypeAttributesDefaultDescription
valuebooleanoptionalCopy highlighted styles into hover styles.

Returns

Current value when omitted; otherwise this Helios instance.

Type boolean|Helios

Example


helios.hoverStyleFromHighlight(1);

resetStateStyles() → {Helios}

Source: src/Helios.js:13362

Reset all node and edge state styles to renderer defaults.

Returns

This Helios instance.

Type Helios

setNodeState(indices, mask, options) → {Helios}

Source: src/Helios.js:14130

Alias for nodeState(indices, mask, options).

Parameters

NameTypeAttributesDefaultDescription
indicesArray<number>|TypedArray|numberNode indices.
masknumber|string|Array<string>State mask.
optionsObjectoptionalState options.

Returns

This Helios instance.

Type Helios

Example


helios.setNodeState([0, 1, 2]);

setEdgeState(indices, mask, options) → {Helios}

Source: src/Helios.js:14141

Alias for edgeState(indices, mask, options).

Parameters

NameTypeAttributesDefaultDescription
indicesArray<number>|TypedArray|numberEdge indices.
masknumber|string|Array<string>State mask.
optionsObjectoptionalState options.

Returns

This Helios instance.

Type Helios

Example


helios.setEdgeState([0, 1, 2]);

setNodeStateStyle(slot, style) → {Object|null|Helios}

Source: src/Helios.js:14151

Alias for nodeStateStyle(slot, style).

Parameters

NameTypeAttributesDefaultDescription
slotnumber|stringState slot.
styleObjectNode style.

Returns

Result of nodeStateStyle(slot, style).

Type Object|null|Helios

setEdgeStateStyle(slot, style) → {Object|null|Helios}

Source: src/Helios.js:14161

Alias for edgeStateStyle(slot, style).

Parameters

NameTypeAttributesDefaultDescription
slotnumber|stringState slot.
styleObjectEdge style.

Returns

Result of edgeStateStyle(slot, style).

Type Object|null|Helios

setNodeNoStateStyle(style) → {Object|null|Helios}

Source: src/Helios.js:14170

Alias for nodeNoStateStyle(style).

Parameters

NameTypeAttributesDefaultDescription
styleObjectNode style.

Returns

Result of nodeNoStateStyle(style).

Type Object|null|Helios

setEdgeNoStateStyle(style) → {Object|null|Helios}

Source: src/Helios.js:14179

Alias for edgeNoStateStyle(style).

Parameters

NameTypeAttributesDefaultDescription
styleObjectEdge style.

Returns

Result of edgeNoStateStyle(style).

Type Object|null|Helios

setNodeHoverStyle(style) → {Object|null|Helios}

Source: src/Helios.js:14188

Alias for nodeHoverStyle(style).

Parameters

NameTypeAttributesDefaultDescription
styleObjectNode hover style.

Returns

Result of nodeHoverStyle(style).

Type Object|null|Helios

setEdgeHoverStyle(style) → {Object|null|Helios}

Source: src/Helios.js:14197

Alias for edgeHoverStyle(style).

Parameters

NameTypeAttributesDefaultDescription
styleObjectEdge hover style.

Returns

Result of edgeHoverStyle(style).

Type Object|null|Helios

setHoverStyleFromHighlight(value) → {boolean|Helios}

Source: src/Helios.js:14206

Alias for hoverStyleFromHighlight(value).

Parameters

NameTypeAttributesDefaultDescription
valuebooleanEnable hover style from highlight.

Returns

Result of hoverStyleFromHighlight(value).

Type boolean|Helios

Example


helios.setHoverStyleFromHighlight(1);

setHighlightConnectedEdges(value) → {boolean|Helios}

Source: src/Helios.js:14215

Alias for highlightConnectedEdges(value).

Parameters

NameTypeAttributesDefaultDescription
valuebooleanEnable connected-edge highlighting.

Returns

Result of highlightConnectedEdges(value).

Type boolean|Helios

Example


helios.setHighlightConnectedEdges(true);

State And Persistence

snapshotLayoutRuntimeState(options = {}) → {Object}

Source: src/Helios.js:8635

Capture scheduler, layout, and optional node-position runtime state for persistence.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalSnapshot controls.
includePositionsbooleanoptionaltrueInclude packed node positions when they fit within maxPositionBytes.
maxPositionBytesnumberoptionalMaximum encoded position payload size.

Returns

Serializable layout runtime snapshot.

Type Object

Example


helios.snapshotLayoutRuntimeState({
  enabled: true,
});

snapshotLayoutRuntimeStateAsync(options = {}) → {Promise<Object>}

Source: src/Helios.js:8650

Capture layout runtime state, preferring async delegate readback when active.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalSnapshot controls and optional delegate override.
preferDelegatebooleanoptionalRead positions from the active delegate even when network positions are available.
positionsFloat32ArrayoptionalPre-captured packed x,y,z positions to encode.

Returns

Serializable layout runtime snapshot.

Type Promise<Object>

Example


helios.snapshotLayoutRuntimeStateAsync({
  enabled: true,
});

restoreLayoutRuntimeState(state = {}, options = {}) → {boolean}

Source: src/Helios.js:8712

Restore scheduler, layout, and encoded position state from a previous snapshot.

Parameters

NameTypeAttributesDefaultDescription
stateObjectoptional{}Snapshot returned by snapshotLayoutRuntimeState*.
optionsObjectoptionalRestore controls.
reasonstringoptionalDiagnostic reason passed to position delegates.

Returns

true when any runtime state or positions were restored.

Type boolean

Example

const helios = new Helios(network, {
  container: document.querySelector('#app'),
  layout: { type: 'gpu-force', options: { mode: '2d' } },
  behaviors: { labels: { enabled: true, source: 'label' } },
});
await helios.ready;