@felbrasil/dreamy 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +69 -2
- package/dist/api.d.ts +1 -0
- package/dist/api.js +2 -0
- package/dist/api.js.map +7 -0
- package/dist/chunks/chunk-72DMUKP3.js +1470 -0
- package/dist/chunks/chunk-72DMUKP3.js.map +7 -0
- package/dist/chunks/chunk-VZMBE5MV.js +5936 -0
- package/dist/chunks/chunk-VZMBE5MV.js.map +7 -0
- package/dist/chunks/chunk-ZU72KKME.js +8600 -0
- package/dist/chunks/chunk-ZU72KKME.js.map +7 -0
- package/dist/core.d.ts +1 -0
- package/dist/core.js +34 -0
- package/dist/core.js.map +7 -0
- package/dist/dreamy_evaluator.wasm +0 -0
- package/dist/evaluator.d.ts +1 -0
- package/dist/evaluator.js +52 -0
- package/dist/evaluator.js.map +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7280 -0
- package/dist/index.js.map +7 -0
- package/dist/styles.css +1 -0
- package/dist/types/api/src/commands/command.d.ts +7 -0
- package/dist/types/api/src/commands/decal-commands.d.ts +35 -0
- package/dist/types/api/src/commands/palette-commands.d.ts +14 -0
- package/dist/types/api/src/commands/rig-commands.d.ts +229 -0
- package/dist/types/api/src/commands/scene-commands.d.ts +64 -0
- package/dist/types/api/src/commands/sculpt-commands.d.ts +111 -0
- package/dist/types/api/src/commands/stamp-spec.d.ts +3 -0
- package/dist/types/api/src/commands/target.d.ts +8 -0
- package/dist/types/api/src/creation-api.d.ts +52 -0
- package/dist/types/api/src/events/creation-event.d.ts +7 -0
- package/dist/types/api/src/events/decal-events.d.ts +20 -0
- package/dist/types/api/src/events/event-of.d.ts +6 -0
- package/dist/types/api/src/events/palette-events.d.ts +8 -0
- package/dist/types/api/src/events/rig-events.d.ts +161 -0
- package/dist/types/api/src/events/scene-events.d.ts +34 -0
- package/dist/types/api/src/events/sculpt-events.d.ts +53 -0
- package/dist/types/api/src/id.d.ts +1 -0
- package/dist/types/api/src/index.d.ts +31 -0
- package/dist/types/api/src/model/creation.d.ts +22 -0
- package/dist/types/api/src/model/decal.d.ts +48 -0
- package/dist/types/api/src/model/look.d.ts +56 -0
- package/dist/types/api/src/model/math.d.ts +18 -0
- package/dist/types/api/src/model/palette.d.ts +11 -0
- package/dist/types/api/src/model/rig.d.ts +125 -0
- package/dist/types/api/src/model/scene-object.d.ts +22 -0
- package/dist/types/api/src/model/sculpt.d.ts +13 -0
- package/dist/types/api/src/model/stamp.d.ts +53 -0
- package/dist/types/api/src/model/wing.d.ts +35 -0
- package/dist/types/api/src/ports/basic-ports.d.ts +7 -0
- package/dist/types/api/src/ports/evaluator.d.ts +62 -0
- package/dist/types/api/src/ports/persistence.d.ts +89 -0
- package/dist/types/api/src/ports/viewport.d.ts +125 -0
- package/dist/types/core/src/apply/body-part-added.d.ts +2 -0
- package/dist/types/core/src/apply/body-part-removed.d.ts +2 -0
- package/dist/types/core/src/apply/bone-removed.d.ts +3 -0
- package/dist/types/core/src/apply/bone-renamed.d.ts +2 -0
- package/dist/types/core/src/apply/bone-reparented.d.ts +2 -0
- package/dist/types/core/src/apply/bone-sizes-set.d.ts +3 -0
- package/dist/types/core/src/apply/bone-tags-set.d.ts +2 -0
- package/dist/types/core/src/apply/bone-transforms-set.d.ts +6 -0
- package/dist/types/core/src/apply/bones-added.d.ts +2 -0
- package/dist/types/core/src/apply/creature-generated.d.ts +3 -0
- package/dist/types/core/src/apply/decal-removed.d.ts +2 -0
- package/dist/types/core/src/apply/decals-added.d.ts +2 -0
- package/dist/types/core/src/apply/design-deleted.d.ts +2 -0
- package/dist/types/core/src/apply/design-saved.d.ts +2 -0
- package/dist/types/core/src/apply/flat-wings-set.d.ts +2 -0
- package/dist/types/core/src/apply/object-renamed.d.ts +2 -0
- package/dist/types/core/src/apply/object-reparented.d.ts +2 -0
- package/dist/types/core/src/apply/object-transforms-set.d.ts +2 -0
- package/dist/types/core/src/apply/objects-deleted.d.ts +2 -0
- package/dist/types/core/src/apply/objects-duplicated.d.ts +3 -0
- package/dist/types/core/src/apply/palette-color-set.d.ts +2 -0
- package/dist/types/core/src/apply/palette-reset.d.ts +2 -0
- package/dist/types/core/src/apply/part-grafted.d.ts +3 -0
- package/dist/types/core/src/apply/part-slot-swapped.d.ts +3 -0
- package/dist/types/core/src/apply/pivot-set.d.ts +2 -0
- package/dist/types/core/src/apply/pose-preset-applied.d.ts +3 -0
- package/dist/types/core/src/apply/pose-reset.d.ts +3 -0
- package/dist/types/core/src/apply/premade-applied.d.ts +3 -0
- package/dist/types/core/src/apply/region-blend-set.d.ts +3 -0
- package/dist/types/core/src/apply/rig-created.d.ts +2 -0
- package/dist/types/core/src/apply/rig-mirror-set.d.ts +2 -0
- package/dist/types/core/src/apply/rig-mode-set.d.ts +2 -0
- package/dist/types/core/src/apply/sculpt-created.d.ts +2 -0
- package/dist/types/core/src/apply/sculpt-look-set.d.ts +3 -0
- package/dist/types/core/src/apply/smear-group-set.d.ts +2 -0
- package/dist/types/core/src/apply/stamp-placements-set.d.ts +2 -0
- package/dist/types/core/src/apply/stamp-props-set.d.ts +2 -0
- package/dist/types/core/src/apply/stamps-added.d.ts +2 -0
- package/dist/types/core/src/apply/stamps-removed.d.ts +2 -0
- package/dist/types/core/src/apply/symmetry-set-for-all.d.ts +2 -0
- package/dist/types/core/src/atoms/check/check.d.ts +7 -0
- package/dist/types/core/src/atoms/decal/decal-limits.d.ts +6 -0
- package/dist/types/core/src/atoms/decal/decal-problem.d.ts +4 -0
- package/dist/types/core/src/atoms/decal/design-problem.d.ts +4 -0
- package/dist/types/core/src/atoms/look/catalogs.d.ts +9 -0
- package/dist/types/core/src/atoms/look/default-look.d.ts +4 -0
- package/dist/types/core/src/atoms/look/look-problem.d.ts +7 -0
- package/dist/types/core/src/atoms/look/merge-look.d.ts +3 -0
- package/dist/types/core/src/atoms/math/mat4.d.ts +14 -0
- package/dist/types/core/src/atoms/math/quat.d.ts +18 -0
- package/dist/types/core/src/atoms/math/transform.d.ts +7 -0
- package/dist/types/core/src/atoms/math/vec3.d.ts +18 -0
- package/dist/types/core/src/atoms/palette/default-palette.d.ts +4 -0
- package/dist/types/core/src/atoms/palette/is-color-ref.d.ts +2 -0
- package/dist/types/core/src/atoms/palette/poc-color-ref.d.ts +6 -0
- package/dist/types/core/src/atoms/rig/bone-matrices.d.ts +8 -0
- package/dist/types/core/src/atoms/rig/bone-region.d.ts +8 -0
- package/dist/types/core/src/atoms/rig/bone-role.d.ts +11 -0
- package/dist/types/core/src/atoms/rig/bone-size.d.ts +7 -0
- package/dist/types/core/src/atoms/rig/compose-local.d.ts +6 -0
- package/dist/types/core/src/atoms/rig/find-rig.d.ts +11 -0
- package/dist/types/core/src/atoms/rig/mirror-partner.d.ts +3 -0
- package/dist/types/core/src/atoms/rig/mirror-sculpt.d.ts +9 -0
- package/dist/types/core/src/atoms/rig/mirror-transform.d.ts +9 -0
- package/dist/types/core/src/atoms/rig/partner-target.d.ts +3 -0
- package/dist/types/core/src/atoms/rig/pose-presets.d.ts +11 -0
- package/dist/types/core/src/atoms/rig/pose-rule.d.ts +48 -0
- package/dist/types/core/src/atoms/rig/pose-template-rules.d.ts +8 -0
- package/dist/types/core/src/atoms/rig/rebase-pose.d.ts +6 -0
- package/dist/types/core/src/atoms/rig/resize-bones.d.ts +12 -0
- package/dist/types/core/src/atoms/rig/rig-extent.d.ts +3 -0
- package/dist/types/core/src/atoms/rig/side-from-name.d.ts +7 -0
- package/dist/types/core/src/atoms/rig/size-frame.d.ts +18 -0
- package/dist/types/core/src/atoms/rig/with-slot-parts.d.ts +9 -0
- package/dist/types/core/src/atoms/scene/copy-with-new-ids.d.ts +7 -0
- package/dist/types/core/src/atoms/scene/object-tree.d.ts +8 -0
- package/dist/types/core/src/atoms/scene/place-in-order.d.ts +7 -0
- package/dist/types/core/src/atoms/scene/unique-name.d.ts +4 -0
- package/dist/types/core/src/atoms/scene/world-matrix.d.ts +4 -0
- package/dist/types/core/src/atoms/sculpt/all-sculpts.d.ts +3 -0
- package/dist/types/core/src/atoms/sculpt/is-wing-target.d.ts +3 -0
- package/dist/types/core/src/atoms/sculpt/target-sculpt.d.ts +10 -0
- package/dist/types/core/src/atoms/sculpt/update-target.d.ts +8 -0
- package/dist/types/core/src/atoms/stamp/apply-stamp-props.d.ts +11 -0
- package/dist/types/core/src/atoms/stamp/clamp-symmetry.d.ts +11 -0
- package/dist/types/core/src/atoms/stamp/clean-props.d.ts +3 -0
- package/dist/types/core/src/atoms/stamp/emptied-groups.d.ts +3 -0
- package/dist/types/core/src/atoms/stamp/move-locked-groups.d.ts +12 -0
- package/dist/types/core/src/atoms/stamp/normalize-base.d.ts +6 -0
- package/dist/types/core/src/atoms/stamp/resolve-stamp-props.d.ts +14 -0
- package/dist/types/core/src/atoms/stamp/smear.d.ts +15 -0
- package/dist/types/core/src/atoms/stamp/stamp-problem.d.ts +7 -0
- package/dist/types/core/src/atoms/wing/wing-problem.d.ts +6 -0
- package/dist/types/core/src/create-creation-api.d.ts +12 -0
- package/dist/types/core/src/decide.d.ts +4 -0
- package/dist/types/core/src/empty-creation.d.ts +2 -0
- package/dist/types/core/src/fold.d.ts +6 -0
- package/dist/types/core/src/index.d.ts +9 -0
- package/dist/types/core/src/molecules/add-body-part.d.ts +8 -0
- package/dist/types/core/src/molecules/add-bone.d.ts +8 -0
- package/dist/types/core/src/molecules/add-decals.d.ts +4 -0
- package/dist/types/core/src/molecules/add-stamps.d.ts +8 -0
- package/dist/types/core/src/molecules/apply-pose-preset.d.ts +4 -0
- package/dist/types/core/src/molecules/apply-premade.d.ts +9 -0
- package/dist/types/core/src/molecules/auto-tag-sides.d.ts +4 -0
- package/dist/types/core/src/molecules/create-rig.d.ts +4 -0
- package/dist/types/core/src/molecules/create-sculpt.d.ts +4 -0
- package/dist/types/core/src/molecules/delete-design.d.ts +4 -0
- package/dist/types/core/src/molecules/delete-objects.d.ts +4 -0
- package/dist/types/core/src/molecules/duplicate-objects.d.ts +6 -0
- package/dist/types/core/src/molecules/generate-creature.d.ts +7 -0
- package/dist/types/core/src/molecules/graft-part.d.ts +4 -0
- package/dist/types/core/src/molecules/mirror-objects.d.ts +7 -0
- package/dist/types/core/src/molecules/molecule.d.ts +17 -0
- package/dist/types/core/src/molecules/remove-body-part.d.ts +3 -0
- package/dist/types/core/src/molecules/remove-bone.d.ts +4 -0
- package/dist/types/core/src/molecules/remove-decal.d.ts +3 -0
- package/dist/types/core/src/molecules/remove-smear-group.d.ts +4 -0
- package/dist/types/core/src/molecules/remove-stamps.d.ts +4 -0
- package/dist/types/core/src/molecules/rename-bone.d.ts +3 -0
- package/dist/types/core/src/molecules/rename-object.d.ts +3 -0
- package/dist/types/core/src/molecules/reparent-bone.d.ts +4 -0
- package/dist/types/core/src/molecules/reparent-object.d.ts +4 -0
- package/dist/types/core/src/molecules/reset-palette.d.ts +3 -0
- package/dist/types/core/src/molecules/reset-pose.d.ts +3 -0
- package/dist/types/core/src/molecules/save-design.d.ts +4 -0
- package/dist/types/core/src/molecules/set-bone-sizes.d.ts +8 -0
- package/dist/types/core/src/molecules/set-bone-tags.d.ts +4 -0
- package/dist/types/core/src/molecules/set-bone-transforms.d.ts +7 -0
- package/dist/types/core/src/molecules/set-flat-wings.d.ts +4 -0
- package/dist/types/core/src/molecules/set-object-transforms.d.ts +3 -0
- package/dist/types/core/src/molecules/set-palette-color.d.ts +3 -0
- package/dist/types/core/src/molecules/set-pivot.d.ts +3 -0
- package/dist/types/core/src/molecules/set-region-blend.d.ts +4 -0
- package/dist/types/core/src/molecules/set-rig-mirror.d.ts +3 -0
- package/dist/types/core/src/molecules/set-rig-mode.d.ts +3 -0
- package/dist/types/core/src/molecules/set-sculpt-look.d.ts +7 -0
- package/dist/types/core/src/molecules/set-smear-group.d.ts +4 -0
- package/dist/types/core/src/molecules/set-stamp-placements.d.ts +4 -0
- package/dist/types/core/src/molecules/set-stamp-props.d.ts +3 -0
- package/dist/types/core/src/molecules/set-symmetry-for-all.d.ts +4 -0
- package/dist/types/core/src/molecules/swap-part-slot.d.ts +7 -0
- package/dist/types/core/src/premades/ant-bake.d.ts +2 -0
- package/dist/types/core/src/premades/bake-authoring.d.ts +35 -0
- package/dist/types/core/src/premades/bake-types.d.ts +65 -0
- package/dist/types/core/src/premades/baked-part-for.d.ts +11 -0
- package/dist/types/core/src/premades/bee-bake.d.ts +2 -0
- package/dist/types/core/src/premades/bird-bake.d.ts +2 -0
- package/dist/types/core/src/premades/body-stamps-for-bone.d.ts +14 -0
- package/dist/types/core/src/premades/bone-tree.d.ts +15 -0
- package/dist/types/core/src/premades/build-premade-rig.d.ts +23 -0
- package/dist/types/core/src/premades/build-template.d.ts +6 -0
- package/dist/types/core/src/premades/centipede-bake.d.ts +2 -0
- package/dist/types/core/src/premades/coat-stamps.d.ts +3 -0
- package/dist/types/core/src/premades/crab-bake.d.ts +2 -0
- package/dist/types/core/src/premades/dragon-bake.d.ts +2 -0
- package/dist/types/core/src/premades/face-decals.d.ts +17 -0
- package/dist/types/core/src/premades/fish-bake.d.ts +2 -0
- package/dist/types/core/src/premades/fit-part-slot.d.ts +21 -0
- package/dist/types/core/src/premades/generate-creature.d.ts +21 -0
- package/dist/types/core/src/premades/gorilla-bake.d.ts +2 -0
- package/dist/types/core/src/premades/graft-slot.d.ts +34 -0
- package/dist/types/core/src/premades/humanoid-bake.d.ts +2 -0
- package/dist/types/core/src/premades/insect6-bake.d.ts +2 -0
- package/dist/types/core/src/premades/jellyfish-bake.d.ts +2 -0
- package/dist/types/core/src/premades/lizard-bake.d.ts +2 -0
- package/dist/types/core/src/premades/make-baked-part.d.ts +9 -0
- package/dist/types/core/src/premades/make-body-part.d.ts +9 -0
- package/dist/types/core/src/premades/make-flat-part.d.ts +13 -0
- package/dist/types/core/src/premades/part-context.d.ts +20 -0
- package/dist/types/core/src/premades/part-kits.d.ts +36 -0
- package/dist/types/core/src/premades/part-slots.d.ts +17 -0
- package/dist/types/core/src/premades/part-stamp.d.ts +13 -0
- package/dist/types/core/src/premades/part-styles.d.ts +44 -0
- package/dist/types/core/src/premades/premade-fit.d.ts +18 -0
- package/dist/types/core/src/premades/premade-infos.d.ts +3 -0
- package/dist/types/core/src/premades/reseat-attachments.d.ts +31 -0
- package/dist/types/core/src/premades/rig-builder.d.ts +51 -0
- package/dist/types/core/src/premades/rodent-bake.d.ts +2 -0
- package/dist/types/core/src/premades/scorpion-bake.d.ts +2 -0
- package/dist/types/core/src/premades/shark-bake.d.ts +2 -0
- package/dist/types/core/src/premades/sitter-bake.d.ts +3 -0
- package/dist/types/core/src/premades/skeleton-bakes.d.ts +4 -0
- package/dist/types/core/src/premades/snake-bake.d.ts +2 -0
- package/dist/types/core/src/premades/spider-bake.d.ts +2 -0
- package/dist/types/core/src/premades/stamps-box.d.ts +9 -0
- package/dist/types/core/src/premades/style-for-bone.d.ts +7 -0
- package/dist/types/core/src/premades/swap-slot.d.ts +13 -0
- package/dist/types/core/src/premades/template-catalog.d.ts +20 -0
- package/dist/types/core/src/premades/template-color.d.ts +9 -0
- package/dist/types/core/src/premades/turtle-bake.d.ts +2 -0
- package/dist/types/core/src/premades/variants/aquatic-variants.d.ts +16 -0
- package/dist/types/core/src/premades/variants/coat-variants.d.ts +7 -0
- package/dist/types/core/src/premades/variants/ear-variants.d.ts +8 -0
- package/dist/types/core/src/premades/variants/fantasy-more-variants.d.ts +3 -0
- package/dist/types/core/src/premades/variants/fantasy-variants.d.ts +17 -0
- package/dist/types/core/src/premades/variants/head-variants.d.ts +9 -0
- package/dist/types/core/src/premades/variants/horn-variants.d.ts +7 -0
- package/dist/types/core/src/premades/variants/index.d.ts +10 -0
- package/dist/types/core/src/premades/variants/land-variants.d.ts +3 -0
- package/dist/types/core/src/premades/variants/leg-variants.d.ts +7 -0
- package/dist/types/core/src/premades/variants/part-variant.d.ts +14 -0
- package/dist/types/core/src/premades/variants/tail-variants.d.ts +6 -0
- package/dist/types/core/src/premades/variants/variant-authoring.d.ts +29 -0
- package/dist/types/core/src/premades/whale-bake.d.ts +2 -0
- package/dist/types/core/src/premades/wing-defaults.d.ts +4 -0
- package/dist/types/core/src/premades/wing-frame.d.ts +10 -0
- package/dist/types/core/src/premades/wolf-bake.d.ts +2 -0
- package/dist/types/core/src/premades/worm-bake.d.ts +2 -0
- package/dist/types/evaluator/src/abi.d.ts +64 -0
- package/dist/types/evaluator/src/chunks.d.ts +53 -0
- package/dist/types/evaluator/src/index.d.ts +11 -0
- package/dist/types/evaluator/src/prep/colors.d.ts +11 -0
- package/dist/types/evaluator/src/prep/mat3.d.ts +13 -0
- package/dist/types/evaluator/src/prep/pack.d.ts +23 -0
- package/dist/types/evaluator/src/prep/props.d.ts +16 -0
- package/dist/types/evaluator/src/prep/symmetry.d.ts +23 -0
- package/dist/types/evaluator/src/reference/core.d.ts +3 -0
- package/dist/types/evaluator/src/reference/mesher.d.ts +22 -0
- package/dist/types/evaluator/src/reference/skin.d.ts +8 -0
- package/dist/types/evaluator/src/session.d.ts +21 -0
- package/dist/types/evaluator/src/wasm/core.d.ts +9 -0
- package/dist/types/evaluator/src/worker/client.d.ts +28 -0
- package/dist/types/evaluator/src/worker/host.d.ts +8 -0
- package/dist/types/evaluator/src/worker/protocol.d.ts +39 -0
- package/dist/types/evaluator/src/worker/spawn.d.ts +6 -0
- package/dist/types/evaluator/src/worker/worker-inline.d.ts +1 -0
- package/dist/types/evaluator/src/worker/worker.d.ts +1 -0
- package/dist/types/module/src/index.d.ts +2 -0
- package/dist/types/module/src/ui/atoms/action-button.d.ts +10 -0
- package/dist/types/module/src/ui/atoms/badge.d.ts +9 -0
- package/dist/types/module/src/ui/atoms/checkbox.d.ts +6 -0
- package/dist/types/module/src/ui/atoms/color-input.d.ts +10 -0
- package/dist/types/module/src/ui/atoms/hex-chip.d.ts +5 -0
- package/dist/types/module/src/ui/atoms/icon-button.d.ts +14 -0
- package/dist/types/module/src/ui/atoms/icon.d.ts +8 -0
- package/dist/types/module/src/ui/atoms/kbd.d.ts +4 -0
- package/dist/types/module/src/ui/atoms/match-button.d.ts +10 -0
- package/dist/types/module/src/ui/atoms/number-input.d.ts +11 -0
- package/dist/types/module/src/ui/atoms/pill-button.d.ts +11 -0
- package/dist/types/module/src/ui/atoms/range-input.d.ts +17 -0
- package/dist/types/module/src/ui/atoms/select-input.d.ts +12 -0
- package/dist/types/module/src/ui/atoms/separator.d.ts +2 -0
- package/dist/types/module/src/ui/atoms/side-button.d.ts +13 -0
- package/dist/types/module/src/ui/atoms/swatch.d.ts +13 -0
- package/dist/types/module/src/ui/atoms/tool-button.d.ts +22 -0
- package/dist/types/module/src/ui/hooks/editor-actions.d.ts +50 -0
- package/dist/types/module/src/ui/hooks/editor-context.d.ts +37 -0
- package/dist/types/module/src/ui/hooks/use-compact.d.ts +2 -0
- package/dist/types/module/src/ui/hooks/use-editor-controller.d.ts +17 -0
- package/dist/types/module/src/ui/hooks/use-keyboard.d.ts +11 -0
- package/dist/types/module/src/ui/lib/catalog.d.ts +76 -0
- package/dist/types/module/src/ui/lib/colors.d.ts +15 -0
- package/dist/types/module/src/ui/lib/decals.d.ts +6 -0
- package/dist/types/module/src/ui/lib/design-geometry.d.ts +60 -0
- package/dist/types/module/src/ui/lib/math.d.ts +18 -0
- package/dist/types/module/src/ui/lib/placement.d.ts +8 -0
- package/dist/types/module/src/ui/lib/scene.d.ts +51 -0
- package/dist/types/module/src/ui/lib/symmetry.d.ts +5 -0
- package/dist/types/module/src/ui/lib/targets.d.ts +28 -0
- package/dist/types/module/src/ui/lib/view-state.d.ts +74 -0
- package/dist/types/module/src/ui/molecules/axis-pill.d.ts +7 -0
- package/dist/types/module/src/ui/molecules/color-field.d.ts +14 -0
- package/dist/types/module/src/ui/molecules/count-stepper.d.ts +9 -0
- package/dist/types/module/src/ui/molecules/floating-panel.d.ts +26 -0
- package/dist/types/module/src/ui/molecules/help-row.d.ts +8 -0
- package/dist/types/module/src/ui/molecules/inline-edit.d.ts +9 -0
- package/dist/types/module/src/ui/molecules/list-row.d.ts +25 -0
- package/dist/types/module/src/ui/molecules/modal.d.ts +11 -0
- package/dist/types/module/src/ui/molecules/mode-pill.d.ts +7 -0
- package/dist/types/module/src/ui/molecules/scroll-row.d.ts +10 -0
- package/dist/types/module/src/ui/molecules/slider-row.d.ts +16 -0
- package/dist/types/module/src/ui/molecules/swatch-row.d.ts +11 -0
- package/dist/types/module/src/ui/molecules/tab-bar.d.ts +9 -0
- package/dist/types/module/src/ui/molecules/toolbar-pill.d.ts +7 -0
- package/dist/types/module/src/ui/molecules/toolbar.d.ts +10 -0
- package/dist/types/module/src/ui/molecules/vec3-field.d.ts +10 -0
- package/dist/types/module/src/ui/organisms/bone-panel.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/bone-size-sliders.d.ts +9 -0
- package/dist/types/module/src/ui/organisms/category-bar.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/decal-bar.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/decal-editor.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/fleck-style-tab.d.ts +7 -0
- package/dist/types/module/src/ui/organisms/git-sync-panel.d.ts +10 -0
- package/dist/types/module/src/ui/organisms/help-panel.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/material-tab.d.ts +3 -0
- package/dist/types/module/src/ui/organisms/object-list-panel.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/palette-panel.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/parts-tab.d.ts +26 -0
- package/dist/types/module/src/ui/organisms/pattern-tab.d.ts +3 -0
- package/dist/types/module/src/ui/organisms/pose-tab.d.ts +8 -0
- package/dist/types/module/src/ui/organisms/premade-picker.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/properties-panel.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/region-blends.d.ts +5 -0
- package/dist/types/module/src/ui/organisms/rendering-bar.d.ts +5 -0
- package/dist/types/module/src/ui/organisms/rig-bar.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/scenes-modal.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/select-hint.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/shape-list-panel.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/side-dock.d.ts +4 -0
- package/dist/types/module/src/ui/organisms/stamp-bar.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/stamp-props-panel.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/stamp-size-panel.d.ts +4 -0
- package/dist/types/module/src/ui/organisms/stats-badge.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/style-bar.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/symmetry-bar.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/toast.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/token-guide.d.ts +5 -0
- package/dist/types/module/src/ui/organisms/touch-mods.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/transform-bar.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/transform-tab.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/utilities-bar.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/viewport-host.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/voxel-panel.d.ts +2 -0
- package/dist/types/module/src/ui/organisms/wing-tab.d.ts +10 -0
- package/dist/types/module/src/ui/pages/editor-page.d.ts +9 -0
- package/dist/types/module/src/ui/templates/editor-shell.d.ts +2 -0
- package/dist/types/studio/src/browser-files.d.ts +3 -0
- package/dist/types/studio/src/clock.d.ts +2 -0
- package/dist/types/studio/src/creation-file.d.ts +21 -0
- package/dist/types/studio/src/git-remote.d.ts +36 -0
- package/dist/types/studio/src/git-sync.d.ts +33 -0
- package/dist/types/studio/src/ids.d.ts +3 -0
- package/dist/types/studio/src/index.d.ts +15 -0
- package/dist/types/studio/src/indexed-db-library.d.ts +2 -0
- package/dist/types/studio/src/library-persistence.d.ts +29 -0
- package/dist/types/studio/src/library-sync.d.ts +29 -0
- package/dist/types/studio/src/preferences.d.ts +9 -0
- package/dist/types/studio/src/seed.d.ts +3 -0
- package/dist/types/studio/src/studio.d.ts +17 -0
- package/dist/types/viewport/src/create-viewport.d.ts +10 -0
- package/dist/types/viewport/src/decals/builtin-art.d.ts +19 -0
- package/dist/types/viewport/src/decals/builtin-docs.d.ts +7 -0
- package/dist/types/viewport/src/decals/decal-atlas.d.ts +37 -0
- package/dist/types/viewport/src/decals/decal-catalog.d.ts +17 -0
- package/dist/types/viewport/src/decals/decal-glsl.d.ts +2 -0
- package/dist/types/viewport/src/decals/decal-limits.d.ts +11 -0
- package/dist/types/viewport/src/decals/decal-uniforms.d.ts +40 -0
- package/dist/types/viewport/src/decals/design-raster.d.ts +8 -0
- package/dist/types/viewport/src/decals/interior-thumbs.d.ts +6 -0
- package/dist/types/viewport/src/index.d.ts +1 -0
- package/dist/types/viewport/src/interaction/bone-tool.d.ts +13 -0
- package/dist/types/viewport/src/interaction/bones-visible.d.ts +7 -0
- package/dist/types/viewport/src/interaction/cursor.d.ts +3 -0
- package/dist/types/viewport/src/interaction/decal-tool.d.ts +18 -0
- package/dist/types/viewport/src/interaction/esc-hold.d.ts +13 -0
- package/dist/types/viewport/src/interaction/ghost-geometry.d.ts +6 -0
- package/dist/types/viewport/src/interaction/gizmo.d.ts +34 -0
- package/dist/types/viewport/src/interaction/interaction-context.d.ts +41 -0
- package/dist/types/viewport/src/interaction/marquee.d.ts +8 -0
- package/dist/types/viewport/src/interaction/pivot-helper.d.ts +13 -0
- package/dist/types/viewport/src/interaction/select-tool.d.ts +30 -0
- package/dist/types/viewport/src/interaction/selection-boxes.d.ts +11 -0
- package/dist/types/viewport/src/interaction/stamp-tool.d.ts +41 -0
- package/dist/types/viewport/src/interaction/stamp-wires.d.ts +18 -0
- package/dist/types/viewport/src/interaction/surface-hit.d.ts +14 -0
- package/dist/types/viewport/src/materials/fleck-material.d.ts +69 -0
- package/dist/types/viewport/src/materials/global-uniforms.d.ts +15 -0
- package/dist/types/viewport/src/materials/skin.d.ts +18 -0
- package/dist/types/viewport/src/materials/wing-material.d.ts +21 -0
- package/dist/types/viewport/src/math/colors.d.ts +29 -0
- package/dist/types/viewport/src/math/convert.d.ts +15 -0
- package/dist/types/viewport/src/math/decal-pose.d.ts +7 -0
- package/dist/types/viewport/src/math/lod.d.ts +16 -0
- package/dist/types/viewport/src/math/picking.d.ts +32 -0
- package/dist/types/viewport/src/math/pixel-palette.d.ts +15 -0
- package/dist/types/viewport/src/math/screen.d.ts +26 -0
- package/dist/types/viewport/src/math/skeleton-math.d.ts +32 -0
- package/dist/types/viewport/src/math/smear.d.ts +20 -0
- package/dist/types/viewport/src/math/symmetry.d.ts +21 -0
- package/dist/types/viewport/src/objects/default-look.d.ts +3 -0
- package/dist/types/viewport/src/objects/mesh-driver.d.ts +26 -0
- package/dist/types/viewport/src/objects/mesh-key.d.ts +8 -0
- package/dist/types/viewport/src/objects/rig-view.d.ts +31 -0
- package/dist/types/viewport/src/objects/scene-views.d.ts +53 -0
- package/dist/types/viewport/src/objects/sculpt-view.d.ts +66 -0
- package/dist/types/viewport/src/objects/view-context.d.ts +19 -0
- package/dist/types/viewport/src/objects/wing-view.d.ts +27 -0
- package/dist/types/viewport/src/rig/bone-viz.d.ts +13 -0
- package/dist/types/viewport/src/scene/camera-motion.d.ts +10 -0
- package/dist/types/viewport/src/scene/camera-sun.d.ts +3 -0
- package/dist/types/viewport/src/scene/environment.d.ts +3 -0
- package/dist/types/viewport/src/scene/frame-camera.d.ts +10 -0
- package/dist/types/viewport/src/scene/play-mode.d.ts +9 -0
- package/dist/types/viewport/src/scene/render-pipeline.d.ts +26 -0
- package/dist/types/viewport/src/scene/render-settings.d.ts +18 -0
- package/dist/types/viewport/src/scene/resolve-frag.d.ts +3 -0
- package/dist/types/viewport/src/scene/stage.d.ts +38 -0
- package/dist/types/viewport/src/scene/stress-test.d.ts +6 -0
- package/dist/types/viewport/src/wings/wing-mesh.d.ts +19 -0
- package/dist/types/viewport/src/wings/wing-outlines.d.ts +32 -0
- package/dist/types/viewport/src/wings/wing-pattern.d.ts +7 -0
- package/dist/viewport.d.ts +1 -0
- package/dist/viewport.js +8 -0
- package/dist/viewport.js.map +7 -0
- package/package.json +74 -4
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CreationApi, Id, LibrarySync, Persistence, PreferencesStore, Viewport } from "../../../../api/src/index.js";
|
|
2
|
+
import type { Editor } from "./editor-context.js";
|
|
3
|
+
export type EditorControllerProps = {
|
|
4
|
+
readonly api: CreationApi;
|
|
5
|
+
readonly viewport: Viewport;
|
|
6
|
+
readonly persistence: Persistence;
|
|
7
|
+
readonly preferences: PreferencesStore;
|
|
8
|
+
readonly creationId: Id;
|
|
9
|
+
readonly onOpen: (id: Id) => void;
|
|
10
|
+
/** Git sync of the library, when the host offers it (Scenes dialog). */
|
|
11
|
+
readonly sync?: LibrarySync;
|
|
12
|
+
};
|
|
13
|
+
/** The page's state: the folded creation, the view state, toasts, stats, autosave and the Esc hold. */
|
|
14
|
+
export declare function useEditorController(props: EditorControllerProps): Editor & {
|
|
15
|
+
escDown(): void;
|
|
16
|
+
escUp(cancelled?: boolean): void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Editor } from "./editor-context.js";
|
|
2
|
+
type KeyboardEditor = Editor & {
|
|
3
|
+
escDown(): void;
|
|
4
|
+
escUp(cancelled?: boolean): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* The studio's UI-level shortcuts (the POC help panel): ? help, Esc steps / hold, Ctrl+Z / Y / D, Delete,
|
|
8
|
+
* E cycle mode, + / − size, and , . F for the decal brush. Camera keys (WASD), Space and Q stay with the viewport.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useKeyboard(editor: KeyboardEditor): void;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { BodyRegion, FleckShape, PatternKind, StampMode, StampShape, ViewPreferences, WingOutline, WingPatternStyle } from "../../../../api/src/index.js";
|
|
2
|
+
/** An icon: a Font Awesome solid icon name, a text glyph, or a 24 × 24 outline path. */
|
|
3
|
+
export type IconSpec = {
|
|
4
|
+
readonly fa: string;
|
|
5
|
+
readonly rotate?: number;
|
|
6
|
+
} | {
|
|
7
|
+
readonly glyph: string;
|
|
8
|
+
} | {
|
|
9
|
+
readonly path: string;
|
|
10
|
+
};
|
|
11
|
+
export type StampShapeInfo = {
|
|
12
|
+
readonly id: StampShape;
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly bg: string;
|
|
15
|
+
readonly icon: IconSpec;
|
|
16
|
+
/** Smaller icon used in the shape list. */
|
|
17
|
+
readonly listIcon: IconSpec;
|
|
18
|
+
};
|
|
19
|
+
export declare const STAMP_SHAPES: readonly StampShapeInfo[];
|
|
20
|
+
export declare function stampShapeInfo(shape: StampShape): StampShapeInfo;
|
|
21
|
+
export type ModeInfo = {
|
|
22
|
+
readonly id: StampMode;
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly color: string;
|
|
25
|
+
readonly icon: IconSpec;
|
|
26
|
+
};
|
|
27
|
+
export declare const STAMP_MODES: readonly ModeInfo[];
|
|
28
|
+
/** The list badge shows ∩ for intersect, as in the POC. */
|
|
29
|
+
export declare const MODE_BADGE: {
|
|
30
|
+
readonly [Mode in StampMode]: IconSpec;
|
|
31
|
+
};
|
|
32
|
+
export declare function modeInfo(mode: StampMode): ModeInfo;
|
|
33
|
+
export type FleckShapeInfo = {
|
|
34
|
+
readonly id: FleckShape;
|
|
35
|
+
readonly name: string;
|
|
36
|
+
readonly icon: IconSpec;
|
|
37
|
+
};
|
|
38
|
+
export declare const FLECK_SHAPES: readonly FleckShapeInfo[];
|
|
39
|
+
/** The quick fleck buttons of the Fleck Style bar. */
|
|
40
|
+
export declare const QUICK_FLECKS: readonly {
|
|
41
|
+
readonly id: FleckShape;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly fa: string;
|
|
44
|
+
}[];
|
|
45
|
+
export declare const PATTERNS: readonly {
|
|
46
|
+
readonly id: PatternKind;
|
|
47
|
+
readonly name: string;
|
|
48
|
+
}[];
|
|
49
|
+
export declare const WING_OUTLINES: readonly {
|
|
50
|
+
readonly id: WingOutline;
|
|
51
|
+
readonly name: string;
|
|
52
|
+
}[];
|
|
53
|
+
export declare const WING_STYLES: readonly {
|
|
54
|
+
readonly id: WingPatternStyle;
|
|
55
|
+
readonly name: string;
|
|
56
|
+
}[];
|
|
57
|
+
export declare const RENDER_RESOLUTIONS: readonly {
|
|
58
|
+
readonly id: ViewPreferences["renderResolution"];
|
|
59
|
+
readonly name: string;
|
|
60
|
+
}[];
|
|
61
|
+
export declare const BODY_REGIONS: readonly {
|
|
62
|
+
readonly id: BodyRegion;
|
|
63
|
+
readonly name: string;
|
|
64
|
+
}[];
|
|
65
|
+
/** Decal picker categories: the built-ins, then the creation's designs. */
|
|
66
|
+
export declare const DECAL_CATEGORIES: readonly {
|
|
67
|
+
readonly id: string;
|
|
68
|
+
readonly name: string;
|
|
69
|
+
readonly fa: string;
|
|
70
|
+
}[];
|
|
71
|
+
/** Brush and decal size range (the size panel, + / − keys). */
|
|
72
|
+
export declare const SIZE_MIN = 0.15;
|
|
73
|
+
export declare const SIZE_MAX = 4;
|
|
74
|
+
/** Kaleidoscope copies per axis: the control's range (the core clamps further). */
|
|
75
|
+
export declare const SYMMETRY_MAX = 12;
|
|
76
|
+
export declare const MAX_BONES = 64;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ColorRef, FixedColor, Palette, PaletteSlot, Rgb } from "../../../../api/src/index.js";
|
|
2
|
+
/** The editable slots, in swatch order. */
|
|
3
|
+
export declare const PALETTE_SLOTS: readonly PaletteSlot[];
|
|
4
|
+
/** The fixed colors, shown after the slots with a dark ring. */
|
|
5
|
+
export declare const FIXED_COLORS: readonly FixedColor[];
|
|
6
|
+
export declare const COLOR_REFS: readonly ColorRef[];
|
|
7
|
+
export declare const COLOR_NAMES: {
|
|
8
|
+
readonly [Ref in ColorRef]: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function isFixedColor(ref: ColorRef): ref is FixedColor;
|
|
11
|
+
export declare function refRgb(palette: Palette, ref: ColorRef): Rgb;
|
|
12
|
+
export declare function rgbHex(rgb: Rgb): string;
|
|
13
|
+
export declare function refHex(palette: Palette, ref: ColorRef): string;
|
|
14
|
+
/** "#rrggbb" from a color input; undefined when it is not one. */
|
|
15
|
+
export declare function hexRgb(hex: string): Rgb | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DecalArt, DecalCatalogEntry } from "../../../../api/src/index.js";
|
|
2
|
+
export type CatalogEntry = DecalCatalogEntry & {
|
|
3
|
+
readonly category: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function sameArt(a: DecalArt | undefined, b: DecalArt | undefined): boolean;
|
|
6
|
+
export declare function isInterior(art: DecalArt | undefined): boolean;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { DesignPaint, DesignShape, Palette } from "../../../../api/src/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* The decal editor's working model. A design stores SVG `d` strings in a 128 × 128 space; the editor turns them
|
|
4
|
+
* into editable paths (polylines, ellipses as 4 conjugate anchors, smooth Catmull-Rom curves) and back. Paths it
|
|
5
|
+
* cannot read stay `raw`: shown and restyled, never reshaped. Mirror twins are regenerated from their source.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DESIGN_SIZE = 128;
|
|
8
|
+
export declare const GRID = 4;
|
|
9
|
+
export declare const MAX_POINTS = 120;
|
|
10
|
+
export type Point = readonly [number, number];
|
|
11
|
+
export type EditorPath = {
|
|
12
|
+
readonly kind: "poly";
|
|
13
|
+
readonly points: readonly Point[];
|
|
14
|
+
readonly closed: boolean;
|
|
15
|
+
readonly smooth: boolean;
|
|
16
|
+
} | {
|
|
17
|
+
readonly kind: "ellipse";
|
|
18
|
+
readonly points: readonly Point[];
|
|
19
|
+
} | {
|
|
20
|
+
readonly kind: "raw";
|
|
21
|
+
readonly d: string;
|
|
22
|
+
};
|
|
23
|
+
export type EditorShape = {
|
|
24
|
+
readonly id: string;
|
|
25
|
+
readonly paths: readonly EditorPath[];
|
|
26
|
+
readonly fill: DesignPaint;
|
|
27
|
+
readonly stroke: DesignPaint;
|
|
28
|
+
readonly width: number;
|
|
29
|
+
readonly cap: DesignShape["cap"];
|
|
30
|
+
readonly join: DesignShape["join"];
|
|
31
|
+
readonly rule: DesignShape["rule"];
|
|
32
|
+
readonly mirror: boolean;
|
|
33
|
+
};
|
|
34
|
+
export type Box = {
|
|
35
|
+
readonly x0: number;
|
|
36
|
+
readonly y0: number;
|
|
37
|
+
readonly x1: number;
|
|
38
|
+
readonly y1: number;
|
|
39
|
+
};
|
|
40
|
+
export declare function pathD(path: EditorPath): string;
|
|
41
|
+
export declare function shapeD(shape: EditorShape): string;
|
|
42
|
+
export declare function mirrorPath(path: EditorPath): EditorPath | undefined;
|
|
43
|
+
export declare function twinD(shape: EditorShape): string | undefined;
|
|
44
|
+
export declare function canTransform(shape: EditorShape): boolean;
|
|
45
|
+
export declare function pathBounds(path: EditorPath): Box | undefined;
|
|
46
|
+
export declare function unionBox(a: Box | undefined, b: Box | undefined): Box | undefined;
|
|
47
|
+
export declare function shapeBounds(shape: EditorShape): Box | undefined;
|
|
48
|
+
export declare function shapesBounds(shapes: readonly EditorShape[]): Box | undefined;
|
|
49
|
+
/** Maps every point of the shapes (raw paths stay). */
|
|
50
|
+
export declare function mapShapes(shapes: readonly EditorShape[], ids: ReadonlySet<string>, f: (q: Point) => Point): readonly EditorShape[];
|
|
51
|
+
/** Star (alternating radius) or regular polygon points around a center. */
|
|
52
|
+
export declare function polygonPoints(tool: "star" | "ngon", center: Point, radius: number, sides: number, ratio: number): readonly Point[];
|
|
53
|
+
/** Reads `d` back into editable paths; anything but M / L / H / V / C / Z (absolute or relative) stays raw. */
|
|
54
|
+
export declare function parseD(d: string): readonly EditorPath[];
|
|
55
|
+
/** A design's shapes as editor shapes (twins fold back into a mirror flag on their source). */
|
|
56
|
+
export declare function loadDesignShapes(shapes: readonly DesignShape[], nextId: () => string): readonly EditorShape[];
|
|
57
|
+
/** What is saved: every shape, each mirrored one followed by its twin. */
|
|
58
|
+
export declare function flattenShapes(shapes: readonly EditorShape[]): readonly DesignShape[];
|
|
59
|
+
/** CSS color of a design paint. */
|
|
60
|
+
export declare function paintColor(palette: Palette, paint: DesignPaint): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Quaternion, Transform, Vec3 } from "../../../../api/src/index.js";
|
|
2
|
+
export declare const IDENTITY_QUATERNION: Quaternion;
|
|
3
|
+
export declare const ZERO: Vec3;
|
|
4
|
+
export declare const ONE: Vec3;
|
|
5
|
+
export declare function identityTransform(position?: Vec3): Transform;
|
|
6
|
+
/** Euler angles in degrees (XYZ order, as the POC's Transform tab) to a quaternion. */
|
|
7
|
+
export declare function quaternionFromDegrees(angles: Vec3): Quaternion;
|
|
8
|
+
/** A quaternion to Euler angles in degrees (XYZ order). */
|
|
9
|
+
export declare function degreesFromQuaternion(q: Quaternion): Vec3;
|
|
10
|
+
export declare function multiplyQuaternions(a: Quaternion, b: Quaternion): Quaternion;
|
|
11
|
+
export declare function invertQuaternion(q: Quaternion): Quaternion;
|
|
12
|
+
export declare function addVec(a: Vec3, b: Vec3): Vec3;
|
|
13
|
+
export declare function subVec(a: Vec3, b: Vec3): Vec3;
|
|
14
|
+
export declare function mulVec(a: Vec3, b: Vec3): Vec3;
|
|
15
|
+
/** Per-axis ratio new / old (1 where the old value is zero). */
|
|
16
|
+
export declare function ratioVec(next: Vec3, old: Vec3): Vec3;
|
|
17
|
+
export declare function averageVec(points: readonly Vec3[]): Vec3;
|
|
18
|
+
export declare function clamp(value: number, min: number, max: number): number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Creation, SceneObject, Vec3 } from "../../../../api/src/index.js";
|
|
2
|
+
/** Where a new standalone rig goes: the origin, stepped along x past nearby root objects. */
|
|
3
|
+
export declare function spawnPoint(creation: Creation): Vec3;
|
|
4
|
+
/** The content box a premade is fitted to, in the object's space (from its stamps). */
|
|
5
|
+
export declare function contentFit(object: SceneObject): {
|
|
6
|
+
readonly center: Vec3;
|
|
7
|
+
readonly halfSize: Vec3;
|
|
8
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { BodyPart, Bone, Creation, Design, Id, RigObject, SceneObject, Sculpt, SculptTarget, SmearGroup, Stamp, Vec3 } from "../../../../api/src/index.js";
|
|
2
|
+
/** Read-only lookups over a folded creation. No rule of the domain lives here. */
|
|
3
|
+
export declare function objectById(creation: Creation, id: Id | undefined): SceneObject | undefined;
|
|
4
|
+
export declare function rigById(creation: Creation, id: Id | undefined): RigObject | undefined;
|
|
5
|
+
/** Objects under a parent (undefined: the scene root), in scene order. */
|
|
6
|
+
export declare function childrenOf(creation: Creation, parentId: Id | undefined): readonly SceneObject[];
|
|
7
|
+
export declare function boneOf(rig: RigObject, boneId: Id | undefined): Bone | undefined;
|
|
8
|
+
export declare function partOf(rig: RigObject, boneId: Id | undefined): BodyPart | undefined;
|
|
9
|
+
/** The sculpt a target names: a sculpt object, a rig's skinned body, or a bone's sculpt part. */
|
|
10
|
+
export declare function sculptOf(creation: Creation, target: SculptTarget | undefined): Sculpt | undefined;
|
|
11
|
+
export declare function sameTarget(a: SculptTarget | undefined, b: SculptTarget | undefined): boolean;
|
|
12
|
+
export declare function targetBone(target: SculptTarget | undefined): Id | undefined;
|
|
13
|
+
/** Every sculpt target an object owns: its own sculpt, a rig's body and its sculpt parts. */
|
|
14
|
+
export declare function sculptTargetsOf(object: SceneObject): readonly SculptTarget[];
|
|
15
|
+
/** Bones in tree order (depth first, children in list order), with their depth. */
|
|
16
|
+
export declare function boneTree(rig: RigObject): readonly {
|
|
17
|
+
readonly bone: Bone;
|
|
18
|
+
readonly depth: number;
|
|
19
|
+
}[];
|
|
20
|
+
/** Object ids of an object and everything under it. */
|
|
21
|
+
export declare function subtreeIds(creation: Creation, id: Id): readonly Id[];
|
|
22
|
+
export declare function groupOf(sculpt: Sculpt, stamp: Stamp | undefined): SmearGroup | undefined;
|
|
23
|
+
export declare function groupMembers(sculpt: Sculpt, groupId: Id): readonly Stamp[];
|
|
24
|
+
export type StampRow = {
|
|
25
|
+
readonly kind: "stamp";
|
|
26
|
+
readonly stamp: Stamp;
|
|
27
|
+
readonly index: number;
|
|
28
|
+
} | {
|
|
29
|
+
readonly kind: "group";
|
|
30
|
+
readonly group: SmearGroup;
|
|
31
|
+
readonly members: readonly {
|
|
32
|
+
readonly stamp: Stamp;
|
|
33
|
+
readonly index: number;
|
|
34
|
+
}[];
|
|
35
|
+
};
|
|
36
|
+
/** The shape list: loose stamps, and each smear group once where its first member sits. */
|
|
37
|
+
export declare function stampRows(sculpt: Sculpt): readonly StampRow[];
|
|
38
|
+
/** What one pick selects: a locked smear group selects all its stamps. */
|
|
39
|
+
export declare function pickStamp(sculpt: Sculpt, stampId: Id): readonly Id[];
|
|
40
|
+
/** The steps of the stamp stepper: locked groups count once. */
|
|
41
|
+
export declare function stampSteps(sculpt: Sculpt): readonly (readonly Id[])[];
|
|
42
|
+
/** The smear group a selection is exactly (all of its stamps and nothing else), if any. */
|
|
43
|
+
export declare function selectedGroup(sculpt: Sculpt, stampIds: readonly Id[]): SmearGroup | undefined;
|
|
44
|
+
/** Axis-aligned box of a sculpt's stamps in its local space (stamp rotation and symmetry ignored). */
|
|
45
|
+
export declare function stampBounds(sculpt: Sculpt): {
|
|
46
|
+
readonly center: Vec3;
|
|
47
|
+
readonly halfSize: Vec3;
|
|
48
|
+
} | undefined;
|
|
49
|
+
/** Designs a set of sculpts places as decals. */
|
|
50
|
+
export declare function designsUsedBy(creation: Creation, sculpts: readonly Sculpt[]): readonly Design[];
|
|
51
|
+
export declare function sculptsOfObject(object: SceneObject): readonly Sculpt[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SymmetryAxis } from "../../../../api/src/index.js";
|
|
2
|
+
/** The axes in x, y, z order with one toggled. */
|
|
3
|
+
export declare function toggleAxis(axes: readonly SymmetryAxis[], axis: SymmetryAxis): readonly SymmetryAxis[];
|
|
4
|
+
/** "Off" / "Y (default)" when no axis is chosen, blank once one is. */
|
|
5
|
+
export declare function symmetryHint(count: number, axes: readonly SymmetryAxis[]): string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Command, Creation, Id, SculptTarget, SmearGroup, Stamp, StampPropsPatch } from "../../../../api/src/index.js";
|
|
2
|
+
import type { ViewState } from "./view-state.js";
|
|
3
|
+
/** The selected bone's part, when Rig Bones is active with one rig and a bone selected. */
|
|
4
|
+
export declare function selectedBonePart(creation: Creation, view: ViewState): {
|
|
5
|
+
rig: import("../../../../api/src/index.js").RigObject;
|
|
6
|
+
part: import("../../../../api/src/index.js").BodyPart;
|
|
7
|
+
} | undefined;
|
|
8
|
+
/** What Properties' look tabs edit: the scoped sculpt, a bone's part (or all parts), or every selected object's sculpts. */
|
|
9
|
+
export declare function lookTargets(creation: Creation, view: ViewState): readonly SculptTarget[];
|
|
10
|
+
/** The flat wings the Wing tab edits: the selected bone's wing, or every wing with "All parts". */
|
|
11
|
+
export declare function wingTargets(creation: Creation, view: ViewState): {
|
|
12
|
+
readonly rigId: Id;
|
|
13
|
+
readonly boneIds: readonly Id[];
|
|
14
|
+
} | undefined;
|
|
15
|
+
/** The settings owner of the selected shapes in sculpt mode: a whole smear group, or loose stamps. */
|
|
16
|
+
export type StampSettings = {
|
|
17
|
+
readonly kind: "group";
|
|
18
|
+
readonly target: SculptTarget;
|
|
19
|
+
readonly group: SmearGroup;
|
|
20
|
+
readonly stamps: readonly Stamp[];
|
|
21
|
+
} | {
|
|
22
|
+
readonly kind: "stamps";
|
|
23
|
+
readonly target: SculptTarget;
|
|
24
|
+
readonly stamps: readonly Stamp[];
|
|
25
|
+
};
|
|
26
|
+
export declare function stampSettings(creation: Creation, view: ViewState): StampSettings | undefined;
|
|
27
|
+
/** The command that patches the selected shapes' settings (the group's when they are one group). */
|
|
28
|
+
export declare function stampPropsCommand(settings: StampSettings, props: StampPropsPatch): Command;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { BoneTool, Command, Creation, DecalBrush, Id, SculptTarget, Selection, StampBrush, Tool, ViewPreferences, ViewSession } from "../../../../api/src/index.js";
|
|
2
|
+
export type Category = "transform" | "shape" | "style" | "decal" | "symmetry" | "skeleton" | "rendering" | "utilities";
|
|
3
|
+
/** Panels that become bottom sheets in the compact layout (one shown at a time). */
|
|
4
|
+
export type SheetKey = "properties" | "stampProps" | "palette" | "voxel" | "help" | "shapes" | "bones" | "objects";
|
|
5
|
+
export type PropertiesTab = "transform" | "style" | "material" | "pattern" | "wing" | "pose" | "parts";
|
|
6
|
+
export type TransformTool = "select" | "translate" | "rotate" | "scale" | "pivot";
|
|
7
|
+
/** Everything the studio shows besides the creation. View state: never stored in the creation. */
|
|
8
|
+
export type ViewState = {
|
|
9
|
+
readonly mode: "assembly" | "sculpt";
|
|
10
|
+
readonly scope?: SculptTarget;
|
|
11
|
+
readonly selection: Selection;
|
|
12
|
+
readonly category: Category;
|
|
13
|
+
readonly tool: Tool;
|
|
14
|
+
/** The Transform bar's tool, restored when the category comes back. */
|
|
15
|
+
readonly transformTool: TransformTool;
|
|
16
|
+
readonly space: "world" | "local";
|
|
17
|
+
readonly brush: StampBrush;
|
|
18
|
+
readonly decalBrush: DecalBrush;
|
|
19
|
+
readonly decalCategory: string;
|
|
20
|
+
readonly boneTool: BoneTool;
|
|
21
|
+
/** The pivot tool's gizmo: move or turn the pivot. */
|
|
22
|
+
readonly pivotGizmo: "translate" | "rotate";
|
|
23
|
+
/** Rigs whose bones are hidden (the object list's eye toggle). */
|
|
24
|
+
readonly hiddenBones: readonly Id[];
|
|
25
|
+
readonly touchArea: boolean;
|
|
26
|
+
readonly touchAdd: boolean;
|
|
27
|
+
readonly play: boolean;
|
|
28
|
+
readonly stressTest: boolean;
|
|
29
|
+
readonly prefs: ViewPreferences;
|
|
30
|
+
/** Floating panels the user opened. */
|
|
31
|
+
readonly open: {
|
|
32
|
+
readonly [Key in "properties" | "stampProps" | "palette" | "voxel" | "help"]: boolean;
|
|
33
|
+
};
|
|
34
|
+
/** Left-stack lists shrunk to their icon. */
|
|
35
|
+
readonly minimized: {
|
|
36
|
+
readonly [Key in "shapes" | "bones" | "objects"]: boolean;
|
|
37
|
+
};
|
|
38
|
+
/** Sheets in the order they were opened (newest last). */
|
|
39
|
+
readonly sheetOrder: readonly SheetKey[];
|
|
40
|
+
readonly propertiesTab: PropertiesTab;
|
|
41
|
+
readonly editAllParts: boolean;
|
|
42
|
+
readonly premadeOpen: boolean;
|
|
43
|
+
readonly scenesOpen: boolean;
|
|
44
|
+
/** The decal design editor: closed, a new design, or a design to edit. */
|
|
45
|
+
readonly decalEditor: null | {
|
|
46
|
+
readonly designId?: Id;
|
|
47
|
+
};
|
|
48
|
+
/** Expanded rows of the object list. */
|
|
49
|
+
readonly expanded: readonly Id[];
|
|
50
|
+
};
|
|
51
|
+
export declare const EMPTY_SELECTION: Selection;
|
|
52
|
+
export declare const DEFAULT_BRUSH: StampBrush;
|
|
53
|
+
export declare const DEFAULT_DECAL_BRUSH: DecalBrush;
|
|
54
|
+
export declare function initialViewState(prefs: ViewPreferences, compact: boolean): ViewState;
|
|
55
|
+
/** What the viewport is sent with every change. */
|
|
56
|
+
export declare function viewSession(view: ViewState): ViewSession;
|
|
57
|
+
/** Opens or closes a sheet panel, keeping the compact sheet order. */
|
|
58
|
+
export declare function withSheet(view: ViewState, key: SheetKey, open: boolean): ViewState;
|
|
59
|
+
export declare function isSculptScopeSymmetric(view: ViewState): boolean;
|
|
60
|
+
/** Which categories the bar shows: Symmetry only in a sculpt (not a body part), Rig Bones only in assembly. */
|
|
61
|
+
export declare function categoryVisible(view: ViewState, category: Category): boolean;
|
|
62
|
+
export declare function selectCategory(view: ViewState, category: Category): ViewState;
|
|
63
|
+
export declare function setTransformTool(view: ViewState, tool: TransformTool): ViewState;
|
|
64
|
+
/** Scopes into a sculpt target: sculpt mode, Select tool, the first stamp selected. */
|
|
65
|
+
export declare function enterScope(view: ViewState, creation: Creation, target: SculptTarget): ViewState;
|
|
66
|
+
/** Leaves sculpt mode. A body part returns to its rig with the bone selected and Rig Bones open. */
|
|
67
|
+
export declare function leaveScope(view: ViewState): ViewState;
|
|
68
|
+
/** Drops ids that no longer exist; leaves a scope whose sculpt is gone. */
|
|
69
|
+
export declare function pruneView(view: ViewState, creation: Creation): ViewState;
|
|
70
|
+
/** After an accepted command: select what it created (new root objects, new stamps in scope, a new bone). */
|
|
71
|
+
export declare function selectCreated(view: ViewState, before: Creation, after: Creation, command: Command): ViewState;
|
|
72
|
+
/** In the compact layout only the newest open sheet is drawn. */
|
|
73
|
+
export declare function sheetHidden(view: ViewState, compact: boolean, key: SheetKey): boolean;
|
|
74
|
+
export declare function anySheetOpen(view: ViewState, compact: boolean): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SymmetryAxis } from "../../../../api/src/index.js";
|
|
2
|
+
export type AxisPillProps = {
|
|
3
|
+
readonly axes: readonly SymmetryAxis[];
|
|
4
|
+
readonly onToggle: (axis: SymmetryAxis) => void;
|
|
5
|
+
};
|
|
6
|
+
/** The X / Y / Z kaleidoscope axis toggles. */
|
|
7
|
+
export declare function AxisPill({ axes, onToggle }: AxisPillProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ColorRef, Palette, PaletteSlot, Rgb } from "../../../../api/src/index.js";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export type ColorFieldProps = {
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly palette: Palette;
|
|
6
|
+
readonly value: ColorRef;
|
|
7
|
+
/** Next to the label (Match, Inherit). */
|
|
8
|
+
readonly extra?: ReactNode | undefined;
|
|
9
|
+
readonly onPick: (ref: ColorRef) => void;
|
|
10
|
+
/** The picker edits the referenced slot (fixed colors cannot be edited). */
|
|
11
|
+
readonly onEditSlot: (slot: PaletteSlot, color: Rgb) => void;
|
|
12
|
+
};
|
|
13
|
+
/** A labelled color choice: the slot picker plus the swatch grid. */
|
|
14
|
+
export declare function ColorField({ label, palette, value, extra, onPick, onEditSlot }: ColorFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type CountStepperProps = {
|
|
2
|
+
readonly label: string;
|
|
3
|
+
readonly value: number;
|
|
4
|
+
readonly min: number;
|
|
5
|
+
readonly max: number;
|
|
6
|
+
readonly onChange: (value: number) => void;
|
|
7
|
+
};
|
|
8
|
+
/** − n + */
|
|
9
|
+
export declare function CountStepper({ label, value, min, max, onChange }: CountStepperProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
/** The z-order counter shared by one studio's panels (a click raises a panel). */
|
|
3
|
+
export declare const PanelLayerContext: import("react").Context<{
|
|
4
|
+
top: number;
|
|
5
|
+
}>;
|
|
6
|
+
export type FloatingPanelProps = {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly title: ReactNode;
|
|
9
|
+
readonly icon?: string | undefined;
|
|
10
|
+
readonly className?: string | undefined;
|
|
11
|
+
/** Header buttons before the close button. */
|
|
12
|
+
readonly headerExtra?: ReactNode | undefined;
|
|
13
|
+
/** Hidden by the compact layout (another sheet is on top). */
|
|
14
|
+
readonly sheetHidden?: boolean | undefined;
|
|
15
|
+
/** Dragging is off in the compact layout. */
|
|
16
|
+
readonly draggable?: boolean | undefined;
|
|
17
|
+
readonly headerClassName?: string | undefined;
|
|
18
|
+
readonly style?: CSSProperties | undefined;
|
|
19
|
+
readonly children: ReactNode;
|
|
20
|
+
readonly onClose?: () => void;
|
|
21
|
+
readonly onDragOver?: (event: React.DragEvent) => void;
|
|
22
|
+
readonly onDragLeave?: (event: React.DragEvent) => void;
|
|
23
|
+
readonly onDrop?: (event: React.DragEvent) => void;
|
|
24
|
+
};
|
|
25
|
+
/** A frosted panel that moves by its header, stays inside the window and comes to the front on click. */
|
|
26
|
+
export declare function FloatingPanel({ id, title, icon, className, headerExtra, sheetHidden, draggable, headerClassName, style, children, onClose, onDragOver, onDragLeave, onDrop, }: FloatingPanelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare function HelpSection({ children }: {
|
|
3
|
+
readonly children: ReactNode;
|
|
4
|
+
}): import("react").JSX.Element;
|
|
5
|
+
export declare function HelpRow({ keys, children }: {
|
|
6
|
+
readonly keys: ReactNode;
|
|
7
|
+
readonly children: ReactNode;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type InlineEditProps = {
|
|
2
|
+
readonly value: string;
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly maxLength?: number | undefined;
|
|
5
|
+
readonly onCommit: (value: string) => void;
|
|
6
|
+
readonly onCancel: () => void;
|
|
7
|
+
};
|
|
8
|
+
/** A text field that replaces a name while renaming: Enter or blur commits, Esc cancels. */
|
|
9
|
+
export declare function InlineEdit({ value, label, maxLength, onCommit, onCancel }: InlineEditProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DragEvent, ReactNode } from "react";
|
|
2
|
+
import type { IconSpec } from "../lib/catalog.js";
|
|
3
|
+
export type ListRowProps = {
|
|
4
|
+
readonly name: ReactNode;
|
|
5
|
+
readonly icon: string | IconSpec;
|
|
6
|
+
readonly iconBg?: string | undefined;
|
|
7
|
+
readonly selected?: boolean | undefined;
|
|
8
|
+
/** "group" (pink smear group) or "member" (indented). */
|
|
9
|
+
readonly variant?: "group" | "member" | undefined;
|
|
10
|
+
/** Left indent in pixels. */
|
|
11
|
+
readonly indent?: number | undefined;
|
|
12
|
+
readonly lead?: ReactNode | undefined;
|
|
13
|
+
readonly children?: ReactNode | undefined;
|
|
14
|
+
readonly dropTarget?: boolean | undefined;
|
|
15
|
+
readonly draggable?: boolean | undefined;
|
|
16
|
+
readonly onClick?: () => void;
|
|
17
|
+
readonly onDoubleClick?: () => void;
|
|
18
|
+
readonly onDragStart?: (event: DragEvent) => void;
|
|
19
|
+
readonly onDragEnd?: () => void;
|
|
20
|
+
readonly onDragOver?: (event: DragEvent) => void;
|
|
21
|
+
readonly onDragLeave?: (event: DragEvent) => void;
|
|
22
|
+
readonly onDrop?: (event: DragEvent) => void;
|
|
23
|
+
};
|
|
24
|
+
/** One row of the shape, bone and object lists. Buttons go in `children`. */
|
|
25
|
+
export declare function ListRow({ name, icon, iconBg, selected, variant, indent, lead, children, dropTarget, draggable, onClick, onDoubleClick, onDragStart, onDragEnd, onDragOver, onDragLeave, onDrop, }: ListRowProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type ModalProps = {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly cardClassName: string;
|
|
6
|
+
readonly children: ReactNode;
|
|
7
|
+
/** A click on the backdrop (outside the card). */
|
|
8
|
+
readonly onBackdrop?: () => void;
|
|
9
|
+
};
|
|
10
|
+
/** A centered card over a blurred backdrop. */
|
|
11
|
+
export declare function Modal({ id, label, cardClassName, children, onBackdrop }: ModalProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StampMode } from "../../../../api/src/index.js";
|
|
2
|
+
export type ModePillProps = {
|
|
3
|
+
readonly value: StampMode;
|
|
4
|
+
readonly onChange: (mode: StampMode) => void;
|
|
5
|
+
};
|
|
6
|
+
/** Add / Subtract / Intersect / Paint. */
|
|
7
|
+
export declare function ModePill({ value, onChange }: ModePillProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type ScrollRowProps = {
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly children: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* A long toolbar section that scrolls sideways: edge fades and chevrons when there is more, wheel scrolling,
|
|
8
|
+
* and one shared tooltip (tooltips inside a scroller would be clipped).
|
|
9
|
+
*/
|
|
10
|
+
export declare function ScrollRow({ label, children }: ScrollRowProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type SliderRowProps = {
|
|
2
|
+
readonly label: string;
|
|
3
|
+
readonly value: number;
|
|
4
|
+
readonly min: number;
|
|
5
|
+
readonly max: number;
|
|
6
|
+
readonly step?: number | undefined;
|
|
7
|
+
readonly digits?: number | undefined;
|
|
8
|
+
readonly suffix?: string | undefined;
|
|
9
|
+
/** Greyed out and inert (fleck sliders while flecks are off). */
|
|
10
|
+
readonly off?: boolean | undefined;
|
|
11
|
+
/** Shows the value in blue (a per-shape override). */
|
|
12
|
+
readonly own?: boolean | undefined;
|
|
13
|
+
readonly onCommit: (value: number) => void;
|
|
14
|
+
};
|
|
15
|
+
/** Label, live value and a range input that commits on release. */
|
|
16
|
+
export declare function SliderRow({ label, value, min, max, step, digits, suffix, off, own, onCommit }: SliderRowProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ColorRef, Palette } from "../../../../api/src/index.js";
|
|
2
|
+
export type SwatchRowProps = {
|
|
3
|
+
readonly palette: Palette;
|
|
4
|
+
readonly active?: ColorRef | undefined;
|
|
5
|
+
/** Fixed pixel size: a row (toolbars). Without it: a 10-column grid (panels). */
|
|
6
|
+
readonly size?: number | undefined;
|
|
7
|
+
readonly label: string;
|
|
8
|
+
readonly onPick: (ref: ColorRef) => void;
|
|
9
|
+
};
|
|
10
|
+
/** One swatch per palette slot, then the fixed colors. */
|
|
11
|
+
export declare function SwatchRow({ palette, active, size, label, onPick }: SwatchRowProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type TabBarProps<Tab extends string> = {
|
|
2
|
+
readonly tabs: readonly {
|
|
3
|
+
readonly id: Tab;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
}[];
|
|
6
|
+
readonly active: Tab;
|
|
7
|
+
readonly onSelect: (tab: Tab) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function TabBar<Tab extends string>({ tabs, active, onSelect }: TabBarProps<Tab>): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** A labelled pill inside a toolbar ("Blend", "Copies", "Mode"). */
|
|
3
|
+
export declare function ToolbarPill({ label, children, title }: {
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly title?: string;
|
|
6
|
+
readonly children: ReactNode;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type ToolbarProps = {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly label: string;
|
|
5
|
+
/** Sub-toolbars sit under the category bar. */
|
|
6
|
+
readonly sub?: boolean | undefined;
|
|
7
|
+
readonly children: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
/** A frosted toolbar row. */
|
|
10
|
+
export declare function Toolbar({ id, label, sub, children }: ToolbarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Vec3 } from "../../../../api/src/index.js";
|
|
2
|
+
export type Vec3FieldProps = {
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly value: Vec3;
|
|
5
|
+
readonly step?: number | undefined;
|
|
6
|
+
readonly digits?: number | undefined;
|
|
7
|
+
readonly onCommit: (value: Vec3) => void;
|
|
8
|
+
};
|
|
9
|
+
/** Three number inputs (x, y, z); each commits the whole vector. */
|
|
10
|
+
export declare function Vec3Field({ label, value, step, digits, onCommit }: Vec3FieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Bone, Id } from "../../../../api/src/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* The selected bone's proportions: Length (its child joints move with it) and Thickness. A head starts at its made
|
|
4
|
+
* size and can only grow; the core enforces that, the sliders only start there.
|
|
5
|
+
*/
|
|
6
|
+
export declare function BoneSizeSliders({ rigId, bone }: {
|
|
7
|
+
readonly rigId: Id;
|
|
8
|
+
readonly bone: Bone;
|
|
9
|
+
}): import("react").JSX.Element;
|