Repository navigation
GPU Viewer Appearance Complete Mount Boundary
Existing #1375 / actual Viewer #1369
Private preparation for root review/publication under existing1375. Read EXACT adopted Viewer880e2373ed5eda5fd7f1261f516df8de97a30f43 native-scene-appearance.ts and GPU28618c1d primitive-scene-renderer.ts through fixed Git blobs, plus existing1375 freeze. No code/API/build/flow/browser/remote/Wiki/Issue action ran. No new API, opaque token, renderer, Issue or graphics permission is proposed.
Viewer1369 PURE_CPU native70ad1c5d96d5bb2e3e1b3e5bc6eafb9dc8c6ab1d ->d59e3773f2a0de531928489868be2bb2a766c781, adopted880e2373 (receipt6100956533). Public prepareViewerNativeSceneAppearance(input,context) is source available and returns the actual DTO described below. It does not mount, commit Viewer state or prove rendered Open. GPU CPU preflight adopted89cf31f7896938efb035818f9b82e556e8b16ab3 (native receipt6100357110/adoption6100400372). GPU complete factories28618c1d have CODE_BUILD_API_FILE_PASS only; actual instances/shaders/pixels/resources/lifetime are UNRUN. No qualified graphics adoption or consumer support follows from this isolated code.
Thus public CPU provider availability is READY at its exact checkpoint. Factory code availability is a separate isolated stage; a compatible source/emitted consumer graph requires root-frozen exact blobs/declarations before a later caller imports it. Required real GL flow is BLOCKED by original IAB3/127.0.0.1:52215 administrator-policy gate and user-port owner release. Never retry/bypass via another browser/tool/origin/port/CLI/CDP/proxy or kill another lane's server. Current1254/674 and publication remain separate.
Actual Viewer input version1 has exactly {version,source,display,appearance}. source is {kind:'document',result,options,bindings} with complete CadDocumentResult and actual interopV2 document options and bindings with TEN native identity fields. Context is exactly {mmToSceneUnit,background}, scale[1e-6,1], RGB[0,1]. Outer snapshotPair shares327680 own-value occurrences/depth32/array4096/record64/string262144UTF8 ANDUTF16; current-realm own ordinary data, finite numbers, no getters/cycles/foreign/null prototypes. This is not a new16MiB raw-Loft codec or a generic all-family source route.
Returned DTO is {format:'barocss-viewer-native-scene-appearance',version:0,context,source,inventory,display,prepared}. The actual mount argument is returned.prepared.frame, not the whole Viewer DTO or returned.prepared. That frame is existing GPU version0 {version:0,scene:{version:2,entries},options,particles:null,materials}. Viewer request1/output0/frame0/scene2/sample0-or1 are distinct version meanings, not a shared renderer version.
Actual inventory1..4 derives from prepareBaroCadDocumentPrimitiveNativeRefsV2, ordered all Surfaces then Curves. TEN pins compare documentId/documentRevision/nativeFrame/bodyId/assetId/assetRevision/sourceFrame/modelId/geometryKind/geometryId against freshly rebuilt original authority. Retain full original canonical document/assets/source text and every copied binding; repeated authored Model/geometry names remain qualified, never deduplicated or silently renamed. Frame ref uses actual modelId+geometryId; Viewer Surface ref uses modelId+surfaceId, Curve ref modelId+curveId. Neither document/asset/sourceId nor bodyId substitutes for GPU modelId.
Viewer Surface totals<=4096vertices/24576indices, Curve sampleVersion0 or1 only, uniform within the one request, per-Curve1025/4097points and aggregate16388points/16384segments. This particular Viewer input is NOT sampleVersion2/3 or generic TriangleGeometry support. GPU broader native sample compatibility does not widen Viewer automatically. Surface packet remains original version0/mm/right-handed-y-up/ccw/revision/parameters; Curves retain authored native XYZ/mm and explicit basis authored-xyz-matches-rhyup. Context mmToSceneUnit converts once, then fixed scene translation[0,0,0]; retain original native fields/domain/UV independently from derived execution.
display exactly {motion,visibleGeometry,camera}; appearance exactly {lighting,materials}. Visible refs are unique admitted inventory subset0..4. Motion and poses resolve only against actual inventory; copied original translationMm/quaternion/scale retain existing GPU admission. Camera is explicit eye/target/up/fovYDegrees/near/far; lighting is explicit ambientStrength/directionalStrength/direction. GPU validators preserve copied camera/light values, including original unnormalized nonzero light direction; no automatic camera fit or source-axis retag.
Each material is {ref:{modelId,surfaceId},binding} and must target a VISIBLE candidate Surface before full frame admission. Materials cannot target hidden geometry, Curves or a previous source with matching unqualified ID. Duplicate material targets refuse. Binding uses actual MeshMaterialBinding opaque source reconstruction, default filling/range checks/+0 numeric uniforms. No UV/repeating/shell/alpha profile support is inferred. Viewer maps Surface ref to GPU{modelId,geometryId:surfaceId}; GPU rechecks against candidate primitives.
Viewer first admits the whole inventory through preparePrimitiveSceneFrame, then, when visibility is a proper subset, re-admits a filtered frame. It does not hide invalid inventory geometry to pass admission. Material eligibility guarantees retained materials reference visible entries, so filtered frame can retain the explicit material list without stale carry. Genuine all-hidden visibility has empty entries AND empty materials, copied explicit options/camera/light, bounds:null and zero geometry bytes. GPU still presents a real background target if the empty Viewport factory actually mounts it.
Canonical CPU material order remains input order. Existing renderer materials getter reports accepted DRAW order, so serialization cannot silently replace authored material ordering with that getter. Preserve material/source intent separately. Returned Viewer source/context/inventory/display are independent structured copies but the outer DTO is not an immutable backend token. GPU prepared.frame originals are frozen copies; prepared typed buffers remain mutable owned views. Their mutation must not affect factory reconstruction, since both factories ALWAYS call preparePrimitiveSceneFrame again on.frame.
For a newly owned canvas and an explicitly NONEMPTY_ONLY runtime profile, use mountPrimitiveSceneFrame(canvas,candidate.prepared.frame) when entries.length1..4; it returns existing PrimitiveSceneRendererV2. Empty frame must refuse in that profile. For a newly owned canvas whose profile admits empty visibility, use mountPrimitiveViewportFrame(canvas,candidate.prepared.frame); it returns existing PrimitiveViewport and accepts BOTH1..4 entries and genuine empty0. Empty never uses geometry-only bootstrap plus update.
Proposed coherent Viewer1369 policy: because its adopted input allows0..4 visible geometry and later visibility can hide all objects, use the Viewport complete factory consistently for that runtime, even when the initial candidate is nonempty. This avoids an unqualified runtime switch when an accepted V2 instance later needs empty entries. Root/Viewer must freeze this consumer choice before implementation; this private proposal does not change Viewer code or redefine V2's nonempty update contract.
An alternative fresh-mount demonstration can qualify nonempty V2 and empty Viewport as separate independently owned instances, but that does not certify switching an existing accepted instance. Never dynamically mount a second complete factory on an already claimed canvas: new-route WeakSet intentionally refuses before context. Same-backend subsequent complete-frame updates use existing updateFrame and its actual return; any class/canvas/backend switch requires a separate explicit host policy. No cross-backend/first-mount rollback guarantee is supplied.
GPU owns one source-revalidated complete candidate, trusted final text checks before canvas, current-realm canvas claim, device target checks, ONE create and ONE first presentation, resource/listener/claim cleanup, and primary plus actual cleanup error retention. Factory successful return commits its initial renderer only. On failure no accepted first frame exists and no prior pixels are promised. GPU standard AggregateError retains original/cleanup identities; non-Error primary without cleanup has existing GPUError exact non-enumerable cause. Historical hardware loss prevents later strict deletion after restoration; invalidation is not measured deletion/resource zero.
Viewer/host owns admission-generation and async request eligibility, active canvas/renderer, canonical source/context/display/material/light state, selection/highlight consistency, authored Save/Open and UI status. Stage pure candidate first. Commit Viewer accepted authority only AFTER actual factory/update success. Before-source/ref/material/camera/light failure retain old CPU authority, pending fields/request eligibility and current renderer. A failed fresh mount on a new candidate canvas cannot be relabelled as a successful source Open; cleanup/error state remains separate. Reusing an active canvas requires same-backend update or an explicitly frozen switch; disposing old accepted renderer first removes any prior-frame pixel retention premise.
For existing updateFrame, genuine late failure with successful accepted redraw can retain prior pixels/authority only after observing that actual route. Failed recovery reports public1334 PrimitiveSceneRecoveryError with ordered original/recovery causes and presentationUnavailable, while hardware loss remains separate. New first-mount cleanup errors are not1334 accepted-frame recovery. No CPU preflight or file gate substitutes for these observations.
Select one compatible actual emitted Viewer/GPU graph and declarations only after the exact parent, provider blobs and target/ownership contract are frozen. Original IAB3/127.0.0.1:52215 policy restoration and actual proof-port owner release remain prerequisites. No alternate browser/tool/origin/port is authorized. The completed CPU producer flows are receipts, not tasks to repeat.
Use one authentic two-Surface canonical document with full qualified bindings, distinct opaque authored material sources/uniforms and explicit camera/light. Actual Viewer preparation returns the candidate frame. On a newly owned canvas call the selected Viewport complete factory directly; observe one context acquisition and one complete first presentation without bootstrap/update. Check predeclared pixels and accepted geometry/material/camera/light against the original candidate. Then use the same Viewport updateFrame for an authentic all-hidden request with materials[]; record a separate empty background update and bounds:null. This is one contiguous actual caller flow, not a second first mount or renderer switch.
In that flow reject one predeclared malformed visible-material candidate before target access; retain actual accepted host source/frame. End with ordinary disposal of this owned instance and read live console/errors before closing its temporary tab. Resource, listener and canvas-claim observations are bounded to this actual attempt; do not claim all failure branches, terminal loss or zero resources after an unobserved failure. Stop only the owned temporary server. Preserve first failures/repairs and exact parent/head/results.
Late allocator/draw cleanup faults, hardware loss/recovery, all resource-class campaigns, multiple source/emitted graphics providers, Save/Open/fresh-process browser reconstruction, current Root and publication are separate future selected stages. Authored Save/Open remains the actual host/file owner's contract; no raw-Loft codec is supplied by this preparation.
This future flow is PLANNED/UNRUN and grants no access to the currently denied target. Whole1375 and1369 remain OPEN across required stages; currentRoot1254/674 and publication are separate. Root reviews/publishes this preparation in existing1375. No new Issue or GPU API is needed. The coherent 0..4 Viewport policy is proposed for the actual consumer to adopt before implementation, not an implemented Viewer change.
Render1049 audit6101122230 adds a concrete compatibility gate. The authored native document stores display.mmToSceneUnit and background. Pure Viewer1369 preparation can use that supplied context; the pending stateful replaceNativeSceneAppearance uses the mounted Viewer's constructor context and its four-field request has no context override. This is a read-only source audit, not an observed runtime failure or completed mounted API.
Before a later mounted adapter presents or commits accepted native document/session state, it must compare the complete saved display context with the actual mounted context. A mismatch refuses atomically and retains the previous native scene, appearance, file and session. GPU complete factories receive only the admitted frame; they cannot infer a host's saved document or constructor context. Existing GPU frame options already express scale/background, so no new GPU schema/API/grammar or silent source rescaling is needed. A deliberate context switch/remount remains a separately frozen host choice.
Add one context-mismatch candidate to the existing planned caller flow: retain the two-Surface accepted state, change only the saved display scale from the accepted .01 to .02 while the mounted context remains .01, and require host refusal before GPU presentation/commit. Background compatibility is also mandatory; exact comparison/diagnostic behavior must be frozen in the actual consumer contract before its code. Do not claim this proposal qualifies signed-zero/canonicalization policy or a background-mismatch runtime branch. The pure provider is READY; mounted consumer code, original-target access and this observation remain UNRUN. This extends existing #1375/#1369 preparation and creates no duplicate Issue.
Integration1369 receipt6101487367 records native d59e3773 ->2181c03e and adoption0c2bfb5faac797e97f728609a5d29a4b6b24330b. This supersedes earlier WIP/absent-current-Root wording for replaceNativeSceneAppearance. The exact mounted helper/index code was read from that checkpoint; it stages original document authority through the pure provider plus matching Interop TEN-pin/inventory rebuild. No GPU implementation delta is required for this caller.
Public method supports ONLY already-accepted PrimitiveSceneRendererV2 nonempty or PrimitiveViewport empty/nonempty. One actual updateFrame must succeed before original native document/pins/palette/materials/light/camera/selection/reports/URL generation commit. It cannot qualify a fresh complete first mount, other backend or context switch. Original Curve sample0/1 remain its accepted family; general TriangleGeometry or selected-uniform sample3 adoption is not inferred. Constructor context remains host-owned; saved-context mismatch protection in1049 still applies, without private/unexported getter assumptions.
Native consumer proof preserves its first all-hidden status-oracle failure (oktrue butPARTIAL/scopeCompletefalse), same-page remaining-tail repair and compiledfirstscopecomplete. Its original source/emitted/native SDK2 physical file/cleanup receipts are external consumer evidence, not GPU's denied52215 flow or current stricterRoot acceptance. No completed1369 producer/browser flow was replayed. GPU1375 fresh factories remain CODE_BUILD_API_FILE_PASS/actualGLUNRUN; original access denial and user-owned server/tab remain intact. Whole1369/1375 and current1254/674/publication remain separate.
Existing0..4 Viewport recommendation and one bounded future original-target first-presentation/hide-all/context-refusal/disposal flow remain PLANNED. Late loss/failure/file campaigns are not expanded. No new Issue or GPU API is needed; this is useful exact preparation from a newly adopted actual consumer.