@tresjs/cientos 5.0.0-alpha.0 → 5.0.0-alpha.1
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.
|
@@ -9,9 +9,11 @@ import { MaybeRef } from 'vue';
|
|
|
9
9
|
* @param {(Scene | Ref<Object3D | undefined | null>)} [modelRef]
|
|
10
10
|
* @return {*}
|
|
11
11
|
*/
|
|
12
|
-
export declare function useAnimations<T extends AnimationClip>(animations: MaybeRef<T[]>, modelRef?: MaybeRef<Object3D | undefined | null
|
|
12
|
+
export declare function useAnimations<T extends AnimationClip>(animations: MaybeRef<T[]>, modelRef?: MaybeRef<Object3D | undefined | null>, options?: {
|
|
13
|
+
manualUpdate?: boolean;
|
|
14
|
+
}): {
|
|
13
15
|
actions: import('vue').ShallowReactive<{
|
|
14
16
|
[key: string]: AnimationAction | undefined;
|
|
15
17
|
}>;
|
|
16
|
-
mixer: AnimationMixer
|
|
18
|
+
mixer: import('vue').ComputedRef<AnimationMixer>;
|
|
17
19
|
};
|
package/dist/trescientos.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/cientos
|
|
3
|
-
* version: v5.0.0-alpha.
|
|
3
|
+
* version: v5.0.0-alpha.1
|
|
4
4
|
* (c) 2025
|
|
5
5
|
* description: Collection of useful helpers and fully functional, ready-made abstractions for Tres
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
@@ -15260,23 +15260,25 @@ const HM = ["object"], fk = /* @__PURE__ */ _e({
|
|
|
15260
15260
|
], 512)) : ps("", !0);
|
|
15261
15261
|
}
|
|
15262
15262
|
});
|
|
15263
|
-
function Tk(a, e) {
|
|
15264
|
-
const
|
|
15263
|
+
function Tk(a, e, t) {
|
|
15264
|
+
const s = Be(e), i = Ce(() => new Nb(s.value)), n = L1({}), r = () => {
|
|
15265
15265
|
const o = U(a);
|
|
15266
|
-
o && o.length > 0 && (Object.keys(
|
|
15267
|
-
const c =
|
|
15268
|
-
|
|
15266
|
+
o && o.length > 0 && (Object.keys(n).forEach((l) => delete n[l]), o.forEach((l) => {
|
|
15267
|
+
const c = i.value.clipAction(l, s.value);
|
|
15268
|
+
n[l.name] = c;
|
|
15269
15269
|
}));
|
|
15270
15270
|
};
|
|
15271
|
-
re(a,
|
|
15272
|
-
o && (
|
|
15273
|
-
})
|
|
15274
|
-
|
|
15275
|
-
|
|
15276
|
-
|
|
15277
|
-
|
|
15278
|
-
|
|
15279
|
-
|
|
15271
|
+
if (re(a, r, { deep: !0, immediate: !0 }), re(s, (o) => {
|
|
15272
|
+
o && (i.value.uncacheRoot(s.value), r());
|
|
15273
|
+
}), !t?.manualUpdate) {
|
|
15274
|
+
const { onBeforeRender: o } = ot();
|
|
15275
|
+
o(({ delta: l }) => {
|
|
15276
|
+
i.value.update(l);
|
|
15277
|
+
});
|
|
15278
|
+
}
|
|
15279
|
+
return {
|
|
15280
|
+
actions: n,
|
|
15281
|
+
mixer: i
|
|
15280
15282
|
};
|
|
15281
15283
|
}
|
|
15282
15284
|
function wk(a, e = !1) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tresjs/cientos",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.0-alpha.
|
|
4
|
+
"version": "5.0.0-alpha.1",
|
|
5
5
|
"packageManager": "pnpm@10.11.0",
|
|
6
6
|
"description": "Collection of useful helpers and fully functional, ready-made abstractions for Tres",
|
|
7
7
|
"author": "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)",
|