@antha/entity-2d 0.11.0 → 0.12.0
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/dist/entity.d.ts +7 -1
- package/dist/entity.js +5 -1
- package/dist/load-antha-assets.d.ts +10 -2
- package/package.json +8 -8
package/dist/entity.d.ts
CHANGED
|
@@ -84,7 +84,11 @@ export type EntityCollisionDefinition = PartialWithUndefined<{
|
|
|
84
84
|
/** Other entity classes this entity observes collisions with. */
|
|
85
85
|
collidesWithOtherEntities: ReadonlyArray<Entity2dConstructor>;
|
|
86
86
|
}>;
|
|
87
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* A collision system that skips pairs no entity observes before running SAT collision checks.
|
|
89
|
+
*
|
|
90
|
+
* @category Internal
|
|
91
|
+
*/
|
|
88
92
|
export declare class EntityHitboxSystem extends HitboxSystem {
|
|
89
93
|
protected checkedHitboxPairs: WeakMap<Hitbox, WeakSet<Hitbox>> | undefined;
|
|
90
94
|
checkAll(...[callback, response,]: Parameters<HitboxSystem['checkAll']>): any;
|
|
@@ -196,6 +200,8 @@ export type MatchingKeys<Key extends PropertyKey, Params extends Record<string,
|
|
|
196
200
|
* - `true`: indicates that the property is mapped directly from params to that view or hitbox object.
|
|
197
201
|
* - Omitted: the property is not mapped at all.
|
|
198
202
|
* - A string: specifies the params key that this view or hitbox property is mapped to.
|
|
203
|
+
*
|
|
204
|
+
* @category Internal
|
|
199
205
|
*/
|
|
200
206
|
export type ParamsMap<Params extends Record<string, any> | undefined = AnyObject> = IsEqual<Params, undefined> extends true ? undefined : PartialWithUndefined<{
|
|
201
207
|
view: Partial<{
|
package/dist/entity.js
CHANGED
|
@@ -59,7 +59,11 @@ function markHitboxPairAsChecked({ checkedHitboxPairs, firstHitbox, secondHitbox
|
|
|
59
59
|
checkedHitboxPairs.set(firstHitbox, new WeakSet([secondHitbox]));
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* A collision system that skips pairs no entity observes before running SAT collision checks.
|
|
64
|
+
*
|
|
65
|
+
* @category Internal
|
|
66
|
+
*/
|
|
63
67
|
export class EntityHitboxSystem extends HitboxSystem {
|
|
64
68
|
checkedHitboxPairs;
|
|
65
69
|
checkAll(...[callback, response,]) {
|
|
@@ -2,7 +2,11 @@ import { type Asset, type AssetBulkLoaderLoadOptions, type AssetLoader } from '@
|
|
|
2
2
|
import { type AudioPlayer, type AudioSetupParams } from '@antha/audio';
|
|
3
3
|
import { type PartialWithUndefined } from '@augment-vir/common';
|
|
4
4
|
import { type Entity2dConstructor } from './entity.js';
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Audio files and their player to include in {@link loadAnthaAssets}.
|
|
7
|
+
*
|
|
8
|
+
* @category Internal
|
|
9
|
+
*/
|
|
6
10
|
export type AnthaAudioFilesToLoad = {
|
|
7
11
|
audioPlayer: Pick<AudioPlayer, 'loadFiles'>;
|
|
8
12
|
files: ReadonlyArray<Readonly<AudioSetupParams>>;
|
|
@@ -12,7 +16,11 @@ export type AnthaAudioFilesToLoad = {
|
|
|
12
16
|
/** Whether audio files should load sequentially. */
|
|
13
17
|
serial: boolean;
|
|
14
18
|
}>;
|
|
15
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Inputs for {@link loadAnthaAssets}.
|
|
21
|
+
*
|
|
22
|
+
* @category Internal
|
|
23
|
+
*/
|
|
16
24
|
export type LoadAnthaAssetsParams = {
|
|
17
25
|
assetLoader: AssetLoader;
|
|
18
26
|
} & PartialWithUndefined<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antha/entity-2d",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "An Antha mod for handling 2D entities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vir",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@augment-vir/common": "^32.2.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@antha/engine": "^0.
|
|
43
|
-
"@antha/web-test-runner-plugin-pixi": "^0.
|
|
42
|
+
"@antha/engine": "^0.12.0",
|
|
43
|
+
"@antha/web-test-runner-plugin-pixi": "^0.12.0",
|
|
44
44
|
"@augment-vir/test": "^32.2.3",
|
|
45
45
|
"@web/dev-server-esbuild": "^2.0.0",
|
|
46
46
|
"@web/test-runner": "^1.0.0",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"detect-collisions": "^10.10.2025",
|
|
49
49
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
50
50
|
"object-shape-tester": "^6.15.0",
|
|
51
|
-
"pixi.js": "^8.20.
|
|
51
|
+
"pixi.js": "^8.20.1",
|
|
52
52
|
"typed-event-target": "^4.3.3"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@antha/asset": "^0.
|
|
56
|
-
"@antha/audio": "^0.
|
|
57
|
-
"@antha/engine": "^0.
|
|
58
|
-
"@antha/graphics-2d": "^0.
|
|
55
|
+
"@antha/asset": "^0.12.0",
|
|
56
|
+
"@antha/audio": "^0.12.0",
|
|
57
|
+
"@antha/engine": "^0.12.0",
|
|
58
|
+
"@antha/graphics-2d": "^0.12.0",
|
|
59
59
|
"detect-collisions": ">=10",
|
|
60
60
|
"element-vir": ">=26",
|
|
61
61
|
"object-shape-tester": ">=6",
|