@dcl/ecs 7.31.1-41508430758.commit-0af8af0 → 7.32.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/components/extended/TouchScreenControls.d.ts +6 -0
- package/dist/components/extended/TouchScreenControls.js +36 -0
- package/dist/components/generated/EnvironmentFog.gen.d.ts +1 -0
- package/dist/components/generated/EnvironmentFog.gen.js +25 -0
- package/dist/components/generated/Skybox.gen.d.ts +1 -0
- package/dist/components/generated/Skybox.gen.js +25 -0
- package/dist/components/generated/Sun.gen.d.ts +1 -0
- package/dist/components/generated/Sun.gen.js +25 -0
- package/dist/components/generated/component-names.gen.js +3 -0
- package/dist/components/generated/global.gen.d.ts +6 -0
- package/dist/components/generated/global.gen.js +3 -0
- package/dist/components/generated/index.gen.d.ts +12 -0
- package/dist/components/generated/index.gen.js +15 -0
- package/dist/components/generated/pb/decentraland/common/gradient.gen.d.ts +36 -0
- package/dist/components/generated/pb/decentraland/common/gradient.gen.js +89 -0
- package/dist/components/generated/pb/decentraland/sdk/components/environment_fog.gen.d.ts +28 -0
- package/dist/components/generated/pb/decentraland/sdk/components/environment_fog.gen.js +51 -0
- package/dist/components/generated/pb/decentraland/sdk/components/skybox.gen.d.ts +93 -0
- package/dist/components/generated/pb/decentraland/sdk/components/skybox.gen.js +228 -0
- package/dist/components/generated/pb/decentraland/sdk/components/sun.gen.d.ts +37 -0
- package/dist/components/generated/pb/decentraland/sdk/components/sun.gen.js +70 -0
- package/dist/components/generated/types.gen.d.ts +1 -0
- package/dist/components/generated/types.gen.js +2 -0
- package/dist/components/index.d.ts +0 -5
- package/dist/components/index.js +2 -5
- package/dist/components/manual/Transform.d.ts +0 -9
- package/dist/components/manual/Transform.js +3 -3
- package/dist/components/types.d.ts +0 -1
- package/dist/engine/component.d.ts +1 -52
- package/dist/engine/grow-only-value-set-component-definition.js +2 -45
- package/dist/engine/lww-element-set-component-definition.d.ts +1 -3
- package/dist/engine/lww-element-set-component-definition.js +13 -68
- package/dist/index.d.ts +1 -2
- package/dist/index.js +0 -1
- package/dist/serialization/crdt/index.d.ts +0 -1
- package/dist/serialization/crdt/index.js +0 -1
- package/dist/serialization/crdt/network/utils.d.ts +9 -0
- package/dist/serialization/crdt/network/utils.js +60 -0
- package/dist/serialization/crdt/types.d.ts +3 -25
- package/dist/serialization/crdt/types.js +1 -3
- package/dist/systems/crdt/index.d.ts +1 -0
- package/dist/systems/crdt/index.js +143 -76
- package/dist/systems/crdt/types.d.ts +0 -10
- package/dist-cjs/components/extended/TouchScreenControls.d.ts +6 -0
- package/dist-cjs/components/extended/TouchScreenControls.js +36 -0
- package/dist-cjs/components/generated/EnvironmentFog.gen.d.ts +1 -0
- package/dist-cjs/components/generated/EnvironmentFog.gen.js +28 -0
- package/dist-cjs/components/generated/Skybox.gen.d.ts +1 -0
- package/dist-cjs/components/generated/Skybox.gen.js +28 -0
- package/dist-cjs/components/generated/Sun.gen.d.ts +1 -0
- package/dist-cjs/components/generated/Sun.gen.js +28 -0
- package/dist-cjs/components/generated/component-names.gen.js +3 -0
- package/dist-cjs/components/generated/global.gen.d.ts +6 -0
- package/dist-cjs/components/generated/global.gen.js +5 -2
- package/dist-cjs/components/generated/index.gen.d.ts +12 -0
- package/dist-cjs/components/generated/index.gen.js +20 -2
- package/dist-cjs/components/generated/pb/decentraland/common/gradient.gen.d.ts +36 -0
- package/dist-cjs/components/generated/pb/decentraland/common/gradient.gen.js +95 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/environment_fog.gen.d.ts +28 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/environment_fog.gen.js +57 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/skybox.gen.d.ts +93 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/skybox.gen.js +234 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/sun.gen.d.ts +37 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/sun.gen.js +76 -0
- package/dist-cjs/components/generated/types.gen.d.ts +1 -0
- package/dist-cjs/components/generated/types.gen.js +2 -0
- package/dist-cjs/components/index.d.ts +0 -5
- package/dist-cjs/components/index.js +3 -7
- package/dist-cjs/components/manual/Transform.d.ts +0 -9
- package/dist-cjs/components/manual/Transform.js +3 -3
- package/dist-cjs/components/types.d.ts +0 -1
- package/dist-cjs/engine/component.d.ts +1 -52
- package/dist-cjs/engine/grow-only-value-set-component-definition.js +1 -44
- package/dist-cjs/engine/lww-element-set-component-definition.d.ts +1 -3
- package/dist-cjs/engine/lww-element-set-component-definition.js +14 -71
- package/dist-cjs/index.d.ts +1 -2
- package/dist-cjs/index.js +1 -2
- package/dist-cjs/serialization/crdt/index.d.ts +0 -1
- package/dist-cjs/serialization/crdt/index.js +0 -1
- package/dist-cjs/serialization/crdt/network/utils.d.ts +9 -0
- package/dist-cjs/serialization/crdt/network/utils.js +67 -0
- package/dist-cjs/serialization/crdt/types.d.ts +3 -25
- package/dist-cjs/serialization/crdt/types.js +1 -3
- package/dist-cjs/systems/crdt/index.d.ts +1 -0
- package/dist-cjs/systems/crdt/index.js +166 -76
- package/dist-cjs/systems/crdt/types.d.ts +0 -10
- package/package.json +2 -2
- package/dist/components/manual/CreatedBy.d.ts +0 -9
- package/dist/components/manual/CreatedBy.js +0 -8
- package/dist/serialization/crdt/authoritativePutComponent.d.ts +0 -15
- package/dist/serialization/crdt/authoritativePutComponent.js +0 -47
- package/dist-cjs/components/manual/CreatedBy.d.ts +0 -9
- package/dist-cjs/components/manual/CreatedBy.js +0 -10
- package/dist-cjs/serialization/crdt/authoritativePutComponent.d.ts +0 -15
- package/dist-cjs/serialization/crdt/authoritativePutComponent.js +0 -50
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
import { ColorGradient } from "../../common/gradient.gen";
|
|
3
|
+
/**
|
|
4
|
+
* PBSkybox overrides the visible sky while the player is inside the scene.
|
|
5
|
+
* Valid only on the scene root entity (`engine.RootEntity`).
|
|
6
|
+
*
|
|
7
|
+
* An unset field keeps the time-of-day default.
|
|
8
|
+
* Gradient `time` is the normalized time of day: 0 = 00:00, 0.5 = 12:00, 1 = 24:00.
|
|
9
|
+
* Gradients do not wrap around midnight.
|
|
10
|
+
* The sun is controlled by `PBSun` and the fog by `PBEnvironmentFog`.
|
|
11
|
+
*
|
|
12
|
+
* While active, the overrides are global: they also change how neighbouring parcels look from inside the scene.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export interface PBSkybox {
|
|
18
|
+
/**
|
|
19
|
+
* Replaces the visible sky with an image, given as its source path with the same rules as `Texture.src`.
|
|
20
|
+
* It must be an equirectangular (latitude-longitude) image with a 2:1 aspect ratio:
|
|
21
|
+
* the image centre faces +Z, the top row is the zenith and the bottom row the nadir.
|
|
22
|
+
* Cube cross, 3x2 and six-face layouts are not supported.
|
|
23
|
+
* The sun, the fog and the ambient lighting do not change: the ambient still follows `sky_colors`.
|
|
24
|
+
*/
|
|
25
|
+
skyboxTexture?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Procedural sky colors. They also drive the ambient lighting, also while `skybox_texture` is set.
|
|
28
|
+
* While `skybox_texture` is set they no longer color the visible sky.
|
|
29
|
+
*/
|
|
30
|
+
skyColors?: PBSkybox_SkyColors | undefined;
|
|
31
|
+
/** Ignored while `skybox_texture` is set. */
|
|
32
|
+
clouds?: PBSkybox_Clouds | undefined;
|
|
33
|
+
/** Ignored while `skybox_texture` is set. */
|
|
34
|
+
stars?: PBSkybox_Stars | undefined;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export interface PBSkybox_SkyColors {
|
|
40
|
+
/** the sky straight up */
|
|
41
|
+
zenith?: ColorGradient | undefined;
|
|
42
|
+
/** the broad band of sky around the horizon */
|
|
43
|
+
horizon?: ColorGradient | undefined;
|
|
44
|
+
/** The sky below the horizon, visible wherever no terrain covers it (landscape disabled, high altitude). */
|
|
45
|
+
nadir?: ColorGradient | undefined;
|
|
46
|
+
/** Narrow glow right on the horizon line, like a sunset glow. Unset = follows `horizon` when that is set. */
|
|
47
|
+
rim?: ColorGradient | undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export interface PBSkybox_Clouds {
|
|
53
|
+
/** default = 1, from 0 to 1 */
|
|
54
|
+
opacity?: number | undefined;
|
|
55
|
+
/** default = 0.01, in radians per second around the sky axis (0.01 is one turn every ~10 minutes). 0 = static, negative reverses the direction */
|
|
56
|
+
speed?: number | undefined;
|
|
57
|
+
color?: ColorGradient | undefined;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
export interface PBSkybox_Stars {
|
|
63
|
+
/** default = 4.62, multiplier on the star texture (1 = as authored, values above 1 are HDR). 0 hides the stars, negative values clamp to 0. Stars are visible only at night */
|
|
64
|
+
brightness?: number | undefined;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
export declare namespace PBSkybox {
|
|
70
|
+
function encode(message: PBSkybox, writer?: _m0.Writer): _m0.Writer;
|
|
71
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
export declare namespace PBSkybox_SkyColors {
|
|
77
|
+
function encode(message: PBSkybox_SkyColors, writer?: _m0.Writer): _m0.Writer;
|
|
78
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox_SkyColors;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export declare namespace PBSkybox_Clouds {
|
|
84
|
+
function encode(message: PBSkybox_Clouds, writer?: _m0.Writer): _m0.Writer;
|
|
85
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox_Clouds;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
export declare namespace PBSkybox_Stars {
|
|
91
|
+
function encode(message: PBSkybox_Stars, writer?: _m0.Writer): _m0.Writer;
|
|
92
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox_Stars;
|
|
93
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { ColorGradient } from "../../common/gradient.gen";
|
|
4
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
5
|
+
function createBasePBSkybox() {
|
|
6
|
+
return { skyboxTexture: undefined, skyColors: undefined, clouds: undefined, stars: undefined };
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export var PBSkybox;
|
|
12
|
+
(function (PBSkybox) {
|
|
13
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
14
|
+
if (message.skyboxTexture !== undefined) {
|
|
15
|
+
writer.uint32(10).string(message.skyboxTexture);
|
|
16
|
+
}
|
|
17
|
+
if (message.skyColors !== undefined) {
|
|
18
|
+
PBSkybox_SkyColors.encode(message.skyColors, writer.uint32(18).fork()).ldelim();
|
|
19
|
+
}
|
|
20
|
+
if (message.clouds !== undefined) {
|
|
21
|
+
PBSkybox_Clouds.encode(message.clouds, writer.uint32(26).fork()).ldelim();
|
|
22
|
+
}
|
|
23
|
+
if (message.stars !== undefined) {
|
|
24
|
+
PBSkybox_Stars.encode(message.stars, writer.uint32(34).fork()).ldelim();
|
|
25
|
+
}
|
|
26
|
+
return writer;
|
|
27
|
+
}
|
|
28
|
+
PBSkybox.encode = encode;
|
|
29
|
+
function decode(input, length) {
|
|
30
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
31
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
32
|
+
const message = createBasePBSkybox();
|
|
33
|
+
while (reader.pos < end) {
|
|
34
|
+
const tag = reader.uint32();
|
|
35
|
+
switch (tag >>> 3) {
|
|
36
|
+
case 1:
|
|
37
|
+
if (tag !== 10) {
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
message.skyboxTexture = reader.string();
|
|
41
|
+
continue;
|
|
42
|
+
case 2:
|
|
43
|
+
if (tag !== 18) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
message.skyColors = PBSkybox_SkyColors.decode(reader, reader.uint32());
|
|
47
|
+
continue;
|
|
48
|
+
case 3:
|
|
49
|
+
if (tag !== 26) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
message.clouds = PBSkybox_Clouds.decode(reader, reader.uint32());
|
|
53
|
+
continue;
|
|
54
|
+
case 4:
|
|
55
|
+
if (tag !== 34) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
message.stars = PBSkybox_Stars.decode(reader, reader.uint32());
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
reader.skipType(tag & 7);
|
|
65
|
+
}
|
|
66
|
+
return message;
|
|
67
|
+
}
|
|
68
|
+
PBSkybox.decode = decode;
|
|
69
|
+
})(PBSkybox || (PBSkybox = {}));
|
|
70
|
+
function createBasePBSkybox_SkyColors() {
|
|
71
|
+
return { zenith: undefined, horizon: undefined, nadir: undefined, rim: undefined };
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
export var PBSkybox_SkyColors;
|
|
77
|
+
(function (PBSkybox_SkyColors) {
|
|
78
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
79
|
+
if (message.zenith !== undefined) {
|
|
80
|
+
ColorGradient.encode(message.zenith, writer.uint32(10).fork()).ldelim();
|
|
81
|
+
}
|
|
82
|
+
if (message.horizon !== undefined) {
|
|
83
|
+
ColorGradient.encode(message.horizon, writer.uint32(18).fork()).ldelim();
|
|
84
|
+
}
|
|
85
|
+
if (message.nadir !== undefined) {
|
|
86
|
+
ColorGradient.encode(message.nadir, writer.uint32(26).fork()).ldelim();
|
|
87
|
+
}
|
|
88
|
+
if (message.rim !== undefined) {
|
|
89
|
+
ColorGradient.encode(message.rim, writer.uint32(34).fork()).ldelim();
|
|
90
|
+
}
|
|
91
|
+
return writer;
|
|
92
|
+
}
|
|
93
|
+
PBSkybox_SkyColors.encode = encode;
|
|
94
|
+
function decode(input, length) {
|
|
95
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
96
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
97
|
+
const message = createBasePBSkybox_SkyColors();
|
|
98
|
+
while (reader.pos < end) {
|
|
99
|
+
const tag = reader.uint32();
|
|
100
|
+
switch (tag >>> 3) {
|
|
101
|
+
case 1:
|
|
102
|
+
if (tag !== 10) {
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
message.zenith = ColorGradient.decode(reader, reader.uint32());
|
|
106
|
+
continue;
|
|
107
|
+
case 2:
|
|
108
|
+
if (tag !== 18) {
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
message.horizon = ColorGradient.decode(reader, reader.uint32());
|
|
112
|
+
continue;
|
|
113
|
+
case 3:
|
|
114
|
+
if (tag !== 26) {
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
message.nadir = ColorGradient.decode(reader, reader.uint32());
|
|
118
|
+
continue;
|
|
119
|
+
case 4:
|
|
120
|
+
if (tag !== 34) {
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
message.rim = ColorGradient.decode(reader, reader.uint32());
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
reader.skipType(tag & 7);
|
|
130
|
+
}
|
|
131
|
+
return message;
|
|
132
|
+
}
|
|
133
|
+
PBSkybox_SkyColors.decode = decode;
|
|
134
|
+
})(PBSkybox_SkyColors || (PBSkybox_SkyColors = {}));
|
|
135
|
+
function createBasePBSkybox_Clouds() {
|
|
136
|
+
return { opacity: undefined, speed: undefined, color: undefined };
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
export var PBSkybox_Clouds;
|
|
142
|
+
(function (PBSkybox_Clouds) {
|
|
143
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
144
|
+
if (message.opacity !== undefined) {
|
|
145
|
+
writer.uint32(13).float(message.opacity);
|
|
146
|
+
}
|
|
147
|
+
if (message.speed !== undefined) {
|
|
148
|
+
writer.uint32(21).float(message.speed);
|
|
149
|
+
}
|
|
150
|
+
if (message.color !== undefined) {
|
|
151
|
+
ColorGradient.encode(message.color, writer.uint32(26).fork()).ldelim();
|
|
152
|
+
}
|
|
153
|
+
return writer;
|
|
154
|
+
}
|
|
155
|
+
PBSkybox_Clouds.encode = encode;
|
|
156
|
+
function decode(input, length) {
|
|
157
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
158
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
159
|
+
const message = createBasePBSkybox_Clouds();
|
|
160
|
+
while (reader.pos < end) {
|
|
161
|
+
const tag = reader.uint32();
|
|
162
|
+
switch (tag >>> 3) {
|
|
163
|
+
case 1:
|
|
164
|
+
if (tag !== 13) {
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
message.opacity = reader.float();
|
|
168
|
+
continue;
|
|
169
|
+
case 2:
|
|
170
|
+
if (tag !== 21) {
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
message.speed = reader.float();
|
|
174
|
+
continue;
|
|
175
|
+
case 3:
|
|
176
|
+
if (tag !== 26) {
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
message.color = ColorGradient.decode(reader, reader.uint32());
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
reader.skipType(tag & 7);
|
|
186
|
+
}
|
|
187
|
+
return message;
|
|
188
|
+
}
|
|
189
|
+
PBSkybox_Clouds.decode = decode;
|
|
190
|
+
})(PBSkybox_Clouds || (PBSkybox_Clouds = {}));
|
|
191
|
+
function createBasePBSkybox_Stars() {
|
|
192
|
+
return { brightness: undefined };
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* @public
|
|
196
|
+
*/
|
|
197
|
+
export var PBSkybox_Stars;
|
|
198
|
+
(function (PBSkybox_Stars) {
|
|
199
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
200
|
+
if (message.brightness !== undefined) {
|
|
201
|
+
writer.uint32(13).float(message.brightness);
|
|
202
|
+
}
|
|
203
|
+
return writer;
|
|
204
|
+
}
|
|
205
|
+
PBSkybox_Stars.encode = encode;
|
|
206
|
+
function decode(input, length) {
|
|
207
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
208
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
209
|
+
const message = createBasePBSkybox_Stars();
|
|
210
|
+
while (reader.pos < end) {
|
|
211
|
+
const tag = reader.uint32();
|
|
212
|
+
switch (tag >>> 3) {
|
|
213
|
+
case 1:
|
|
214
|
+
if (tag !== 13) {
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
message.brightness = reader.float();
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
reader.skipType(tag & 7);
|
|
224
|
+
}
|
|
225
|
+
return message;
|
|
226
|
+
}
|
|
227
|
+
PBSkybox_Stars.decode = decode;
|
|
228
|
+
})(PBSkybox_Stars || (PBSkybox_Stars = {}));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
import { ColorGradient } from "../../common/gradient.gen";
|
|
3
|
+
import { Vector3 } from "../../common/vectors.gen";
|
|
4
|
+
/**
|
|
5
|
+
* PBSun overrides the directional light (sun and moon) while the player is inside the scene.
|
|
6
|
+
* Valid only on the scene root entity (`engine.RootEntity`).
|
|
7
|
+
*
|
|
8
|
+
* An unset field keeps the time-of-day default.
|
|
9
|
+
* Gradient `time` is the normalized time of day: 0 = 00:00, 0.5 = 12:00, 1 = 24:00.
|
|
10
|
+
* Gradients do not wrap around midnight.
|
|
11
|
+
*
|
|
12
|
+
* While active, the overrides are global: they also change how neighbouring parcels look from inside the scene.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export interface PBSun {
|
|
18
|
+
/** tints the directional light and the sun disc */
|
|
19
|
+
color?: ColorGradient | undefined;
|
|
20
|
+
/** default = true. false hides the sun and moon discs and the lens flare, but not their light */
|
|
21
|
+
visible?: boolean | undefined;
|
|
22
|
+
/** default = 1, multiplier on the renderer's time-of-day light intensity. Negative values clamp to 0 */
|
|
23
|
+
intensity?: number | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Direction the sunlight travels, in scene space: (0,-1,0) = sun straight overhead. Normalized by the renderer.
|
|
26
|
+
* Set = the sun stays fixed at every time of day; its color and intensity still follow the time of day.
|
|
27
|
+
* Unset or zero = the time-of-day path.
|
|
28
|
+
*/
|
|
29
|
+
direction?: Vector3 | undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
export declare namespace PBSun {
|
|
35
|
+
function encode(message: PBSun, writer?: _m0.Writer): _m0.Writer;
|
|
36
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBSun;
|
|
37
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { ColorGradient } from "../../common/gradient.gen";
|
|
4
|
+
import { Vector3 } from "../../common/vectors.gen";
|
|
5
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
6
|
+
function createBasePBSun() {
|
|
7
|
+
return { color: undefined, visible: undefined, intensity: undefined, direction: undefined };
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export var PBSun;
|
|
13
|
+
(function (PBSun) {
|
|
14
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
15
|
+
if (message.color !== undefined) {
|
|
16
|
+
ColorGradient.encode(message.color, writer.uint32(10).fork()).ldelim();
|
|
17
|
+
}
|
|
18
|
+
if (message.visible !== undefined) {
|
|
19
|
+
writer.uint32(16).bool(message.visible);
|
|
20
|
+
}
|
|
21
|
+
if (message.intensity !== undefined) {
|
|
22
|
+
writer.uint32(29).float(message.intensity);
|
|
23
|
+
}
|
|
24
|
+
if (message.direction !== undefined) {
|
|
25
|
+
Vector3.encode(message.direction, writer.uint32(34).fork()).ldelim();
|
|
26
|
+
}
|
|
27
|
+
return writer;
|
|
28
|
+
}
|
|
29
|
+
PBSun.encode = encode;
|
|
30
|
+
function decode(input, length) {
|
|
31
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
32
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
33
|
+
const message = createBasePBSun();
|
|
34
|
+
while (reader.pos < end) {
|
|
35
|
+
const tag = reader.uint32();
|
|
36
|
+
switch (tag >>> 3) {
|
|
37
|
+
case 1:
|
|
38
|
+
if (tag !== 10) {
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
message.color = ColorGradient.decode(reader, reader.uint32());
|
|
42
|
+
continue;
|
|
43
|
+
case 2:
|
|
44
|
+
if (tag !== 16) {
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
message.visible = reader.bool();
|
|
48
|
+
continue;
|
|
49
|
+
case 3:
|
|
50
|
+
if (tag !== 29) {
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
message.intensity = reader.float();
|
|
54
|
+
continue;
|
|
55
|
+
case 4:
|
|
56
|
+
if (tag !== 34) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
message.direction = Vector3.decode(reader, reader.uint32());
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
reader.skipType(tag & 7);
|
|
66
|
+
}
|
|
67
|
+
return message;
|
|
68
|
+
}
|
|
69
|
+
PBSun.decode = decode;
|
|
70
|
+
})(PBSun || (PBSun = {}));
|
|
@@ -12,4 +12,5 @@ export * from './pb/decentraland/sdk/components/common/raycast_hit.gen';
|
|
|
12
12
|
export * from './pb/decentraland/sdk/components/common/texts.gen';
|
|
13
13
|
export * from './pb/decentraland/common/border_rect.gen';
|
|
14
14
|
export * from './pb/decentraland/common/floats.gen';
|
|
15
|
+
export * from './pb/decentraland/common/gradient.gen';
|
|
15
16
|
export * from './pb/decentraland/common/texture.gen';
|
|
@@ -21,5 +21,7 @@ export * from './pb/decentraland/common/border_rect.gen';
|
|
|
21
21
|
// export { PbBorderRect }
|
|
22
22
|
export * from './pb/decentraland/common/floats.gen';
|
|
23
23
|
// export { PbFloats }
|
|
24
|
+
export * from './pb/decentraland/common/gradient.gen';
|
|
25
|
+
// export { PbGradient }
|
|
24
26
|
export * from './pb/decentraland/common/texture.gen';
|
|
25
27
|
// export { PbTexture }
|
|
@@ -23,7 +23,6 @@ import { TriggerAreaComponentDefinitionExtended } from './extended/TriggerArea';
|
|
|
23
23
|
import { ParticleSystemComponentDefinitionExtended } from './extended/ParticleSystem';
|
|
24
24
|
import { TouchScreenControlsComponentDefinitionExtended } from './extended/TouchScreenControls';
|
|
25
25
|
import { TagsComponentDefinitionExtended } from './manual/Tags';
|
|
26
|
-
import { ICreatedByType } from './manual/CreatedBy';
|
|
27
26
|
export * from './generated/index.gen';
|
|
28
27
|
export type { GrowOnlyValueSetComponentDefinition, LastWriteWinElementSetComponentDefinition, LwwComponentGetter, GSetComponentGetter };
|
|
29
28
|
export declare const Transform: LwwComponentGetter<TransformComponentExtended>;
|
|
@@ -58,9 +57,5 @@ export declare const NetworkEntity: (engine: Pick<IEngine, 'defineComponent'>) =
|
|
|
58
57
|
* @alpha
|
|
59
58
|
*/
|
|
60
59
|
export declare const NetworkParent: (engine: Pick<IEngine, 'defineComponent'>) => LastWriteWinElementSetComponentDefinition<INetowrkParentType>;
|
|
61
|
-
/**
|
|
62
|
-
* @public
|
|
63
|
-
*/
|
|
64
|
-
export declare const CreatedBy: (engine: Pick<IEngine, 'defineComponent'>) => LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
65
60
|
export { MediaState };
|
|
66
61
|
export type { AudioAnalysisView };
|
package/dist/components/index.js
CHANGED
|
@@ -19,7 +19,6 @@ import { defineTriggerAreaComponent } from './extended/TriggerArea';
|
|
|
19
19
|
import { defineParticleSystemComponent } from './extended/ParticleSystem';
|
|
20
20
|
import { defineTouchScreenControlsComponent } from './extended/TouchScreenControls';
|
|
21
21
|
import defineTagsComponent from './manual/Tags';
|
|
22
|
-
import defineCreatedBy from './manual/CreatedBy';
|
|
23
22
|
export * from './generated/index.gen';
|
|
24
23
|
/* @__PURE__ */
|
|
25
24
|
export const Transform = (engine) => defineTransformComponent(engine);
|
|
@@ -66,13 +65,11 @@ export const SyncComponents = (engine) => defineSyncComponent(engine);
|
|
|
66
65
|
/**
|
|
67
66
|
* @alpha
|
|
68
67
|
*/
|
|
68
|
+
/* @__PURE__ */
|
|
69
69
|
export const NetworkEntity = (engine) => defineNetworkEntity(engine);
|
|
70
70
|
/**
|
|
71
71
|
* @alpha
|
|
72
72
|
*/
|
|
73
|
+
/* @__PURE__ */
|
|
73
74
|
export const NetworkParent = (engine) => defineNetworkParent(engine);
|
|
74
|
-
/**
|
|
75
|
-
* @public
|
|
76
|
-
*/
|
|
77
|
-
export const CreatedBy = (engine) => defineCreatedBy(engine);
|
|
78
75
|
export { MediaState };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LastWriteWinElementSetComponentDefinition, IEngine } from '../../engine';
|
|
2
2
|
import { Entity } from '../../engine/entity';
|
|
3
|
-
import type { ISchema } from '../../schemas/ISchema';
|
|
4
3
|
import type { Vector3Type } from '../../schemas/custom/Vector3';
|
|
5
4
|
/**
|
|
6
5
|
* @public
|
|
@@ -25,10 +24,6 @@ export interface TransformComponentExtended extends TransformComponent {
|
|
|
25
24
|
*/
|
|
26
25
|
localToWorldDirection(entity: Entity, localDirection: Vector3Type): Vector3Type;
|
|
27
26
|
}
|
|
28
|
-
/**
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
export declare const COMPONENT_ID = 1;
|
|
32
27
|
/**
|
|
33
28
|
* @public
|
|
34
29
|
*/
|
|
@@ -51,10 +46,6 @@ export type TransformType = {
|
|
|
51
46
|
};
|
|
52
47
|
parent?: Entity;
|
|
53
48
|
};
|
|
54
|
-
/** @public */
|
|
55
|
-
export declare const TRANSFORM_LENGTH = 44;
|
|
56
|
-
/** @public */
|
|
57
|
-
export declare const TransformSchema: ISchema<TransformType>;
|
|
58
49
|
/**
|
|
59
50
|
* @public
|
|
60
51
|
*/
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// getters via __importStar in CJS), so by the time methods are called all exports are available.
|
|
4
4
|
import * as treeHelpers from '../../runtime/helpers/tree';
|
|
5
5
|
/**
|
|
6
|
-
* @
|
|
6
|
+
* @internal
|
|
7
7
|
*/
|
|
8
8
|
export const COMPONENT_ID = 1;
|
|
9
|
-
/** @
|
|
9
|
+
/** @internal */
|
|
10
10
|
export const TRANSFORM_LENGTH = 44;
|
|
11
|
-
/** @
|
|
11
|
+
/** @internal */
|
|
12
12
|
export const TransformSchema = {
|
|
13
13
|
serialize(value, builder) {
|
|
14
14
|
const ptr = builder.incrementWriteOffset(TRANSFORM_LENGTH);
|
|
@@ -13,7 +13,6 @@ export type { TagsComponentDefinitionExtended, TagsType } from './manual/Tags';
|
|
|
13
13
|
export type { ISyncComponents, ISyncComponentsType } from './manual/SyncComponents';
|
|
14
14
|
export type { INetowrkEntity, INetowrkEntityType } from './manual/NetworkEntity';
|
|
15
15
|
export type { INetowrkParent, INetowrkParentType } from './manual/NetworkParent';
|
|
16
|
-
export type { ICreatedBy, ICreatedByType } from './manual/CreatedBy';
|
|
17
16
|
export type { InputModifierHelper, InputModifierComponentDefinitionExtended } from './extended/InputModifier';
|
|
18
17
|
export type { LightSourceHelper, LightSourceComponentDefinitionExtended } from './extended/LightSource';
|
|
19
18
|
export type { TriggerAreaComponentDefinitionExtended } from './extended/TriggerArea';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ISchema } from '../schemas';
|
|
2
2
|
import { ByteBuffer } from '../serialization/ByteBuffer';
|
|
3
|
-
import { CrdtMessageBody, DeleteComponentMessageBody,
|
|
3
|
+
import { CrdtMessageBody, DeleteComponentMessageBody, PutComponentMessageBody } from '../serialization/crdt';
|
|
4
4
|
import { Entity } from './entity';
|
|
5
5
|
import { DeepReadonly, DeepReadonlySet } from './readonly';
|
|
6
6
|
/**
|
|
@@ -70,58 +70,7 @@ export interface BaseComponent<T> {
|
|
|
70
70
|
* If the value is undefined, the component was deleted.
|
|
71
71
|
*/
|
|
72
72
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
73
|
-
/**
|
|
74
|
-
* @public
|
|
75
|
-
*
|
|
76
|
-
*/
|
|
77
|
-
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
78
|
-
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
79
|
-
/**
|
|
80
|
-
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
81
|
-
* @param entity - Entity to get the CRDT state for
|
|
82
|
-
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
83
|
-
* @public
|
|
84
|
-
*/
|
|
85
|
-
getCrdtState(entity: Entity): {
|
|
86
|
-
data: Uint8Array;
|
|
87
|
-
timestamp: number;
|
|
88
|
-
} | null;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
92
|
-
* This is not exposed to users, only for internal SDK operations
|
|
93
|
-
*/
|
|
94
|
-
export interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
95
|
-
/**
|
|
96
|
-
* @public
|
|
97
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
98
|
-
*/
|
|
99
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
100
|
-
/**
|
|
101
|
-
* @public
|
|
102
|
-
* Get the iterator to every entity has the component
|
|
103
|
-
*/
|
|
104
|
-
iterator(): Iterable<[Entity, any]>;
|
|
105
|
-
/**
|
|
106
|
-
* @public
|
|
107
|
-
*/
|
|
108
|
-
dirtyIterator(): Iterable<Entity>;
|
|
109
|
-
/**
|
|
110
|
-
* @public
|
|
111
|
-
*/
|
|
112
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
113
|
-
/**
|
|
114
|
-
* @public
|
|
115
|
-
*/
|
|
116
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
117
73
|
}
|
|
118
|
-
export type ValidateCallback<T> = (value: {
|
|
119
|
-
entity: Entity;
|
|
120
|
-
currentValue: T | undefined;
|
|
121
|
-
newValue: T | undefined;
|
|
122
|
-
senderAddress: string;
|
|
123
|
-
createdBy: string;
|
|
124
|
-
}) => boolean;
|
|
125
74
|
/**
|
|
126
75
|
* @public
|
|
127
76
|
*/
|