@clockgrove/assetgrove 0.0.0-stage → 0.3.2
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 +277 -2
- package/dist/animation/commands.d.ts +180 -0
- package/dist/animation/commands.js +515 -0
- package/dist/animation/facing.d.ts +44 -0
- package/dist/animation/facing.js +100 -0
- package/dist/animation/fix.d.ts +136 -0
- package/dist/animation/fix.js +529 -0
- package/dist/animation/flicker.d.ts +44 -0
- package/dist/animation/flicker.js +117 -0
- package/dist/animation/halo.d.ts +72 -0
- package/dist/animation/halo.js +253 -0
- package/dist/animation/holes.d.ts +122 -0
- package/dist/animation/holes.js +262 -0
- package/dist/animation/preview.d.ts +38 -0
- package/dist/animation/preview.js +161 -0
- package/dist/animation/qa.d.ts +57 -0
- package/dist/animation/qa.js +418 -0
- package/dist/animation/run.d.ts +109 -0
- package/dist/animation/run.js +182 -0
- package/dist/animation/strip.d.ts +13 -0
- package/dist/animation/strip.js +41 -0
- package/dist/animation/template-choice.d.ts +75 -0
- package/dist/animation/template-choice.js +153 -0
- package/dist/animation/templates.d.ts +39 -0
- package/dist/animation/templates.js +333 -0
- package/dist/animation/types.d.ts +257 -0
- package/dist/animation/types.js +1 -0
- package/dist/approvals.d.ts +156 -0
- package/dist/approvals.js +369 -0
- package/dist/audio/aac.d.ts +61 -0
- package/dist/audio/aac.js +152 -0
- package/dist/audio/checks.d.ts +38 -0
- package/dist/audio/checks.js +254 -0
- package/dist/audio/delivery.d.ts +52 -0
- package/dist/audio/delivery.js +105 -0
- package/dist/audio/engine.d.ts +65 -0
- package/dist/audio/engine.js +164 -0
- package/dist/audio/handoff.d.ts +75 -0
- package/dist/audio/handoff.js +185 -0
- package/dist/audio/kinds.d.ts +6 -0
- package/dist/audio/kinds.js +315 -0
- package/dist/audio/loudness.d.ts +22 -0
- package/dist/audio/loudness.js +72 -0
- package/dist/audio/ogg.d.ts +27 -0
- package/dist/audio/ogg.js +65 -0
- package/dist/audio/operations.d.ts +20 -0
- package/dist/audio/operations.js +335 -0
- package/dist/audio/opus.d.ts +40 -0
- package/dist/audio/opus.js +108 -0
- package/dist/audio/profile.d.ts +200 -0
- package/dist/audio/profile.js +126 -0
- package/dist/audio/run.d.ts +83 -0
- package/dist/audio/run.js +192 -0
- package/dist/audio/vorbis-comments.d.ts +25 -0
- package/dist/audio/vorbis-comments.js +243 -0
- package/dist/audio/waveform.d.ts +13 -0
- package/dist/audio/waveform.js +52 -0
- package/dist/audio-parameters.d.ts +17 -0
- package/dist/audio-parameters.js +45 -0
- package/dist/audit/bar.d.ts +65 -0
- package/dist/audit/bar.js +97 -0
- package/dist/audit/members.d.ts +40 -0
- package/dist/audit/members.js +119 -0
- package/dist/bible-view.d.ts +10 -0
- package/dist/bible-view.js +122 -0
- package/dist/bible.d.ts +272 -0
- package/dist/bible.js +641 -0
- package/dist/budget.d.ts +119 -0
- package/dist/budget.js +227 -0
- package/dist/call-parameters.d.ts +71 -0
- package/dist/call-parameters.js +90 -0
- package/dist/calls.d.ts +145 -0
- package/dist/calls.js +788 -0
- package/dist/cli/main.d.ts +22 -0
- package/dist/cli/main.js +137 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +5 -0
- package/dist/commands/animation-qa.d.ts +1 -0
- package/dist/commands/animation-qa.js +240 -0
- package/dist/commands/apply.d.ts +12 -0
- package/dist/commands/apply.js +181 -0
- package/dist/commands/audit.d.ts +92 -0
- package/dist/commands/audit.js +555 -0
- package/dist/commands/bible.d.ts +1 -0
- package/dist/commands/bible.js +39 -0
- package/dist/commands/browse.d.ts +12 -0
- package/dist/commands/browse.js +113 -0
- package/dist/commands/card.d.ts +3 -0
- package/dist/commands/card.js +445 -0
- package/dist/commands/compare.d.ts +1 -0
- package/dist/commands/compare.js +90 -0
- package/dist/commands/confirm.d.ts +1 -0
- package/dist/commands/confirm.js +267 -0
- package/dist/commands/context.d.ts +43 -0
- package/dist/commands/context.js +115 -0
- package/dist/commands/deliver.d.ts +1 -0
- package/dist/commands/deliver.js +99 -0
- package/dist/commands/disclosure.d.ts +1 -0
- package/dist/commands/disclosure.js +80 -0
- package/dist/commands/doctor.d.ts +1 -0
- package/dist/commands/doctor.js +112 -0
- package/dist/commands/estimate.d.ts +2 -0
- package/dist/commands/estimate.js +80 -0
- package/dist/commands/extensions.d.ts +2 -0
- package/dist/commands/extensions.js +70 -0
- package/dist/commands/fix-frame.d.ts +1 -0
- package/dist/commands/fix-frame.js +206 -0
- package/dist/commands/generate-sheet.d.ts +1 -0
- package/dist/commands/generate-sheet.js +245 -0
- package/dist/commands/identity-check.d.ts +1 -0
- package/dist/commands/identity-check.js +110 -0
- package/dist/commands/identity-eval.d.ts +1 -0
- package/dist/commands/identity-eval.js +197 -0
- package/dist/commands/import.d.ts +7 -0
- package/dist/commands/import.js +472 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +117 -0
- package/dist/commands/intake.d.ts +1 -0
- package/dist/commands/intake.js +56 -0
- package/dist/commands/labels.d.ts +1 -0
- package/dist/commands/labels.js +101 -0
- package/dist/commands/library.d.ts +9 -0
- package/dist/commands/library.js +711 -0
- package/dist/commands/lod.d.ts +1 -0
- package/dist/commands/lod.js +93 -0
- package/dist/commands/look-dev.d.ts +1 -0
- package/dist/commands/look-dev.js +148 -0
- package/dist/commands/materials.d.ts +1 -0
- package/dist/commands/materials.js +223 -0
- package/dist/commands/mcp.d.ts +1 -0
- package/dist/commands/mcp.js +53 -0
- package/dist/commands/migrate.d.ts +1 -0
- package/dist/commands/migrate.js +123 -0
- package/dist/commands/op.d.ts +5 -0
- package/dist/commands/op.js +114 -0
- package/dist/commands/ops.d.ts +1 -0
- package/dist/commands/ops.js +17 -0
- package/dist/commands/pick-batch.d.ts +24 -0
- package/dist/commands/pick-batch.js +343 -0
- package/dist/commands/pick.d.ts +48 -0
- package/dist/commands/pick.js +469 -0
- package/dist/commands/plan.d.ts +3 -0
- package/dist/commands/plan.js +156 -0
- package/dist/commands/recipe.d.ts +1 -0
- package/dist/commands/recipe.js +52 -0
- package/dist/commands/registry.d.ts +5 -0
- package/dist/commands/registry.js +121 -0
- package/dist/commands/render-sprite.d.ts +1 -0
- package/dist/commands/render-sprite.js +67 -0
- package/dist/commands/rendition.d.ts +1 -0
- package/dist/commands/rendition.js +56 -0
- package/dist/commands/request-change.d.ts +2 -0
- package/dist/commands/request-change.js +950 -0
- package/dist/commands/result.d.ts +34 -0
- package/dist/commands/result.js +237 -0
- package/dist/commands/review.d.ts +28 -0
- package/dist/commands/review.js +444 -0
- package/dist/commands/rig.d.ts +1 -0
- package/dist/commands/rig.js +74 -0
- package/dist/commands/runner.d.ts +45 -0
- package/dist/commands/runner.js +297 -0
- package/dist/commands/runs.d.ts +22 -0
- package/dist/commands/runs.js +159 -0
- package/dist/commands/search.d.ts +69 -0
- package/dist/commands/search.js +638 -0
- package/dist/commands/settings.d.ts +2 -0
- package/dist/commands/settings.js +284 -0
- package/dist/commands/spend.d.ts +2 -0
- package/dist/commands/spend.js +159 -0
- package/dist/commands/stage-source.d.ts +1 -0
- package/dist/commands/stage-source.js +58 -0
- package/dist/commands/stage.d.ts +9 -0
- package/dist/commands/stage.js +229 -0
- package/dist/commands/storage.d.ts +3 -0
- package/dist/commands/storage.js +200 -0
- package/dist/commands/turnaround.d.ts +1 -0
- package/dist/commands/turnaround.js +171 -0
- package/dist/commands/types.d.ts +195 -0
- package/dist/commands/types.js +7 -0
- package/dist/commands/vary.d.ts +2 -0
- package/dist/commands/vary.js +222 -0
- package/dist/commands/write-families.d.ts +14 -0
- package/dist/commands/write-families.js +158 -0
- package/dist/compare.d.ts +87 -0
- package/dist/compare.js +306 -0
- package/dist/confirm/delegation.d.ts +30 -0
- package/dist/confirm/delegation.js +31 -0
- package/dist/confirm/index.d.ts +84 -0
- package/dist/confirm/index.js +176 -0
- package/dist/confirm/mcp.d.ts +60 -0
- package/dist/confirm/mcp.js +253 -0
- package/dist/confirm/pending.d.ts +11 -0
- package/dist/confirm/pending.js +40 -0
- package/dist/confirm/prompt.d.ts +65 -0
- package/dist/confirm/prompt.js +68 -0
- package/dist/confirm/records.d.ts +17 -0
- package/dist/confirm/records.js +63 -0
- package/dist/contact.d.ts +80 -0
- package/dist/contact.js +224 -0
- package/dist/credentials.d.ts +170 -0
- package/dist/credentials.js +598 -0
- package/dist/dataflows.d.ts +32 -0
- package/dist/dataflows.js +42 -0
- package/dist/delivery.d.ts +89 -0
- package/dist/delivery.js +355 -0
- package/dist/disclosure.d.ts +84 -0
- package/dist/disclosure.js +397 -0
- package/dist/env.d.ts +90 -0
- package/dist/env.js +236 -0
- package/dist/errors.d.ts +90 -0
- package/dist/errors.js +105 -0
- package/dist/extension/api.d.ts +389 -0
- package/dist/extension/api.js +20 -0
- package/dist/extension/context.d.ts +9 -0
- package/dist/extension/context.js +60 -0
- package/dist/extension/helpers.d.ts +75 -0
- package/dist/extension/helpers.js +107 -0
- package/dist/extension/http.d.ts +32 -0
- package/dist/extension/http.js +104 -0
- package/dist/extension/setup.d.ts +53 -0
- package/dist/extension/setup.js +162 -0
- package/dist/extension/tools.d.ts +97 -0
- package/dist/extension/tools.js +235 -0
- package/dist/extensions/core.d.ts +7 -0
- package/dist/extensions/core.js +18 -0
- package/dist/extensions/errors.d.ts +22 -0
- package/dist/extensions/errors.js +34 -0
- package/dist/extensions/registry.d.ts +119 -0
- package/dist/extensions/registry.js +535 -0
- package/dist/extensions/version.d.ts +9 -0
- package/dist/extensions/version.js +57 -0
- package/dist/formats.d.ts +46 -0
- package/dist/formats.js +81 -0
- package/dist/frames.d.ts +58 -0
- package/dist/frames.js +80 -0
- package/dist/gateway/anthropic.d.ts +22 -0
- package/dist/gateway/anthropic.js +65 -0
- package/dist/gateway/elevenlabs.d.ts +36 -0
- package/dist/gateway/elevenlabs.js +192 -0
- package/dist/gateway/failure.d.ts +29 -0
- package/dist/gateway/failure.js +70 -0
- package/dist/gateway/openai-compatible.d.ts +20 -0
- package/dist/gateway/openai-compatible.js +76 -0
- package/dist/gateway/openai.d.ts +28 -0
- package/dist/gateway/openai.js +101 -0
- package/dist/gateway/provider.d.ts +380 -0
- package/dist/gateway/provider.js +5 -0
- package/dist/gateway/scripted.d.ts +252 -0
- package/dist/gateway/scripted.js +244 -0
- package/dist/gateway/stability.d.ts +38 -0
- package/dist/gateway/stability.js +232 -0
- package/dist/gateway/structured.d.ts +31 -0
- package/dist/gateway/structured.js +83 -0
- package/dist/gateway/tripo.d.ts +48 -0
- package/dist/gateway/tripo.js +374 -0
- package/dist/gateway/vercel.d.ts +52 -0
- package/dist/gateway/vercel.js +298 -0
- package/dist/generators/generator.d.ts +236 -0
- package/dist/generators/generator.js +12 -0
- package/dist/generators/image.d.ts +21 -0
- package/dist/generators/image.js +286 -0
- package/dist/generators/spec-schema.d.ts +29 -0
- package/dist/generators/spec-schema.js +21 -0
- package/dist/git-marker.d.ts +3 -0
- package/dist/git-marker.js +13 -0
- package/dist/gitlfs.d.ts +38 -0
- package/dist/gitlfs.js +171 -0
- package/dist/guard.d.ts +55 -0
- package/dist/guard.js +323 -0
- package/dist/handoff/current-profile.d.ts +48 -0
- package/dist/handoff/current-profile.js +127 -0
- package/dist/handoff/doctor.d.ts +26 -0
- package/dist/handoff/doctor.js +249 -0
- package/dist/handoff/mark-check.d.ts +17 -0
- package/dist/handoff/mark-check.js +66 -0
- package/dist/handoff/presets/aseprite-json.d.ts +5 -0
- package/dist/handoff/presets/aseprite-json.js +45 -0
- package/dist/handoff/presets/atlas-json.d.ts +44 -0
- package/dist/handoff/presets/atlas-json.js +195 -0
- package/dist/handoff/presets/atlas-pack.d.ts +14 -0
- package/dist/handoff/presets/atlas-pack.js +431 -0
- package/dist/handoff/presets/index.d.ts +273 -0
- package/dist/handoff/presets/index.js +58 -0
- package/dist/handoff/presets/manifest.d.ts +2 -0
- package/dist/handoff/presets/manifest.js +49 -0
- package/dist/handoff/usage.d.ts +27 -0
- package/dist/handoff/usage.js +159 -0
- package/dist/handoff.d.ts +345 -0
- package/dist/handoff.js +1221 -0
- package/dist/identity-eval.d.ts +156 -0
- package/dist/identity-eval.js +321 -0
- package/dist/identity.d.ts +293 -0
- package/dist/identity.js +675 -0
- package/dist/image/apply-style.d.ts +4 -0
- package/dist/image/apply-style.js +37 -0
- package/dist/image/digits.d.ts +5 -0
- package/dist/image/digits.js +40 -0
- package/dist/image/ktx2.d.ts +83 -0
- package/dist/image/ktx2.js +196 -0
- package/dist/image/raster.d.ts +23 -0
- package/dist/image/raster.js +77 -0
- package/dist/image/resample.d.ts +10 -0
- package/dist/image/resample.js +82 -0
- package/dist/image/webp.d.ts +17 -0
- package/dist/image/webp.js +323 -0
- package/dist/init.d.ts +132 -0
- package/dist/init.js +425 -0
- package/dist/inputs.d.ts +67 -0
- package/dist/inputs.js +151 -0
- package/dist/json.d.ts +7 -0
- package/dist/json.js +27 -0
- package/dist/keys.d.ts +34 -0
- package/dist/keys.js +198 -0
- package/dist/kind-schemas.d.ts +17 -0
- package/dist/kind-schemas.js +205 -0
- package/dist/library/actions.d.ts +76 -0
- package/dist/library/actions.js +212 -0
- package/dist/library/adopt.d.ts +177 -0
- package/dist/library/adopt.js +624 -0
- package/dist/library/canonical.d.ts +7 -0
- package/dist/library/canonical.js +29 -0
- package/dist/library/card.d.ts +138 -0
- package/dist/library/card.js +532 -0
- package/dist/library/credits.d.ts +70 -0
- package/dist/library/credits.js +222 -0
- package/dist/library/describe.d.ts +48 -0
- package/dist/library/describe.js +199 -0
- package/dist/library/diff.d.ts +26 -0
- package/dist/library/diff.js +208 -0
- package/dist/library/exact.d.ts +15 -0
- package/dist/library/exact.js +47 -0
- package/dist/library/extent.d.ts +56 -0
- package/dist/library/extent.js +205 -0
- package/dist/library/folder.d.ts +85 -0
- package/dist/library/folder.js +291 -0
- package/dist/library/labels.d.ts +29 -0
- package/dist/library/labels.js +112 -0
- package/dist/library/lfs.d.ts +42 -0
- package/dist/library/lfs.js +140 -0
- package/dist/library/maintain.d.ts +100 -0
- package/dist/library/maintain.js +750 -0
- package/dist/library/media-metadata.d.ts +19 -0
- package/dist/library/media-metadata.js +92 -0
- package/dist/library/paths.d.ts +7 -0
- package/dist/library/paths.js +65 -0
- package/dist/library/relations.d.ts +59 -0
- package/dist/library/relations.js +176 -0
- package/dist/library/review.d.ts +204 -0
- package/dist/library/review.js +545 -0
- package/dist/library/stale.d.ts +88 -0
- package/dist/library/stale.js +229 -0
- package/dist/library/suggestions.d.ts +37 -0
- package/dist/library/suggestions.js +146 -0
- package/dist/library/summary.d.ts +65 -0
- package/dist/library/summary.js +138 -0
- package/dist/library/undo.d.ts +18 -0
- package/dist/library/undo.js +141 -0
- package/dist/library/worklist.d.ts +42 -0
- package/dist/library/worklist.js +91 -0
- package/dist/library/write.d.ts +282 -0
- package/dist/library/write.js +790 -0
- package/dist/license.d.ts +67 -0
- package/dist/license.js +205 -0
- package/dist/limits.d.ts +51 -0
- package/dist/limits.js +100 -0
- package/dist/loop.d.ts +244 -0
- package/dist/loop.js +377 -0
- package/dist/material/core.d.ts +70 -0
- package/dist/material/core.js +238 -0
- package/dist/material/engine.d.ts +15 -0
- package/dist/material/engine.js +141 -0
- package/dist/material/flicker.d.ts +26 -0
- package/dist/material/flicker.js +71 -0
- package/dist/material/operations.d.ts +2 -0
- package/dist/material/operations.js +48 -0
- package/dist/material/pipeline.d.ts +51 -0
- package/dist/material/pipeline.js +431 -0
- package/dist/material/profile.d.ts +29 -0
- package/dist/material/profile.js +97 -0
- package/dist/material/rendition.d.ts +5 -0
- package/dist/material/rendition.js +76 -0
- package/dist/mcp.d.ts +72 -0
- package/dist/mcp.js +514 -0
- package/dist/media.d.ts +36 -0
- package/dist/media.js +46 -0
- package/dist/metadata.d.ts +61 -0
- package/dist/metadata.js +748 -0
- package/dist/model-declarations.d.ts +28 -0
- package/dist/model-declarations.js +14 -0
- package/dist/model3d/clip-map.d.ts +49 -0
- package/dist/model3d/clip-map.js +129 -0
- package/dist/model3d/core-checks.d.ts +61 -0
- package/dist/model3d/core-checks.js +278 -0
- package/dist/model3d/facing.d.ts +49 -0
- package/dist/model3d/facing.js +125 -0
- package/dist/model3d/generator.d.ts +19 -0
- package/dist/model3d/generator.js +482 -0
- package/dist/model3d/glb.d.ts +120 -0
- package/dist/model3d/glb.js +155 -0
- package/dist/model3d/handoff.d.ts +37 -0
- package/dist/model3d/handoff.js +131 -0
- package/dist/model3d/lod/chain.d.ts +50 -0
- package/dist/model3d/lod/chain.js +447 -0
- package/dist/model3d/lod/command.d.ts +38 -0
- package/dist/model3d/lod/command.js +377 -0
- package/dist/model3d/lod/qa.d.ts +36 -0
- package/dist/model3d/lod/qa.js +189 -0
- package/dist/model3d/lod/settings.d.ts +36 -0
- package/dist/model3d/lod/settings.js +137 -0
- package/dist/model3d/lod/simplify.d.ts +35 -0
- package/dist/model3d/lod/simplify.js +337 -0
- package/dist/model3d/lod/textures.d.ts +46 -0
- package/dist/model3d/lod/textures.js +190 -0
- package/dist/model3d/lookdev/command.d.ts +219 -0
- package/dist/model3d/lookdev/command.js +1795 -0
- package/dist/model3d/lookdev/edit.d.ts +44 -0
- package/dist/model3d/lookdev/edit.js +241 -0
- package/dist/model3d/lookdev/groom.d.ts +86 -0
- package/dist/model3d/lookdev/groom.js +462 -0
- package/dist/model3d/lookdev/markings.d.ts +98 -0
- package/dist/model3d/lookdev/markings.js +319 -0
- package/dist/model3d/lookdev/project.d.ts +100 -0
- package/dist/model3d/lookdev/project.js +721 -0
- package/dist/model3d/lookdev/settings.d.ts +65 -0
- package/dist/model3d/lookdev/settings.js +103 -0
- package/dist/model3d/lookdev/texels.d.ts +32 -0
- package/dist/model3d/lookdev/texels.js +192 -0
- package/dist/model3d/profile.d.ts +101 -0
- package/dist/model3d/profile.js +132 -0
- package/dist/model3d/prop.d.ts +29 -0
- package/dist/model3d/prop.js +317 -0
- package/dist/model3d/qa.d.ts +27 -0
- package/dist/model3d/qa.js +105 -0
- package/dist/model3d/render.d.ts +172 -0
- package/dist/model3d/render.js +791 -0
- package/dist/model3d/rig/build.d.ts +14 -0
- package/dist/model3d/rig/build.js +210 -0
- package/dist/model3d/rig/candidate.d.ts +50 -0
- package/dist/model3d/rig/candidate.js +132 -0
- package/dist/model3d/rig/command.d.ts +50 -0
- package/dist/model3d/rig/command.js +229 -0
- package/dist/model3d/rig/fit.d.ts +88 -0
- package/dist/model3d/rig/fit.js +568 -0
- package/dist/model3d/rig/gait.d.ts +105 -0
- package/dist/model3d/rig/gait.js +334 -0
- package/dist/model3d/rig/math.d.ts +27 -0
- package/dist/model3d/rig/math.js +92 -0
- package/dist/model3d/rig/motion.d.ts +26 -0
- package/dist/model3d/rig/motion.js +223 -0
- package/dist/model3d/rig/qa.d.ts +76 -0
- package/dist/model3d/rig/qa.js +357 -0
- package/dist/model3d/rig/rig.d.ts +55 -0
- package/dist/model3d/rig/rig.js +213 -0
- package/dist/model3d/rig/template.d.ts +195 -0
- package/dist/model3d/rig/template.js +456 -0
- package/dist/model3d/scene.d.ts +115 -0
- package/dist/model3d/scene.js +684 -0
- package/dist/model3d/views.d.ts +77 -0
- package/dist/model3d/views.js +190 -0
- package/dist/origin.d.ts +162 -0
- package/dist/origin.js +134 -0
- package/dist/paths.d.ts +53 -0
- package/dist/paths.js +240 -0
- package/dist/planning.d.ts +261 -0
- package/dist/planning.js +1470 -0
- package/dist/policy/blocklist.d.ts +28 -0
- package/dist/policy/blocklist.js +58 -0
- package/dist/policy/brief.d.ts +67 -0
- package/dist/policy/brief.js +110 -0
- package/dist/policy/cuts.d.ts +26 -0
- package/dist/policy/cuts.js +80 -0
- package/dist/policy/model.d.ts +69 -0
- package/dist/policy/model.js +202 -0
- package/dist/policy/text.d.ts +183 -0
- package/dist/policy/text.js +285 -0
- package/dist/postprocess.d.ts +68 -0
- package/dist/postprocess.js +302 -0
- package/dist/profile.d.ts +5 -0
- package/dist/profile.js +98 -0
- package/dist/project-rules.d.ts +54 -0
- package/dist/project-rules.js +105 -0
- package/dist/provenance-binding.d.ts +55 -0
- package/dist/provenance-binding.js +352 -0
- package/dist/providers/adapter.d.ts +176 -0
- package/dist/providers/adapter.js +418 -0
- package/dist/providers/index.d.ts +33 -0
- package/dist/providers/index.js +49 -0
- package/dist/providers/script.d.ts +13 -0
- package/dist/providers/script.js +65 -0
- package/dist/providers/set.d.ts +76 -0
- package/dist/providers/set.js +134 -0
- package/dist/pure-cbor.d.ts +1 -0
- package/dist/pure-cbor.js +8 -0
- package/dist/qa/stability.d.ts +215 -0
- package/dist/qa/stability.js +393 -0
- package/dist/qa/stability.json +32 -0
- package/dist/qa.d.ts +36 -0
- package/dist/qa.js +148 -0
- package/dist/reconcile.d.ts +111 -0
- package/dist/reconcile.js +416 -0
- package/dist/redact.d.ts +29 -0
- package/dist/redact.js +74 -0
- package/dist/regions.d.ts +49 -0
- package/dist/regions.js +113 -0
- package/dist/release-policy.d.ts +99 -0
- package/dist/release-policy.js +266 -0
- package/dist/request.d.ts +74 -0
- package/dist/request.js +249 -0
- package/dist/routes.d.ts +327 -0
- package/dist/routes.js +1166 -0
- package/dist/runs/dir.d.ts +33 -0
- package/dist/runs/dir.js +30 -0
- package/dist/runs/execute.d.ts +86 -0
- package/dist/runs/execute.js +422 -0
- package/dist/runs/journal.d.ts +150 -0
- package/dist/runs/journal.js +216 -0
- package/dist/runs/lock.d.ts +57 -0
- package/dist/runs/lock.js +322 -0
- package/dist/runs/plan.d.ts +261 -0
- package/dist/runs/plan.js +404 -0
- package/dist/search/near-match.d.ts +32 -0
- package/dist/search/near-match.js +86 -0
- package/dist/search/reader.d.ts +17 -0
- package/dist/search/reader.js +334 -0
- package/dist/search/sheet.d.ts +4 -0
- package/dist/search/sheet.js +28 -0
- package/dist/search/style-outliers.d.ts +77 -0
- package/dist/search/style-outliers.js +166 -0
- package/dist/settings-write.d.ts +78 -0
- package/dist/settings-write.js +374 -0
- package/dist/settings.d.ts +436 -0
- package/dist/settings.js +622 -0
- package/dist/shared-settings.d.ts +4 -0
- package/dist/shared-settings.js +24 -0
- package/dist/sheet/blobs.d.ts +33 -0
- package/dist/sheet/blobs.js +145 -0
- package/dist/sheet/generate.d.ts +71 -0
- package/dist/sheet/generate.js +278 -0
- package/dist/sheet/group.d.ts +20 -0
- package/dist/sheet/group.js +191 -0
- package/dist/sheet/import.d.ts +315 -0
- package/dist/sheet/import.js +832 -0
- package/dist/sheet/matte.d.ts +25 -0
- package/dist/sheet/matte.js +508 -0
- package/dist/sheet/media-import.d.ts +41 -0
- package/dist/sheet/media-import.js +118 -0
- package/dist/sheet/register.d.ts +17 -0
- package/dist/sheet/register.js +176 -0
- package/dist/sheet/slice.d.ts +73 -0
- package/dist/sheet/slice.js +912 -0
- package/dist/sheet/types.d.ts +225 -0
- package/dist/sheet/types.js +1 -0
- package/dist/source/aseprite.d.ts +14 -0
- package/dist/source/aseprite.js +124 -0
- package/dist/source/stage.d.ts +24 -0
- package/dist/source/stage.js +172 -0
- package/dist/spend.d.ts +220 -0
- package/dist/spend.js +436 -0
- package/dist/sprite/render.d.ts +22 -0
- package/dist/sprite/render.js +272 -0
- package/dist/storage.d.ts +135 -0
- package/dist/storage.js +405 -0
- package/dist/style.d.ts +19 -0
- package/dist/style.js +26 -0
- package/dist/template.d.ts +29 -0
- package/dist/template.js +98 -0
- package/dist/testing/aseprite.d.ts +54 -0
- package/dist/testing/aseprite.js +191 -0
- package/dist/testing/cli.d.ts +24 -0
- package/dist/testing/cli.js +91 -0
- package/dist/testing/conformance.d.ts +61 -0
- package/dist/testing/conformance.js +455 -0
- package/dist/testing/index.d.ts +23 -0
- package/dist/testing/index.js +15 -0
- package/dist/testing/mcp.d.ts +25 -0
- package/dist/testing/mcp.js +80 -0
- package/dist/testing/project.d.ts +81 -0
- package/dist/testing/project.js +215 -0
- package/dist/testing/samples.d.ts +42 -0
- package/dist/testing/samples.js +122 -0
- package/dist/transform/operations.d.ts +5 -0
- package/dist/transform/operations.js +320 -0
- package/dist/transform/raster-engine.d.ts +9 -0
- package/dist/transform/raster-engine.js +329 -0
- package/dist/transform/rendition.d.ts +65 -0
- package/dist/transform/rendition.js +317 -0
- package/dist/transform/run.d.ts +138 -0
- package/dist/transform/run.js +442 -0
- package/dist/transform/schema.d.ts +33 -0
- package/dist/transform/schema.js +73 -0
- package/dist/transform/types.d.ts +101 -0
- package/dist/transform/types.js +1 -0
- package/dist/tree/address.d.ts +18 -0
- package/dist/tree/address.js +59 -0
- package/dist/tree/list.d.ts +18 -0
- package/dist/tree/list.js +101 -0
- package/dist/tree/project.d.ts +61 -0
- package/dist/tree/project.js +145 -0
- package/dist/tree/read.d.ts +43 -0
- package/dist/tree/read.js +715 -0
- package/dist/tree/search.d.ts +20 -0
- package/dist/tree/search.js +44 -0
- package/dist/tree/serve.d.ts +79 -0
- package/dist/tree/serve.js +415 -0
- package/dist/tree/thumbs.d.ts +26 -0
- package/dist/tree/thumbs.js +134 -0
- package/dist/turnaround.d.ts +195 -0
- package/dist/turnaround.js +622 -0
- package/dist/types.d.ts +595 -0
- package/dist/types.js +1 -0
- package/package.json +112 -3
- package/policy/blocklist.json +47 -0
- package/policy/prompt-policy-cuts.json +15 -0
- package/skills/art-direction/SKILL.md +16 -0
- package/skills/art-direction/default.md +14 -0
- package/skills/art-direction/presets/cozy-storybook.md +121 -0
- package/skills/art-direction/presets/dark-gritty-isometric.md +121 -0
- package/skills/art-direction/presets/flat-cartoon-kids.md +121 -0
- package/skills/art-direction/references/bible-format.md +47 -0
- package/skills/assetgrove/SKILL.md +109 -0
- package/skills/assetgrove/references/commands.md +723 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fur groom maps on a character's UVs: per-texel region, length, comb direction and density, and an
|
|
3
|
+
* optional tint. Regions come from the rig template's joint roles and feet, never from names.
|
|
4
|
+
*/
|
|
5
|
+
import { createRaster } from "../../image/raster.js";
|
|
6
|
+
import { toLab } from "./markings.js";
|
|
7
|
+
import { SurfaceGrid, coveredBounds, dilate } from "./project.js";
|
|
8
|
+
export const GROOM_MAPS = ["length", "direction", "density"];
|
|
9
|
+
export const GROOM_REGIONS = [
|
|
10
|
+
"face",
|
|
11
|
+
"cheek",
|
|
12
|
+
"head",
|
|
13
|
+
"neck",
|
|
14
|
+
"body",
|
|
15
|
+
"leg",
|
|
16
|
+
"tail",
|
|
17
|
+
];
|
|
18
|
+
const DILATE_PX = 8;
|
|
19
|
+
function regionIndex(region) {
|
|
20
|
+
return GROOM_REGIONS.indexOf(region);
|
|
21
|
+
}
|
|
22
|
+
function unit(v) {
|
|
23
|
+
const l = Math.hypot(v[0], v[1], v[2]);
|
|
24
|
+
return l > 1e-9 ? [v[0] / l, v[1] / l, v[2] / l] : [0, 0, 0];
|
|
25
|
+
}
|
|
26
|
+
/** Each joint's region class: foot chains are legs, a role names its own, others inherit the parent's. */
|
|
27
|
+
function jointClasses(skeleton) {
|
|
28
|
+
const { joints } = skeleton;
|
|
29
|
+
const memo = new Array(joints.length);
|
|
30
|
+
const resolve = (j, depth) => {
|
|
31
|
+
const known = memo[j];
|
|
32
|
+
if (known)
|
|
33
|
+
return known;
|
|
34
|
+
const joint = joints[j];
|
|
35
|
+
let result;
|
|
36
|
+
if (joint.foot)
|
|
37
|
+
result = "leg";
|
|
38
|
+
else if (joint.role === "head")
|
|
39
|
+
result = "head";
|
|
40
|
+
else if (joint.role === "neck")
|
|
41
|
+
result = "neck";
|
|
42
|
+
else if (joint.role === "tail")
|
|
43
|
+
result = "tail";
|
|
44
|
+
else if (joint.role)
|
|
45
|
+
result = "body";
|
|
46
|
+
else if (joint.parent >= 0 && joint.parent < joints.length && depth < joints.length) {
|
|
47
|
+
result = resolve(joint.parent, depth + 1);
|
|
48
|
+
}
|
|
49
|
+
else
|
|
50
|
+
result = "body";
|
|
51
|
+
memo[j] = result;
|
|
52
|
+
return result;
|
|
53
|
+
};
|
|
54
|
+
return joints.map((_, j) => resolve(j, 0));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Per-texel region as an index into `GROOM_REGIONS`. Head texels in front of the head joint (toward
|
|
58
|
+
* `forward`) are face, lateral ones below the head joint's height are cheek, the rest head; neck,
|
|
59
|
+
* tail and foot chains map to neck, tail and leg; pelvis, spine, unskinned and anything else body.
|
|
60
|
+
*/
|
|
61
|
+
export function texelRegions(texels, skeleton) {
|
|
62
|
+
const { size, covered, position, normal, joint } = texels;
|
|
63
|
+
const total = size * size;
|
|
64
|
+
const out = new Uint8Array(total).fill(regionIndex("body"));
|
|
65
|
+
const classes = jointClasses(skeleton);
|
|
66
|
+
const fwd = unit(skeleton.forward);
|
|
67
|
+
const rightAxis = unit([fwd[2], 0, -fwd[0]]);
|
|
68
|
+
const face = regionIndex("face");
|
|
69
|
+
const cheek = regionIndex("cheek");
|
|
70
|
+
const head = regionIndex("head");
|
|
71
|
+
for (let i = 0; i < total; i++) {
|
|
72
|
+
if (!covered[i])
|
|
73
|
+
continue;
|
|
74
|
+
const j = joint[i];
|
|
75
|
+
if (j < 0 || j >= classes.length)
|
|
76
|
+
continue;
|
|
77
|
+
const cls = classes[j];
|
|
78
|
+
if (cls !== "head") {
|
|
79
|
+
out[i] = regionIndex(cls);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
let anchor = j;
|
|
83
|
+
for (let k = 0; k < classes.length && skeleton.joints[anchor].role !== "head"; k++) {
|
|
84
|
+
const parent = skeleton.joints[anchor].parent;
|
|
85
|
+
if (parent < 0 || classes[parent] !== "head")
|
|
86
|
+
break;
|
|
87
|
+
anchor = parent;
|
|
88
|
+
}
|
|
89
|
+
const origin = skeleton.joints[anchor].position;
|
|
90
|
+
const dx = position[i * 3] - origin[0];
|
|
91
|
+
const dy = position[i * 3 + 1] - origin[1];
|
|
92
|
+
const dz = position[i * 3 + 2] - origin[2];
|
|
93
|
+
if (dx * fwd[0] + dy * fwd[1] + dz * fwd[2] > 0) {
|
|
94
|
+
out[i] = face;
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
const lateral = Math.abs(normal[i * 3] * rightAxis[0] + normal[i * 3 + 2] * rightAxis[2]) > 0.5;
|
|
98
|
+
out[i] = lateral && dy < 0 ? cheek : head;
|
|
99
|
+
}
|
|
100
|
+
return out;
|
|
101
|
+
}
|
|
102
|
+
/** Texels within `radius` (3D distance) of any marker. */
|
|
103
|
+
export function markerMask(texels, markers) {
|
|
104
|
+
const { size, covered, position } = texels;
|
|
105
|
+
const out = new Uint8Array(size * size);
|
|
106
|
+
for (let i = 0; i < out.length; i++) {
|
|
107
|
+
if (!covered[i])
|
|
108
|
+
continue;
|
|
109
|
+
for (const m of markers) {
|
|
110
|
+
const d = Math.hypot(position[i * 3] - m.point[0], position[i * 3 + 1] - m.point[1], position[i * 3 + 2] - m.point[2]);
|
|
111
|
+
if (d <= m.radius) {
|
|
112
|
+
out[i] = 1;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return out;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Paw pads: covered texels whose normal points down (n.y < -0.5) and whose position lies under a
|
|
121
|
+
* foot, within `radius` in xz of the ankle-to-toe segment and below the ankle's height.
|
|
122
|
+
*/
|
|
123
|
+
export function padMask(texels, feet, radius) {
|
|
124
|
+
const { size, covered, position, normal } = texels;
|
|
125
|
+
const out = new Uint8Array(size * size);
|
|
126
|
+
for (let i = 0; i < out.length; i++) {
|
|
127
|
+
if (!covered[i] || normal[i * 3 + 1] >= -0.5)
|
|
128
|
+
continue;
|
|
129
|
+
const x = position[i * 3];
|
|
130
|
+
const y = position[i * 3 + 1];
|
|
131
|
+
const z = position[i * 3 + 2];
|
|
132
|
+
for (const foot of feet) {
|
|
133
|
+
if (y >= foot.ankle[1])
|
|
134
|
+
continue;
|
|
135
|
+
const sx = foot.toe[0] - foot.ankle[0];
|
|
136
|
+
const sz = foot.toe[2] - foot.ankle[2];
|
|
137
|
+
const l2 = sx * sx + sz * sz;
|
|
138
|
+
const t = l2 > 0
|
|
139
|
+
? Math.min(1, Math.max(0, ((x - foot.ankle[0]) * sx + (z - foot.ankle[2]) * sz) / l2))
|
|
140
|
+
: 0;
|
|
141
|
+
if (Math.hypot(x - foot.ankle[0] - sx * t, z - foot.ankle[2] - sz * t) <= radius) {
|
|
142
|
+
out[i] = 1;
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return out;
|
|
148
|
+
}
|
|
149
|
+
/** A box blur of `field` over covered texels only (masked mean), radius `r`. */
|
|
150
|
+
function blurCovered(field, covered, size, r) {
|
|
151
|
+
const tmpV = new Float32Array(size * size);
|
|
152
|
+
const tmpW = new Float32Array(size * size);
|
|
153
|
+
const outV = new Float32Array(size * size);
|
|
154
|
+
const outW = new Float32Array(size * size);
|
|
155
|
+
for (let y = 0; y < size; y++) {
|
|
156
|
+
let v = 0;
|
|
157
|
+
let w = 0;
|
|
158
|
+
const row = y * size;
|
|
159
|
+
for (let x = -r; x < size; x++) {
|
|
160
|
+
const add = x + r;
|
|
161
|
+
if (add < size && covered[row + add]) {
|
|
162
|
+
v += field[row + add];
|
|
163
|
+
w++;
|
|
164
|
+
}
|
|
165
|
+
const drop = x - r - 1;
|
|
166
|
+
if (drop >= 0 && covered[row + drop]) {
|
|
167
|
+
v -= field[row + drop];
|
|
168
|
+
w--;
|
|
169
|
+
}
|
|
170
|
+
if (x >= 0) {
|
|
171
|
+
tmpV[row + x] = v;
|
|
172
|
+
tmpW[row + x] = w;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
for (let x = 0; x < size; x++) {
|
|
177
|
+
let v = 0;
|
|
178
|
+
let w = 0;
|
|
179
|
+
for (let y = -r; y < size; y++) {
|
|
180
|
+
const add = y + r;
|
|
181
|
+
if (add < size) {
|
|
182
|
+
v += tmpV[add * size + x];
|
|
183
|
+
w += tmpW[add * size + x];
|
|
184
|
+
}
|
|
185
|
+
const drop = y - r - 1;
|
|
186
|
+
if (drop >= 0) {
|
|
187
|
+
v -= tmpV[drop * size + x];
|
|
188
|
+
w -= tmpW[drop * size + x];
|
|
189
|
+
}
|
|
190
|
+
if (y >= 0) {
|
|
191
|
+
outV[y * size + x] = v;
|
|
192
|
+
outW[y * size + x] = w;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
for (let i = 0; i < outV.length; i++) {
|
|
197
|
+
outV[i] = covered[i] && outW[i] > 0.5 ? outV[i] / outW[i] : (field[i] ?? 0);
|
|
198
|
+
}
|
|
199
|
+
return outV;
|
|
200
|
+
}
|
|
201
|
+
function boneDirections(skeleton) {
|
|
202
|
+
const { joints } = skeleton;
|
|
203
|
+
const back = unit([-skeleton.forward[0], -skeleton.forward[1], -skeleton.forward[2]]);
|
|
204
|
+
const firstChild = new Array(joints.length).fill(-1);
|
|
205
|
+
joints.forEach((joint, j) => {
|
|
206
|
+
if (joint.parent >= 0 && joint.parent < joints.length && firstChild[joint.parent] < 0) {
|
|
207
|
+
firstChild[joint.parent] = j;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
const between = (from, to) => unit([to[0] - from[0], to[1] - from[1], to[2] - from[2]]);
|
|
211
|
+
const toward = joints.map((joint) => {
|
|
212
|
+
const parent = joints[joint.parent];
|
|
213
|
+
const d = parent ? between(joint.position, parent.position) : back;
|
|
214
|
+
return d[0] === 0 && d[1] === 0 && d[2] === 0 ? back : d;
|
|
215
|
+
});
|
|
216
|
+
const along = joints.map((joint, j) => {
|
|
217
|
+
const child = joints[firstChild[j]];
|
|
218
|
+
const parent = joints[joint.parent];
|
|
219
|
+
const d = child
|
|
220
|
+
? between(joint.position, child.position)
|
|
221
|
+
: parent
|
|
222
|
+
? between(parent.position, joint.position)
|
|
223
|
+
: back;
|
|
224
|
+
return d[0] === 0 && d[1] === 0 && d[2] === 0 ? back : d;
|
|
225
|
+
});
|
|
226
|
+
return { toward, along };
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* The groom maps. Length is grey, 0 on every `bare` texel and at least 1 on any other covered
|
|
230
|
+
* texel, 255 = `maxLengthM`; region values are blurred across borders before the bare mask applies.
|
|
231
|
+
* With the `baseColor`, fur that would lie across a marking's edge is shortened
|
|
232
|
+
* (`keepMarkingEdges`), so a long coat keeps its markings' bands and edges.
|
|
233
|
+
* Direction is the model-space comb direction (rgb = d*0.5+0.5): the bone direction of the texel's
|
|
234
|
+
* joint (joint to child for tail and leg, toward the parent otherwise, so fur combs snout to tail),
|
|
235
|
+
* tangent to the surface and blended 30% toward gravity. Density is grey per region, blurred, 0 on
|
|
236
|
+
* bare. The tint (only with `season.tint`) is RGBA with alpha = tipWeight on covered non-bare
|
|
237
|
+
* texels. Uncovered texels are dilated so filtering stays clean.
|
|
238
|
+
*/
|
|
239
|
+
export function groomMaps(texels, regions, bare, season, skeleton, baseColor) {
|
|
240
|
+
const { size, covered, normal, joint } = texels;
|
|
241
|
+
const total = size * size;
|
|
242
|
+
const maxMm = Math.max(1e-6, ...GROOM_REGIONS.map((r) => season.lengthMm[r]));
|
|
243
|
+
const lengthByRegion = GROOM_REGIONS.map((r) => season.lengthMm[r]);
|
|
244
|
+
const densityByRegion = GROOM_REGIONS.map((r) => season.density[r]);
|
|
245
|
+
const lengthField = new Float32Array(total);
|
|
246
|
+
const densityField = new Float32Array(total);
|
|
247
|
+
for (let i = 0; i < total; i++) {
|
|
248
|
+
if (!covered[i])
|
|
249
|
+
continue;
|
|
250
|
+
const r = regions[i];
|
|
251
|
+
lengthField[i] = lengthByRegion[r] ?? 0;
|
|
252
|
+
densityField[i] = densityByRegion[r] ?? 0;
|
|
253
|
+
}
|
|
254
|
+
const radius = Math.max(2, Math.round(size / 512));
|
|
255
|
+
const lengthBlur = blurCovered(lengthField, covered, size, radius);
|
|
256
|
+
const densityBlur = blurCovered(densityField, covered, size, radius);
|
|
257
|
+
const length = createRaster(size, size);
|
|
258
|
+
const density = createRaster(size, size);
|
|
259
|
+
const direction = createRaster(size, size);
|
|
260
|
+
const tint = season.tint ? createRaster(size, size) : undefined;
|
|
261
|
+
const { toward, along } = boneDirections(skeleton);
|
|
262
|
+
const legIndex = regionIndex("leg");
|
|
263
|
+
const tailIndex = regionIndex("tail");
|
|
264
|
+
const back = unit([-skeleton.forward[0], -skeleton.forward[1], -skeleton.forward[2]]);
|
|
265
|
+
const tintRgb = season.tint?.color.map((c) => Math.round(Math.min(1, Math.max(0, c)) * 255));
|
|
266
|
+
const tintAlpha = season.tint
|
|
267
|
+
? Math.round(Math.min(1, Math.max(0, season.tint.tipWeight)) * 255)
|
|
268
|
+
: 0;
|
|
269
|
+
const combs = new Float32Array(total * 3);
|
|
270
|
+
for (let i = 0; i < total; i++) {
|
|
271
|
+
if (!covered[i])
|
|
272
|
+
continue;
|
|
273
|
+
const r = regions[i];
|
|
274
|
+
const j = joint[i];
|
|
275
|
+
let dir = back;
|
|
276
|
+
if (j >= 0 && j < toward.length)
|
|
277
|
+
dir = r === legIndex || r === tailIndex ? along[j] : toward[j];
|
|
278
|
+
const nx = normal[i * 3];
|
|
279
|
+
const ny = normal[i * 3 + 1];
|
|
280
|
+
const nz = normal[i * 3 + 2];
|
|
281
|
+
const tangent = (v) => {
|
|
282
|
+
const dot = v[0] * nx + v[1] * ny + v[2] * nz;
|
|
283
|
+
return unit([v[0] - dot * nx, v[1] - dot * ny, v[2] - dot * nz]);
|
|
284
|
+
};
|
|
285
|
+
const bone = tangent(dir);
|
|
286
|
+
const gravity = tangent([0, -1, 0]);
|
|
287
|
+
let comb = unit([
|
|
288
|
+
bone[0] * 0.7 + gravity[0] * 0.3,
|
|
289
|
+
bone[1] * 0.7 + gravity[1] * 0.3,
|
|
290
|
+
bone[2] * 0.7 + gravity[2] * 0.3,
|
|
291
|
+
]);
|
|
292
|
+
if (comb[0] === 0 && comb[1] === 0 && comb[2] === 0)
|
|
293
|
+
comb = tangent(back);
|
|
294
|
+
if (comb[0] === 0 && comb[1] === 0 && comb[2] === 0)
|
|
295
|
+
comb = unit([ny, -nx, 0]);
|
|
296
|
+
combs.set(comb, i * 3);
|
|
297
|
+
}
|
|
298
|
+
// Fur no longer than the marking it grows in.
|
|
299
|
+
const lengthMm = baseColor
|
|
300
|
+
? keepMarkingEdges(texels, baseColor, combs, lengthBlur, bare)
|
|
301
|
+
: lengthBlur;
|
|
302
|
+
for (let i = 0; i < total; i++) {
|
|
303
|
+
const o = i * 4;
|
|
304
|
+
length.data[o + 3] = 255;
|
|
305
|
+
density.data[o + 3] = 255;
|
|
306
|
+
direction.data[o + 3] = 255;
|
|
307
|
+
if (!covered[i])
|
|
308
|
+
continue;
|
|
309
|
+
const isBare = bare[i] !== 0;
|
|
310
|
+
const l = isBare ? 0 : Math.max(1, Math.round((lengthMm[i] / maxMm) * 255));
|
|
311
|
+
const d = isBare ? 0 : Math.round(Math.min(1, Math.max(0, densityBlur[i])) * 255);
|
|
312
|
+
length.data[o] = length.data[o + 1] = length.data[o + 2] = Math.min(255, l);
|
|
313
|
+
density.data[o] = density.data[o + 1] = density.data[o + 2] = d;
|
|
314
|
+
for (let k = 0; k < 3; k++) {
|
|
315
|
+
direction.data[o + k] = Math.round((combs[i * 3 + k] * 0.5 + 0.5) * 255);
|
|
316
|
+
}
|
|
317
|
+
if (tint && tintRgb) {
|
|
318
|
+
tint.data[o] = tintRgb[0];
|
|
319
|
+
tint.data[o + 1] = tintRgb[1];
|
|
320
|
+
tint.data[o + 2] = tintRgb[2];
|
|
321
|
+
tint.data[o + 3] = isBare ? 0 : tintAlpha;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return {
|
|
325
|
+
length: dilate(length, covered, DILATE_PX),
|
|
326
|
+
direction: dilate(direction, covered, DILATE_PX),
|
|
327
|
+
density: dilate(density, covered, DILATE_PX),
|
|
328
|
+
...(tint && { tint: dilate(tint, covered, DILATE_PX) }),
|
|
329
|
+
maxLengthM: maxMm / 1000,
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
/** The scale markings are read at, as a share of the covered surface's bounding diagonal. */
|
|
333
|
+
const MARKING_CELL = 0.006;
|
|
334
|
+
/** The L* step along a strand that counts as crossing into another marking. */
|
|
335
|
+
const MARKING_EDGE_LSTAR = 18;
|
|
336
|
+
/** The shortest share of its length a strand keeps beside an edge. */
|
|
337
|
+
const MARKING_FLOOR = 0.3;
|
|
338
|
+
/** A surface walk that advances less than this share of a step has reached the part's end. */
|
|
339
|
+
const END_ADVANCE = 0.3;
|
|
340
|
+
/**
|
|
341
|
+
* Per texel, the fur length in mm, shortened where a strand lying flat along its comb would reach
|
|
342
|
+
* a marking of another lightness, or run off the end of its part: to the distance at which it
|
|
343
|
+
* would, smoothed over about a centimetre of surface and never under MARKING_FLOOR of its length.
|
|
344
|
+
* A strand that lies across an edge carries its root's colour over it, in any fur renderer that
|
|
345
|
+
* reads these maps, so long fur over narrow bands smears them (assetgrove#131). Measured in 3D on
|
|
346
|
+
* the base colour's L*, smoothed at MARKING_CELL, so the coat's fine texture is not an edge;
|
|
347
|
+
* markings broader than the fur keep its full length.
|
|
348
|
+
*/
|
|
349
|
+
export function keepMarkingEdges(texels, baseColor, combs, lengthMm, bare) {
|
|
350
|
+
const { size, covered, position } = texels;
|
|
351
|
+
const total = size * size;
|
|
352
|
+
const out = Float32Array.from(lengthMm);
|
|
353
|
+
const bounds = coveredBounds(texels);
|
|
354
|
+
if (!(bounds.diagonal > 0))
|
|
355
|
+
return out;
|
|
356
|
+
// At least a few texels across, so every cell of the surface holds some.
|
|
357
|
+
const cell = Math.max(bounds.diagonal * MARKING_CELL, 3 * texelSpacing(texels));
|
|
358
|
+
const field = new SurfaceGrid(texels, bounds, cell, 8);
|
|
359
|
+
const v = [0, 0, 0, 0, 0, 0, 0, 0];
|
|
360
|
+
for (let i = 0; i < total; i++) {
|
|
361
|
+
if (!covered[i] || bare[i])
|
|
362
|
+
continue;
|
|
363
|
+
const x = i % size;
|
|
364
|
+
const y = (i - x) / size;
|
|
365
|
+
const bx = Math.min(baseColor.width - 1, Math.floor(((x + 0.5) / size) * baseColor.width));
|
|
366
|
+
const by = Math.min(baseColor.height - 1, Math.floor(((y + 0.5) / size) * baseColor.height));
|
|
367
|
+
const o = (by * baseColor.width + bx) * 4;
|
|
368
|
+
v[0] = toLab(baseColor.data[o], baseColor.data[o + 1], baseColor.data[o + 2])[0];
|
|
369
|
+
v[1] = combs[i * 3];
|
|
370
|
+
v[2] = combs[i * 3 + 1];
|
|
371
|
+
v[3] = combs[i * 3 + 2];
|
|
372
|
+
v[4] = lengthMm[i];
|
|
373
|
+
v[5] = position[i * 3];
|
|
374
|
+
v[6] = position[i * 3 + 1];
|
|
375
|
+
v[7] = position[i * 3 + 2];
|
|
376
|
+
field.splat(i, 1, v);
|
|
377
|
+
}
|
|
378
|
+
// Each texel's reach, from its smoothed neighbourhood: march along the comb until the L* there
|
|
379
|
+
// differs by MARKING_EDGE_LSTAR or the strand's length runs out.
|
|
380
|
+
const reach = new SurfaceGrid(texels, bounds, cell * 2, 1);
|
|
381
|
+
const here = [0, 0, 0, 0, 0, 0, 0, 0];
|
|
382
|
+
const there = [0, 0, 0, 0, 0, 0, 0, 0];
|
|
383
|
+
const step = cell / 2;
|
|
384
|
+
// Less than this, and a point is off the surface: past a part's end.
|
|
385
|
+
const surfaceMass = 0.25 * field.typicalMass();
|
|
386
|
+
for (let i = 0; i < total; i++) {
|
|
387
|
+
if (!covered[i] || bare[i])
|
|
388
|
+
continue;
|
|
389
|
+
if (i % 3 !== 0)
|
|
390
|
+
continue; // a third of the texels is plenty at this scale
|
|
391
|
+
if (field.gather(i, here) <= 0)
|
|
392
|
+
continue;
|
|
393
|
+
const c = [here[1], here[2], here[3]];
|
|
394
|
+
const cl = Math.hypot(c[0], c[1], c[2]);
|
|
395
|
+
const lengthM = here[4] / 1000;
|
|
396
|
+
let reached = lengthM;
|
|
397
|
+
if (cl > 1e-6) {
|
|
398
|
+
// Walk the surface: step along the comb, then settle onto the surface nearby. A walk that
|
|
399
|
+
// can no longer advance has run off the end of the part, which is an edge too.
|
|
400
|
+
let qx = here[5];
|
|
401
|
+
let qy = here[6];
|
|
402
|
+
let qz = here[7];
|
|
403
|
+
for (let s = step; s < lengthM; s += step) {
|
|
404
|
+
const m = field.sampleAt(qx + (c[0] / cl) * step, qy + (c[1] / cl) * step, qz + (c[2] / cl) * step, there);
|
|
405
|
+
const moved = m > 0 ? Math.hypot(there[5] - qx, there[6] - qy, there[7] - qz) : 0;
|
|
406
|
+
if (m < surfaceMass ||
|
|
407
|
+
moved < step * END_ADVANCE ||
|
|
408
|
+
Math.abs(there[0] - here[0]) >= MARKING_EDGE_LSTAR) {
|
|
409
|
+
reached = s;
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
qx = there[5];
|
|
413
|
+
qy = there[6];
|
|
414
|
+
qz = there[7];
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
reach.splat(i, 1, [lengthM > 0 ? reached / lengthM : 1]);
|
|
418
|
+
}
|
|
419
|
+
const share = [0];
|
|
420
|
+
for (let i = 0; i < total; i++) {
|
|
421
|
+
if (!covered[i] || bare[i])
|
|
422
|
+
continue;
|
|
423
|
+
if (reach.gather(i, share) <= 0)
|
|
424
|
+
continue;
|
|
425
|
+
out[i] = lengthMm[i] * Math.max(MARKING_FLOOR, Math.min(1, share[0]));
|
|
426
|
+
}
|
|
427
|
+
return out;
|
|
428
|
+
}
|
|
429
|
+
/** The median distance in space between neighbouring covered texels along a row. */
|
|
430
|
+
function texelSpacing(texels) {
|
|
431
|
+
const { size, covered, position } = texels;
|
|
432
|
+
const gaps = [];
|
|
433
|
+
for (let i = 0; i + 1 < size * size; i += 7) {
|
|
434
|
+
if (!covered[i] || !covered[i + 1] || (i + 1) % size === 0)
|
|
435
|
+
continue;
|
|
436
|
+
gaps.push(Math.hypot(position[i * 3 + 3] - position[i * 3], position[i * 3 + 4] - position[i * 3 + 1], position[i * 3 + 5] - position[i * 3 + 2]));
|
|
437
|
+
}
|
|
438
|
+
if (gaps.length === 0)
|
|
439
|
+
return 0;
|
|
440
|
+
gaps.sort((a, b) => a - b);
|
|
441
|
+
return gaps[gaps.length >> 1];
|
|
442
|
+
}
|
|
443
|
+
/** Whether length is zero exactly on bare texels: counts of the two kinds of mismatch. */
|
|
444
|
+
export function groomMaskCheck(length, texels, bare) {
|
|
445
|
+
let zeroOnBare = 0;
|
|
446
|
+
let zeroOutside = 0;
|
|
447
|
+
let bareTexels = 0;
|
|
448
|
+
const total = texels.size * texels.size;
|
|
449
|
+
for (let i = 0; i < total; i++) {
|
|
450
|
+
if (!texels.covered[i])
|
|
451
|
+
continue;
|
|
452
|
+
const value = length.data[i * 4];
|
|
453
|
+
if (bare[i]) {
|
|
454
|
+
bareTexels++;
|
|
455
|
+
if (value > 0)
|
|
456
|
+
zeroOnBare++;
|
|
457
|
+
}
|
|
458
|
+
else if (value === 0)
|
|
459
|
+
zeroOutside++;
|
|
460
|
+
}
|
|
461
|
+
return { ok: zeroOnBare === 0 && zeroOutside === 0, zeroOnBare, zeroOutside, bareTexels };
|
|
462
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { FilteringState } from "../../qa/stability.ts";
|
|
2
|
+
import type { Raster } from "../../image/raster.ts";
|
|
3
|
+
/** x0, y0, x1, y1 as fractions 0..1 of the image's width and height. */
|
|
4
|
+
export type Box = [number, number, number, number];
|
|
5
|
+
export interface MarkingBoxes {
|
|
6
|
+
mark: Box;
|
|
7
|
+
ground: Box;
|
|
8
|
+
}
|
|
9
|
+
/** One entry in `boxes` per image; null when the image does not show the marking. */
|
|
10
|
+
export interface MarkingReply {
|
|
11
|
+
name: string;
|
|
12
|
+
against: string;
|
|
13
|
+
boxes: Array<MarkingBoxes | null>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Markings a look-dev forecasts one decision for, per view and season. A view naming more is still
|
|
17
|
+
* judged whole while the cap has room; a marking the cap cannot afford is unjudged and fails.
|
|
18
|
+
*/
|
|
19
|
+
export declare const MAX_MARKINGS_JUDGED = 8;
|
|
20
|
+
/** What a decision model answers about one marking: the options and what each means. */
|
|
21
|
+
export declare const MARKING_VERDICTS: Record<string, string>;
|
|
22
|
+
export declare function markingDecisionPrompt(options: {
|
|
23
|
+
subject: string;
|
|
24
|
+
marking: string;
|
|
25
|
+
against: string;
|
|
26
|
+
view: string;
|
|
27
|
+
season: string;
|
|
28
|
+
}): string;
|
|
29
|
+
/**
|
|
30
|
+
* The union of the mark and ground boxes of one image, as a crop of it. An image with no box for
|
|
31
|
+
* the marking (`null`) is returned whole, and the judge decides.
|
|
32
|
+
*/
|
|
33
|
+
export declare function markingCrop(image: Raster, boxes: MarkingBoxes | null): Raster;
|
|
34
|
+
export declare function markingsPrompt(options: {
|
|
35
|
+
subject: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
view: string;
|
|
38
|
+
referenceRole: string;
|
|
39
|
+
seasons: string[];
|
|
40
|
+
}): string;
|
|
41
|
+
/** The reply's box scale: integers 0..1000 of the image's height and width. */
|
|
42
|
+
export declare const BOX_SCALE = 1000;
|
|
43
|
+
export declare function parseMarkingsReply(text: string, images: number): MarkingReply[];
|
|
44
|
+
export declare function toLab(r: number, g: number, b: number): [number, number, number];
|
|
45
|
+
export interface Patch {
|
|
46
|
+
lab: [number, number, number];
|
|
47
|
+
/** The spread of L* inside the box, 80th minus 20th percentile: the banding of a ringed mark. */
|
|
48
|
+
spread: number;
|
|
49
|
+
pixels: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The colour of the pixels in `box` (fractions of the image). With the render's `figure` mask
|
|
53
|
+
* (1 = figure, one entry per pixel), only figure pixels count; without it (a reference image),
|
|
54
|
+
* pixels within the tolerance of the image's border colour are left out.
|
|
55
|
+
*/
|
|
56
|
+
export declare function measureBox(image: Raster, box: Box, figure: Uint8Array | undefined): Patch | undefined;
|
|
57
|
+
export type MarkingVerdict = "kept" | "drifted" | "missing";
|
|
58
|
+
export interface MarkingMeasure {
|
|
59
|
+
marking: string;
|
|
60
|
+
view: string;
|
|
61
|
+
/** The season (coat) of the render. */
|
|
62
|
+
image: string;
|
|
63
|
+
verdict: MarkingVerdict;
|
|
64
|
+
/** The probability the decision reported for its verdict, when it reported one. */
|
|
65
|
+
probability?: number;
|
|
66
|
+
/** Colour difference between the marking's boxes, in CIELAB: evidence, never the decision. */
|
|
67
|
+
deltaE?: number;
|
|
68
|
+
drifts: boolean;
|
|
69
|
+
}
|
|
70
|
+
/** The colour difference between two measured marking patches, in CIELAB. */
|
|
71
|
+
export declare function deltaE(a: Patch, b: Patch): number;
|
|
72
|
+
/**
|
|
73
|
+
* Why the check is advisory while it has no qualifying stability entry for the run's model
|
|
74
|
+
* (src/qa/stability.ts), said in every such reason.
|
|
75
|
+
*/
|
|
76
|
+
export declare const MARKINGS_ADVISORY = "advisory, never filters: a decision model judges each marking, and it has no measured stability entry on the run's model, so a person judges the compare images";
|
|
77
|
+
/** Whether lookdev-markings filters on the run's markings model, and why not when it does not. */
|
|
78
|
+
export declare function markingsFiltering(model: string | undefined): FilteringState;
|
|
79
|
+
/**
|
|
80
|
+
* The check's verdict. A marking passes when a decision model judges it kept in every render; a
|
|
81
|
+
* drifted or missing one fails, and so does a view whose reply could not be read (`unreadable`),
|
|
82
|
+
* because a marking there could have vanished unseen. What the references give nothing to judge,
|
|
83
|
+
* and markings past the per-view limit (`unmeasured`), pass, named. The measured colour
|
|
84
|
+
* difference is recorded as evidence and never decides. It filters only where the check is
|
|
85
|
+
* measured stable on the run's model (`filtering`, from `markingsFiltering`); otherwise it is
|
|
86
|
+
* `shadow` and never filters the candidate (MARKINGS_ADVISORY).
|
|
87
|
+
*/
|
|
88
|
+
export declare function markingsReason(measures: MarkingMeasure[], notes: {
|
|
89
|
+
unmeasured: string[];
|
|
90
|
+
unreadable?: string[];
|
|
91
|
+
unjudged?: string[];
|
|
92
|
+
}, filtering?: FilteringState): {
|
|
93
|
+
check: "lookdev-markings";
|
|
94
|
+
passed: boolean;
|
|
95
|
+
reason: string;
|
|
96
|
+
source: "decision";
|
|
97
|
+
shadow?: true;
|
|
98
|
+
};
|