@aura3d/animation 4.0.0 → 4.0.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aura3d/animation",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aura3d/math": "4.0.
|
|
27
|
+
"@aura3d/math": "4.0.2"
|
|
28
28
|
},
|
|
29
29
|
"description": "Deterministic animation clips, mixers, root motion, skeleton palettes, blend trees, state machines, and scene/ECS animation bridges for Aura3D.",
|
|
30
30
|
"keywords": [
|
package/dist/CrowdAnimation.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface CrowdAnimationAgent {
|
|
2
|
-
readonly id: string;
|
|
3
|
-
readonly clip: string;
|
|
4
|
-
readonly phase: number;
|
|
5
|
-
readonly speed: number;
|
|
6
|
-
}
|
|
7
|
-
export interface CrowdAnimationSample {
|
|
8
|
-
readonly id: string;
|
|
9
|
-
readonly clip: string;
|
|
10
|
-
readonly time: number;
|
|
11
|
-
}
|
|
12
|
-
export declare function sampleCrowdAnimation(agents: readonly CrowdAnimationAgent[], elapsedSeconds: number): readonly CrowdAnimationSample[];
|
|
13
|
-
//# sourceMappingURL=CrowdAnimation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CrowdAnimation.d.ts","sourceRoot":"","sources":["../../../../packages/animation/src/CrowdAnimation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,EAAE,cAAc,EAAE,MAAM,GAAG,SAAS,oBAAoB,EAAE,CAWpI"}
|
package/dist/CrowdAnimation.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export function sampleCrowdAnimation(agents, elapsedSeconds) {
|
|
2
|
-
if (!Number.isFinite(elapsedSeconds) || elapsedSeconds < 0) {
|
|
3
|
-
throw new Error("Crowd animation elapsedSeconds must be finite and non-negative.");
|
|
4
|
-
}
|
|
5
|
-
return agents.map((agent) => {
|
|
6
|
-
if (!agent.id.trim() || !agent.clip.trim())
|
|
7
|
-
throw new Error("Crowd animation agents require id and clip.");
|
|
8
|
-
if (!Number.isFinite(agent.phase) || !Number.isFinite(agent.speed) || agent.speed < 0) {
|
|
9
|
-
throw new Error(`Crowd animation agent ${agent.id} has invalid phase or speed.`);
|
|
10
|
-
}
|
|
11
|
-
return { id: agent.id, clip: agent.clip, time: agent.phase + elapsedSeconds * agent.speed };
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=CrowdAnimation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CrowdAnimation.js","sourceRoot":"","sources":["../../../../packages/animation/src/CrowdAnimation.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,oBAAoB,CAAC,MAAsC,EAAE,cAAsB;IACjG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,cAAc,GAAG,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IACrF,CAAC;IACD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC1B,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QAC3G,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC;YACtF,MAAM,IAAI,KAAK,CAAC,yBAAyB,KAAK,CAAC,EAAE,8BAA8B,CAAC,CAAC;QACnF,CAAC;QACD,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,GAAG,cAAc,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;IAC9F,CAAC,CAAC,CAAC;AACL,CAAC"}
|