@vizij/render 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -8
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +296 -95
- package/dist/index.mjs +288 -85
- package/package.json +18 -17
- package/LICENSE +0 -201
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Three.js + React renderer, scene store, and helper controllers for Vizij faces.
|
|
4
4
|
|
|
5
|
-
This package exposes the `Vizij` canvas component along with hooks, stores, and GLTF helpers that power Vizij’s real-time character visualisation. It is the foundation that other packages (`@vizij/
|
|
5
|
+
This package exposes the `Vizij` canvas component along with hooks, stores, and GLTF helpers that power Vizij’s real-time character visualisation. It is the foundation that other packages (`@vizij/runtime-react`, etc.) build upon.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -96,14 +96,14 @@ The store tracks world graph entries, controllers, debug overlays, and renderabl
|
|
|
96
96
|
## Controllers & Helpers
|
|
97
97
|
|
|
98
98
|
- Controllers under `src/controllers` encapsulate input handling, camera logic, and other behaviours. Compose them with your own React components.
|
|
99
|
-
- `loadGLTF` / `loadGLTFBlob` simplify loading rig assets and extract animatable metadata used by `@vizij/
|
|
99
|
+
- `loadGLTF` / `loadGLTFBlob` simplify loading rig assets and extract animatable metadata used by `@vizij/runtime-react`.
|
|
100
100
|
- `export` helpers produce snapshots of the current scene (useful for tooling or exporting frames).
|
|
101
101
|
|
|
102
102
|
All exports are re-exported through `src/index.tsx`, so a simple `import { loadGLTF } from "@vizij/render"` works.
|
|
103
103
|
|
|
104
104
|
### Dual-format Vizij bundles
|
|
105
105
|
|
|
106
|
-
Vizij scenes persist authoring metadata inside GLBs so third-party tools see baked animation, while Vizij runtimes retain
|
|
106
|
+
Vizij scenes persist authoring metadata inside GLBs so third-party tools see baked animation, while Vizij runtimes retain the authored graphs and clips.
|
|
107
107
|
|
|
108
108
|
- Every renderable still carries a `RobotData` extension in `userData` describing features and animatable bindings.
|
|
109
109
|
- The exporter now writes a root-level `extensions.VIZIJ_bundle` block following the schema in [`src/types/vizij-bundle.ts`](./src/types/vizij-bundle.ts). It contains rig graphs, pose configs, stored Vizij clips, and provenance hashes.
|
|
@@ -112,7 +112,7 @@ Vizij scenes persist authoring metadata inside GLBs so third-party tools see bak
|
|
|
112
112
|
- The new `animations` field exposes `VizijAnimationClipData[]`, which maps each glTF animation channel back to Vizij animatable ids (`RobotData.features.*.value.id`). Each track provides component-aware `times`/`values` arrays so runtimes can register clips without re-parsing the GLB.
|
|
113
113
|
- `extractVizijBundle(scene)` and `applyVizijBundle(scene, bundle)` (under `src/functions/vizij-bundle.ts`) let advanced tooling inspect or mutate bundles without triggering a fresh export.
|
|
114
114
|
|
|
115
|
-
With this structure, authoring tools can round-trip
|
|
115
|
+
With this structure, authoring tools can round-trip Vizij runtime assets while shipping native glTF animations for viewers that do not understand Vizij.
|
|
116
116
|
|
|
117
117
|
---
|
|
118
118
|
|
|
@@ -132,14 +132,17 @@ pnpm --filter "@vizij/render" size
|
|
|
132
132
|
|
|
133
133
|
## Publishing
|
|
134
134
|
|
|
135
|
-
Use the shared workflow at [`.github/workflows/publish-npm.yml`](
|
|
135
|
+
Use the shared workflow at [`.github/workflows/publish-npm.yml`](../../../.github/workflows/publish-npm.yml).
|
|
136
136
|
|
|
137
137
|
1. Align dependency versions (`three`, `@react-three/*`, `zustand`, Vizij packages) and generate a changeset:
|
|
138
|
+
|
|
138
139
|
```bash
|
|
139
140
|
pnpm changeset
|
|
140
141
|
pnpm version:packages
|
|
141
142
|
```
|
|
143
|
+
|
|
142
144
|
2. Validate locally:
|
|
145
|
+
|
|
143
146
|
```bash
|
|
144
147
|
pnpm install
|
|
145
148
|
pnpm --filter "@vizij/render" build
|
|
@@ -148,13 +151,14 @@ Use the shared workflow at [`.github/workflows/publish-npm.yml`](../../.github/w
|
|
|
148
151
|
pnpm --filter "@vizij/render" lint
|
|
149
152
|
pnpm --filter "@vizij/render" exec npm pack --dry-run
|
|
150
153
|
```
|
|
151
|
-
|
|
154
|
+
|
|
155
|
+
3. Merge the version bump to `main`. CI publishes any `@vizij/*` version not yet on npm (with provenance) — no release tag. See the root [README → Publishing & Versioning](../../../README.md#publishing--versioning).
|
|
152
156
|
|
|
153
157
|
---
|
|
154
158
|
|
|
155
159
|
## Related Packages
|
|
156
160
|
|
|
157
|
-
- [`@vizij/
|
|
158
|
-
- [`@vizij/animation-react`](
|
|
161
|
+
- [`@vizij/runtime-react`](../runtime-react/README.md) – Hooks that consume the renderer to load rigged models.
|
|
162
|
+
- [`@vizij/animation-react`](../animation-react/README.md) – React bindings that feed animation values back into the renderer.
|
|
159
163
|
|
|
160
164
|
Questions or contributions? Open an issue so we can keep the renderer API and docs sharp for the whole Vizij ecosystem. 🎨
|
package/dist/index.d.mts
CHANGED
|
@@ -227,6 +227,9 @@ interface Shape extends RenderableBase {
|
|
|
227
227
|
roughness?: Feature;
|
|
228
228
|
metalness?: Feature;
|
|
229
229
|
color?: Feature;
|
|
230
|
+
emissive?: Feature;
|
|
231
|
+
emissiveIntensity?: Feature;
|
|
232
|
+
specular?: Feature;
|
|
230
233
|
translation: Feature;
|
|
231
234
|
rotation: Feature;
|
|
232
235
|
scale?: Feature;
|
package/dist/index.d.ts
CHANGED
|
@@ -227,6 +227,9 @@ interface Shape extends RenderableBase {
|
|
|
227
227
|
roughness?: Feature;
|
|
228
228
|
metalness?: Feature;
|
|
229
229
|
color?: Feature;
|
|
230
|
+
emissive?: Feature;
|
|
231
|
+
emissiveIntensity?: Feature;
|
|
232
|
+
specular?: Feature;
|
|
230
233
|
translation: Feature;
|
|
231
234
|
rotation: Feature;
|
|
232
235
|
scale?: Feature;
|