Skip to content

fix(text): honor parent render ordering - #43

Merged
thejustinwalsh merged 2 commits into
feat/package-workflow-consolidationfrom
feat/text-render-order
Aug 5, 2026
Merged

fix(text): honor parent render ordering#43
thejustinwalsh merged 2 commits into
feat/package-workflow-consolidationfrom
feat/text-render-order

Conversation

@thejustinwalsh

@thejustinwalsh thejustinwalsh commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Make framework-neutral Text a composite Object3D so caller-owned parent Group ordering remains the primary Three.js sort key.
  • Propagate Text.renderOrder as the secondary base across cold publication and retained Bitmap, MTSDF, Slug, and third-party raster updates.
  • Require neutral Object3D raster roots and reject plugin Groups that would reset inherited group order.
  • Keep nested React Text as source/span composition while preserving the standard Object3D prop surface.

Public contract

A parent Group supplies groupOrder. Text.renderOrder supplies the paragraph base, and each drawable retains its raster-local run offset. RasterObjectDrawBatch now exposes the synchronous, infallible setRenderOrderBase method so external raster packages can implement the same lifecycle without core internals.

Verification

  • mise exec -- pnpm check
  • mise exec -- pnpm scripts run benchmark:external-raster
    • WebGPU: 2/2 deterministic external raster frames
    • WebGL2: 2/2 deterministic external raster frames
    • The framebuffer proof resets Text.renderOrder to zero and therefore fails if Text or its plugin batch overrides the caller-owned parent Group.
  • 33 focused Text, React, and retained-raster tests pass.
  • The third-party raster package passes build, tests, typecheck, lint, and format.
  • OKF validation reports zero errors and zero warnings; affected source digests were regenerated.
  • Generated package-size evidence and reviewed ceilings pass.
  • React Doctor v0.9.4 changed-scope score: 92/100. Its one warning points to the unchanged persistent-host provider, whose value is retained by the configured React Compiler and is already documented inline as a rule false positive.

@thejustinwalsh
thejustinwalsh force-pushed the feat/text-render-order branch 2 times, most recently from 9f4f975 to b2d8f17 Compare August 4, 2026 19:48
@thejustinwalsh
thejustinwalsh force-pushed the feat/text-render-order branch from b2d8f17 to a84dd20 Compare August 4, 2026 20:10
@thejustinwalsh
thejustinwalsh merged commit fd4cb96 into main Aug 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant