Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function generateSyntheticLines

    • Generate a line-segments scene of the requested size. Segments form a random walk through a cube of side 2 * bounds, with per-segment widths and sharpness at the dataset defaults (1.0 and 0.5; the normalized sharpness knob's Gaussian midpoint, beta = 2).

      Memory cost — these are source arrays only; the actual peak during a ?renderer=… bench run is higher because the line texture (writeLineTexels) allocates another count × 24 Float32Array backing store and Three's GPU upload double-buffers in driver memory until the first frame submits.

      source arrays: count × 17 Float32 (positions×2=6, colors×2=6, widths×2=2, sharpness×2=2, length×1=1) × 4 B + count × 2 Float32 (joint codes) × 4 B = count × 76 B line texture: count × 24 floats × 4 B = count × 96 B (6 texels/segment RGBA32F — see line-geometry.ts) ≈ 2.3× the source-array figure as a working JS heap estimate.

      For 10 M segments: ~760 MB of source arrays → ~1.75 GB peak JS heap during construction + packing. The bench machine needs the RAM headroom; on developer laptops, prefer smaller counts (the synthetic scenarios list in line-perf-bench.spec.ts is a good starting point to scale down).

      Parameters

      Returns InstancedLinesMeshConfig