Prismv0.4
Guides

Sync transforms

Keep app-owned transforms aligned with Prism-managed surface bounds.

Prism does not own your app's transform model. Keep transforms in app state and project the relevant result into Prism surface bounds.

surface.setBounds({
  x: panel.x,
  y: panel.y,
  width: panel.width,
  height: panel.height
});

If your canvas drawing applies a transform, keep the same source of truth for the HTML surface position. Prism should receive the final CSS-pixel bounds that describe where the surface participates in the canvas composition.

Use coordinate helpers when pointer input or backing-store drawing needs to cross the CSS-pixel boundary.