diff --git a/.github/actions/setup-workspace/action.yml b/.github/actions/setup-workspace/action.yml index 3f56e2765..8cca687c6 100644 --- a/.github/actions/setup-workspace/action.yml +++ b/.github/actions/setup-workspace/action.yml @@ -4,6 +4,10 @@ description: Setup Node.js and pnpm, restoring an exact platform-specific worksp runs: using: composite steps: + - name: Checkout Avatar SDK submodule + shell: bash + run: git submodule update --init --depth 1 -- assets/avatar + - name: Restore workspace dependencies id: workspace-cache uses: actions/cache@v4 @@ -11,6 +15,7 @@ runs: path: | node_modules assets/avatar/node_modules + assets/avatar/packages/*/node_modules apps/*/node_modules packages/*/node_modules packages/adapters/*/node_modules @@ -20,7 +25,8 @@ runs: workspace-v1-pnpm-11.7.0-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/actions/setup-workspace/action.yml', '.node-version', '.npmrc', 'package.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml', 'patches/**/*.patch', - 'assets/avatar/package.json', 'apps/*/package.json', + 'assets/avatar/package.json', 'assets/avatar/packages/*/package.json', + 'apps/*/package.json', 'packages/*/package.json', 'packages/adapters/*/package.json', 'packages/channels/*/package.json', 'packages/plugins/*/package.json') }} diff --git a/.github/assets/avatar-3d-sdk-client-dark.jpg b/.github/assets/avatar-3d-sdk-client-dark.jpg new file mode 100644 index 000000000..5b1c73cc1 Binary files /dev/null and b/.github/assets/avatar-3d-sdk-client-dark.jpg differ diff --git a/.github/workflows/chrome-extension-ci.yml b/.github/workflows/chrome-extension-ci.yml index 59fcdd838..d88cbd834 100644 --- a/.github/workflows/chrome-extension-ci.yml +++ b/.github/workflows/chrome-extension-ci.yml @@ -50,6 +50,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Checkout Avatar SDK submodule + run: git submodule update --init --depth 1 -- assets/avatar + - name: Setup pnpm uses: pnpm/action-setup@v4 with: diff --git a/.github/workflows/chrome-extension-release.yml b/.github/workflows/chrome-extension-release.yml index b28c822b6..8c6f1c701 100644 --- a/.github/workflows/chrome-extension-release.yml +++ b/.github/workflows/chrome-extension-release.yml @@ -40,6 +40,8 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Checkout Avatar SDK submodule + run: git submodule update --init --depth 1 -- assets/avatar - name: Setup pnpm uses: pnpm/action-setup@v4 with: @@ -154,6 +156,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Checkout Avatar SDK submodule + run: git submodule update --init --depth 1 -- assets/avatar - name: Setup pnpm uses: pnpm/action-setup@v4 with: diff --git a/.github/workflows/deploy-avatar.yml b/.github/workflows/deploy-avatar.yml index 169c20dd9..d27a108ea 100644 --- a/.github/workflows/deploy-avatar.yml +++ b/.github/workflows/deploy-avatar.yml @@ -7,7 +7,6 @@ on: paths: - assets/avatar - assets/avatar/** - - packages/avatar/** - .github/workflows/deploy-avatar.yml workflow_dispatch: diff --git a/.github/workflows/deploy-pwa.yml b/.github/workflows/deploy-pwa.yml index 662af3fa1..09f876959 100644 --- a/.github/workflows/deploy-pwa.yml +++ b/.github/workflows/deploy-pwa.yml @@ -5,9 +5,10 @@ on: branches: - main paths: + - assets/avatar + - assets/avatar/** - apps/client/** - packages/adapters/** - - packages/avatar/** - packages/channels/lark/** - packages/cli-helper/** - packages/components/** diff --git a/.github/workflows/deploy-relay-admin.yml b/.github/workflows/deploy-relay-admin.yml index f6cec5ca5..bd1c1c046 100644 --- a/.github/workflows/deploy-relay-admin.yml +++ b/.github/workflows/deploy-relay-admin.yml @@ -38,6 +38,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Checkout Avatar SDK submodule + run: git submodule update --init --depth 1 -- assets/avatar + - name: Setup pnpm uses: pnpm/action-setup@v4 with: diff --git a/.github/workflows/deploy-relay-dev.yml b/.github/workflows/deploy-relay-dev.yml index 251c3bc7d..1cdfbb685 100644 --- a/.github/workflows/deploy-relay-dev.yml +++ b/.github/workflows/deploy-relay-dev.yml @@ -70,6 +70,9 @@ jobs: - name: Checkout repository if: steps.credentials.outputs.available == 'true' uses: actions/checkout@v4 + - name: Checkout Avatar SDK submodule + if: steps.credentials.outputs.available == 'true' + run: git submodule update --init --depth 1 -- assets/avatar - name: Setup pnpm if: steps.credentials.outputs.available == 'true' uses: pnpm/action-setup@v4 diff --git a/.github/workflows/deploy-relay-server.yml b/.github/workflows/deploy-relay-server.yml index 7c01edf4e..aa9ea47dc 100644 --- a/.github/workflows/deploy-relay-server.yml +++ b/.github/workflows/deploy-relay-server.yml @@ -76,6 +76,8 @@ jobs: fi - name: Checkout repository uses: actions/checkout@v4 + - name: Checkout Avatar SDK submodule + run: git submodule update --init --depth 1 -- assets/avatar - name: Setup pnpm uses: pnpm/action-setup@v4 with: @@ -143,6 +145,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Checkout Avatar SDK submodule + run: git submodule update --init --depth 1 -- assets/avatar - name: Setup pnpm uses: pnpm/action-setup@v4 with: diff --git a/.github/workflows/desktop-package.yml b/.github/workflows/desktop-package.yml index 7bc740879..8a141b3ac 100644 --- a/.github/workflows/desktop-package.yml +++ b/.github/workflows/desktop-package.yml @@ -632,7 +632,9 @@ jobs: - name: Install dependencies working-directory: ${{ steps.desktop_workspace.outputs.workspace_dir }} - run: pnpm install --frozen-lockfile + run: | + git submodule update --init --depth 1 -- assets/avatar + pnpm install --frozen-lockfile - name: Run desktop package preflight working-directory: ${{ steps.desktop_workspace.outputs.workspace_dir }} diff --git a/.github/workflows/npm-publish-alpha.yml b/.github/workflows/npm-publish-alpha.yml index d7b4db719..58bf8ee08 100644 --- a/.github/workflows/npm-publish-alpha.yml +++ b/.github/workflows/npm-publish-alpha.yml @@ -49,8 +49,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Checkout demo video submodule - run: git submodule update --init --depth 1 -- assets/demo-video + - name: Checkout required workspace submodules + run: git submodule update --init --depth 1 -- assets/avatar assets/demo-video - name: Setup pnpm uses: pnpm/action-setup@v4 with: diff --git a/.github/workflows/relay-ci.yml b/.github/workflows/relay-ci.yml index f459103db..da8827987 100644 --- a/.github/workflows/relay-ci.yml +++ b/.github/workflows/relay-ci.yml @@ -87,8 +87,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Checkout demo video submodule - run: git submodule update --init --depth 1 -- assets/demo-video + - name: Checkout required workspace submodules + run: git submodule update --init --depth 1 -- assets/avatar assets/demo-video - name: Setup pnpm uses: pnpm/action-setup@v4 diff --git a/.github/workflows/stable-windows-msi-release.yml b/.github/workflows/stable-windows-msi-release.yml index d8bc31eca..019c25ac8 100644 --- a/.github/workflows/stable-windows-msi-release.yml +++ b/.github/workflows/stable-windows-msi-release.yml @@ -53,6 +53,8 @@ jobs: fetch-depth: 0 ref: ${{ github.sha }} + - name: Checkout Avatar SDK submodule + run: git submodule update --init --depth 1 -- assets/avatar - name: Setup Node.js uses: actions/setup-node@v4 with: diff --git a/.github/workflows/vscode-extension-ci.yml b/.github/workflows/vscode-extension-ci.yml index 4ad05e417..97878d45c 100644 --- a/.github/workflows/vscode-extension-ci.yml +++ b/.github/workflows/vscode-extension-ci.yml @@ -44,6 +44,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Checkout Avatar SDK submodule + run: git submodule update --init --depth 1 -- assets/avatar + - name: Setup pnpm uses: pnpm/action-setup@v4 with: diff --git a/.github/workflows/vscode-extension-release.yml b/.github/workflows/vscode-extension-release.yml index 5384e6a68..c28acc2e4 100644 --- a/.github/workflows/vscode-extension-release.yml +++ b/.github/workflows/vscode-extension-release.yml @@ -37,6 +37,8 @@ jobs: with: fetch-depth: 0 ref: refs/tags/${{ inputs.release_tag }} + - name: Checkout Avatar SDK submodule + run: git submodule update --init --depth 1 -- assets/avatar - name: Setup pnpm uses: pnpm/action-setup@v4 with: @@ -127,6 +129,9 @@ jobs: fetch-depth: 0 ref: refs/tags/${{ needs.build.outputs.release_tag }} + - name: Checkout Avatar SDK submodule + run: git submodule update --init --depth 1 -- assets/avatar + - name: Validate immutable release source env: EXPECTED_SOURCE_SHA: ${{ needs.build.outputs.source_sha }} diff --git a/.github/workflows/workspace-cache-warm.yml b/.github/workflows/workspace-cache-warm.yml index e7d2c14d0..b76188fec 100644 --- a/.github/workflows/workspace-cache-warm.yml +++ b/.github/workflows/workspace-cache-warm.yml @@ -14,6 +14,7 @@ on: - pnpm-workspace.yaml - patches/**/*.patch - assets/avatar/package.json + - assets/avatar/packages/*/package.json - apps/*/package.json - packages/*/package.json - packages/adapters/*/package.json diff --git a/.oo/docs/en/usage/avatar-runtime.md b/.oo/docs/en/usage/avatar-runtime.md index 4605d315b..d8e3d9360 100644 --- a/.oo/docs/en/usage/avatar-runtime.md +++ b/.oo/docs/en/usage/avatar-runtime.md @@ -11,17 +11,54 @@ import { createDefaultAvatarDefinition, parseAvatarDefinition, serializeAvatarDefinition -} from '@oneworks/avatar-core' +} from '@oneworks/avatar' const definition = createDefaultAvatarDefinition() const json = serializeAvatarDefinition(definition) const restored = parseAvatarDefinition(json) ``` +The face can enable a configurable highlight inside each eye. `scene.decals` adds vector color shapes that are projected onto a body or entity-part surface, so blush, mouth marks, badges, and similar details follow the same 3D pose and export path instead of becoming separate floating geometry. + +```ts +const decorated = { + ...definition, + scene: { + ...definition.scene, + face: { + ...definition.scene.face, + eyeHighlight: { + color: '#ffffff', + enabled: true, + offsetX: -18, + offsetY: -20, + opacity: 96, + size: 30 + } + }, + decals: [ + { + color: '#f29a93', + height: 18, + id: 'blush-left', + label: 'Left blush', + opacity: 88, + rotation: -6, + shape: 'ellipse', + targetPartId: null, + width: 30, + x: -50, + y: 31 + } + ] + } +} +``` + Applications can supply multiple animation libraries. A library contains groups and clips, and a clip may also be passed directly to playback. A `relative` clip anchors each pose dimension at that dimension's first explicitly authored value; an `absolute` clip uses the recorded values directly. ```ts -import type { AvatarAnimationLibrary } from '@oneworks/avatar-core' +import type { AvatarAnimationLibrary } from '@oneworks/avatar' export const supportAnimations = { id: 'support', @@ -62,7 +99,7 @@ Version 1 animation patches support `colorGrade`, `face`, and the `pitch`, `yaw` `Avatar` and `AvatarEditor` consume the same definition and animation libraries. The editor is the complete editor used by the hosted product, not a reduced settings form. ```tsx -import { createDefaultAvatarDefinition } from '@oneworks/avatar-core' +import { createDefaultAvatarDefinition } from '@oneworks/avatar' import { Avatar, AvatarEditor } from '@oneworks/avatar-react' import type { AvatarHandle } from '@oneworks/avatar-react' import { useRef, useState } from 'react' @@ -110,7 +147,7 @@ The renderer ref provides `play`, `pause`, `resume`, `seek`, `stop`, `capture`, ```vue