@tickernelz/paperclip-pro-shared 2026.925.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.paperclip-build-complete +1 -0
- package/dist/account-handle.d.ts +26 -0
- package/dist/account-handle.d.ts.map +1 -0
- package/dist/account-handle.js +48 -0
- package/dist/account-handle.js.map +1 -0
- package/dist/account-handle.test.d.ts +2 -0
- package/dist/account-handle.test.d.ts.map +1 -0
- package/dist/account-handle.test.js +62 -0
- package/dist/account-handle.test.js.map +1 -0
- package/dist/adapter-agnostic-keys.test.d.ts +2 -0
- package/dist/adapter-agnostic-keys.test.d.ts.map +1 -0
- package/dist/adapter-agnostic-keys.test.js +33 -0
- package/dist/adapter-agnostic-keys.test.js.map +1 -0
- package/dist/adapter-auth-check-code.d.ts +13 -0
- package/dist/adapter-auth-check-code.d.ts.map +1 -0
- package/dist/adapter-auth-check-code.js +13 -0
- package/dist/adapter-auth-check-code.js.map +1 -0
- package/dist/adapter-auth-check-code.test.d.ts +2 -0
- package/dist/adapter-auth-check-code.test.d.ts.map +1 -0
- package/dist/adapter-auth-check-code.test.js +8 -0
- package/dist/adapter-auth-check-code.test.js.map +1 -0
- package/dist/adapter-auth-session.d.ts +16 -0
- package/dist/adapter-auth-session.d.ts.map +1 -0
- package/dist/adapter-auth-session.js +37 -0
- package/dist/adapter-auth-session.js.map +1 -0
- package/dist/adapter-type.d.ts +4 -0
- package/dist/adapter-type.d.ts.map +1 -0
- package/dist/adapter-type.js +14 -0
- package/dist/adapter-type.js.map +1 -0
- package/dist/adapter-types.test.d.ts +2 -0
- package/dist/adapter-types.test.d.ts.map +1 -0
- package/dist/adapter-types.test.js +46 -0
- package/dist/adapter-types.test.js.map +1 -0
- package/dist/agent-appearance.d.ts +53 -0
- package/dist/agent-appearance.d.ts.map +1 -0
- package/dist/agent-appearance.js +51 -0
- package/dist/agent-appearance.js.map +1 -0
- package/dist/agent-appearance.test.d.ts +2 -0
- package/dist/agent-appearance.test.d.ts.map +1 -0
- package/dist/agent-appearance.test.js +32 -0
- package/dist/agent-appearance.test.js.map +1 -0
- package/dist/agent-eligibility.d.ts +67 -0
- package/dist/agent-eligibility.d.ts.map +1 -0
- package/dist/agent-eligibility.js +171 -0
- package/dist/agent-eligibility.js.map +1 -0
- package/dist/agent-eligibility.test.d.ts +2 -0
- package/dist/agent-eligibility.test.d.ts.map +1 -0
- package/dist/agent-eligibility.test.js +187 -0
- package/dist/agent-eligibility.test.js.map +1 -0
- package/dist/agent-url-key.d.ts +4 -0
- package/dist/agent-url-key.d.ts.map +1 -0
- package/dist/agent-url-key.js +22 -0
- package/dist/agent-url-key.js.map +1 -0
- package/dist/ai-connections.d.ts +220 -0
- package/dist/ai-connections.d.ts.map +1 -0
- package/dist/ai-connections.js +152 -0
- package/dist/ai-connections.js.map +1 -0
- package/dist/announcements.d.ts +146 -0
- package/dist/announcements.d.ts.map +1 -0
- package/dist/announcements.js +72 -0
- package/dist/announcements.js.map +1 -0
- package/dist/announcements.test.d.ts +2 -0
- package/dist/announcements.test.d.ts.map +1 -0
- package/dist/announcements.test.js +53 -0
- package/dist/announcements.test.js.map +1 -0
- package/dist/api.d.ts +69 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +69 -0
- package/dist/api.js.map +1 -0
- package/dist/app-definitions/agentmail.json +49 -0
- package/dist/app-definitions/airtable.json +41 -0
- package/dist/app-definitions/anthropic.json +75 -0
- package/dist/app-definitions/api-key-generic.json +43 -0
- package/dist/app-definitions/arcade.json +36 -0
- package/dist/app-definitions/asana.json +42 -0
- package/dist/app-definitions/beehiiv.json +41 -0
- package/dist/app-definitions/bitly.json +78 -0
- package/dist/app-definitions/box.json +42 -0
- package/dist/app-definitions/brex.json +43 -0
- package/dist/app-definitions/candid.json +41 -0
- package/dist/app-definitions/clickhouse.json +59 -0
- package/dist/app-definitions/cloudflare.json +78 -0
- package/dist/app-definitions/cloudinary.json +42 -0
- package/dist/app-definitions/coda.json +80 -0
- package/dist/app-definitions/composio.json +39 -0
- package/dist/app-definitions/context7.json +33 -0
- package/dist/app-definitions/discord.json +66 -0
- package/dist/app-definitions/egnyte.json +41 -0
- package/dist/app-definitions/embat.json +41 -0
- package/dist/app-definitions/executor.json +36 -0
- package/dist/app-definitions/fireflies.json +82 -0
- package/dist/app-definitions/github.json +124 -0
- package/dist/app-definitions/gmail.json +182 -0
- package/dist/app-definitions/google-calendar.json +188 -0
- package/dist/app-definitions/google-chat.json +189 -0
- package/dist/app-definitions/google-docs.json +187 -0
- package/dist/app-definitions/google-drive.json +183 -0
- package/dist/app-definitions/google-people.json +110 -0
- package/dist/app-definitions/google-sheets.json +211 -0
- package/dist/app-definitions/google-slides.json +187 -0
- package/dist/app-definitions/google-workspace-search.json +113 -0
- package/dist/app-definitions/hugging-face.json +44 -0
- package/dist/app-definitions/imessage-photon.json +50 -0
- package/dist/app-definitions/jira.json +65 -0
- package/dist/app-definitions/kernel.json +78 -0
- package/dist/app-definitions/linear.json +62 -0
- package/dist/app-definitions/local-falcon.json +41 -0
- package/dist/app-definitions/make.json +42 -0
- package/dist/app-definitions/manufact.json +42 -0
- package/dist/app-definitions/mem0.json +56 -0
- package/dist/app-definitions/microsoft-teams.json +67 -0
- package/dist/app-definitions/miro.json +41 -0
- package/dist/app-definitions/mixpanel.json +43 -0
- package/dist/app-definitions/netlify.json +42 -0
- package/dist/app-definitions/notion.json +57 -0
- package/dist/app-definitions/oauth-generic.json +47 -0
- package/dist/app-definitions/openai.json +74 -0
- package/dist/app-definitions/openrouter.json +53 -0
- package/dist/app-definitions/oreilly.json +78 -0
- package/dist/app-definitions/pagerduty.json +93 -0
- package/dist/app-definitions/planetscale.json +91 -0
- package/dist/app-definitions/posthog.json +278 -0
- package/dist/app-definitions/postman.json +224 -0
- package/dist/app-definitions/railway.json +61 -0
- package/dist/app-definitions/razorpay.json +81 -0
- package/dist/app-definitions/resend.json +42 -0
- package/dist/app-definitions/sanity.json +79 -0
- package/dist/app-definitions/sentry.json +42 -0
- package/dist/app-definitions/shopify.json +117 -0
- package/dist/app-definitions/similarweb.json +57 -0
- package/dist/app-definitions/slack.json +86 -0
- package/dist/app-definitions/stripe.json +80 -0
- package/dist/app-definitions/supabase.json +164 -0
- package/dist/app-definitions/telegram.json +53 -0
- package/dist/app-definitions/ticket-tailor.json +42 -0
- package/dist/app-definitions/ticktick.json +41 -0
- package/dist/app-definitions/todoist.json +41 -0
- package/dist/app-definitions/vercel.json +43 -0
- package/dist/app-definitions/webflow.json +41 -0
- package/dist/app-definitions/wix.json +42 -0
- package/dist/app-definitions/xai.json +74 -0
- package/dist/app-definitions/xero.json +53 -0
- package/dist/app-definitions/youcom.json +100 -0
- package/dist/app-definitions/zapier.json +32 -0
- package/dist/app-definitions-url.test.d.ts +2 -0
- package/dist/app-definitions-url.test.d.ts.map +1 -0
- package/dist/app-definitions-url.test.js +43 -0
- package/dist/app-definitions-url.test.js.map +1 -0
- package/dist/app-definitions.d.ts +41 -0
- package/dist/app-definitions.d.ts.map +1 -0
- package/dist/app-definitions.generated.d.ts +3 -0
- package/dist/app-definitions.generated.d.ts.map +1 -0
- package/dist/app-definitions.generated.js +77 -0
- package/dist/app-definitions.generated.js.map +1 -0
- package/dist/app-definitions.js +212 -0
- package/dist/app-definitions.js.map +1 -0
- package/dist/app-definitions.test.d.ts +2 -0
- package/dist/app-definitions.test.d.ts.map +1 -0
- package/dist/app-definitions.test.js +774 -0
- package/dist/app-definitions.test.js.map +1 -0
- package/dist/cliplab/LICENSE +22 -0
- package/dist/cliplab/PROVENANCE.md +18 -0
- package/dist/cliplab/character.d.ts +4 -0
- package/dist/cliplab/character.d.ts.map +1 -0
- package/dist/cliplab/character.js +2324 -0
- package/dist/cliplab/character.js.map +1 -0
- package/dist/cliplab/definition.d.ts +13 -0
- package/dist/cliplab/definition.d.ts.map +1 -0
- package/dist/cliplab/definition.js +28 -0
- package/dist/cliplab/definition.js.map +1 -0
- package/dist/cliplab/face-morph.d.ts +26 -0
- package/dist/cliplab/face-morph.d.ts.map +1 -0
- package/dist/cliplab/face-morph.js +301 -0
- package/dist/cliplab/face-morph.js.map +1 -0
- package/dist/cliplab/gaze.d.ts +42 -0
- package/dist/cliplab/gaze.d.ts.map +1 -0
- package/dist/cliplab/gaze.js +57 -0
- package/dist/cliplab/gaze.js.map +1 -0
- package/dist/cliplab/model.d.ts +176 -0
- package/dist/cliplab/model.d.ts.map +1 -0
- package/dist/cliplab/model.js +337 -0
- package/dist/cliplab/model.js.map +1 -0
- package/dist/cliplab/palette-tokens.d.ts +75 -0
- package/dist/cliplab/palette-tokens.d.ts.map +1 -0
- package/dist/cliplab/palette-tokens.js +76 -0
- package/dist/cliplab/palette-tokens.js.map +1 -0
- package/dist/cliplab/particles.d.ts +15 -0
- package/dist/cliplab/particles.d.ts.map +1 -0
- package/dist/cliplab/particles.js +23 -0
- package/dist/cliplab/particles.js.map +1 -0
- package/dist/cliplab/renderer.d.ts +129 -0
- package/dist/cliplab/renderer.d.ts.map +1 -0
- package/dist/cliplab/renderer.js +762 -0
- package/dist/cliplab/renderer.js.map +1 -0
- package/dist/cliplab/runtime.d.ts +21 -0
- package/dist/cliplab/runtime.d.ts.map +1 -0
- package/dist/cliplab/runtime.js +140 -0
- package/dist/cliplab/runtime.js.map +1 -0
- package/dist/cliplab/static.d.ts +4 -0
- package/dist/cliplab/static.d.ts.map +1 -0
- package/dist/cliplab/static.js +16 -0
- package/dist/cliplab/static.js.map +1 -0
- package/dist/cliplab/svg-canvas.d.ts +56 -0
- package/dist/cliplab/svg-canvas.d.ts.map +1 -0
- package/dist/cliplab/svg-canvas.js +134 -0
- package/dist/cliplab/svg-canvas.js.map +1 -0
- package/dist/cliplab/svg-path.d.ts +24 -0
- package/dist/cliplab/svg-path.d.ts.map +1 -0
- package/dist/cliplab/svg-path.js +151 -0
- package/dist/cliplab/svg-path.js.map +1 -0
- package/dist/cliplab/svg-snapshot.d.ts +28 -0
- package/dist/cliplab/svg-snapshot.d.ts.map +1 -0
- package/dist/cliplab/svg-snapshot.js +168 -0
- package/dist/cliplab/svg-snapshot.js.map +1 -0
- package/dist/company-import-transfer.d.ts +80 -0
- package/dist/company-import-transfer.d.ts.map +1 -0
- package/dist/company-import-transfer.js +63 -0
- package/dist/company-import-transfer.js.map +1 -0
- package/dist/company-import-transfer.test.d.ts +2 -0
- package/dist/company-import-transfer.test.d.ts.map +1 -0
- package/dist/company-import-transfer.test.js +15 -0
- package/dist/company-import-transfer.test.js.map +1 -0
- package/dist/config-schema.d.ts +252 -0
- package/dist/config-schema.d.ts.map +1 -0
- package/dist/config-schema.js +268 -0
- package/dist/config-schema.js.map +1 -0
- package/dist/config-schema.test.d.ts +2 -0
- package/dist/config-schema.test.d.ts.map +1 -0
- package/dist/config-schema.test.js +126 -0
- package/dist/config-schema.test.js.map +1 -0
- package/dist/connection-intent-guidance.d.ts +12 -0
- package/dist/connection-intent-guidance.d.ts.map +1 -0
- package/dist/connection-intent-guidance.js +35 -0
- package/dist/connection-intent-guidance.js.map +1 -0
- package/dist/connection-intent-guidance.test.d.ts +2 -0
- package/dist/connection-intent-guidance.test.d.ts.map +1 -0
- package/dist/connection-intent-guidance.test.js +60 -0
- package/dist/connection-intent-guidance.test.js.map +1 -0
- package/dist/constants.d.ts +556 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +1363 -0
- package/dist/constants.js.map +1 -0
- package/dist/decision.test.d.ts +2 -0
- package/dist/decision.test.d.ts.map +1 -0
- package/dist/decision.test.js +142 -0
- package/dist/decision.test.js.map +1 -0
- package/dist/document-anchors.d.ts +37 -0
- package/dist/document-anchors.d.ts.map +1 -0
- package/dist/document-anchors.js +351 -0
- package/dist/document-anchors.js.map +1 -0
- package/dist/document-anchors.test.d.ts +2 -0
- package/dist/document-anchors.test.d.ts.map +1 -0
- package/dist/document-anchors.test.js +151 -0
- package/dist/document-anchors.test.js.map +1 -0
- package/dist/document-export.d.ts +4 -0
- package/dist/document-export.d.ts.map +1 -0
- package/dist/document-export.js +27 -0
- package/dist/document-export.js.map +1 -0
- package/dist/env-file.d.ts +16 -0
- package/dist/env-file.d.ts.map +1 -0
- package/dist/env-file.js +149 -0
- package/dist/env-file.js.map +1 -0
- package/dist/env-file.test.d.ts +2 -0
- package/dist/env-file.test.d.ts.map +1 -0
- package/dist/env-file.test.js +72 -0
- package/dist/env-file.test.js.map +1 -0
- package/dist/environment-custom-images.d.ts +17 -0
- package/dist/environment-custom-images.d.ts.map +1 -0
- package/dist/environment-custom-images.js +88 -0
- package/dist/environment-custom-images.js.map +1 -0
- package/dist/environment-custom-images.test.d.ts +2 -0
- package/dist/environment-custom-images.test.d.ts.map +1 -0
- package/dist/environment-custom-images.test.js +136 -0
- package/dist/environment-custom-images.test.js.map +1 -0
- package/dist/environment-support.d.ts +58 -0
- package/dist/environment-support.d.ts.map +1 -0
- package/dist/environment-support.js +128 -0
- package/dist/environment-support.js.map +1 -0
- package/dist/environment-support.test.d.ts +2 -0
- package/dist/environment-support.test.d.ts.map +1 -0
- package/dist/environment-support.test.js +77 -0
- package/dist/environment-support.test.js.map +1 -0
- package/dist/execution-workspace-guards.d.ts +6 -0
- package/dist/execution-workspace-guards.d.ts.map +1 -0
- package/dist/execution-workspace-guards.js +12 -0
- package/dist/execution-workspace-guards.js.map +1 -0
- package/dist/external-objects-server.d.ts +12 -0
- package/dist/external-objects-server.d.ts.map +1 -0
- package/dist/external-objects-server.js +176 -0
- package/dist/external-objects-server.js.map +1 -0
- package/dist/external-objects.d.ts +32 -0
- package/dist/external-objects.d.ts.map +1 -0
- package/dist/external-objects.js +17 -0
- package/dist/external-objects.js.map +1 -0
- package/dist/external-objects.test.d.ts +2 -0
- package/dist/external-objects.test.d.ts.map +1 -0
- package/dist/external-objects.test.js +93 -0
- package/dist/external-objects.test.js.map +1 -0
- package/dist/feature-catalog.d.ts +59 -0
- package/dist/feature-catalog.d.ts.map +1 -0
- package/dist/feature-catalog.js +301 -0
- package/dist/feature-catalog.js.map +1 -0
- package/dist/feature-catalog.test.d.ts +2 -0
- package/dist/feature-catalog.test.d.ts.map +1 -0
- package/dist/feature-catalog.test.js +89 -0
- package/dist/feature-catalog.test.js.map +1 -0
- package/dist/frontmatter-runner-contract.test.d.ts +2 -0
- package/dist/frontmatter-runner-contract.test.d.ts.map +1 -0
- package/dist/frontmatter-runner-contract.test.js +10 -0
- package/dist/frontmatter-runner-contract.test.js.map +1 -0
- package/dist/frontmatter.d.ts +68 -0
- package/dist/frontmatter.d.ts.map +1 -0
- package/dist/frontmatter.js +559 -0
- package/dist/frontmatter.js.map +1 -0
- package/dist/frontmatter.test.d.ts +2 -0
- package/dist/frontmatter.test.d.ts.map +1 -0
- package/dist/frontmatter.test.js +297 -0
- package/dist/frontmatter.test.js.map +1 -0
- package/dist/github-connectors.d.ts +10 -0
- package/dist/github-connectors.d.ts.map +1 -0
- package/dist/github-connectors.js +15 -0
- package/dist/github-connectors.js.map +1 -0
- package/dist/gitignore-runtime.test.d.ts +2 -0
- package/dist/gitignore-runtime.test.d.ts.map +1 -0
- package/dist/gitignore-runtime.test.js +14 -0
- package/dist/gitignore-runtime.test.js.map +1 -0
- package/dist/google-workspace-connectors.d.ts +10 -0
- package/dist/google-workspace-connectors.d.ts.map +1 -0
- package/dist/google-workspace-connectors.js +31 -0
- package/dist/google-workspace-connectors.js.map +1 -0
- package/dist/home-paths.d.ts +41 -0
- package/dist/home-paths.d.ts.map +1 -0
- package/dist/home-paths.js +57 -0
- package/dist/home-paths.js.map +1 -0
- package/dist/home-paths.test.d.ts +2 -0
- package/dist/home-paths.test.d.ts.map +1 -0
- package/dist/home-paths.test.js +25 -0
- package/dist/home-paths.test.js.map +1 -0
- package/dist/humanize-connection.d.ts +36 -0
- package/dist/humanize-connection.d.ts.map +1 -0
- package/dist/humanize-connection.js +95 -0
- package/dist/humanize-connection.js.map +1 -0
- package/dist/humanize-connection.test.d.ts +2 -0
- package/dist/humanize-connection.test.d.ts.map +1 -0
- package/dist/humanize-connection.test.js +48 -0
- package/dist/humanize-connection.test.js.map +1 -0
- package/dist/index.d.ts +109 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +94 -0
- package/dist/index.js.map +1 -0
- package/dist/issue-attribution.d.ts +27 -0
- package/dist/issue-attribution.d.ts.map +1 -0
- package/dist/issue-attribution.js +25 -0
- package/dist/issue-attribution.js.map +1 -0
- package/dist/issue-attribution.test.d.ts +2 -0
- package/dist/issue-attribution.test.d.ts.map +1 -0
- package/dist/issue-attribution.test.js +72 -0
- package/dist/issue-attribution.test.js.map +1 -0
- package/dist/issue-references.d.ts +16 -0
- package/dist/issue-references.d.ts.map +1 -0
- package/dist/issue-references.js +160 -0
- package/dist/issue-references.js.map +1 -0
- package/dist/issue-references.test.d.ts +2 -0
- package/dist/issue-references.test.d.ts.map +1 -0
- package/dist/issue-references.test.js +56 -0
- package/dist/issue-references.test.js.map +1 -0
- package/dist/issue-thread-interactions.test.d.ts +2 -0
- package/dist/issue-thread-interactions.test.d.ts.map +1 -0
- package/dist/issue-thread-interactions.test.js +546 -0
- package/dist/issue-thread-interactions.test.js.map +1 -0
- package/dist/issue-write-denial.d.ts +92 -0
- package/dist/issue-write-denial.d.ts.map +1 -0
- package/dist/issue-write-denial.js +227 -0
- package/dist/issue-write-denial.js.map +1 -0
- package/dist/issue-write-denial.test.d.ts +2 -0
- package/dist/issue-write-denial.test.d.ts.map +1 -0
- package/dist/issue-write-denial.test.js +159 -0
- package/dist/issue-write-denial.test.js.map +1 -0
- package/dist/markdown-work-products.d.ts +26 -0
- package/dist/markdown-work-products.d.ts.map +1 -0
- package/dist/markdown-work-products.js +70 -0
- package/dist/markdown-work-products.js.map +1 -0
- package/dist/markdown-work-products.test.d.ts +2 -0
- package/dist/markdown-work-products.test.d.ts.map +1 -0
- package/dist/markdown-work-products.test.js +122 -0
- package/dist/markdown-work-products.test.js.map +1 -0
- package/dist/mcp-config-help-prompt.d.ts +21 -0
- package/dist/mcp-config-help-prompt.d.ts.map +1 -0
- package/dist/mcp-config-help-prompt.js +56 -0
- package/dist/mcp-config-help-prompt.js.map +1 -0
- package/dist/mcp-remote-headers.d.ts +49 -0
- package/dist/mcp-remote-headers.d.ts.map +1 -0
- package/dist/mcp-remote-headers.js +127 -0
- package/dist/mcp-remote-headers.js.map +1 -0
- package/dist/mcp-remote-headers.test.d.ts +2 -0
- package/dist/mcp-remote-headers.test.d.ts.map +1 -0
- package/dist/mcp-remote-headers.test.js +112 -0
- package/dist/mcp-remote-headers.test.js.map +1 -0
- package/dist/network-bind.d.ts +27 -0
- package/dist/network-bind.d.ts.map +1 -0
- package/dist/network-bind.js +75 -0
- package/dist/network-bind.js.map +1 -0
- package/dist/node-version.d.ts +6 -0
- package/dist/node-version.d.ts.map +1 -0
- package/dist/node-version.js +48 -0
- package/dist/node-version.js.map +1 -0
- package/dist/oauth-endpoint-url.d.ts +74 -0
- package/dist/oauth-endpoint-url.d.ts.map +1 -0
- package/dist/oauth-endpoint-url.js +142 -0
- package/dist/oauth-endpoint-url.js.map +1 -0
- package/dist/oauth-endpoint-url.test.d.ts +2 -0
- package/dist/oauth-endpoint-url.test.d.ts.map +1 -0
- package/dist/oauth-endpoint-url.test.js +163 -0
- package/dist/oauth-endpoint-url.test.js.map +1 -0
- package/dist/pipeline-case-type.d.ts +23 -0
- package/dist/pipeline-case-type.d.ts.map +1 -0
- package/dist/pipeline-case-type.js +26 -0
- package/dist/pipeline-case-type.js.map +1 -0
- package/dist/pipeline-health.d.ts +80 -0
- package/dist/pipeline-health.d.ts.map +1 -0
- package/dist/pipeline-health.js +249 -0
- package/dist/pipeline-health.js.map +1 -0
- package/dist/pipeline-health.test.d.ts +2 -0
- package/dist/pipeline-health.test.d.ts.map +1 -0
- package/dist/pipeline-health.test.js +140 -0
- package/dist/pipeline-health.test.js.map +1 -0
- package/dist/portability-fidelity.d.ts +19 -0
- package/dist/portability-fidelity.d.ts.map +1 -0
- package/dist/portability-fidelity.js +46 -0
- package/dist/portability-fidelity.js.map +1 -0
- package/dist/portability-fidelity.test.d.ts +2 -0
- package/dist/portability-fidelity.test.d.ts.map +1 -0
- package/dist/portability-fidelity.test.js +66 -0
- package/dist/portability-fidelity.test.js.map +1 -0
- package/dist/portability-hash.d.ts +5 -0
- package/dist/portability-hash.d.ts.map +1 -0
- package/dist/portability-hash.js +20 -0
- package/dist/portability-hash.js.map +1 -0
- package/dist/portability-zip.d.ts +15 -0
- package/dist/portability-zip.d.ts.map +1 -0
- package/dist/portability-zip.js +262 -0
- package/dist/portability-zip.js.map +1 -0
- package/dist/portability-zip.test.d.ts +2 -0
- package/dist/portability-zip.test.d.ts.map +1 -0
- package/dist/portability-zip.test.js +227 -0
- package/dist/portability-zip.test.js.map +1 -0
- package/dist/project-mentions.d.ts +47 -0
- package/dist/project-mentions.d.ts.map +1 -0
- package/dist/project-mentions.js +291 -0
- package/dist/project-mentions.js.map +1 -0
- package/dist/project-mentions.test.d.ts +2 -0
- package/dist/project-mentions.test.d.ts.map +1 -0
- package/dist/project-mentions.test.js +43 -0
- package/dist/project-mentions.test.js.map +1 -0
- package/dist/project-url-key.d.ts +5 -0
- package/dist/project-url-key.d.ts.map +1 -0
- package/dist/project-url-key.js +39 -0
- package/dist/project-url-key.js.map +1 -0
- package/dist/railway-connection.d.ts +20 -0
- package/dist/railway-connection.d.ts.map +1 -0
- package/dist/railway-connection.js +7 -0
- package/dist/railway-connection.js.map +1 -0
- package/dist/remote-mcp-connectors.d.ts +11 -0
- package/dist/remote-mcp-connectors.d.ts.map +1 -0
- package/dist/remote-mcp-connectors.js +14 -0
- package/dist/remote-mcp-connectors.js.map +1 -0
- package/dist/remote-mcp-connectors.test.d.ts +2 -0
- package/dist/remote-mcp-connectors.test.d.ts.map +1 -0
- package/dist/remote-mcp-connectors.test.js +39 -0
- package/dist/remote-mcp-connectors.test.js.map +1 -0
- package/dist/resource-memberships.test.d.ts +2 -0
- package/dist/resource-memberships.test.d.ts.map +1 -0
- package/dist/resource-memberships.test.js +23 -0
- package/dist/resource-memberships.test.js.map +1 -0
- package/dist/responsible-user-denial.d.ts +46 -0
- package/dist/responsible-user-denial.d.ts.map +1 -0
- package/dist/responsible-user-denial.js +66 -0
- package/dist/responsible-user-denial.js.map +1 -0
- package/dist/responsible-user-denial.test.d.ts +2 -0
- package/dist/responsible-user-denial.test.d.ts.map +1 -0
- package/dist/responsible-user-denial.test.js +65 -0
- package/dist/responsible-user-denial.test.js.map +1 -0
- package/dist/retired-composio.d.ts +7 -0
- package/dist/retired-composio.d.ts.map +1 -0
- package/dist/retired-composio.js +7 -0
- package/dist/retired-composio.js.map +1 -0
- package/dist/routine-variables.d.ts +23 -0
- package/dist/routine-variables.d.ts.map +1 -0
- package/dist/routine-variables.js +127 -0
- package/dist/routine-variables.js.map +1 -0
- package/dist/routine-variables.test.d.ts +2 -0
- package/dist/routine-variables.test.d.ts.map +1 -0
- package/dist/routine-variables.test.js +98 -0
- package/dist/routine-variables.test.js.map +1 -0
- package/dist/runner-goal.d.ts +105 -0
- package/dist/runner-goal.d.ts.map +1 -0
- package/dist/runner-goal.js +74 -0
- package/dist/runner-goal.js.map +1 -0
- package/dist/runtime-exposure/loopback-bind.d.ts +52 -0
- package/dist/runtime-exposure/loopback-bind.d.ts.map +1 -0
- package/dist/runtime-exposure/loopback-bind.js +93 -0
- package/dist/runtime-exposure/loopback-bind.js.map +1 -0
- package/dist/runtime-exposure/loopback-bind.test.d.ts +2 -0
- package/dist/runtime-exposure/loopback-bind.test.d.ts.map +1 -0
- package/dist/runtime-exposure/loopback-bind.test.js +94 -0
- package/dist/runtime-exposure/loopback-bind.test.js.map +1 -0
- package/dist/runtime-exposure/ports.d.ts +61 -0
- package/dist/runtime-exposure/ports.d.ts.map +1 -0
- package/dist/runtime-exposure/ports.js +96 -0
- package/dist/runtime-exposure/ports.js.map +1 -0
- package/dist/runtime-exposure/ports.test.d.ts +2 -0
- package/dist/runtime-exposure/ports.test.d.ts.map +1 -0
- package/dist/runtime-exposure/ports.test.js +46 -0
- package/dist/runtime-exposure/ports.test.js.map +1 -0
- package/dist/self-serve-mcp-research.d.ts +5 -0
- package/dist/self-serve-mcp-research.d.ts.map +1 -0
- package/dist/self-serve-mcp-research.js +5 -0
- package/dist/self-serve-mcp-research.js.map +1 -0
- package/dist/self-serve-mcp-research.json +54 -0
- package/dist/setting-defaults.d.ts +72 -0
- package/dist/setting-defaults.d.ts.map +1 -0
- package/dist/setting-defaults.js +132 -0
- package/dist/setting-defaults.js.map +1 -0
- package/dist/setting-defaults.test.d.ts +2 -0
- package/dist/setting-defaults.test.d.ts.map +1 -0
- package/dist/setting-defaults.test.js +102 -0
- package/dist/setting-defaults.test.js.map +1 -0
- package/dist/settings-visibility.d.ts +86 -0
- package/dist/settings-visibility.d.ts.map +1 -0
- package/dist/settings-visibility.js +138 -0
- package/dist/settings-visibility.js.map +1 -0
- package/dist/settings-visibility.test.d.ts +2 -0
- package/dist/settings-visibility.test.d.ts.map +1 -0
- package/dist/settings-visibility.test.js +85 -0
- package/dist/settings-visibility.test.js.map +1 -0
- package/dist/slack-tools.d.ts +557 -0
- package/dist/slack-tools.d.ts.map +1 -0
- package/dist/slack-tools.js +146 -0
- package/dist/slack-tools.js.map +1 -0
- package/dist/summary-slot.test.d.ts +2 -0
- package/dist/summary-slot.test.d.ts.map +1 -0
- package/dist/summary-slot.test.js +76 -0
- package/dist/summary-slot.test.js.map +1 -0
- package/dist/telemetry/client-contract.test.d.ts +2 -0
- package/dist/telemetry/client-contract.test.d.ts.map +1 -0
- package/dist/telemetry/client-contract.test.js +166 -0
- package/dist/telemetry/client-contract.test.js.map +1 -0
- package/dist/telemetry/client-types.test.d.ts +2 -0
- package/dist/telemetry/client-types.test.d.ts.map +1 -0
- package/dist/telemetry/client-types.test.js +18 -0
- package/dist/telemetry/client-types.test.js.map +1 -0
- package/dist/telemetry/client.d.ts +101 -0
- package/dist/telemetry/client.d.ts.map +1 -0
- package/dist/telemetry/client.js +426 -0
- package/dist/telemetry/client.js.map +1 -0
- package/dist/telemetry/client.test.d.ts +2 -0
- package/dist/telemetry/client.test.d.ts.map +1 -0
- package/dist/telemetry/client.test.js +507 -0
- package/dist/telemetry/client.test.js.map +1 -0
- package/dist/telemetry/config.d.ts +35 -0
- package/dist/telemetry/config.d.ts.map +1 -0
- package/dist/telemetry/config.js +51 -0
- package/dist/telemetry/config.js.map +1 -0
- package/dist/telemetry/events.d.ts +103 -0
- package/dist/telemetry/events.d.ts.map +1 -0
- package/dist/telemetry/events.js +121 -0
- package/dist/telemetry/events.js.map +1 -0
- package/dist/telemetry/generated/paperclip-telemetry.d.ts +406 -0
- package/dist/telemetry/generated/paperclip-telemetry.d.ts.map +1 -0
- package/dist/telemetry/generated/paperclip-telemetry.js +297 -0
- package/dist/telemetry/generated/paperclip-telemetry.js.map +1 -0
- package/dist/telemetry/index.d.ts +10 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +6 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/proposed-connector-events.test.d.ts +2 -0
- package/dist/telemetry/proposed-connector-events.test.d.ts.map +1 -0
- package/dist/telemetry/proposed-connector-events.test.js +96 -0
- package/dist/telemetry/proposed-connector-events.test.js.map +1 -0
- package/dist/telemetry/readme-contract.test.d.ts +2 -0
- package/dist/telemetry/readme-contract.test.d.ts.map +1 -0
- package/dist/telemetry/readme-contract.test.js +17 -0
- package/dist/telemetry/readme-contract.test.js.map +1 -0
- package/dist/telemetry/retention.d.ts +44 -0
- package/dist/telemetry/retention.d.ts.map +1 -0
- package/dist/telemetry/retention.js +46 -0
- package/dist/telemetry/retention.js.map +1 -0
- package/dist/telemetry/retention.test.d.ts +2 -0
- package/dist/telemetry/retention.test.d.ts.map +1 -0
- package/dist/telemetry/retention.test.js +20 -0
- package/dist/telemetry/retention.test.js.map +1 -0
- package/dist/telemetry/state.d.ts +3 -0
- package/dist/telemetry/state.d.ts.map +1 -0
- package/dist/telemetry/state.js +28 -0
- package/dist/telemetry/state.js.map +1 -0
- package/dist/telemetry/types.d.ts +62 -0
- package/dist/telemetry/types.d.ts.map +1 -0
- package/dist/telemetry/types.js +2 -0
- package/dist/telemetry/types.js.map +1 -0
- package/dist/trust-policy.d.ts +68 -0
- package/dist/trust-policy.d.ts.map +1 -0
- package/dist/trust-policy.js +11 -0
- package/dist/trust-policy.js.map +1 -0
- package/dist/types/access.d.ts +142 -0
- package/dist/types/access.d.ts.map +1 -0
- package/dist/types/access.js +2 -0
- package/dist/types/access.js.map +1 -0
- package/dist/types/activity.d.ts +15 -0
- package/dist/types/activity.d.ts.map +1 -0
- package/dist/types/activity.js +2 -0
- package/dist/types/activity.js.map +1 -0
- package/dist/types/adapter-registry.d.ts +31 -0
- package/dist/types/adapter-registry.d.ts.map +1 -0
- package/dist/types/adapter-registry.js +2 -0
- package/dist/types/adapter-registry.js.map +1 -0
- package/dist/types/adapter-skills.d.ts +38 -0
- package/dist/types/adapter-skills.d.ts.map +1 -0
- package/dist/types/adapter-skills.js +2 -0
- package/dist/types/adapter-skills.js.map +1 -0
- package/dist/types/agent.adapter-auth-session.test.d.ts +2 -0
- package/dist/types/agent.adapter-auth-session.test.d.ts.map +1 -0
- package/dist/types/agent.adapter-auth-session.test.js +103 -0
- package/dist/types/agent.adapter-auth-session.test.js.map +1 -0
- package/dist/types/agent.d.ts +194 -0
- package/dist/types/agent.d.ts.map +1 -0
- package/dist/types/agent.js +51 -0
- package/dist/types/agent.js.map +1 -0
- package/dist/types/app-definition.d.ts +153 -0
- package/dist/types/app-definition.d.ts.map +1 -0
- package/dist/types/app-definition.js +2 -0
- package/dist/types/app-definition.js.map +1 -0
- package/dist/types/approval.d.ts +26 -0
- package/dist/types/approval.d.ts.map +1 -0
- package/dist/types/approval.js +2 -0
- package/dist/types/approval.js.map +1 -0
- package/dist/types/artifact.d.ts +52 -0
- package/dist/types/artifact.d.ts.map +1 -0
- package/dist/types/artifact.js +2 -0
- package/dist/types/artifact.js.map +1 -0
- package/dist/types/asset.d.ts +16 -0
- package/dist/types/asset.d.ts.map +1 -0
- package/dist/types/asset.js +2 -0
- package/dist/types/asset.js.map +1 -0
- package/dist/types/attention.d.ts +222 -0
- package/dist/types/attention.d.ts.map +1 -0
- package/dist/types/attention.js +15 -0
- package/dist/types/attention.js.map +1 -0
- package/dist/types/budget.d.ts +86 -0
- package/dist/types/budget.d.ts.map +1 -0
- package/dist/types/budget.js +2 -0
- package/dist/types/budget.js.map +1 -0
- package/dist/types/chat-channels.d.ts +402 -0
- package/dist/types/chat-channels.d.ts.map +1 -0
- package/dist/types/chat-channels.js +105 -0
- package/dist/types/chat-channels.js.map +1 -0
- package/dist/types/chat-github.d.ts +123 -0
- package/dist/types/chat-github.d.ts.map +1 -0
- package/dist/types/chat-github.js +55 -0
- package/dist/types/chat-github.js.map +1 -0
- package/dist/types/company-portability.d.ts +408 -0
- package/dist/types/company-portability.d.ts.map +1 -0
- package/dist/types/company-portability.js +2 -0
- package/dist/types/company-portability.js.map +1 -0
- package/dist/types/company-skill.d.ts +623 -0
- package/dist/types/company-skill.d.ts.map +1 -0
- package/dist/types/company-skill.js +2 -0
- package/dist/types/company-skill.js.map +1 -0
- package/dist/types/company.d.ts +30 -0
- package/dist/types/company.d.ts.map +1 -0
- package/dist/types/company.js +2 -0
- package/dist/types/company.js.map +1 -0
- package/dist/types/connection-intent.d.ts +53 -0
- package/dist/types/connection-intent.d.ts.map +1 -0
- package/dist/types/connection-intent.js +2 -0
- package/dist/types/connection-intent.js.map +1 -0
- package/dist/types/cost.d.ts +126 -0
- package/dist/types/cost.d.ts.map +1 -0
- package/dist/types/cost.js +2 -0
- package/dist/types/cost.js.map +1 -0
- package/dist/types/dashboard.d.ts +54 -0
- package/dist/types/dashboard.d.ts.map +1 -0
- package/dist/types/dashboard.js +2 -0
- package/dist/types/dashboard.js.map +1 -0
- package/dist/types/decision-queue.d.ts +55 -0
- package/dist/types/decision-queue.d.ts.map +1 -0
- package/dist/types/decision-queue.js +2 -0
- package/dist/types/decision-queue.js.map +1 -0
- package/dist/types/decision-training.d.ts +65 -0
- package/dist/types/decision-training.d.ts.map +1 -0
- package/dist/types/decision-training.js +2 -0
- package/dist/types/decision-training.js.map +1 -0
- package/dist/types/decision.d.ts +100 -0
- package/dist/types/decision.d.ts.map +1 -0
- package/dist/types/decision.js +15 -0
- package/dist/types/decision.js.map +1 -0
- package/dist/types/document-annotation.d.ts +223 -0
- package/dist/types/document-annotation.d.ts.map +1 -0
- package/dist/types/document-annotation.js +2 -0
- package/dist/types/document-annotation.js.map +1 -0
- package/dist/types/email.d.ts +50 -0
- package/dist/types/email.d.ts.map +1 -0
- package/dist/types/email.js +2 -0
- package/dist/types/email.js.map +1 -0
- package/dist/types/environment.d.ts +150 -0
- package/dist/types/environment.d.ts.map +1 -0
- package/dist/types/environment.js +2 -0
- package/dist/types/environment.js.map +1 -0
- package/dist/types/execution-continuation.d.ts +67 -0
- package/dist/types/execution-continuation.d.ts.map +1 -0
- package/dist/types/execution-continuation.js +2 -0
- package/dist/types/execution-continuation.js.map +1 -0
- package/dist/types/execution-projection.d.ts +33 -0
- package/dist/types/execution-projection.d.ts.map +1 -0
- package/dist/types/execution-projection.js +24 -0
- package/dist/types/execution-projection.js.map +1 -0
- package/dist/types/external-object.d.ts +84 -0
- package/dist/types/external-object.d.ts.map +1 -0
- package/dist/types/external-object.js +2 -0
- package/dist/types/external-object.js.map +1 -0
- package/dist/types/feedback.d.ts +95 -0
- package/dist/types/feedback.d.ts.map +1 -0
- package/dist/types/feedback.js +7 -0
- package/dist/types/feedback.js.map +1 -0
- package/dist/types/finance.d.ts +57 -0
- package/dist/types/finance.d.ts.map +1 -0
- package/dist/types/finance.js +2 -0
- package/dist/types/finance.js.map +1 -0
- package/dist/types/folder.d.ts +52 -0
- package/dist/types/folder.d.ts.map +1 -0
- package/dist/types/folder.js +2 -0
- package/dist/types/folder.js.map +1 -0
- package/dist/types/goal.d.ts +14 -0
- package/dist/types/goal.d.ts.map +1 -0
- package/dist/types/goal.js +2 -0
- package/dist/types/goal.js.map +1 -0
- package/dist/types/heartbeat.d.ts +325 -0
- package/dist/types/heartbeat.d.ts.map +1 -0
- package/dist/types/heartbeat.js +2 -0
- package/dist/types/heartbeat.js.map +1 -0
- package/dist/types/inbox-agent-policy.d.ts +12 -0
- package/dist/types/inbox-agent-policy.d.ts.map +1 -0
- package/dist/types/inbox-agent-policy.js +2 -0
- package/dist/types/inbox-agent-policy.js.map +1 -0
- package/dist/types/inbox-dismissal.d.ts +13 -0
- package/dist/types/inbox-dismissal.d.ts.map +1 -0
- package/dist/types/inbox-dismissal.js +2 -0
- package/dist/types/inbox-dismissal.js.map +1 -0
- package/dist/types/index.d.ts +69 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +17 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/instance.d.ts +170 -0
- package/dist/types/instance.d.ts.map +1 -0
- package/dist/types/instance.js +10 -0
- package/dist/types/instance.js.map +1 -0
- package/dist/types/issue-tree-control.d.ts +109 -0
- package/dist/types/issue-tree-control.d.ts.map +1 -0
- package/dist/types/issue-tree-control.js +2 -0
- package/dist/types/issue-tree-control.js.map +1 -0
- package/dist/types/issue.d.ts +1312 -0
- package/dist/types/issue.d.ts.map +1 -0
- package/dist/types/issue.js +2 -0
- package/dist/types/issue.js.map +1 -0
- package/dist/types/live.d.ts +9 -0
- package/dist/types/live.d.ts.map +1 -0
- package/dist/types/live.js +2 -0
- package/dist/types/live.js.map +1 -0
- package/dist/types/native-finalization.d.ts +29 -0
- package/dist/types/native-finalization.d.ts.map +1 -0
- package/dist/types/native-finalization.js +2 -0
- package/dist/types/native-finalization.js.map +1 -0
- package/dist/types/pipeline.d.ts +268 -0
- package/dist/types/pipeline.d.ts.map +1 -0
- package/dist/types/pipeline.js +2 -0
- package/dist/types/pipeline.js.map +1 -0
- package/dist/types/plugin.d.ts +894 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +2 -0
- package/dist/types/plugin.js.map +1 -0
- package/dist/types/project.d.ts +116 -0
- package/dist/types/project.d.ts.map +1 -0
- package/dist/types/project.js +2 -0
- package/dist/types/project.js.map +1 -0
- package/dist/types/quota.d.ts +28 -0
- package/dist/types/quota.d.ts.map +1 -0
- package/dist/types/quota.js +2 -0
- package/dist/types/quota.js.map +1 -0
- package/dist/types/resource-memberships.d.ts +26 -0
- package/dist/types/resource-memberships.d.ts.map +1 -0
- package/dist/types/resource-memberships.js +2 -0
- package/dist/types/resource-memberships.js.map +1 -0
- package/dist/types/routine.d.ts +237 -0
- package/dist/types/routine.d.ts.map +1 -0
- package/dist/types/routine.js +2 -0
- package/dist/types/routine.js.map +1 -0
- package/dist/types/runtime-exposure.d.ts +74 -0
- package/dist/types/runtime-exposure.d.ts.map +1 -0
- package/dist/types/runtime-exposure.js +12 -0
- package/dist/types/runtime-exposure.js.map +1 -0
- package/dist/types/search.d.ts +135 -0
- package/dist/types/search.d.ts.map +1 -0
- package/dist/types/search.js +6 -0
- package/dist/types/search.js.map +1 -0
- package/dist/types/secrets.d.ts +374 -0
- package/dist/types/secrets.d.ts.map +1 -0
- package/dist/types/secrets.js +2 -0
- package/dist/types/secrets.js.map +1 -0
- package/dist/types/server-info.d.ts +27 -0
- package/dist/types/server-info.d.ts.map +1 -0
- package/dist/types/server-info.js +2 -0
- package/dist/types/server-info.js.map +1 -0
- package/dist/types/sidebar-badges.d.ts +7 -0
- package/dist/types/sidebar-badges.d.ts.map +1 -0
- package/dist/types/sidebar-badges.js +2 -0
- package/dist/types/sidebar-badges.js.map +1 -0
- package/dist/types/sidebar-preferences.d.ts +5 -0
- package/dist/types/sidebar-preferences.d.ts.map +1 -0
- package/dist/types/sidebar-preferences.js +2 -0
- package/dist/types/sidebar-preferences.js.map +1 -0
- package/dist/types/smoke-lab.d.ts +41 -0
- package/dist/types/smoke-lab.d.ts.map +1 -0
- package/dist/types/smoke-lab.js +5 -0
- package/dist/types/smoke-lab.js.map +1 -0
- package/dist/types/summary-slot.d.ts +91 -0
- package/dist/types/summary-slot.d.ts.map +1 -0
- package/dist/types/summary-slot.js +2 -0
- package/dist/types/summary-slot.js.map +1 -0
- package/dist/types/teams-catalog.d.ts +163 -0
- package/dist/types/teams-catalog.d.ts.map +1 -0
- package/dist/types/teams-catalog.js +2 -0
- package/dist/types/teams-catalog.js.map +1 -0
- package/dist/types/tool-access.d.ts +1515 -0
- package/dist/types/tool-access.d.ts.map +1 -0
- package/dist/types/tool-access.js +13 -0
- package/dist/types/tool-access.js.map +1 -0
- package/dist/types/user-profile.d.ts +81 -0
- package/dist/types/user-profile.d.ts.map +1 -0
- package/dist/types/user-profile.js +2 -0
- package/dist/types/user-profile.js.map +1 -0
- package/dist/types/work-product.d.ts +57 -0
- package/dist/types/work-product.d.ts.map +1 -0
- package/dist/types/work-product.js +2 -0
- package/dist/types/work-product.js.map +1 -0
- package/dist/types/work-timeline.d.ts +77 -0
- package/dist/types/work-timeline.d.ts.map +1 -0
- package/dist/types/work-timeline.js +2 -0
- package/dist/types/work-timeline.js.map +1 -0
- package/dist/types/workspace-file-resource.d.ts +138 -0
- package/dist/types/workspace-file-resource.d.ts.map +1 -0
- package/dist/types/workspace-file-resource.js +2 -0
- package/dist/types/workspace-file-resource.js.map +1 -0
- package/dist/types/workspace-operation.d.ts +27 -0
- package/dist/types/workspace-operation.d.ts.map +1 -0
- package/dist/types/workspace-operation.js +2 -0
- package/dist/types/workspace-operation.js.map +1 -0
- package/dist/types/workspace-readiness.d.ts +74 -0
- package/dist/types/workspace-readiness.d.ts.map +1 -0
- package/dist/types/workspace-readiness.js +28 -0
- package/dist/types/workspace-readiness.js.map +1 -0
- package/dist/types/workspace-runtime.d.ts +365 -0
- package/dist/types/workspace-runtime.d.ts.map +1 -0
- package/dist/types/workspace-runtime.js +2 -0
- package/dist/types/workspace-runtime.js.map +1 -0
- package/dist/validators/access.d.ts +215 -0
- package/dist/validators/access.d.ts.map +1 -0
- package/dist/validators/access.js +146 -0
- package/dist/validators/access.js.map +1 -0
- package/dist/validators/access.test.d.ts +2 -0
- package/dist/validators/access.test.d.ts.map +1 -0
- package/dist/validators/access.test.js +166 -0
- package/dist/validators/access.test.js.map +1 -0
- package/dist/validators/adapter-auth-session.d.ts +118 -0
- package/dist/validators/adapter-auth-session.d.ts.map +1 -0
- package/dist/validators/adapter-auth-session.js +37 -0
- package/dist/validators/adapter-auth-session.js.map +1 -0
- package/dist/validators/adapter-registry.d.ts +21 -0
- package/dist/validators/adapter-registry.d.ts.map +1 -0
- package/dist/validators/adapter-registry.js +14 -0
- package/dist/validators/adapter-registry.js.map +1 -0
- package/dist/validators/adapter-registry.test.d.ts +2 -0
- package/dist/validators/adapter-registry.test.d.ts.map +1 -0
- package/dist/validators/adapter-registry.test.js +31 -0
- package/dist/validators/adapter-registry.test.js.map +1 -0
- package/dist/validators/adapter-skills.d.ts +114 -0
- package/dist/validators/adapter-skills.d.ts.map +1 -0
- package/dist/validators/adapter-skills.js +62 -0
- package/dist/validators/adapter-skills.js.map +1 -0
- package/dist/validators/agent.d.ts +884 -0
- package/dist/validators/agent.d.ts.map +1 -0
- package/dist/validators/agent.js +224 -0
- package/dist/validators/agent.js.map +1 -0
- package/dist/validators/app-definition.d.ts +965 -0
- package/dist/validators/app-definition.d.ts.map +1 -0
- package/dist/validators/app-definition.js +39 -0
- package/dist/validators/app-definition.js.map +1 -0
- package/dist/validators/approval.d.ts +30 -0
- package/dist/validators/approval.d.ts.map +1 -0
- package/dist/validators/approval.js +22 -0
- package/dist/validators/approval.js.map +1 -0
- package/dist/validators/approval.test.d.ts +2 -0
- package/dist/validators/approval.test.d.ts.map +1 -0
- package/dist/validators/approval.test.js +25 -0
- package/dist/validators/approval.test.js.map +1 -0
- package/dist/validators/artifact.d.ts +305 -0
- package/dist/validators/artifact.d.ts.map +1 -0
- package/dist/validators/artifact.js +71 -0
- package/dist/validators/artifact.js.map +1 -0
- package/dist/validators/artifact.test.d.ts +2 -0
- package/dist/validators/artifact.test.d.ts.map +1 -0
- package/dist/validators/artifact.test.js +76 -0
- package/dist/validators/artifact.test.js.map +1 -0
- package/dist/validators/asset.d.ts +21 -0
- package/dist/validators/asset.d.ts.map +1 -0
- package/dist/validators/asset.js +70 -0
- package/dist/validators/asset.js.map +1 -0
- package/dist/validators/asset.test.d.ts +2 -0
- package/dist/validators/asset.test.d.ts.map +1 -0
- package/dist/validators/asset.test.js +130 -0
- package/dist/validators/asset.test.js.map +1 -0
- package/dist/validators/budget.d.ts +32 -0
- package/dist/validators/budget.d.ts.map +1 -0
- package/dist/validators/budget.js +27 -0
- package/dist/validators/budget.js.map +1 -0
- package/dist/validators/chat-channels.d.ts +215 -0
- package/dist/validators/chat-channels.d.ts.map +1 -0
- package/dist/validators/chat-channels.js +181 -0
- package/dist/validators/chat-channels.js.map +1 -0
- package/dist/validators/chat-channels.test.d.ts +2 -0
- package/dist/validators/chat-channels.test.d.ts.map +1 -0
- package/dist/validators/chat-channels.test.js +84 -0
- package/dist/validators/chat-channels.test.js.map +1 -0
- package/dist/validators/chat-github.d.ts +315 -0
- package/dist/validators/chat-github.d.ts.map +1 -0
- package/dist/validators/chat-github.js +149 -0
- package/dist/validators/chat-github.js.map +1 -0
- package/dist/validators/claude-setup-token-session.d.ts +160 -0
- package/dist/validators/claude-setup-token-session.d.ts.map +1 -0
- package/dist/validators/claude-setup-token-session.js +131 -0
- package/dist/validators/claude-setup-token-session.js.map +1 -0
- package/dist/validators/claude-setup-token-session.test.d.ts +2 -0
- package/dist/validators/claude-setup-token-session.test.d.ts.map +1 -0
- package/dist/validators/claude-setup-token-session.test.js +107 -0
- package/dist/validators/claude-setup-token-session.test.js.map +1 -0
- package/dist/validators/company-portability.d.ts +913 -0
- package/dist/validators/company-portability.d.ts.map +1 -0
- package/dist/validators/company-portability.js +301 -0
- package/dist/validators/company-portability.js.map +1 -0
- package/dist/validators/company-skill.d.ts +1450 -0
- package/dist/validators/company-skill.d.ts.map +1 -0
- package/dist/validators/company-skill.js +520 -0
- package/dist/validators/company-skill.js.map +1 -0
- package/dist/validators/company-skill.test.d.ts +2 -0
- package/dist/validators/company-skill.test.d.ts.map +1 -0
- package/dist/validators/company-skill.test.js +165 -0
- package/dist/validators/company-skill.test.js.map +1 -0
- package/dist/validators/company.d.ts +198 -0
- package/dist/validators/company.d.ts.map +1 -0
- package/dist/validators/company.js +46 -0
- package/dist/validators/company.js.map +1 -0
- package/dist/validators/company.test.d.ts +2 -0
- package/dist/validators/company.test.d.ts.map +1 -0
- package/dist/validators/company.test.js +60 -0
- package/dist/validators/company.test.js.map +1 -0
- package/dist/validators/connection-intent.d.ts +18 -0
- package/dist/validators/connection-intent.d.ts.map +1 -0
- package/dist/validators/connection-intent.js +14 -0
- package/dist/validators/connection-intent.js.map +1 -0
- package/dist/validators/connection-intent.test.d.ts +2 -0
- package/dist/validators/connection-intent.test.d.ts.map +1 -0
- package/dist/validators/connection-intent.test.js +55 -0
- package/dist/validators/connection-intent.test.js.map +1 -0
- package/dist/validators/cost.d.ts +69 -0
- package/dist/validators/cost.d.ts.map +1 -0
- package/dist/validators/cost.js +27 -0
- package/dist/validators/cost.js.map +1 -0
- package/dist/validators/decision-queue.d.ts +90 -0
- package/dist/validators/decision-queue.d.ts.map +1 -0
- package/dist/validators/decision-queue.js +60 -0
- package/dist/validators/decision-queue.js.map +1 -0
- package/dist/validators/decision.d.ts +403 -0
- package/dist/validators/decision.d.ts.map +1 -0
- package/dist/validators/decision.js +130 -0
- package/dist/validators/decision.js.map +1 -0
- package/dist/validators/document-annotation.d.ts +74 -0
- package/dist/validators/document-annotation.d.ts.map +1 -0
- package/dist/validators/document-annotation.js +53 -0
- package/dist/validators/document-annotation.js.map +1 -0
- package/dist/validators/email.d.ts +43 -0
- package/dist/validators/email.d.ts.map +1 -0
- package/dist/validators/email.js +70 -0
- package/dist/validators/email.js.map +1 -0
- package/dist/validators/environment-custom-images.d.ts +140 -0
- package/dist/validators/environment-custom-images.d.ts.map +1 -0
- package/dist/validators/environment-custom-images.js +80 -0
- package/dist/validators/environment-custom-images.js.map +1 -0
- package/dist/validators/environment.d.ts +129 -0
- package/dist/validators/environment.d.ts.map +1 -0
- package/dist/validators/environment.js +35 -0
- package/dist/validators/environment.js.map +1 -0
- package/dist/validators/execution-workspace.d.ts +304 -0
- package/dist/validators/execution-workspace.d.ts.map +1 -0
- package/dist/validators/execution-workspace.js +161 -0
- package/dist/validators/execution-workspace.js.map +1 -0
- package/dist/validators/external-object.d.ts +70 -0
- package/dist/validators/external-object.d.ts.map +1 -0
- package/dist/validators/external-object.js +25 -0
- package/dist/validators/external-object.js.map +1 -0
- package/dist/validators/feedback.d.ts +35 -0
- package/dist/validators/feedback.d.ts.map +1 -0
- package/dist/validators/feedback.js +14 -0
- package/dist/validators/feedback.js.map +1 -0
- package/dist/validators/finance.d.ts +126 -0
- package/dist/validators/finance.d.ts.map +1 -0
- package/dist/validators/finance.js +32 -0
- package/dist/validators/finance.js.map +1 -0
- package/dist/validators/folder.d.ts +108 -0
- package/dist/validators/folder.d.ts.map +1 -0
- package/dist/validators/folder.js +56 -0
- package/dist/validators/folder.js.map +1 -0
- package/dist/validators/goal.d.ts +40 -0
- package/dist/validators/goal.d.ts.map +1 -0
- package/dist/validators/goal.js +13 -0
- package/dist/validators/goal.js.map +1 -0
- package/dist/validators/inbox-agent-policy.d.ts +16 -0
- package/dist/validators/inbox-agent-policy.d.ts.map +1 -0
- package/dist/validators/inbox-agent-policy.js +15 -0
- package/dist/validators/inbox-agent-policy.js.map +1 -0
- package/dist/validators/index.d.ts +50 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/index.js +50 -0
- package/dist/validators/index.js.map +1 -0
- package/dist/validators/instance.d.ts +200 -0
- package/dist/validators/instance.d.ts.map +1 -0
- package/dist/validators/instance.js +112 -0
- package/dist/validators/instance.js.map +1 -0
- package/dist/validators/instance.test.d.ts +2 -0
- package/dist/validators/instance.test.d.ts.map +1 -0
- package/dist/validators/instance.test.js +137 -0
- package/dist/validators/instance.test.js.map +1 -0
- package/dist/validators/issue-tree-control.d.ts +61 -0
- package/dist/validators/issue-tree-control.d.ts.map +1 -0
- package/dist/validators/issue-tree-control.js +31 -0
- package/dist/validators/issue-tree-control.js.map +1 -0
- package/dist/validators/issue.d.ts +3028 -0
- package/dist/validators/issue.d.ts.map +1 -0
- package/dist/validators/issue.js +1824 -0
- package/dist/validators/issue.js.map +1 -0
- package/dist/validators/issue.test.d.ts +2 -0
- package/dist/validators/issue.test.d.ts.map +1 -0
- package/dist/validators/issue.test.js +454 -0
- package/dist/validators/issue.test.js.map +1 -0
- package/dist/validators/native-finalization.d.ts +91 -0
- package/dist/validators/native-finalization.d.ts.map +1 -0
- package/dist/validators/native-finalization.js +33 -0
- package/dist/validators/native-finalization.js.map +1 -0
- package/dist/validators/native-finalization.test.d.ts +2 -0
- package/dist/validators/native-finalization.test.d.ts.map +1 -0
- package/dist/validators/native-finalization.test.js +52 -0
- package/dist/validators/native-finalization.test.js.map +1 -0
- package/dist/validators/onboarding-seed.d.ts +30 -0
- package/dist/validators/onboarding-seed.d.ts.map +1 -0
- package/dist/validators/onboarding-seed.js +33 -0
- package/dist/validators/onboarding-seed.js.map +1 -0
- package/dist/validators/partial.d.ts +4 -0
- package/dist/validators/partial.d.ts.map +1 -0
- package/dist/validators/partial.js +35 -0
- package/dist/validators/partial.js.map +1 -0
- package/dist/validators/pipeline.d.ts +358 -0
- package/dist/validators/pipeline.d.ts.map +1 -0
- package/dist/validators/pipeline.js +133 -0
- package/dist/validators/pipeline.js.map +1 -0
- package/dist/validators/plugin.d.ts +1257 -0
- package/dist/validators/plugin.d.ts.map +1 -0
- package/dist/validators/plugin.js +1067 -0
- package/dist/validators/plugin.js.map +1 -0
- package/dist/validators/plugin.test.d.ts +2 -0
- package/dist/validators/plugin.test.d.ts.map +1 -0
- package/dist/validators/plugin.test.js +352 -0
- package/dist/validators/plugin.test.js.map +1 -0
- package/dist/validators/project.d.ts +510 -0
- package/dist/validators/project.d.ts.map +1 -0
- package/dist/validators/project.js +111 -0
- package/dist/validators/project.js.map +1 -0
- package/dist/validators/provider-trace.d.ts +135 -0
- package/dist/validators/provider-trace.d.ts.map +1 -0
- package/dist/validators/provider-trace.js +108 -0
- package/dist/validators/provider-trace.js.map +1 -0
- package/dist/validators/resource-memberships.d.ts +18 -0
- package/dist/validators/resource-memberships.d.ts.map +1 -0
- package/dist/validators/resource-memberships.js +16 -0
- package/dist/validators/resource-memberships.js.map +1 -0
- package/dist/validators/routine.d.ts +566 -0
- package/dist/validators/routine.d.ts.map +1 -0
- package/dist/validators/routine.js +151 -0
- package/dist/validators/routine.js.map +1 -0
- package/dist/validators/routine.test.d.ts +2 -0
- package/dist/validators/routine.test.d.ts.map +1 -0
- package/dist/validators/routine.test.js +115 -0
- package/dist/validators/routine.test.js.map +1 -0
- package/dist/validators/runtime-exposure.d.ts +100 -0
- package/dist/validators/runtime-exposure.d.ts.map +1 -0
- package/dist/validators/runtime-exposure.js +138 -0
- package/dist/validators/runtime-exposure.js.map +1 -0
- package/dist/validators/runtime-exposure.test.d.ts +2 -0
- package/dist/validators/runtime-exposure.test.d.ts.map +1 -0
- package/dist/validators/runtime-exposure.test.js +112 -0
- package/dist/validators/runtime-exposure.test.js.map +1 -0
- package/dist/validators/search.d.ts +40 -0
- package/dist/validators/search.d.ts.map +1 -0
- package/dist/validators/search.js +233 -0
- package/dist/validators/search.js.map +1 -0
- package/dist/validators/secret.d.ts +359 -0
- package/dist/validators/secret.d.ts.map +1 -0
- package/dist/validators/secret.js +344 -0
- package/dist/validators/secret.js.map +1 -0
- package/dist/validators/secret.test.d.ts +2 -0
- package/dist/validators/secret.test.d.ts.map +1 -0
- package/dist/validators/secret.test.js +208 -0
- package/dist/validators/secret.test.js.map +1 -0
- package/dist/validators/sidebar-preferences.d.ts +10 -0
- package/dist/validators/sidebar-preferences.d.ts.map +1 -0
- package/dist/validators/sidebar-preferences.js +10 -0
- package/dist/validators/sidebar-preferences.js.map +1 -0
- package/dist/validators/skill-policy.d.ts +248 -0
- package/dist/validators/skill-policy.d.ts.map +1 -0
- package/dist/validators/skill-policy.js +123 -0
- package/dist/validators/skill-policy.js.map +1 -0
- package/dist/validators/skill-policy.test.d.ts +2 -0
- package/dist/validators/skill-policy.test.d.ts.map +1 -0
- package/dist/validators/skill-policy.test.js +92 -0
- package/dist/validators/skill-policy.test.js.map +1 -0
- package/dist/validators/smoke-lab.d.ts +67 -0
- package/dist/validators/smoke-lab.d.ts.map +1 -0
- package/dist/validators/smoke-lab.js +23 -0
- package/dist/validators/smoke-lab.js.map +1 -0
- package/dist/validators/status-card.d.ts +329 -0
- package/dist/validators/status-card.d.ts.map +1 -0
- package/dist/validators/status-card.js +166 -0
- package/dist/validators/status-card.js.map +1 -0
- package/dist/validators/status-card.test.d.ts +2 -0
- package/dist/validators/status-card.test.d.ts.map +1 -0
- package/dist/validators/status-card.test.js +23 -0
- package/dist/validators/status-card.test.js.map +1 -0
- package/dist/validators/summary-slot.d.ts +46 -0
- package/dist/validators/summary-slot.d.ts.map +1 -0
- package/dist/validators/summary-slot.js +51 -0
- package/dist/validators/summary-slot.js.map +1 -0
- package/dist/validators/teams-catalog.d.ts +322 -0
- package/dist/validators/teams-catalog.d.ts.map +1 -0
- package/dist/validators/teams-catalog.js +147 -0
- package/dist/validators/teams-catalog.js.map +1 -0
- package/dist/validators/text.d.ts +4 -0
- package/dist/validators/text.d.ts.map +1 -0
- package/dist/validators/text.js +9 -0
- package/dist/validators/text.js.map +1 -0
- package/dist/validators/tool-access.d.ts +1925 -0
- package/dist/validators/tool-access.d.ts.map +1 -0
- package/dist/validators/tool-access.js +819 -0
- package/dist/validators/tool-access.js.map +1 -0
- package/dist/validators/tool-access.test.d.ts +2 -0
- package/dist/validators/tool-access.test.d.ts.map +1 -0
- package/dist/validators/tool-access.test.js +172 -0
- package/dist/validators/tool-access.test.js.map +1 -0
- package/dist/validators/trust-policy.d.ts +120 -0
- package/dist/validators/trust-policy.d.ts.map +1 -0
- package/dist/validators/trust-policy.js +59 -0
- package/dist/validators/trust-policy.js.map +1 -0
- package/dist/validators/trust-policy.test.d.ts +2 -0
- package/dist/validators/trust-policy.test.d.ts.map +1 -0
- package/dist/validators/trust-policy.test.js +26 -0
- package/dist/validators/trust-policy.test.js.map +1 -0
- package/dist/validators/work-product.d.ts +178 -0
- package/dist/validators/work-product.d.ts.map +1 -0
- package/dist/validators/work-product.js +88 -0
- package/dist/validators/work-product.js.map +1 -0
- package/dist/validators/work-product.test.d.ts +2 -0
- package/dist/validators/work-product.test.d.ts.map +1 -0
- package/dist/validators/work-product.test.js +38 -0
- package/dist/validators/work-product.test.js.map +1 -0
- package/dist/validators/workspace-file-resource.d.ts +268 -0
- package/dist/validators/workspace-file-resource.d.ts.map +1 -0
- package/dist/validators/workspace-file-resource.js +116 -0
- package/dist/validators/workspace-file-resource.js.map +1 -0
- package/dist/work-product.test.d.ts +2 -0
- package/dist/work-product.test.d.ts.map +1 -0
- package/dist/work-product.test.js +120 -0
- package/dist/work-product.test.js.map +1 -0
- package/dist/workspace-commands.d.ts +9 -0
- package/dist/workspace-commands.d.ts.map +1 -0
- package/dist/workspace-commands.js +177 -0
- package/dist/workspace-commands.js.map +1 -0
- package/dist/workspace-commands.test.d.ts +2 -0
- package/dist/workspace-commands.test.d.ts.map +1 -0
- package/dist/workspace-commands.test.js +155 -0
- package/dist/workspace-commands.test.js.map +1 -0
- package/dist/workspace-file-resource.test.d.ts +2 -0
- package/dist/workspace-file-resource.test.d.ts.map +1 -0
- package/dist/workspace-file-resource.test.js +52 -0
- package/dist/workspace-file-resource.test.js.map +1 -0
- package/dist/worktree-port-registry.d.ts +5 -0
- package/dist/worktree-port-registry.d.ts.map +1 -0
- package/dist/worktree-port-registry.js +382 -0
- package/dist/worktree-port-registry.js.map +1 -0
- package/dist/worktree-port-registry.test.d.ts +2 -0
- package/dist/worktree-port-registry.test.d.ts.map +1 -0
- package/dist/worktree-port-registry.test.js +118 -0
- package/dist/worktree-port-registry.test.js.map +1 -0
- package/dist/worktree-seed-source.d.ts +43 -0
- package/dist/worktree-seed-source.d.ts.map +1 -0
- package/dist/worktree-seed-source.js +180 -0
- package/dist/worktree-seed-source.js.map +1 -0
- package/dist/worktree-seed-source.test.d.ts +2 -0
- package/dist/worktree-seed-source.test.d.ts.map +1 -0
- package/dist/worktree-seed-source.test.js +166 -0
- package/dist/worktree-seed-source.test.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,762 @@
|
|
|
1
|
+
// ClipLab renderer adapted for Paperclip (optional graphics backend for Node SVG snapshots,
|
|
2
|
+
// supersampled live textures, character framing). Geometry and face code remain upstream v0.2.0.
|
|
3
|
+
// Vendored from ClipLab 987b6db0 (v0.2.0); see PROVENANCE.md and LICENSE.
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { particleLayout } from './particles.js';
|
|
6
|
+
import { BASE_POSE, detailAt, faceLayers } from './model.js';
|
|
7
|
+
import { clampGaze, gazeAtPoint, irisOffset, localGaze } from './gaze.js';
|
|
8
|
+
import { drawMorphBrow, drawMorphEye, drawMorphMouth, drawDrool, droolAnchor, mouthGeometry, traitWeight } from './face-morph.js';
|
|
9
|
+
/** Cursor pitch owns the vertical look direction, independent of the resting tilt. */
|
|
10
|
+
export function characterRotation(character, pose, rotation = { x: -5.9, y: -24.2, z: 0 }, cursor = { x: 0, y: 0 }) {
|
|
11
|
+
if (character.trueFront)
|
|
12
|
+
return { x: 0, y: 0, z: 0 };
|
|
13
|
+
return {
|
|
14
|
+
x: character.followRotation ? -cursor.y * 16 : rotation.x + pose.rotationX,
|
|
15
|
+
y: character.followRotation ? cursor.x * 28 : rotation.y + pose.rotationY,
|
|
16
|
+
z: character.followRotation ? 0 : rotation.z + pose.rotationZ
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/** Anchor the rounded highlight to the face direction shown by the orbit marker.
|
|
20
|
+
* Match the former cursor travel at 28° yaw / 16° pitch, with a bounded rim. */
|
|
21
|
+
export function toonLightOffset(orientation) {
|
|
22
|
+
const facing = new THREE.Vector3(0, 0, 1).applyQuaternion(orientation);
|
|
23
|
+
const look = clampGaze({ x: facing.x / Math.sin(28 * Math.PI / 180), y: facing.y / Math.sin(16 * Math.PI / 180) });
|
|
24
|
+
return { x: -.015 + look.x * .045, y: .015 + look.y * .045 };
|
|
25
|
+
}
|
|
26
|
+
/** Size adaptation is render-only; larger sizes restore the authored appearance. */
|
|
27
|
+
export function faceForSize(character, sample, size) {
|
|
28
|
+
const simpleEyes = size > 12 && size <= 48;
|
|
29
|
+
const frontOnly = size <= 32;
|
|
30
|
+
const flatFill = size < 40 && size !== 32;
|
|
31
|
+
const smallerSpacedEyes = size === 24 || size === 32;
|
|
32
|
+
if (size === 16)
|
|
33
|
+
sample = { ...sample, pose: { ...sample.pose, faceScale: sample.pose.faceScale * 1.2 } };
|
|
34
|
+
return {
|
|
35
|
+
character: simpleEyes || flatFill ? { ...character, ...(simpleEyes ? { iris: false } : {}), ...(flatFill ? { toon: false } : {}), ...(size < 40 ? { shadow: false } : {}), ...(frontOnly ? { trueFront: true, lockPosition: true, followRotation: false } : {}) } : character,
|
|
36
|
+
sample: simpleEyes || frontOnly ? { ...sample, ...(frontOnly ? { faceLayers: undefined } : {}), pose: { ...sample.pose, faceScale: sample.pose.faceScale * (simpleEyes ? 1.3 : 1), eyeSize: sample.pose.eyeSize * (size === 24 ? 1.2 : 1) * (size >= 16 && size <= 32 ? 1.1664 : 1) * (smallerSpacedEyes ? .8 : 1), ...(frontOnly ? { squash: 1 } : {}), ...(frontOnly ? { mouth: 'smile', prop: 'none', drool: false, tears: false, blush: 0, brows: 'none', mouthWidth: BASE_POSE.mouthWidth * (size >= 16 ? 1.44 : 1), mouthStroke: BASE_POSE.mouthStroke * (size >= 16 ? 1.44 : 1), gazeX: -4, gazeY: 0, leftX: 0, rightX: 0, leftY: 0, rightY: 0, spacing: BASE_POSE.spacing * .77 * (smallerSpacedEyes ? 1.2 : 1), faceY: BASE_POSE.faceY + (size === 32 ? .025 * bodyHeight(character.shape) : 0) } : {}) } } : sample,
|
|
37
|
+
simpleEyes
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export const bodyHeight = (shape) => shape === 'capsule' ? 2 : 1;
|
|
41
|
+
export function radiusAt(shape, y) {
|
|
42
|
+
if (shape === 'sphere')
|
|
43
|
+
return Math.sqrt(Math.max(0, .25 - y * y));
|
|
44
|
+
if (shape === 'capsule') {
|
|
45
|
+
const dy = Math.max(Math.abs(y) - .5, 0);
|
|
46
|
+
return Math.sqrt(Math.max(0, .25 - dy * dy));
|
|
47
|
+
}
|
|
48
|
+
if (y >= 0)
|
|
49
|
+
return Math.sqrt(Math.max(0, .25 - y * y));
|
|
50
|
+
if (y >= -.43)
|
|
51
|
+
return .5;
|
|
52
|
+
return .43 + Math.sqrt(Math.max(0, .07 ** 2 - (y + .43) ** 2));
|
|
53
|
+
}
|
|
54
|
+
function geometryFor(shape, squareBottom = false) {
|
|
55
|
+
if (shape === 'sphere')
|
|
56
|
+
return new THREE.SphereGeometry(.5, 80, 64);
|
|
57
|
+
if (shape === 'capsule')
|
|
58
|
+
return new THREE.CapsuleGeometry(.5, 1, 24, 80);
|
|
59
|
+
const points = [new THREE.Vector2(0, -.5), new THREE.Vector2(squareBottom ? .5 : .43, -.5)];
|
|
60
|
+
for (let i = 1; !squareBottom && i <= 12; i++) {
|
|
61
|
+
const a = -Math.PI / 2 + i / 12 * Math.PI / 2;
|
|
62
|
+
points.push(new THREE.Vector2(.43 + .07 * Math.cos(a), -.43 + .07 * Math.sin(a)));
|
|
63
|
+
}
|
|
64
|
+
points.push(new THREE.Vector2(.5, 0));
|
|
65
|
+
for (let i = 1; i <= 32; i++) {
|
|
66
|
+
const a = i / 32 * Math.PI / 2;
|
|
67
|
+
points.push(new THREE.Vector2(.5 * Math.cos(a), .5 * Math.sin(a)));
|
|
68
|
+
}
|
|
69
|
+
return new THREE.LatheGeometry(points, 80);
|
|
70
|
+
}
|
|
71
|
+
const vertexShader = `
|
|
72
|
+
uniform vec3 fillScale;
|
|
73
|
+
uniform vec3 fillOffset;
|
|
74
|
+
varying vec3 vPosition;
|
|
75
|
+
void main() {
|
|
76
|
+
vPosition = position * fillScale + fillOffset;
|
|
77
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
const fragmentShader = `
|
|
81
|
+
uniform vec3 colorA;
|
|
82
|
+
uniform vec3 colorB;
|
|
83
|
+
uniform float gradientOn;
|
|
84
|
+
uniform float toonOn;
|
|
85
|
+
uniform float insetFill;
|
|
86
|
+
uniform float angle;
|
|
87
|
+
uniform float bodyHeight;
|
|
88
|
+
varying vec3 vPosition;
|
|
89
|
+
void main() {
|
|
90
|
+
float t = clamp(0.5 + vPosition.y / bodyHeight * cos(angle) + vPosition.x * sin(angle), 0.0, 1.0);
|
|
91
|
+
vec3 color = mix(colorA, mix(colorB, colorA, t), gradientOn);
|
|
92
|
+
// The light fill uses an inset copy of the silhouette, with one crisp shade step.
|
|
93
|
+
float shade = mix(0.82, 1.0, insetFill);
|
|
94
|
+
gl_FragColor = vec4(color * mix(1.0, shade, toonOn), 1.0);
|
|
95
|
+
#include <colorspace_fragment>
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
function heart(ctx, x, y, r) {
|
|
99
|
+
ctx.beginPath();
|
|
100
|
+
ctx.moveTo(x, y + r);
|
|
101
|
+
ctx.bezierCurveTo(x - r * 2, y - r * .1, x - r, y - r * 1.5, x, y - r * .55);
|
|
102
|
+
ctx.bezierCurveTo(x + r, y - r * 1.5, x + r * 2, y - r * .1, x, y + r);
|
|
103
|
+
ctx.closePath();
|
|
104
|
+
ctx.fill();
|
|
105
|
+
}
|
|
106
|
+
function star(ctx, x, y, r, points = 5) {
|
|
107
|
+
ctx.beginPath();
|
|
108
|
+
for (let i = 0; i < points * 2; i++) {
|
|
109
|
+
const a = i / (points * 2) * Math.PI * 2 - Math.PI / 2;
|
|
110
|
+
const d = i % 2 ? r * .46 : r;
|
|
111
|
+
const px = x + Math.cos(a) * d, py = y + Math.sin(a) * d;
|
|
112
|
+
i ? ctx.lineTo(px, py) : ctx.moveTo(px, py);
|
|
113
|
+
}
|
|
114
|
+
ctx.closePath();
|
|
115
|
+
ctx.fill();
|
|
116
|
+
}
|
|
117
|
+
const faceAspect = .76 / .57;
|
|
118
|
+
const smoothstep = (a, b, x) => { const t = Math.max(0, Math.min(1, (x - a) / (b - a))); return t * t * (3 - 2 * t); };
|
|
119
|
+
const fract = (v) => ((v % 1) + 1) % 1;
|
|
120
|
+
export function effectEnvelope(phase) { const t = fract(phase); return smoothstep(0, .18, t) * (1 - smoothstep(.72, 1, t)); }
|
|
121
|
+
export function eyeRadius(pose, character, detail, side) { return (detail === 'eyes' ? 29 : 27) * pose.eyeSize * (side < 0 ? pose.leftScale : pose.rightScale) * (character.iris ? 1.2 : 1); }
|
|
122
|
+
export function projectedEye(character, pose, blink, side, matrix, camera, layers) {
|
|
123
|
+
const radius = eyeRadius(pose, character, 'full', side);
|
|
124
|
+
const cx = 256 + side * 103 * pose.spacing + (side < 0 ? pose.leftX : pose.rightX);
|
|
125
|
+
const cy = 197 - (side < 0 ? pose.leftY : pose.rightY);
|
|
126
|
+
const angle = (pose.eyeTilt * side + (side < 0 ? pose.leftRotation : pose.rightRotation)) * Math.PI / 180;
|
|
127
|
+
const h = Math.max(.12, 1 - blink) * pose.eyeHeight * (1 - .35 * (layers ? traitWeight(layers, t => t.eye === 'soft') : pose.eye === 'soft' ? 1 : 0));
|
|
128
|
+
const shell = character.elevated ? 1 + character.elevation : 1.003;
|
|
129
|
+
const project = (dx, dy) => {
|
|
130
|
+
const tx = cx + Math.cos(angle) * dx - Math.sin(angle) * dy * h;
|
|
131
|
+
const ty = cy + faceAspect * (Math.sin(angle) * dx + Math.cos(angle) * dy * h);
|
|
132
|
+
const x = (tx / 512 - .5) * .76 * pose.faceScale;
|
|
133
|
+
const y = (.5 - ty / 512) * .57 * pose.faceScale + (character.shape === 'capsule' ? -.14 : -.025) + pose.faceY;
|
|
134
|
+
const r = shell * radiusAt(character.shape, y / shell);
|
|
135
|
+
return new THREE.Vector3(x, y, Math.sqrt(Math.max(.001, r * r - x * x))).applyMatrix4(matrix).project(camera);
|
|
136
|
+
};
|
|
137
|
+
const center = project(0, 0);
|
|
138
|
+
// Central differences follow the tangent of the curved face at this eye.
|
|
139
|
+
const right = project(radius * .1, 0).sub(project(-radius * .1, 0)).multiplyScalar(5).add(center);
|
|
140
|
+
const up = project(0, -radius * .1).sub(project(0, radius * .1)).multiplyScalar(5).add(center);
|
|
141
|
+
return { center, right, up };
|
|
142
|
+
}
|
|
143
|
+
/** Resting highlights are local to the face, so they remain up-left when tilted. */
|
|
144
|
+
function irisRestGaze(character, gaze, reducedMotion = false) {
|
|
145
|
+
if (!character.iris)
|
|
146
|
+
return gaze;
|
|
147
|
+
if (reducedMotion)
|
|
148
|
+
return { x: -.22, y: .22 };
|
|
149
|
+
return character.followCursor ? gaze : { x: gaze.x - .22, y: gaze.y + .22 };
|
|
150
|
+
}
|
|
151
|
+
export function resolveEyeGazes(character, pose, blink, matrix, camera, gaze, pointer, layers) {
|
|
152
|
+
const eye = (side) => {
|
|
153
|
+
const base = localGaze({ x: pose.gazeX + gaze.x, y: pose.gazeY + gaze.y }, pose.eyeTilt * side + (side < 0 ? pose.leftRotation : pose.rightRotation));
|
|
154
|
+
if (!pointer?.weight)
|
|
155
|
+
return base;
|
|
156
|
+
const { center, right, up } = projectedEye(character, pose, blink, side, matrix, camera, layers);
|
|
157
|
+
const look = gazeAtPoint(pointer, center, right, up), weight = Math.max(0, Math.min(1, pointer.weight));
|
|
158
|
+
return { x: base.x + (look.x - base.x) * weight, y: base.y + (look.y - base.y) * weight };
|
|
159
|
+
};
|
|
160
|
+
return { left: eye(-1), right: eye(1) };
|
|
161
|
+
}
|
|
162
|
+
function drop(ctx, x, y, r) {
|
|
163
|
+
ctx.beginPath();
|
|
164
|
+
ctx.moveTo(x, y - r * 1.5);
|
|
165
|
+
ctx.bezierCurveTo(x - r * .25, y - r * .8, x - r, y - r * .2, x - r, y + r * .35);
|
|
166
|
+
ctx.bezierCurveTo(x - r, y + r * 1.65, x + r, y + r * 1.65, x + r, y + r * .35);
|
|
167
|
+
ctx.bezierCurveTo(x + r, y - r * .2, x + r * .25, y - r * .8, x, y - r * 1.5);
|
|
168
|
+
ctx.fill();
|
|
169
|
+
}
|
|
170
|
+
export function compactMouthOffset(size, faceScale, viewHeight, outputHeight) {
|
|
171
|
+
return (size >= 16 && size < 32) ? 512 * viewHeight / outputHeight / (.57 * faceScale) : 0;
|
|
172
|
+
}
|
|
173
|
+
export function drawFace(ctx, pose, character, blink, detail, gaze, effects = {}) {
|
|
174
|
+
ctx.clearRect(0, 0, 512, 512);
|
|
175
|
+
if (detail === 'body')
|
|
176
|
+
return;
|
|
177
|
+
const ink = character.eyeColor, eyeY = detail === 'eyes' ? 254 : 197, spacing = 103 * pose.spacing;
|
|
178
|
+
const internalGaze = character.iris && detail === 'full';
|
|
179
|
+
const gx = internalGaze ? 0 : (pose.gazeX + gaze.x) * 20, gy = internalGaze ? 0 : -(pose.gazeY + gaze.y) * 15;
|
|
180
|
+
const layers = effects.faceLayers;
|
|
181
|
+
const pupilAmount = !effects.simpleEyes && detail === 'full' ? layers ? traitWeight(layers, t => t.eye === 'pupil') : pose.eye === 'pupil' ? 1 : 0 : 0;
|
|
182
|
+
ctx.lineCap = 'round';
|
|
183
|
+
ctx.lineJoin = 'round';
|
|
184
|
+
for (const side of [-1, 1]) {
|
|
185
|
+
const r = eyeRadius(pose, character, detail, side);
|
|
186
|
+
const eyeGaze = side < 0 ? effects.eyeGazes?.left : effects.eyeGazes?.right;
|
|
187
|
+
const pupilEyes = !effects.simpleEyes && pose.eye === 'pupil' && detail === 'full';
|
|
188
|
+
const x = 256 + side * spacing + gx * (1 - pupilAmount) + (side < 0 ? pose.leftX : pose.rightX), y = eyeY + gy * (1 - pupilAmount) - (side < 0 ? pose.leftY : pose.rightY);
|
|
189
|
+
if (detail === 'full' && pose.blush > 0) {
|
|
190
|
+
ctx.save();
|
|
191
|
+
ctx.globalAlpha = pose.blush * .8;
|
|
192
|
+
ctx.fillStyle = '#ff647a';
|
|
193
|
+
ctx.beginPath();
|
|
194
|
+
ctx.ellipse(x + side * 20, y + 56, 31, 24 * faceAspect, 0, 0, Math.PI * 2);
|
|
195
|
+
ctx.fill();
|
|
196
|
+
ctx.restore();
|
|
197
|
+
}
|
|
198
|
+
const localRotation = side < 0 ? pose.leftRotation : pose.rightRotation;
|
|
199
|
+
// Equal world units in X/Y: the face mesh is wider than it is tall.
|
|
200
|
+
ctx.save();
|
|
201
|
+
ctx.translate(x, y);
|
|
202
|
+
ctx.scale(1, faceAspect);
|
|
203
|
+
ctx.rotate((pose.eyeTilt * side + localRotation) * Math.PI / 180);
|
|
204
|
+
ctx.fillStyle = ink;
|
|
205
|
+
ctx.strokeStyle = ink;
|
|
206
|
+
ctx.lineWidth = Math.max(13, r * .43);
|
|
207
|
+
const happyMouth = ['open', 'grin', 'smile', 'u-smile'].includes(pose.mouth);
|
|
208
|
+
const closed = ['closed', 'arc-up', 'arc-down'].includes(pose.eye) || (pose.eye === 'wink' && side > 0) || (detail === 'eyes' && ['open', 'grin'].includes(pose.mouth) && pose.eye === 'dot');
|
|
209
|
+
if (effects.simpleEyes) {
|
|
210
|
+
// Keep literal round dots even at eyes-only sizes or between styled beats.
|
|
211
|
+
ctx.fillStyle = '#000000';
|
|
212
|
+
ctx.scale(1, Math.max(.12, 1 - blink));
|
|
213
|
+
ctx.beginPath();
|
|
214
|
+
ctx.arc(0, 0, r, 0, Math.PI * 2);
|
|
215
|
+
ctx.fill();
|
|
216
|
+
}
|
|
217
|
+
else if (layers) {
|
|
218
|
+
const look = eyeGaze ?? localGaze({ x: pose.gazeX + gaze.x, y: pose.gazeY + gaze.y }, pose.eyeTilt * side + localRotation);
|
|
219
|
+
drawMorphEye(ctx, pose, layers, r, side, blink, detail, ink, character.iris, look);
|
|
220
|
+
}
|
|
221
|
+
else if (pose.faceSet === 'set-2' && pose.eye === 'wink' && side > 0) {
|
|
222
|
+
ctx.beginPath();
|
|
223
|
+
ctx.moveTo(r * .7, -r * .65);
|
|
224
|
+
ctx.lineTo(-r * .55, 0);
|
|
225
|
+
ctx.lineTo(r * .7, r * .65);
|
|
226
|
+
ctx.stroke();
|
|
227
|
+
}
|
|
228
|
+
else if (closed) {
|
|
229
|
+
const up = pose.eye === 'arc-up' || (pose.eye !== 'arc-down' && happyMouth);
|
|
230
|
+
ctx.beginPath();
|
|
231
|
+
ctx.arc(0, 0, r, up ? Math.PI : 0, up ? Math.PI * 2 : Math.PI);
|
|
232
|
+
ctx.stroke();
|
|
233
|
+
}
|
|
234
|
+
else if (pose.eye === 'squint') {
|
|
235
|
+
ctx.beginPath();
|
|
236
|
+
ctx.moveTo(-r * side * .7, -r * .8);
|
|
237
|
+
ctx.lineTo(r * side * .6, 0);
|
|
238
|
+
ctx.lineTo(-r * side * .7, r * .8);
|
|
239
|
+
ctx.stroke();
|
|
240
|
+
}
|
|
241
|
+
else if (blink > .7) {
|
|
242
|
+
ctx.beginPath();
|
|
243
|
+
ctx.moveTo(-r, 0);
|
|
244
|
+
ctx.lineTo(r, 0);
|
|
245
|
+
ctx.stroke();
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
const h = Math.max(.12, 1 - blink) * pose.eyeHeight * (pose.eye === 'soft' ? .65 : 1);
|
|
249
|
+
ctx.scale(1, h);
|
|
250
|
+
if (pose.cheeks) {
|
|
251
|
+
// The cheek is transparent, revealing the live shaded body beneath the eye.
|
|
252
|
+
ctx.beginPath();
|
|
253
|
+
ctx.rect(-r * 2, -r * 2, r * 4, r * 4);
|
|
254
|
+
ctx.moveTo(r * .82, r * 1.13);
|
|
255
|
+
ctx.arc(0, r * 1.13, r * .82, 0, Math.PI * 2);
|
|
256
|
+
ctx.clip('evenodd');
|
|
257
|
+
}
|
|
258
|
+
if (pose.eye === 'star')
|
|
259
|
+
star(ctx, 0, 0, r * 1.2);
|
|
260
|
+
else if (pose.eye === 'heart') {
|
|
261
|
+
if (pose.faceSet === 'set-2' && detail === 'full')
|
|
262
|
+
ctx.fillStyle = '#ff3f58';
|
|
263
|
+
heart(ctx, 0, 0, r);
|
|
264
|
+
}
|
|
265
|
+
else if (pose.eye === 'half-lidded') {
|
|
266
|
+
ctx.beginPath();
|
|
267
|
+
ctx.arc(0, 0, r, 0, Math.PI);
|
|
268
|
+
ctx.closePath();
|
|
269
|
+
ctx.fill();
|
|
270
|
+
}
|
|
271
|
+
else if (pupilEyes) {
|
|
272
|
+
const outer = r * 1.5;
|
|
273
|
+
ctx.fillStyle = '#fffef9';
|
|
274
|
+
ctx.beginPath();
|
|
275
|
+
ctx.arc(0, 0, outer, 0, Math.PI * 2);
|
|
276
|
+
ctx.fill();
|
|
277
|
+
ctx.clip();
|
|
278
|
+
const look = eyeGaze ?? { x: pose.gazeX + gaze.x, y: pose.gazeY + gaze.y };
|
|
279
|
+
ctx.fillStyle = ink;
|
|
280
|
+
ctx.beginPath();
|
|
281
|
+
ctx.arc(look.x * outer * .52, -look.y * outer * .52, outer * .4, 0, Math.PI * 2);
|
|
282
|
+
ctx.fill();
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
ctx.beginPath();
|
|
286
|
+
ctx.arc(0, 0, r, 0, Math.PI * 2);
|
|
287
|
+
ctx.fill();
|
|
288
|
+
}
|
|
289
|
+
if (internalGaze && !pupilEyes && pose.eye !== 'half-lidded') {
|
|
290
|
+
// The eye path also clips star/heart shapes and intersects cheek cutouts.
|
|
291
|
+
ctx.clip();
|
|
292
|
+
const dot = irisOffset(r, eyeGaze ?? { x: pose.gazeX + gaze.x, y: pose.gazeY + gaze.y }, eyeGaze ? 0 : pose.eyeTilt * side + localRotation, pose.cheeks);
|
|
293
|
+
ctx.fillStyle = '#ffffff';
|
|
294
|
+
ctx.beginPath();
|
|
295
|
+
ctx.arc(dot.x, dot.y, r * .28, 0, Math.PI * 2);
|
|
296
|
+
ctx.fill();
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
ctx.restore();
|
|
300
|
+
if (detail === 'full' && (layers || pose.brows !== 'none')) {
|
|
301
|
+
ctx.save();
|
|
302
|
+
ctx.translate(x, y - r * (1.45 + .35 * pupilAmount));
|
|
303
|
+
ctx.scale(1, faceAspect);
|
|
304
|
+
drawMorphBrow(ctx, layers ?? faceLayers(pose), r, side, ink, pose.browStroke ?? 1, pose.browLength ?? 1);
|
|
305
|
+
ctx.restore();
|
|
306
|
+
}
|
|
307
|
+
if (pose.tears && detail === 'full') {
|
|
308
|
+
const phase = fract((effects.phase ?? .35) + (side < 0 ? .46 : 0)), alpha = effectEnvelope(phase) * (effects.tearAmount ?? 1);
|
|
309
|
+
ctx.save();
|
|
310
|
+
ctx.translate(x + side * (r + 18), y + 23 + phase * phase * 123);
|
|
311
|
+
ctx.scale(1, faceAspect);
|
|
312
|
+
ctx.rotate(-side * .2);
|
|
313
|
+
ctx.globalAlpha = alpha;
|
|
314
|
+
ctx.fillStyle = '#f6fdff';
|
|
315
|
+
drop(ctx, 0, 0, 12 + phase * 3);
|
|
316
|
+
ctx.restore();
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (detail === 'eyes')
|
|
320
|
+
return;
|
|
321
|
+
const mouthX = effects.mouthFollowsEyes ? 256 + gx * (1 - pupilAmount) + (pose.leftX + pose.rightX) / 2 : 256 + gx * .25;
|
|
322
|
+
const mouthY = (effects.mouthFollowsEyes ? 275 + gy : 293 + gy * .25) + (effects.mouthOffset ?? 0);
|
|
323
|
+
if (layers) {
|
|
324
|
+
ctx.save();
|
|
325
|
+
ctx.translate(mouthX, mouthY);
|
|
326
|
+
ctx.scale(1, faceAspect);
|
|
327
|
+
drawMorphMouth(ctx, pose, layers, ink);
|
|
328
|
+
ctx.restore();
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
const x = mouthX, y = pose.mouth === 'cry' ? 329 + gy * .25 : mouthY;
|
|
332
|
+
const broad = ['open', 'grin', 'cry'].includes(pose.mouth), w = (broad ? 124 : pose.mouth === 'oh' ? 51 : 61) * pose.mouthWidth;
|
|
333
|
+
const line = 17 * pose.mouthStroke;
|
|
334
|
+
ctx.save();
|
|
335
|
+
ctx.translate(x, y);
|
|
336
|
+
ctx.scale(1, faceAspect);
|
|
337
|
+
ctx.fillStyle = ink;
|
|
338
|
+
ctx.strokeStyle = ink;
|
|
339
|
+
ctx.lineWidth = line;
|
|
340
|
+
ctx.beginPath();
|
|
341
|
+
if (pose.mouth === 'smile') {
|
|
342
|
+
ctx.arc(0, -10, w, Math.PI * .18, Math.PI * .82);
|
|
343
|
+
ctx.stroke();
|
|
344
|
+
}
|
|
345
|
+
else if (pose.mouth === 'u-smile') {
|
|
346
|
+
ctx.arc(0, -8, w * .56, 0, Math.PI);
|
|
347
|
+
ctx.stroke();
|
|
348
|
+
}
|
|
349
|
+
else if (pose.mouth === 'frown') {
|
|
350
|
+
ctx.arc(0, 39, w, Math.PI * 1.2, Math.PI * 1.8);
|
|
351
|
+
ctx.stroke();
|
|
352
|
+
}
|
|
353
|
+
else if (pose.mouth === 'line' || pose.mouth === 'sleep') {
|
|
354
|
+
ctx.moveTo(-w * .58, 0);
|
|
355
|
+
ctx.lineTo(w * .58, 0);
|
|
356
|
+
ctx.stroke();
|
|
357
|
+
}
|
|
358
|
+
else if (pose.mouth === 'kiss') {
|
|
359
|
+
ctx.moveTo(-w * .25, -21);
|
|
360
|
+
ctx.bezierCurveTo(w * .48, -34, w * .53, -2, 0, 0);
|
|
361
|
+
ctx.bezierCurveTo(w * .53, 2, w * .48, 34, -w * .25, 21);
|
|
362
|
+
ctx.stroke();
|
|
363
|
+
}
|
|
364
|
+
else if (pose.mouth === 'tongue-out') {
|
|
365
|
+
ctx.beginPath();
|
|
366
|
+
ctx.moveTo(-w, -9);
|
|
367
|
+
ctx.quadraticCurveTo(0, -2, w, -9);
|
|
368
|
+
ctx.stroke();
|
|
369
|
+
ctx.fillStyle = '#ff526c';
|
|
370
|
+
ctx.beginPath();
|
|
371
|
+
ctx.moveTo(-w * .6, 5);
|
|
372
|
+
ctx.lineTo(w * .6, 5);
|
|
373
|
+
ctx.bezierCurveTo(w * .88, 85 * pose.mouthOpen + 28, -w * .88, 85 * pose.mouthOpen + 28, -w * .6, 5);
|
|
374
|
+
ctx.fill();
|
|
375
|
+
}
|
|
376
|
+
else if (pose.mouth === 'wave') {
|
|
377
|
+
ctx.moveTo(-w, 4);
|
|
378
|
+
ctx.bezierCurveTo(-w * .35, -25, w * .35, 25, w, -4);
|
|
379
|
+
ctx.stroke();
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
const h = (broad ? 48 : 22) + 72 * pose.mouthOpen;
|
|
383
|
+
if (pose.mouth === 'oh')
|
|
384
|
+
ctx.arc(0, 14, w * (.55 + .3 * pose.mouthOpen), 0, Math.PI * 2);
|
|
385
|
+
else if (pose.mouth === 'cry') {
|
|
386
|
+
ctx.moveTo(-w, 30);
|
|
387
|
+
ctx.bezierCurveTo(-w * 1.1, -h, w * 1.1, -h, w, 30);
|
|
388
|
+
ctx.quadraticCurveTo(w, 44, w * .76, 38);
|
|
389
|
+
ctx.quadraticCurveTo(0, 24, -w * .76, 38);
|
|
390
|
+
ctx.quadraticCurveTo(-w, 44, -w, 30);
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
const tilt = pose.mouth === 'grin' ? 24 : 0;
|
|
394
|
+
ctx.moveTo(-w, -11);
|
|
395
|
+
ctx.quadraticCurveTo(0, 5, w, -11 - tilt);
|
|
396
|
+
ctx.bezierCurveTo(w * 1.02, h, -w * 1.02, h, -w, -11);
|
|
397
|
+
}
|
|
398
|
+
ctx.closePath();
|
|
399
|
+
ctx.fill();
|
|
400
|
+
ctx.save();
|
|
401
|
+
ctx.clip();
|
|
402
|
+
if (pose.tongue) {
|
|
403
|
+
ctx.fillStyle = '#f37b83';
|
|
404
|
+
ctx.beginPath();
|
|
405
|
+
ctx.ellipse(10, h * .65, w * .65, h * .34, -.1, 0, Math.PI * 2);
|
|
406
|
+
ctx.fill();
|
|
407
|
+
}
|
|
408
|
+
if (pose.teeth) {
|
|
409
|
+
ctx.fillStyle = '#fffef8';
|
|
410
|
+
ctx.beginPath();
|
|
411
|
+
ctx.roundRect(-w * .76, -23, w * 1.52, 30, 12);
|
|
412
|
+
ctx.fill();
|
|
413
|
+
}
|
|
414
|
+
ctx.restore();
|
|
415
|
+
// Rebuild the outer path after the clipped interior details changed the canvas path.
|
|
416
|
+
ctx.beginPath();
|
|
417
|
+
if (pose.mouth === 'oh')
|
|
418
|
+
ctx.arc(0, 14, w * (.55 + .3 * pose.mouthOpen), 0, Math.PI * 2);
|
|
419
|
+
else if (pose.mouth === 'cry') {
|
|
420
|
+
ctx.moveTo(-w, 30);
|
|
421
|
+
ctx.bezierCurveTo(-w * 1.1, -h, w * 1.1, -h, w, 30);
|
|
422
|
+
ctx.quadraticCurveTo(w, 44, w * .76, 38);
|
|
423
|
+
ctx.quadraticCurveTo(0, 24, -w * .76, 38);
|
|
424
|
+
ctx.quadraticCurveTo(-w, 44, -w, 30);
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
const tilt = pose.mouth === 'grin' ? 24 : 0;
|
|
428
|
+
ctx.moveTo(-w, -11);
|
|
429
|
+
ctx.quadraticCurveTo(0, 5, w, -11 - tilt);
|
|
430
|
+
ctx.bezierCurveTo(w * 1.02, h, -w * 1.02, h, -w, -11);
|
|
431
|
+
}
|
|
432
|
+
ctx.closePath();
|
|
433
|
+
ctx.strokeStyle = ink;
|
|
434
|
+
ctx.stroke();
|
|
435
|
+
}
|
|
436
|
+
if (pose.drool) {
|
|
437
|
+
const anchor = droolAnchor(mouthGeometry(pose).outline, w);
|
|
438
|
+
if (pose.mouth === 'cry')
|
|
439
|
+
anchor.y -= 27;
|
|
440
|
+
drawDrool(ctx, anchor);
|
|
441
|
+
}
|
|
442
|
+
ctx.restore();
|
|
443
|
+
}
|
|
444
|
+
export function drawProp(ctx, prop, color, phase, settings = {}) {
|
|
445
|
+
ctx.clearRect(0, 0, 256, 256);
|
|
446
|
+
const layout = particleLayout(prop, phase, settings);
|
|
447
|
+
ctx.save();
|
|
448
|
+
ctx.translate(128, 128);
|
|
449
|
+
ctx.scale(256 / layout.extent, 256 / layout.extent);
|
|
450
|
+
ctx.translate(-128, -128);
|
|
451
|
+
for (const particle of layout.particles) {
|
|
452
|
+
const i = particle.index;
|
|
453
|
+
ctx.save();
|
|
454
|
+
ctx.globalAlpha = particle.alpha;
|
|
455
|
+
ctx.translate(particle.x, particle.y);
|
|
456
|
+
ctx.scale(particle.scale, particle.scale);
|
|
457
|
+
ctx.fillStyle = color;
|
|
458
|
+
ctx.strokeStyle = color;
|
|
459
|
+
ctx.lineWidth = 11;
|
|
460
|
+
ctx.lineCap = 'round';
|
|
461
|
+
ctx.lineJoin = 'round';
|
|
462
|
+
if (prop === 'zzz') {
|
|
463
|
+
const r = 14 + i * 5;
|
|
464
|
+
ctx.beginPath();
|
|
465
|
+
ctx.moveTo(-r, -r);
|
|
466
|
+
ctx.lineTo(r, -r);
|
|
467
|
+
ctx.lineTo(-r, r);
|
|
468
|
+
ctx.lineTo(r, r);
|
|
469
|
+
ctx.stroke();
|
|
470
|
+
}
|
|
471
|
+
else if (prop === 'sparkle')
|
|
472
|
+
star(ctx, 0, 0, 23 + i * 4, 4);
|
|
473
|
+
else if (prop === 'heart')
|
|
474
|
+
heart(ctx, 0, 0, 17 + i * 3);
|
|
475
|
+
else if (prop === 'question') {
|
|
476
|
+
ctx.font = 'bold 144px sans-serif';
|
|
477
|
+
ctx.textAlign = 'center';
|
|
478
|
+
ctx.fillText('?', 0, 48);
|
|
479
|
+
}
|
|
480
|
+
else if (prop === 'sweat')
|
|
481
|
+
drop(ctx, 0, 0, 38);
|
|
482
|
+
else if (prop === 'crown') {
|
|
483
|
+
ctx.beginPath();
|
|
484
|
+
ctx.moveTo(-78, 42);
|
|
485
|
+
ctx.lineTo(-94, -45);
|
|
486
|
+
ctx.lineTo(-35, -3);
|
|
487
|
+
ctx.lineTo(0, -67);
|
|
488
|
+
ctx.lineTo(35, -3);
|
|
489
|
+
ctx.lineTo(94, -45);
|
|
490
|
+
ctx.lineTo(78, 42);
|
|
491
|
+
ctx.closePath();
|
|
492
|
+
ctx.fill();
|
|
493
|
+
}
|
|
494
|
+
ctx.restore();
|
|
495
|
+
}
|
|
496
|
+
ctx.restore();
|
|
497
|
+
}
|
|
498
|
+
export class CharacterRenderer {
|
|
499
|
+
canvas;
|
|
500
|
+
gl;
|
|
501
|
+
scene = new THREE.Scene();
|
|
502
|
+
shadowScene = new THREE.Scene();
|
|
503
|
+
camera = new THREE.OrthographicCamera(-1, 1, 1, -1, .1, 30);
|
|
504
|
+
root = new THREE.Group();
|
|
505
|
+
body;
|
|
506
|
+
lightFill;
|
|
507
|
+
face;
|
|
508
|
+
faceCanvas = null;
|
|
509
|
+
faceCtx = null;
|
|
510
|
+
faceTexture = null;
|
|
511
|
+
propCanvas = null;
|
|
512
|
+
propCtx = null;
|
|
513
|
+
propTexture = null;
|
|
514
|
+
prop;
|
|
515
|
+
shadow;
|
|
516
|
+
shape = 'capsule';
|
|
517
|
+
squareBottom = false;
|
|
518
|
+
lastFaceKey = '';
|
|
519
|
+
resolvedEyes;
|
|
520
|
+
lastProp = '';
|
|
521
|
+
disposed = false;
|
|
522
|
+
options;
|
|
523
|
+
captured;
|
|
524
|
+
constructor(canvas, options) {
|
|
525
|
+
this.canvas = canvas;
|
|
526
|
+
this.options = options;
|
|
527
|
+
this.gl = null;
|
|
528
|
+
if (canvas) {
|
|
529
|
+
this.faceCanvas = document.createElement('canvas');
|
|
530
|
+
this.propCanvas = document.createElement('canvas');
|
|
531
|
+
this.gl = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true, preserveDrawingBuffer: true, powerPreference: 'low-power' });
|
|
532
|
+
this.gl.outputColorSpace = THREE.SRGBColorSpace;
|
|
533
|
+
this.gl.setPixelRatio(options.pixelRatio ?? Math.min(Math.max(window.devicePixelRatio || 1, 1) * 2, 4));
|
|
534
|
+
this.faceCanvas.width = this.faceCanvas.height = 1024;
|
|
535
|
+
this.faceCtx = this.faceCanvas.getContext('2d');
|
|
536
|
+
this.faceCtx.scale(2, 2);
|
|
537
|
+
this.faceTexture = new THREE.CanvasTexture(this.faceCanvas);
|
|
538
|
+
this.faceTexture.colorSpace = THREE.SRGBColorSpace;
|
|
539
|
+
this.faceTexture.generateMipmaps = true;
|
|
540
|
+
this.faceTexture.minFilter = THREE.LinearMipmapLinearFilter;
|
|
541
|
+
this.propCanvas.width = this.propCanvas.height = 512;
|
|
542
|
+
this.propCtx = this.propCanvas.getContext('2d');
|
|
543
|
+
this.propCtx.scale(2, 2);
|
|
544
|
+
this.propTexture = new THREE.CanvasTexture(this.propCanvas);
|
|
545
|
+
this.propTexture.colorSpace = THREE.SRGBColorSpace;
|
|
546
|
+
}
|
|
547
|
+
const material = new THREE.ShaderMaterial({
|
|
548
|
+
uniforms: { colorA: { value: new THREE.Color() }, colorB: { value: new THREE.Color() }, gradientOn: { value: 1 }, toonOn: { value: 1 }, insetFill: { value: 0 }, fillScale: { value: new THREE.Vector3(1, 1, 1) }, fillOffset: { value: new THREE.Vector3() }, angle: { value: 0 }, bodyHeight: { value: 2 } }, vertexShader, fragmentShader
|
|
549
|
+
});
|
|
550
|
+
this.body = new THREE.Mesh(geometryFor('capsule'), material);
|
|
551
|
+
const fillMaterial = material.clone();
|
|
552
|
+
fillMaterial.depthTest = false;
|
|
553
|
+
fillMaterial.depthWrite = false;
|
|
554
|
+
fillMaterial.uniforms.insetFill.value = 1;
|
|
555
|
+
this.lightFill = new THREE.Mesh(new THREE.CapsuleGeometry(.42, .94, 24, 80), fillMaterial);
|
|
556
|
+
this.lightFill.renderOrder = 1;
|
|
557
|
+
this.face = new THREE.Mesh(new THREE.PlaneGeometry(1, 1, 56, 40), new THREE.MeshBasicMaterial({ map: this.faceTexture, transparent: true, alphaTest: .008, depthWrite: false, side: THREE.FrontSide, toneMapped: false }));
|
|
558
|
+
this.face.geometry.setAttribute('faceValid', new THREE.BufferAttribute(new Float32Array(this.face.geometry.attributes.position.count).fill(1), 1));
|
|
559
|
+
this.face.material.onBeforeCompile = shader => {
|
|
560
|
+
shader.vertexShader = 'attribute float faceValid; varying float vFaceValid;\n' + shader.vertexShader.replace('#include <begin_vertex>', '#include <begin_vertex>\nvFaceValid = faceValid;');
|
|
561
|
+
shader.fragmentShader = 'varying float vFaceValid;\n' + shader.fragmentShader.replace('void main() {', 'void main() {\nif (vFaceValid < 0.99) discard;');
|
|
562
|
+
};
|
|
563
|
+
this.prop = new THREE.Sprite(new THREE.SpriteMaterial({ map: this.propTexture, transparent: true, depthWrite: false, toneMapped: false }));
|
|
564
|
+
this.shadow = new THREE.Mesh(new THREE.CircleGeometry(.35, 64), new THREE.MeshBasicMaterial({ color: '#809299', transparent: true, opacity: .2, depthWrite: false }));
|
|
565
|
+
this.root.add(this.body, this.lightFill, this.face, this.prop);
|
|
566
|
+
this.scene.add(this.root);
|
|
567
|
+
this.shadowScene.add(this.shadow);
|
|
568
|
+
this.camera.position.set(0, 0, 8);
|
|
569
|
+
this.camera.lookAt(0, 0, 0);
|
|
570
|
+
this.resize(options.width, options.height, options.displaySize);
|
|
571
|
+
}
|
|
572
|
+
resize(width, height, displaySize) {
|
|
573
|
+
this.options = { ...this.options, width: Math.max(1, width), height: Math.max(1, height), displaySize: displaySize ?? Math.min(width, height) };
|
|
574
|
+
this.gl?.setSize(this.options.width, this.options.height, false);
|
|
575
|
+
}
|
|
576
|
+
render(character, sample, options = {}, gaze = { x: 0, y: 0 }) {
|
|
577
|
+
if (this.disposed)
|
|
578
|
+
return;
|
|
579
|
+
this.options = { ...this.options, ...options };
|
|
580
|
+
const displaySize = this.options.displaySize ?? Math.min(this.options.width, this.options.height);
|
|
581
|
+
const appearance = faceForSize(character, sample, displaySize);
|
|
582
|
+
character = appearance.character;
|
|
583
|
+
sample = appearance.sample;
|
|
584
|
+
const squareBottom = character.shape === 'cap' && displaySize <= 24;
|
|
585
|
+
if (character.shape !== this.shape || squareBottom !== this.squareBottom) {
|
|
586
|
+
this.shape = character.shape;
|
|
587
|
+
this.squareBottom = squareBottom;
|
|
588
|
+
this.body.geometry.dispose();
|
|
589
|
+
this.body.geometry = geometryFor(this.shape, squareBottom);
|
|
590
|
+
this.lightFill.geometry.dispose();
|
|
591
|
+
this.lightFill.geometry = this.shape === 'capsule' ? new THREE.CapsuleGeometry(.42, .94, 24, 80) : geometryFor(this.shape);
|
|
592
|
+
}
|
|
593
|
+
const { pose } = sample;
|
|
594
|
+
const height = bodyHeight(this.shape);
|
|
595
|
+
const detail = detailAt(displaySize);
|
|
596
|
+
const u = this.body.material.uniforms;
|
|
597
|
+
u.colorA.value.set(character.color);
|
|
598
|
+
u.colorB.value.set(character.color2);
|
|
599
|
+
u.gradientOn.value = character.gradient ? 1 : (sample.gradientMix ?? (sample.gradientRotation !== undefined ? 1 : 0));
|
|
600
|
+
u.toonOn.value = character.toon ? 1 : 0;
|
|
601
|
+
u.angle.value = (character.gradientAngle + (sample.gradientRotation ?? 0)) * Math.PI / 180;
|
|
602
|
+
u.bodyHeight.value = height;
|
|
603
|
+
const rotation = characterRotation(this.options.reducedMotion ? { ...character, followRotation: false } : character, pose, this.options.rotation, this.options.cursor);
|
|
604
|
+
this.root.rotation.set(rotation.x * Math.PI / 180, rotation.y * Math.PI / 180, rotation.z * Math.PI / 180, 'YXZ');
|
|
605
|
+
this.root.position.y = character.lockPosition ? 0 : sample.bob * .025 * height;
|
|
606
|
+
const stretch = pose.squash + (character.lockPosition ? 0 : sample.breathe * .008);
|
|
607
|
+
this.root.scale.set(1 / Math.sqrt(stretch), stretch, 1 / Math.sqrt(stretch));
|
|
608
|
+
this.lightFill.visible = character.toon;
|
|
609
|
+
const fillScale = this.shape === 'capsule' ? 1 : .85;
|
|
610
|
+
this.lightFill.scale.setScalar(fillScale);
|
|
611
|
+
this.root.updateMatrixWorld(true);
|
|
612
|
+
// Shift the inset toward the face marker in the camera plane, not the tilted
|
|
613
|
+
// body's axes. Bound travel by the narrowest stretch to retain a dark rim.
|
|
614
|
+
const lightTarget = toonLightOffset(this.root.quaternion);
|
|
615
|
+
const lightScale = Math.min(this.root.scale.x, this.root.scale.y, this.root.scale.z);
|
|
616
|
+
const lightOffset = new THREE.Vector3(lightTarget.x * lightScale, lightTarget.y * lightScale, 0).applyMatrix4(new THREE.Matrix4().copy(this.root.matrixWorld).invert())
|
|
617
|
+
.sub(new THREE.Vector3().applyMatrix4(new THREE.Matrix4().copy(this.root.matrixWorld).invert()));
|
|
618
|
+
this.lightFill.position.copy(lightOffset);
|
|
619
|
+
const fu = this.lightFill.material.uniforms;
|
|
620
|
+
for (const name of ['colorA', 'colorB'])
|
|
621
|
+
fu[name].value.copy(u[name].value);
|
|
622
|
+
for (const name of ['gradientOn', 'toonOn', 'angle', 'bodyHeight'])
|
|
623
|
+
fu[name].value = u[name].value;
|
|
624
|
+
fu.fillScale.value.setScalar(fillScale);
|
|
625
|
+
fu.fillOffset.value.copy(lightOffset);
|
|
626
|
+
const zoom = displaySize <= 128 ? 1 : this.options.zoom ?? 1;
|
|
627
|
+
const aspect = this.options.width / this.options.height;
|
|
628
|
+
// Small assets use a tight body fit instead of the companion preview padding.
|
|
629
|
+
const padding = this.options.framing === 'character' ? .82 : displaySize <= 128 ? .55 : .72;
|
|
630
|
+
let half = Math.max(height * padding, padding / aspect) / zoom;
|
|
631
|
+
if (displaySize > 32 && displaySize <= 128) {
|
|
632
|
+
// A sphere bounds every rotation, avoiding angle-dependent zoom changes.
|
|
633
|
+
if (!this.body.geometry.boundingSphere)
|
|
634
|
+
this.body.geometry.computeBoundingSphere();
|
|
635
|
+
const sphere = this.body.geometry.boundingSphere;
|
|
636
|
+
const radius = (sphere.radius + sphere.center.length()) * Math.max(1, this.root.scale.x, this.root.scale.y, this.root.scale.z);
|
|
637
|
+
const safeHalf = (radius + this.root.position.length()) / .9;
|
|
638
|
+
half = Math.max(half, safeHalf, safeHalf / aspect);
|
|
639
|
+
}
|
|
640
|
+
this.camera.left = -half * aspect;
|
|
641
|
+
this.camera.right = half * aspect;
|
|
642
|
+
this.camera.top = half;
|
|
643
|
+
this.camera.bottom = -half;
|
|
644
|
+
this.camera.updateProjectionMatrix();
|
|
645
|
+
this.camera.updateMatrixWorld(true);
|
|
646
|
+
this.face.visible = detail !== 'body';
|
|
647
|
+
// Pointer directions stay relative to the screen when the character rolls or turns.
|
|
648
|
+
const reduced = !!this.options.reducedMotion;
|
|
649
|
+
const screenGaze = reduced ? { x: 0, y: 0 } : gaze;
|
|
650
|
+
const turnGaze = !reduced && !character.followCursor && character.followRotation && !character.trueFront ? this.options.cursor ?? { x: 0, y: 0 } : { x: 0, y: 0 };
|
|
651
|
+
const local = character.iris ? new THREE.Vector3(screenGaze.x + turnGaze.x * .575, screenGaze.y + turnGaze.y * .575, 0).applyQuaternion(this.root.quaternion.clone().invert()) : screenGaze;
|
|
652
|
+
const faceGaze = displaySize <= 32 ? { x: 0, y: 0 } : irisRestGaze(character, local, reduced);
|
|
653
|
+
this.resolvedEyes = !appearance.simpleEyes && detail === 'full' && (character.iris || pose.eye === 'pupil' || sample.faceLayers?.some(l => l.traits.eye === 'pupil')) ? (!reduced ? this.options.eyeGazes : undefined) ?? resolveEyeGazes(character, reduced ? { ...pose, gazeX: 0, gazeY: 0 } : pose, sample.blink, this.root.matrixWorld, this.camera, faceGaze, !reduced && character.followCursor ? this.options.pointerLook : undefined, sample.faceLayers) : undefined;
|
|
654
|
+
const mouthOffset = compactMouthOffset(displaySize, pose.faceScale, half * 2, displaySize);
|
|
655
|
+
const key = JSON.stringify([mouthOffset, pose, sample.faceLayers, character.eyeColor, character.iris, appearance.simpleEyes, sample.blink.toFixed(3), pose.tears ? sample.effectPhase?.toFixed(2) : 0, sample.tearAmount, detail, faceGaze.x.toFixed(3), faceGaze.y.toFixed(3), this.resolvedEyes]);
|
|
656
|
+
if (this.faceCtx && this.faceTexture && key !== this.lastFaceKey) {
|
|
657
|
+
drawFace(this.faceCtx, pose, character, sample.blink, detail, faceGaze, { phase: sample.effectPhase, tearAmount: sample.tearAmount, eyeGazes: this.resolvedEyes, faceLayers: sample.faceLayers, simpleEyes: appearance.simpleEyes, mouthOffset, mouthFollowsEyes: displaySize >= 16 && displaySize <= 32 });
|
|
658
|
+
this.faceTexture.needsUpdate = true;
|
|
659
|
+
this.lastFaceKey = key;
|
|
660
|
+
}
|
|
661
|
+
const vertices = this.face.geometry.attributes.position;
|
|
662
|
+
const uv = this.face.geometry.attributes.uv;
|
|
663
|
+
const valid = this.face.geometry.attributes.faceValid;
|
|
664
|
+
const shell = character.elevated ? 1 + character.elevation : 1.003;
|
|
665
|
+
const scale = pose.faceScale;
|
|
666
|
+
const offset = (this.shape === 'capsule' ? -.14 : -.025) + pose.faceY;
|
|
667
|
+
for (let i = 0; i < vertices.count; i++) {
|
|
668
|
+
const x = (uv.getX(i) - .5) * .76 * scale;
|
|
669
|
+
const y = (uv.getY(i) - .5) * .57 * scale + offset;
|
|
670
|
+
const r = shell * radiusAt(this.shape, y / shell);
|
|
671
|
+
const z = Math.sqrt(Math.max(.001, r * r - x * x));
|
|
672
|
+
vertices.setXYZ(i, x, y, z);
|
|
673
|
+
valid.setX(i, x * x < r * r && Math.abs(y) < height / 2 * shell ? 1 : 0);
|
|
674
|
+
}
|
|
675
|
+
vertices.needsUpdate = true;
|
|
676
|
+
valid.needsUpdate = true;
|
|
677
|
+
this.face.geometry.computeBoundingSphere();
|
|
678
|
+
this.prop.visible = detail === 'full' && pose.prop !== 'none';
|
|
679
|
+
this.prop.material.depthTest = pose.prop !== 'zzz';
|
|
680
|
+
this.prop.renderOrder = pose.prop === 'zzz' ? 2 : 0;
|
|
681
|
+
const propKey = `${pose.prop}:${pose.propSize}:${pose.propCount}:${pose.propOutward}:${sample.effectPhase?.toFixed(2) ?? 'still'}`;
|
|
682
|
+
if (this.propCtx && this.propTexture && propKey !== this.lastProp) {
|
|
683
|
+
drawProp(this.propCtx, pose.prop, pose.prop === 'heart' ? '#ff768c' : pose.prop === 'sweat' ? '#b7e9ff' : '#ffd362', sample.effectPhase, pose);
|
|
684
|
+
this.propTexture.needsUpdate = true;
|
|
685
|
+
this.lastProp = propKey;
|
|
686
|
+
}
|
|
687
|
+
const propSize = this.shape === 'capsule' ? .42 : .32;
|
|
688
|
+
this.prop.scale.setScalar(propSize * particleLayout(pose.prop, sample.effectPhase, pose).extent / 256 * (.7 + .3 * (sample.propAmount ?? 1)));
|
|
689
|
+
this.prop.material.opacity = sample.propAmount ?? 1;
|
|
690
|
+
this.prop.position.set(pose.prop === 'crown' ? 0 : .56, pose.prop === 'crown' ? height / 2 + .08 : height * .29, .15);
|
|
691
|
+
this.shadow.visible = character.shadow && detail === 'full';
|
|
692
|
+
this.shadow.position.set(0, -height * .58, -.2);
|
|
693
|
+
this.shadow.scale.set((1 - (character.lockPosition ? 0 : sample.bob) * .06) * (this.shape === 'capsule' ? 1 : .95), .12, 1);
|
|
694
|
+
const bg = this.options.background;
|
|
695
|
+
if (bg)
|
|
696
|
+
this.gl?.setClearColor(bg, 1);
|
|
697
|
+
else
|
|
698
|
+
this.gl?.setClearColor(0x000000, 0);
|
|
699
|
+
// World matrices are updated explicitly: without a GL render (the Node
|
|
700
|
+
// SVG snapshot path) nothing else would, and snapshotScene reads them.
|
|
701
|
+
this.shadowScene.updateMatrixWorld(true);
|
|
702
|
+
this.scene.updateMatrixWorld(true);
|
|
703
|
+
// Composite the ground shadow first: body rotation must never bring it
|
|
704
|
+
// in front of the silhouette or the toon fill, which does not write depth.
|
|
705
|
+
if (this.gl) {
|
|
706
|
+
this.gl.autoClear = true;
|
|
707
|
+
this.gl.render(this.shadowScene, this.camera);
|
|
708
|
+
this.gl.autoClear = false;
|
|
709
|
+
this.gl.clearDepth();
|
|
710
|
+
this.gl.render(this.scene, this.camera);
|
|
711
|
+
this.gl.autoClear = true;
|
|
712
|
+
}
|
|
713
|
+
this.captured = { character, sample, gaze: faceGaze, simpleEyes: appearance.simpleEyes };
|
|
714
|
+
}
|
|
715
|
+
snapshotScene() {
|
|
716
|
+
if (!this.captured)
|
|
717
|
+
throw new Error('Render the character before taking a snapshot.');
|
|
718
|
+
return { ...this.captured, options: this.options, camera: this.camera, body: this.body, lightFill: this.lightFill, face: this.face, prop: this.prop, shadow: this.shadow, eyeGazes: this.resolvedEyes };
|
|
719
|
+
}
|
|
720
|
+
orientation() { return this.root.quaternion.clone(); }
|
|
721
|
+
eyeGazes() { return this.resolvedEyes ? { left: { ...this.resolvedEyes.left }, right: { ...this.resolvedEyes.right } } : undefined; }
|
|
722
|
+
dispose() {
|
|
723
|
+
if (this.disposed)
|
|
724
|
+
return;
|
|
725
|
+
this.disposed = true;
|
|
726
|
+
this.body.geometry.dispose();
|
|
727
|
+
this.body.material.dispose();
|
|
728
|
+
this.lightFill.geometry.dispose();
|
|
729
|
+
this.lightFill.material.dispose();
|
|
730
|
+
this.face.geometry.dispose();
|
|
731
|
+
this.face.material.dispose();
|
|
732
|
+
this.faceTexture?.dispose();
|
|
733
|
+
this.propTexture?.dispose();
|
|
734
|
+
this.prop.material.dispose();
|
|
735
|
+
this.shadow.geometry.dispose();
|
|
736
|
+
this.shadow.material.dispose();
|
|
737
|
+
this.gl?.dispose();
|
|
738
|
+
this.gl?.forceContextLoss();
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
let thumbRenderer;
|
|
742
|
+
const thumbs = new Map();
|
|
743
|
+
export function thumbnail(character, pose = BASE_POSE, size = 96) {
|
|
744
|
+
const key = JSON.stringify([character, pose, size]);
|
|
745
|
+
const cached = thumbs.get(key);
|
|
746
|
+
if (cached)
|
|
747
|
+
return cached;
|
|
748
|
+
try {
|
|
749
|
+
if (!thumbRenderer)
|
|
750
|
+
thumbRenderer = new CharacterRenderer(document.createElement('canvas'), { width: 192, height: 192, pixelRatio: 1, displaySize: size });
|
|
751
|
+
thumbRenderer.render({ ...character, shadow: false }, { pose, blink: 0, bob: 0, breathe: 0, expressionId: '', beatIndex: 0, stepIndex: 0 }, { displaySize: size, rotation: { x: -3, y: -8, z: -5 }, zoom: 1.08 });
|
|
752
|
+
const url = thumbRenderer.canvas.toDataURL('image/png');
|
|
753
|
+
if (thumbs.size > 250)
|
|
754
|
+
thumbs.clear();
|
|
755
|
+
thumbs.set(key, url);
|
|
756
|
+
return url;
|
|
757
|
+
}
|
|
758
|
+
catch {
|
|
759
|
+
return '';
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
//# sourceMappingURL=renderer.js.map
|