@blcklab/anyo-avatar-vue 0.2.0-alpha.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/LICENSE +9 -0
  3. package/README.md +138 -0
  4. package/dist/AnyoAvatarControls.d.ts +4 -0
  5. package/dist/AnyoAvatarControls.d.ts.map +1 -0
  6. package/dist/AnyoAvatarControls.js +239 -0
  7. package/dist/AnyoAvatarControls.js.map +1 -0
  8. package/dist/AnyoAvatarViewer.d.ts +4 -0
  9. package/dist/AnyoAvatarViewer.d.ts.map +1 -0
  10. package/dist/AnyoAvatarViewer.js +246 -0
  11. package/dist/AnyoAvatarViewer.js.map +1 -0
  12. package/dist/index.d.ts +11 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +10 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/injection.d.ts +6 -0
  17. package/dist/injection.d.ts.map +1 -0
  18. package/dist/injection.js +10 -0
  19. package/dist/injection.js.map +1 -0
  20. package/dist/plugin.d.ts +6 -0
  21. package/dist/plugin.d.ts.map +1 -0
  22. package/dist/plugin.js +16 -0
  23. package/dist/plugin.js.map +1 -0
  24. package/dist/presets.d.ts +4 -0
  25. package/dist/presets.d.ts.map +1 -0
  26. package/dist/presets.js +54 -0
  27. package/dist/presets.js.map +1 -0
  28. package/dist/scene.d.ts +42 -0
  29. package/dist/scene.d.ts.map +1 -0
  30. package/dist/scene.js +431 -0
  31. package/dist/scene.js.map +1 -0
  32. package/dist/source.d.ts +8 -0
  33. package/dist/source.d.ts.map +1 -0
  34. package/dist/source.js +53 -0
  35. package/dist/source.js.map +1 -0
  36. package/dist/style.css +68 -0
  37. package/dist/types.d.ts +252 -0
  38. package/dist/types.d.ts.map +1 -0
  39. package/dist/types.js +2 -0
  40. package/dist/types.js.map +1 -0
  41. package/dist/useAnyoAvatarViewer.d.ts +49 -0
  42. package/dist/useAnyoAvatarViewer.d.ts.map +1 -0
  43. package/dist/useAnyoAvatarViewer.js +454 -0
  44. package/dist/useAnyoAvatarViewer.js.map +1 -0
  45. package/docs/API.md +78 -0
  46. package/docs/HIGH-END-PROPS.md +63 -0
  47. package/docs/PRESETS.md +14 -0
  48. package/docs/README.md +9 -0
  49. package/package.json +72 -0
package/dist/scene.js ADDED
@@ -0,0 +1,431 @@
1
+ import { Mesh } from '@blcklab/sekai64';
2
+ import { AssetManager } from '@blcklab/sekai64/assets';
3
+ import { AnimationClip, AnimationTrack, SkinnedGeometry, createGltfAnimationAdapter, GLTF_ANIMATION_EXTENSION_ID, } from '@blcklab/sekai64/animation';
4
+ import { GltfLoader } from '@blcklab/sekai64/gltf';
5
+ import { createGltfClipImporter } from '@blcklab/anyo-avatar-viewer/browser';
6
+ /**
7
+ * Host-owned Sekai64 scene layer for non-avatar GLB/glTF assets.
8
+ *
9
+ * Avatar Viewer intentionally remains single-avatar. Props share the same scene,
10
+ * renderer, animation module and AssetManager but have independent ownership and playback.
11
+ * A shared AssetManager allows repeated URLs/textures to reuse Sekai64's cache.
12
+ */
13
+ export class AnyoSceneModelManager {
14
+ runtime;
15
+ hooks;
16
+ records = new Map();
17
+ assets = new AssetManager();
18
+ sequence = 0;
19
+ externalSequence = 0;
20
+ disposed = false;
21
+ constructor(runtime, hooks = {}) {
22
+ this.runtime = runtime;
23
+ this.hooks = hooks;
24
+ }
25
+ list() {
26
+ return Object.freeze([...this.records.values()].map(record => snapshot(record)));
27
+ }
28
+ async loadScene(config, options = {}) {
29
+ this.alive();
30
+ if (config.version !== undefined && config.version !== 1)
31
+ throw new Error(`Unsupported Anyo scene config version: ${String(config.version)}`);
32
+ if (options.replace ?? true)
33
+ this.clear();
34
+ for (const item of config.props ?? []) {
35
+ const merged = mergeSceneModelConfig(item, config.defaults);
36
+ await this.load(merged.src, merged);
37
+ }
38
+ return this.list();
39
+ }
40
+ async load(input, config = {}) {
41
+ this.alive();
42
+ const id = config.id?.trim() || `anyo-scene-model-${++this.sequence}`;
43
+ if (this.records.has(id))
44
+ throw new Error(`Scene model id is already in use: ${id}`);
45
+ const name = config.name?.trim() || (typeof input === 'string' ? nameFromUrl(input) : isFile(input) ? input.name.replace(/\.glb$/i, '') : nameFromUrl(input.url)) || id;
46
+ const load = normalizeLoadConfig(config.load);
47
+ const loadMode = load.mode ?? 'animated';
48
+ if (loadMode === 'static' && (config.animations?.length ?? 0) > 0) {
49
+ throw new Error(`Scene model "${id}" is configured as static but also declares animations. Use load.mode: "animated".`);
50
+ }
51
+ const loader = new GltfLoader(this.assets);
52
+ const prepared = await prepareModelInput(loader, input);
53
+ let node;
54
+ try {
55
+ const animationAdapter = loadMode === 'animated'
56
+ ? createGltfAnimationAdapter(this.runtime.animation, { createMixer: true })
57
+ : undefined;
58
+ node = await loader.loadNode(prepared.url, {
59
+ id,
60
+ name: config.name ?? prepared.name ?? id,
61
+ animation: animationAdapter,
62
+ animatedFallback: 'static-pose',
63
+ // Sekai64 disables batching when an animation adapter is attached. Make that
64
+ // explicit so high-detail static environments can opt into real instancing.
65
+ staticBatching: loadMode === 'static' ? (load.staticBatching ?? true) : false,
66
+ strict: load.strict,
67
+ retries: load.retries,
68
+ cache: load.cache,
69
+ headers: load.headers,
70
+ texture: load.texture,
71
+ draco: load.draco,
72
+ dracoDecoderPath: load.dracoDecoderPath,
73
+ onProgress: (progress) => this.hooks.onProgress?.(Object.freeze({
74
+ id,
75
+ name,
76
+ loaded: progress.loaded,
77
+ ...(progress.total === undefined ? {} : { total: progress.total }),
78
+ ...(progress.ratio === undefined ? {} : { ratio: progress.ratio }),
79
+ })),
80
+ onDiagnostic: (diagnostic) => this.hooks.onDiagnostic?.(Object.freeze({
81
+ id,
82
+ name,
83
+ severity: diagnostic.severity,
84
+ code: diagnostic.code,
85
+ message: diagnostic.message,
86
+ })),
87
+ });
88
+ applyTransform(node, config);
89
+ applyRenderConfig(node, config.render);
90
+ this.runtime.scene.add(node);
91
+ const embedded = loadMode === 'animated'
92
+ ? node.asset.getExtension(GLTF_ANIMATION_EXTENSION_ID)
93
+ : undefined;
94
+ const mixer = embedded?.mixer ?? this.runtime.animation.createMixer(node, embedded?.clips ?? []);
95
+ const record = {
96
+ id,
97
+ loader,
98
+ node,
99
+ mixer,
100
+ ownsMixer: !embedded?.mixer,
101
+ ownedExternalClips: [],
102
+ loadMode,
103
+ };
104
+ this.records.set(id, record);
105
+ for (const animation of config.animations ?? [])
106
+ await this.loadAnimation(id, animation);
107
+ return snapshot(record);
108
+ }
109
+ catch (error) {
110
+ node?.removeFromParent();
111
+ node?.dispose();
112
+ loader.dispose();
113
+ throw error;
114
+ }
115
+ finally {
116
+ prepared.dispose();
117
+ }
118
+ }
119
+ async loadAnimation(id, config) {
120
+ const record = this.require(id);
121
+ if (record.loadMode === 'static') {
122
+ throw new Error(`Scene model "${id}" was loaded in static mode. Reload it with load.mode: "animated" before adding animation.`);
123
+ }
124
+ if (config.src) {
125
+ const source = await prepareAnimationInput(config.src);
126
+ try {
127
+ if (source.source.format !== 'glb' && source.source.format !== 'gltf') {
128
+ throw new Error('Scene prop external animations support same-rig .glb/.gltf. VRMA belongs to the avatar viewer.');
129
+ }
130
+ const imported = await createGltfClipImporter().load({
131
+ source: source.source,
132
+ signal: new AbortController().signal,
133
+ targets: captureTargets(record.node),
134
+ });
135
+ for (const [index, clip] of imported.entries()) {
136
+ const owned = cloneClip(clip, `scene:${id}:external:${++this.externalSequence}:${index}`);
137
+ record.mixer.addClip(owned);
138
+ record.ownedExternalClips.push(owned);
139
+ clip.dispose();
140
+ }
141
+ }
142
+ finally {
143
+ source.dispose();
144
+ }
145
+ }
146
+ if (config.autoplay)
147
+ this.play(id, config.clip, config);
148
+ return snapshot(record);
149
+ }
150
+ play(id, clip, options = {}) {
151
+ const record = this.require(id);
152
+ if (record.loadMode === 'static')
153
+ throw new Error(`Scene model "${id}" is static and has no animation runtime.`);
154
+ const mixer = record.mixer;
155
+ if (mixer.clips.size === 0)
156
+ throw new Error(`Scene model "${id}" has no animation clips.`);
157
+ const resolved = resolveClip(mixer, clip);
158
+ mixer.stopAll();
159
+ record.currentAction = mixer.play(resolved, {
160
+ loop: options.loop ?? 'repeat',
161
+ speed: finiteOr(options.speed, 1, 'Animation speed'),
162
+ weight: finiteOr(options.weight, 1, 'Animation weight'),
163
+ });
164
+ return snapshot(record);
165
+ }
166
+ pause(id) { const record = this.require(id); record.currentAction?.pause(); return snapshot(record); }
167
+ resume(id) { const record = this.require(id); record.currentAction?.resume(); return snapshot(record); }
168
+ stop(id) { const record = this.require(id); record.mixer.stopAll(); record.currentAction = undefined; return snapshot(record); }
169
+ update(id, transform) {
170
+ const record = this.require(id);
171
+ applyTransform(record.node, transform);
172
+ return snapshot(record);
173
+ }
174
+ setVisible(id, visible) {
175
+ const record = this.require(id);
176
+ record.node.visible = visible;
177
+ return snapshot(record);
178
+ }
179
+ remove(id) {
180
+ const record = this.records.get(id);
181
+ if (!record)
182
+ return;
183
+ this.records.delete(id);
184
+ record.mixer.stopAll();
185
+ if (record.ownsMixer) {
186
+ this.runtime.animation.removeMixer(record.mixer);
187
+ record.mixer.clearListeners();
188
+ }
189
+ for (const clip of record.ownedExternalClips)
190
+ clip.dispose();
191
+ record.node.removeFromParent();
192
+ record.node.dispose();
193
+ record.loader.dispose();
194
+ }
195
+ clear() { for (const id of [...this.records.keys()])
196
+ this.remove(id); }
197
+ dispose() {
198
+ if (this.disposed)
199
+ return;
200
+ this.disposed = true;
201
+ this.clear();
202
+ this.assets.dispose();
203
+ }
204
+ require(id) {
205
+ this.alive();
206
+ const record = this.records.get(id);
207
+ if (!record)
208
+ throw new Error(`Unknown scene model: ${id}`);
209
+ return record;
210
+ }
211
+ alive() { if (this.disposed)
212
+ throw new Error('Scene model manager is disposed.'); }
213
+ }
214
+ export function mergeSceneModelConfig(item, defaults) {
215
+ if (!defaults)
216
+ return item;
217
+ return {
218
+ ...item,
219
+ load: mergeLoadConfig(defaults.load, item.load),
220
+ render: { ...defaults.render, ...item.render },
221
+ };
222
+ }
223
+ function mergeLoadConfig(defaults, local) {
224
+ if (!defaults)
225
+ return local;
226
+ if (!local)
227
+ return defaults;
228
+ return {
229
+ ...defaults,
230
+ ...local,
231
+ texture: { ...defaults.texture, ...local.texture },
232
+ };
233
+ }
234
+ function normalizeLoadConfig(load) {
235
+ const value = load ?? {};
236
+ if (value.retries !== undefined && (!Number.isInteger(value.retries) || value.retries < 0 || value.retries > 10)) {
237
+ throw new Error('Scene model load.retries must be an integer from 0 to 10.');
238
+ }
239
+ if (value.texture?.maxBytes !== undefined && (!Number.isFinite(value.texture.maxBytes) || value.texture.maxBytes <= 0)) {
240
+ throw new Error('Scene model texture.maxBytes must be greater than 0.');
241
+ }
242
+ if (value.texture?.maxDimension !== undefined && (!Number.isInteger(value.texture.maxDimension) || value.texture.maxDimension <= 0)) {
243
+ throw new Error('Scene model texture.maxDimension must be a positive integer.');
244
+ }
245
+ if (typeof value.staticBatching === 'object') {
246
+ const min = value.staticBatching.minInstances;
247
+ if (min !== undefined && (!Number.isInteger(min) || min < 2))
248
+ throw new Error('staticBatching.minInstances must be an integer >= 2.');
249
+ }
250
+ return value;
251
+ }
252
+ function applyRenderConfig(node, render) {
253
+ if (!render)
254
+ return;
255
+ node.traverse(child => {
256
+ if (!(child instanceof Mesh))
257
+ return;
258
+ if (render.castShadow !== undefined)
259
+ child.castShadow = render.castShadow;
260
+ if (render.receiveShadow !== undefined)
261
+ child.receiveShadow = render.receiveShadow;
262
+ });
263
+ }
264
+ function applyTransform(node, transform) {
265
+ if (transform.position)
266
+ node.position.set(...vec3(transform.position, 'Position'));
267
+ if (transform.rotation) {
268
+ const [x, y, z] = vec3(transform.rotation, 'Rotation');
269
+ node.rotation.set(x * Math.PI / 180, y * Math.PI / 180, z * Math.PI / 180);
270
+ }
271
+ if (transform.scale !== undefined) {
272
+ const value = typeof transform.scale === 'number'
273
+ ? [transform.scale, transform.scale, transform.scale]
274
+ : vec3(transform.scale, 'Scale');
275
+ if (value.some(entry => entry <= 0 || entry > 1000))
276
+ throw new Error('Scene model scale values must be greater than 0 and at most 1000.');
277
+ node.scale.set(...value);
278
+ }
279
+ if (transform.visible !== undefined)
280
+ node.visible = transform.visible;
281
+ }
282
+ function snapshot(record) {
283
+ const { node, mixer, currentAction } = record;
284
+ return Object.freeze({
285
+ id: record.id,
286
+ name: node.name || record.id,
287
+ visible: node.visible,
288
+ position: Object.freeze([node.position.x, node.position.y, node.position.z]),
289
+ rotation: Object.freeze([node.rotation.x * 180 / Math.PI, node.rotation.y * 180 / Math.PI, node.rotation.z * 180 / Math.PI]),
290
+ scale: Object.freeze([node.scale.x, node.scale.y, node.scale.z]),
291
+ clips: Object.freeze([...(mixer?.clips.values() ?? [])].map(clip => Object.freeze({ id: clip.id, name: clip.name, duration: clip.duration }))),
292
+ currentClip: currentAction?.clip.id ?? null,
293
+ playing: Boolean(currentAction && currentAction.enabled && !currentAction.paused && !currentAction.finished),
294
+ loadMode: record.loadMode,
295
+ });
296
+ }
297
+ function captureTargets(root) {
298
+ root.updateWorldFromRoot();
299
+ const nodes = [];
300
+ root.traverse(node => { if (node !== root)
301
+ nodes.push(node); });
302
+ return Object.freeze(nodes.map(node => Object.freeze({
303
+ id: node.id,
304
+ name: node.name,
305
+ restMatrix: Object.freeze(Array.from(node.localMatrix.elements)),
306
+ parentId: node.parent === root ? null : node.parent?.id ?? null,
307
+ morphNames: Object.freeze(node instanceof Mesh && node.geometry instanceof SkinnedGeometry
308
+ ? node.geometry.morphTargets.map(target => target.name)
309
+ : []),
310
+ })));
311
+ }
312
+ function cloneClip(clip, id) {
313
+ return new AnimationClip({
314
+ id,
315
+ name: clip.name,
316
+ duration: clip.duration,
317
+ markers: clip.markers,
318
+ tracks: clip.tracks.map(track => new AnimationTrack({
319
+ target: track.target,
320
+ path: track.path,
321
+ times: track.times.slice(),
322
+ values: track.values.slice(),
323
+ interpolation: track.interpolation,
324
+ valueSize: track.valueSize,
325
+ })),
326
+ });
327
+ }
328
+ function resolveClip(mixer, value) {
329
+ const clips = [...mixer.clips.values()];
330
+ if (typeof value === 'number') {
331
+ const clip = clips[value];
332
+ if (!clip)
333
+ throw new Error(`Scene animation clip index is out of range: ${value}`);
334
+ return clip;
335
+ }
336
+ if (typeof value === 'string' && value) {
337
+ const clip = mixer.clips.get(value) ?? clips.find(candidate => candidate.name === value);
338
+ if (!clip)
339
+ throw new Error(`Unknown scene animation clip: ${value}`);
340
+ return clip;
341
+ }
342
+ const clip = clips[0];
343
+ if (!clip)
344
+ throw new Error('Scene model has no animation clips.');
345
+ return clip;
346
+ }
347
+ async function prepareModelInput(loader, input) {
348
+ if (typeof input === 'string')
349
+ return prepareSceneUrl(loader, input, inferModelFormat(input), nameFromUrl(input));
350
+ if (isFile(input)) {
351
+ if (!input.name.toLowerCase().endsWith('.glb'))
352
+ throw new Error('Local scene models must be self-contained .glb files. Use a URL for .gltf with sidecar resources.');
353
+ const real = URL.createObjectURL(input);
354
+ const virtual = nextVirtualSceneUrl('glb');
355
+ const removeResolver = loader.assets.addResolver({
356
+ canResolve: candidate => candidate.href === virtual.href,
357
+ fetch: (_candidate, options) => fetch(real, { signal: options.signal, headers: options.headers }),
358
+ });
359
+ return { url: virtual.href, name: input.name.replace(/\.glb$/i, ''), dispose: () => { removeResolver(); URL.revokeObjectURL(real); } };
360
+ }
361
+ if (input.format !== 'glb' && input.format !== 'gltf')
362
+ throw new Error('Scene models support .glb and .gltf only.');
363
+ return prepareSceneUrl(loader, input.url, input.format, nameFromUrl(input.url));
364
+ }
365
+ function prepareSceneUrl(loader, source, format, name) {
366
+ const real = new URL(source, typeof location === 'undefined' ? 'file:///' : location.href);
367
+ if (real.pathname.toLowerCase().endsWith(`.${format}`))
368
+ return { url: real.href, name, dispose: () => { } };
369
+ const virtual = nextVirtualSceneUrl(format);
370
+ const removeResolver = loader.assets.addResolver({
371
+ canResolve: candidate => candidate.href === virtual.href,
372
+ fetch: (_candidate, options) => fetch(real, { signal: options.signal, headers: options.headers }),
373
+ });
374
+ return { url: virtual.href, name, dispose: removeResolver };
375
+ }
376
+ function inferModelFormat(value) {
377
+ const path = value.split(/[?#]/, 1)[0]?.toLowerCase() ?? '';
378
+ if (path.endsWith('.gltf'))
379
+ return 'gltf';
380
+ if (path.endsWith('.glb'))
381
+ return 'glb';
382
+ throw new Error('Scene model URL must end in .glb or .gltf.');
383
+ }
384
+ async function prepareAnimationInput(input) {
385
+ if (typeof input === 'string')
386
+ return { source: { url: input, format: inferAnimationFormat(input) }, dispose: () => { } };
387
+ if (isFile(input)) {
388
+ const format = inferAnimationFormat(input.name);
389
+ if (format === 'gltf')
390
+ throw new Error('Local scene animation files must be self-contained .glb. Use a URL for .gltf with sidecar resources.');
391
+ const url = URL.createObjectURL(input);
392
+ return { source: { url, format }, dispose: () => URL.revokeObjectURL(url) };
393
+ }
394
+ return { source: input, dispose: () => { } };
395
+ }
396
+ function inferAnimationFormat(value) {
397
+ const path = value.split(/[?#]/, 1)[0]?.toLowerCase() ?? '';
398
+ if (path.endsWith('.gltf'))
399
+ return 'gltf';
400
+ if (path.endsWith('.glb'))
401
+ return 'glb';
402
+ if (path.endsWith('.vrma'))
403
+ return 'vrma';
404
+ throw new Error('Scene animation source must end in .glb or .gltf.');
405
+ }
406
+ let virtualSceneSourceSequence = 0;
407
+ function nextVirtualSceneUrl(format) {
408
+ return new URL(`https://anyo-avatar-vue.invalid/scene-model-${++virtualSceneSourceSequence}.${format}`);
409
+ }
410
+ function nameFromUrl(value) {
411
+ const path = value.split(/[?#]/, 1)[0] ?? '';
412
+ try {
413
+ return decodeURIComponent(path.split('/').pop() || 'Scene model').replace(/\.(?:glb|gltf)$/i, '');
414
+ }
415
+ catch {
416
+ return 'Scene model';
417
+ }
418
+ }
419
+ function isFile(value) { return typeof File !== 'undefined' && value instanceof File; }
420
+ function vec3(value, label) {
421
+ if (value.length !== 3 || value.some(entry => !Number.isFinite(entry)))
422
+ throw new Error(`${label} must contain three finite numbers.`);
423
+ return [value[0], value[1], value[2]];
424
+ }
425
+ function finiteOr(value, fallback, label) {
426
+ const resolved = value ?? fallback;
427
+ if (!Number.isFinite(resolved))
428
+ throw new Error(`${label} must be finite.`);
429
+ return resolved;
430
+ }
431
+ //# sourceMappingURL=scene.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene.js","sourceRoot":"","sources":["../src/scene.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAa,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAsB,MAAM,yBAAyB,CAAA;AAC1E,OAAO,EACL,aAAa,EACb,cAAc,EACd,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,GAI5B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,UAAU,EAA2C,MAAM,uBAAuB,CAAA;AAC3F,OAAO,EAAE,sBAAsB,EAAmB,MAAM,qCAAqC,CAAA;AAgC7F;;;;;;GAMG;AACH,MAAM,OAAO,qBAAqB;IAQb;IACA;IARF,OAAO,GAAG,IAAI,GAAG,EAAuB,CAAA;IACxC,MAAM,GAAG,IAAI,YAAY,EAAE,CAAA;IACpC,QAAQ,GAAG,CAAC,CAAA;IACZ,gBAAgB,GAAG,CAAC,CAAA;IACpB,QAAQ,GAAG,KAAK,CAAA;IAExB,YACmB,OAA0B,EAC1B,QAAsC,EAAE;QADxC,YAAO,GAAP,OAAO,CAAmB;QAC1B,UAAK,GAAL,KAAK,CAAmC;IACxD,CAAC;IAEJ,IAAI;QACF,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IAClF,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,MAAuB,EAAE,UAA4B,EAAE;QACrE,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,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,CAAC,KAAc,IAAmB,OAAO,OAAO,IAAI,KAAK,WAAW,IAAI,KAAK,YAAY,IAAI,CAAA,CAAC,CAAC;AAC9G,SAAS,IAAI,CAAC,KAAiB,EAAE,KAAa;IAC5C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qCAAqC,CAAC,CAAA;IACtI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AACvC,CAAC;AACD,SAAS,QAAQ,CAAC,KAAyB,EAAE,QAAgB,EAAE,KAAa;IAC1E,MAAM,QAAQ,GAAG,KAAK,IAAI,QAAQ,CAAA;IAClC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,kBAAkB,CAAC,CAAA;IAC3E,OAAO,QAAQ,CAAA;AACjB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { AnimationSource, ModelSource } from '@blcklab/anyo-avatar-viewer';
2
+ import type { AnyoAvatarAnimationInput, AnyoAvatarModelInput } from './types.js';
3
+ export declare function isBrowserFile(value: unknown): value is File;
4
+ export declare function inferModelFormat(name: string): ModelSource['format'];
5
+ export declare function inferAnimationFormat(name: string): string;
6
+ export declare function withModelSource<T>(input: AnyoAvatarModelInput, run: (source: ModelSource) => Promise<T>): Promise<T>;
7
+ export declare function withAnimationSource<T>(input: AnyoAvatarAnimationInput, run: (source: AnimationSource) => Promise<T>): Promise<T>;
8
+ //# sourceMappingURL=source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEhF,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAE3D;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,CAMpE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMzD;AAED,wBAAsB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAQ1H;AAED,wBAAsB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAQtI"}
package/dist/source.js ADDED
@@ -0,0 +1,53 @@
1
+ export function isBrowserFile(value) {
2
+ return typeof File !== 'undefined' && value instanceof File;
3
+ }
4
+ export function inferModelFormat(name) {
5
+ const clean = stripQuery(name).toLowerCase();
6
+ if (clean.endsWith('.vrm'))
7
+ return 'vrm';
8
+ if (clean.endsWith('.gltf'))
9
+ return 'gltf';
10
+ if (clean.endsWith('.glb'))
11
+ return 'glb';
12
+ throw new Error('Avatar model must be .vrm, .glb, or .gltf.');
13
+ }
14
+ export function inferAnimationFormat(name) {
15
+ const clean = stripQuery(name).toLowerCase();
16
+ if (clean.endsWith('.vrma'))
17
+ return 'vrma';
18
+ if (clean.endsWith('.gltf'))
19
+ return 'gltf';
20
+ if (clean.endsWith('.glb'))
21
+ return 'glb';
22
+ throw new Error('Animation must be .vrma, .glb, or .gltf.');
23
+ }
24
+ export async function withModelSource(input, run) {
25
+ if (typeof input === 'string')
26
+ return run({ url: input, format: inferModelFormat(input) });
27
+ if (isBrowserFile(input)) {
28
+ const url = URL.createObjectURL(input);
29
+ try {
30
+ return await run({ url, format: inferModelFormat(input.name) });
31
+ }
32
+ finally {
33
+ URL.revokeObjectURL(url);
34
+ }
35
+ }
36
+ return run(input);
37
+ }
38
+ export async function withAnimationSource(input, run) {
39
+ if (typeof input === 'string')
40
+ return run({ url: input, format: inferAnimationFormat(input) });
41
+ if (isBrowserFile(input)) {
42
+ const url = URL.createObjectURL(input);
43
+ try {
44
+ return await run({ url, format: inferAnimationFormat(input.name) });
45
+ }
46
+ finally {
47
+ URL.revokeObjectURL(url);
48
+ }
49
+ }
50
+ return run(input);
51
+ }
52
+ function stripQuery(value) { return value.split(/[?#]/, 1)[0] ?? value; }
53
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,OAAO,IAAI,KAAK,WAAW,IAAI,KAAK,YAAY,IAAI,CAAA;AAC7D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAA;IAC5C,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,KAAK,CAAA;IACxC,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,OAAO,MAAM,CAAA;IAC1C,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,KAAK,CAAA;IACxC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAA;AAC/D,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,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;QACtC,IAAI,CAAC;YAAC,OAAO,MAAM,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAAC,CAAC;gBACnE,CAAC;YAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;QAAC,CAAC;IACtC,CAAC;IACD,OAAO,GAAG,CAAC,KAAK,CAAC,CAAA;AACnB,CAAC;AAED,SAAS,UAAU,CAAC,KAAa,IAAY,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAA,CAAC,CAAC"}
package/dist/style.css ADDED
@@ -0,0 +1,68 @@
1
+ .anyo-avatar-viewer {
2
+ position: relative;
3
+ isolation: isolate;
4
+ width: 100%;
5
+ overflow: hidden;
6
+ border-radius: 18px;
7
+ background: #0a0c10;
8
+ color: #f7f8fb;
9
+ outline: none;
10
+ }
11
+ .anyo-avatar-viewer--portfolio, .anyo-avatar-viewer.is-transparent { background: transparent; }
12
+ .anyo-avatar-viewer:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.22); }
13
+ .anyo-avatar-viewer__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
14
+ .anyo-avatar-viewer__status {
15
+ position: absolute; z-index: 8; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 7px;
16
+ max-width: calc(100% - 24px); padding: 6px 9px; overflow: hidden; border: 1px solid rgba(255,255,255,.08);
17
+ border-radius: 999px; background: rgba(8,10,14,.58); color: rgba(255,255,255,.56); font: 600 10px/1.1 ui-sans-serif, system-ui, sans-serif;
18
+ white-space: nowrap; text-overflow: ellipsis; backdrop-filter: blur(14px);
19
+ }
20
+ .anyo-avatar-viewer__status.is-error { color: #ffd1d1; border-color: rgba(255,110,110,.18); }
21
+ .anyo-avatar-viewer__dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; opacity: .75; }
22
+ .anyo-avatar-controls { position: absolute; z-index: 12; left: 50%; bottom: 14px; transform: translateX(-50%); font-family: ui-sans-serif, system-ui, sans-serif; }
23
+ .anyo-avatar-control-bar {
24
+ display: flex; align-items: center; gap: 4px; padding: 6px; border: 1px solid rgba(255,255,255,.11); border-radius: 14px;
25
+ background: rgba(8,10,14,.74); box-shadow: 0 18px 48px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.04);
26
+ backdrop-filter: blur(20px) saturate(150%);
27
+ }
28
+ .anyo-avatar-control-button {
29
+ min-width: 34px; height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: rgba(255,255,255,.76);
30
+ font: 750 10px/1 ui-sans-serif, system-ui, sans-serif; cursor: pointer; transition: background .14s ease, color .14s ease, transform .14s ease;
31
+ }
32
+ .anyo-avatar-control-button:hover:not(:disabled), .anyo-avatar-control-button:focus-visible { background: rgba(255,255,255,.09); color: #fff; outline: none; }
33
+ .anyo-avatar-control-button:active:not(:disabled) { transform: translateY(1px); }
34
+ .anyo-avatar-control-button:disabled { opacity: .34; cursor: default; }
35
+ .anyo-avatar-more-panel {
36
+ position: absolute; left: 50%; bottom: 50px; width: min(390px, calc(100vw - 24px)); max-height: min(640px, calc(100vh - 120px));
37
+ padding: 12px; overflow: auto; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.11); border-radius: 17px;
38
+ background: rgba(8,10,14,.92); box-shadow: 0 30px 80px rgba(0,0,0,.52), inset 0 1px rgba(255,255,255,.05); backdrop-filter: blur(26px) saturate(150%);
39
+ scrollbar-width: thin;
40
+ }
41
+ .anyo-avatar-control-section { display: grid; gap: 8px; padding: 10px 2px; border-top: 1px solid rgba(255,255,255,.07); }
42
+ .anyo-avatar-control-section:first-child { border-top: 0; padding-top: 2px; }
43
+ .anyo-avatar-control-label { color: rgba(255,255,255,.38); font: 800 8px/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
44
+ .anyo-avatar-grid { display: grid; gap: 6px; }
45
+ .anyo-avatar-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
46
+ .anyo-avatar-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
47
+ .anyo-avatar-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
48
+ .anyo-avatar-grid .anyo-avatar-control-button { width: 100%; background: rgba(255,255,255,.035); }
49
+ .anyo-avatar-field { display: grid; gap: 5px; min-width: 0; color: rgba(255,255,255,.54); font: 650 9px/1.25 ui-sans-serif, system-ui, sans-serif; }
50
+ .anyo-avatar-field input[type='range'] { width: 100%; accent-color: #fff; }
51
+ .anyo-avatar-field input[type='number'], .anyo-avatar-select {
52
+ width: 100%; min-width: 0; height: 34px; padding: 0 8px; border: 1px solid rgba(255,255,255,.09); border-radius: 9px;
53
+ outline: none; background: rgba(255,255,255,.05); color: #fff; font: 600 10px/1 ui-sans-serif, system-ui, sans-serif;
54
+ }
55
+ .anyo-avatar-select option { color: #111; }
56
+ .anyo-avatar-field input[type='color'] { width: 100%; height: 34px; padding: 3px; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; background: rgba(255,255,255,.05); }
57
+ .anyo-avatar-check { display: flex; align-items: center; gap: 7px; min-height: 34px; color: rgba(255,255,255,.58); font: 650 9px/1 ui-sans-serif, system-ui, sans-serif; }
58
+ .anyo-avatar-check input { accent-color: #fff; }
59
+ .anyo-avatar-runtime-line { display: flex; justify-content: space-between; gap: 12px; color: rgba(255,255,255,.46); font: 600 9px/1.2 ui-sans-serif, system-ui, sans-serif; }
60
+ .anyo-avatar-runtime-line strong { color: rgba(255,255,255,.82); }
61
+ .anyo-avatar-muted { margin: 0; color: rgba(255,255,255,.4); font: 500 9px/1.5 ui-sans-serif, system-ui, sans-serif; }
62
+ @media (max-width: 620px) {
63
+ .anyo-avatar-controls { left: 8px; right: 8px; transform: none; }
64
+ .anyo-avatar-control-bar { justify-content: center; width: 100%; overflow-x: auto; }
65
+ .anyo-avatar-more-panel { left: auto; right: 0; width: min(390px, calc(100vw - 16px)); transform: none; }
66
+ .anyo-avatar-control-button { padding-inline: 8px; }
67
+ .anyo-avatar-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
68
+ }