+16
-1
@@ -1,6 +1,21 @@
|
||||
# Architecture
|
||||
|
||||
The core/model.ts module converts every supported source into one inert model containing finite position/normal arrays, triangle indices and descriptive scene metadata. Parser-specific bounds are enforced before allocation and again on normalized geometry. Normal repair, transforms, statistics and exporters consume only that model.
|
||||
The core/model.ts module converts every supported source into one inert model
|
||||
containing finite position/normal arrays, triangle indices and descriptive scene
|
||||
metadata. Imports run in a disposable module worker with progress, cancellation
|
||||
and revision-scoped results. Parser-specific bounds are enforced before
|
||||
allocation and again on normalized geometry. Normal repair, transforms,
|
||||
statistics and exporters consume only that model.
|
||||
|
||||
For glTF/GLB, the selected/default scene is traversed as a validated acyclic
|
||||
hierarchy. Column-major matrices and TRS/quaternion transforms are composed,
|
||||
inverse-transpose normal transforms and mirrored winding are applied, and every
|
||||
mesh instance is flattened into the bounded model. Consequently preview,
|
||||
bounds, surface statistics, OBJ, STL and PLY all describe the same selected scene.
|
||||
Selected metallic/roughness material factors and declared texture slots remain
|
||||
inert inspection metadata; texture payloads are not decoded. Per-axis transforms
|
||||
use inverse-transpose normal handling, while bounded repair can discard only
|
||||
geometrically degenerate faces before recalculating normals.
|
||||
|
||||
The preview expands at most 200,000 triangles into a dedicated WebGL buffer. It uses fixed application-owned shaders and never compiles source-file content. Full statistics and exports still use the complete bounded model. glTF data URIs are decoded locally; non-data URIs are rejected.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user