@motionscript/core 0.1.1-alpha.0 → 0.1.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/browser/chunks/{chunk-3ZIUZZC7.js → chunk-5GLXFSCC.js} +2 -2
- package/dist/browser/chunks/chunk-5GLXFSCC.js.map +7 -0
- package/dist/browser/chunks/{chunk-7YOYMMXK.js → chunk-MNMIIGNE.js} +6 -6
- package/dist/browser/chunks/{chunk-7YOYMMXK.js.map → chunk-MNMIIGNE.js.map} +4 -4
- package/dist/browser/experimental.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/manifest.json +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/components/factory/style.d.ts +38 -0
- package/dist/components/factory/style.d.ts.map +1 -0
- package/dist/components/factory/style.js +104 -0
- package/dist/components/factory/style.js.map +1 -0
- package/dist/components/factory/types.d.ts +9 -0
- package/dist/components/factory/types.d.ts.map +1 -1
- package/dist/components/factory/types.js +11 -0
- package/dist/components/factory/types.js.map +1 -1
- package/dist/experimental.d.ts +2 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/render3d/camera.d.ts +1 -1
- package/dist/render3d/camera.d.ts.map +1 -1
- package/dist/render3d/camera.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +1 -1
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/chunks/chunk-3ZIUZZC7.js.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-picking3d.js","sourceRoot":"","sources":["../../src/runtime/node-picking3d.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAGxE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAiB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WAGG;QACH,MAAM,EAAE,IAAI,CAAC,MAAM;KACtB,CAAC;AACN,CAAC","sourcesContent":["import { Node } from \"@/components/trees/node/node\";\nimport { Node3D, parentSpaceOf } from \"@/components/trees/three/node3d\";\nimport type { Node2D } from \"@/components/trees/2d/node2d\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport { applyToPoint, invert, type Matrix2D } from \"@/attributes/layout/matrix2d\";\nimport { resolveCameraPlacement, type CameraData3D } from \"@/render3d/camera\";\nimport type { Scene3D, Scene3DOp } from \"@/render3d/scene3d\";\nimport type { Transform3D } from \"@/render3d/transform\";\nimport {\n geometryBounds3D, transformBox3, unionBox3, centeredBox3, corners3, type Box3,\n} from \"@/render3d/bounds3d\";\nimport {\n applyMatrix4, identity4, invert4, lookAtRotation4, multiply4, orthographic4,\n perspective4, transformMatrix4, translation4, type Matrix4,\n} from \"@/render3d/matrix4\";\nimport type { Vector3 } from \"@/render3d/vector3\";\nimport { nodePath } from \"@/project/tree\";\nimport type { NodeBox } from \"./node-picking\";\n\n/**\n * Where a `Node3D`'s pixels landed: the 3D half of `node-picking.ts`.\n *\n * The answer is a 2D box: the screen-space AABB of the node's projected world-space AABB, in the `Canvas3D`'s\n * own plane. It composes with everything the 2D side does (the canvas's rotation, its ancestors', a camera\n * scope above it) by being mapped through the canvas's `renderMatrix` as {@link nodeBox} maps a corner.\n *\n * Bounds come from the recorded {@link Scene3D} (the seam render and the asset pass both build, which measures\n * a custom `renderSelf` for free); paths come from the tree, because a path is a child index and ops carry\n * none. The two meet on `Node3D.id`, which the scene records as the `key` on every `push`.\n *\n * Nothing here imports `node-picking.ts` at runtime: the canvas's box and CTM arrive as a {@link\n * Canvas3DFrame}, so the dependency runs one way (the `NodeBox` import is type-only).\n *\n * A box is not clipped to the viewport: a mesh drifted off the canvas reports where it went, though no pixels\n * are drawn. {@link pickIn} only consults this file for a point already inside the rect. Every entry point\n * records the scene afresh, so a host calling {@link collectBoxes} on every pointer move over many viewports\n * pays one scene build per viewport per move.\n */\n\n/** @internal */\n/** A 2D node over a 3D scene (a `Canvas3D`): its 3D children are picked through the scene it builds. */\nexport interface Viewport3D extends Node2D {\n _isViewport3D(): boolean;\n _scene3D(): Scene3D | null;\n}\n\nexport function isViewport3D(node: unknown): node is Viewport3D {\n return typeof (node as Partial<Viewport3D> | null)?._isViewport3D === \"function\" && (node as Viewport3D)._isViewport3D();\n}\n\nexport interface Canvas3DFrame {\n /**\n * Its folded `rotation`/`scale`/`opacity` carry to every 3D node inside it: a mesh has none of its own, and\n * cursor angles and pixels-per-unit are questions about the plane the box is drawn in.\n */\n box: NodeBox;\n matrix: Matrix2D;\n}\n\n/**\n * Ordered by depth, not draw order (the one divergence from {@link collectBoxes}): a 3D scene has no draw\n * order to speak of, so \"topmost\" means \"nearest\". Empty when the scene has no camera that resolves, the\n * canvas has no size, or nothing can be measured (see {@link geometryBounds3D}).\n */\n/** @internal */\nexport function collectBoxes3D(canvas: Viewport3D, frame: Canvas3DFrame, path: string): NodeBox[] {\n const projection = canvas3DProjection(canvas);\n if (!projection) return [];\n\n const out: { box: NodeBox; depth: number }[] = [];\n for (const entry of nodes3DOf(canvas, path)) {\n const world = projection.boxes.get(entry.node.id);\n if (!world) continue;\n const projected = projectBox3(world, projection);\n if (!projected) continue;\n out.push({\n box: toNodeBox(entry.node, entry.path, projected.rect, frame),\n depth: projected.depth,\n });\n }\n /**\n * View space looks down -Z, so a nearer node has the larger (less negative) z: descending puts the front\n * first.\n */\n out.sort((a, b) => b.depth - a.depth);\n return out.map((entry) => entry.box);\n}\n\n/**\n * Where arbitrary points around one `Node3D` land on screen, for a gizmo. All points come back in the same\n * viewport space as {@link NodeBox}. A `null` entry is behind the camera (the per-point version of {@link\n * projectBox3}'s eye-plane guard).\n *\n * Not `@internal`, unlike {@link projectNode3D}: a host gets this back from\n * `projectNode3DAt`/`PlaybackController.projectNode3D`.\n */\nexport interface Node3DFrame {\n origin: Vector2 | null;\n /**\n * `parentPoints` transformed by the node's parent's world matrix then projected: the frame\n * `Node3DProps.position` is expressed in, so a move or scale handle belongs here and `{ ...position, x:\n * position.x + 1 }` projects to where nudging `x` by one unit lands.\n */\n parentPoints: (Vector2 | null)[];\n /**\n * `localPoints` transformed by the node's own world matrix then projected, for geometry tracking its current\n * orientation (a rotation ring).\n */\n localPoints: (Vector2 | null)[];\n /**\n * What the node and its children draw, as a box in the node's own frame (the one `localPoints` are in), so a\n * selection box projected through `localPoints` hugs the mesh at any orientation. `null` when nothing it draws\n * has an extent (a light, a model before its file arrives) or it is hidden.\n */\n bounds: Box3 | null;\n}\n\nconst ORIGIN_3D: Vector3 = { x: 0, y: 0, z: 0 };\n\n/**\n * `null` when the canvas has no projection (see {@link canvas3DProjection}) or the path does not resolve.\n * `canvasPath` is the same root {@link collectBoxes3D} and {@link pickNode3D} are handed.\n */\n/** @internal */\nexport function projectNode3D(\n canvas: Viewport3D,\n frame: Canvas3DFrame,\n canvasPath: string,\n targetPath: string,\n parentPoints: readonly Vector3[],\n localPoints: readonly Vector3[],\n): Node3DFrame | null {\n const entry = nodes3DOf(canvas, canvasPath).find((e) => e.path === targetPath);\n if (!entry) return null;\n\n const projection = canvas3DProjection(canvas, entry.node.id);\n if (!projection) return null;\n\n const own = projection.matrices.get(entry.node.id);\n const parent = projection.parentMatrices.get(entry.node.id);\n if (!own || !parent) return null;\n\n const project = (matrix: Matrix4, points: readonly Vector3[]): (Vector2 | null)[] =>\n points.map((point) => projectPoint3(matrix, point, projection, frame));\n\n // A parent with coordinates of its own places the node by them, so that is the frame its position is in.\n const space = parentSpaceOf(entry.node);\n const placed = space ? parentPoints.map((point) => space.toLocal(point.x, point.y, point.z)) : parentPoints;\n\n return {\n origin: projectPoint3(own, ORIGIN_3D, projection, frame),\n parentPoints: project(parent, placed),\n localPoints: project(own, localPoints),\n bounds: projection.localBounds,\n };\n}\n\n/**\n * `null` when it lands behind the camera. The single-point sibling of {@link projectBox3}: no edges to clip.\n */\nfunction projectPoint3(\n matrix: Matrix4,\n point: Vector3,\n projection: Canvas3DProjection,\n frame: Canvas3DFrame,\n): Vector2 | null {\n const world = applyMatrix4(matrix, point);\n const clip = applyMatrix4(projection.clip, { x: world.x, y: world.y, z: world.z });\n if (clip.w <= MIN_CLIP_W) return null;\n\n const ndcX = clip.x / clip.w;\n const ndcY = clip.y / clip.w;\n const rectX = projection.centerX + ndcX * (projection.width / 2);\n const rectY = projection.centerY + ndcY * (projection.height / 2);\n\n const p = applyToPoint(frame.matrix, { x: rectX, y: -rectY });\n return { x: p.x, y: -p.y };\n}\n\n/**\n * The box, not the mesh. `tolerance` is grab-slop in scene units, applied in the canvas's own plane so it\n * stays a constant on-screen distance.\n */\n/** @internal */\nexport function pickNode3D(\n canvas: Viewport3D,\n frame: Canvas3DFrame,\n point: Vector2,\n tolerance: number,\n path: string,\n): NodeBox | null {\n const projection = canvas3DProjection(canvas);\n if (!projection) return null;\n\n /**\n * Into the canvas's own plane, undoing everything above it in one step: the inverse `containsPoint` takes,\n * with the same y-flips.\n */\n const inverse = invert(frame.matrix);\n if (!inverse) return null;\n const mapped = applyToPoint(inverse, { x: point.x, y: -point.y });\n const local = { x: mapped.x, y: -mapped.y };\n\n let best: { node: Node3D; path: string; rect: Rect2D } | null = null;\n let bestDepth = -Infinity;\n for (const entry of nodes3DOf(canvas, path)) {\n const world = projection.boxes.get(entry.node.id);\n if (!world) continue;\n const projected = projectBox3(world, projection);\n if (!projected) continue;\n if (!rectContains(projected.rect, local, tolerance)) continue;\n if (projected.depth <= bestDepth) continue;\n bestDepth = projected.depth;\n best = { node: entry.node, path: entry.path, rect: projected.rect };\n }\n return best ? toNodeBox(best.node, best.path, best.rect, frame) : null;\n}\n\ninterface Node3DEntry {\n node: Node3D;\n path: string;\n}\n\n/**\n * Indexed against {@link Node._allChildren} rather than `children`, so a mesh and a HUD label under one\n * viewport are numbered the way the author wrote them.\n */\nfunction nodes3DOf(canvas: Viewport3D, path: string): Node3DEntry[] {\n const out: Node3DEntry[] = [];\n walk3D(canvas._allChildren, path, out);\n return out;\n}\n\nfunction walk3D(children: readonly Node[], parentPath: string, out: Node3DEntry[]): void {\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (!(child instanceof Node3D)) continue;\n const path = nodePath(parentPath, i);\n out.push({ node: child, path });\n walk3D(child._allChildren, path, out);\n }\n}\n\ninterface Canvas3DProjection {\n boxes: Map<string, Box3>;\n matrices: Map<string, Matrix4>;\n parentMatrices: Map<string, Matrix4>;\n clip: Matrix4;\n view: Matrix4;\n width: number;\n height: number;\n centerX: number;\n centerY: number;\n /** The `boundsKey` node's extent in its own frame, when one was asked for. */\n localBounds: Box3 | null;\n}\n\nfunction canvas3DProjection(canvas: Viewport3D, boundsKey?: string): Canvas3DProjection | null {\n const bounds = canvas._localBounds();\n if (!(bounds.width > 0) || !(bounds.height > 0)) return null;\n\n const scene = canvas._scene3D();\n if (!scene) return null;\n const walked = walkScene3D(scene, boundsKey);\n if (walked.boxes.size === 0) return null;\n\n const view = invert4(walked.camera);\n if (!view) return null;\n\n const aspect = bounds.width / bounds.height;\n return {\n boxes: walked.boxes,\n matrices: walked.matrices,\n parentMatrices: walked.parentMatrices,\n clip: multiply4(projectionMatrix(walked.descriptor, aspect), view),\n view,\n width: bounds.width,\n height: bounds.height,\n centerX: bounds.x,\n centerY: bounds.y,\n localBounds: walked.localBounds,\n };\n}\n\ninterface Scope3D {\n key: string | undefined;\n matrix: Matrix4;\n visible: boolean;\n box: Box3 | null;\n}\n\ninterface WalkedScene3D {\n boxes: Map<string, Box3>;\n /** Captured at `push`, unlike `boxes`, which needs children merged in at `pop`. */\n matrices: Map<string, Matrix4>;\n parentMatrices: Map<string, Matrix4>;\n camera: Matrix4;\n descriptor: CameraData3D | null;\n localBounds: Box3 | null;\n}\n\n/**\n * A node's box is the union of everything it drew and its children drew, so a `Group3D` that draws nothing is\n * still selectable as what it contains. An invisible scope contributes nothing: `visible: false` is skipped by\n * the renderer, and letting it inflate its parent's box would put that box round empty space. The 2D walk\n * skips `opacity: 0` on the same grounds.\n */\nfunction walkScene3D(scene: Scene3D, boundsKey?: string): WalkedScene3D {\n const boxes = new Map<string, Box3>();\n const matrices = new Map<string, Matrix4>();\n const parentMatrices = new Map<string, Matrix4>();\n const root: Scope3D = { key: undefined, matrix: identity4(), visible: true, box: null };\n const stack: Scope3D[] = [root];\n let camera: Matrix4 | null = null;\n let descriptor: CameraData3D | null = null;\n /** Where the `boundsKey` scope sits on the stack while it is open, and the way back into its own frame. */\n let target: { depth: number; inverse: Matrix4 } | null = null;\n let localBounds: Box3 | null = null;\n\n const top = (): Scope3D => stack[stack.length - 1];\n\n for (const op of scene.ops()) {\n const scope = top();\n switch (op.kind) {\n case \"push\": {\n const matrix = scopeMatrix(scope.matrix, op.transform);\n if (op.transform?.key !== undefined) {\n matrices.set(op.transform.key, matrix);\n parentMatrices.set(op.transform.key, scope.matrix);\n if (op.transform.key === boundsKey) {\n const inverse = invert4(matrix);\n if (inverse) target = { depth: stack.length, inverse };\n }\n }\n stack.push({\n key: op.transform?.key,\n matrix,\n visible: scope.visible && op.transform?.visible !== false,\n box: null,\n });\n break;\n }\n case \"pop\": {\n /**\n * The root frame is never popped: `Node3D.render` brackets its own begin/end and `Scene3D.assertBalanced`\n * catches a hand-built scene that does not. Guarding keeps a malformed op list from reading past the stack.\n */\n if (stack.length === 1) break;\n if (target?.depth === stack.length - 1) target = null;\n const closed = stack.pop() as Scope3D;\n if (!closed.visible || !closed.box) break;\n if (closed.key !== undefined) boxes.set(closed.key, closed.box);\n const parent = top();\n parent.box = unionBox3(parent.box, closed.box);\n break;\n }\n case \"camera\": {\n descriptor = op.camera;\n camera = cameraMatrix4(op.camera, scope.matrix);\n break;\n }\n case \"light\":\n /** A light has no extent, so a node that is only a light gets no box and cannot be picked. */\n break;\n default: {\n if (!scope.visible) break;\n const drawn = drawableBox3(op, scope.matrix);\n if (drawn) scope.box = unionBox3(scope.box, drawn);\n if (target) localBounds = unionBox3(localBounds, drawableBox3(op, scope.matrix, target.inverse));\n break;\n }\n }\n }\n\n return {\n boxes,\n matrices,\n parentMatrices,\n camera: camera ?? DEFAULT_CAMERA_MATRIX,\n descriptor,\n localBounds,\n };\n}\n\nfunction scopeMatrix(parent: Matrix4, transform: Transform3D | undefined): Matrix4 {\n return multiply4(parent, transformMatrix4(transform, parent));\n}\n\n/** In world space, or in the frame `into` maps world space to. */\nfunction drawableBox3(op: Scene3DOp, parent: Matrix4, into?: Matrix4): Box3 | null {\n if (op.kind === \"model\") return null; // its extent arrives with the file\n if (!(\"transform\" in op)) return null;\n\n const world = scopeMatrix(parent, op.transform);\n const matrix = into ? multiply4(into, world) : world;\n\n if (op.kind === \"sprite\") {\n /**\n * Three's `Sprite` has no geometry to ask: the one place the extent is assumed rather than read (a\n * camera-facing unit quad scaled by its transform).\n */\n return transformBox3(centeredBox3(0.5, 0.5, 0), matrix);\n }\n\n if (!(\"geometry\" in op)) return null;\n const local = geometryBounds3D(op.geometry);\n if (!local) return null;\n\n if (op.kind === \"instances\") {\n /**\n * Every instance is placed inside the op's own transform, so the union is taken in that space and mapped out\n * once.\n */\n let box: Box3 | null = null;\n for (const instance of op.instances) {\n box = unionBox3(box, transformBox3(local, transformMatrix4(instance, null)));\n }\n return box ? transformBox3(box, matrix) : null;\n }\n\n return transformBox3(local, matrix);\n}\n\n/**\n * `lookAt` takes the camera branch of three's `Object3D.lookAt` (-Z at the target, where every other node aims\n * +Z), resolved against the camera's world position so a camera in an animated rig points where the author\n * said. See {@link lookAtRotation4}.\n *\n * The polar placement (`target`/`orbit`/`elevation`/`distance`) comes from {@link resolveCameraPlacement}, the\n * same call the renderer makes: two derivations of \"where is the camera\" could disagree, and a gizmo drawn\n * against a camera nobody renders is worse than none.\n */\nfunction cameraMatrix4(descriptor: CameraData3D, parent: Matrix4): Matrix4 {\n const placement = resolveCameraPlacement(descriptor);\n\n if (placement.lookAt === undefined) {\n return multiply4(parent, transformMatrix4({ ...descriptor, position: placement.position }, parent));\n }\n const placed = applyMatrix4(parent, placement.position);\n const origin: Vector3 = { x: placed.x, y: placed.y, z: placed.z };\n return multiply4(translation4(origin), lookAtRotation4(origin, placement.lookAt));\n}\n\n/**\n * Pulled back along +Z, aimed at the origin. Mirrors `applyCamera`'s fallback, which makes a bare `g.box()`\n * render, and so pickable.\n */\nconst DEFAULT_CAMERA_MATRIX: Matrix4 = multiply4(\n translation4({ x: 0, y: 0, z: 5 }),\n lookAtRotation4({ x: 0, y: 0, z: 5 }, { x: 0, y: 0, z: 0 }),\n);\n\nconst DEFAULT_FOV = 50;\nconst DEFAULT_NEAR = 0.1;\nconst DEFAULT_FAR = 1000;\n\nfunction projectionMatrix(descriptor: CameraData3D | null, aspect: number): Matrix4 {\n if (descriptor === null) {\n return perspective4(DEFAULT_FOV, aspect, DEFAULT_NEAR, DEFAULT_FAR, 1);\n }\n if (descriptor.type === \"perspective\") {\n return perspective4(\n descriptor.fov ?? DEFAULT_FOV,\n /**\n * Always the node's own aspect: overriding it stretched the render, so a gizmo could only be wrong by\n * agreeing with one.\n */\n aspect,\n descriptor.near ?? DEFAULT_NEAR,\n descriptor.far ?? DEFAULT_FAR,\n descriptor.zoom ?? 1,\n );\n }\n /**\n * `frustumHeight` sets the visible world height and the width follows the node's aspect. The same rule as\n * `applyCamera`, restated because that one lives in the renderer, which core cannot import.\n */\n const halfHeight = (descriptor.frustumHeight ?? 10) / 2;\n return orthographic4(\n -halfHeight * aspect,\n halfHeight * aspect,\n halfHeight,\n -halfHeight,\n descriptor.near ?? DEFAULT_NEAR,\n descriptor.far ?? DEFAULT_FAR,\n descriptor.zoom ?? 1,\n );\n}\n\ninterface Rect2D {\n minX: number;\n minY: number;\n maxX: number;\n maxY: number;\n}\n\nconst BOX_EDGES: readonly (readonly [number, number])[] = [\n [0, 1], [2, 3], [4, 5], [6, 7],\n [0, 2], [1, 3], [4, 6], [5, 7],\n [0, 4], [1, 5], [2, 6], [3, 7],\n];\n\n/** A point at `w = 0` is on the plane through the eye and projects to infinity. */\nconst MIN_CLIP_W = 1e-4;\n\n/**\n * How far outside the canvas a projected box may reach, as a multiple of the canvas's size. A box straddling\n * the eye plane genuinely extends to the horizon, which is a useless answer for an overlay (a rectangle a\n * million pixels wide). Clamping keeps it pointing the right way, and is only reached when the box is already\n * unusable as a target.\n */\nconst OFFSCREEN_LIMIT = 8;\n\n/**\n * The world box projected into the canvas's plane, plus its view-space depth. Edges are clipped rather than\n * corners clamped: a corner behind the eye projects reflected through the origin, so bounding the raw eight\n * would put the box on the wrong side. Entirely-behind boxes keep no edges, which is how a node behind the\n * camera stops being selectable.\n */\nfunction projectBox3(\n world: Box3,\n projection: Canvas3DProjection,\n): { rect: Rect2D; depth: number } | null {\n const corners = corners3(world);\n const clip = corners.map((corner) => applyMatrix4(projection.clip, corner));\n\n let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;\n let any = false;\n\n const include = (x: number, y: number, w: number) => {\n const ndcX = x / w;\n const ndcY = y / w;\n if (ndcX < minX) minX = ndcX;\n if (ndcY < minY) minY = ndcY;\n if (ndcX > maxX) maxX = ndcX;\n if (ndcY > maxY) maxY = ndcY;\n any = true;\n };\n\n for (const [a, b] of BOX_EDGES) {\n const p = clip[a];\n const q = clip[b];\n const pIn = p.w > MIN_CLIP_W;\n const qIn = q.w > MIN_CLIP_W;\n if (!pIn && !qIn) continue;\n if (pIn) include(p.x, p.y, p.w);\n if (qIn) include(q.x, q.y, q.w);\n if (pIn === qIn) continue;\n // Exactly one end is in front: cut the edge where `w` reaches the plane.\n const t = (MIN_CLIP_W - p.w) / (q.w - p.w);\n include(p.x + (q.x - p.x) * t, p.y + (q.y - p.y) * t, MIN_CLIP_W);\n }\n\n if (!any) return null;\n\n const halfWidth = projection.width / 2;\n const halfHeight = projection.height / 2;\n const limitX = halfWidth * OFFSCREEN_LIMIT;\n const limitY = halfHeight * OFFSCREEN_LIMIT;\n\n const rect: Rect2D = {\n minX: clamp(projection.centerX + minX * halfWidth, projection.centerX - limitX, projection.centerX + limitX),\n maxX: clamp(projection.centerX + maxX * halfWidth, projection.centerX - limitX, projection.centerX + limitX),\n minY: clamp(projection.centerY + minY * halfHeight, projection.centerY - limitY, projection.centerY + limitY),\n maxY: clamp(projection.centerY + maxY * halfHeight, projection.centerY - limitY, projection.centerY + limitY),\n };\n\n /**\n * Depth is taken at the box centre in view space (camera looks down -Z, so nearer is larger). One point rather\n * than eight: this orders \"which of two overlapping nodes did you mean\".\n */\n const centre: Vector3 = {\n x: (world.min.x + world.max.x) / 2,\n y: (world.min.y + world.max.y) / 2,\n z: (world.min.z + world.max.z) / 2,\n };\n const viewed = applyMatrix4(projection.view, centre);\n\n return { rect, depth: viewed.z };\n}\n\nfunction clamp(value: number, low: number, high: number): number {\n return value < low ? low : value > high ? high : value;\n}\n\nfunction rectContains(rect: Rect2D, point: Vector2, slop: number): boolean {\n return point.x >= rect.minX - slop\n && point.x <= rect.maxX + slop\n && point.y >= rect.minY - slop\n && point.y <= rect.maxY + slop;\n}\n\n/**\n * The corner mapping is {@link worldAnchors}': y flipped in and back out, since the CTM is canvas y-down and\n * everything around it y-up. Done here rather than via `worldAnchors` so the rect keeps its own centre: it is\n * axis-aligned in the canvas's plane but not centred on its origin.\n *\n * `rotation`, `scale` and `opacity` are the canvas's: a mesh's own mean nothing in two dimensions, and a host\n * reads these for the plane the box was drawn in.\n */\nfunction toNodeBox(node: Node3D, path: string, rect: Rect2D, frame: Canvas3DFrame): NodeBox {\n const at = (x: number, y: number): Vector2 => {\n const p = applyToPoint(frame.matrix, { x, y: -y });\n return { x: p.x, y: -p.y };\n };\n return {\n id: node.id,\n path,\n type: node.className,\n topLeft: at(rect.minX, rect.maxY),\n topRight: at(rect.maxX, rect.maxY),\n bottomRight: at(rect.maxX, rect.minY),\n bottomLeft: at(rect.minX, rect.minY),\n center: at((rect.minX + rect.maxX) / 2, (rect.minY + rect.maxY) / 2),\n width: rect.maxX - rect.minX,\n height: rect.maxY - rect.minY,\n rotation: frame.box.rotation,\n scale: frame.box.scale,\n opacity: frame.box.opacity,\n /**\n * A locked Canvas3D is already unpickable above, so reaching here means the viewport is free; a mesh locks on\n * its own account.\n */\n locked: node.locked,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"node-picking3d.js","sourceRoot":"","sources":["../../src/runtime/node-picking3d.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAGxE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAiB,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAqB,MAAM,mBAAmB,CAAC;AAG9E,OAAO,EACH,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,GACrE,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,aAAa,EAC3E,YAAY,EAAE,gBAAgB,EAAE,YAAY,GAC/C,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AA8B1C,MAAM,UAAU,YAAY,CAAC,IAAa;IACtC,OAAO,OAAQ,IAAmC,EAAE,aAAa,KAAK,UAAU,IAAK,IAAmB,CAAC,aAAa,EAAE,CAAC;AAC7H,CAAC;AAWD;;;;GAIG;AACH,gBAAgB;AAChB,MAAM,UAAU,cAAc,CAAC,MAAkB,EAAE,KAAoB,EAAE,IAAY;IACjF,MAAM,UAAU,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC9C,IAAI,CAAC,UAAU;QAAE,OAAO,EAAE,CAAC;IAE3B,MAAM,GAAG,GAAsC,EAAE,CAAC;IAClD,KAAK,MAAM,KAAK,IAAI,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;QAC1C,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAClD,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CAAC;QACpE,KAAK,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI;QAC5B,MAAM,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI;QAC7B,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,QAAQ;QAC5B,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK;QACtB,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO;QAC1B;;;WAGG;QACH,MAAM,EAAE,IAAI,CAAC,MAAM;KACtB,CAAC;AACN,CAAC","sourcesContent":["import { Node } from \"@/components/trees/node/node\";\nimport { Node3D, parentSpaceOf } from \"@/components/trees/three/node3d\";\nimport type { Node2D } from \"@/components/trees/2d/node2d\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport { applyToPoint, invert, type Matrix2D } from \"@/attributes/layout/matrix2d\";\nimport { resolveCameraPlacement, type CameraData3D } from \"@/render3d/camera\";\nimport type { Scene3D, Scene3DOp } from \"@/render3d/scene3d\";\nimport type { Transform3D } from \"@/render3d/transform\";\nimport {\n geometryBounds3D, transformBox3, unionBox3, centeredBox3, corners3, type Box3,\n} from \"@/render3d/bounds3d\";\nimport {\n applyMatrix4, identity4, invert4, lookAtRotation4, multiply4, orthographic4,\n perspective4, transformMatrix4, translation4, type Matrix4,\n} from \"@/render3d/matrix4\";\nimport type { Vector3 } from \"@/render3d/vector3\";\nimport { nodePath } from \"@/project/tree\";\nimport type { NodeBox } from \"./node-picking\";\n\n/**\n * Where a `Node3D`'s pixels landed: the 3D half of `node-picking.ts`.\n *\n * The answer is a 2D box: the screen-space AABB of the node's projected world-space AABB, in the `Canvas3D`'s\n * own plane. It composes with everything the 2D side does (the canvas's rotation, its ancestors', a camera\n * scope above it) by being mapped through the canvas's `renderMatrix` as {@link nodeBox} maps a corner.\n *\n * Bounds come from the recorded {@link Scene3D} (the seam render and the asset pass both build, which measures\n * a custom `renderSelf` for free); paths come from the tree, because a path is a child index and ops carry\n * none. The two meet on `Node3D.id`, which the scene records as the `key` on every `push`.\n *\n * Nothing here imports `node-picking.ts` at runtime: the canvas's box and CTM arrive as a {@link\n * Canvas3DFrame}, so the dependency runs one way (the `NodeBox` import is type-only).\n *\n * A box is not clipped to the viewport: a mesh drifted off the canvas reports where it went, though no pixels\n * are drawn. {@link pickIn} only consults this file for a point already inside the rect. Every entry point\n * records the scene afresh, so a host calling {@link collectBoxes} on every pointer move over many viewports\n * pays one scene build per viewport per move.\n */\n\n/** @internal */\n/** A 2D node over a 3D scene (a `Canvas3D`): its 3D children are picked through the scene it builds. */\nexport interface Viewport3D extends Node2D {\n _isViewport3D(): boolean;\n _scene3D(): Scene3D | null;\n}\n\nexport function isViewport3D(node: unknown): node is Viewport3D {\n return typeof (node as Partial<Viewport3D> | null)?._isViewport3D === \"function\" && (node as Viewport3D)._isViewport3D();\n}\n\nexport interface Canvas3DFrame {\n /**\n * Its folded `rotation`/`scale`/`opacity` carry to every 3D node inside it: a mesh has none of its own, and\n * cursor angles and pixels-per-unit are questions about the plane the box is drawn in.\n */\n box: NodeBox;\n matrix: Matrix2D;\n}\n\n/**\n * Ordered by depth, not draw order (the one divergence from {@link collectBoxes}): a 3D scene has no draw\n * order to speak of, so \"topmost\" means \"nearest\". Empty when the scene has no camera that resolves, the\n * canvas has no size, or nothing can be measured (see {@link geometryBounds3D}).\n */\n/** @internal */\nexport function collectBoxes3D(canvas: Viewport3D, frame: Canvas3DFrame, path: string): NodeBox[] {\n const projection = canvas3DProjection(canvas);\n if (!projection) return [];\n\n const out: { box: NodeBox; depth: number }[] = [];\n for (const entry of nodes3DOf(canvas, path)) {\n const world = projection.boxes.get(entry.node.id);\n if (!world) continue;\n const projected = projectBox3(world, projection);\n if (!projected) continue;\n out.push({\n box: toNodeBox(entry.node, entry.path, projected.rect, frame),\n depth: projected.depth,\n });\n }\n /**\n * View space looks down -Z, so a nearer node has the larger (less negative) z: descending puts the front\n * first.\n */\n out.sort((a, b) => b.depth - a.depth);\n return out.map((entry) => entry.box);\n}\n\n/**\n * Where arbitrary points around one `Node3D` land on screen, for a gizmo. All points come back in the same\n * viewport space as {@link NodeBox}. A `null` entry is behind the camera (the per-point version of {@link\n * projectBox3}'s eye-plane guard).\n *\n * Not `@internal`, unlike {@link projectNode3D}: a host gets this back from\n * `projectNode3DAt`/`PlaybackController.projectNode3D`.\n */\nexport interface Node3DFrame {\n origin: Vector2 | null;\n /**\n * `parentPoints` transformed by the node's parent's world matrix then projected: the frame\n * `Node3DProps.position` is expressed in, so a move or scale handle belongs here and `{ ...position, x:\n * position.x + 1 }` projects to where nudging `x` by one unit lands.\n */\n parentPoints: (Vector2 | null)[];\n /**\n * `localPoints` transformed by the node's own world matrix then projected, for geometry tracking its current\n * orientation (a rotation ring).\n */\n localPoints: (Vector2 | null)[];\n /**\n * What the node and its children draw, as a box in the node's own frame (the one `localPoints` are in), so a\n * selection box projected through `localPoints` hugs the mesh at any orientation. `null` when nothing it draws\n * has an extent core can measure (a light; a model, whose file core never reads) or it is hidden.\n */\n bounds: Box3 | null;\n}\n\nconst ORIGIN_3D: Vector3 = { x: 0, y: 0, z: 0 };\n\n/**\n * `null` when the canvas has no projection (see {@link canvas3DProjection}) or the path does not resolve.\n * `canvasPath` is the same root {@link collectBoxes3D} and {@link pickNode3D} are handed.\n */\n/** @internal */\nexport function projectNode3D(\n canvas: Viewport3D,\n frame: Canvas3DFrame,\n canvasPath: string,\n targetPath: string,\n parentPoints: readonly Vector3[],\n localPoints: readonly Vector3[],\n): Node3DFrame | null {\n const entry = nodes3DOf(canvas, canvasPath).find((e) => e.path === targetPath);\n if (!entry) return null;\n\n const projection = canvas3DProjection(canvas, entry.node.id);\n if (!projection) return null;\n\n const own = projection.matrices.get(entry.node.id);\n const parent = projection.parentMatrices.get(entry.node.id);\n if (!own || !parent) return null;\n\n const project = (matrix: Matrix4, points: readonly Vector3[]): (Vector2 | null)[] =>\n points.map((point) => projectPoint3(matrix, point, projection, frame));\n\n // A parent with coordinates of its own places the node by them, so that is the frame its position is in.\n const space = parentSpaceOf(entry.node);\n const placed = space ? parentPoints.map((point) => space.toLocal(point.x, point.y, point.z)) : parentPoints;\n\n return {\n origin: projectPoint3(own, ORIGIN_3D, projection, frame),\n parentPoints: project(parent, placed),\n localPoints: project(own, localPoints),\n bounds: projection.localBounds,\n };\n}\n\n/**\n * `null` when it lands behind the camera. The single-point sibling of {@link projectBox3}: no edges to clip.\n */\nfunction projectPoint3(\n matrix: Matrix4,\n point: Vector3,\n projection: Canvas3DProjection,\n frame: Canvas3DFrame,\n): Vector2 | null {\n const world = applyMatrix4(matrix, point);\n const clip = applyMatrix4(projection.clip, { x: world.x, y: world.y, z: world.z });\n if (clip.w <= MIN_CLIP_W) return null;\n\n const ndcX = clip.x / clip.w;\n const ndcY = clip.y / clip.w;\n const rectX = projection.centerX + ndcX * (projection.width / 2);\n const rectY = projection.centerY + ndcY * (projection.height / 2);\n\n const p = applyToPoint(frame.matrix, { x: rectX, y: -rectY });\n return { x: p.x, y: -p.y };\n}\n\n/**\n * The box, not the mesh. `tolerance` is grab-slop in scene units, applied in the canvas's own plane so it\n * stays a constant on-screen distance.\n */\n/** @internal */\nexport function pickNode3D(\n canvas: Viewport3D,\n frame: Canvas3DFrame,\n point: Vector2,\n tolerance: number,\n path: string,\n): NodeBox | null {\n const projection = canvas3DProjection(canvas);\n if (!projection) return null;\n\n /**\n * Into the canvas's own plane, undoing everything above it in one step: the inverse `containsPoint` takes,\n * with the same y-flips.\n */\n const inverse = invert(frame.matrix);\n if (!inverse) return null;\n const mapped = applyToPoint(inverse, { x: point.x, y: -point.y });\n const local = { x: mapped.x, y: -mapped.y };\n\n let best: { node: Node3D; path: string; rect: Rect2D } | null = null;\n let bestDepth = -Infinity;\n for (const entry of nodes3DOf(canvas, path)) {\n const world = projection.boxes.get(entry.node.id);\n if (!world) continue;\n const projected = projectBox3(world, projection);\n if (!projected) continue;\n if (!rectContains(projected.rect, local, tolerance)) continue;\n if (projected.depth <= bestDepth) continue;\n bestDepth = projected.depth;\n best = { node: entry.node, path: entry.path, rect: projected.rect };\n }\n return best ? toNodeBox(best.node, best.path, best.rect, frame) : null;\n}\n\ninterface Node3DEntry {\n node: Node3D;\n path: string;\n}\n\n/**\n * Indexed against {@link Node._allChildren} rather than `children`, so a mesh and a HUD label under one\n * viewport are numbered the way the author wrote them.\n */\nfunction nodes3DOf(canvas: Viewport3D, path: string): Node3DEntry[] {\n const out: Node3DEntry[] = [];\n walk3D(canvas._allChildren, path, out);\n return out;\n}\n\nfunction walk3D(children: readonly Node[], parentPath: string, out: Node3DEntry[]): void {\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (!(child instanceof Node3D)) continue;\n const path = nodePath(parentPath, i);\n out.push({ node: child, path });\n walk3D(child._allChildren, path, out);\n }\n}\n\ninterface Canvas3DProjection {\n boxes: Map<string, Box3>;\n matrices: Map<string, Matrix4>;\n parentMatrices: Map<string, Matrix4>;\n clip: Matrix4;\n view: Matrix4;\n width: number;\n height: number;\n centerX: number;\n centerY: number;\n /** The `boundsKey` node's extent in its own frame, when one was asked for. */\n localBounds: Box3 | null;\n}\n\nfunction canvas3DProjection(canvas: Viewport3D, boundsKey?: string): Canvas3DProjection | null {\n const bounds = canvas._localBounds();\n if (!(bounds.width > 0) || !(bounds.height > 0)) return null;\n\n const scene = canvas._scene3D();\n if (!scene) return null;\n const walked = walkScene3D(scene, boundsKey);\n if (walked.boxes.size === 0) return null;\n\n const view = invert4(walked.camera);\n if (!view) return null;\n\n const aspect = bounds.width / bounds.height;\n return {\n boxes: walked.boxes,\n matrices: walked.matrices,\n parentMatrices: walked.parentMatrices,\n clip: multiply4(projectionMatrix(walked.descriptor, aspect), view),\n view,\n width: bounds.width,\n height: bounds.height,\n centerX: bounds.x,\n centerY: bounds.y,\n localBounds: walked.localBounds,\n };\n}\n\ninterface Scope3D {\n key: string | undefined;\n matrix: Matrix4;\n visible: boolean;\n box: Box3 | null;\n}\n\ninterface WalkedScene3D {\n boxes: Map<string, Box3>;\n /** Captured at `push`, unlike `boxes`, which needs children merged in at `pop`. */\n matrices: Map<string, Matrix4>;\n parentMatrices: Map<string, Matrix4>;\n camera: Matrix4;\n descriptor: CameraData3D | null;\n localBounds: Box3 | null;\n}\n\n/**\n * A node's box is the union of everything it drew and its children drew, so a `Group3D` that draws nothing is\n * still selectable as what it contains. An invisible scope contributes nothing: `visible: false` is skipped by\n * the renderer, and letting it inflate its parent's box would put that box round empty space. The 2D walk\n * skips `opacity: 0` on the same grounds.\n */\nfunction walkScene3D(scene: Scene3D, boundsKey?: string): WalkedScene3D {\n const boxes = new Map<string, Box3>();\n const matrices = new Map<string, Matrix4>();\n const parentMatrices = new Map<string, Matrix4>();\n const root: Scope3D = { key: undefined, matrix: identity4(), visible: true, box: null };\n const stack: Scope3D[] = [root];\n let camera: Matrix4 | null = null;\n let descriptor: CameraData3D | null = null;\n /** Where the `boundsKey` scope sits on the stack while it is open, and the way back into its own frame. */\n let target: { depth: number; inverse: Matrix4 } | null = null;\n let localBounds: Box3 | null = null;\n\n const top = (): Scope3D => stack[stack.length - 1];\n\n for (const op of scene.ops()) {\n const scope = top();\n switch (op.kind) {\n case \"push\": {\n const matrix = scopeMatrix(scope.matrix, op.transform);\n if (op.transform?.key !== undefined) {\n matrices.set(op.transform.key, matrix);\n parentMatrices.set(op.transform.key, scope.matrix);\n if (op.transform.key === boundsKey) {\n const inverse = invert4(matrix);\n if (inverse) target = { depth: stack.length, inverse };\n }\n }\n stack.push({\n key: op.transform?.key,\n matrix,\n visible: scope.visible && op.transform?.visible !== false,\n box: null,\n });\n break;\n }\n case \"pop\": {\n /**\n * The root frame is never popped: `Node3D.render` brackets its own begin/end and `Scene3D.assertBalanced`\n * catches a hand-built scene that does not. Guarding keeps a malformed op list from reading past the stack.\n */\n if (stack.length === 1) break;\n if (target?.depth === stack.length - 1) target = null;\n const closed = stack.pop() as Scope3D;\n if (!closed.visible || !closed.box) break;\n if (closed.key !== undefined) boxes.set(closed.key, closed.box);\n const parent = top();\n parent.box = unionBox3(parent.box, closed.box);\n break;\n }\n case \"camera\": {\n descriptor = op.camera;\n camera = cameraMatrix4(op.camera, scope.matrix);\n break;\n }\n case \"light\":\n /** A light has no extent, so a node that is only a light gets no box and cannot be picked. */\n break;\n default: {\n if (!scope.visible) break;\n const drawn = drawableBox3(op, scope.matrix);\n if (drawn) scope.box = unionBox3(scope.box, drawn);\n if (target) localBounds = unionBox3(localBounds, drawableBox3(op, scope.matrix, target.inverse));\n break;\n }\n }\n }\n\n return {\n boxes,\n matrices,\n parentMatrices,\n camera: camera ?? DEFAULT_CAMERA_MATRIX,\n descriptor,\n localBounds,\n };\n}\n\nfunction scopeMatrix(parent: Matrix4, transform: Transform3D | undefined): Matrix4 {\n return multiply4(parent, transformMatrix4(transform, parent));\n}\n\n/** In world space, or in the frame `into` maps world space to. */\nfunction drawableBox3(op: Scene3DOp, parent: Matrix4, into?: Matrix4): Box3 | null {\n if (op.kind === \"model\") return null; // its extent arrives with the file\n if (!(\"transform\" in op)) return null;\n\n const world = scopeMatrix(parent, op.transform);\n const matrix = into ? multiply4(into, world) : world;\n\n if (op.kind === \"sprite\") {\n /**\n * Three's `Sprite` has no geometry to ask: the one place the extent is assumed rather than read (a\n * camera-facing unit quad scaled by its transform).\n */\n return transformBox3(centeredBox3(0.5, 0.5, 0), matrix);\n }\n\n if (!(\"geometry\" in op)) return null;\n const local = geometryBounds3D(op.geometry);\n if (!local) return null;\n\n if (op.kind === \"instances\") {\n /**\n * Every instance is placed inside the op's own transform, so the union is taken in that space and mapped out\n * once.\n */\n let box: Box3 | null = null;\n for (const instance of op.instances) {\n box = unionBox3(box, transformBox3(local, transformMatrix4(instance, null)));\n }\n return box ? transformBox3(box, matrix) : null;\n }\n\n return transformBox3(local, matrix);\n}\n\n/**\n * `lookAt` takes the camera branch of three's `Object3D.lookAt` (-Z at the target, where every other node aims\n * +Z), resolved against the camera's world position so a camera in an animated rig points where the author\n * said. See {@link lookAtRotation4}.\n *\n * The polar placement (`target`/`orbit`/`elevation`/`distance`) comes from {@link resolveCameraPlacement}, the\n * same call the renderer makes: two derivations of \"where is the camera\" could disagree, and a gizmo drawn\n * against a camera nobody renders is worse than none.\n */\nfunction cameraMatrix4(descriptor: CameraData3D, parent: Matrix4): Matrix4 {\n const placement = resolveCameraPlacement(descriptor);\n\n if (placement.lookAt === undefined) {\n return multiply4(parent, transformMatrix4({ ...descriptor, position: placement.position }, parent));\n }\n const placed = applyMatrix4(parent, placement.position);\n const origin: Vector3 = { x: placed.x, y: placed.y, z: placed.z };\n return multiply4(translation4(origin), lookAtRotation4(origin, placement.lookAt));\n}\n\n/**\n * Pulled back along +Z, aimed at the origin. Mirrors `applyCamera`'s fallback, which makes a bare `g.box()`\n * render, and so pickable.\n */\nconst DEFAULT_CAMERA_MATRIX: Matrix4 = multiply4(\n translation4({ x: 0, y: 0, z: 5 }),\n lookAtRotation4({ x: 0, y: 0, z: 5 }, { x: 0, y: 0, z: 0 }),\n);\n\nconst DEFAULT_FOV = 50;\nconst DEFAULT_NEAR = 0.1;\nconst DEFAULT_FAR = 1000;\n\nfunction projectionMatrix(descriptor: CameraData3D | null, aspect: number): Matrix4 {\n if (descriptor === null) {\n return perspective4(DEFAULT_FOV, aspect, DEFAULT_NEAR, DEFAULT_FAR, 1);\n }\n if (descriptor.type === \"perspective\") {\n return perspective4(\n descriptor.fov ?? DEFAULT_FOV,\n /**\n * Always the node's own aspect: overriding it stretched the render, so a gizmo could only be wrong by\n * agreeing with one.\n */\n aspect,\n descriptor.near ?? DEFAULT_NEAR,\n descriptor.far ?? DEFAULT_FAR,\n descriptor.zoom ?? 1,\n );\n }\n /**\n * `frustumHeight` sets the visible world height and the width follows the node's aspect. The same rule as\n * `applyCamera`, restated because that one lives in the renderer, which core cannot import.\n */\n const halfHeight = (descriptor.frustumHeight ?? 10) / 2;\n return orthographic4(\n -halfHeight * aspect,\n halfHeight * aspect,\n halfHeight,\n -halfHeight,\n descriptor.near ?? DEFAULT_NEAR,\n descriptor.far ?? DEFAULT_FAR,\n descriptor.zoom ?? 1,\n );\n}\n\ninterface Rect2D {\n minX: number;\n minY: number;\n maxX: number;\n maxY: number;\n}\n\nconst BOX_EDGES: readonly (readonly [number, number])[] = [\n [0, 1], [2, 3], [4, 5], [6, 7],\n [0, 2], [1, 3], [4, 6], [5, 7],\n [0, 4], [1, 5], [2, 6], [3, 7],\n];\n\n/** A point at `w = 0` is on the plane through the eye and projects to infinity. */\nconst MIN_CLIP_W = 1e-4;\n\n/**\n * How far outside the canvas a projected box may reach, as a multiple of the canvas's size. A box straddling\n * the eye plane genuinely extends to the horizon, which is a useless answer for an overlay (a rectangle a\n * million pixels wide). Clamping keeps it pointing the right way, and is only reached when the box is already\n * unusable as a target.\n */\nconst OFFSCREEN_LIMIT = 8;\n\n/**\n * The world box projected into the canvas's plane, plus its view-space depth. Edges are clipped rather than\n * corners clamped: a corner behind the eye projects reflected through the origin, so bounding the raw eight\n * would put the box on the wrong side. Entirely-behind boxes keep no edges, which is how a node behind the\n * camera stops being selectable.\n */\nfunction projectBox3(\n world: Box3,\n projection: Canvas3DProjection,\n): { rect: Rect2D; depth: number } | null {\n const corners = corners3(world);\n const clip = corners.map((corner) => applyMatrix4(projection.clip, corner));\n\n let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;\n let any = false;\n\n const include = (x: number, y: number, w: number) => {\n const ndcX = x / w;\n const ndcY = y / w;\n if (ndcX < minX) minX = ndcX;\n if (ndcY < minY) minY = ndcY;\n if (ndcX > maxX) maxX = ndcX;\n if (ndcY > maxY) maxY = ndcY;\n any = true;\n };\n\n for (const [a, b] of BOX_EDGES) {\n const p = clip[a];\n const q = clip[b];\n const pIn = p.w > MIN_CLIP_W;\n const qIn = q.w > MIN_CLIP_W;\n if (!pIn && !qIn) continue;\n if (pIn) include(p.x, p.y, p.w);\n if (qIn) include(q.x, q.y, q.w);\n if (pIn === qIn) continue;\n // Exactly one end is in front: cut the edge where `w` reaches the plane.\n const t = (MIN_CLIP_W - p.w) / (q.w - p.w);\n include(p.x + (q.x - p.x) * t, p.y + (q.y - p.y) * t, MIN_CLIP_W);\n }\n\n if (!any) return null;\n\n const halfWidth = projection.width / 2;\n const halfHeight = projection.height / 2;\n const limitX = halfWidth * OFFSCREEN_LIMIT;\n const limitY = halfHeight * OFFSCREEN_LIMIT;\n\n const rect: Rect2D = {\n minX: clamp(projection.centerX + minX * halfWidth, projection.centerX - limitX, projection.centerX + limitX),\n maxX: clamp(projection.centerX + maxX * halfWidth, projection.centerX - limitX, projection.centerX + limitX),\n minY: clamp(projection.centerY + minY * halfHeight, projection.centerY - limitY, projection.centerY + limitY),\n maxY: clamp(projection.centerY + maxY * halfHeight, projection.centerY - limitY, projection.centerY + limitY),\n };\n\n /**\n * Depth is taken at the box centre in view space (camera looks down -Z, so nearer is larger). One point rather\n * than eight: this orders \"which of two overlapping nodes did you mean\".\n */\n const centre: Vector3 = {\n x: (world.min.x + world.max.x) / 2,\n y: (world.min.y + world.max.y) / 2,\n z: (world.min.z + world.max.z) / 2,\n };\n const viewed = applyMatrix4(projection.view, centre);\n\n return { rect, depth: viewed.z };\n}\n\nfunction clamp(value: number, low: number, high: number): number {\n return value < low ? low : value > high ? high : value;\n}\n\nfunction rectContains(rect: Rect2D, point: Vector2, slop: number): boolean {\n return point.x >= rect.minX - slop\n && point.x <= rect.maxX + slop\n && point.y >= rect.minY - slop\n && point.y <= rect.maxY + slop;\n}\n\n/**\n * The corner mapping is {@link worldAnchors}': y flipped in and back out, since the CTM is canvas y-down and\n * everything around it y-up. Done here rather than via `worldAnchors` so the rect keeps its own centre: it is\n * axis-aligned in the canvas's plane but not centred on its origin.\n *\n * `rotation`, `scale` and `opacity` are the canvas's: a mesh's own mean nothing in two dimensions, and a host\n * reads these for the plane the box was drawn in.\n */\nfunction toNodeBox(node: Node3D, path: string, rect: Rect2D, frame: Canvas3DFrame): NodeBox {\n const at = (x: number, y: number): Vector2 => {\n const p = applyToPoint(frame.matrix, { x, y: -y });\n return { x: p.x, y: -p.y };\n };\n return {\n id: node.id,\n path,\n type: node.className,\n topLeft: at(rect.minX, rect.maxY),\n topRight: at(rect.maxX, rect.maxY),\n bottomRight: at(rect.maxX, rect.minY),\n bottomLeft: at(rect.minX, rect.minY),\n center: at((rect.minX + rect.maxX) / 2, (rect.minY + rect.maxY) / 2),\n width: rect.maxX - rect.minX,\n height: rect.maxY - rect.minY,\n rotation: frame.box.rotation,\n scale: frame.box.scale,\n opacity: frame.box.opacity,\n /**\n * A locked Canvas3D is already unpickable above, so reaching here means the viewport is free; a mesh locks on\n * its own account.\n */\n locked: node.locked,\n };\n}\n"]}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export * as TextLayout from '../components/modules/text-layout.js';
|
|
|
28
28
|
export * as Material from '../components/modules/material.js';
|
|
29
29
|
export * as View3D from '../components/modules/view3d.js';
|
|
30
30
|
export type { Attribute, EntryOptions, NumberOptions, TextOptions } from '../components/factory/types.js';
|
|
31
|
+
export type { StyleGroups, StyleInput, StyleOptions, StyleShape, StyleValues } from '../components/factory/style.js';
|
|
31
32
|
export type { Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader, Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, SoundOptions, StateSpec, Timeline, Type, Values, Writes, Merge, BuiltNode, RenderContext2D as RenderContext, CallProps3D, Placement3DProps, Transform3DState, Handle, LayoutBox, NodeFrame, RenderContext3D as SceneContext, } from '../components/factory/api.js';
|
|
32
33
|
export type { Node, Node2D } from '../components/trees/index.js';
|
|
33
34
|
export { Canvas2D, findNode2D, frameIn, } from '../components/trees/index.js';
|
package/dist/sdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAA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,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,OAAO,EACP,iBAAiB,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,YAAY,GACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACR,SAAS,GACZ,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EACR,eAAe,EACf,KAAK,GACR,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EACR,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,GACnB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACjE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpD,YAAY,EACR,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,aAAa,GAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACH,gBAAgB,EAChB,mBAAmB,EAGnB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,aAAa,EAEb,QAAQ,GACX,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,GACxB,MAAM,eAAe,CAAC;AACvB,YAAY,EACR,eAAe,EAC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UAAU,CAAC;AAElB,OAAO,EACH,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,GACZ,MAAM,SAAS,CAAC;AACjB,YAAY,EACR,SAAS,EACT,SAAS,EACT,OAAO,EACP,UAAU,EACV,eAAe,GAClB,MAAM,SAAS,CAAC;AAKjB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChG,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,OAAO,EACP,iBAAiB,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,YAAY,GACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACR,SAAS,GACZ,MAAM,YAAY,CAAC"}
|
package/dist/sdk/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,sGAAsG;AACtG,wGAAwG;AACxG,iFAAiF;AAEjF,sFAAsF;AACtF,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AAKrB,0GAA0G;AAC1G,6EAA6E;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAoBnD,OAAO,EACH,gBAAgB,EAChB,mBAAmB;AACnB,8GAA8G;AAC9G,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EACX,eAAe,EACf,eAAe,EACf,WAAW,GACd,MAAM,UAAU,CAAC;AAGlB,OAAO,EACH,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACZ,MAAM,UAAU,CAAC;AAOlB,OAAO,EACH,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,GACZ,MAAM,SAAS,CAAC;AASjB,6GAA6G;AAC7G,6GAA6G;AAC7G,yCAAyC;AACzC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGhG,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC","sourcesContent":["// The curated public surface: published as `@motionscript/sdk`, a one-line passthrough of\n// `@motionscript/core/sdk` (this file). A deliberate subset of core's root barrel (`../index.ts`): no\n// `Engine`/`Session`/platform seams, no `@internal` descriptor plumbing. Every export is named from its\n// declaring sub-barrel, never a wildcard, so nothing internal leaks by accident.\n\n// A lone still or composition is sugar for a one-track project (`asProjectDocument`).\nexport {\n isProjectDocument,\n asProjectDocument,\n documentDuration,\n commandSpan,\n hasTimeline,\n nodeSpan,\n effectiveSpan,\n untimed,\n ROOT_NODE_ID,\n} from '../document';\nexport type {\n ProjectDocument,\n Track,\n} from '../document';\n// `resolveProjectDocument`/`placeTracks` live in `../runtime` but are deep-imported from their files: the\n// runtime barrel also carries `Engine`/`Session` and is never a source here.\nexport { resolveProjectDocument } from '../runtime/session';\nexport { placeTracks } from '../runtime/placement';\nexport type { TrackSpan } from '../runtime/placement';\nexport type {\n Theme,\n ColorTokens,\n Typography,\n TypographyPreset,\n} from '../project';\nexport type { NodeTime, AttachScope } from '../components/trees';\nexport type { BoxBounds, Extents } from '../layout';\n\nexport type {\n ImageMeta,\n VideoMeta,\n AudioMeta,\n FontMeta,\n AssetMeta,\n AssetManifest,\n} from '../assets';\n\nexport {\n validateDocument,\n assertValidDocument,\n // Saved documents carry the format they were written in; these bring one forward, and a host rewriting stored\n // node rows calls `migrateNodeProps`.\n DOCUMENT_FORMAT_VERSION,\n DocumentTooNewError,\n documentFormatVersion,\n migrateDocument,\n migrateNodeProps,\n missingNodeOf,\n // Not a singleton: what a document can name is a property of the registry compiling it.\n Registry,\n} from '../document';\n// The shader-pack vocabulary lives beside the fill/shader attribute machinery, not in `../document`.\nexport {\n normalizeShaderPack,\n resolveShaderProperties,\n isKnownShaderProperty,\n} from '../attributes';\nexport type {\n RegistryOptions,\n NodeTypeMap,\n ShaderPackMap,\n NodeTypeRecord,\n NodeCommandEntry,\n VisualDocument,\n ClipDocument,\n StillDocument,\n CompositionDocument,\n AudioDocument,\n NodeSpec,\n TimedNodeSpec,\n NodeSpan,\n CommandSpec,\n EaseSpec,\n LoopSpec,\n LoopDirection,\n VariableSpec,\n ValidationIssue,\n ValidationResult,\n ValidateOptions,\n DocumentChange,\n DocumentMigrationResult,\n PropMigration,\n PropNote,\n MissingNodeInfo,\n NodeConstructor,\n CommandFactory,\n CommandTypeEntry,\n VariableCommandFactory,\n VariableLerp,\n VariableTarget,\n} from '../document';\nexport type {\n Shader,\n FillShader,\n EffectShader,\n ShaderProperty,\n KnownShaderProperty,\n ShaderPropertyValues,\n} from '../attributes';\n\n// `expressionOps` carries recognition, parsing and compiling, so a host can lint or rewrite an expression\n// without reimplementing the grammar.\nexport { expressionOps, ExpressionError } from '../document';\nexport type {\n ParsedExpression,\n ExpressionNode,\n ExpressionDialect,\n VariableResolver,\n} from '../document';\n\n// A component is one object literal; behaviour is spread in from modules (`...Paint.state`) and their helpers\n// called (`Paint.draw`). See `packages/core/docs/why.md#node-types-are-factory-specs-not-decorated-classes`.\nexport { component2d } from '../components/factory/component2d';\nexport { componentAudio } from '../components/factory/component-audio';\nexport { component3d } from '../components/factory/component3d';\nexport { commandsFor } from '../components/factory/commands-for';\nexport { Types } from '../components/factory/types';\nexport { provides } from '../components/factory/api';\nexport * as Paint from '../components/modules/paint';\nexport * as Flow from '../components/modules/flow';\nexport * as Shapes from '../components/modules/shapes';\nexport * as Aim from '../components/modules/aim';\n// The face text is set in: its entries inherit from the nearest provider.\nexport * as Typeface from '../components/modules/text-style';\nexport * as TextLayout from '../components/modules/text-layout';\n// A mesh's surface: the material entries, and the mesh drawn with them.\nexport * as Material from '../components/modules/material';\n// A viewport onto 3D children: the default camera and lights, the grid, the render settings.\nexport * as View3D from '../components/modules/view3d';\nexport type { Attribute, EntryOptions, NumberOptions, TextOptions } from '../components/factory/types';\nexport type {\n Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader,\n Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, SoundOptions, StateSpec,\n Timeline, Type, Values, Writes,\n // Named in every component's type, so a package exporting one can declare it.\n Merge, BuiltNode,\n // What `render` is handed; `RenderContext2D` is the renderer's.\n RenderContext2D as RenderContext,\n CallProps3D, Placement3DProps, Transform3DState, Handle, LayoutBox, NodeFrame,\n // What a 3D `render` is handed; `RenderContext3D` is the renderer's.\n RenderContext3D as SceneContext,\n} from '../components/factory/api';\n\n// Types only: a node type is a component, never a subclass.\nexport type { Node, Node2D } from '../components/trees';\nexport {\n // A clip's root container: layout frame, background paint and camera in\n // one node. Every track builds into one sized to the viewport.\n Canvas2D,\n // Reaching another node by the id a `nodeRef` prop holds, and reading where it sits.\n findNode2D,\n frameIn,\n} from '../components/trees';\nexport { Provider, ThemeProvider } from '../components/builtins/providers/providers';\nexport type {\n NodeProps,\n Node2DProps,\n // A slot a layout puts each child in beyond its box — see `Node2D._placementOf`.\n ChildPlacement,\n // A parent's own coordinates for its children's `x`/`y` — see `Node2D._planeOf`.\n ChildPlane,\n // A point an editor can drag to set a `Vector2` prop — see `Node2D._handles`.\n NodeHandle,\n Canvas2DProps,\n NodeConfig,\n NodeChildren,\n NodeDimension,\n} from '../components/trees';\nexport type { ProviderProps, ThemeProviderProps } from '../components/builtins/providers/providers';\n\nexport {\n Rect,\n Ellipse,\n Path,\n // The document's `\"path\"`: its `data` is in the unit space of its own box,\n // where `Path` draws its `d` at face value.\n PathShape,\n Polygon,\n Polygram,\n Triangle,\n RightTriangle,\n Pentagon,\n Hexagon,\n Octagon,\n Star,\n} from '../components/builtins/geometry/geometry';\nexport { BooleanGroup, MaskGroup } from '../components/builtins/geometry/composite';\nexport type {\n PaintProps,\n ShapeProps,\n RectProps,\n FlexSize,\n EllipseProps,\n PathProps,\n PathShapeProps,\n PolygonProps,\n PolygramProps,\n} from '../components/builtins/geometry/geometry';\nexport type { BooleanGroupProps, MaskGroupProps } from '../components/builtins/geometry/composite';\n// The operation/mode vocabularies behind `Boolean`/`Mask` are attribute types,\n// not node-prop types.\nexport type {\n BooleanOperation,\n MaskMode,\n MaskOptions,\n} from '../attributes';\n\nexport {\n Camera,\n // The stage's 2.5D camera for one subtree: its children orbited in depth.\n OrbitCamera,\n RotatedBox,\n} from '../components/builtins/layout/layout';\nexport type {\n CameraProps,\n OrbitCameraProps,\n} from '../components/builtins/layout/layout';\n\nexport { Text, RichText, NumberNode, DefaultTextStyle } from '../components/builtins/text/text';\nexport type {\n TextProps,\n RichTextProps,\n NumberProps,\n NumberFormat,\n DefaultTextStyleProps,\n} from '../components/builtins/text/text';\nexport { textOps } from '../attributes';\nexport type {\n TextStyle,\n TextAlign,\n VerticalAlign,\n TextDecoration,\n TextCase,\n TextSpan,\n TextRun,\n FontStyle,\n} from '../attributes';\n\nexport { Video } from '../components/builtins/media/media';\nexport type {\n VideoProps,\n VideoSegment,\n} from '../components/builtins/media/media';\n\n// Levels are `Param`, so a fade is a ramp or transition rather than a `to()`: sound is scheduled once, ahead\n// of time.\nexport type { NodeAudio } from '../components/trees';\nexport { AudioBus, SoundNode } from '../components/builtins/audio/audio';\nexport {\n Sound,\n AudioEffects,\n ramp,\n hold,\n isRamp,\n} from '../attributes';\nexport type {\n NodeAudioProps,\n} from '../components/trees';\nexport type { AudioBusProps, SoundNodeProps } from '../components/builtins/audio/audio';\nexport type {\n SoundProps,\n AudioRequest,\n AudioBusStop,\n AudioEffect,\n AudioEffectsInput,\n AudioTransition,\n Param,\n Ramp,\n RampKey,\n} from '../attributes';\n\n// One 3D node; everything inside it is described with `Graphics3D`. `Surface2D` is the 2D to 3D bridge: a\n// child of `Canvas3D` whose 2D content is rasterized offscreen and bound to a material by `Tex.surface(name)`.\nexport { Canvas3D } from '../components/builtins/three/canvas3d';\nexport type { Node3D } from '../components/trees';\n// The 3D scene graph: components, each placed by its transform.\nexport {\n Group3D,\n Mesh3D,\n Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D,\n Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D,\n Instances3D, Points3D, Line3D, Sprite3D, Model3D,\n AmbientLight3D, HemisphereLight3D, DirectionalLight3D,\n PointLight3D, SpotLight3D, AreaLight3D,\n Camera3D,\n Fog3D, Environment3D,\n} from '../components/builtins/three/three';\nexport {\n Graphics3D,\n Scene3D,\n RenderContext3D,\n Geo,\n Mat,\n Tex,\n lerpVector3,\n lerpEuler3,\n slerpQuaternion,\n quaternionFromEuler,\n normalizeQuaternion,\n resolveVector3,\n evaluateParametric,\n evaluateRoundedBox,\n resolveSurfaceSource,\n resolveFill3D,\n segmentsOf,\n resolveCameraPlacement,\n resolveShadows3D,\n shadowCasts,\n shadowReceives,\n} from '../render3d';\nexport type { Canvas3DProps } from '../components/builtins/three/canvas3d';\nexport type {\n // A 3D parent's own coordinates for its children's position: see `Node3D._spaceOf`.\n ChildSpace3D,\n Node3DProps,\n} from '../components/trees';\nexport type {\n Group3DProps, Mesh3DProps, Material3DProps,\n Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps,\n Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps,\n Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps,\n Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps,\n AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps,\n PointLight3DProps, SpotLight3DProps, AreaLight3DProps,\n Camera3DProps,\n Fog3DProps, Environment3DProps,\n} from '../components/builtins/three/three';\nexport type {\n Node3DRenderState,\n Graphics3DOp,\n Scene3DOp,\n Vector3,\n Vector3Input,\n Euler3,\n EulerOrder,\n Quaternion,\n Transform3D,\n Shadow3D,\n ShadowOptions3D,\n Faces3D,\n Blend3D,\n Shading3D,\n Segments3D,\n Sweep3D,\n Bevel3D,\n Fill3D,\n Geometry3D,\n BufferGeometry3D,\n Material3D,\n MaterialCommon3D,\n MeshShorthand3D,\n // What `Mesh3D.materialShorthand()` returns: a mesh node of your own overrides it.\n MaterialShorthand3D,\n Uniform3D,\n Texture3D,\n TextureOptions3D,\n SurfaceTexture3D,\n SurfaceSource3D,\n ResolvedSurfaceSource,\n LightData3D,\n CameraData3D,\n FogData3D,\n EnvironmentData3D,\n Shadows3D,\n ShadowSettings3D,\n ToneMapping3D,\n ToneSettings3D,\n PostEffect3D,\n LineMode3D,\n LineStroke3D,\n ModelAnimation3D,\n} from '../render3d';\n\nexport {\n Graphics2D,\n PathBuilder,\n Clip,\n toPathString,\n} from '../render';\nexport type {\n RenderContext2D,\n RenderPass2D,\n MeasureContext2D,\n TextBlockSource,\n // One recorded entry of `Graphics2D.ops()`.\n GraphicsOp,\n PathData,\n PathCommand,\n PathBounds,\n EllipseArc,\n} from '../render';\n// What a node's `declareAssets` declares into, and the async load a `loader` takes.\nexport type { AssetScope, LoaderFn } from '../assets';\n\nexport {\n Fills,\n parseColor,\n resolveFill,\n fillOps,\n colorOps,\n} from '../attributes';\nexport type {\n Fill,\n FillChain,\n FillOptions,\n VideoFillOptions,\n // Placement of an image/video source inside the shape it paints:\n // `crop` -> `fit` -> `zoom` -> `anchor`, plus the raw-matrix escape hatch.\n MediaPlacementOptions,\n ImageFit,\n ImageCrop,\n ImageMatrix,\n FillResolved,\n // A custom WGSL shader as a fill. Uniforms are keyed by their declared\n // name, and a `ShaderTexture` is an image it samples.\n ShaderFillProp,\n ShaderFillResolved,\n ShaderTexture,\n ShaderUniformRecord,\n FractalNoiseBasis,\n // The colour type every fill, stroke, shadow and 3D material accepts —\n // a CSS string (incl. `oklch()`, theme tokens, `\"white/10\"`) or a\n // pre-normalized RGBA tuple.\n Color,\n NormalizedColor,\n BlendMode,\n FillSpace,\n} from '../attributes';\n\nexport {\n resolveStroke,\n strokeOps,\n resolveShadow,\n shadowOps,\n resolveCorners,\n cornerRadiusOps,\n cornerStyleOps,\n // Parsing, measuring, sampling, trimming and morphing a path, and the\n // anchor model (`VectorPath`) a pen tool edits.\n pathOps,\n} from '../attributes';\nexport type {\n PathSampler,\n PathAnchor,\n PathSubpath,\n VectorPath,\n Stroke,\n StrokeProp,\n StrokeAlign,\n StrokeCap,\n StrokeMarker,\n StrokeEnd,\n StrokeJoin,\n StrokeResolved,\n Shadow,\n ShadowProp,\n ShadowResolved,\n Corners,\n CornerStyle,\n CornerStyleResolved,\n CornerRadiusResolved,\n // What a rect's `cornerRadius` and `cornerStyle` take, before they resolve.\n RectCornerRadius,\n RectCornerStyle,\n NodeEffect,\n} from '../attributes';\n\n// `flowOps` is the layout a container runs on its children, as plain data in and boxes out, so a custom node\n// can lay out what it draws the same way.\nexport {\n lerpVector2,\n sizeInputOps,\n insetsOps,\n alignmentOps,\n} from '../attributes';\n// `flowOps` itself is the layout package's, not the attribute layer's —\n// `../attributes`'s own `./layout` only carries Vector2/Size2D/Insets/Alignment.\nexport { flowOps } from '../layout';\nexport type {\n Vector2,\n Size2D,\n Insets,\n // What a `padding`-style prop accepts, before `insetsOps` resolves it.\n InsetsProps,\n InsetsResolved,\n AlignmentKey,\n Alignment,\n} from '../attributes';\nexport type {\n FlowMode,\n GapSize,\n FlowResolved,\n FlowProps,\n FlowSettings,\n LayoutItem,\n FlowSpace,\n FlowMeasure,\n FlowLine,\n // What an overriding `measure(constraints, scope)` is handed.\n SizeConstraints,\n} from '../layout';\n\n// `space3dOps` is the camera's own projection, for a host drawing over the picture rather than keeping a copy.\n// `SpaceCamera` is what a node returns from `_spaceCamera()` to open a 2.5D space.\nexport { space3dOps } from '../attributes/layout/space3d';\nexport type { LookAt, SpaceCamera, SpaceCameraProps, SpacePoint } from '../attributes/layout/space3d';\n\n// `describeEffect`/`effectDescriptors` describe each built-in effect's fields as plain JSON, so a host builds\n// its effect UI from the engine.\nexport { describeEffect, effectDescriptors } from '../attributes';\nexport type {\n EffectDescriptor,\n EffectParamDescriptor,\n EffectParamKind,\n EffectParamUnit,\n EffectParamControl,\n EffectGroup,\n EffectJson,\n} from '../attributes';\nexport {\n Effects,\n EffectChain,\n Adjustments,\n VideoAdjustments,\n AdjustmentChain,\n VideoAdjustmentChain,\n} from '../attributes';\n\nexport type {\n /** The `effects` prop type — what a node actually accepts. */\n Effect,\n EffectMode,\n EffectAxis,\n EffectSurface,\n EffectOptions,\n /** What an image fill's `preset.adjustments` accepts — one, a list, or a chain. */\n ImageAdjustment,\n VideoAdjustment,\n /** The node effects that also work as a media adjustment — see {@link Adjustments}. */\n EffectAdjustment,\n MediaAdjustment,\n VideoOnlyAdjustment,\n} from '../attributes';\n\n/**\n * Per-builder options. Every effect builder takes exactly one argument: one of\n * these, or the dominant scalar it wraps.\n */\nexport type {\n BlurOptions,\n DirectionalBlurOptions,\n GrayscaleOptions,\n PixelateOptions,\n BulgeOptions,\n MagnifyOptions,\n BloomOptions,\n VintageOptions,\n ChromaticAberrationOptions,\n InvertOptions,\n ScatterOptions,\n PosterizeOptions,\n MotionBlurOptions,\n ShaderEffectOptions,\n OutlineOptions,\n VignetteOptions,\n GrainOptions,\n SharpenOptions,\n EdgesOptions,\n ThresholdOptions,\n RadialBlurOptions,\n HalftoneOptions,\n DitherOptions,\n DuotoneOptions,\n CurvesOptions,\n ColorAdjustmentOptions,\n RgbShiftOptions,\n ScanlinesOptions,\n BlockDisplaceOptions,\n BitCrushOptions,\n AsciiOptions,\n StreakOptions,\n GlowOptions,\n OilPaintOptions,\n WaveOptions,\n TwirlOptions,\n ProgressiveBlurOptions,\n KaleidoscopeOptions,\n GlassOptions,\n LutOptions,\n} from '../attributes';\n\n/**\n * Per-builder options for the filters that exist only as filters. Everything\n * else on {@link Adjustments} takes the matching effect options above, minus\n * `mode` — a filter is on the fill's own pixels, so there is no backdrop to\n * point it at.\n */\nexport type {\n BlurFilterOptions,\n GrayscaleFilterOptions,\n AlphaFilterOptions,\n ExposureFilterOptions,\n ColorMatrixFilterOptions,\n CurvesFilterOptions,\n ColorAdjustmentFilterOptions,\n PosterizeTimeFilterOptions,\n VideoEchoFilterOptions,\n} from '../attributes';\n\n/** Effect data types, for naming an effect value or building one by hand. */\nexport type {\n BlurEffect,\n DirectionalBlurEffect,\n GrayscaleEffect,\n PixelateEffect,\n BulgeEffect,\n MagnifyEffect,\n BloomEffect,\n VintageEffect,\n ChromaticAberrationEffect,\n InvertEffect,\n InvertChannel,\n ScatterEffect,\n PosterizeEffect,\n MotionBlurEffect,\n MotionBlurAlignment,\n ShaderEffect,\n ShaderUniform,\n ShaderUniformValue,\n OutlineEffect,\n OutlinePosition,\n VignetteEffect,\n GrainEffect,\n SharpenEffect,\n EdgesEffect,\n EdgeKernel,\n ThresholdEffect,\n RadialBlurEffect,\n RadialBlurStyle,\n HalftoneEffect,\n HalftoneShape,\n HalftoneSeparation,\n DitherEffect,\n DitherMatrix,\n DuotoneEffect,\n CurvesEffect,\n ColorAdjustmentEffect,\n RgbShiftEffect,\n ScanlinesEffect,\n BlockDisplaceEffect,\n BitCrushEffect,\n BitCrushPalette,\n AsciiEffect,\n AsciiCharset,\n StreakEffect,\n GlowEffect,\n GlowChannel,\n GlowLoopStyle,\n GlowOriginal,\n GlowTint,\n OilPaintEffect,\n WaveEffect,\n WaveShape,\n TwirlEffect,\n ProgressiveBlurEffect,\n ProgressiveBlurShape,\n KaleidoscopeEffect,\n GlassEffect,\n LutEffect,\n} from '../attributes';\n\nexport {\n lerpNumber,\n} from '../tween';\nexport type {\n AnimationTarget,\n Steppable,\n TweenStepper,\n LerpFunction,\n TweenOptions,\n} from '../tween';\n\n// An animation as a value: a declared duration plus `at(t)`, so a host can ask what it looks like at a time\n// instead of running it to one. A component's `commands` return one. One command shape, always: `node.to(a,\n// 1)` is a single command, not a builder; sequencing is by timeline placement.\nexport {\n getCommandMeta,\n isCommand,\n makeCommand,\n commandSequence,\n commandParallel,\n loopCommand,\n} from '../tween';\nexport type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween';\n\nexport {\n linear,\n easeIn,\n easeOut,\n easeInOut\n} from '../tween';\nexport type {\n EasingFunction,\n EaseParams,\n StandardEase\n} from '../tween';\n\nexport {\n createRef,\n clamp,\n generateList,\n createContext,\n ContextMap,\n Random,\n SeedGenerator,\n parseCSV,\n parseData,\n} from '../util';\nexport type {\n Reference,\n RefTarget,\n Context,\n DataRecord,\n ParseCSVOptions,\n} from '../util';\n\n// Pure functions over a scene's node tree, in viewport space (origin at the viewport centre, y-up); a player\n// embedding reaches the same through `useMotionPlayer`. They live in `../runtime` but are deep-imported from\n// their files, never the runtime barrel.\nexport { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement';\nexport type { PlacementIssue, PlacementOptions } from '../document/placement';\n\nexport {\n nodeBox,\n pickNode,\n collectBoxes,\n parentPlanePointAt,\n childPlanePointAt,\n reparentPlacementAt,\n nodeHandlesAt,\n handleValueAt,\n} from '../runtime/node-picking';\nexport type {\n NodeBox,\n ReparentPlacement,\n} from '../runtime/node-picking';\nexport type {\n NodeOverride,\n} from '../runtime/playback-controller';\nexport type {\n TreeState,\n} from '../project';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,sGAAsG;AACtG,wGAAwG;AACxG,iF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AAE,MAAM,8BAA8B,CAAC;AAG1D,8GAA8G;AAC9G,iCAAiC;AACjC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAUlE,OAAO,EACH,OAAO,EACP,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,oBAAoB,GACvB,MAAM,eAAe,CAAC;AAiJvB,OAAO,EACH,UAAU,GACb,MAAM,UAAU,CAAC;AASlB,4GAA4G;AAC5G,4GAA4G;AAC5G,+EAA+E;AAC/E,OAAO,EACH,cAAc,EACd,SAAS,EACT,WAAW,EACX,eAAe,EACf,eAAe,EACf,WAAW,GACd,MAAM,UAAU,CAAC;AAGlB,OAAO,EACH,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACZ,MAAM,UAAU,CAAC;AAOlB,OAAO,EACH,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,GACZ,MAAM,SAAS,CAAC;AASjB,6GAA6G;AAC7G,6GAA6G;AAC7G,yCAAyC;AACzC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGhG,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC","sourcesContent":["// The curated public surface: published as `@motionscript/sdk`, a one-line passthrough of\n// `@motionscript/core/sdk` (this file). A deliberate subset of core's root barrel (`../index.ts`): no\n// `Engine`/`Session`/platform seams, no `@internal` descriptor plumbing. Every export is named from its\n// declaring sub-barrel, never a wildcard, so nothing internal leaks by accident.\n\n// A lone still or composition is sugar for a one-track project (`asProjectDocument`).\nexport {\n isProjectDocument,\n asProjectDocument,\n documentDuration,\n commandSpan,\n hasTimeline,\n nodeSpan,\n effectiveSpan,\n untimed,\n ROOT_NODE_ID,\n} from '../document';\nexport type {\n ProjectDocument,\n Track,\n} from '../document';\n// `resolveProjectDocument`/`placeTracks` live in `../runtime` but are deep-imported from their files: the\n// runtime barrel also carries `Engine`/`Session` and is never a source here.\nexport { resolveProjectDocument } from '../runtime/session';\nexport { placeTracks } from '../runtime/placement';\nexport type { TrackSpan } from '../runtime/placement';\nexport type {\n Theme,\n ColorTokens,\n Typography,\n TypographyPreset,\n} from '../project';\nexport type { NodeTime, AttachScope } from '../components/trees';\nexport type { BoxBounds, Extents } from '../layout';\n\nexport type {\n ImageMeta,\n VideoMeta,\n AudioMeta,\n FontMeta,\n AssetMeta,\n AssetManifest,\n} from '../assets';\n\nexport {\n validateDocument,\n assertValidDocument,\n // Saved documents carry the format they were written in; these bring one forward, and a host rewriting stored\n // node rows calls `migrateNodeProps`.\n DOCUMENT_FORMAT_VERSION,\n DocumentTooNewError,\n documentFormatVersion,\n migrateDocument,\n migrateNodeProps,\n missingNodeOf,\n // Not a singleton: what a document can name is a property of the registry compiling it.\n Registry,\n} from '../document';\n// The shader-pack vocabulary lives beside the fill/shader attribute machinery, not in `../document`.\nexport {\n normalizeShaderPack,\n resolveShaderProperties,\n isKnownShaderProperty,\n} from '../attributes';\nexport type {\n RegistryOptions,\n NodeTypeMap,\n ShaderPackMap,\n NodeTypeRecord,\n NodeCommandEntry,\n VisualDocument,\n ClipDocument,\n StillDocument,\n CompositionDocument,\n AudioDocument,\n NodeSpec,\n TimedNodeSpec,\n NodeSpan,\n CommandSpec,\n EaseSpec,\n LoopSpec,\n LoopDirection,\n VariableSpec,\n ValidationIssue,\n ValidationResult,\n ValidateOptions,\n DocumentChange,\n DocumentMigrationResult,\n PropMigration,\n PropNote,\n MissingNodeInfo,\n NodeConstructor,\n CommandFactory,\n CommandTypeEntry,\n VariableCommandFactory,\n VariableLerp,\n VariableTarget,\n} from '../document';\nexport type {\n Shader,\n FillShader,\n EffectShader,\n ShaderProperty,\n KnownShaderProperty,\n ShaderPropertyValues,\n} from '../attributes';\n\n// `expressionOps` carries recognition, parsing and compiling, so a host can lint or rewrite an expression\n// without reimplementing the grammar.\nexport { expressionOps, ExpressionError } from '../document';\nexport type {\n ParsedExpression,\n ExpressionNode,\n ExpressionDialect,\n VariableResolver,\n} from '../document';\n\n// A component is one object literal; behaviour is spread in from modules (`...Paint.state`) and their helpers\n// called (`Paint.draw`). See `packages/core/docs/why.md#node-types-are-factory-specs-not-decorated-classes`.\nexport { component2d } from '../components/factory/component2d';\nexport { componentAudio } from '../components/factory/component-audio';\nexport { component3d } from '../components/factory/component3d';\nexport { commandsFor } from '../components/factory/commands-for';\nexport { Types } from '../components/factory/types';\nexport { provides } from '../components/factory/api';\nexport * as Paint from '../components/modules/paint';\nexport * as Flow from '../components/modules/flow';\nexport * as Shapes from '../components/modules/shapes';\nexport * as Aim from '../components/modules/aim';\n// The face text is set in: its entries inherit from the nearest provider.\nexport * as Typeface from '../components/modules/text-style';\nexport * as TextLayout from '../components/modules/text-layout';\n// A mesh's surface: the material entries, and the mesh drawn with them.\nexport * as Material from '../components/modules/material';\n// A viewport onto 3D children: the default camera and lights, the grid, the render settings.\nexport * as View3D from '../components/modules/view3d';\nexport type { Attribute, EntryOptions, NumberOptions, TextOptions } from '../components/factory/types';\nexport type { StyleGroups, StyleInput, StyleOptions, StyleShape, StyleValues } from '../components/factory/style';\nexport type {\n Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader,\n Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, SoundOptions, StateSpec,\n Timeline, Type, Values, Writes,\n // Named in every component's type, so a package exporting one can declare it.\n Merge, BuiltNode,\n // What `render` is handed; `RenderContext2D` is the renderer's.\n RenderContext2D as RenderContext,\n CallProps3D, Placement3DProps, Transform3DState, Handle, LayoutBox, NodeFrame,\n // What a 3D `render` is handed; `RenderContext3D` is the renderer's.\n RenderContext3D as SceneContext,\n} from '../components/factory/api';\n\n// Types only: a node type is a component, never a subclass.\nexport type { Node, Node2D } from '../components/trees';\nexport {\n // A clip's root container: layout frame, background paint and camera in\n // one node. Every track builds into one sized to the viewport.\n Canvas2D,\n // Reaching another node by the id a `nodeRef` prop holds, and reading where it sits.\n findNode2D,\n frameIn,\n} from '../components/trees';\nexport { Provider, ThemeProvider } from '../components/builtins/providers/providers';\nexport type {\n NodeProps,\n Node2DProps,\n // A slot a layout puts each child in beyond its box — see `Node2D._placementOf`.\n ChildPlacement,\n // A parent's own coordinates for its children's `x`/`y` — see `Node2D._planeOf`.\n ChildPlane,\n // A point an editor can drag to set a `Vector2` prop — see `Node2D._handles`.\n NodeHandle,\n Canvas2DProps,\n NodeConfig,\n NodeChildren,\n NodeDimension,\n} from '../components/trees';\nexport type { ProviderProps, ThemeProviderProps } from '../components/builtins/providers/providers';\n\nexport {\n Rect,\n Ellipse,\n Path,\n // The document's `\"path\"`: its `data` is in the unit space of its own box,\n // where `Path` draws its `d` at face value.\n PathShape,\n Polygon,\n Polygram,\n Triangle,\n RightTriangle,\n Pentagon,\n Hexagon,\n Octagon,\n Star,\n} from '../components/builtins/geometry/geometry';\nexport { BooleanGroup, MaskGroup } from '../components/builtins/geometry/composite';\nexport type {\n PaintProps,\n ShapeProps,\n RectProps,\n FlexSize,\n EllipseProps,\n PathProps,\n PathShapeProps,\n PolygonProps,\n PolygramProps,\n} from '../components/builtins/geometry/geometry';\nexport type { BooleanGroupProps, MaskGroupProps } from '../components/builtins/geometry/composite';\n// The operation/mode vocabularies behind `Boolean`/`Mask` are attribute types,\n// not node-prop types.\nexport type {\n BooleanOperation,\n MaskMode,\n MaskOptions,\n} from '../attributes';\n\nexport {\n Camera,\n // The stage's 2.5D camera for one subtree: its children orbited in depth.\n OrbitCamera,\n RotatedBox,\n} from '../components/builtins/layout/layout';\nexport type {\n CameraProps,\n OrbitCameraProps,\n} from '../components/builtins/layout/layout';\n\nexport { Text, RichText, NumberNode, DefaultTextStyle } from '../components/builtins/text/text';\nexport type {\n TextProps,\n RichTextProps,\n NumberProps,\n NumberFormat,\n DefaultTextStyleProps,\n} from '../components/builtins/text/text';\nexport { textOps } from '../attributes';\nexport type {\n TextStyle,\n TextAlign,\n VerticalAlign,\n TextDecoration,\n TextCase,\n TextSpan,\n TextRun,\n FontStyle,\n} from '../attributes';\n\nexport { Video } from '../components/builtins/media/media';\nexport type {\n VideoProps,\n VideoSegment,\n} from '../components/builtins/media/media';\n\n// Levels are `Param`, so a fade is a ramp or transition rather than a `to()`: sound is scheduled once, ahead\n// of time.\nexport type { NodeAudio } from '../components/trees';\nexport { AudioBus, SoundNode } from '../components/builtins/audio/audio';\nexport {\n Sound,\n AudioEffects,\n ramp,\n hold,\n isRamp,\n} from '../attributes';\nexport type {\n NodeAudioProps,\n} from '../components/trees';\nexport type { AudioBusProps, SoundNodeProps } from '../components/builtins/audio/audio';\nexport type {\n SoundProps,\n AudioRequest,\n AudioBusStop,\n AudioEffect,\n AudioEffectsInput,\n AudioTransition,\n Param,\n Ramp,\n RampKey,\n} from '../attributes';\n\n// One 3D node; everything inside it is described with `Graphics3D`. `Surface2D` is the 2D to 3D bridge: a\n// child of `Canvas3D` whose 2D content is rasterized offscreen and bound to a material by `Tex.surface(name)`.\nexport { Canvas3D } from '../components/builtins/three/canvas3d';\nexport type { Node3D } from '../components/trees';\n// The 3D scene graph: components, each placed by its transform.\nexport {\n Group3D,\n Mesh3D,\n Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D,\n Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D,\n Instances3D, Points3D, Line3D, Sprite3D, Model3D,\n AmbientLight3D, HemisphereLight3D, DirectionalLight3D,\n PointLight3D, SpotLight3D, AreaLight3D,\n Camera3D,\n Fog3D, Environment3D,\n} from '../components/builtins/three/three';\nexport {\n Graphics3D,\n Scene3D,\n RenderContext3D,\n Geo,\n Mat,\n Tex,\n lerpVector3,\n lerpEuler3,\n slerpQuaternion,\n quaternionFromEuler,\n normalizeQuaternion,\n resolveVector3,\n evaluateParametric,\n evaluateRoundedBox,\n resolveSurfaceSource,\n resolveFill3D,\n segmentsOf,\n resolveCameraPlacement,\n resolveShadows3D,\n shadowCasts,\n shadowReceives,\n} from '../render3d';\nexport type { Canvas3DProps } from '../components/builtins/three/canvas3d';\nexport type {\n // A 3D parent's own coordinates for its children's position: see `Node3D._spaceOf`.\n ChildSpace3D,\n Node3DProps,\n} from '../components/trees';\nexport type {\n Group3DProps, Mesh3DProps, Material3DProps,\n Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps,\n Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps,\n Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps,\n Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps,\n AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps,\n PointLight3DProps, SpotLight3DProps, AreaLight3DProps,\n Camera3DProps,\n Fog3DProps, Environment3DProps,\n} from '../components/builtins/three/three';\nexport type {\n Node3DRenderState,\n Graphics3DOp,\n Scene3DOp,\n Vector3,\n Vector3Input,\n Euler3,\n EulerOrder,\n Quaternion,\n Transform3D,\n Shadow3D,\n ShadowOptions3D,\n Faces3D,\n Blend3D,\n Shading3D,\n Segments3D,\n Sweep3D,\n Bevel3D,\n Fill3D,\n Geometry3D,\n BufferGeometry3D,\n Material3D,\n MaterialCommon3D,\n MeshShorthand3D,\n // What `Mesh3D.materialShorthand()` returns: a mesh node of your own overrides it.\n MaterialShorthand3D,\n Uniform3D,\n Texture3D,\n TextureOptions3D,\n SurfaceTexture3D,\n SurfaceSource3D,\n ResolvedSurfaceSource,\n LightData3D,\n CameraData3D,\n FogData3D,\n EnvironmentData3D,\n Shadows3D,\n ShadowSettings3D,\n ToneMapping3D,\n ToneSettings3D,\n PostEffect3D,\n LineMode3D,\n LineStroke3D,\n ModelAnimation3D,\n} from '../render3d';\n\nexport {\n Graphics2D,\n PathBuilder,\n Clip,\n toPathString,\n} from '../render';\nexport type {\n RenderContext2D,\n RenderPass2D,\n MeasureContext2D,\n TextBlockSource,\n // One recorded entry of `Graphics2D.ops()`.\n GraphicsOp,\n PathData,\n PathCommand,\n PathBounds,\n EllipseArc,\n} from '../render';\n// What a node's `declareAssets` declares into, and the async load a `loader` takes.\nexport type { AssetScope, LoaderFn } from '../assets';\n\nexport {\n Fills,\n parseColor,\n resolveFill,\n fillOps,\n colorOps,\n} from '../attributes';\nexport type {\n Fill,\n FillChain,\n FillOptions,\n VideoFillOptions,\n // Placement of an image/video source inside the shape it paints:\n // `crop` -> `fit` -> `zoom` -> `anchor`, plus the raw-matrix escape hatch.\n MediaPlacementOptions,\n ImageFit,\n ImageCrop,\n ImageMatrix,\n FillResolved,\n // A custom WGSL shader as a fill. Uniforms are keyed by their declared\n // name, and a `ShaderTexture` is an image it samples.\n ShaderFillProp,\n ShaderFillResolved,\n ShaderTexture,\n ShaderUniformRecord,\n FractalNoiseBasis,\n // The colour type every fill, stroke, shadow and 3D material accepts —\n // a CSS string (incl. `oklch()`, theme tokens, `\"white/10\"`) or a\n // pre-normalized RGBA tuple.\n Color,\n NormalizedColor,\n BlendMode,\n FillSpace,\n} from '../attributes';\n\nexport {\n resolveStroke,\n strokeOps,\n resolveShadow,\n shadowOps,\n resolveCorners,\n cornerRadiusOps,\n cornerStyleOps,\n // Parsing, measuring, sampling, trimming and morphing a path, and the\n // anchor model (`VectorPath`) a pen tool edits.\n pathOps,\n} from '../attributes';\nexport type {\n PathSampler,\n PathAnchor,\n PathSubpath,\n VectorPath,\n Stroke,\n StrokeProp,\n StrokeAlign,\n StrokeCap,\n StrokeMarker,\n StrokeEnd,\n StrokeJoin,\n StrokeResolved,\n Shadow,\n ShadowProp,\n ShadowResolved,\n Corners,\n CornerStyle,\n CornerStyleResolved,\n CornerRadiusResolved,\n // What a rect's `cornerRadius` and `cornerStyle` take, before they resolve.\n RectCornerRadius,\n RectCornerStyle,\n NodeEffect,\n} from '../attributes';\n\n// `flowOps` is the layout a container runs on its children, as plain data in and boxes out, so a custom node\n// can lay out what it draws the same way.\nexport {\n lerpVector2,\n sizeInputOps,\n insetsOps,\n alignmentOps,\n} from '../attributes';\n// `flowOps` itself is the layout package's, not the attribute layer's —\n// `../attributes`'s own `./layout` only carries Vector2/Size2D/Insets/Alignment.\nexport { flowOps } from '../layout';\nexport type {\n Vector2,\n Size2D,\n Insets,\n // What a `padding`-style prop accepts, before `insetsOps` resolves it.\n InsetsProps,\n InsetsResolved,\n AlignmentKey,\n Alignment,\n} from '../attributes';\nexport type {\n FlowMode,\n GapSize,\n FlowResolved,\n FlowProps,\n FlowSettings,\n LayoutItem,\n FlowSpace,\n FlowMeasure,\n FlowLine,\n // What an overriding `measure(constraints, scope)` is handed.\n SizeConstraints,\n} from '../layout';\n\n// `space3dOps` is the camera's own projection, for a host drawing over the picture rather than keeping a copy.\n// `SpaceCamera` is what a node returns from `_spaceCamera()` to open a 2.5D space.\nexport { space3dOps } from '../attributes/layout/space3d';\nexport type { LookAt, SpaceCamera, SpaceCameraProps, SpacePoint } from '../attributes/layout/space3d';\n\n// `describeEffect`/`effectDescriptors` describe each built-in effect's fields as plain JSON, so a host builds\n// its effect UI from the engine.\nexport { describeEffect, effectDescriptors } from '../attributes';\nexport type {\n EffectDescriptor,\n EffectParamDescriptor,\n EffectParamKind,\n EffectParamUnit,\n EffectParamControl,\n EffectGroup,\n EffectJson,\n} from '../attributes';\nexport {\n Effects,\n EffectChain,\n Adjustments,\n VideoAdjustments,\n AdjustmentChain,\n VideoAdjustmentChain,\n} from '../attributes';\n\nexport type {\n /** The `effects` prop type — what a node actually accepts. */\n Effect,\n EffectMode,\n EffectAxis,\n EffectSurface,\n EffectOptions,\n /** What an image fill's `preset.adjustments` accepts — one, a list, or a chain. */\n ImageAdjustment,\n VideoAdjustment,\n /** The node effects that also work as a media adjustment — see {@link Adjustments}. */\n EffectAdjustment,\n MediaAdjustment,\n VideoOnlyAdjustment,\n} from '../attributes';\n\n/**\n * Per-builder options. Every effect builder takes exactly one argument: one of\n * these, or the dominant scalar it wraps.\n */\nexport type {\n BlurOptions,\n DirectionalBlurOptions,\n GrayscaleOptions,\n PixelateOptions,\n BulgeOptions,\n MagnifyOptions,\n BloomOptions,\n VintageOptions,\n ChromaticAberrationOptions,\n InvertOptions,\n ScatterOptions,\n PosterizeOptions,\n MotionBlurOptions,\n ShaderEffectOptions,\n OutlineOptions,\n VignetteOptions,\n GrainOptions,\n SharpenOptions,\n EdgesOptions,\n ThresholdOptions,\n RadialBlurOptions,\n HalftoneOptions,\n DitherOptions,\n DuotoneOptions,\n CurvesOptions,\n ColorAdjustmentOptions,\n RgbShiftOptions,\n ScanlinesOptions,\n BlockDisplaceOptions,\n BitCrushOptions,\n AsciiOptions,\n StreakOptions,\n GlowOptions,\n OilPaintOptions,\n WaveOptions,\n TwirlOptions,\n ProgressiveBlurOptions,\n KaleidoscopeOptions,\n GlassOptions,\n LutOptions,\n} from '../attributes';\n\n/**\n * Per-builder options for the filters that exist only as filters. Everything\n * else on {@link Adjustments} takes the matching effect options above, minus\n * `mode` — a filter is on the fill's own pixels, so there is no backdrop to\n * point it at.\n */\nexport type {\n BlurFilterOptions,\n GrayscaleFilterOptions,\n AlphaFilterOptions,\n ExposureFilterOptions,\n ColorMatrixFilterOptions,\n CurvesFilterOptions,\n ColorAdjustmentFilterOptions,\n PosterizeTimeFilterOptions,\n VideoEchoFilterOptions,\n} from '../attributes';\n\n/** Effect data types, for naming an effect value or building one by hand. */\nexport type {\n BlurEffect,\n DirectionalBlurEffect,\n GrayscaleEffect,\n PixelateEffect,\n BulgeEffect,\n MagnifyEffect,\n BloomEffect,\n VintageEffect,\n ChromaticAberrationEffect,\n InvertEffect,\n InvertChannel,\n ScatterEffect,\n PosterizeEffect,\n MotionBlurEffect,\n MotionBlurAlignment,\n ShaderEffect,\n ShaderUniform,\n ShaderUniformValue,\n OutlineEffect,\n OutlinePosition,\n VignetteEffect,\n GrainEffect,\n SharpenEffect,\n EdgesEffect,\n EdgeKernel,\n ThresholdEffect,\n RadialBlurEffect,\n RadialBlurStyle,\n HalftoneEffect,\n HalftoneShape,\n HalftoneSeparation,\n DitherEffect,\n DitherMatrix,\n DuotoneEffect,\n CurvesEffect,\n ColorAdjustmentEffect,\n RgbShiftEffect,\n ScanlinesEffect,\n BlockDisplaceEffect,\n BitCrushEffect,\n BitCrushPalette,\n AsciiEffect,\n AsciiCharset,\n StreakEffect,\n GlowEffect,\n GlowChannel,\n GlowLoopStyle,\n GlowOriginal,\n GlowTint,\n OilPaintEffect,\n WaveEffect,\n WaveShape,\n TwirlEffect,\n ProgressiveBlurEffect,\n ProgressiveBlurShape,\n KaleidoscopeEffect,\n GlassEffect,\n LutEffect,\n} from '../attributes';\n\nexport {\n lerpNumber,\n} from '../tween';\nexport type {\n AnimationTarget,\n Steppable,\n TweenStepper,\n LerpFunction,\n TweenOptions,\n} from '../tween';\n\n// An animation as a value: a declared duration plus `at(t)`, so a host can ask what it looks like at a time\n// instead of running it to one. A component's `commands` return one. One command shape, always: `node.to(a,\n// 1)` is a single command, not a builder; sequencing is by timeline placement.\nexport {\n getCommandMeta,\n isCommand,\n makeCommand,\n commandSequence,\n commandParallel,\n loopCommand,\n} from '../tween';\nexport type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween';\n\nexport {\n linear,\n easeIn,\n easeOut,\n easeInOut\n} from '../tween';\nexport type {\n EasingFunction,\n EaseParams,\n StandardEase\n} from '../tween';\n\nexport {\n createRef,\n clamp,\n generateList,\n createContext,\n ContextMap,\n Random,\n SeedGenerator,\n parseCSV,\n parseData,\n} from '../util';\nexport type {\n Reference,\n RefTarget,\n Context,\n DataRecord,\n ParseCSVOptions,\n} from '../util';\n\n// Pure functions over a scene's node tree, in viewport space (origin at the viewport centre, y-up); a player\n// embedding reaches the same through `useMotionPlayer`. They live in `../runtime` but are deep-imported from\n// their files, never the runtime barrel.\nexport { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement';\nexport type { PlacementIssue, PlacementOptions } from '../document/placement';\n\nexport {\n nodeBox,\n pickNode,\n collectBoxes,\n parentPlanePointAt,\n childPlanePointAt,\n reparentPlacementAt,\n nodeHandlesAt,\n handleValueAt,\n} from '../runtime/node-picking';\nexport type {\n NodeBox,\n ReparentPlacement,\n} from '../runtime/node-picking';\nexport type {\n NodeOverride,\n} from '../runtime/playback-controller';\nexport type {\n TreeState,\n} from '../project';\n"]}
|
package/package.json
CHANGED