react-simple-game-engine 0.1.60 → 0.1.61
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/lib/export-enums.d.ts +5 -0
- package/lib/export-interfaces.d.ts +4 -0
- package/lib/export-types.d.ts +53 -0
- package/lib/index.d.ts +25 -0
- package/lib/{utilities.js → utilities.d.ts} +1 -0
- package/package.json +6 -6
- package/lib/export-enums.js +0 -5
- package/lib/export-interfaces.js +0 -1
- package/lib/export-types.js +0 -1
@@ -0,0 +1,53 @@
|
|
1
|
+
import { Entity } from "./classes/entities/entity";
|
2
|
+
import { Sprite } from "./classes/sprites/sprite";
|
3
|
+
import type { Body, IChamferableBodyDefinition } from "matter-js";
|
4
|
+
import { Initialler } from "./export-interfaces";
|
5
|
+
import { Sound } from "./classes/sound";
|
6
|
+
import { SoundType } from "./export-enums";
|
7
|
+
export type { Collection } from "./classes/p5";
|
8
|
+
export declare type Avatar = ReturnType<import("./classes/p5").P5["loadImage"]>;
|
9
|
+
export declare type Color = [number, number, number, number?];
|
10
|
+
export declare type EntityPrepare<E extends Entity> = EntityInitial<E>;
|
11
|
+
export declare type MasterBody = Body & {
|
12
|
+
entity: Entity;
|
13
|
+
};
|
14
|
+
export declare type CreateBodyDefine<E extends Record<string, any> = Record<string, any>> = {
|
15
|
+
transform?: {
|
16
|
+
x?: number;
|
17
|
+
y?: number;
|
18
|
+
} & E;
|
19
|
+
bodyOptions?: IChamferableBodyDefinition;
|
20
|
+
};
|
21
|
+
declare type TransformArgs<E extends Entity> = Parameters<E["onCreateBody"]>[0];
|
22
|
+
declare type BodyOptionsArgs<E extends Entity> = Parameters<E["onCreateBody"]>[1];
|
23
|
+
export declare type EntityInitial<E extends Entity> = {
|
24
|
+
transform?: TransformArgs<E>;
|
25
|
+
bodyOptions?: BodyOptionsArgs<E>;
|
26
|
+
sprite?: import("./classes/logic-component").LogicComponent<Sprite<any>>;
|
27
|
+
sound?: Sound;
|
28
|
+
enabledGravity?: boolean;
|
29
|
+
name?: string;
|
30
|
+
props?: Partial<E["props"]>;
|
31
|
+
};
|
32
|
+
export declare type Configation<C extends Initialler> = Parameters<C["initial"]>[0];
|
33
|
+
export declare type Configable<C extends Initialler = Initialler> = {
|
34
|
+
new (): C;
|
35
|
+
} | [{
|
36
|
+
new (): C;
|
37
|
+
}, Configation<C>];
|
38
|
+
export declare type SoundManagement = Record<SoundType, {
|
39
|
+
canPlay: boolean;
|
40
|
+
loop: boolean;
|
41
|
+
}>;
|
42
|
+
export declare type SoundDecor = {
|
43
|
+
propertyKey: string;
|
44
|
+
src?: string;
|
45
|
+
type: SoundType;
|
46
|
+
volumn?: number;
|
47
|
+
};
|
48
|
+
export declare type SpriteDecor = {
|
49
|
+
propertyKey: string;
|
50
|
+
src?: string;
|
51
|
+
};
|
52
|
+
export declare type GetSoundOptions = DeepPartial<SoundManagement>;
|
53
|
+
//# sourceMappingURL=export-types.d.ts.map
|
package/lib/index.d.ts
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
export { Saver } from "./classes/saver";
|
2
|
+
export { Sound } from "./classes/sound";
|
3
|
+
export { P5 } from "./classes/p5";
|
4
|
+
export { ParticleSystem } from "./classes/particle-system";
|
5
|
+
export { Particle } from "./classes/particle";
|
6
|
+
export { AnimationSprite } from "./classes/animations/animation";
|
7
|
+
export { AvatarAnimationSprite } from "./classes/animations/avatar.animation";
|
8
|
+
export { ColorAnimationSprite } from "./classes/animations/color.animation";
|
9
|
+
export { Entity } from "./classes/entities/entity";
|
10
|
+
export { CircleEntity } from "./classes/entities/circle.entity";
|
11
|
+
export { RectEntity } from "./classes/entities/rect.entity";
|
12
|
+
export { Prefab } from "./classes/prefab";
|
13
|
+
export { LogicComponent } from "./classes/logic-component";
|
14
|
+
export { Scene } from "./classes/scene";
|
15
|
+
export { Camera } from "./classes/camera";
|
16
|
+
export { Sprite } from "./classes/sprites/sprite";
|
17
|
+
export { AvatarSprite } from "./classes/sprites/avatar.sprite";
|
18
|
+
export { ColorSprite } from "./classes/sprites/color.sprite";
|
19
|
+
export { SpriteFrom } from "./decorators/sprite-from.decor";
|
20
|
+
export { SoundFrom } from "./decorators/sound-from.decor";
|
21
|
+
export { SceneTag } from "./decorators/scene-tag.decor";
|
22
|
+
export { SceneUI } from "./decorators/scene-ui.decor";
|
23
|
+
export { ScenesProcess } from "./ui-components/ScenesProcess";
|
24
|
+
export { default as Matter } from "matter-js";
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-simple-game-engine",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.61",
|
4
4
|
"description": "",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"types": "lib",
|
@@ -21,11 +21,11 @@
|
|
21
21
|
"build": "rm -rf lib && tsc -p ."
|
22
22
|
},
|
23
23
|
"files": [
|
24
|
-
"/lib/index.
|
25
|
-
"/lib/utilities.
|
26
|
-
"/lib/export-types.
|
27
|
-
"/lib/export-interfaces.
|
28
|
-
"/lib/export-enums.
|
24
|
+
"/lib/index.d.ts",
|
25
|
+
"/lib/utilities.d.ts",
|
26
|
+
"/lib/export-types.d.ts",
|
27
|
+
"/lib/export-interfaces.d.ts",
|
28
|
+
"/lib/export-enums.d.ts"
|
29
29
|
],
|
30
30
|
"keywords": [
|
31
31
|
"game engine",
|
package/lib/export-enums.js
DELETED
package/lib/export-interfaces.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
package/lib/export-types.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|