GpuForceLayout
- Kind
- class
- Source
- src/layouts/GpuForceLayout.js:263
Description
GPU-backed force layout that can run through WebGPU or WebGL2 delegates.
Signature
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
network | HeliosNetwork | Source graph. | ||
visuals | import('../pipeline/VisualAttributes.js').VisualAttributes | Visual attribute owner. | ||
options | Object | optional | Force, UMAP-like force, sampling, damping, recentering, and renderer delegate options. |
Notes
Renderer support and graph size determine whether WebGPU or WebGL2 backing is selected. Position output is written into Helios visual position buffers for rendering.
Lifecycle
Creation, initialization, prewarming, cleanup, and renderer lifetime.
initialize()
Source: src/layouts/GpuForceLayout.js:301
Configures or reads initialize.
Network And Persistence
Network replacement, serialization, and visualization state persistence. ExporterBehavior and InterfaceBehavior can surface parts of this flow in the UI.
syncAutoSettingsForNetwork(network = this.network, { reheat = false, reason = 'layout-auto-tune' } = {})
Source: src/layouts/GpuForceLayout.js:349
Configures or reads sync auto settings for network.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
network | HeliosNetwork | optional | this.network | Network instance to read from or mutate. |
reheat | optional | false | Value passed to syncAutoSettingsForNetwork. | |
reason | string | optional | 'layout-auto-tune' } = {} | Reason for this operation. |
seedFromNetworkPositions(options = {}) → {Object|this}
Source: src/layouts/GpuForceLayout.js:443
Read or set the seed from network positions setting.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | {} | Options object for this operation. |
Returns
Current seed from network positions value when called without arguments; otherwise this instance for chaining.
TypeObject|thisExample
helios.seedFromNetworkPositions({
enabled: true,
});
Layout And Positions
Layout selection, position sources, interpolation, and position snapshots. LayoutBehavior handles the built-in layout UI.
getPositionDelegate()
Source: src/layouts/GpuForceLayout.js:297
Returns the current position delegate value or state.
Example
const value = helios.getPositionDelegate();
Configuration
General configuration setters and compatibility helpers.
setSettings(next = {}, { reheat = false, reason = 'layout-settings' } = {}) → {this}
Source: src/layouts/GpuForceLayout.js:388
Set the settings setting.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
next | optional | {} | Value passed to setSettings. | |
reheat | optional | false | Value passed to setSettings. | |
reason | string | optional | 'layout-settings' } = {} | Reason for this operation. |
Returns
This instance.
TypethisgetParameterBindings()
Source: src/layouts/GpuForceLayout.js:454
Returns the current parameter bindings value or state.
Example
const value = helios.getParameterBindings();
Utilities
Additional public helpers that do not belong to a narrower API area.
shouldRun()
Source: src/layouts/GpuForceLayout.js:305
Configures or reads should run.
step(deltaMs = 16)
Source: src/layouts/GpuForceLayout.js:309
Configures or reads step.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
deltaMs | optional | 16 | Value passed to step. |
resize(size)
Source: src/layouts/GpuForceLayout.js:330
Configures or reads resize.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
size | Value passed to resize. |
reheat(reason = 'layout')
Source: src/layouts/GpuForceLayout.js:437
Configures or reads reheat.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
reason | string | optional | 'layout' | Reason for this operation. |
dispose()
Source: src/layouts/GpuForceLayout.js:807
Configures or reads dispose.