Skip to content

Expose scene transform builder#68

Merged
agustin-littlehat merged 1 commit into
mainfrom
public-scene-transform-builder
Jun 11, 2026
Merged

Expose scene transform builder#68
agustin-littlehat merged 1 commit into
mainfrom
public-scene-transform-builder

Conversation

@agustin-littlehat

Copy link
Copy Markdown
Contributor

Summary

  • add public buildPolySceneTransform / PolySceneTransformInput in core
  • re-export the scene transform helper and transform input types from vanilla, React, and Vue entrypoints
  • route vanilla, React, and Vue camera scene-root transform construction through the shared helper
  • document the helper in the README and headless API docs

Why this helps

This gives external render adapters a supported way to build the same scene-root transform string PolyCSS uses internally, including target + auto-center offset conversion, zoom normalization, optional distance, layout scale, and world-unit sizing. It also removes duplicated transform string math from the framework camera paths.

Validation

  • pnpm --filter @layoutit/polycss-core test -- src/transform/sceneTransform.test.ts
  • pnpm --filter @layoutit/polycss test -- src/api/scene/transforms.test.ts src/index.test.ts
  • pnpm --filter @layoutit/polycss-react test -- src/camera/useCamera.ts
  • pnpm --filter @layoutit/polycss-vue test -- src/camera/useCamera.ts
  • git diff --check
  • pnpm build:packages
  • declaration output contains buildPolySceneTransform and PolySceneTransformInput for core, vanilla, React, and Vue
  • pnpm test && pnpm build

Note: the existing happy-dom iframe abort/network stderr and React act(...) warnings still appear during tests, but all tests pass.

Supersedes closed PR #67, which used the wrong temporary branch name.

@agustin-littlehat agustin-littlehat force-pushed the public-scene-transform-builder branch 2 times, most recently from 1f47bdd to 28d8edd Compare June 11, 2026 01:04
@agustin-littlehat agustin-littlehat force-pushed the public-scene-transform-builder branch from 28d8edd to 02a04d5 Compare June 11, 2026 01:16
@agustin-littlehat agustin-littlehat merged commit 3d286eb into main Jun 11, 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.

2 participants