@dcl/protocol 1.0.0-23348796189.commit-2417808 → 1.0.0-23951495761.commit-bf007b9
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/out-js/decentraland/common/colors.gen.d.ts +13 -0
- package/out-js/decentraland/common/colors.gen.js +72 -1
- package/out-js/decentraland/common/colors.gen.js.map +1 -1
- package/out-ts/decentraland/common/colors.gen.ts +79 -0
- package/package.json +2 -2
- package/proto/decentraland/common/colors.proto +6 -0
- package/proto/decentraland/common/floats.proto +8 -0
- package/proto/decentraland/sdk/components/particle_system.proto +129 -0
|
@@ -11,6 +11,11 @@ export interface Color4 {
|
|
|
11
11
|
b: number;
|
|
12
12
|
a: number;
|
|
13
13
|
}
|
|
14
|
+
/** A range of Color4 values. Randomized or lerped between start and end. */
|
|
15
|
+
export interface ColorRange {
|
|
16
|
+
start: Color4 | undefined;
|
|
17
|
+
end: Color4 | undefined;
|
|
18
|
+
}
|
|
14
19
|
export declare namespace Color3 {
|
|
15
20
|
function encode(message: Color3, writer?: _m0.Writer): _m0.Writer;
|
|
16
21
|
function decode(input: _m0.Reader | Uint8Array, length?: number): Color3;
|
|
@@ -27,6 +32,14 @@ export declare namespace Color4 {
|
|
|
27
32
|
function create<I extends Exact<DeepPartial<Color4>, I>>(base?: I): Color4;
|
|
28
33
|
function fromPartial<I extends Exact<DeepPartial<Color4>, I>>(object: I): Color4;
|
|
29
34
|
}
|
|
35
|
+
export declare namespace ColorRange {
|
|
36
|
+
function encode(message: ColorRange, writer?: _m0.Writer): _m0.Writer;
|
|
37
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): ColorRange;
|
|
38
|
+
function fromJSON(object: any): ColorRange;
|
|
39
|
+
function toJSON(message: ColorRange): unknown;
|
|
40
|
+
function create<I extends Exact<DeepPartial<ColorRange>, I>>(base?: I): ColorRange;
|
|
41
|
+
function fromPartial<I extends Exact<DeepPartial<ColorRange>, I>>(object: I): ColorRange;
|
|
42
|
+
}
|
|
30
43
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
31
44
|
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|
|
32
45
|
$case: string;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Color4 = exports.Color3 = exports.protobufPackage = void 0;
|
|
6
|
+
exports.ColorRange = exports.Color4 = exports.Color3 = exports.protobufPackage = void 0;
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
9
|
exports.protobufPackage = "decentraland.common";
|
|
@@ -183,6 +183,77 @@ var Color4;
|
|
|
183
183
|
}
|
|
184
184
|
Color4.fromPartial = fromPartial;
|
|
185
185
|
})(Color4 || (exports.Color4 = Color4 = {}));
|
|
186
|
+
function createBaseColorRange() {
|
|
187
|
+
return { start: undefined, end: undefined };
|
|
188
|
+
}
|
|
189
|
+
var ColorRange;
|
|
190
|
+
(function (ColorRange) {
|
|
191
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
192
|
+
if (message.start !== undefined) {
|
|
193
|
+
Color4.encode(message.start, writer.uint32(10).fork()).ldelim();
|
|
194
|
+
}
|
|
195
|
+
if (message.end !== undefined) {
|
|
196
|
+
Color4.encode(message.end, writer.uint32(18).fork()).ldelim();
|
|
197
|
+
}
|
|
198
|
+
return writer;
|
|
199
|
+
}
|
|
200
|
+
ColorRange.encode = encode;
|
|
201
|
+
function decode(input, length) {
|
|
202
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
203
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
204
|
+
const message = createBaseColorRange();
|
|
205
|
+
while (reader.pos < end) {
|
|
206
|
+
const tag = reader.uint32();
|
|
207
|
+
switch (tag >>> 3) {
|
|
208
|
+
case 1:
|
|
209
|
+
if (tag !== 10) {
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
message.start = Color4.decode(reader, reader.uint32());
|
|
213
|
+
continue;
|
|
214
|
+
case 2:
|
|
215
|
+
if (tag !== 18) {
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
message.end = Color4.decode(reader, reader.uint32());
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
reader.skipType(tag & 7);
|
|
225
|
+
}
|
|
226
|
+
return message;
|
|
227
|
+
}
|
|
228
|
+
ColorRange.decode = decode;
|
|
229
|
+
function fromJSON(object) {
|
|
230
|
+
return {
|
|
231
|
+
start: isSet(object.start) ? Color4.fromJSON(object.start) : undefined,
|
|
232
|
+
end: isSet(object.end) ? Color4.fromJSON(object.end) : undefined,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
ColorRange.fromJSON = fromJSON;
|
|
236
|
+
function toJSON(message) {
|
|
237
|
+
const obj = {};
|
|
238
|
+
message.start !== undefined && (obj.start = message.start ? Color4.toJSON(message.start) : undefined);
|
|
239
|
+
message.end !== undefined && (obj.end = message.end ? Color4.toJSON(message.end) : undefined);
|
|
240
|
+
return obj;
|
|
241
|
+
}
|
|
242
|
+
ColorRange.toJSON = toJSON;
|
|
243
|
+
function create(base) {
|
|
244
|
+
return ColorRange.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
245
|
+
}
|
|
246
|
+
ColorRange.create = create;
|
|
247
|
+
function fromPartial(object) {
|
|
248
|
+
const message = createBaseColorRange();
|
|
249
|
+
message.start = (object.start !== undefined && object.start !== null)
|
|
250
|
+
? Color4.fromPartial(object.start)
|
|
251
|
+
: undefined;
|
|
252
|
+
message.end = (object.end !== undefined && object.end !== null) ? Color4.fromPartial(object.end) : undefined;
|
|
253
|
+
return message;
|
|
254
|
+
}
|
|
255
|
+
ColorRange.fromPartial = fromPartial;
|
|
256
|
+
})(ColorRange || (exports.ColorRange = ColorRange = {}));
|
|
186
257
|
function isSet(value) {
|
|
187
258
|
return value !== null && value !== undefined;
|
|
188
259
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.gen.js","sourceRoot":"","sources":["../../../out-ts/decentraland/common/colors.gen.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,iEAAqC;AAExB,QAAA,eAAe,GAAG,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"colors.gen.js","sourceRoot":"","sources":["../../../out-ts/decentraland/common/colors.gen.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,iEAAqC;AAExB,QAAA,eAAe,GAAG,qBAAqB,CAAC;AAqBrD,SAAS,gBAAgB;IACvB,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAC9B,CAAC;AAED,IAAiB,MAAM,CA8EtB;AA9ED,WAAiB,MAAM;IACrB,SAAgB,MAAM,CAAC,OAAe,EAAE,SAAqB,iBAAG,CAAC,MAAM,CAAC,MAAM,EAAE;QAC9E,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;YACpB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;YACpB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;YACpB,MAAM,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9F,OAAO,GAAG,CAAC;IACb,CAAC;IALe,iBAAM,SAKrB,CAAA;IAED,SAAgB,MAAM,CAA8C,IAAQ;QAC1E,OAAO,UAAU,CAAC,WAAW,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC,CAAC;IAC5C,CAAC;IAFe,iBAAM,SAErB,CAAA;IAED,SAAgB,WAAW,CAA8C,MAAS;QAChF,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;QACvC,OAAO,CAAC,KAAK,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC;YACnE,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC;YAClC,CAAC,CAAC,SAAS,CAAC;QACd,OAAO,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,KAAK,SAAS,IAAI,MAAM,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7G,OAAO,OAAO,CAAC;IACjB,CAAC;IAPe,sBAAW,cAO1B,CAAA;AACH,CAAC,EAnEgB,UAAU,0BAAV,UAAU,QAmE1B;AAcD,SAAS,KAAK,CAAC,KAAU;IACvB,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC"}
|
|
@@ -16,6 +16,12 @@ export interface Color4 {
|
|
|
16
16
|
a: number;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/** A range of Color4 values. Randomized or lerped between start and end. */
|
|
20
|
+
export interface ColorRange {
|
|
21
|
+
start: Color4 | undefined;
|
|
22
|
+
end: Color4 | undefined;
|
|
23
|
+
}
|
|
24
|
+
|
|
19
25
|
function createBaseColor3(): Color3 {
|
|
20
26
|
return { r: 0, g: 0, b: 0 };
|
|
21
27
|
}
|
|
@@ -197,6 +203,79 @@ export namespace Color4 {
|
|
|
197
203
|
}
|
|
198
204
|
}
|
|
199
205
|
|
|
206
|
+
function createBaseColorRange(): ColorRange {
|
|
207
|
+
return { start: undefined, end: undefined };
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export namespace ColorRange {
|
|
211
|
+
export function encode(message: ColorRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
212
|
+
if (message.start !== undefined) {
|
|
213
|
+
Color4.encode(message.start, writer.uint32(10).fork()).ldelim();
|
|
214
|
+
}
|
|
215
|
+
if (message.end !== undefined) {
|
|
216
|
+
Color4.encode(message.end, writer.uint32(18).fork()).ldelim();
|
|
217
|
+
}
|
|
218
|
+
return writer;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): ColorRange {
|
|
222
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
223
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
224
|
+
const message = createBaseColorRange();
|
|
225
|
+
while (reader.pos < end) {
|
|
226
|
+
const tag = reader.uint32();
|
|
227
|
+
switch (tag >>> 3) {
|
|
228
|
+
case 1:
|
|
229
|
+
if (tag !== 10) {
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
message.start = Color4.decode(reader, reader.uint32());
|
|
234
|
+
continue;
|
|
235
|
+
case 2:
|
|
236
|
+
if (tag !== 18) {
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
message.end = Color4.decode(reader, reader.uint32());
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
reader.skipType(tag & 7);
|
|
247
|
+
}
|
|
248
|
+
return message;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export function fromJSON(object: any): ColorRange {
|
|
252
|
+
return {
|
|
253
|
+
start: isSet(object.start) ? Color4.fromJSON(object.start) : undefined,
|
|
254
|
+
end: isSet(object.end) ? Color4.fromJSON(object.end) : undefined,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export function toJSON(message: ColorRange): unknown {
|
|
259
|
+
const obj: any = {};
|
|
260
|
+
message.start !== undefined && (obj.start = message.start ? Color4.toJSON(message.start) : undefined);
|
|
261
|
+
message.end !== undefined && (obj.end = message.end ? Color4.toJSON(message.end) : undefined);
|
|
262
|
+
return obj;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export function create<I extends Exact<DeepPartial<ColorRange>, I>>(base?: I): ColorRange {
|
|
266
|
+
return ColorRange.fromPartial(base ?? {});
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export function fromPartial<I extends Exact<DeepPartial<ColorRange>, I>>(object: I): ColorRange {
|
|
270
|
+
const message = createBaseColorRange();
|
|
271
|
+
message.start = (object.start !== undefined && object.start !== null)
|
|
272
|
+
? Color4.fromPartial(object.start)
|
|
273
|
+
: undefined;
|
|
274
|
+
message.end = (object.end !== undefined && object.end !== null) ? Color4.fromPartial(object.end) : undefined;
|
|
275
|
+
return message;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
200
279
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
201
280
|
|
|
202
281
|
export type DeepPartial<T> = T extends Builtin ? T
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/protocol",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-23951495761.commit-bf007b9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "decentraland/protocol.git",
|
|
6
6
|
"homepage": "https://github.com/decentraland/protocol#readme",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"out-js",
|
|
31
31
|
"public"
|
|
32
32
|
],
|
|
33
|
-
"commit": "
|
|
33
|
+
"commit": "bf007b91c1558bcf8fe53c0e14ae434303d0c646"
|
|
34
34
|
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package decentraland.sdk.components;
|
|
4
|
+
|
|
5
|
+
import "decentraland/common/colors.proto";
|
|
6
|
+
import "decentraland/common/floats.proto";
|
|
7
|
+
import "decentraland/common/texture.proto";
|
|
8
|
+
import "decentraland/common/vectors.proto";
|
|
9
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
10
|
+
|
|
11
|
+
option (common.ecs_component_id) = 1217;
|
|
12
|
+
|
|
13
|
+
message PBParticleSystem {
|
|
14
|
+
// --- Emission ---
|
|
15
|
+
optional bool active = 1; // default = true
|
|
16
|
+
optional float rate = 2; // default = 10. Particles emitted per second.
|
|
17
|
+
optional uint32 max_particles = 3; // default = 1000. Maximum number of live particles.
|
|
18
|
+
optional float lifetime = 4; // default = 5. Particle lifetime in seconds.
|
|
19
|
+
|
|
20
|
+
// --- Motion ---
|
|
21
|
+
optional float gravity = 5; // default = 0. Multiplier of Explorer's physics engine Gravity (normally -9.81)
|
|
22
|
+
optional decentraland.common.Vector3 additional_force = 6; // Constant force vector applied to each particle (world space).
|
|
23
|
+
|
|
24
|
+
// --- Size ---
|
|
25
|
+
optional decentraland.common.FloatRange initial_size = 7; // default = {1, 1}. Particle size at spawn.
|
|
26
|
+
optional decentraland.common.FloatRange size_over_time = 8; // default = {1, 1}. Particle size lerped from start to end over its lifetime.
|
|
27
|
+
|
|
28
|
+
// --- Rotation ---
|
|
29
|
+
optional decentraland.common.Quaternion initial_rotation = 9; // default = identity (0,0,0,1). 3D start rotation for each particle.
|
|
30
|
+
optional decentraland.common.Quaternion rotation_over_time = 10; // default = identity (0,0,0,1). Per-axis angular velocity as quaternion; converted to Euler XYZ.
|
|
31
|
+
optional bool face_travel_direction = 28; // default = false. Particles orient along their velocity direction.
|
|
32
|
+
|
|
33
|
+
// --- Color ---
|
|
34
|
+
optional decentraland.common.ColorRange initial_color = 11; // default = {white, white}. Particle color at spawn, randomized between start and end.
|
|
35
|
+
optional decentraland.common.ColorRange color_over_time = 12; // default = {white, white}. Particle color lerped from start to end over its lifetime.
|
|
36
|
+
|
|
37
|
+
// --- Velocity ---
|
|
38
|
+
optional decentraland.common.FloatRange initial_velocity_speed = 13; // default = {1, 1}. Initial speed in m/s, randomized between start and end.
|
|
39
|
+
|
|
40
|
+
// --- Rendering ---
|
|
41
|
+
optional decentraland.common.Texture texture = 14; // Particle texture. default = null (plain white quad).
|
|
42
|
+
optional BlendMode blend_mode = 15; // default = PSB_ALPHA
|
|
43
|
+
optional bool billboard = 16; // default = true
|
|
44
|
+
|
|
45
|
+
// --- Sprite Sheet Animation ---
|
|
46
|
+
optional SpriteSheetAnimation sprite_sheet = 17;
|
|
47
|
+
|
|
48
|
+
// --- Emitter Shape ---
|
|
49
|
+
oneof shape {
|
|
50
|
+
Point point = 18;
|
|
51
|
+
Sphere sphere = 19;
|
|
52
|
+
Cone cone = 20;
|
|
53
|
+
Box box = 21;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// --- Simulation ---
|
|
57
|
+
optional bool loop = 24; // default = true. Loop the emission cycle.
|
|
58
|
+
optional bool prewarm = 25; // default = false. Start as if already simulated for one full loop cycle. Requires loop = true.
|
|
59
|
+
optional SimulationSpace simulation_space = 27; // default = PSS_LOCAL. Controls whether particles simulate in local or world space.
|
|
60
|
+
|
|
61
|
+
// --- Limit Velocity Over Lifetime ---
|
|
62
|
+
optional LimitVelocity limit_velocity = 26; // Clamps particle speed over its lifetime.
|
|
63
|
+
|
|
64
|
+
// --- Playback ---
|
|
65
|
+
optional PlaybackState playback_state = 22; // default = PS_PLAYING
|
|
66
|
+
|
|
67
|
+
// --- Emission Bursts ---
|
|
68
|
+
repeated Burst bursts = 29;
|
|
69
|
+
|
|
70
|
+
// ---- Nested types ----
|
|
71
|
+
|
|
72
|
+
// Sprite sheet (texture atlas) animation settings.
|
|
73
|
+
message SpriteSheetAnimation {
|
|
74
|
+
uint32 tiles_x = 1; // Number of columns in the sprite sheet.
|
|
75
|
+
uint32 tiles_y = 2; // Number of rows in the sprite sheet.
|
|
76
|
+
optional float frames_per_second = 3; // default = 30. Playback speed in frames per second.
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Clamps particle speed over lifetime.
|
|
80
|
+
message LimitVelocity {
|
|
81
|
+
float speed = 1; // Maximum particle speed (m/s).
|
|
82
|
+
optional float dampen = 2; // default = 1. Fraction (0–1) of excess velocity removed per frame. 1 = hard clamp.
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Emitter spawns particles from a single point.
|
|
86
|
+
message Point {}
|
|
87
|
+
|
|
88
|
+
// Emitter spawns particles from the surface or volume of a sphere.
|
|
89
|
+
message Sphere {
|
|
90
|
+
optional float radius = 1; // default = 1
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Emitter spawns particles from the base of a cone and projects them outward.
|
|
94
|
+
message Cone {
|
|
95
|
+
optional float angle = 1; // default = 25. Half-angle of the cone in degrees.
|
|
96
|
+
optional float radius = 2; // default = 1. Base radius in meters.
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Emitter spawns particles from the surface or volume of a box.
|
|
100
|
+
message Box {
|
|
101
|
+
optional decentraland.common.Vector3 size = 1; // default = {1, 1, 1}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Emission burst configuration.
|
|
105
|
+
message Burst {
|
|
106
|
+
float time = 1; // Seconds from start of cycle.
|
|
107
|
+
uint32 count = 2; // Particles to emit.
|
|
108
|
+
optional int32 cycles = 3; // default = 1. Repeat count (0 = infinite).
|
|
109
|
+
optional float interval = 4; // default = 0.01. Seconds between cycles.
|
|
110
|
+
optional float probability = 5; // default = 1.0. Emission chance [0,1].
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
enum BlendMode {
|
|
114
|
+
PSB_ALPHA = 0; // Standard alpha transparency.
|
|
115
|
+
PSB_ADD = 1; // Additive blending (brightens underlying pixels).
|
|
116
|
+
PSB_MULTIPLY = 2; // Multiply blending (darkens underlying pixels).
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
enum PlaybackState {
|
|
120
|
+
PS_PLAYING = 0; // Particle system is emitting and simulating.
|
|
121
|
+
PS_PAUSED = 1; // Simulation is frozen; no new particles are emitted.
|
|
122
|
+
PS_STOPPED = 2; // Simulation stopped and existing particles cleared.
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
enum SimulationSpace {
|
|
126
|
+
PSS_LOCAL = 0; // Particles move with the entity transform.
|
|
127
|
+
PSS_WORLD = 1; // Particles stay in world position after emission.
|
|
128
|
+
}
|
|
129
|
+
}
|