Skip to content

GPU limits and errors ​

Scene source and SDF budget ​

ResourceBound
Source64 KiB UTF-8
Objects32
Style rules / declarations128 / 512
CoordinatesAbsolute value at most 1000 scene units
DimensionsPositive and at most 1000; relevant Float32 dimensions remain positive
RotationSource1 only, finite explicit degrees in −360..360
SDF steps / distance / epsilon128 / 100 / 0.001
Shader source65536 bytes
Drawing bufferInteger sides 1..4096 and at most 4194304 pixels

Small accepted geometry may fall below the ray epsilon and produce no visible pixels. These are algorithm/admission limits, not hardware throughput guarantees.

Mesh packet and conversion ​

PreviewPacket v0 accepts 4..4096 vertices and 2..7938 triangles. Arrays are dense plain numeric arrays; positions/normals use XYZ triples and parameters use native U/V pairs. Indices address existing vertices. Normals have unit length within 1e-5, and triangle winding agrees with every incident normal. XYZ values remain within ±1e6 mm; packet bounds equal actual position minima/maxima.

mmToSceneUnit must be finite and positive. Translation components remain within ±1000 scene units; color/background components use 0..1. Conversion refuses nonfinite coordinates, nonzero values lost to zero during scaling or Float32 conversion, unsafe scene coordinates, and collapsed display triangles. Legitimate zero or cancellation is distinct from conversion loss. Admission does not guarantee lossless pose/translation arithmetic.

Optional camera and lighting use their own public contracts. A camera must keep eye/target distinct, up nonsingular, near/far separable in Float32 and its matrices finite. Do not bypass a camera refusal by retagging units.

Error handling ​

OperationFailure contractHost action
compileGpu{ok:false,diagnostics}Display code/message/range; keep accepted source
parseSceneSceneError with source diagnosticsMark the actual source range
Packet/options/camera preparationRangeErrorKeep native input; revise explicit options
Mount, allocation or context lossGPUErrorReport the actual backend failure; recover with a new lifecycle
Live scene update / setCamera{ok:false,error}Retain accepted state; inspect context health
Calls after renderer disposalFailureStop calls; create a new renderer if needed

The compiler's diagnostic ranges use UTF-16 offsets and one-based line/column. Mesh diagnostics can provide dataPath instead of a source range. General Engine APIs use their own exported error classes and diagnostic code objects; inspect those values instead of parsing message text.

Capability boundary ​

The library is experimental. No general CSS compatibility, arbitrary shaders, universal CAD rendering, certified geometric accuracy, broad hardware support or production performance is claimed. Native CAD validity, display mesh quality and image quality are separate outcomes. The catalog's Engine CPU APIs do not establish an available general Engine graphics runtime. #1183/#1184 remain qualified isolated work with actual GL acceptance unrun in their latest receipts.


Source snapshot: local Git 5f5ad866205a21510ac69552e704cc162fa253b5. packages/barocss-gpu/package.json (Manifest; local source), packages/barocss-gpu/src/index.ts (public root; local source), packages/barocss-gpu/README.md (package README; local source). Source paths identify that fixed local snapshot. Local source is the authority for this manual.

Overview · Quickstart · Guides · API · Examples · Limits

Local manual snapshot. Availability is stated on each package page.