@cueframe/kernel 0.2.2 → 0.2.4
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/dist/_members/animate/index.d.ts +8 -2
- package/dist/_members/animate/layout/FlexLayout.d.ts +69 -0
- package/dist/_members/animate/layout/fit.d.ts +44 -0
- package/dist/_members/animate/layout/index.d.ts +3 -0
- package/dist/_members/animate/layout/solveFlex.d.ts +70 -0
- package/dist/_members/animate/media/MediaTileScene.d.ts +65 -0
- package/dist/_members/animate/media/recipes.d.ts +61 -0
- package/dist/_members/animate/scene/FocusPass.d.ts +76 -0
- package/dist/_members/animate/scene/UnlitPlane.d.ts +45 -0
- package/dist/_members/animate/scene/__oracle__/cssProjection.d.ts +24 -0
- package/dist/_members/animate/scene/assets.d.ts +21 -0
- package/dist/_members/animate/scene/backdrop.d.ts +7 -0
- package/dist/_members/animate/scene/coordinates.d.ts +58 -0
- package/dist/_members/animate/scene/deviceOpacity.d.ts +18 -0
- package/dist/_members/animate/scene/errors.d.ts +14 -0
- package/dist/_members/animate/scene/finishing.d.ts +69 -0
- package/dist/_members/animate/scene/finishingMath.d.ts +60 -0
- package/dist/_members/animate/scene/finishingPass.d.ts +35 -0
- package/dist/_members/animate/scene/focusBlur.d.ts +56 -0
- package/dist/_members/animate/scene/focusResources.d.ts +190 -0
- package/dist/_members/animate/scene/focusShaders.d.ts +68 -0
- package/dist/_members/animate/scene/fontReadiness.d.ts +27 -0
- package/dist/_members/animate/scene/grainNoise.d.ts +118 -0
- package/dist/_members/animate/scene/index.d.ts +19 -0
- package/dist/_members/animate/scene/internal.d.ts +29 -0
- package/dist/_members/animate/scene/planeFit.d.ts +46 -0
- package/dist/_members/animate/scene/preparedWorldText.d.ts +25 -0
- package/dist/_members/animate/scene/rasterCache.d.ts +30 -0
- package/dist/_members/animate/scene/rasterReadiness.d.ts +33 -0
- package/dist/_members/animate/scene/readiness.d.ts +69 -0
- package/dist/_members/animate/scene/redraw.d.ts +10 -0
- package/dist/_members/animate/scene/render.d.ts +9 -0
- package/dist/_members/animate/scene/scaling.d.ts +13 -0
- package/dist/_members/animate/scene/text.d.ts +40 -0
- package/dist/_members/animate/scene/textLayout.d.ts +78 -0
- package/dist/_members/animate/scene/textureImageSize.d.ts +4 -0
- package/dist/_members/animate/scene/useSceneImageTexture.d.ts +21 -0
- package/dist/_members/animate/scene/useWorldTextTexture.d.ts +21 -0
- package/dist/_members/animate/scene/v2/MeasuredPlaneGeometry.d.ts +7 -0
- package/dist/_members/animate/scene/v2/PhotographicStudioRig.d.ts +11 -0
- package/dist/_members/animate/scene/v2/PreparedSceneShotV1.d.ts +12 -0
- package/dist/_members/animate/scene/v2/SceneShotV2.d.ts +59 -0
- package/dist/_members/animate/scene/v2/builders.d.ts +170 -0
- package/dist/_members/animate/scene/v2/finishes.d.ts +152 -0
- package/dist/_members/animate/scene/v2/lighting.d.ts +119 -0
- package/dist/_members/animate/scene/v2/observePmremTargets.d.ts +4 -0
- package/dist/_members/animate/scene/v2/preparationFacts.d.ts +32 -0
- package/dist/_members/animate/scene/v2/preparedSurface.d.ts +17 -0
- package/dist/_members/animate/scene/v2/projectedResolution.d.ts +2 -0
- package/dist/_members/animate/scene/v2/renderTargetObserver.d.ts +5 -0
- package/dist/_members/animate/scene/v2/runtimeAllocations.d.ts +55 -0
- package/dist/_members/animate/scene/v2/shadow.d.ts +23 -0
- package/dist/_members/animate/scene/v2/slabGeometry.d.ts +134 -0
- package/dist/_members/animate/scene/v2/slots.d.ts +73 -0
- package/dist/_members/animate/scene/v2/videoBinding.d.ts +39 -0
- package/dist/_members/animate/scene/worldBounds.d.ts +19 -0
- package/dist/_members/animate/scene/worldTextRaster.d.ts +87 -0
- package/dist/_members/animate/scene/worldTextTexture.d.ts +32 -0
- package/dist/_members/animate/stage/PerspectiveStage.d.ts +73 -0
- package/dist/_members/animate/stage/camera.d.ts +143 -0
- package/dist/_members/animate/stage/dof.d.ts +9 -0
- package/dist/_members/animate/stage/index.d.ts +6 -0
- package/dist/_members/animate/stage/presets.d.ts +17 -0
- package/dist/_members/animate/three/DeviceMesh.d.ts +256 -0
- package/dist/_members/animate/three/SceneCameraRig.d.ts +12 -0
- package/dist/_members/animate/three/StageCameraRig.d.ts +7 -0
- package/dist/_members/animate/three/StudioRig.d.ts +228 -0
- package/dist/_members/animate/three/ThreeCanvas.d.ts +22 -0
- package/dist/_members/animate/three/defaultScreen.d.ts +23 -0
- package/dist/_members/animate/three/index.d.ts +7 -1
- package/dist/_members/animate/three/textureLifecycle.d.ts +29 -0
- package/dist/_members/animate/three/toneMapping.d.ts +113 -0
- package/dist/_members/animate/three/useImageTexture.d.ts +17 -0
- package/dist/_members/authoring/index.d.ts +2 -0
- package/dist/_members/authoring/scene/index.d.ts +6 -0
- package/dist/_members/authoring/scene/materialize.d.ts +47 -0
- package/dist/_members/authoring/scene/validate.d.ts +80 -0
- package/dist/_members/authoring/scene/wrapper.d.ts +41 -0
- package/dist/_members/component-runtime/allowedImports.d.ts +3 -0
- package/dist/_members/component-runtime/allowedImports.d.ts.map +1 -0
- package/dist/_members/component-runtime/bake.d.ts +8 -0
- package/dist/_members/component-runtime/bake.d.ts.map +1 -1
- package/dist/_members/component-runtime/browserFirewall.d.ts +7 -1
- package/dist/_members/component-runtime/browserFirewall.d.ts.map +1 -1
- package/dist/_members/component-runtime/browserOptions.d.ts +59 -3
- package/dist/_members/component-runtime/browserOptions.d.ts.map +1 -1
- package/dist/_members/component-runtime/canonicalIdentity.d.ts +14 -0
- package/dist/_members/component-runtime/canonicalIdentity.d.ts.map +1 -1
- package/dist/_members/component-runtime/contracts.d.ts +341 -1
- package/dist/_members/component-runtime/contracts.d.ts.map +1 -1
- package/dist/_members/component-runtime/fixtures/imageTileDriftWall.d.ts +5 -0
- package/dist/_members/component-runtime/fixtures/imageTileDriftWall.d.ts.map +1 -0
- package/dist/_members/component-runtime/fixtures/mediaTileMixed.d.ts +5 -0
- package/dist/_members/component-runtime/fixtures/mediaTileMixed.d.ts.map +1 -0
- package/dist/_members/component-runtime/fixtures/mediaTileVideo.d.ts +8 -0
- package/dist/_members/component-runtime/fixtures/mediaTileVideo.d.ts.map +1 -0
- package/dist/_members/component-runtime/importPolicy.d.ts +3 -2
- package/dist/_members/component-runtime/importPolicy.d.ts.map +1 -1
- package/dist/_members/component-runtime/index.d.ts +3 -0
- package/dist/_members/component-runtime/index.d.ts.map +1 -1
- package/dist/_members/component-runtime/livePreviewProxy.d.ts +7 -0
- package/dist/_members/component-runtime/livePreviewProxy.d.ts.map +1 -0
- package/dist/_members/component-runtime/localRoot.d.ts +37 -0
- package/dist/_members/component-runtime/localRoot.d.ts.map +1 -0
- package/dist/_members/component-runtime/mediaResolution.d.ts +25 -0
- package/dist/_members/component-runtime/mediaResolution.d.ts.map +1 -0
- package/dist/_members/component-runtime/render.d.ts +151 -13
- package/dist/_members/component-runtime/render.d.ts.map +1 -1
- package/dist/_members/component-runtime/renderDiagnostics.d.ts +14 -0
- package/dist/_members/component-runtime/renderDiagnostics.d.ts.map +1 -0
- package/dist/_members/component-runtime/sceneAdmission.d.ts +47 -0
- package/dist/_members/component-runtime/sceneAdmission.d.ts.map +1 -0
- package/dist/_members/component-runtime/sourceWorkspace.d.ts +8 -0
- package/dist/_members/component-runtime/sourceWorkspace.d.ts.map +1 -1
- package/dist/_members/component-runtime/webglProbe.d.ts +191 -0
- package/dist/_members/component-runtime/webglProbe.d.ts.map +1 -0
- package/dist/_members/compose/primitiveRegistry.d.ts +2 -6
- package/dist/_members/composition/fonts/bundledFaces.d.ts +150 -0
- package/dist/_members/composition/fonts/captionFaces.d.ts +268 -0
- package/dist/_members/composition/fonts.d.ts +11 -4
- package/dist/_members/composition/graphics-plan/schemas.d.ts +4 -4
- package/dist/_members/composition/ops/types.d.ts +1 -1
- package/dist/_members/composition/primitive-catalog/index.d.ts +4 -0
- package/dist/_members/composition/primitive-catalog/types.d.ts +1 -0
- package/dist/_members/composition/projection/behind-readiness.d.ts +3 -0
- package/dist/_members/composition/projection/brandKit.d.ts +6 -0
- package/dist/_members/composition/projection/composition-floor.d.ts +2 -1
- package/dist/_members/composition/scene/animation.d.ts +25 -0
- package/dist/_members/composition/scene/budget.d.ts +29 -0
- package/dist/_members/composition/scene/budgetPolicy.d.mts +13 -0
- package/dist/_members/composition/scene/clipRules.d.ts +119 -0
- package/dist/_members/composition/scene/constraints.d.ts +61 -0
- package/dist/_members/composition/scene/device.d.ts +21 -0
- package/dist/_members/composition/scene/examples.d.ts +11 -0
- package/dist/_members/composition/scene/index.d.ts +11 -0
- package/dist/_members/composition/scene/photographicRig.d.ts +242 -0
- package/dist/_members/composition/scene/preparedRender.d.ts +239 -0
- package/dist/_members/composition/scene/resolution.d.ts +178 -0
- package/dist/_members/composition/scene/schema.d.ts +351 -0
- package/dist/_members/composition/scene/videoSchedule.d.ts +43 -0
- package/dist/_members/composition/validators/brandKit.d.ts +1 -0
- package/dist/_members/composition/validators/render.d.ts +2 -0
- package/dist/_members/composition-ops/index.d.ts +45 -0
- package/dist/_members/composition-ops/opRecorder.d.ts +1 -1
- package/dist/_members/core/render/compositionRender.d.ts +41 -9
- package/dist/_members/core/render/index.d.ts +9 -2
- package/dist/_members/core/render/sceneCaptureIdentity.d.ts +14 -0
- package/dist/_members/core/render/sceneShotPlan.d.ts +142 -0
- package/dist/_members/core/render/sceneShotPreparation.d.ts +57 -0
- package/dist/_members/core/render/slabDescriptor.d.ts +21 -0
- package/dist/_members/core/render/trackProjection.d.ts +33 -0
- package/dist/_members/core/render/types.d.ts +142 -0
- package/dist/_members/errors/registry.d.ts +6 -0
- package/dist/_members/mcp/adapter.d.ts +5 -0
- package/dist/_members/mcp/generated/harness.d.ts +1 -1
- package/dist/_members/mcp/generated/sceneContract.d.ts +155 -0
- package/dist/_members/mcp/sceneShot.d.ts +38 -0
- package/dist/_members/mcp/sceneShotExample.d.ts +22 -0
- package/dist/_members/media-model/api.d.ts +1 -0
- package/dist/_members/media-model/media-kind.d.ts +1 -1
- package/dist/_members/media-model/testing/mediaStoreContract.d.ts +1 -1
- package/dist/_members/primitives/effects/index.d.ts +1 -0
- package/dist/_members/primitives/effects/stage-camera/config.d.ts +50 -0
- package/dist/_members/primitives/effects/stage-camera/index.d.ts +31 -0
- package/dist/_members/primitives/layouts/flex-layout/config.d.ts +73 -0
- package/dist/_members/primitives/layouts/flex-layout/index.d.ts +4 -0
- package/dist/_members/primitives/layouts/index.d.ts +1 -0
- package/dist/_members/primitives/layouts/picture-in-picture/config.d.ts +1 -1
- package/dist/_members/primitives/lib/frameScale.d.ts +4 -0
- package/dist/_members/primitives/lib/index.d.ts +1 -0
- package/dist/_members/primitives/lib/palette.d.ts +30 -30
- package/dist/_members/primitives/lib/text/contrast.d.ts +2 -1
- package/dist/_members/primitives/lib/text/spec.d.ts +0 -8
- package/dist/_members/primitives/lib/types.d.ts +2 -0
- package/dist/_members/primitives/scenes/device-showcase/config.d.ts +41 -0
- package/dist/_members/primitives/scenes/device-showcase/index.d.ts +36 -0
- package/dist/_members/primitives/scenes/hero-device-assemble/config.d.ts +1 -0
- package/dist/_members/primitives/scenes/hero-device-assemble/index.d.ts +2 -1
- package/dist/_members/primitives/scenes/index.d.ts +1 -0
- package/dist/_members/primitives/ui-blocks/badge-pop/config.d.ts +1 -1
- package/dist/_members/primitives/ui-blocks/device-mockup-zoom/config.d.ts +1 -0
- package/dist/_members/primitives/ui-blocks/device-mockup-zoom/index.d.ts +2 -1
- package/dist/_members/primitives/ui-blocks/terminal-simulator/config.d.ts +1 -1
- package/dist/_members/primitives/ui-blocks/toast-notification/config.d.ts +1 -1
- package/dist/_members/render-harness/cardAssetAdmission.d.ts.map +1 -1
- package/dist/_members/render-harness/cardRender.d.ts.map +1 -1
- package/dist/_members/render-harness/css-tree-subpaths.d.ts +11 -0
- package/dist/_members/render-harness/extractSegments.d.ts +1 -0
- package/dist/_members/render-harness/extractSegments.d.ts.map +1 -1
- package/dist/_members/render-harness/imageHeader.d.ts +14 -0
- package/dist/_members/render-harness/imageHeader.d.ts.map +1 -0
- package/dist/_members/render-harness/index.d.ts +6 -0
- package/dist/_members/render-harness/index.d.ts.map +1 -1
- package/dist/_members/render-harness/materializeSources.d.ts +46 -2
- package/dist/_members/render-harness/materializeSources.d.ts.map +1 -1
- package/dist/_members/render-harness/nodeScenePreparation.d.ts +97 -0
- package/dist/_members/render-harness/nodeScenePreparation.d.ts.map +1 -0
- package/dist/_members/render-harness/remotion-runtime.d.ts +16 -2
- package/dist/_members/render-harness/renderInputAssets.d.ts +1 -1
- package/dist/_members/render-harness/renderInputAssets.d.ts.map +1 -1
- package/dist/_members/render-harness/resolveAssets.d.ts +2 -2
- package/dist/_members/render-harness/resolveAssets.d.ts.map +1 -1
- package/dist/_members/render-harness/sceneShotAssets.d.ts +17 -0
- package/dist/_members/render-harness/sceneShotAssets.d.ts.map +1 -0
- package/dist/animate/preparation-facts.d.ts +1 -0
- package/dist/animate/preparation-facts.js +22 -0
- package/dist/animate.js +336 -1005
- package/dist/authoring/build-tools.js +7 -6
- package/dist/authoring/context.js +5 -4
- package/dist/authoring/prompts.js +1 -1
- package/dist/authoring/scene.d.ts +1 -0
- package/dist/authoring/scene.js +50 -0
- package/dist/authoring/tools.js +6 -5
- package/dist/authoring.js +49 -29
- package/dist/chunk-2L7PYYJK.js +23 -0
- package/dist/chunk-5DJ3IEJR.js +4424 -0
- package/dist/chunk-6BVVCRRD.js +26488 -0
- package/dist/{chunk-DQKSCHFC.js → chunk-6EWRIAZA.js} +187 -66
- package/dist/{chunk-YQ7FFW3G.js → chunk-6VWICHOZ.js} +26 -5
- package/dist/{chunk-C5SEPOWD.js → chunk-7AZLFN26.js} +1798 -702
- package/dist/{chunk-6ID2J64H.js → chunk-7W6ZIKWV.js} +162 -25
- package/dist/{chunk-RETQFTGY.js → chunk-A74FZCPY.js} +42 -5
- package/dist/chunk-BVA3537Z.js +63 -0
- package/dist/{chunk-DHKQ47Q6.js → chunk-DAARYRNT.js} +6 -1
- package/dist/chunk-DQLYWNLC.js +2063 -0
- package/dist/{chunk-HXKTZPRH.js → chunk-E7GIZEPS.js} +1 -1
- package/dist/chunk-EBIBLL7E.js +3619 -0
- package/dist/{chunk-M2TLRXEO.js → chunk-EXY4JJPH.js} +1 -1
- package/dist/{chunk-AWT3P5ZN.js → chunk-FVDFPJHT.js} +1 -1
- package/dist/{chunk-EMGFZ3PR.js → chunk-FWSJLHSV.js} +5 -1
- package/dist/{chunk-TMIBBD5E.js → chunk-I5QWBM3M.js} +280 -113
- package/dist/{chunk-IBMJ33EL.js → chunk-I5RX2QZT.js} +1 -1
- package/dist/{chunk-4FOOBSEE.js → chunk-J3DIUG24.js} +1 -0
- package/dist/{chunk-AD5HWBCE.js → chunk-JX53CVJV.js} +14 -5
- package/dist/{chunk-LNBVTDFR.js → chunk-L2AHS3AW.js} +1 -1
- package/dist/{chunk-BDMTUEEZ.js → chunk-LT4PWSR2.js} +2 -2
- package/dist/chunk-MH3UPKWR.js +3415 -0
- package/dist/{chunk-RFXR7ATW.js → chunk-MN6D3U5N.js} +13 -1
- package/dist/{chunk-IJ7PVJTK.js → chunk-ODUWCQI3.js} +3 -2
- package/dist/chunk-QAGGJHAF.js +16 -0
- package/dist/chunk-QS36DMFG.js +332 -0
- package/dist/{chunk-G5BFI32U.js → chunk-RAXHCRVV.js} +1 -1
- package/dist/{chunk-BIBYZJL3.js → chunk-RL5SO653.js} +3 -3
- package/dist/{chunk-ZSZABOE5.js → chunk-S5H6GH6M.js} +1 -1
- package/dist/{chunk-EEXCDFY5.js → chunk-SD25VQDE.js} +1 -1
- package/dist/chunk-TARKDVP6.js +430 -0
- package/dist/{chunk-XVBOSPZI.js → chunk-TBNTAQJA.js} +6 -6
- package/dist/{chunk-IHFREGFA.js → chunk-TCHPRGC5.js} +18 -2
- package/dist/{chunk-ZCAQHNPI.js → chunk-UKGNHZS4.js} +1 -1
- package/dist/{chunk-ZN6P3KOJ.js → chunk-UN6NY2E6.js} +3 -3
- package/dist/{chunk-WQSGVRFU.js → chunk-UY77TMKD.js} +31 -44
- package/dist/chunk-VKATKWWR.js +1462 -0
- package/dist/{chunk-U5LBYS3N.js → chunk-VLJOIUHL.js} +341 -274
- package/dist/{chunk-CX2IIQ4R.js → chunk-W2245F6G.js} +29 -29
- package/dist/{chunk-GEGRJKKO.js → chunk-W6B7BMLO.js} +1 -1
- package/dist/{chunk-XHUYWVYK.js → chunk-WBNFSG6T.js} +1 -1
- package/dist/chunk-WIHXXF3X.js +221 -0
- package/dist/{chunk-7KEUL3FI.js → chunk-XF2QMKRG.js} +9 -1
- package/dist/{chunk-HFC3MKXA.js → chunk-Y4HPN4BC.js} +1 -0
- package/dist/{chunk-D43J23QX.js → chunk-YFSBFCXO.js} +1018 -42
- package/dist/{chunk-KKEY5MIW.js → chunk-ZS3A3QUM.js} +16 -16
- package/dist/{chunk-LQUWKBST.js → chunk-ZVG446DJ.js} +139 -10
- package/dist/component-runtime/browserOptions.js +14 -3
- package/dist/component-runtime/contracts.js +35 -3
- package/dist/component-runtime/identity/browser.js +1 -1
- package/dist/component-runtime/identity.js +2 -2
- package/dist/component-runtime/importPolicy.js +2 -2
- package/dist/component-runtime/mediaResolution.d.ts +1 -0
- package/dist/component-runtime/mediaResolution.js +11 -0
- package/dist/component-runtime/render.js +38 -5
- package/dist/component-runtime.js +118 -14
- package/dist/compose.js +192 -33
- package/dist/composition/fonts.js +64 -67
- package/dist/composition/graphics-plan.js +3 -2
- package/dist/composition/ops.js +4 -3
- package/dist/composition/primitive-catalog.js +3 -1
- package/dist/composition/projection.js +10 -3
- package/dist/composition/scene/budget-policy.d.ts +1 -0
- package/dist/composition/scene/budget-policy.js +17 -0
- package/dist/composition/scene/schema.json +2757 -0
- package/dist/composition/scene.d.ts +1 -0
- package/dist/composition/scene.js +275 -0
- package/dist/composition/validators.js +3 -2
- package/dist/composition-ops.js +103 -13
- package/dist/composition.js +12 -5
- package/dist/{context-4GSDBFT3.js → context-IUPQ54V4.js} +5 -4
- package/dist/core/render.js +54 -3
- package/dist/core/select.js +2 -2
- package/dist/core.js +6 -3
- package/dist/director/ai-sdk.js +3 -3
- package/dist/director/domain.js +2 -2
- package/dist/director.js +3 -3
- package/dist/errors.js +1 -1
- package/dist/mcp/adapter.js +4 -4
- package/dist/mcp/core.js +1 -1
- package/dist/mcp/curation.js +1 -1
- package/dist/mcp/server.js +4 -4
- package/dist/mcp.js +4 -4
- package/dist/media-model/media-kind.js +2 -0
- package/dist/media-model/testing.js +16 -11
- package/dist/media-model.js +1 -1
- package/dist/nle-export.js +1 -27
- package/dist/primitives/backgrounds.js +2 -2
- package/dist/primitives/captions.js +21 -11
- package/dist/primitives/effects.js +14 -4
- package/dist/primitives/graphics.json +3 -0
- package/dist/primitives/hero-text.js +4 -3
- package/dist/primitives/layouts.js +9 -2
- package/dist/primitives/lib/frameScale.d.ts +1 -0
- package/dist/primitives/lib/frameScale.js +11 -0
- package/dist/primitives/lib/index.js +18 -10
- package/dist/primitives/lib/palette.js +1 -1
- package/dist/primitives/lib/text/contrast.js +2 -1
- package/dist/primitives/lib/text/typeface.js +1 -1
- package/dist/primitives/lib.js +18 -10
- package/dist/primitives/params-required.json +3 -0
- package/dist/primitives/scenes.js +12 -3
- package/dist/primitives/text.js +5 -5
- package/dist/primitives/transitions.js +2 -2
- package/dist/primitives/ui-blocks.js +7 -6
- package/dist/primitives/version-map.json +5 -2
- package/dist/primitives.js +23 -16
- package/dist/render-harness/cardAssetAdmission.js +2 -2
- package/dist/render-harness/renderInputAssets.js +2 -2
- package/dist/render-harness.js +874 -124
- package/package.json +48 -14
- package/dist/_members/animate/three/drei.d.ts +0 -6
- package/dist/_members/component-runtime/fixtures/webgpuTiledRefraction.d.ts +0 -9
- package/dist/_members/component-runtime/fixtures/webgpuTiledRefraction.d.ts.map +0 -1
- package/dist/chunk-5OTQ7M43.js +0 -718
- package/dist/chunk-7REW2MW3.js +0 -202
- package/dist/chunk-CGHTMZNC.js +0 -6
- package/dist/chunk-KVMVYRXX.js +0 -9527
- package/dist/chunk-WYQX4QIK.js +0 -544
- /package/dist/{chunk-H5LMJKZU.js → chunk-JVDUSOYG.js} +0 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The slab body's geometry, at the FROZEN tessellation.
|
|
3
|
+
*
|
|
4
|
+
* **NOTE FOR W3.** `SLAB_TESSELLATION_VERSION`, `SLAB_TESSELLATION` and `SLAB_TRIANGLES` are
|
|
5
|
+
* policy constants and belong in `@cueframe/composition/scene` beside the other budget numbers
|
|
6
|
+
* (Decision 5 puts "pure accounting and policy constants" there, and the plan's ownership map
|
|
7
|
+
* gives that file to W3). They live here because W2 needs the geometry before that module exists,
|
|
8
|
+
* and because the number has to be asserted against the geometry that three actually builds
|
|
9
|
+
* rather than against a copy of itself. When W3 lands they move unchanged in value.
|
|
10
|
+
*/
|
|
11
|
+
import { ExtrudeGeometry, type BufferGeometry } from 'three';
|
|
12
|
+
/**
|
|
13
|
+
* `tessellationVersion: 1` — frozen inside I0 (report §4.1a) and consumed here, never chosen.
|
|
14
|
+
*
|
|
15
|
+
* Versioned and fixed: Decision 5 puts adaptive tessellation and author-controlled segment counts
|
|
16
|
+
* outside first delivery, so there is no field anywhere in the contract that reaches these two
|
|
17
|
+
* numbers. A future profile is a NEW version with its own measured triangle count, not an edit to
|
|
18
|
+
* this one — the count below is a budget input, and a silent change to it would move the admission
|
|
19
|
+
* arithmetic of every shot that already validated.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SLAB_TESSELLATION_VERSION = 1;
|
|
22
|
+
/**
|
|
23
|
+
* 24 curve segments around each face corner, 6 across the edge bevel.
|
|
24
|
+
*
|
|
25
|
+
* **Why 24/6 and not the spike's 32/8.** `SCENE_MAX_LAYERS` is 32 and Decision 5's triangle cap is
|
|
26
|
+
* 250 000. At 32/8 a slab is 9 358 triangles, so 32 slabs is 299 456 — two policy constants that
|
|
27
|
+
* refuse each other. At 24/6 the worst case at the layer cap is 32 × 5 486 = 175 552, **74 448
|
|
28
|
+
* triangles inside the cap**, so no combination of 32 layers can exceed the triangle budget at all.
|
|
29
|
+
*
|
|
30
|
+
* **The visual cost was measured, not assumed** (I0 `review-fixes.json`, `f5f17Finishes.sweep`):
|
|
31
|
+
* under the first-delivery rig, 32/8 reads satin 1.14× body @ 0 px and brushed 1.24× @ 8 px, and
|
|
32
|
+
* 24/6 reads 1.07× @ 0 px and 1.17× @ 11 px. Both are far below any usable rim criterion, so
|
|
33
|
+
* nothing that is or could be a finish gate depends on the difference: 24/6 costs ~6 % of a
|
|
34
|
+
* highlight that is not a gate and buys back 41 % of the triangles.
|
|
35
|
+
*/
|
|
36
|
+
export declare const SLAB_TESSELLATION: {
|
|
37
|
+
readonly curveSegments: 24;
|
|
38
|
+
readonly bevelSegments: 6;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* The BODY's own triangle count at `SLAB_TESSELLATION` — the extruded solid alone.
|
|
42
|
+
*
|
|
43
|
+
* This is the number `slabTriangleCount(slabBodyGeometry(...))` returns, and it is also the slab's
|
|
44
|
+
* SHADOW-PASS count: the content face casts nothing (report §4.1's `shadowPassTriangles` column).
|
|
45
|
+
*/
|
|
46
|
+
export declare const SLAB_BODY_TRIANGLES = 5484;
|
|
47
|
+
/** The content face: one `PlaneGeometry` quad, mounted only when the `front` slot is bound. */
|
|
48
|
+
export declare const SLAB_CONTENT_FACE_TRIANGLES = 2;
|
|
49
|
+
/**
|
|
50
|
+
* The INSTANTIATED triangle count of one slab PRESET at `SLAB_TESSELLATION` — **5 486**, asserted
|
|
51
|
+
* and never re-derived (report §4.1a, plan W2 item 7 and exit clause 5).
|
|
52
|
+
*
|
|
53
|
+
* **It is the preset total, body plus content face**, exactly as I0 counted it: `ledger.json`'s
|
|
54
|
+
* slab row reads `body 5 484` + `content face 2` = `instantiatedTriangles 5 486`, which is the
|
|
55
|
+
* same shape as its 32/8 figure of `9 356 + 2 = 9 358`. That distinction is worth stating because
|
|
56
|
+
* the first version of this file asserted 5 486 against the BODY and went red at 5 484 — the body
|
|
57
|
+
* reproduces I0 exactly and the constant was being compared to the wrong part.
|
|
58
|
+
*
|
|
59
|
+
* A measured constant, not a formula. `slabTriangleCount` counts what three actually built and
|
|
60
|
+
* `slabGeometry.test.ts` asserts the two agree, so a three upgrade that changes how
|
|
61
|
+
* `ExtrudeGeometry` closes its caps turns into a red test rather than into a budget that silently
|
|
62
|
+
* disagrees with the geometry it accounts for. A formula here would agree with itself forever.
|
|
63
|
+
*
|
|
64
|
+
* The budget charges the preset total for every slab, bound face or not: admission runs before the
|
|
65
|
+
* surfaces are resolved, and a bound that depended on whether an author later bound a slot would
|
|
66
|
+
* not be a bound.
|
|
67
|
+
*/
|
|
68
|
+
export declare const SLAB_TRIANGLES: number;
|
|
69
|
+
/** Decision 5's per-resident-shot cap, restated so the headroom claim is checkable in one place. */
|
|
70
|
+
export declare const SCENE_MAX_TRIANGLES = 250000;
|
|
71
|
+
/** The layer cap the triangle cap is proved compatible with (report §5.8a: it is DERIVED from it). */
|
|
72
|
+
export declare const SCENE_MAX_LAYERS = 32;
|
|
73
|
+
/** Report §5.5's slab defaults, in reference px. */
|
|
74
|
+
export declare const SLAB_DEFAULTS: {
|
|
75
|
+
thickness: number;
|
|
76
|
+
cornerRadius: number;
|
|
77
|
+
edgeRadius: number;
|
|
78
|
+
finish: "satin";
|
|
79
|
+
/** The flat dark base the two finishes are painted over; the specular is the whole performance. */
|
|
80
|
+
baseColor: string;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* The slab body: an extruded rounded rectangle with an independent quarter-round bevel.
|
|
84
|
+
*
|
|
85
|
+
* **NEVER `RoundedBoxGeometry`.** It clamps its radius to half the THINNEST axis, which collapses a
|
|
86
|
+
* 32 px face radius on a 32 px-thick slab to 16 px — the face corners silently stop being the
|
|
87
|
+
* radius the author wrote (report §5.5). Edge rounding and face-corner rounding are separate fields
|
|
88
|
+
* with separate bounds for exactly this reason, and this constructor is what keeps them separate.
|
|
89
|
+
*
|
|
90
|
+
* **The bevel is a true quarter-circle, not a chamfer.** Three walks the bevel as
|
|
91
|
+
* `z = bevelThickness · cos(t·π/2)`, `bs = bevelSize · sin(t·π/2)`, so passing the same number for
|
|
92
|
+
* both makes the shoulder an arc of that radius. A chamfer has ONE normal and gives one flat band;
|
|
93
|
+
* an arc sweeps its normal through 90° between the face and the edge, so some line along the
|
|
94
|
+
* shoulder reflects the brightest light in the room at every yaw the slab ever takes. That sweep is
|
|
95
|
+
* the mechanism the `studio-edge` rim gate measures.
|
|
96
|
+
*
|
|
97
|
+
* **The outer box stays exactly `w × h × t` centred on the origin.** The shape is inset by the
|
|
98
|
+
* effective edge radius, the extrusion runs from `−e` to `depth + e`, and the result is translated
|
|
99
|
+
* back by `depth / 2` — so the front face is at `z = +t/2`, which is what the content-face offset
|
|
100
|
+
* and any collision half-extent are entitled to assume.
|
|
101
|
+
*/
|
|
102
|
+
export declare function slabBodyGeometry(width: number, height: number, thickness: number, cornerRadius: number, edgeRadius: number): ExtrudeGeometry;
|
|
103
|
+
/**
|
|
104
|
+
* The instantiated triangle count of a built geometry: the index buffer over three.
|
|
105
|
+
*
|
|
106
|
+
* Counts what was BUILT. `SLAB_TRIANGLES` is what the budget was admitted against, and the two are
|
|
107
|
+
* compared rather than one being computed from the other.
|
|
108
|
+
*/
|
|
109
|
+
export declare function slabTriangleCount(geometry: BufferGeometry): number;
|
|
110
|
+
/** Σ over a shot's slabs, for the admission rule that totals the flattened tree (report §4.1a). */
|
|
111
|
+
export declare function slabTrianglesFor(slabCount: number): number;
|
|
112
|
+
/**
|
|
113
|
+
* Add a `uv1` attribute holding PER-FACE NORMALISED UVs, leaving `uv` alone.
|
|
114
|
+
*
|
|
115
|
+
* **Why both, and why `uv` is the one left in world units.** `ExtrudeGeometry` does not generate
|
|
116
|
+
* normalised UVs: its default `WorldUVGenerator.generateTopUV` returns the vertex's own local x and
|
|
117
|
+
* y AS the uv, unscaled (three 0.183.2, `ExtrudeGeometry.js`), and `generateSideWallUV` does the
|
|
118
|
+
* same with x/y/z. So on this geometry the uv coordinate IS the world pixel — u runs ±(w/2 − e)
|
|
119
|
+
* across the face and v runs ±(h/2 − e) down it. That is not a defect to correct here: the two
|
|
120
|
+
* generated finishes are AUTHORED in that space. Their tile sizes are world pixels and their
|
|
121
|
+
* `repeat` is `1 / tilePx` (see `finishes.ts`), which is what makes a grain the same physical size
|
|
122
|
+
* on a 520 px slab and a 1040 px one instead of stretching with the geometry. Normalising `uv`
|
|
123
|
+
* would rescale both maps by the slab's own dimensions and the frozen finish facts — absolute peak
|
|
124
|
+
* luma at a pinned pose — would stop reproducing.
|
|
125
|
+
*
|
|
126
|
+
* So the normalised UVs go in `uv1`, where a slot binding can use them (three's `Texture.channel`
|
|
127
|
+
* selects the attribute) without touching the space the finishes live in. `uv1` is `(0,0)` at the
|
|
128
|
+
* face's top-left corner and `(1,1)` at its bottom-right, which is §5.6's `uvOrigin: 'top-left'`
|
|
129
|
+
* for the `front` slot. Every side and bevel vertex uses the chart selected by its dominant face
|
|
130
|
+
* normal, so no face collapses to a line and every chart remains normalised independently.
|
|
131
|
+
*
|
|
132
|
+
* Costs no triangles and no draw call; it is 8 bytes per vertex of declared geometry.
|
|
133
|
+
*/
|
|
134
|
+
export declare function withNormalisedFaceUv(geometry: BufferGeometry, width: number, height: number): BufferGeometry;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Report §5.6's SLOT TABLE, and the surface path's call into amendment A2's resolution check.
|
|
3
|
+
*
|
|
4
|
+
* **A slot is declared by the BUILDER, not by the author.** Friendly names resolve to these rows
|
|
5
|
+
* and to nothing else; an unknown slot name is refused with the preset's legal list, and a
|
|
6
|
+
* duplicate binding is impossible by construction because `surfaces` is a record. **Curved geometry
|
|
7
|
+
* does not automatically acquire a planar screen** — a slot exists only where its preset declares
|
|
8
|
+
* one, which is why the laptop has `screen`, the slab has `front`, the page has `content`, and
|
|
9
|
+
* nothing has anything else.
|
|
10
|
+
*
|
|
11
|
+
* **NOTE FOR W3.** The table is wire contract and moves with the schema. **NOTE FOR W4.**
|
|
12
|
+
* `assertSceneSurfaceResolution` is a runtime GUARD standing in for preparation's sealed selection;
|
|
13
|
+
* see `projectedResolution.ts` for exactly what W4 must take over.
|
|
14
|
+
*/
|
|
15
|
+
import { type SceneBakeScale, type SceneSlotRect } from './projectedResolution.js';
|
|
16
|
+
import type { SceneObjectV2, SceneShotSpecV2, SceneSurfaceBindingV2 } from '../../../composition/scene/index.js';
|
|
17
|
+
import type { SceneWorldTransform } from '../coordinates.js';
|
|
18
|
+
/** One row of §5.6's frozen slot table. */
|
|
19
|
+
export interface SceneSlotDescriptor {
|
|
20
|
+
slot: string;
|
|
21
|
+
attachment: {
|
|
22
|
+
part: string;
|
|
23
|
+
materialRole: string;
|
|
24
|
+
};
|
|
25
|
+
/** Reference px, DERIVED from the preset's own params. */
|
|
26
|
+
dimensions: SceneSlotRect;
|
|
27
|
+
uvOrigin: 'top-left' | 'bottom-left';
|
|
28
|
+
fit: 'contain' | 'cover' | 'stretch';
|
|
29
|
+
alpha: 'opaque' | 'straight' | 'premultiplied';
|
|
30
|
+
depth: 'write' | 'test-only';
|
|
31
|
+
required: boolean;
|
|
32
|
+
/** The bake scales this slot admits. Every preset in first delivery admits both. */
|
|
33
|
+
bakeScales: readonly SceneBakeScale[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The slots one object declares, with dimensions derived from its own params.
|
|
37
|
+
*
|
|
38
|
+
* The laptop's `width·0.86 × width·0.54` comes from `laptopLayout`'s proportions; the slab's
|
|
39
|
+
* `width × height` is its whole front face; the page's is its declared box, which `fit` then fits
|
|
40
|
+
* the admitted content inside.
|
|
41
|
+
*/
|
|
42
|
+
export declare function sceneSlotsFor(node: SceneObjectV2): SceneSlotDescriptor[];
|
|
43
|
+
/** A bound surface with everything the check needs: its slot rect and its ancestor chain. */
|
|
44
|
+
interface BoundSurface {
|
|
45
|
+
layerId: string;
|
|
46
|
+
slot: string;
|
|
47
|
+
binding: SceneSurfaceBindingV2;
|
|
48
|
+
dimensions: SceneSlotRect;
|
|
49
|
+
/** Outermost first, the object's own transform last. */
|
|
50
|
+
chain: SceneWorldTransform[];
|
|
51
|
+
}
|
|
52
|
+
/** Every bound surface in a shot, with its slot rectangle and transform chain. */
|
|
53
|
+
export declare function sceneBoundSurfaces(spec: SceneShotSpecV2): BoundSurface[];
|
|
54
|
+
/**
|
|
55
|
+
* **Amendment A2 in the surface path.** Run the projected-resolution check over every bound surface
|
|
56
|
+
* that declares a capture `layout`, and let its refusal out.
|
|
57
|
+
*
|
|
58
|
+
* **What this is and is not.** It is a GUARD: the runtime holds ONE evaluated frame (W1's contract
|
|
59
|
+
* — the caller evaluates the animation), so the enumeration here is that frame alone, and it can
|
|
60
|
+
* only catch a shot that is already over the line at the frame being drawn. Preparation's version
|
|
61
|
+
* runs over the sealed schedule's complete `f = 0 … D−1` enumeration and SEALS the answer, which is
|
|
62
|
+
* the only version that can refuse a shot before a pixel is spent. W4 owns that; until then this
|
|
63
|
+
* stops a resampled UI from reaching the frame silently, which is what A2 forbids.
|
|
64
|
+
*
|
|
65
|
+
* Surfaces with no declared `layout` are skipped, and that is correct rather than lenient: an image
|
|
66
|
+
* binding has no bake scale and no declared raster, so the metric has no numerator. The check
|
|
67
|
+
* applies to CAPTURES, which are the things a bake scale is chosen for.
|
|
68
|
+
*/
|
|
69
|
+
export declare function assertSceneSurfaceResolution(spec: SceneShotSpecV2, output: {
|
|
70
|
+
width: number;
|
|
71
|
+
height: number;
|
|
72
|
+
}): void;
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CanvasTexture } from 'three';
|
|
3
|
+
import type { Object3D, Texture } from 'three';
|
|
4
|
+
import { type SceneSealedVideoScheduleV1 } from '../../../composition/scene/index.js';
|
|
5
|
+
import type { PreparedSceneSurfaceVisualV1 } from './preparedSurface.js';
|
|
6
|
+
export declare function sceneHasVideoTextureV1(scene: Object3D, texture: Texture): boolean;
|
|
7
|
+
export interface SceneVideoTextureBindingV1 {
|
|
8
|
+
readonly kind: 'video-texture';
|
|
9
|
+
readonly texture: CanvasTexture;
|
|
10
|
+
readonly visual: PreparedSceneSurfaceVisualV1;
|
|
11
|
+
readonly sourceIndex: number;
|
|
12
|
+
readonly revision: number;
|
|
13
|
+
readonly request: string;
|
|
14
|
+
/** Internal draw receipt shared with the Three commit bridge. */
|
|
15
|
+
readonly drawReceipt: {
|
|
16
|
+
request: string | null;
|
|
17
|
+
revision: number | null;
|
|
18
|
+
};
|
|
19
|
+
readonly readinessHandle: number;
|
|
20
|
+
readonly releaseReadiness: () => void;
|
|
21
|
+
}
|
|
22
|
+
export interface SceneVideoBindingPropsV1 {
|
|
23
|
+
src: string;
|
|
24
|
+
schedule: SceneSealedVideoScheduleV1;
|
|
25
|
+
contentFrame: number;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
resourceOwner?: string;
|
|
29
|
+
children(binding: SceneVideoTextureBindingV1 | null): React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Owns the decoder-to-texture copy. The callback image is copied before @remotion/media closes it;
|
|
33
|
+
* flushSync makes the matching Three commit and draw finish before Video releases its own handle.
|
|
34
|
+
*/
|
|
35
|
+
export declare function SceneVideoBindingV1({ src, schedule, contentFrame, width, height, resourceOwner, children }: SceneVideoBindingPropsV1): React.JSX.Element;
|
|
36
|
+
/** Must mount inside the shared Three canvas before a video texture is used by a material. */
|
|
37
|
+
export declare function SceneVideoTextureCommitV1({ binding }: {
|
|
38
|
+
binding: SceneVideoTextureBindingV1;
|
|
39
|
+
}): null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type DeviceKind } from '../three/DeviceMesh.js';
|
|
2
|
+
import type { ShadowBounds } from '../three/StudioRig.js';
|
|
3
|
+
export type WorldPoint = [number, number, number];
|
|
4
|
+
export declare function pointsBounds(points: readonly WorldPoint[]): ShadowBounds;
|
|
5
|
+
export declare function unionBounds(a: ShadowBounds, b: ShadowBounds): ShadowBounds;
|
|
6
|
+
/**
|
|
7
|
+
* The corners of the shells DeviceMesh casts with, in the device's own frame (Three axes, the
|
|
8
|
+
* same units as `width`): the phone's slab; the laptop's base and its lid swung to `openAngle`
|
|
9
|
+
* about the hinge.
|
|
10
|
+
*
|
|
11
|
+
* The placements come from `laptopLayout` and `lidRotationX` themselves — the base's centre, the
|
|
12
|
+
* hinge, the lid's centre and the swing are read, not restated, so moving the layout moves these
|
|
13
|
+
* bounds with it. What is still derived here is the EXTENT of each shell, which the layout does
|
|
14
|
+
* not describe: the base is `w × t × d` about `baseY`, the lid is `w × h × t` reaching from the
|
|
15
|
+
* hinge, and the phone is `w × h × t` about its group. Those follow `deviceDimensions` directly,
|
|
16
|
+
* and a change to the SHELL GEOMETRY in DeviceMesh — not to its layout — still has to be made
|
|
17
|
+
* here too. The screen and glass planes cast nothing and are omitted.
|
|
18
|
+
*/
|
|
19
|
+
export declare function deviceShellCorners(kind: DeviceKind, width: number, openAngle: number): WorldPoint[];
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type SceneWorldTextV2 } from '../../composition/scene/index.js';
|
|
2
|
+
import { type TextBlockLayout } from './textLayout.js';
|
|
3
|
+
/**
|
|
4
|
+
* The largest world-text raster this renderer will allocate on either axis.
|
|
5
|
+
*
|
|
6
|
+
* Every world-text plane draws one texel per output pixel, so a wide block at 4K is a wide
|
|
7
|
+
* texture. WebGL2 itself guarantees only 2048, so the size a renderer may assume is not a
|
|
8
|
+
* property of WebGL — it is whatever the host admission floor is, and here that floor is
|
|
9
|
+
* `STUDIO_SHADOW_MAP_BUDGET`: `webGlRefusal` in `@cueframe/component-runtime`'s `webglProbe.ts`
|
|
10
|
+
* turns away every browser reporting a smaller `MAX_TEXTURE_SIZE` before a frame is captured.
|
|
11
|
+
*
|
|
12
|
+
* Derived from that constant rather than written again as its own literal, so the claim "this
|
|
13
|
+
* renderer never asks for a texture larger than the host was admitted to provide" is structural,
|
|
14
|
+
* not a coincidence two files have to keep agreeing on by hand. Written as its own 4096 it held
|
|
15
|
+
* only while the two numbers happened to match: moving the budget would have left this one
|
|
16
|
+
* behind, either refusing blocks every admitted host could draw or asking for a texture no host
|
|
17
|
+
* ever promised.
|
|
18
|
+
*
|
|
19
|
+
* An oversized block is refused with a path (`worldTextRasterSize` below), never resized to fit.
|
|
20
|
+
*/
|
|
21
|
+
export declare const WORLD_TEXT_MAX_TEXTURE = 4096;
|
|
22
|
+
/** The 2D drawing surface the rasterizer needs; a node test supplies a recording double. */
|
|
23
|
+
export interface TextRasterContext {
|
|
24
|
+
canvas: {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
28
|
+
font: string;
|
|
29
|
+
fillStyle: string;
|
|
30
|
+
textAlign: string;
|
|
31
|
+
textBaseline: string;
|
|
32
|
+
letterSpacing?: string;
|
|
33
|
+
clearRect(x: number, y: number, width: number, height: number): void;
|
|
34
|
+
fillText(text: string, x: number, y: number): void;
|
|
35
|
+
measureText(text: string): {
|
|
36
|
+
width: number;
|
|
37
|
+
fontBoundingBoxAscent?: number;
|
|
38
|
+
fontBoundingBoxDescent?: number;
|
|
39
|
+
actualBoundingBoxAscent?: number;
|
|
40
|
+
actualBoundingBoxDescent?: number;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The cache identity of one world-text raster: the resolved text, every typography field that
|
|
45
|
+
* changes a glyph's shape or place, and the reference scale.
|
|
46
|
+
*
|
|
47
|
+
* The identity is the content itself rather than a digest of it, so two different blocks cannot
|
|
48
|
+
* collide onto one texture — a hash's failure mode here is drawing the wrong words. It is
|
|
49
|
+
* deterministic and stable across instances and frames: content and typography are static within
|
|
50
|
+
* a shot, so a shot never rebuilds its own raster, and two shots that say the same thing at the
|
|
51
|
+
* same scale share one immutable texture.
|
|
52
|
+
*/
|
|
53
|
+
export type WorldTextRasterInput = SceneWorldTextV2 & {
|
|
54
|
+
width: number;
|
|
55
|
+
};
|
|
56
|
+
export declare function worldTextCacheKey(layer: WorldTextRasterInput, scale: number, index: number): string;
|
|
57
|
+
/** The raster's pixel size: the laid-out block, one texel per output pixel, refused if oversized. */
|
|
58
|
+
export declare function worldTextRasterSize(layout: TextBlockLayout, layerId: string, index: number): {
|
|
59
|
+
width: number;
|
|
60
|
+
height: number;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Draw one world-text layer's typed lines and runs onto a transparent 2D surface.
|
|
64
|
+
*
|
|
65
|
+
* The same lines, runs, colours and typography the DOM path uses, laid out by the same module:
|
|
66
|
+
* line boxes from `textBlockLayout`, the baseline from `lineBaselineY`, the alignment origin from
|
|
67
|
+
* `lineOriginX` over the measured run widths. Runs are drawn left to right at the alphabetic
|
|
68
|
+
* baseline, each in its own colour, so two-colour type comes out of the raster exactly as it
|
|
69
|
+
* comes out of the DOM. Text is drawn, never parsed: no markup path exists here either.
|
|
70
|
+
*
|
|
71
|
+
* The surface is cleared first and never filled, so everything outside a glyph stays transparent
|
|
72
|
+
* — the plane must composite onto the world, not sit on a card.
|
|
73
|
+
*
|
|
74
|
+
* Known bound: run boundaries are where the two text paths could still differ. Here each run is
|
|
75
|
+
* measured on its own and the advances are concatenated, so a run boundary is always a shaping
|
|
76
|
+
* boundary; the DOM path hands the browser one line of adjacent spans and lets it shape the line.
|
|
77
|
+
* Browsers do not kern or ligate across inline-element boundaries in practice, so the two agree on
|
|
78
|
+
* everything authored so far — but that is an observed behaviour, not a guarantee either path
|
|
79
|
+
* makes, and a face with cross-boundary shaping would move a coloured run by a fraction of a pixel
|
|
80
|
+
* on one path and not the other. What *is* guaranteed is everything above the run: the block box,
|
|
81
|
+
* the line boxes, the baselines and the alignment origin all come from `textLayout`, which both
|
|
82
|
+
* paths call. Closing the bound would mean shaping the whole line once and colouring glyph ranges,
|
|
83
|
+
* which needs a shaper this renderer does not have.
|
|
84
|
+
*/
|
|
85
|
+
export declare function drawWorldText(ctx: TextRasterContext, layer: WorldTextRasterInput, layout: TextBlockLayout, index: number): void;
|
|
86
|
+
/** The block layout of a world-text layer at an output scale; the plane is exactly this box. */
|
|
87
|
+
export declare function worldTextLayout(layer: WorldTextRasterInput, scale: number): TextBlockLayout;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { WorldTextRasterInput } from './worldTextRaster.js';
|
|
2
|
+
import { type Texture } from 'three';
|
|
3
|
+
import type { TextBlockLayout } from './textLayout.js';
|
|
4
|
+
import { type SceneActualResourceRegistrarV1 } from './v2/runtimeAllocations.js';
|
|
5
|
+
export interface WorldTextRasterRequest {
|
|
6
|
+
layer: WorldTextRasterInput;
|
|
7
|
+
layout: TextBlockLayout;
|
|
8
|
+
size: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
/** The layer's index in `spec.layers`, for error paths. */
|
|
13
|
+
index: number;
|
|
14
|
+
/** The renderer's maximum anisotropy; the plane is often seen at an angle. */
|
|
15
|
+
anisotropy: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Draw a world-text layer into a detached 2D canvas and wrap it as an sRGB texture.
|
|
19
|
+
*
|
|
20
|
+
* The canvas never enters the document: it is created, drawn once and handed to the GPU. The
|
|
21
|
+
* result is immutable — content and typography are static within a shot — which is what lets one
|
|
22
|
+
* raster be shared by content identity across layers and shots.
|
|
23
|
+
*
|
|
24
|
+
* Filtering: trilinear with the host's maximum anisotropy, because a world plane is routinely seen
|
|
25
|
+
* at an angle and at less than one texel per pixel. The alpha stays straight (not premultiplied):
|
|
26
|
+
* that is the pairing Three's `NormalBlending` expects, which multiplies colour by coverage at
|
|
27
|
+
* blend time. The cost is the usual one for a mipmapped straight-alpha texture — a heavily
|
|
28
|
+
* minified glyph edge averages toward the transparent black the canvas cleared to — and the fix,
|
|
29
|
+
* if a fixture ever shows it, is to turn mipmaps off here and rely on the anisotropic magnification
|
|
30
|
+
* path alone.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createWorldTextTexture(request: WorldTextRasterRequest, registerActual?: SceneActualResourceRegistrarV1): Texture;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StageCamera } from './camera.js';
|
|
3
|
+
import { type FocusSpec } from './dof.js';
|
|
4
|
+
export interface StageContextValue {
|
|
5
|
+
camera: StageCamera;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
focus?: FocusSpec;
|
|
9
|
+
}
|
|
10
|
+
export declare function useStage(): StageContextValue;
|
|
11
|
+
export interface PerspectiveStageProps {
|
|
12
|
+
camera?: Partial<StageCamera>;
|
|
13
|
+
/** Stage size in px. Defaults to the video frame. */
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
focus?: FocusSpec;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A CSS-3D stage: `perspective` derived from the camera fov, and a world group carrying the
|
|
22
|
+
* inverse camera pose so children placed with <StageLayer> orbit, dolly, and tilt together.
|
|
23
|
+
* Pairs 1:1 with ThreeCanvas's `stageCamera` — a layer at z=0 and a mesh at z=0 share pixels.
|
|
24
|
+
*/
|
|
25
|
+
export declare const PerspectiveStage: React.FC<PerspectiveStageProps>;
|
|
26
|
+
export interface StageLayerShadow {
|
|
27
|
+
opacity?: number;
|
|
28
|
+
blur?: number;
|
|
29
|
+
offsetY?: number;
|
|
30
|
+
}
|
|
31
|
+
export interface StageLayerProps {
|
|
32
|
+
x?: number;
|
|
33
|
+
y?: number;
|
|
34
|
+
z?: number;
|
|
35
|
+
rotX?: number;
|
|
36
|
+
rotY?: number;
|
|
37
|
+
rotZ?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Uniform scale applied after the rotations. A layer at depth `z` projects at `P / (P - z)`,
|
|
40
|
+
* so `(P - z) / P` cancels that and keeps the layer the size it would be at z=0.
|
|
41
|
+
*/
|
|
42
|
+
scale?: number;
|
|
43
|
+
/** Box size in px. Defaults to the stage size (a full-frame plane). */
|
|
44
|
+
width?: number;
|
|
45
|
+
height?: number;
|
|
46
|
+
/** Drop shadow from the layer's own silhouette. */
|
|
47
|
+
shadow?: StageLayerShadow;
|
|
48
|
+
style?: React.CSSProperties;
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A planar layer in the stage, centred on (x, y) relative to the frame centre and pushed to z.
|
|
53
|
+
* The layer re-provides the stage context sized to its own box, so a nested layer is centred on
|
|
54
|
+
* its parent layer's box; direct children of the stage are centred on the frame.
|
|
55
|
+
* Depth of field and shadows use CSS filters, which flatten this layer's own 3D children —
|
|
56
|
+
* nest further StageLayers only in layers without blur or shadow.
|
|
57
|
+
*/
|
|
58
|
+
export declare const StageLayer: React.FC<StageLayerProps>;
|
|
59
|
+
export interface ContactShadowProps {
|
|
60
|
+
/**
|
|
61
|
+
* Floor height in px, CSS y-down, measured from the centre of the *enclosing stage box*.
|
|
62
|
+
* That box is the composition frame at the top level, but a `StageLayer` re-provides the
|
|
63
|
+
* stage with its own width/height, so inside a layer `y` is measured from that layer's
|
|
64
|
+
* centre — nesting rebases the origin on purpose. Positive is below the centre.
|
|
65
|
+
*/
|
|
66
|
+
y: number;
|
|
67
|
+
width: number;
|
|
68
|
+
depth: number;
|
|
69
|
+
opacity?: number;
|
|
70
|
+
z?: number;
|
|
71
|
+
}
|
|
72
|
+
/** A soft elliptical shadow lying on the floor plane under a grounded object. */
|
|
73
|
+
export declare const ContactShadow: React.FC<ContactShadowProps>;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Matrix4 } from 'three';
|
|
2
|
+
import { sceneCameraPlanesV2 } from '../../composition/scene/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* One camera model for two renderers. Coordinates are CSS: x right, y down, z toward the
|
|
5
|
+
* viewer, origin at the frame center, units in pixels of the z=0 plane. `z` is an offset
|
|
6
|
+
* from the default eye distance (positive = further away). Rotations orbit the origin.
|
|
7
|
+
*/
|
|
8
|
+
export interface StageCamera {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
z: number;
|
|
12
|
+
rotX: number;
|
|
13
|
+
rotY: number;
|
|
14
|
+
rotZ: number;
|
|
15
|
+
fov: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const DEFAULT_CAMERA: StageCamera;
|
|
18
|
+
/** CSS `perspective` (eye distance) that makes a vertical `fov` see exactly `height` px at z=0. */
|
|
19
|
+
export declare function perspectiveFor(fov: number, height: number): number;
|
|
20
|
+
/** One ordered CSS transform op. Degrees for rotations, pixels for the translation. */
|
|
21
|
+
export type CameraOp = {
|
|
22
|
+
kind: 'translate3d';
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
z: number;
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'rotateX';
|
|
28
|
+
deg: number;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'rotateY';
|
|
31
|
+
deg: number;
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'rotateZ';
|
|
34
|
+
deg: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* The single source of truth for the world pose: the inverse camera pose as an ordered op
|
|
38
|
+
* list, translate first (rightmost applies first), then rotate. `worldTransform` serializes
|
|
39
|
+
* this list and `worldMatrix` composes it; neither may restate the order on its own, so the
|
|
40
|
+
* DOM stage and the Three rig cannot drift apart.
|
|
41
|
+
*/
|
|
42
|
+
export declare function cameraOps(c: StageCamera): CameraOp[];
|
|
43
|
+
/** Inverse camera pose for the world group, serialized from `cameraOps`. */
|
|
44
|
+
export declare function worldTransform(c: StageCamera): string;
|
|
45
|
+
export interface CameraKeyframe {
|
|
46
|
+
frame: number;
|
|
47
|
+
camera: Partial<StageCamera>;
|
|
48
|
+
/** Easing for the segment that ends at this keyframe. Linear when omitted. */
|
|
49
|
+
easing?: (t: number) => number;
|
|
50
|
+
}
|
|
51
|
+
export declare function resolveCamera(keyframes: CameraKeyframe[], frame: number, base?: StageCamera): StageCamera;
|
|
52
|
+
/**
|
|
53
|
+
* The ordered op list as a matrix in CSS coordinates.
|
|
54
|
+
*
|
|
55
|
+
* Exported for the CSS-side ORACLE only (`scene/__oracle__/cssProjection.ts`). `worldMatrix` and
|
|
56
|
+
* `projectCss` used to live here; slice W1 moved them into the gate, because the shipped bridge is
|
|
57
|
+
* `scene/coordinates.ts`'s `F`-conjugation and a second projection in runtime reach is exactly how
|
|
58
|
+
* two conventions drift apart. `w1-css-oracle-isolation.test.mjs` walks the scene lane's transitive
|
|
59
|
+
* import graph and asserts no SCENE runtime path imports the oracle.
|
|
60
|
+
*/
|
|
61
|
+
export declare function cameraOpsMatrix(c: StageCamera): Matrix4;
|
|
62
|
+
export interface ThreeCameraPose {
|
|
63
|
+
position: [number, number, number];
|
|
64
|
+
quaternion: [number, number, number, number];
|
|
65
|
+
fov: number;
|
|
66
|
+
aspect: number;
|
|
67
|
+
near: number;
|
|
68
|
+
far: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The same camera as a Three PerspectiveCamera pose (y-up). Camera pose C = M⁻¹ with the eye
|
|
72
|
+
* at (0,0,P); conjugating by diag(1,-1,1) converts CSS y-down to Three y-up.
|
|
73
|
+
*/
|
|
74
|
+
export declare function cameraToThree(c: StageCamera, width: number, height: number): ThreeCameraPose;
|
|
75
|
+
/** Decision 1's default vertical FOV, in RADIANS. Degrees appear only at three's own `fov` API. */
|
|
76
|
+
export declare const SCENE_DEFAULT_FOV: number;
|
|
77
|
+
/**
|
|
78
|
+
* Sec.5.3's inclusive fov bounds, in radians (18deg..80deg).
|
|
79
|
+
*
|
|
80
|
+
* DECLARED HERE, ENFORCED BY W3. Nothing in W1 reads them: the renderer takes an already-valid
|
|
81
|
+
* shot, and the refusal outside these bounds is a schema refusal at `camera.fov`, which the
|
|
82
|
+
* ownership map gives to W3 along with every other refusal code. They are stated next to the
|
|
83
|
+
* camera they bound rather than invented twice, and they move with the refusal when W3 lands.
|
|
84
|
+
*/
|
|
85
|
+
export declare const SCENE_FOV_MIN: number;
|
|
86
|
+
export declare const SCENE_FOV_MAX: number;
|
|
87
|
+
/**
|
|
88
|
+
* The eye distance that makes the Z = 0 plane exactly 1:1 with reference pixels:
|
|
89
|
+
* `referenceHeight / (2 * tan(fov / 2))`. Verified by `i0ProjectionParity.test.ts`'s self-check,
|
|
90
|
+
* which projects the world origin to (960, 540) and world y = referenceHeight/2 to y = 0, exactly.
|
|
91
|
+
*/
|
|
92
|
+
export declare function sceneEyeDistance(referenceHeight: number, fov: number): number;
|
|
93
|
+
/**
|
|
94
|
+
* An authored scene camera. `position` is ABSOLUTE (not V1's offset from the eye distance),
|
|
95
|
+
* `rotation` is radians in Euler XYZ, `fov` is radians.
|
|
96
|
+
*
|
|
97
|
+
* NOTE FOR W3: report Sec.5.3's `SceneCameraV2`. Declared here until W3 owns the wire schema.
|
|
98
|
+
*/
|
|
99
|
+
export interface SceneCameraV2 {
|
|
100
|
+
position: [number, number, number];
|
|
101
|
+
rotation: [number, number, number];
|
|
102
|
+
fov: number;
|
|
103
|
+
}
|
|
104
|
+
/** The default camera of Sec.5.3 for one reference height. */
|
|
105
|
+
export declare function defaultSceneCamera(referenceHeight: number, fov?: number): SceneCameraV2;
|
|
106
|
+
/** A fiber `PerspectiveCamera`'s complete state, in output pixels. `fov` stays in RADIANS. */
|
|
107
|
+
export interface SceneCameraPose {
|
|
108
|
+
position: [number, number, number];
|
|
109
|
+
quaternion: [number, number, number, number];
|
|
110
|
+
fov: number;
|
|
111
|
+
aspect: number;
|
|
112
|
+
near: number;
|
|
113
|
+
far: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The depth planes, from the REFERENCE eye distance rather than from the authored camera z.
|
|
117
|
+
*
|
|
118
|
+
* Deliberate, and it is what makes the V1 and V2 lanes comparable: V1's planes are `P/100` and
|
|
119
|
+
* `P*40` for `P = perspectiveFor(fov, outputHeight)`, a function of fov and output height alone.
|
|
120
|
+
* Deriving them from the authored camera position instead would make the two contracts disagree
|
|
121
|
+
* about depth precision on a shot whose camera has dollied, which is not a coordinate question.
|
|
122
|
+
* `referenceHeight * scale` IS the output height, so this is V1's number exactly.
|
|
123
|
+
*/
|
|
124
|
+
export declare const sceneCameraPlanes: typeof sceneCameraPlanesV2;
|
|
125
|
+
/** An authored (Three-native) scene camera as a fiber camera pose, in output pixels. */
|
|
126
|
+
export declare function sceneCameraPose(camera: SceneCameraV2, referenceHeight: number, scale: number, frame: {
|
|
127
|
+
width: number;
|
|
128
|
+
height: number;
|
|
129
|
+
}): SceneCameraPose;
|
|
130
|
+
/**
|
|
131
|
+
* The V1 scene camera (Y-down, degrees, `z` an OFFSET from the eye distance, rotations orbiting the
|
|
132
|
+
* origin) as the same pose, in closed form.
|
|
133
|
+
*
|
|
134
|
+
* `pose_css = Rz(rotZ)*Ry(rotY)*Rx(rotX)*T(x, y, z+P)`, and conjugating by `F` distributes over the
|
|
135
|
+
* product: `Rz(-rotZ)*Ry(rotY)*Rx(-rotX)*T(x, -y, z+P)`. The rotation is therefore an Euler in
|
|
136
|
+
* **ZYX** order, which is exactly why the V1 camera cannot be re-expressed as a V2 camera's XYZ
|
|
137
|
+
* angles and why this returns a pose rather than a `SceneCameraV2`. `x`, `y` and `z` arrive already
|
|
138
|
+
* scaled to output pixels.
|
|
139
|
+
*/
|
|
140
|
+
export declare function sceneCameraPoseFromV1(camera: StageCamera, referenceHeight: number, scale: number, frame: {
|
|
141
|
+
width: number;
|
|
142
|
+
height: number;
|
|
143
|
+
}): SceneCameraPose;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface FocusSpec {
|
|
2
|
+
/** World z of the focus plane (px). */
|
|
3
|
+
z: number;
|
|
4
|
+
/** Distance from the plane at which blur reaches maxBlur (px). */
|
|
5
|
+
range: number;
|
|
6
|
+
maxBlur: number;
|
|
7
|
+
}
|
|
8
|
+
/** Layer depth of field: blur radius for a planar layer at `layerZ`. */
|
|
9
|
+
export declare function dofBlur(layerZ: number, focus?: FocusSpec): number;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { DEFAULT_CAMERA, perspectiveFor, worldTransform, resolveCamera, cameraToThree, type StageCamera, type CameraKeyframe, type ThreeCameraPose } from './camera.js';
|
|
2
|
+
export { cameraOps, cameraOpsMatrix, type CameraOp } from './camera.js';
|
|
3
|
+
export { SCENE_DEFAULT_FOV, SCENE_FOV_MIN, SCENE_FOV_MAX, sceneEyeDistance, defaultSceneCamera, sceneCameraPlanes, sceneCameraPose, sceneCameraPoseFromV1, type SceneCameraV2, type SceneCameraPose, } from './camera.js';
|
|
4
|
+
export { CAMERA_PRESETS, dollyIn, dollyOut, drift, tiltReveal, orbit, type CameraMove, type PresetOptions } from './presets.js';
|
|
5
|
+
export { dofBlur, type FocusSpec } from './dof.js';
|
|
6
|
+
export { PerspectiveStage, StageLayer, ContactShadow, useStage, type StageContextValue, type PerspectiveStageProps, type StageLayerProps, type StageLayerShadow, type ContactShadowProps } from './PerspectiveStage.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CameraKeyframe } from './camera.js';
|
|
2
|
+
export type CameraMove = 'static' | 'dolly-in' | 'dolly-out' | 'drift' | 'tilt-reveal' | 'orbit';
|
|
3
|
+
export interface PresetOptions {
|
|
4
|
+
fov?: number;
|
|
5
|
+
/** Move magnitude: px for dolly/drift, degrees for tilt/orbit. */
|
|
6
|
+
amount?: number;
|
|
7
|
+
easing?: (t: number) => number;
|
|
8
|
+
}
|
|
9
|
+
type Preset = (durationInFrames: number, opts?: PresetOptions) => CameraKeyframe[];
|
|
10
|
+
export declare const dollyIn: Preset;
|
|
11
|
+
export declare const dollyOut: Preset;
|
|
12
|
+
/** A slow lateral glide with a few degrees of orbit — nothing sits perfectly still. */
|
|
13
|
+
export declare const drift: Preset;
|
|
14
|
+
export declare const tiltReveal: Preset;
|
|
15
|
+
export declare const orbit: Preset;
|
|
16
|
+
export declare const CAMERA_PRESETS: Record<CameraMove, Preset>;
|
|
17
|
+
export {};
|