Members
Methods
# generateBuffers(device, stipples) → {Object}
Generates vertex and index buffers for rendering stipples
Parameters:
Name | Type | Description |
---|---|---|
device |
GPUDevice
|
The WebGPU device |
stipples |
Array.<Stipple>
|
Array of stipple points to render |
Object containing the vertex buffer, index buffer, and vertex count
Object
# module:frontend/components/drawer()
Initializes the drawer component with toggle functionality Sets up event listeners and initial state for the settings panel
If required DOM elements are not found
console.error
Type Definitions
object
# Circle
Circle type definitions and helper functions for stipple visualization
Properties:
Name | Type | Description |
---|---|---|
density |
number
|
Density value (1 32-bit float) |
offset |
Array
|
Position offset [x, y] (2 32-bit floats) |
radius |
number
|
Circle radius (1 32-bit float) |
object
# FromWorkerMessage
Message type received from the Web Worker during/after stippling
Properties:
Name | Type | Description |
---|---|---|
progress |
number
|
Progress percentage (0-100) |
done |
boolean
|
Whether processing is complete |
iteration |
number
|
Current iteration number |
stipples |
Array
|
Current array of stipple points |
voronoi |
d3.Voronoi.<number>
|
Current Voronoi diagram |
object
# ToWorkerMessage
Message type sent to the Web Worker to initiate stippling
Properties:
Name | Type | Description |
---|---|---|
densityFunction |
DensityFunction2D
|
Density function to process |
initialStippleRadius |
number
|
Initial radius for stipple points |
initialErrorThreshold |
number
|
Initial error threshold for convergence |
thresholdConvergenceRate |
number
|
Rate at which threshold converges |
maxIterations |
number
|
Maximum number of iterations |