@allyhub/sdk 0.1.0-alpha.8 → 0.2.0-next.0
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/NOTICE +85 -0
- package/client.d.ts +45 -1
- package/dist/anim.js +2 -75
- package/dist/define.d.ts +10 -4
- package/dist/define.js +2 -95
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +2 -457
- package/dist/fit.js +2 -60
- package/dist/free.d.ts +18 -0
- package/dist/free.js +2 -0
- package/dist/index.d.ts +28 -13
- package/dist/index.js +2 -11
- package/dist/input.d.ts +306 -0
- package/dist/input.js +2 -0
- package/dist/media.d.ts +3 -6
- package/dist/media.js +2 -27
- package/dist/messages.d.ts +3 -2
- package/dist/messages.js +2 -2
- package/dist/module.d.ts +24 -0
- package/dist/module.js +2 -0
- package/dist/noise.js +2 -233
- package/dist/parts.d.ts +97 -21
- package/dist/parts.js +2 -414
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +2 -720
- package/dist/phone.d.ts +26 -0
- package/dist/phone.js +2 -0
- package/dist/piece.d.ts +106 -35
- package/dist/piece.js +2 -38
- package/dist/props.d.ts +1 -1
- package/dist/props.js +2 -35
- package/dist/scenery.d.ts +2 -0
- package/dist/scenery.js +2 -0
- package/dist/text.js +2 -38
- package/dist/written.d.ts +12 -0
- package/dist/written.js +2 -0
- package/docs/README.md +18 -0
- package/docs/batches.md +148 -0
- package/docs/contract.md +51 -0
- package/docs/defaults.md +703 -0
- package/docs/docs.md +148 -0
- package/docs/footage.md +249 -0
- package/docs/layers.md +317 -0
- package/docs/modeling.md +143 -0
- package/docs/project.md +265 -0
- package/docs/scenery.md +308 -0
- package/docs/sheets.md +119 -0
- package/docs/slides.md +111 -0
- package/docs/sound.md +170 -0
- package/docs/speech.md +289 -0
- package/docs/video.md +265 -0
- package/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +52 -0
- package/node_modules/@allyhub-next/audio/dist/at-cut.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/decode.d.ts +33 -0
- package/node_modules/@allyhub-next/audio/dist/decode.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/envelope.d.ts +37 -0
- package/node_modules/@allyhub-next/audio/dist/envelope.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/index.d.ts +17 -0
- package/node_modules/@allyhub-next/audio/dist/index.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/levels.d.ts +97 -0
- package/node_modules/@allyhub-next/audio/dist/levels.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/master.d.ts +29 -0
- package/node_modules/@allyhub-next/audio/dist/master.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/music.d.ts +11 -0
- package/node_modules/@allyhub-next/audio/dist/music.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +39 -0
- package/node_modules/@allyhub-next/audio/dist/node/decode.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +25 -0
- package/node_modules/@allyhub-next/audio/dist/node/ebur128.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +31 -0
- package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/index.d.ts +8 -0
- package/node_modules/@allyhub-next/audio/dist/node/index.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +18 -0
- package/node_modules/@allyhub-next/audio/dist/node/loudness.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/master.d.ts +42 -0
- package/node_modules/@allyhub-next/audio/dist/node/master.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +60 -0
- package/node_modules/@allyhub-next/audio/dist/node/measure.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +31 -0
- package/node_modules/@allyhub-next/audio/dist/node/mix.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/plan.d.ts +143 -0
- package/node_modules/@allyhub-next/audio/dist/plan.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recorded.d.ts +26 -0
- package/node_modules/@allyhub-next/audio/dist/recorded.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +47 -0
- package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +89 -0
- package/node_modules/@allyhub-next/audio/dist/recording/chain.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +64 -0
- package/node_modules/@allyhub-next/audio/dist/recording/dynamics.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +26 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fft.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +42 -0
- package/node_modules/@allyhub-next/audio/dist/recording/filters.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +56 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fit.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +10 -0
- package/node_modules/@allyhub-next/audio/dist/recording/index.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +12 -0
- package/node_modules/@allyhub-next/audio/dist/recording/loudness.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +67 -0
- package/node_modules/@allyhub-next/audio/dist/recording/measure.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +32 -0
- package/node_modules/@allyhub-next/audio/dist/recording/mic.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +27 -0
- package/node_modules/@allyhub-next/audio/dist/recording/noise.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +64 -0
- package/node_modules/@allyhub-next/audio/dist/recording/presets.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +78 -0
- package/node_modules/@allyhub-next/audio/dist/recording/room.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +111 -0
- package/node_modules/@allyhub-next/audio/dist/recording/setup.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +3 -0
- package/node_modules/@allyhub-next/audio/dist/recording/vec.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/render.d.ts +26 -0
- package/node_modules/@allyhub-next/audio/dist/render.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/sfx.d.ts +10 -0
- package/node_modules/@allyhub-next/audio/dist/sfx.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/shape.d.ts +118 -0
- package/node_modules/@allyhub-next/audio/dist/shape.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/voice.d.ts +45 -0
- package/node_modules/@allyhub-next/audio/dist/voice.js +2 -0
- package/node_modules/@allyhub-next/audio/package.json +17 -0
- package/node_modules/@allyhub-next/formats/dist/data/comments.d.ts +94 -0
- package/node_modules/@allyhub-next/formats/dist/data/comments.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/config.d.ts +10 -0
- package/node_modules/@allyhub-next/formats/dist/data/config.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/edits.d.ts +28 -0
- package/node_modules/@allyhub-next/formats/dist/data/edits.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/elements.d.ts +6 -0
- package/node_modules/@allyhub-next/formats/dist/data/elements.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/faces.d.ts +38 -0
- package/node_modules/@allyhub-next/formats/dist/data/faces.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/file.d.ts +11 -0
- package/node_modules/@allyhub-next/formats/dist/data/file.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/gen.d.ts +31 -0
- package/node_modules/@allyhub-next/formats/dist/data/gen.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/messages.d.ts +34 -0
- package/node_modules/@allyhub-next/formats/dist/data/messages.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/reference.d.ts +676 -0
- package/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +37 -0
- package/node_modules/@allyhub-next/formats/dist/data/script.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +214 -0
- package/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/words.d.ts +25 -0
- package/node_modules/@allyhub-next/formats/dist/data/words.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/index.d.ts +16 -0
- package/node_modules/@allyhub-next/formats/dist/index.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/items.d.ts +94 -0
- package/node_modules/@allyhub-next/formats/dist/items.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/layout.d.ts +50 -0
- package/node_modules/@allyhub-next/formats/dist/layout.js +5 -0
- package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +301 -0
- package/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
- package/node_modules/@allyhub-next/formats/package.json +14 -0
- package/node_modules/@allyhub-next/formats/schemas/comments.schema.json +152 -0
- package/node_modules/@allyhub-next/formats/schemas/config.schema.json +43 -0
- package/node_modules/@allyhub-next/formats/schemas/edits.schema.json +112 -0
- package/node_modules/@allyhub-next/formats/schemas/elements.schema.json +33 -0
- package/node_modules/@allyhub-next/formats/schemas/gen.schema.json +97 -0
- package/node_modules/@allyhub-next/formats/schemas/interpretation.schema.json +125 -0
- package/node_modules/@allyhub-next/formats/schemas/items.json +75 -0
- package/node_modules/@allyhub-next/formats/schemas/messages.schema.json +11 -0
- package/node_modules/@allyhub-next/formats/schemas/script.schema.json +162 -0
- package/node_modules/@allyhub-next/formats/schemas/sheet.schema.json +395 -0
- package/node_modules/@allyhub-next/formats/schemas/words.schema.json +63 -0
- package/node_modules/@allyhub-next/protocol/dist/app.d.ts +98 -0
- package/node_modules/@allyhub-next/protocol/dist/app.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +116 -0
- package/node_modules/@allyhub-next/protocol/dist/auth.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +59 -0
- package/node_modules/@allyhub-next/protocol/dist/cli.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +272 -0
- package/node_modules/@allyhub-next/protocol/dist/cloud.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +405 -0
- package/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/files.d.ts +101 -0
- package/node_modules/@allyhub-next/protocol/dist/files.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/index.d.ts +12 -0
- package/node_modules/@allyhub-next/protocol/dist/index.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/jsonrpc.d.ts +83 -0
- package/node_modules/@allyhub-next/protocol/dist/jsonrpc.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +53 -0
- package/node_modules/@allyhub-next/protocol/dist/registry.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +93 -0
- package/node_modules/@allyhub-next/protocol/dist/runtimes.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +67 -0
- package/node_modules/@allyhub-next/protocol/dist/teams.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +345 -0
- package/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
- package/node_modules/@allyhub-next/protocol/package.json +13 -0
- package/node_modules/@allyhub-next/runtimes/dist/bundled.d.ts +10 -0
- package/node_modules/@allyhub-next/runtimes/dist/bundled.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/download.d.ts +15 -0
- package/node_modules/@allyhub-next/runtimes/dist/download.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +16 -0
- package/node_modules/@allyhub-next/runtimes/dist/errors.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/home.d.ts +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/home.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +9 -0
- package/node_modules/@allyhub-next/runtimes/dist/index.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
- package/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/manifest.d.ts +3 -0
- package/node_modules/@allyhub-next/runtimes/dist/manifest.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +63 -0
- package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -0
- package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
- package/node_modules/@allyhub-next/runtimes/dist/unpack.js +2 -0
- package/node_modules/@allyhub-next/runtimes/manifest.json +395 -0
- package/node_modules/@allyhub-next/runtimes/package.json +14 -0
- package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +153 -0
- package/node_modules/@allyhub-next/scenery/NOTICE +42 -0
- package/node_modules/@allyhub-next/scenery/dist/aim.d.ts +55 -0
- package/node_modules/@allyhub-next/scenery/dist/aim.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/bake.d.ts +203 -0
- package/node_modules/@allyhub-next/scenery/dist/bake.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/camera.d.ts +150 -0
- package/node_modules/@allyhub-next/scenery/dist/camera.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/curve.d.ts +40 -0
- package/node_modules/@allyhub-next/scenery/dist/curve.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/define.d.ts +164 -0
- package/node_modules/@allyhub-next/scenery/dist/define.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/fit.d.ts +64 -0
- package/node_modules/@allyhub-next/scenery/dist/fit.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/glass.d.ts +34 -0
- package/node_modules/@allyhub-next/scenery/dist/glass.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/handheld.d.ts +184 -0
- package/node_modules/@allyhub-next/scenery/dist/handheld.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/hull.d.ts +23 -0
- package/node_modules/@allyhub-next/scenery/dist/hull.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/index.d.ts +22 -0
- package/node_modules/@allyhub-next/scenery/dist/index.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/lens.d.ts +48 -0
- package/node_modules/@allyhub-next/scenery/dist/lens.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/moire.d.ts +136 -0
- package/node_modules/@allyhub-next/scenery/dist/moire.js +93 -0
- package/node_modules/@allyhub-next/scenery/dist/motion.d.ts +48 -0
- package/node_modules/@allyhub-next/scenery/dist/motion.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/move.d.ts +260 -0
- package/node_modules/@allyhub-next/scenery/dist/move.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/noise.d.ts +41 -0
- package/node_modules/@allyhub-next/scenery/dist/noise.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/phone.d.ts +34 -0
- package/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/report.d.ts +677 -0
- package/node_modules/@allyhub-next/scenery/dist/report.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/screen-focus.d.ts +55 -0
- package/node_modules/@allyhub-next/scenery/dist/screen-focus.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/screen.d.ts +71 -0
- package/node_modules/@allyhub-next/scenery/dist/screen.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/solve.d.ts +82 -0
- package/node_modules/@allyhub-next/scenery/dist/solve.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/timing.d.ts +26 -0
- package/node_modules/@allyhub-next/scenery/dist/timing.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/vec.d.ts +19 -0
- package/node_modules/@allyhub-next/scenery/dist/vec.js +2 -0
- package/node_modules/@allyhub-next/scenery/package.json +13 -0
- package/node_modules/@allyhub-next/video-core/dist/anchors.d.ts +164 -0
- package/node_modules/@allyhub-next/video-core/dist/anchors.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/audio-types.d.ts +148 -0
- package/node_modules/@allyhub-next/video-core/dist/audio-types.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/backdrop.d.ts +87 -0
- package/node_modules/@allyhub-next/video-core/dist/backdrop.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/captions.d.ts +122 -0
- package/node_modules/@allyhub-next/video-core/dist/captions.js +11 -0
- package/node_modules/@allyhub-next/video-core/dist/console.d.ts +91 -0
- package/node_modules/@allyhub-next/video-core/dist/console.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/contrast.d.ts +98 -0
- package/node_modules/@allyhub-next/video-core/dist/contrast.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/cut-report.d.ts +77 -0
- package/node_modules/@allyhub-next/video-core/dist/cut-report.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/edit.d.ts +77 -0
- package/node_modules/@allyhub-next/video-core/dist/edit.js +13 -0
- package/node_modules/@allyhub-next/video-core/dist/edits.d.ts +163 -0
- package/node_modules/@allyhub-next/video-core/dist/edits.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/export.d.ts +96 -0
- package/node_modules/@allyhub-next/video-core/dist/export.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +965 -0
- package/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/footage-motion.d.ts +168 -0
- package/node_modules/@allyhub-next/video-core/dist/footage-motion.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +240 -0
- package/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/gen.d.ts +37 -0
- package/node_modules/@allyhub-next/video-core/dist/gen.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/index.d.ts +40 -0
- package/node_modules/@allyhub-next/video-core/dist/index.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/look.d.ts +66 -0
- package/node_modules/@allyhub-next/video-core/dist/look.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/marks.d.ts +34 -0
- package/node_modules/@allyhub-next/video-core/dist/marks.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/matrix.d.ts +289 -0
- package/node_modules/@allyhub-next/video-core/dist/matrix.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +465 -0
- package/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
- package/node_modules/@allyhub-next/video-core/dist/media.d.ts +226 -0
- package/node_modules/@allyhub-next/video-core/dist/media.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/messages.d.ts +88 -0
- package/node_modules/@allyhub-next/video-core/dist/messages.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/motion.d.ts +56 -0
- package/node_modules/@allyhub-next/video-core/dist/motion.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/music.d.ts +110 -0
- package/node_modules/@allyhub-next/video-core/dist/music.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +1146 -0
- package/node_modules/@allyhub-next/video-core/dist/piece.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/placement.d.ts +37 -0
- package/node_modules/@allyhub-next/video-core/dist/placement.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +262 -0
- package/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/render-types.d.ts +49 -0
- package/node_modules/@allyhub-next/video-core/dist/render-types.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +352 -0
- package/node_modules/@allyhub-next/video-core/dist/schema.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +176 -0
- package/node_modules/@allyhub-next/video-core/dist/script-edit.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/script.d.ts +67 -0
- package/node_modules/@allyhub-next/video-core/dist/script.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/seams.d.ts +214 -0
- package/node_modules/@allyhub-next/video-core/dist/seams.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +37 -0
- package/node_modules/@allyhub-next/video-core/dist/slides.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/sound-under.d.ts +72 -0
- package/node_modules/@allyhub-next/video-core/dist/sound-under.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/speech.d.ts +83 -0
- package/node_modules/@allyhub-next/video-core/dist/speech.js +5 -0
- package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +616 -0
- package/node_modules/@allyhub-next/video-core/dist/timeline.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/timing.d.ts +88 -0
- package/node_modules/@allyhub-next/video-core/dist/timing.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/transcript.d.ts +288 -0
- package/node_modules/@allyhub-next/video-core/dist/transcript.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/transition.d.ts +289 -0
- package/node_modules/@allyhub-next/video-core/dist/transition.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/voice.d.ts +175 -0
- package/node_modules/@allyhub-next/video-core/dist/voice.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/words.d.ts +128 -0
- package/node_modules/@allyhub-next/video-core/dist/words.js +2 -0
- package/node_modules/@allyhub-next/video-core/package.json +14 -0
- package/package.json +52 -41
- package/README.md +0 -17
- package/dist/anim.d.ts.map +0 -1
- package/dist/anim.js.map +0 -1
- package/dist/define.d.ts.map +0 -1
- package/dist/define.js.map +0 -1
- package/dist/dom.d.ts.map +0 -1
- package/dist/dom.js.map +0 -1
- package/dist/fit.d.ts.map +0 -1
- package/dist/fit.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/media.d.ts.map +0 -1
- package/dist/media.js.map +0 -1
- package/dist/messages.d.ts.map +0 -1
- package/dist/messages.js.map +0 -1
- package/dist/noise.d.ts.map +0 -1
- package/dist/noise.js.map +0 -1
- package/dist/parts.d.ts.map +0 -1
- package/dist/parts.js.map +0 -1
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js.map +0 -1
- package/dist/piece.d.ts.map +0 -1
- package/dist/piece.js.map +0 -1
- package/dist/props.d.ts.map +0 -1
- package/dist/props.js.map +0 -1
- package/dist/text.d.ts.map +0 -1
- package/dist/text.js.map +0 -1
- /package/{LICENSE → LICENSE.md} +0 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"$schema": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"version": {
|
|
9
|
+
"type": "number",
|
|
10
|
+
"const": 1
|
|
11
|
+
},
|
|
12
|
+
"runtimes": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"propertyNames": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
|
17
|
+
},
|
|
18
|
+
"additionalProperties": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"about": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1
|
|
24
|
+
},
|
|
25
|
+
"version": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1
|
|
28
|
+
},
|
|
29
|
+
"license": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1
|
|
32
|
+
},
|
|
33
|
+
"homepage": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"format": "uri"
|
|
36
|
+
},
|
|
37
|
+
"platforms": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"propertyNames": {
|
|
40
|
+
"anyOf": [
|
|
41
|
+
{
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": [
|
|
44
|
+
"darwin-arm64",
|
|
45
|
+
"darwin-x64",
|
|
46
|
+
"linux-x64",
|
|
47
|
+
"linux-arm64",
|
|
48
|
+
"win32-x64"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "string",
|
|
53
|
+
"const": "any"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"additionalProperties": {
|
|
58
|
+
"minItems": 1,
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"url": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"format": "uri"
|
|
66
|
+
},
|
|
67
|
+
"sha256": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
70
|
+
},
|
|
71
|
+
"size": {
|
|
72
|
+
"type": "integer",
|
|
73
|
+
"exclusiveMinimum": 0,
|
|
74
|
+
"maximum": 9007199254740991
|
|
75
|
+
},
|
|
76
|
+
"unpack": {
|
|
77
|
+
"default": "none",
|
|
78
|
+
"type": "string",
|
|
79
|
+
"enum": [
|
|
80
|
+
"none",
|
|
81
|
+
"zip",
|
|
82
|
+
"tgz"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"name": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"minLength": 1
|
|
88
|
+
},
|
|
89
|
+
"check": {
|
|
90
|
+
"default": [],
|
|
91
|
+
"type": "array",
|
|
92
|
+
"items": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"properties": {
|
|
95
|
+
"path": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"minLength": 1
|
|
98
|
+
},
|
|
99
|
+
"sha256": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"required": [
|
|
105
|
+
"path",
|
|
106
|
+
"sha256"
|
|
107
|
+
],
|
|
108
|
+
"additionalProperties": false
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"executable": {
|
|
112
|
+
"default": false,
|
|
113
|
+
"type": "boolean"
|
|
114
|
+
},
|
|
115
|
+
"bins": {
|
|
116
|
+
"default": {},
|
|
117
|
+
"type": "object",
|
|
118
|
+
"propertyNames": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
|
121
|
+
},
|
|
122
|
+
"additionalProperties": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"minLength": 1
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": [
|
|
129
|
+
"url",
|
|
130
|
+
"sha256",
|
|
131
|
+
"size"
|
|
132
|
+
],
|
|
133
|
+
"additionalProperties": false
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"about",
|
|
140
|
+
"version",
|
|
141
|
+
"license",
|
|
142
|
+
"platforms"
|
|
143
|
+
],
|
|
144
|
+
"additionalProperties": false
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"required": [
|
|
149
|
+
"version",
|
|
150
|
+
"runtimes"
|
|
151
|
+
],
|
|
152
|
+
"additionalProperties": false
|
|
153
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
AllyHub
|
|
2
|
+
Copyright (c) 2026 AllyHub, Inc. All rights reserved.
|
|
3
|
+
|
|
4
|
+
This product is proprietary; see LICENSE.
|
|
5
|
+
|
|
6
|
+
The centripetal Catmull-Rom tangents in src/curve.ts follow three.js's
|
|
7
|
+
CatmullRomCurve3 (src/extras/curves/CatmullRomCurve3.js)
|
|
8
|
+
(https://github.com/mrdoob/three.js),
|
|
9
|
+
Copyright 2010-2026 three.js authors, under the MIT License:
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
12
|
+
copy of this software and associated documentation files (the
|
|
13
|
+
"Software"), to deal in the Software without restriction, including
|
|
14
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
15
|
+
distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
16
|
+
persons to whom the Software is furnished to do so, subject to the
|
|
17
|
+
following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included
|
|
20
|
+
in all copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
23
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
24
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
25
|
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
26
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
27
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
28
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
29
|
+
|
|
30
|
+
The arc-length parametrisation (Gauss-Legendre quadrature per segment,
|
|
31
|
+
inverted by Newton steps with a bisection fallback) and the timing of
|
|
32
|
+
keyframes by a monotone cubic follow the approach of the splines library
|
|
33
|
+
(https://github.com/AudioSceneDescriptionFormat/splines), Copyright (c)
|
|
34
|
+
2018-2026 Matthias Geier, under the MIT License (the same terms as above).
|
|
35
|
+
No code of it is copied.
|
|
36
|
+
|
|
37
|
+
The moiré a sensor makes of a screen (src/moire.ts) follows
|
|
38
|
+
the screen-capture simulation of UniDemoiré
|
|
39
|
+
(https://github.com/4DVLab/UniDemoire, unidemoire/models/shooting), Copyright
|
|
40
|
+
(c) 2024 4DVLab, under the MIT License: a screen's RGB subpixels, the
|
|
41
|
+
projective transform, the sensor's Bayer filter. It is worked out in closed
|
|
42
|
+
form per pixel; no code of it is copied.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface AimOptions {
|
|
2
|
+
/**
|
|
3
|
+
* How far the primary movement goes past the target, as a share of the
|
|
4
|
+
* distance (negative: it falls short); the correction comes back.
|
|
5
|
+
*/
|
|
6
|
+
overshoot?: number;
|
|
7
|
+
/** When the primary movement's speed peaks, as a share of its time: under a half is a quick start and a longer settle. */
|
|
8
|
+
peak?: number;
|
|
9
|
+
/** The share of the whole time the primary movement takes; the correction overlaps its end and takes the rest. */
|
|
10
|
+
primary?: number;
|
|
11
|
+
/**
|
|
12
|
+
* How much a seed changes each of these from move to move, as a share
|
|
13
|
+
* of its value (the overshoot's from none to twice it at 1, the peak's
|
|
14
|
+
* and the primary share's a tenth of that).
|
|
15
|
+
*/
|
|
16
|
+
vary?: number;
|
|
17
|
+
/** Another seed or index is another move. */
|
|
18
|
+
seed?: number;
|
|
19
|
+
index?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare const AIM_DEFAULTS: {
|
|
22
|
+
overshoot: number;
|
|
23
|
+
peak: number;
|
|
24
|
+
primary: number;
|
|
25
|
+
vary: number;
|
|
26
|
+
seed: number;
|
|
27
|
+
index: number;
|
|
28
|
+
};
|
|
29
|
+
/** Why aim options cannot be used, or undefined. */
|
|
30
|
+
export declare function aimProblem(o: AimOptions, what?: string): string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The share of the way a movement has come, from 0 at its start to 1 at
|
|
33
|
+
* its end, over `s` from 0 to 1: a beta(3, b) distribution's cumulative,
|
|
34
|
+
* its speed peaking at `peak` (b = 2 / peak − 1), still at both ends.
|
|
35
|
+
*/
|
|
36
|
+
export declare function rise(s: number, peak: number): number;
|
|
37
|
+
/** What a move is, drawn from its options: its overshoot, its primary movement's peak and share. */
|
|
38
|
+
export interface AimShape {
|
|
39
|
+
overshoot: number;
|
|
40
|
+
peak: number;
|
|
41
|
+
primary: number;
|
|
42
|
+
}
|
|
43
|
+
/** A move's own shape: the options, each moved by its seed and index. */
|
|
44
|
+
export declare function aimShape(opts?: AimOptions): AimShape;
|
|
45
|
+
/**
|
|
46
|
+
* An aimed movement's progress over `x` from 0 to 1 (its share of the
|
|
47
|
+
* move's time): 0 at the start and 1 at the end, past 1 (or short of it)
|
|
48
|
+
* where the primary movement lands, still at both ends. Usable as an ease
|
|
49
|
+
* (blend's, keys'), and what handheld()'s reframes and the SDK's pointer
|
|
50
|
+
* moves are drawn with.
|
|
51
|
+
*/
|
|
52
|
+
export declare function aimed(opts?: AimOptions): (x: number) => number;
|
|
53
|
+
/** aimed()'s progress for a shape already drawn. */
|
|
54
|
+
export declare function aimAt(shape: AimShape, x: number): number;
|
|
55
|
+
//# sourceMappingURL=aim.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{unit3 as u}from"./noise.js";export const AIM_DEFAULTS={overshoot:.08,peak:.38,primary:.72,vary:.5,seed:1,index:0};export function aimProblem(e,r="aim"){const t=(n,o,i,s)=>n!==void 0&&!(Number.isFinite(n)&&n>=i&&n<=s)?`${r}'s ${o} is from ${String(i)} to ${String(s)}, not ${String(n)}`:void 0;return t(e.overshoot,"overshoot",-.5,1)??t(e.peak,"peak",.15,.6)??t(e.primary,"primary",.3,1)??t(e.vary,"vary",0,1)??(e.seed!==void 0&&!Number.isInteger(e.seed)?`${r}'s seed is a whole number, not ${String(e.seed)}`:void 0)}export function rise(e,r){if(e<=0)return 0;if(e>=1)return 1;const t=2/r-1,n=1-e,o=n**t;return 1-t*(t+1)*(t+2)/2*(o/t-2*o*n/(t+1)+o*n*n/(t+2))}const a=(e,r,t)=>2*u(e,r,t)-1;export function aimShape(e={}){const r={...AIM_DEFAULTS,...e},t=r.vary;return{overshoot:r.overshoot*(1+2*t*a(r.seed,r.index,1)),peak:Math.min(.6,Math.max(.15,r.peak*(1+.2*t*a(r.seed,r.index,2)))),primary:Math.min(1,Math.max(.3,r.primary*(1+.2*t*a(r.seed,r.index,3))))}}export function aimed(e={}){const r=aimProblem(e);if(r)throw new Error(r);const t=aimShape(e);return n=>aimAt(t,n)}export function aimAt(e,r){if(r<=0)return 0;if(r>=1)return 1;const t=1+e.overshoot,n=e.primary;if(n>=1||Math.abs(e.overshoot)<1e-9)return rise(r,e.peak);const o=n*.8,i=t*rise(r/n,e.peak),s=(1-t)*rise((r-o)/(1-o),.45);return i+s}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import type { Vec3 } from "./vec.js";
|
|
2
|
+
/** What a bake can be told: every value has a default (BAKE_DEFAULTS). */
|
|
3
|
+
export interface BakeOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Texels per metre on a surface of weight 1 (default 40: a texel of
|
|
6
|
+
* 2.5 cm). The atlas's side follows from the surfaces' area.
|
|
7
|
+
*/
|
|
8
|
+
density?: number;
|
|
9
|
+
/** The atlas's largest side, texels (default 2048): a denser bake is made coarser to fit. */
|
|
10
|
+
maxSize?: number;
|
|
11
|
+
/**
|
|
12
|
+
* The fewest texels a mesh gets (default 128): a mesh the density would
|
|
13
|
+
* give fewer (a key, a foot) gets more weight until it has about this many.
|
|
14
|
+
*/
|
|
15
|
+
minTexels?: number;
|
|
16
|
+
/**
|
|
17
|
+
* The fewest texels a mesh's typical island gets (default 16): a mesh made
|
|
18
|
+
* of many small separate pieces (a keyboard's keys in one mesh) gets more
|
|
19
|
+
* weight until the island at the median of its area has about this many,
|
|
20
|
+
* so each piece takes its own light rather than a texel shared with its
|
|
21
|
+
* neighbours.
|
|
22
|
+
*/
|
|
23
|
+
islandTexels?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Use a mesh's own texture coordinates (uv) for its lightmap when they
|
|
26
|
+
* already lay it out without overlaps inside 0..1, as a model's baked
|
|
27
|
+
* textures need, instead of unwrapping it (default true: unwrapping a dense
|
|
28
|
+
* mesh takes minutes).
|
|
29
|
+
*/
|
|
30
|
+
ownUv?: boolean;
|
|
31
|
+
/** Rays each texel gathers per round (default 16). */
|
|
32
|
+
samples?: number;
|
|
33
|
+
/** Light bounced from surface to surface, rounds after the direct light (default 4). */
|
|
34
|
+
bounces?: number;
|
|
35
|
+
/**
|
|
36
|
+
* An object's share of the atlas, by its name or an ancestor's: its
|
|
37
|
+
* texels per metre are multiplied by it (default 1). What the camera
|
|
38
|
+
* comes close to is worth more.
|
|
39
|
+
*/
|
|
40
|
+
weight?: Readonly<Record<string, number>>;
|
|
41
|
+
/** Meshes, by their name or an ancestor's, left without a lightmap: they still cast shadows and bounce light, and stay lit by the scene's lights. */
|
|
42
|
+
skip?: readonly string[];
|
|
43
|
+
/** Meshes, by their name or an ancestor's, the bake does not see at all: no lightmap, no shadow, no bounce. */
|
|
44
|
+
ignore?: readonly string[];
|
|
45
|
+
/**
|
|
46
|
+
* Each round smoothed keeping edges: its radius in texels, and how much
|
|
47
|
+
* farther than their places in the atlas imply two texels may be, in
|
|
48
|
+
* metres beyond a texel's width, and still be averaged (defaults 3, 0.02).
|
|
49
|
+
*/
|
|
50
|
+
denoise?: {
|
|
51
|
+
radius?: number;
|
|
52
|
+
distance?: number;
|
|
53
|
+
};
|
|
54
|
+
/** The most irradiance one sample may add, so a ray that grazes a light leaves no speck (default 40). */
|
|
55
|
+
clamp?: number;
|
|
56
|
+
/** Atlas texels a draw covers each way: smaller draws keep a GPU from timing out (default 256). */
|
|
57
|
+
tile?: number;
|
|
58
|
+
/**
|
|
59
|
+
* The moments, s of scenery time, the scenery is posed at to find what
|
|
60
|
+
* moves (default 0.5, 1, 2, 4, 8, 16, 32): a mesh that moves gets no
|
|
61
|
+
* lightmap and is left out of the bake's shadows, and a light that moves
|
|
62
|
+
* is not baked.
|
|
63
|
+
*/
|
|
64
|
+
posedAt?: readonly number[];
|
|
65
|
+
/**
|
|
66
|
+
* A reflection probe: the baked scene seen all round from a point (some
|
|
67
|
+
* objects hidden, such as the one it sits in), made each time the bake
|
|
68
|
+
* is laid on and used as the scene's environment, so metal and glass
|
|
69
|
+
* reflect the lit room. Default none.
|
|
70
|
+
*/
|
|
71
|
+
probe?: {
|
|
72
|
+
at: Vec3;
|
|
73
|
+
hide?: readonly string[];
|
|
74
|
+
size?: number;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** A bake's settings with every default filled in. */
|
|
78
|
+
export interface ResolvedBake {
|
|
79
|
+
density: number;
|
|
80
|
+
maxSize: number;
|
|
81
|
+
minTexels: number;
|
|
82
|
+
islandTexels: number;
|
|
83
|
+
ownUv: boolean;
|
|
84
|
+
samples: number;
|
|
85
|
+
bounces: number;
|
|
86
|
+
weight: Record<string, number>;
|
|
87
|
+
skip: string[];
|
|
88
|
+
ignore: string[];
|
|
89
|
+
denoise: {
|
|
90
|
+
radius: number;
|
|
91
|
+
distance: number;
|
|
92
|
+
};
|
|
93
|
+
clamp: number;
|
|
94
|
+
tile: number;
|
|
95
|
+
posedAt: number[];
|
|
96
|
+
probe: {
|
|
97
|
+
at: Vec3;
|
|
98
|
+
hide: string[];
|
|
99
|
+
size: number;
|
|
100
|
+
} | null;
|
|
101
|
+
}
|
|
102
|
+
export declare const BAKE_DEFAULTS: {
|
|
103
|
+
readonly density: 40;
|
|
104
|
+
readonly maxSize: 2048;
|
|
105
|
+
readonly minTexels: 128;
|
|
106
|
+
readonly islandTexels: 16;
|
|
107
|
+
readonly ownUv: true;
|
|
108
|
+
readonly samples: 16;
|
|
109
|
+
readonly bounces: 4;
|
|
110
|
+
readonly denoise: {
|
|
111
|
+
readonly radius: 3;
|
|
112
|
+
readonly distance: 0.02;
|
|
113
|
+
};
|
|
114
|
+
readonly clamp: 40;
|
|
115
|
+
readonly tile: 256;
|
|
116
|
+
readonly posedAt: readonly [0.5, 1, 2, 4, 8, 16, 32];
|
|
117
|
+
readonly probeSize: 256;
|
|
118
|
+
};
|
|
119
|
+
/** The smallest atlas side a bake makes, texels. */
|
|
120
|
+
export declare const BAKE_MIN_SIZE = 64;
|
|
121
|
+
/** What is wrong with a bake's settings, a line each. */
|
|
122
|
+
export declare function bakeProblems(o: BakeOptions): string[];
|
|
123
|
+
/** A bake's settings as the bake uses them: the defaults filled in, names sorted (so they digest the same). */
|
|
124
|
+
export declare function resolveBake(o?: BakeOptions): ResolvedBake;
|
|
125
|
+
/**
|
|
126
|
+
* The renderer a bake is made on and laid by, as a name for its file: a
|
|
127
|
+
* bake gathers the same texels each time on one renderer (its rays, their
|
|
128
|
+
* random numbers and the order they add up in are fixed), but another
|
|
129
|
+
* GPU's arithmetic (its sines, its rounding) sends the rays a little
|
|
130
|
+
* differently: most texels differ, by 0.3% at the median between a Mac's
|
|
131
|
+
* GPU and the CPU, one in a hundred by more than 10%, and the bounces
|
|
132
|
+
* carry it on. "cpu" for SwiftShader, which draws the same on every computer;
|
|
133
|
+
* else "gpu-" and a hash of the renderer WebGL names (the GPU and how
|
|
134
|
+
* Chrome drives it, such as "ANGLE Metal Renderer: Apple M2").
|
|
135
|
+
*/
|
|
136
|
+
export declare function bakeRenderer(gl: string): string;
|
|
137
|
+
/** The renderer name of a bake made on the CPU (SwiftShader): laid by any renderer that has none of its own. */
|
|
138
|
+
export declare const BAKE_CPU = "cpu";
|
|
139
|
+
/** What `allyhub scenery bake` reports: the summary it prints is made from it, the whole of it is the report file. */
|
|
140
|
+
export interface BakeReport {
|
|
141
|
+
/** The scene's digest: the bake is laid on a scene that digests the same. */
|
|
142
|
+
digest: string;
|
|
143
|
+
/** The renderer it was made on (bakeRenderer): a page lays the bake its own renderer made, else the CPU's. */
|
|
144
|
+
renderer: string;
|
|
145
|
+
/** The atlas's side, texels. */
|
|
146
|
+
size: number;
|
|
147
|
+
/** Texels per metre on a surface of weight 1, after fitting maxSize. */
|
|
148
|
+
density: number;
|
|
149
|
+
settings: ResolvedBake;
|
|
150
|
+
/** Meshes with a lightmap: name, texels per metre, the atlas's share. */
|
|
151
|
+
baked: {
|
|
152
|
+
name: string;
|
|
153
|
+
density: number;
|
|
154
|
+
share: number;
|
|
155
|
+
raised?: boolean;
|
|
156
|
+
triangles: number;
|
|
157
|
+
seconds: number;
|
|
158
|
+
}[];
|
|
159
|
+
/** Meshes left without one, and why. */
|
|
160
|
+
left: {
|
|
161
|
+
name: string;
|
|
162
|
+
why: string;
|
|
163
|
+
}[];
|
|
164
|
+
/** The lights baked, and the ones not, with why. */
|
|
165
|
+
lights: {
|
|
166
|
+
kind: string;
|
|
167
|
+
name: string;
|
|
168
|
+
baked: boolean;
|
|
169
|
+
why?: string;
|
|
170
|
+
/**
|
|
171
|
+
* A point or spot light: what its rays meet first within half a metre,
|
|
172
|
+
* each mesh with the share of 64 rays it stops (a bulb around the light
|
|
173
|
+
* stops nearly all: bake.ignore it, or move the light out of it).
|
|
174
|
+
*/
|
|
175
|
+
around?: {
|
|
176
|
+
name: string;
|
|
177
|
+
share: number;
|
|
178
|
+
}[];
|
|
179
|
+
}[];
|
|
180
|
+
/** How the sky is baked: the environment, a hemisphere light, an ambient light, or why not. */
|
|
181
|
+
sky: string[];
|
|
182
|
+
/** Irradiance over the baked texels: the darkest tenth, the median, the brightest tenth, the largest. */
|
|
183
|
+
irradiance: {
|
|
184
|
+
p10: number;
|
|
185
|
+
median: number;
|
|
186
|
+
p90: number;
|
|
187
|
+
max: number;
|
|
188
|
+
};
|
|
189
|
+
/** The share of atlas texels a surface covers. */
|
|
190
|
+
covered: number;
|
|
191
|
+
/** Seconds each stage took. */
|
|
192
|
+
seconds: {
|
|
193
|
+
unwrap: number;
|
|
194
|
+
gather: number;
|
|
195
|
+
read: number;
|
|
196
|
+
total: number;
|
|
197
|
+
};
|
|
198
|
+
/** The bake file's bytes. */
|
|
199
|
+
bytes: number;
|
|
200
|
+
/** The GPU it drew on. */
|
|
201
|
+
gl: string;
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=bake.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
export const BAKE_DEFAULTS={density:40,maxSize:2048,minTexels:128,islandTexels:16,ownUv:!0,samples:16,bounces:4,denoise:{radius:3,distance:.02},clamp:40,tile:256,posedAt:[.5,1,2,4,8,16,32],probeSize:256},BAKE_MIN_SIZE=64;export function bakeProblems(e){const t=[],n=(s,i,a)=>{i!==void 0&&(Number.isFinite(i)&&i>0&&(a===void 0||i<=a)||t.push(`bake.${s} is a number above 0${a===void 0?"":` and at most ${String(a)}`}, not ${String(i)}`))},r=(s,i,a,o)=>{i!==void 0&&(Number.isInteger(i)&&i>=a&&i<=o||t.push(`bake.${s} is a whole number from ${String(a)} to ${String(o)}, not ${String(i)}`))};n("density",e.density,4096),r("maxSize",e.maxSize,BAKE_MIN_SIZE,8192),r("minTexels",e.minTexels,0,1048576),r("islandTexels",e.islandTexels,0,65536),r("samples",e.samples,1,4096),r("bounces",e.bounces,0,16),r("tile",e.tile,16,8192),n("clamp",e.clamp),r("denoise.radius",e.denoise?.radius,0,16),n("denoise.distance",e.denoise?.distance);for(const[s,i]of Object.entries(e.weight??{}))n(`weight["${s}"]`,i,100);for(const s of e.posedAt??[])Number.isFinite(s)&&s>=0||t.push(`bake.posedAt holds moments of scenery time, 0 or later, not ${String(s)}`);if(e.probe){const s=e.probe.at;(!Array.isArray(s)||s.length!==3||!s.every(Number.isFinite))&&t.push("bake.probe.at is a point [x, y, z] in metres"),r("probe.size",e.probe.size,16,2048)}return t}export function resolveBake(e={}){const t={};for(const n of Object.keys(e.weight??{}).sort())t[n]=e.weight?.[n]??1;return{density:e.density??BAKE_DEFAULTS.density,maxSize:e.maxSize??BAKE_DEFAULTS.maxSize,minTexels:e.minTexels??BAKE_DEFAULTS.minTexels,islandTexels:e.islandTexels??BAKE_DEFAULTS.islandTexels,ownUv:e.ownUv??BAKE_DEFAULTS.ownUv,samples:e.samples??BAKE_DEFAULTS.samples,bounces:e.bounces??BAKE_DEFAULTS.bounces,weight:t,skip:[...e.skip??[]].sort(),ignore:[...e.ignore??[]].sort(),denoise:{radius:e.denoise?.radius??BAKE_DEFAULTS.denoise.radius,distance:e.denoise?.distance??BAKE_DEFAULTS.denoise.distance},clamp:e.clamp??BAKE_DEFAULTS.clamp,tile:e.tile??BAKE_DEFAULTS.tile,posedAt:[...e.posedAt??BAKE_DEFAULTS.posedAt],probe:e.probe?{at:[e.probe.at[0],e.probe.at[1],e.probe.at[2]],hide:[...e.probe.hide??[]].sort(),size:e.probe.size??BAKE_DEFAULTS.probeSize}:null}}export function bakeRenderer(e){if(/swiftshader/i.test(e))return BAKE_CPU;let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return`gpu-${(t>>>0).toString(16).padStart(8,"0")}`}export const BAKE_CPU="cpu";
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { type FieldOfView, type LensFrame } from "./lens.js";
|
|
2
|
+
import { type Vec3 } from "./vec.js";
|
|
3
|
+
/**
|
|
4
|
+
* A camera as an agent writes it. It points one of three ways: at a
|
|
5
|
+
* `target` (a point, or an object's name: it turns to keep it centred as
|
|
6
|
+
* it moves), along a `direction`, or by `yaw` and `pitch`. With none of
|
|
7
|
+
* them it looks down −Z, level.
|
|
8
|
+
*/
|
|
9
|
+
export interface CameraState {
|
|
10
|
+
/** The camera's place, m. */
|
|
11
|
+
position: Vec3;
|
|
12
|
+
/** A point, or an object's name (the centre of its box). */
|
|
13
|
+
target?: Vec3 | string;
|
|
14
|
+
/** A direction to look along, instead of a target. */
|
|
15
|
+
direction?: Vec3;
|
|
16
|
+
/** Degrees about +Y, instead of a target: 0 looks down −Z, 90 down −X (left). */
|
|
17
|
+
yaw?: number;
|
|
18
|
+
/** Degrees above the horizon (negative looks down), with or without yaw. */
|
|
19
|
+
pitch?: number;
|
|
20
|
+
/** Which way is up before roll; default [0, 1, 0]. */
|
|
21
|
+
up?: Vec3;
|
|
22
|
+
/** Degrees about the view: positive turns the camera counterclockwise, as three.js's rotation.z does. */
|
|
23
|
+
roll?: number;
|
|
24
|
+
/** 35 mm-equivalent focal length, mm; default 26. */
|
|
25
|
+
lens?: number;
|
|
26
|
+
/** What the lens is measured on; default "diagonal". */
|
|
27
|
+
lensFrame?: LensFrame;
|
|
28
|
+
/** The vertical angle in degrees, instead of a lens. */
|
|
29
|
+
fov?: number;
|
|
30
|
+
/** Near plane, m; default 0.05. */
|
|
31
|
+
near?: number;
|
|
32
|
+
/** Far plane, m; default 500. */
|
|
33
|
+
far?: number;
|
|
34
|
+
/**
|
|
35
|
+
* The aperture, an f-number in the same 35 mm-equivalent terms as `lens`
|
|
36
|
+
* (a lens's f-number times its crop factor: a phone's f/1.8 main camera
|
|
37
|
+
* is about f/8): with `focus`, how soft what is nearer or farther than
|
|
38
|
+
* the focus is drawn, as a thin lens makes it. Without it the camera is
|
|
39
|
+
* a pinhole and everything is sharp.
|
|
40
|
+
*/
|
|
41
|
+
aperture?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Where it is focused: a distance along its view, m; a point; or an
|
|
44
|
+
* object's name (the centre of its box, followed as it moves). Needed
|
|
45
|
+
* with `aperture`.
|
|
46
|
+
*/
|
|
47
|
+
focus?: number | Vec3 | string;
|
|
48
|
+
/**
|
|
49
|
+
* Its exposure, EV at ISO 100: the scenery's light is scaled by
|
|
50
|
+
* 1 / (1.2 · 2^ev) before the tone curve while it draws (three.js's
|
|
51
|
+
* toneMappingExposure, exposureOf), as a camera exposes. Without it, the
|
|
52
|
+
* scenery's own renderer.toneMappingExposure. In a scenery whose lights are
|
|
53
|
+
* physical (lux, candela) and whose screens give out their nits, a phone
|
|
54
|
+
* indoors that keeps a laptop's screen from burning out is about 8 to 9.
|
|
55
|
+
*/
|
|
56
|
+
ev?: number;
|
|
57
|
+
}
|
|
58
|
+
/** What three.js's toneMappingExposure is for a camera at `ev` (EV at ISO 100): 1 / (1.2 · 2^ev). */
|
|
59
|
+
export declare function exposureOf(ev: number): number;
|
|
60
|
+
export declare const CAMERA_DEFAULTS: {
|
|
61
|
+
lens: number;
|
|
62
|
+
lensFrame: LensFrame;
|
|
63
|
+
near: number;
|
|
64
|
+
far: number;
|
|
65
|
+
up: Vec3;
|
|
66
|
+
roll: number;
|
|
67
|
+
};
|
|
68
|
+
/** A camera ready to draw a frame: its basis, its angles, its planes. */
|
|
69
|
+
export interface ResolvedCamera {
|
|
70
|
+
position: Vec3;
|
|
71
|
+
/** Unit vector the camera looks along (its local −Z). */
|
|
72
|
+
forward: Vec3;
|
|
73
|
+
/** Unit vector up in the picture (its local +Y), after roll. */
|
|
74
|
+
up: Vec3;
|
|
75
|
+
/** Unit vector right in the picture (its local +X), after roll. */
|
|
76
|
+
right: Vec3;
|
|
77
|
+
/** The point it was aimed at, when it was given a target. */
|
|
78
|
+
target?: Vec3;
|
|
79
|
+
/** Width over height of the frame. */
|
|
80
|
+
aspect: number;
|
|
81
|
+
fov: FieldOfView;
|
|
82
|
+
/** The lens in the default convention (the output frame's diagonal), mm. */
|
|
83
|
+
lens: number;
|
|
84
|
+
near: number;
|
|
85
|
+
far: number;
|
|
86
|
+
/** The rotation from the camera's local axes to the scenery's, as x, y, z, w. */
|
|
87
|
+
quaternion: readonly [number, number, number, number];
|
|
88
|
+
/**
|
|
89
|
+
* Depth of field, when the camera has an aperture: its f-number, the
|
|
90
|
+
* focus's distance along the view (m) and the 35 mm-equivalent lens
|
|
91
|
+
* (mm, in the convention the f-number is in).
|
|
92
|
+
*/
|
|
93
|
+
dof?: {
|
|
94
|
+
aperture: number;
|
|
95
|
+
focus: number;
|
|
96
|
+
lens: number;
|
|
97
|
+
};
|
|
98
|
+
/** Its exposure, EV at ISO 100, when it has one (CameraState.ev). */
|
|
99
|
+
ev?: number;
|
|
100
|
+
}
|
|
101
|
+
/** A camera state that cannot be drawn, with every reason. */
|
|
102
|
+
export declare class CameraError extends Error {
|
|
103
|
+
readonly problems: readonly string[];
|
|
104
|
+
constructor(problems: readonly string[]);
|
|
105
|
+
}
|
|
106
|
+
/** How a name becomes a point: the host's scenery, or nothing. */
|
|
107
|
+
export type PointOf = (name: string) => Vec3 | undefined;
|
|
108
|
+
/** The direction yaw and pitch say, in degrees. */
|
|
109
|
+
export declare function directionOf(yaw?: number, pitch?: number): Vec3;
|
|
110
|
+
/** Yaw and pitch of a direction, in degrees: directionOf's inverse. */
|
|
111
|
+
export declare function yawPitchOf(direction: Vec3): {
|
|
112
|
+
yaw: number;
|
|
113
|
+
pitch: number;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* What is wrong with a camera state, whatever the frame: every reason it
|
|
117
|
+
* cannot be drawn, or none. A target given by name is checked by
|
|
118
|
+
* resolveCamera, which knows the scenery.
|
|
119
|
+
*/
|
|
120
|
+
export declare function cameraProblems(state: CameraState): string[];
|
|
121
|
+
/**
|
|
122
|
+
* A camera state resolved for a frame of `aspect` (width over height):
|
|
123
|
+
* its basis, its angles and its planes. Throws CameraError with every
|
|
124
|
+
* reason when it cannot be drawn.
|
|
125
|
+
*/
|
|
126
|
+
export declare function resolveCamera(state: CameraState, aspect: number, pointOf?: PointOf): ResolvedCamera;
|
|
127
|
+
/**
|
|
128
|
+
* The diameter, in frame pixels, of the circle a point `depth` m along a
|
|
129
|
+
* camera's view is drawn as on a frame `frameHeight` px tall: a thin lens
|
|
130
|
+
* of the camera's 35 mm-equivalent lens and f-number focused at its focus.
|
|
131
|
+
* 0 for a pinhole camera and at the focus.
|
|
132
|
+
*
|
|
133
|
+
* c = F · f / (N · (s − f)) · |d − s| / d, with F the focal length in frame
|
|
134
|
+
* pixels, f the lens and s the focus in metres, N the f-number, d the depth.
|
|
135
|
+
*/
|
|
136
|
+
export declare function blurDiameter(camera: ResolvedCamera, depth: number, frameHeight: number): number;
|
|
137
|
+
/** Where a point lands in a camera's frame. */
|
|
138
|
+
export interface Projection {
|
|
139
|
+
/** -1 at the frame's left edge, 1 at its right. */
|
|
140
|
+
x: number;
|
|
141
|
+
/** -1 at the frame's bottom edge, 1 at its top. */
|
|
142
|
+
y: number;
|
|
143
|
+
/** Distance along the view, m; at or below 0 the point is behind the camera. */
|
|
144
|
+
depth: number;
|
|
145
|
+
/** In front of the near plane, short of the far one, and inside the frame. */
|
|
146
|
+
inView: boolean;
|
|
147
|
+
}
|
|
148
|
+
/** A point projected by a resolved camera. */
|
|
149
|
+
export declare function project(camera: ResolvedCamera, point: Vec3): Projection;
|
|
150
|
+
//# sourceMappingURL=camera.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{diagonalLens as L,fieldOfView as V,fieldOfViewFromVertical as j,lensForVertical as k,lensFrameProblem as z}from"./lens.js";import{cross as N,DEG as g,dot as w,isFinite3 as y,length as $,normalize as M,rotate as E,scale as q,sub as x}from"./vec.js";export function exposureOf(n){return 1/(1.2*2**n)}export const CAMERA_DEFAULTS={lens:26,lensFrame:"diagonal",near:.05,far:500,up:[0,1,0],roll:0};export class CameraError extends Error{problems;constructor(i){super(`The camera cannot be drawn: ${i.join("; ")}.`),this.name="CameraError",this.problems=i}}const S=n=>n===void 0||Number.isFinite(n);export function directionOf(n=0,i=0){const u=n*g,e=i*g;return[-Math.sin(u)*Math.cos(e),Math.sin(e),-Math.cos(u)*Math.cos(e)]}export function yawPitchOf(n){const i=M(n);return{yaw:Math.atan2(-i[0],-i[2])/g,pitch:Math.asin(Math.max(-1,Math.min(1,i[1])))/g}}export function cameraProblems(n){const i=[],{position:u,target:e,direction:r,yaw:a,pitch:t,up:s,roll:l,lens:c,fov:h}=n;y(u)||i.push("its position is not three finite numbers");const p=[e!==void 0?"target":void 0,r!==void 0?"direction":void 0,a!==void 0||t!==void 0?"yaw/pitch":void 0].filter(f=>f!==void 0);if(p.length>1&&i.push(`it points ${String(p.length)} ways (${p.join(", ")}): give one`),Array.isArray(e)&&!y(e)&&i.push("its target is not three finite numbers"),r!==void 0&&(y(r)?$(r)===0&&i.push("its direction is zero"):i.push("its direction is not three finite numbers")),(!S(a)||!S(t))&&i.push("its yaw or pitch is not finite"),t!==void 0&&Math.abs(t)>=90&&i.push(`its pitch ${String(t)}° looks straight up or down, which leaves no way to turn it about its view: keep it within ±90°`),s!==void 0&&(!y(s)||$(s)===0)&&i.push("its up is not a non-zero vector"),S(l)||i.push("its roll is not finite"),c!==void 0&&h!==void 0&&i.push("it has both a lens and a fov: give one"),c!==void 0&&!(Number.isFinite(c)&&c>0)&&i.push(`its lens ${String(c)} is not a positive number of mm`),h!==void 0&&!(Number.isFinite(h)&&h>0&&h<180)&&i.push(`its fov ${String(h)}° is outside (0°, 180°)`),n.lensFrame!==void 0){const f=z(n.lensFrame);f&&i.push(f)}const{aperture:m,focus:d}=n;m!==void 0&&(Number.isFinite(m)&&m>0?d===void 0&&i.push("it has an aperture and no focus: give focus, a distance along its view (m), a point or an object's name"):i.push(`its aperture f/${String(m)} is not a positive f-number`)),n.ev!==void 0&&!Number.isFinite(n.ev)&&i.push(`its ev ${String(n.ev)} is not a number`),typeof d=="number"&&!(Number.isFinite(d)&&d>0)&&i.push(`its focus ${String(d)} m is not a distance in front of it`),Array.isArray(d)&&!y(d)&&i.push("its focus is not three finite numbers");const o=n.near??CAMERA_DEFAULTS.near,b=n.far??CAMERA_DEFAULTS.far;return Number.isFinite(o)&&o>0||i.push(`its near plane ${String(o)} m is not above 0`),Number.isFinite(b)&&b>o||i.push(`its far plane ${String(b)} m is not beyond its near plane ${String(o)} m`),i}function C(n,i,u){const[e,r,a]=n,[t,s,l]=i,[c,h,p]=u,m=e+s+p;if(m>0){const o=.5/Math.sqrt(m+1);return[(l-h)*o,(c-a)*o,(r-t)*o,.25/o]}if(e>s&&e>p){const o=2*Math.sqrt(1+e-s-p);return[.25*o,(t+r)/o,(c+a)/o,(l-h)/o]}if(s>p){const o=2*Math.sqrt(1+s-e-p);return[(t+r)/o,.25*o,(h+l)/o,(c-a)/o]}const d=2*Math.sqrt(1+p-e-s);return[(c+a)/d,(h+l)/d,.25*d,(r-t)/d]}const P=1-1e-9;export function resolveCamera(n,i,u){const e=cameraProblems(n);Number.isFinite(i)&&i>0||e.push(`the frame's aspect ${String(i)} is not a positive number`);let r;if(typeof n.target=="string"?(r=u?.(n.target),r||e.push(u?`its target "${n.target}" names nothing in the scenery`:`its target "${n.target}" is a name, and there is no scenery to find it in`)):r=n.target,e.length>0)throw new CameraError(e);const a=n.position;let t;if(r){const f=x(r,a);if($(f)===0)throw new CameraError(["its target is at its position"]);t=M(f)}else n.direction?t=M(n.direction):t=directionOf(n.yaw,n.pitch);const s=M(n.up??CAMERA_DEFAULTS.up);if(Math.abs(w(t,s))>P)throw new CameraError(["it looks straight along its up, which leaves no way to turn it about its view: move its target or give another up"]);let l=M(N(t,s)),c=N(l,t);const h=(n.roll??CAMERA_DEFAULTS.roll)*g;if(h!==0){const f=q(t,-1);l=E(l,f,h),c=E(c,f,h)}const p=n.lensFrame??CAMERA_DEFAULTS.lensFrame,m=n.fov!==void 0?j(n.fov,i):V(n.lens??CAMERA_DEFAULTS.lens,i,p),d=n.fov!==void 0?k(n.fov,i):L(n.lens??CAMERA_DEFAULTS.lens,i,p),o=n.near??CAMERA_DEFAULTS.near;let b;if(n.aperture!==void 0&&n.focus!==void 0){const f=n.focus;let v;if(typeof f=="number")v=f;else{const A=typeof f=="string"?u?.(f):f;if(!A)throw new CameraError([u?`its focus "${String(f)}" names nothing in the scenery`:`its focus "${String(f)}" is a name, and there is no scenery to find it in`]);v=w(x(A,a),t)}const F=n.fov!==void 0?d:n.lens??CAMERA_DEFAULTS.lens;if(!(v>Math.max(o,F/1e3)))throw new CameraError([`its focus is ${v.toFixed(3)} m along its view, which must be past its near plane (${String(o)} m) and its lens (${String(F)} mm)`]);b={aperture:n.aperture,focus:v,lens:F}}return{position:a,forward:t,up:c,right:l,...r?{target:r}:{},aspect:i,fov:m,lens:d,near:o,far:n.far??CAMERA_DEFAULTS.far,quaternion:C(l,c,q(t,-1)),...b?{dof:b}:{},...n.ev!==void 0?{ev:n.ev}:{}}}export function blurDiameter(n,i,u){const e=n.dof;if(!e)return 0;const r=u/2/Math.tan(n.fov.vertical*g/2),a=e.lens/1e3,t=e.focus,s=Math.max(i,n.near);return r*a/(e.aperture*(t-a))*(Math.abs(s-t)/s)}export function project(n,i){const u=x(i,n.position),e=w(u,n.forward),r=Math.tan(n.fov.horizontal*g/2),a=Math.tan(n.fov.vertical*g/2),t=w(u,n.right)/(e*r),s=w(u,n.up)/(e*a),l=e>=n.near&&e<=n.far&&Math.abs(t)<=1&&Math.abs(s)<=1;return{x:t,y:s,depth:e,inView:l}}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type Vec3 } from "./vec.js";
|
|
2
|
+
/** Points closer than this are one point, m. */
|
|
3
|
+
export declare const SAME_POINT = 1e-9;
|
|
4
|
+
/** A point on a curve, its unit tangent and where it is. */
|
|
5
|
+
export interface CurvePoint {
|
|
6
|
+
point: Vec3;
|
|
7
|
+
/** Unit tangent; [0, 0, -1] on a curve with no length. */
|
|
8
|
+
tangent: Vec3;
|
|
9
|
+
}
|
|
10
|
+
/** A curve through points, walked by distance. */
|
|
11
|
+
export declare class Curve {
|
|
12
|
+
/** The curve's length, m. */
|
|
13
|
+
readonly length: number;
|
|
14
|
+
/** The distance along the curve at each point it was given, in their order. */
|
|
15
|
+
readonly knots: readonly number[];
|
|
16
|
+
private readonly segments;
|
|
17
|
+
private readonly first;
|
|
18
|
+
private frames?;
|
|
19
|
+
/**
|
|
20
|
+
* A curve through `points`, with `alpha` 0.5 (centripetal; 0 uniform, 1
|
|
21
|
+
* chordal). A point that repeats the one before it adds nothing.
|
|
22
|
+
*/
|
|
23
|
+
constructor(points: readonly Vec3[], alpha?: number);
|
|
24
|
+
/** The segment and its u at a distance along the curve, clamped to the curve. */
|
|
25
|
+
private locate;
|
|
26
|
+
/** The point and unit tangent at a distance along the curve (clamped). */
|
|
27
|
+
at(d: number): CurvePoint;
|
|
28
|
+
/**
|
|
29
|
+
* The point `d` m along the curve, past its ends along its end tangents:
|
|
30
|
+
* what a target some way ahead of a camera near the end looks at.
|
|
31
|
+
*/
|
|
32
|
+
extended(d: number): Vec3;
|
|
33
|
+
/**
|
|
34
|
+
* Up at a distance along the curve in a frame that does not twist about
|
|
35
|
+
* it (rotation-minimizing), starting from `up` made square to the
|
|
36
|
+
* curve's first tangent.
|
|
37
|
+
*/
|
|
38
|
+
upAt(d: number, up?: Vec3): Vec3;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=curve.d.ts.map
|