@forgeax/engine-geometry 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/LICENSE +202 -0
- package/README.md +215 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/__tests__/asset-owner.unit.test.d.ts +2 -0
- package/dist/__tests__/asset-owner.unit.test.d.ts.map +1 -0
- package/dist/__tests__/dim2.test.d.ts +2 -0
- package/dist/__tests__/dim2.test.d.ts.map +1 -0
- package/dist/__tests__/geometry.unit.test.d.ts +2 -0
- package/dist/__tests__/geometry.unit.test.d.ts.map +1 -0
- package/dist/__tests__/vertex-attribute-layout-owner.unit.test.d.ts +2 -0
- package/dist/__tests__/vertex-attribute-layout-owner.unit.test.d.ts.map +1 -0
- package/dist/assets/mesh-binary.d.ts +4 -0
- package/dist/assets/mesh-binary.d.ts.map +1 -0
- package/dist/assets/mesh-decoder.d.ts +6 -0
- package/dist/assets/mesh-decoder.d.ts.map +1 -0
- package/dist/assets/primitive-mesh.d.ts +5 -0
- package/dist/assets/primitive-mesh.d.ts.map +1 -0
- package/dist/box.d.ts +41 -0
- package/dist/box.d.ts.map +1 -0
- package/dist/capsule.d.ts +14 -0
- package/dist/capsule.d.ts.map +1 -0
- package/dist/cone.d.ts +4 -0
- package/dist/cone.d.ts.map +1 -0
- package/dist/cylinder.d.ts +4 -0
- package/dist/cylinder.d.ts.map +1 -0
- package/dist/dim2.d.ts +73 -0
- package/dist/dim2.d.ts.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +2000 -0
- package/dist/index.mjs.map +1 -0
- package/dist/plane.d.ts +4 -0
- package/dist/plane.d.ts.map +1 -0
- package/dist/sphere.d.ts +4 -0
- package/dist/sphere.d.ts.map +1 -0
- package/dist/tangent.d.ts +34 -0
- package/dist/tangent.d.ts.map +1 -0
- package/dist/torus.d.ts +4 -0
- package/dist/torus.d.ts.map +1 -0
- package/dist/vertex-attribute-layout.d.ts +90 -0
- package/dist/vertex-attribute-layout.d.ts.map +1 -0
- package/package.json +59 -0
- package/src/__tests__/asset-owner.unit.test.ts +97 -0
- package/src/__tests__/dim2.test.ts +132 -0
- package/src/__tests__/geometry.unit.test.ts +1223 -0
- package/src/__tests__/vertex-attribute-layout-owner.unit.test.ts +181 -0
- package/src/assets/mesh-binary.ts +421 -0
- package/src/assets/mesh-decoder.ts +97 -0
- package/src/assets/primitive-mesh.ts +36 -0
- package/src/box.ts +437 -0
- package/src/capsule.ts +145 -0
- package/src/cone.ts +26 -0
- package/src/cylinder.ts +180 -0
- package/src/dim2.ts +505 -0
- package/src/index.ts +52 -0
- package/src/plane.ts +78 -0
- package/src/sphere.ts +82 -0
- package/src/tangent.ts +320 -0
- package/src/torus.ts +83 -0
- package/src/vertex-attribute-layout.ts +503 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type AssetDecoder, type AssetDecoderContribution, type AssetKind, type MeshAsset } from '@forgeax/engine-types';
|
|
2
|
+
export declare const meshAssetKind: AssetKind<MeshAsset, 'mesh'>;
|
|
3
|
+
/** Geometry validates mesh payload shape before any render owner consumes it. */
|
|
4
|
+
export declare const meshAssetDecoder: AssetDecoder<MeshAsset>;
|
|
5
|
+
export declare const meshAssetContribution: AssetDecoderContribution<MeshAsset, 'mesh'>;
|
|
6
|
+
//# sourceMappingURL=mesh-decoder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mesh-decoder.d.ts","sourceRoot":"","sources":["../../src/assets/mesh-decoder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,SAAS,EAGd,KAAK,SAAS,EAGf,MAAM,uBAAuB,CAAC;AAI/B,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,SAAS,EAAE,MAAM,CAEtB,CAAC;AA2BlC,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,SAAS,CA+CpD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,wBAAwB,CAAC,SAAS,EAAE,MAAM,CAI7E,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AssetError, MeshAsset, Result } from '@forgeax/engine-types';
|
|
2
|
+
export type PrimitiveMeshKind = 'cube' | 'triangle' | 'quad' | 'sphere' | 'cylinder' | 'nine-slice-quad';
|
|
3
|
+
/** Create one ordinary mesh payload for allocation or interning by an owning World. */
|
|
4
|
+
export declare function createPrimitiveMesh(kind: PrimitiveMeshKind): Result<MeshAsset, AssetError>;
|
|
5
|
+
//# sourceMappingURL=primitive-mesh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitive-mesh.d.ts","sourceRoot":"","sources":["../../src/assets/primitive-mesh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAM3E,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,UAAU,GACV,MAAM,GACN,QAAQ,GACR,UAAU,GACV,iBAAiB,CAAC;AAEtB,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAoB1F"}
|
package/dist/box.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AssetError, type MeshAsset, type Result } from '@forgeax/engine-types';
|
|
2
|
+
/**
|
|
3
|
+
* Floats per vertex for the procedural-geometry interleaved buffer that the
|
|
4
|
+
* factory bodies fill in (position(3) + normal(3) + uv(2)). The
|
|
5
|
+
* `meshFromInterleaved` helper expands this into the runtime 12-float
|
|
6
|
+
* (position + normal + uv + tangent) layout consumed by the standard
|
|
7
|
+
* pipeline (feat-20260518 M4 D-10).
|
|
8
|
+
*/
|
|
9
|
+
export declare const FACTORY_FLOATS_PER_VERTEX = 8;
|
|
10
|
+
/**
|
|
11
|
+
* Floats per vertex emitted by the factories' final MeshAsset
|
|
12
|
+
* `vertices` Float32Array buffer: position(3) + normal(3) + uv(2) +
|
|
13
|
+
* tangent(4) = 12. Procedural meshes feed both the standard and unlit
|
|
14
|
+
* pipelines (D-10); BUILTIN_CUBE / TRIANGLE keep their 6-floats inline
|
|
15
|
+
* shape (D-2 lock).
|
|
16
|
+
*/
|
|
17
|
+
export declare const PROCEDURAL_FLOATS_PER_VERTEX = 12;
|
|
18
|
+
/**
|
|
19
|
+
* Shared helper: build MeshAsset POD from the factory-emitted 8-floats
|
|
20
|
+
* interleaved buffer (position + normal + uv) plus index list. Computes
|
|
21
|
+
* per-vertex tangent (vec4) via `computeTangentVec4` (M4 / D-2 path A) and
|
|
22
|
+
* expands the buffer to the runtime 12-floats stride (position + normal +
|
|
23
|
+
* uv + tangent). All six procedural factories funnel through this helper
|
|
24
|
+
* so the tangent SSOT lives in `geometry/tangent.ts` (D-7).
|
|
25
|
+
*/
|
|
26
|
+
export declare function meshFromInterleaved(vertices: Float32Array, indices: Uint16Array | Uint32Array): Result<MeshAsset, AssetError>;
|
|
27
|
+
/** Shared helper: AssetError for degenerate geometry parameters. */
|
|
28
|
+
export declare function degenerate(detail: string): AssetError;
|
|
29
|
+
/**
|
|
30
|
+
* Build a procedural box geometry aligned with Three.js r184 BoxGeometry.
|
|
31
|
+
*
|
|
32
|
+
* @param width positive X-axis extent
|
|
33
|
+
* @param height positive Y-axis extent
|
|
34
|
+
* @param depth positive Z-axis extent
|
|
35
|
+
* @param widthSegments >= 1 subdivisions along X
|
|
36
|
+
* @param heightSegments >= 1 subdivisions along Y
|
|
37
|
+
* @param depthSegments >= 1 subdivisions along Z
|
|
38
|
+
* @returns `Result<MeshAsset, AssetError>` with attributes populated
|
|
39
|
+
*/
|
|
40
|
+
export declare function createBoxGeometry(width: number, height: number, depth: number, widthSegments?: number, heightSegments?: number, depthSegments?: number): Result<MeshAsset, AssetError>;
|
|
41
|
+
//# sourceMappingURL=box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../src/box.ts"],"names":[],"mappings":"AAqBA,OAAO,EAEL,UAAU,EAEV,KAAK,SAAS,EAEd,KAAK,MAAM,EAEZ,MAAM,uBAAuB,CAAC;AAI/B;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAsD/C;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,WAAW,GAAG,WAAW,GACjC,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CA0F/B;AAED,oEAAoE;AACpE,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAMrD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,aAAa,GAAE,MAAU,EACzB,cAAc,GAAE,MAAU,EAC1B,aAAa,GAAE,MAAU,GACxB,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CA2M/B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AssetError, MeshAsset } from '@forgeax/engine-types';
|
|
2
|
+
import { type Result } from '@forgeax/engine-types';
|
|
3
|
+
/**
|
|
4
|
+
* Build a procedural capsule geometry aligned with Bevy `Capsule3d` /
|
|
5
|
+
* Three.js r184 CapsuleGeometry.
|
|
6
|
+
*
|
|
7
|
+
* @param radius hemisphere + cylinder radius (> 0)
|
|
8
|
+
* @param length cylinder mid-section height (>= 0; total height = length + 2*radius)
|
|
9
|
+
* @param capSegments latitude bands per hemisphere (>= 1); default 4
|
|
10
|
+
* @param radialSegments longitudes around the axis (>= 3); default 8
|
|
11
|
+
* @returns `Result<MeshAsset, AssetError>` with attributes populated
|
|
12
|
+
*/
|
|
13
|
+
export declare function createCapsuleGeometry(radius: number, length: number, capSegments?: number, radialSegments?: number): Result<MeshAsset, AssetError>;
|
|
14
|
+
//# sourceMappingURL=capsule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capsule.d.ts","sourceRoot":"","sources":["../src/capsule.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAO,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGzD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,WAAW,GAAE,MAAU,EACvB,cAAc,GAAE,MAAU,GACzB,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAuG/B"}
|
package/dist/cone.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AssetError, MeshAsset } from '@forgeax/engine-types';
|
|
2
|
+
import { type Result } from '@forgeax/engine-types';
|
|
3
|
+
export declare function createConeGeometry(radius: number, height: number, radialSegments?: number, heightSegments?: number): Result<MeshAsset, AssetError>;
|
|
4
|
+
//# sourceMappingURL=cone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cone.d.ts","sourceRoot":"","sources":["../src/cone.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAO,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAIzD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,cAAc,GAAE,MAAW,EAC3B,cAAc,GAAE,MAAU,GACzB,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAI/B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AssetError, MeshAsset } from '@forgeax/engine-types';
|
|
2
|
+
import { type Result } from '@forgeax/engine-types';
|
|
3
|
+
export declare function createCylinderGeometry(radiusTop: number, radiusBottom: number, height: number, radialSegments?: number, heightSegments?: number): Result<MeshAsset, AssetError>;
|
|
4
|
+
//# sourceMappingURL=cylinder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cylinder.d.ts","sourceRoot":"","sources":["../src/cylinder.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAO,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGzD,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,cAAc,GAAE,MAAW,EAC3B,cAAc,GAAE,MAAU,GACzB,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CA4J/B"}
|
package/dist/dim2.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { box2, circle2 } from '@forgeax/engine-math';
|
|
2
|
+
import type { AssetError, MeshAsset } from '@forgeax/engine-types';
|
|
3
|
+
import { type Result } from '@forgeax/engine-types';
|
|
4
|
+
export type Vec2 = readonly [number, number];
|
|
5
|
+
export type Shape2d = {
|
|
6
|
+
readonly kind: 'circle';
|
|
7
|
+
readonly radius: number;
|
|
8
|
+
readonly resolution?: number;
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: 'circular-sector';
|
|
11
|
+
readonly radius: number;
|
|
12
|
+
readonly angle: number;
|
|
13
|
+
readonly resolution?: number;
|
|
14
|
+
} | {
|
|
15
|
+
readonly kind: 'circular-segment';
|
|
16
|
+
readonly radius: number;
|
|
17
|
+
readonly angle: number;
|
|
18
|
+
readonly resolution?: number;
|
|
19
|
+
} | {
|
|
20
|
+
readonly kind: 'ellipse';
|
|
21
|
+
readonly halfWidth: number;
|
|
22
|
+
readonly halfHeight: number;
|
|
23
|
+
readonly resolution?: number;
|
|
24
|
+
} | {
|
|
25
|
+
readonly kind: 'annulus';
|
|
26
|
+
readonly innerRadius: number;
|
|
27
|
+
readonly outerRadius: number;
|
|
28
|
+
readonly resolution?: number;
|
|
29
|
+
} | {
|
|
30
|
+
readonly kind: 'capsule';
|
|
31
|
+
readonly radius: number;
|
|
32
|
+
readonly halfLength: number;
|
|
33
|
+
readonly resolution?: number;
|
|
34
|
+
} | {
|
|
35
|
+
readonly kind: 'rhombus';
|
|
36
|
+
readonly halfWidth: number;
|
|
37
|
+
readonly halfHeight: number;
|
|
38
|
+
} | {
|
|
39
|
+
readonly kind: 'rectangle';
|
|
40
|
+
readonly width: number;
|
|
41
|
+
readonly height: number;
|
|
42
|
+
} | {
|
|
43
|
+
readonly kind: 'regular-polygon';
|
|
44
|
+
readonly radius: number;
|
|
45
|
+
readonly sides: number;
|
|
46
|
+
} | {
|
|
47
|
+
readonly kind: 'triangle';
|
|
48
|
+
readonly vertices: readonly [Vec2, Vec2, Vec2];
|
|
49
|
+
} | {
|
|
50
|
+
readonly kind: 'segment';
|
|
51
|
+
readonly vertices: readonly [Vec2, Vec2];
|
|
52
|
+
} | {
|
|
53
|
+
readonly kind: 'polyline';
|
|
54
|
+
readonly vertices: readonly Vec2[];
|
|
55
|
+
};
|
|
56
|
+
export type Shape2dPose = {
|
|
57
|
+
readonly translation?: Vec2;
|
|
58
|
+
readonly rotation?: number;
|
|
59
|
+
};
|
|
60
|
+
export type Shape2dMeshOptions = {
|
|
61
|
+
readonly uv?: {
|
|
62
|
+
readonly kind: 'circular-mask';
|
|
63
|
+
readonly angle: number;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export type Shape2dBounds = {
|
|
67
|
+
readonly aabb: box2.Box2;
|
|
68
|
+
readonly circle: circle2.Circle2;
|
|
69
|
+
};
|
|
70
|
+
export declare function create2dGeometry(shape: Shape2d, options?: Shape2dMeshOptions): Result<MeshAsset, AssetError>;
|
|
71
|
+
export declare function compute2dBounds(shape: Shape2d, pose?: Shape2dPose): Result<Shape2dBounds, AssetError>;
|
|
72
|
+
export declare function create2dRingGeometry(shape: Shape2d, thickness: number, resolutionOverride?: number): Result<MeshAsset, AssetError>;
|
|
73
|
+
//# sourceMappingURL=dim2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dim2.d.ts","sourceRoot":"","sources":["../src/dim2.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type { VertexAttributePackDetail } from '@forgeax/engine-types';
|
|
2
|
+
export { meshAssetContribution, meshAssetDecoder, meshAssetKind } from './assets/mesh-decoder';
|
|
3
|
+
export { createPrimitiveMesh, type PrimitiveMeshKind } from './assets/primitive-mesh';
|
|
4
|
+
export { createBoxGeometry, meshFromInterleaved, PROCEDURAL_FLOATS_PER_VERTEX, } from './box';
|
|
5
|
+
export { createCapsuleGeometry } from './capsule';
|
|
6
|
+
export { createConeGeometry } from './cone';
|
|
7
|
+
export { createCylinderGeometry } from './cylinder';
|
|
8
|
+
export { compute2dBounds, create2dGeometry, create2dRingGeometry, type Shape2d, type Shape2dBounds, type Shape2dMeshOptions, type Shape2dPose, type Vec2, } from './dim2';
|
|
9
|
+
export { createPlaneGeometry } from './plane';
|
|
10
|
+
export { createSphereGeometry } from './sphere';
|
|
11
|
+
export { computeTangentVec4 } from './tangent';
|
|
12
|
+
export { createTorusGeometry } from './torus';
|
|
13
|
+
export { buildMeshAttributeMapForUvSets, deriveVertexBufferLayout, deriveVertexBufferLayoutFromProjection, deriveVertexLayoutProjection, deriveVertexLayoutProjectionFromMask, type GpuVertexBufferLayoutEntry, type PackedVertexAttributes, packInterleavedVertexAttributes, VertexAttributePackError, type VertexLayoutProjection, type VertexLayoutProjectionAttribute, type VertexLayoutProjectionMaskError, } from './vertex-attribute-layout';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,IAAI,GACV,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,sCAAsC,EACtC,4BAA4B,EAC5B,oCAAoC,EACpC,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,+BAA+B,EAC/B,wBAAwB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,GACrC,MAAM,2BAA2B,CAAC"}
|