@truelab/truengine 3.0.0 → 4.0.0-rc.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.
- package/dist/browserAll-chunk.js +7 -0
- package/dist/libs/particles.js +1812 -0
- package/dist/libs/pixi.js +740 -197
- package/dist/pixi-chunk.js +48946 -17692
- package/dist/truengine.js +19051 -15410
- package/dist/types/libs/particles.d.ts +2 -0
- package/dist/types/src/classes/assets.class.d.ts.map +1 -1
- package/dist/types/src/classes/bitmap.text.class.d.ts +8 -3
- package/dist/types/src/classes/bitmap.text.class.d.ts.map +1 -1
- package/dist/types/src/classes/container.class.d.ts +6 -0
- package/dist/types/src/classes/container.class.d.ts.map +1 -1
- package/dist/types/src/classes/engine.class.d.ts +6 -0
- package/dist/types/src/classes/engine.class.d.ts.map +1 -1
- package/dist/types/src/classes/loaders.class.d.ts +19 -2
- package/dist/types/src/classes/loaders.class.d.ts.map +1 -1
- package/dist/types/src/classes/sequence.class.d.ts.map +1 -1
- package/dist/types/src/classes/spine.assets.class.d.ts +16 -1
- package/dist/types/src/classes/spine.assets.class.d.ts.map +1 -1
- package/dist/types/src/classes/tile.class.d.ts.map +1 -1
- package/dist/types/src/components/abstract.component.d.ts +2 -2
- package/dist/types/src/components/abstract.component.d.ts.map +1 -1
- package/dist/types/src/components/bigwin.component.d.ts.map +1 -1
- package/dist/types/src/components/blackout.component.d.ts +4 -4
- package/dist/types/src/components/blackout.component.d.ts.map +1 -1
- package/dist/types/src/components/button.component.d.ts +4 -4
- package/dist/types/src/components/button.component.d.ts.map +1 -1
- package/dist/types/src/components/button.text.component.d.ts.map +1 -1
- package/dist/types/src/components/cheat.component.d.ts +7 -0
- package/dist/types/src/components/cheat.component.d.ts.map +1 -1
- package/dist/types/src/components/fpsmeter.component.d.ts +44 -0
- package/dist/types/src/components/fpsmeter.component.d.ts.map +1 -0
- package/dist/types/src/components/link.component.d.ts +4 -4
- package/dist/types/src/components/link.component.d.ts.map +1 -1
- package/dist/types/src/components/particles.component.d.ts +1 -1
- package/dist/types/src/components/particles.component.d.ts.map +1 -1
- package/dist/types/src/components/retrigger.component.d.ts.map +1 -1
- package/dist/types/src/components/slideshow/slides.reel.component.d.ts +4 -4
- package/dist/types/src/components/slideshow/slides.reel.component.d.ts.map +1 -1
- package/dist/types/src/components/slot/hints/hints.component.d.ts.map +1 -1
- package/dist/types/src/components/slot/lines/lines.static.component.d.ts +3 -3
- package/dist/types/src/components/slot/lines/lines.static.component.d.ts.map +1 -1
- package/dist/types/src/components/slot/payout/payout.base.component.d.ts +2 -2
- package/dist/types/src/components/slot/payout/payout.base.component.d.ts.map +1 -1
- package/dist/types/src/components/slot/reel.component.d.ts.map +1 -1
- package/dist/types/src/components/slot/slot.component.d.ts +1 -1
- package/dist/types/src/components/slot/slot.component.d.ts.map +1 -1
- package/dist/types/src/components/slot/slot.config.d.ts.map +1 -1
- package/dist/types/src/components/slot/symbol/symbol.component.d.ts +1 -1
- package/dist/types/src/components/slot/symbol/symbol.component.d.ts.map +1 -1
- package/dist/types/src/components/switch.component.d.ts +1 -1
- package/dist/types/src/components/switch.component.d.ts.map +1 -1
- package/dist/types/src/components/text.component.d.ts +2 -2
- package/dist/types/src/components/text.component.d.ts.map +1 -1
- package/dist/types/src/extends/events.types.d.ts +1 -1
- package/dist/types/src/extends/events.types.d.ts.map +1 -1
- package/dist/types/src/extends/interfaces.d.ts +3 -2
- package/dist/types/src/extends/interfaces.d.ts.map +1 -1
- package/dist/types/src/extends/short.types.d.ts +2 -2
- package/dist/types/src/extends/short.types.d.ts.map +1 -1
- package/dist/types/src/extends/struct.types.d.ts +2 -2
- package/dist/types/src/extends/struct.types.d.ts.map +1 -1
- package/dist/types/src/functions/convert/textstyle.func.d.ts +15 -0
- package/dist/types/src/functions/convert/textstyle.func.d.ts.map +1 -0
- package/dist/types/src/functions/debug/container.func.d.ts.map +1 -1
- package/dist/types/src/functions/debug/line.func.d.ts.map +1 -1
- package/dist/types/src/functions/demotexture.func.d.ts.map +1 -1
- package/dist/types/src/functions/draw/canvasExtract.func.d.ts +6 -6
- package/dist/types/src/functions/draw/canvasExtract.func.d.ts.map +1 -1
- package/dist/types/src/functions/draw/radialGradient.func.d.ts +2 -2
- package/dist/types/src/functions/draw/radialGradient.func.d.ts.map +1 -1
- package/dist/types/src/functions/draw/rect.func.d.ts.map +1 -1
- package/dist/types/src/functions/is.funcs.d.ts +5 -0
- package/dist/types/src/functions/is.funcs.d.ts.map +1 -1
- package/dist/types/src/functions/object/deepMerge.d.ts +2 -1
- package/dist/types/src/functions/object/deepMerge.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/libs/particles/ContainerParticle.d.ts +123 -0
- package/dist/types/src/libs/particles/ContainerParticle.d.ts.map +1 -0
- package/dist/types/src/libs/particles/Emitter.d.ts +303 -0
- package/dist/types/src/libs/particles/Emitter.d.ts.map +1 -0
- package/dist/types/src/libs/particles/EmitterConfig.d.ts +228 -0
- package/dist/types/src/libs/particles/EmitterConfig.d.ts.map +1 -0
- package/dist/types/src/libs/particles/Particle.d.ts +70 -0
- package/dist/types/src/libs/particles/Particle.d.ts.map +1 -0
- package/dist/types/src/libs/particles/ParticleUtils.d.ts +95 -0
- package/dist/types/src/libs/particles/ParticleUtils.d.ts.map +1 -0
- package/dist/types/src/libs/particles/PropertyList.d.ts +40 -0
- package/dist/types/src/libs/particles/PropertyList.d.ts.map +1 -0
- package/dist/types/src/libs/particles/PropertyNode.d.ts +74 -0
- package/dist/types/src/libs/particles/PropertyNode.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/AccelerationMovement.d.ts +62 -0
- package/dist/types/src/libs/particles/behaviors/AccelerationMovement.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/Alpha.d.ts +60 -0
- package/dist/types/src/libs/particles/behaviors/Alpha.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/AnimatedTexture.d.ts +111 -0
- package/dist/types/src/libs/particles/behaviors/AnimatedTexture.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/Behaviors.d.ts +71 -0
- package/dist/types/src/libs/particles/behaviors/Behaviors.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/BlendMode.d.ts +31 -0
- package/dist/types/src/libs/particles/behaviors/BlendMode.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/BurstSpawn.d.ts +43 -0
- package/dist/types/src/libs/particles/behaviors/BurstSpawn.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/Color.d.ts +60 -0
- package/dist/types/src/libs/particles/behaviors/Color.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/OrderedTexture.d.ts +33 -0
- package/dist/types/src/libs/particles/behaviors/OrderedTexture.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/PathMovement.d.ts +68 -0
- package/dist/types/src/libs/particles/behaviors/PathMovement.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/PointSpawn.d.ts +21 -0
- package/dist/types/src/libs/particles/behaviors/PointSpawn.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/RandomTexture.d.ts +32 -0
- package/dist/types/src/libs/particles/behaviors/RandomTexture.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/Rotation.d.ts +114 -0
- package/dist/types/src/libs/particles/behaviors/Rotation.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/Scale.d.ts +74 -0
- package/dist/types/src/libs/particles/behaviors/Scale.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/ShapeSpawn.d.ts +58 -0
- package/dist/types/src/libs/particles/behaviors/ShapeSpawn.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/SingleTexture.d.ts +32 -0
- package/dist/types/src/libs/particles/behaviors/SingleTexture.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/SpeedMovement.d.ts +76 -0
- package/dist/types/src/libs/particles/behaviors/SpeedMovement.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/editor/Types.d.ts +104 -0
- package/dist/types/src/libs/particles/behaviors/editor/Types.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/index.d.ts +21 -0
- package/dist/types/src/libs/particles/behaviors/index.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/shapes/PolygonalChain.d.ts +57 -0
- package/dist/types/src/libs/particles/behaviors/shapes/PolygonalChain.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/shapes/Rectangle.d.ts +59 -0
- package/dist/types/src/libs/particles/behaviors/shapes/Rectangle.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/shapes/SpawnShape.d.ts +32 -0
- package/dist/types/src/libs/particles/behaviors/shapes/SpawnShape.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/shapes/Torus.d.ts +71 -0
- package/dist/types/src/libs/particles/behaviors/shapes/Torus.d.ts.map +1 -0
- package/dist/types/src/libs/particles/behaviors/shapes/index.d.ts +5 -0
- package/dist/types/src/libs/particles/behaviors/shapes/index.d.ts.map +1 -0
- package/dist/types/src/libs/particles/index.d.ts +9 -0
- package/dist/types/src/libs/particles/index.d.ts.map +1 -0
- package/dist/types/src/scenes/masked.scene.d.ts.map +1 -1
- package/dist/types/vite.config.d.ts.map +1 -1
- package/dist/webworkerAll-chunk.js +3 -0
- package/package.json +11 -8
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
export type NumberProperty = {
|
|
2
|
+
type: 'number';
|
|
3
|
+
name: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
default: number;
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
};
|
|
10
|
+
export type ColorProperty = {
|
|
11
|
+
type: 'color';
|
|
12
|
+
name: string;
|
|
13
|
+
title: string;
|
|
14
|
+
description: string;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
export type BooleanProperty = {
|
|
18
|
+
type: 'boolean';
|
|
19
|
+
name: string;
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type TextProperty = {
|
|
25
|
+
type: 'text';
|
|
26
|
+
name: string;
|
|
27
|
+
title: string;
|
|
28
|
+
description: string;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
export type PointProperty = {
|
|
32
|
+
type: 'point';
|
|
33
|
+
name: string;
|
|
34
|
+
title: string;
|
|
35
|
+
description: string;
|
|
36
|
+
default: {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export type NumberListProperty = {
|
|
42
|
+
type: 'numberList';
|
|
43
|
+
name: string;
|
|
44
|
+
title: string;
|
|
45
|
+
description: string;
|
|
46
|
+
default: number;
|
|
47
|
+
min?: number;
|
|
48
|
+
max?: number;
|
|
49
|
+
};
|
|
50
|
+
export type ColorListProperty = {
|
|
51
|
+
type: 'colorList';
|
|
52
|
+
name: string;
|
|
53
|
+
title: string;
|
|
54
|
+
description: string;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
export type ImageProperty = {
|
|
58
|
+
type: 'image';
|
|
59
|
+
name: string;
|
|
60
|
+
title: string;
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
63
|
+
export type ListProperty = {
|
|
64
|
+
type: 'list';
|
|
65
|
+
name: string;
|
|
66
|
+
title: string;
|
|
67
|
+
description: string;
|
|
68
|
+
entryType: Property;
|
|
69
|
+
};
|
|
70
|
+
export type ObjectProperty = {
|
|
71
|
+
type: 'object';
|
|
72
|
+
name: string;
|
|
73
|
+
title: string;
|
|
74
|
+
description: string;
|
|
75
|
+
props: Property[];
|
|
76
|
+
};
|
|
77
|
+
export type SelectProperty = {
|
|
78
|
+
type: 'select';
|
|
79
|
+
name: string;
|
|
80
|
+
title: string;
|
|
81
|
+
description: string;
|
|
82
|
+
options: {
|
|
83
|
+
label: string;
|
|
84
|
+
value: string;
|
|
85
|
+
}[];
|
|
86
|
+
default: string;
|
|
87
|
+
};
|
|
88
|
+
export type SelectSubConfigProperty = {
|
|
89
|
+
type: 'subconfig';
|
|
90
|
+
/** Name of property where the type of the config is stored */
|
|
91
|
+
name: string;
|
|
92
|
+
title: string;
|
|
93
|
+
description: string;
|
|
94
|
+
dictionaryProp: string;
|
|
95
|
+
/** Name of property in which the config should be stored */
|
|
96
|
+
configName: string;
|
|
97
|
+
};
|
|
98
|
+
export type Property = NumberProperty | ColorProperty | BooleanProperty | TextProperty | PointProperty | NumberListProperty | ColorListProperty | ImageProperty | ListProperty | ObjectProperty | SelectProperty | SelectSubConfigProperty;
|
|
99
|
+
export type BehaviorEditorConfig = {
|
|
100
|
+
category: 'art' | 'color' | 'alpha' | 'scale' | 'movement' | 'rotation' | 'blend' | 'spawn' | 'other';
|
|
101
|
+
title: string;
|
|
102
|
+
props: Property[];
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=Types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/particles/behaviors/editor/Types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IACzB,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IACxB,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAA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,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;IACrG,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,QAAQ,EAAE,CAAA;CACpB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as spawnShapes from './shapes';
|
|
2
|
+
export { spawnShapes };
|
|
3
|
+
export * from './Behaviors';
|
|
4
|
+
import * as editor from './editor/Types';
|
|
5
|
+
export { editor };
|
|
6
|
+
export * from './AccelerationMovement';
|
|
7
|
+
export * from './Alpha';
|
|
8
|
+
export * from './AnimatedTexture';
|
|
9
|
+
export * from './BlendMode';
|
|
10
|
+
export * from './BurstSpawn';
|
|
11
|
+
export * from './Color';
|
|
12
|
+
export * from './OrderedTexture';
|
|
13
|
+
export * from './PathMovement';
|
|
14
|
+
export * from './PointSpawn';
|
|
15
|
+
export * from './RandomTexture';
|
|
16
|
+
export * from './Rotation';
|
|
17
|
+
export * from './Scale';
|
|
18
|
+
export * from './ShapeSpawn';
|
|
19
|
+
export * from './SingleTexture';
|
|
20
|
+
export * from './SpeedMovement';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/particles/behaviors/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,WAAW,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,CAAA;AACtB,cAAc,aAAa,CAAA;AAE3B,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,CAAA;AAGjB,cAAc,wBAAwB,CAAA;AACtC,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { PointData } from 'pixi.js';
|
|
2
|
+
import { ListProperty } from '../editor/Types';
|
|
3
|
+
import { SpawnShape } from './SpawnShape';
|
|
4
|
+
/**
|
|
5
|
+
* Data structure for internal parsed data in PolygonalChain spawn shapes.
|
|
6
|
+
*/
|
|
7
|
+
export type Segment = {
|
|
8
|
+
p1: PointData;
|
|
9
|
+
p2: PointData;
|
|
10
|
+
l: number;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A spawn shape that picks a random position along a series of line segments. If those
|
|
14
|
+
* line segments form a polygon, particles will only be placed on the perimeter of that polygon.
|
|
15
|
+
*
|
|
16
|
+
* Example config:
|
|
17
|
+
* ```javascript
|
|
18
|
+
* {
|
|
19
|
+
* type: 'polygonalChain',
|
|
20
|
+
* data: [
|
|
21
|
+
* [{x: 0, y: 0}, {x: 10, y: 10}, {x: 20, y: 0}],
|
|
22
|
+
* [{x: 0, y, -10}, {x: 10, y: 0}, {x: 20, y: -10}]
|
|
23
|
+
* ]
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare class PolygonalChain implements SpawnShape {
|
|
28
|
+
static type: string;
|
|
29
|
+
static editorConfig: ListProperty;
|
|
30
|
+
/**
|
|
31
|
+
* List of segment objects in the chain.
|
|
32
|
+
*/
|
|
33
|
+
private segments;
|
|
34
|
+
/**
|
|
35
|
+
* Total length of all segments of the chain.
|
|
36
|
+
*/
|
|
37
|
+
private totalLength;
|
|
38
|
+
/**
|
|
39
|
+
* Total length of segments up to and including the segment of the same index.
|
|
40
|
+
* Used for weighted random selection of segment.
|
|
41
|
+
*/
|
|
42
|
+
private countingLengths;
|
|
43
|
+
/**
|
|
44
|
+
* @param data Point data for polygon chains. Either a list of points for a single chain, or a list of chains.
|
|
45
|
+
*/
|
|
46
|
+
constructor(data: PointData[] | PointData[][]);
|
|
47
|
+
/**
|
|
48
|
+
* @param data Point data for polygon chains. Either a list of points for a single chain, or a list of chains.
|
|
49
|
+
*/
|
|
50
|
+
private init;
|
|
51
|
+
/**
|
|
52
|
+
* Gets a random point in the chain.
|
|
53
|
+
* @param out The point to store the selected position in.
|
|
54
|
+
*/
|
|
55
|
+
getRandPos(out: PointData): void;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=PolygonalChain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolygonalChain.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/particles/behaviors/shapes/PolygonalChain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IAClB,EAAE,EAAE,SAAS,CAAA;IACb,EAAE,EAAE,SAAS,CAAA;IACb,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,cAAe,YAAW,UAAU;IAC7C,OAAc,IAAI,SAAmB;IACrC,OAAc,YAAY,EAAE,YAAY,CAAO;IAC/C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAW;IAC3B;;OAEG;IACH,OAAO,CAAC,WAAW,CAAQ;IAC3B;;;OAGG;IACH,OAAO,CAAC,eAAe,CAAU;IAEjC;;OAEG;gBACS,IAAI,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,EAAE;IAO7C;;OAEG;IACH,OAAO,CAAC,IAAI;IA2CZ;;;OAGG;IACI,UAAU,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI;CA+B1C"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Particle } from '../../Particle';
|
|
2
|
+
import { ObjectProperty } from '../editor/Types';
|
|
3
|
+
import { SpawnShape } from './SpawnShape';
|
|
4
|
+
/**
|
|
5
|
+
* A SpawnShape that randomly picks locations inside a rectangle.
|
|
6
|
+
*
|
|
7
|
+
* Example config:
|
|
8
|
+
* ```javascript
|
|
9
|
+
* {
|
|
10
|
+
* type: 'rect',
|
|
11
|
+
* data: {
|
|
12
|
+
* x: 0,
|
|
13
|
+
* y: 0,
|
|
14
|
+
* w: 10,
|
|
15
|
+
* h: 100
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare class Rectangle implements SpawnShape {
|
|
21
|
+
static type: string;
|
|
22
|
+
static editorConfig: ObjectProperty;
|
|
23
|
+
/**
|
|
24
|
+
* X (left) position of the rectangle.
|
|
25
|
+
*/
|
|
26
|
+
x: number;
|
|
27
|
+
/**
|
|
28
|
+
* Y (top) position of the rectangle.
|
|
29
|
+
*/
|
|
30
|
+
y: number;
|
|
31
|
+
/**
|
|
32
|
+
* Width of the rectangle.
|
|
33
|
+
*/
|
|
34
|
+
w: number;
|
|
35
|
+
/**
|
|
36
|
+
* Height of the rectangle.
|
|
37
|
+
*/
|
|
38
|
+
h: number;
|
|
39
|
+
constructor(config: {
|
|
40
|
+
/**
|
|
41
|
+
* X (left) position of the rectangle.
|
|
42
|
+
*/
|
|
43
|
+
x: number;
|
|
44
|
+
/**
|
|
45
|
+
* Y (top) position of the rectangle.
|
|
46
|
+
*/
|
|
47
|
+
y: number;
|
|
48
|
+
/**
|
|
49
|
+
* Width of the rectangle.
|
|
50
|
+
*/
|
|
51
|
+
w: number;
|
|
52
|
+
/**
|
|
53
|
+
* Height of the rectangle.
|
|
54
|
+
*/
|
|
55
|
+
h: number;
|
|
56
|
+
});
|
|
57
|
+
getRandPos(particle: Particle): void;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=Rectangle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rectangle.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/particles/behaviors/shapes/Rectangle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,SAAU,YAAW,UAAU;IACxC,OAAc,IAAI,SAAS;IAC3B,OAAc,YAAY,EAAE,cAAc,CAAO;IACjD;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;gBAEJ,MAAM,EAAE;QAChB;;WAEG;QACH,CAAC,EAAE,MAAM,CAAA;QACT;;WAEG;QACH,CAAC,EAAE,MAAM,CAAA;QACT;;WAEG;QACH,CAAC,EAAE,MAAM,CAAA;QACT;;WAEG;QACH,CAAC,EAAE,MAAM,CAAA;KACZ;IAOD,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAKvC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Particle } from '../../Particle';
|
|
2
|
+
import { ListProperty, ObjectProperty } from '../editor/Types';
|
|
3
|
+
/**
|
|
4
|
+
* Any shape capable of generating a random position for the {@link ShapeSpawnBehavior | shape spawn behavior}.
|
|
5
|
+
*/
|
|
6
|
+
export type SpawnShape = {
|
|
7
|
+
/**
|
|
8
|
+
* Assign a random position to the given particle.
|
|
9
|
+
* Rotation may optionally be applied; assigning any other properties, while allowed, would be improper.
|
|
10
|
+
*/
|
|
11
|
+
getRandPos(particle: Particle): void;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Class definition/static properties for a shape capable of generating a random
|
|
15
|
+
* position for the {@link ShapeSpawnBehavior | shape spawn behavior}.
|
|
16
|
+
*/
|
|
17
|
+
export type SpawnShapeClass = {
|
|
18
|
+
/**
|
|
19
|
+
* Type that the shape is registered under.
|
|
20
|
+
*/
|
|
21
|
+
type: string;
|
|
22
|
+
/**
|
|
23
|
+
* Configuration for an editor to display. This does not need to exist in production code.
|
|
24
|
+
*/
|
|
25
|
+
editorConfig?: ObjectProperty | ListProperty;
|
|
26
|
+
/**
|
|
27
|
+
* The shape constructor itself.
|
|
28
|
+
* @param config The config for the shape, which should match its defined specifications.
|
|
29
|
+
*/
|
|
30
|
+
new (config: any): SpawnShape;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=SpawnShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpawnShape.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/particles/behaviors/shapes/SpawnShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEnE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB;;;OAGG;IACH,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAA;CACvC,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,YAAY,CAAC,EAAE,cAAc,GAAG,YAAY,CAAA;IAC5C;;;OAGG;IACH,KAAK,MAAM,EAAE,GAAG,GAAG,UAAU,CAAA;CAChC,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Particle } from '../../Particle';
|
|
2
|
+
import { ObjectProperty } from '../editor/Types';
|
|
3
|
+
import { SpawnShape } from './SpawnShape';
|
|
4
|
+
/**
|
|
5
|
+
* A class for spawning particles in a circle or ring.
|
|
6
|
+
* Can optionally apply rotation to particles so that they are aimed away from the center of the circle.
|
|
7
|
+
*
|
|
8
|
+
* Example config:
|
|
9
|
+
* ```javascript
|
|
10
|
+
* {
|
|
11
|
+
* type: 'torus',
|
|
12
|
+
* data: {
|
|
13
|
+
* radius: 30,
|
|
14
|
+
* x: 0,
|
|
15
|
+
* y: 0,
|
|
16
|
+
* innerRadius: 10,
|
|
17
|
+
* rotation: true
|
|
18
|
+
* }
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class Torus implements SpawnShape {
|
|
23
|
+
static type: string;
|
|
24
|
+
static editorConfig: ObjectProperty;
|
|
25
|
+
/**
|
|
26
|
+
* X position of the center of the shape.
|
|
27
|
+
*/
|
|
28
|
+
x: number;
|
|
29
|
+
/**
|
|
30
|
+
* Y position of the center of the shape.
|
|
31
|
+
*/
|
|
32
|
+
y: number;
|
|
33
|
+
/**
|
|
34
|
+
* Radius of circle, or outer radius of a ring.
|
|
35
|
+
*/
|
|
36
|
+
radius: number;
|
|
37
|
+
/**
|
|
38
|
+
* Inner radius of a ring. Use 0 to have a circle.
|
|
39
|
+
*/
|
|
40
|
+
innerRadius: number;
|
|
41
|
+
/**
|
|
42
|
+
* If rotation should be applied to particles.
|
|
43
|
+
*/
|
|
44
|
+
rotation: boolean;
|
|
45
|
+
constructor(config: {
|
|
46
|
+
/**
|
|
47
|
+
* Radius of circle, or outer radius of a ring. Note that this uses the full name of 'radius',
|
|
48
|
+
* where earlier versions of the library may have used 'r'.
|
|
49
|
+
*/
|
|
50
|
+
radius: number;
|
|
51
|
+
/**
|
|
52
|
+
* X position of the center of the shape.
|
|
53
|
+
*/
|
|
54
|
+
x: number;
|
|
55
|
+
/**
|
|
56
|
+
* Y position of the center of the shape.
|
|
57
|
+
*/
|
|
58
|
+
y: number;
|
|
59
|
+
/**
|
|
60
|
+
* Inner radius of a ring. Omit, or use 0, to have a circle.
|
|
61
|
+
*/
|
|
62
|
+
innerRadius?: number;
|
|
63
|
+
/**
|
|
64
|
+
* If rotation should be applied to particles, pointing them away from the center of the torus.
|
|
65
|
+
* Defaults to false.
|
|
66
|
+
*/
|
|
67
|
+
affectRotation?: boolean;
|
|
68
|
+
});
|
|
69
|
+
getRandPos(particle: Particle): void;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=Torus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Torus.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/particles/behaviors/shapes/Torus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,KAAM,YAAW,UAAU;IACpC,OAAc,IAAI,SAAU;IAC5B,OAAc,YAAY,EAAE,cAAc,CAAO;IACjD;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACI,MAAM,EAAE,MAAM,CAAA;IACrB;;OAEG;IACI,WAAW,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACI,QAAQ,EAAE,OAAO,CAAA;gBAEZ,MAAM,EAAE;QAChB;;;WAGG;QACH,MAAM,EAAE,MAAM,CAAA;QACd;;WAEG;QACH,CAAC,EAAE,MAAM,CAAA;QACT;;WAEG;QACH,CAAC,EAAE,MAAM,CAAA;QACT;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB;;;WAGG;QACH,cAAc,CAAC,EAAE,OAAO,CAAA;KAC3B;IAQD,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAmBvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/particles/behaviors/shapes/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * as behaviors from './behaviors';
|
|
2
|
+
export * from './Emitter';
|
|
3
|
+
export * from './EmitterConfig';
|
|
4
|
+
export * from './ContainerParticle';
|
|
5
|
+
export * from './Particle';
|
|
6
|
+
export * as ParticleUtils from './ParticleUtils';
|
|
7
|
+
export * from './PropertyList';
|
|
8
|
+
export * from './PropertyNode';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/libs/particles/index.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAA;AAChD,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masked.scene.d.ts","sourceRoot":"","sources":["../../../../src/scenes/masked.scene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,SAAS,CAAA;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD;;GAEG;AACH,8BAAsB,WAAY,SAAQ,aAAa;IACnD,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAsB;IAE5D;;;;;OAKG;IACH,SAAS,CAAC,IAAI,SAAI,EAAE,IAAI,SAAI,GAAG,IAAI,CAAC,QAAQ;
|
|
1
|
+
{"version":3,"file":"masked.scene.d.ts","sourceRoot":"","sources":["../../../../src/scenes/masked.scene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,SAAS,CAAA;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD;;GAEG;AACH,8BAAsB,WAAY,SAAQ,aAAa;IACnD,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAsB;IAE5D;;;;;OAKG;IACH,SAAS,CAAC,IAAI,SAAI,EAAE,IAAI,SAAI,GAAG,IAAI,CAAC,QAAQ;CAU/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../../vite.config.ts"],"names":[],"mappings":";AAMA,
|
|
1
|
+
{"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../../vite.config.ts"],"names":[],"mappings":";AAMA,wBAmCE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truelab/truengine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-rc.1",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/"
|
|
6
6
|
],
|
|
@@ -31,6 +31,12 @@
|
|
|
31
31
|
"types": "./dist/types/libs/nanostores.d.ts",
|
|
32
32
|
"default": "./dist/libs/nanostores.js"
|
|
33
33
|
}
|
|
34
|
+
},
|
|
35
|
+
"./libs/particles": {
|
|
36
|
+
"import": {
|
|
37
|
+
"types": "./dist/types/libs/particles.d.ts",
|
|
38
|
+
"default": "./dist/libs/particles.js"
|
|
39
|
+
}
|
|
34
40
|
}
|
|
35
41
|
},
|
|
36
42
|
"scripts": {
|
|
@@ -40,10 +46,8 @@
|
|
|
40
46
|
"build:watch": "vite build -w"
|
|
41
47
|
},
|
|
42
48
|
"dependencies": {
|
|
43
|
-
"@pixi-
|
|
44
|
-
"@pixi/
|
|
45
|
-
"@pixi/particle-emitter": "5.0.7",
|
|
46
|
-
"@pixi/sound": "^4.0.4",
|
|
49
|
+
"@esotericsoftware/spine-pixi-v8": "~4.3.9",
|
|
50
|
+
"@pixi/sound": "^6.0.1",
|
|
47
51
|
"@truelab/truelogic": "^3.2.2",
|
|
48
52
|
"@types/howler": "^2.2.12",
|
|
49
53
|
"@types/modernizr": "^3.5.3",
|
|
@@ -53,9 +57,8 @@
|
|
|
53
57
|
"howler": "^2.2.4",
|
|
54
58
|
"lil-gui": "^0.17.0",
|
|
55
59
|
"nanostores": "^1.1.0",
|
|
56
|
-
"pixi-
|
|
57
|
-
"pixi
|
|
58
|
-
"pixi.js": "^6.5.10",
|
|
60
|
+
"pixi-filters": "^6.1.5",
|
|
61
|
+
"pixi.js": "^8.19.0",
|
|
59
62
|
"webfontloader": "^1.6.28"
|
|
60
63
|
}
|
|
61
64
|
}
|