@dcl/ecs 7.31.1-41508430758.commit-0af8af0 → 7.31.1-41669733463.commit-b1b1d79
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/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-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/package.json +2 -2
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.componentDefinitionByName = exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInputBinding = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = void 0;
|
|
17
|
+
exports.TriggerAreaResult = exports.TriggerArea = exports.TouchScreenControls = exports.TextShape = exports.Sun = exports.SkyboxTime = exports.Skybox = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.PhysicsCombinedImpulse = exports.PhysicsCombinedForce = exports.ParticleSystem = exports.NftShape = exports.MeshRenderer = exports.MeshCollider = exports.Material = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.ExplorerUiEventsResult = exports.ExplorerItemPurchaseResult = exports.EnvironmentFog = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarNametag = exports.AvatarModifierArea = exports.AvatarLocomotionSettings = exports.AvatarEquippedData = exports.AvatarEmoteCommand = exports.AvatarBase = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.AudioEvent = exports.AudioAnalysis = exports.AssetLoadLoadingState = exports.AssetLoad = exports.Animator = void 0;
|
|
18
|
+
exports.componentDefinitionByName = exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInputBinding = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.Tween = void 0;
|
|
19
19
|
const Animator_gen_1 = require("./Animator.gen");
|
|
20
20
|
const AssetLoad_gen_1 = require("./AssetLoad.gen");
|
|
21
21
|
const AssetLoadLoadingState_gen_1 = require("./AssetLoadLoadingState.gen");
|
|
@@ -35,6 +35,7 @@ const Billboard_gen_1 = require("./Billboard.gen");
|
|
|
35
35
|
const CameraMode_gen_1 = require("./CameraMode.gen");
|
|
36
36
|
const CameraModeArea_gen_1 = require("./CameraModeArea.gen");
|
|
37
37
|
const EngineInfo_gen_1 = require("./EngineInfo.gen");
|
|
38
|
+
const EnvironmentFog_gen_1 = require("./EnvironmentFog.gen");
|
|
38
39
|
const ExplorerItemPurchaseResult_gen_1 = require("./ExplorerItemPurchaseResult.gen");
|
|
39
40
|
const ExplorerUiEventsResult_gen_1 = require("./ExplorerUiEventsResult.gen");
|
|
40
41
|
const GltfContainer_gen_1 = require("./GltfContainer.gen");
|
|
@@ -58,7 +59,9 @@ const PrimaryPointerInfo_gen_1 = require("./PrimaryPointerInfo.gen");
|
|
|
58
59
|
const Raycast_gen_1 = require("./Raycast.gen");
|
|
59
60
|
const RaycastResult_gen_1 = require("./RaycastResult.gen");
|
|
60
61
|
const RealmInfo_gen_1 = require("./RealmInfo.gen");
|
|
62
|
+
const Skybox_gen_1 = require("./Skybox.gen");
|
|
61
63
|
const SkyboxTime_gen_1 = require("./SkyboxTime.gen");
|
|
64
|
+
const Sun_gen_1 = require("./Sun.gen");
|
|
62
65
|
const TextShape_gen_1 = require("./TextShape.gen");
|
|
63
66
|
const TouchScreenControls_gen_1 = require("./TouchScreenControls.gen");
|
|
64
67
|
const TriggerArea_gen_1 = require("./TriggerArea.gen");
|
|
@@ -98,6 +101,7 @@ __exportStar(require("./pb/decentraland/sdk/components/billboard.gen"), exports)
|
|
|
98
101
|
__exportStar(require("./pb/decentraland/sdk/components/camera_mode.gen"), exports);
|
|
99
102
|
__exportStar(require("./pb/decentraland/sdk/components/camera_mode_area.gen"), exports);
|
|
100
103
|
__exportStar(require("./pb/decentraland/sdk/components/engine_info.gen"), exports);
|
|
104
|
+
__exportStar(require("./pb/decentraland/sdk/components/environment_fog.gen"), exports);
|
|
101
105
|
__exportStar(require("./pb/decentraland/sdk/components/explorer_item_purchase_result.gen"), exports);
|
|
102
106
|
__exportStar(require("./pb/decentraland/sdk/components/explorer_ui_events_result.gen"), exports);
|
|
103
107
|
__exportStar(require("./pb/decentraland/sdk/components/gltf_container.gen"), exports);
|
|
@@ -121,7 +125,9 @@ __exportStar(require("./pb/decentraland/sdk/components/primary_pointer_info.gen"
|
|
|
121
125
|
__exportStar(require("./pb/decentraland/sdk/components/raycast.gen"), exports);
|
|
122
126
|
__exportStar(require("./pb/decentraland/sdk/components/raycast_result.gen"), exports);
|
|
123
127
|
__exportStar(require("./pb/decentraland/sdk/components/realm_info.gen"), exports);
|
|
128
|
+
__exportStar(require("./pb/decentraland/sdk/components/skybox.gen"), exports);
|
|
124
129
|
__exportStar(require("./pb/decentraland/sdk/components/skybox_time.gen"), exports);
|
|
130
|
+
__exportStar(require("./pb/decentraland/sdk/components/sun.gen"), exports);
|
|
125
131
|
__exportStar(require("./pb/decentraland/sdk/components/text_shape.gen"), exports);
|
|
126
132
|
__exportStar(require("./pb/decentraland/sdk/components/touch_screen_controls.gen"), exports);
|
|
127
133
|
__exportStar(require("./pb/decentraland/sdk/components/trigger_area.gen"), exports);
|
|
@@ -205,6 +211,9 @@ exports.CameraModeArea = CameraModeArea;
|
|
|
205
211
|
/** @public */ const EngineInfo = engine =>
|
|
206
212
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::EngineInfo", EngineInfo_gen_1.EngineInfoSchema);
|
|
207
213
|
exports.EngineInfo = EngineInfo;
|
|
214
|
+
/** @public */ const EnvironmentFog = engine =>
|
|
215
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::EnvironmentFog", EnvironmentFog_gen_1.EnvironmentFogSchema);
|
|
216
|
+
exports.EnvironmentFog = EnvironmentFog;
|
|
208
217
|
/** @public */ const ExplorerItemPurchaseResult = (engine) => /* @__PURE__ */ engine.defineValueSetComponentFromSchema("core::ExplorerItemPurchaseResult", ExplorerItemPurchaseResult_gen_1.ExplorerItemPurchaseResultSchema, {
|
|
209
218
|
timestampFunction: (t) => t.timestamp,
|
|
210
219
|
maxElements: 100
|
|
@@ -280,9 +289,15 @@ exports.RaycastResult = RaycastResult;
|
|
|
280
289
|
/** @public */ const RealmInfo = engine =>
|
|
281
290
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::RealmInfo", RealmInfo_gen_1.RealmInfoSchema);
|
|
282
291
|
exports.RealmInfo = RealmInfo;
|
|
292
|
+
/** @public */ const Skybox = engine =>
|
|
293
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::Skybox", Skybox_gen_1.SkyboxSchema);
|
|
294
|
+
exports.Skybox = Skybox;
|
|
283
295
|
/** @public */ const SkyboxTime = engine =>
|
|
284
296
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::SkyboxTime", SkyboxTime_gen_1.SkyboxTimeSchema);
|
|
285
297
|
exports.SkyboxTime = SkyboxTime;
|
|
298
|
+
/** @public */ const Sun = engine =>
|
|
299
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::Sun", Sun_gen_1.SunSchema);
|
|
300
|
+
exports.Sun = Sun;
|
|
286
301
|
/** @public */ const TextShape = engine =>
|
|
287
302
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::TextShape", TextShape_gen_1.TextShapeSchema);
|
|
288
303
|
exports.TextShape = TextShape;
|
|
@@ -368,6 +383,7 @@ exports.componentDefinitionByName = {
|
|
|
368
383
|
"core::CameraMode": exports.CameraMode,
|
|
369
384
|
"core::CameraModeArea": exports.CameraModeArea,
|
|
370
385
|
"core::EngineInfo": exports.EngineInfo,
|
|
386
|
+
"core::EnvironmentFog": exports.EnvironmentFog,
|
|
371
387
|
"core::ExplorerItemPurchaseResult": exports.ExplorerItemPurchaseResult,
|
|
372
388
|
"core::ExplorerUiEventsResult": exports.ExplorerUiEventsResult,
|
|
373
389
|
"core::GltfContainer": exports.GltfContainer,
|
|
@@ -391,7 +407,9 @@ exports.componentDefinitionByName = {
|
|
|
391
407
|
"core::Raycast": exports.Raycast,
|
|
392
408
|
"core::RaycastResult": exports.RaycastResult,
|
|
393
409
|
"core::RealmInfo": exports.RealmInfo,
|
|
410
|
+
"core::Skybox": exports.Skybox,
|
|
394
411
|
"core::SkyboxTime": exports.SkyboxTime,
|
|
412
|
+
"core::Sun": exports.Sun,
|
|
395
413
|
"core::TextShape": exports.TextShape,
|
|
396
414
|
"core::TouchScreenControls": exports.TouchScreenControls,
|
|
397
415
|
"core::TriggerArea": exports.TriggerArea,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
import { Color4 } from "./colors.gen";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface ColorKey {
|
|
7
|
+
/** position along the gradient, from 0 to 1. Values outside that range clamp to it */
|
|
8
|
+
time: number;
|
|
9
|
+
/** linear color. Values above 1 are allowed (HDR) */
|
|
10
|
+
color: Color4 | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Piecewise-linear, with keys interpolated in ascending order of `time`. Positions before the first key
|
|
14
|
+
* or after the last key take that key's color. No keys means the gradient is unset.
|
|
15
|
+
* If two keys have the same `time`, then the gradient keeps the key that comes later in `keys`.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export interface ColorGradient {
|
|
21
|
+
keys: ColorKey[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare namespace ColorKey {
|
|
27
|
+
function encode(message: ColorKey, writer?: _m0.Writer): _m0.Writer;
|
|
28
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): ColorKey;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
export declare namespace ColorGradient {
|
|
34
|
+
function encode(message: ColorGradient, writer?: _m0.Writer): _m0.Writer;
|
|
35
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): ColorGradient;
|
|
36
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ColorGradient = exports.ColorKey = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
|
+
const colors_gen_1 = require("./colors.gen");
|
|
10
|
+
const protobufPackageSarasa = "decentraland.common";
|
|
11
|
+
function createBaseColorKey() {
|
|
12
|
+
return { time: 0, color: undefined };
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
var ColorKey;
|
|
18
|
+
(function (ColorKey) {
|
|
19
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
|
+
if (message.time !== 0) {
|
|
21
|
+
writer.uint32(13).float(message.time);
|
|
22
|
+
}
|
|
23
|
+
if (message.color !== undefined) {
|
|
24
|
+
colors_gen_1.Color4.encode(message.color, writer.uint32(18).fork()).ldelim();
|
|
25
|
+
}
|
|
26
|
+
return writer;
|
|
27
|
+
}
|
|
28
|
+
ColorKey.encode = encode;
|
|
29
|
+
function decode(input, length) {
|
|
30
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
31
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
32
|
+
const message = createBaseColorKey();
|
|
33
|
+
while (reader.pos < end) {
|
|
34
|
+
const tag = reader.uint32();
|
|
35
|
+
switch (tag >>> 3) {
|
|
36
|
+
case 1:
|
|
37
|
+
if (tag !== 13) {
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
message.time = reader.float();
|
|
41
|
+
continue;
|
|
42
|
+
case 2:
|
|
43
|
+
if (tag !== 18) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
message.color = colors_gen_1.Color4.decode(reader, reader.uint32());
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
reader.skipType(tag & 7);
|
|
53
|
+
}
|
|
54
|
+
return message;
|
|
55
|
+
}
|
|
56
|
+
ColorKey.decode = decode;
|
|
57
|
+
})(ColorKey = exports.ColorKey || (exports.ColorKey = {}));
|
|
58
|
+
function createBaseColorGradient() {
|
|
59
|
+
return { keys: [] };
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
var ColorGradient;
|
|
65
|
+
(function (ColorGradient) {
|
|
66
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
67
|
+
for (const v of message.keys) {
|
|
68
|
+
ColorKey.encode(v, writer.uint32(10).fork()).ldelim();
|
|
69
|
+
}
|
|
70
|
+
return writer;
|
|
71
|
+
}
|
|
72
|
+
ColorGradient.encode = encode;
|
|
73
|
+
function decode(input, length) {
|
|
74
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
75
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
76
|
+
const message = createBaseColorGradient();
|
|
77
|
+
while (reader.pos < end) {
|
|
78
|
+
const tag = reader.uint32();
|
|
79
|
+
switch (tag >>> 3) {
|
|
80
|
+
case 1:
|
|
81
|
+
if (tag !== 10) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
message.keys.push(ColorKey.decode(reader, reader.uint32()));
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
reader.skipType(tag & 7);
|
|
91
|
+
}
|
|
92
|
+
return message;
|
|
93
|
+
}
|
|
94
|
+
ColorGradient.decode = decode;
|
|
95
|
+
})(ColorGradient = exports.ColorGradient || (exports.ColorGradient = {}));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
import { ColorGradient } from "../../common/gradient.gen";
|
|
3
|
+
/**
|
|
4
|
+
* PBEnvironmentFog overrides the environment fog 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
|
+
* A scene cannot turn fog on or off. That is a user quality setting.
|
|
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 PBEnvironmentFog {
|
|
18
|
+
color?: ColorGradient | undefined;
|
|
19
|
+
/** default = 0.0005, per meter: fog = 1 - e^(-density * distance). Negative values clamp to 0 */
|
|
20
|
+
density?: number | undefined;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export declare namespace PBEnvironmentFog {
|
|
26
|
+
function encode(message: PBEnvironmentFog, writer?: _m0.Writer): _m0.Writer;
|
|
27
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBEnvironmentFog;
|
|
28
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PBEnvironmentFog = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
|
+
const gradient_gen_1 = require("../../common/gradient.gen");
|
|
10
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
11
|
+
function createBasePBEnvironmentFog() {
|
|
12
|
+
return { color: undefined, density: undefined };
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
var PBEnvironmentFog;
|
|
18
|
+
(function (PBEnvironmentFog) {
|
|
19
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
|
+
if (message.color !== undefined) {
|
|
21
|
+
gradient_gen_1.ColorGradient.encode(message.color, writer.uint32(10).fork()).ldelim();
|
|
22
|
+
}
|
|
23
|
+
if (message.density !== undefined) {
|
|
24
|
+
writer.uint32(21).float(message.density);
|
|
25
|
+
}
|
|
26
|
+
return writer;
|
|
27
|
+
}
|
|
28
|
+
PBEnvironmentFog.encode = encode;
|
|
29
|
+
function decode(input, length) {
|
|
30
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
31
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
32
|
+
const message = createBasePBEnvironmentFog();
|
|
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.color = gradient_gen_1.ColorGradient.decode(reader, reader.uint32());
|
|
41
|
+
continue;
|
|
42
|
+
case 2:
|
|
43
|
+
if (tag !== 21) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
message.density = reader.float();
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
reader.skipType(tag & 7);
|
|
53
|
+
}
|
|
54
|
+
return message;
|
|
55
|
+
}
|
|
56
|
+
PBEnvironmentFog.decode = decode;
|
|
57
|
+
})(PBEnvironmentFog = exports.PBEnvironmentFog || (exports.PBEnvironmentFog = {}));
|
|
@@ -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,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PBSkybox_Stars = exports.PBSkybox_Clouds = exports.PBSkybox_SkyColors = exports.PBSkybox = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
|
+
const gradient_gen_1 = require("../../common/gradient.gen");
|
|
10
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
11
|
+
function createBasePBSkybox() {
|
|
12
|
+
return { skyboxTexture: undefined, skyColors: undefined, clouds: undefined, stars: undefined };
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
var PBSkybox;
|
|
18
|
+
(function (PBSkybox) {
|
|
19
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
|
+
if (message.skyboxTexture !== undefined) {
|
|
21
|
+
writer.uint32(10).string(message.skyboxTexture);
|
|
22
|
+
}
|
|
23
|
+
if (message.skyColors !== undefined) {
|
|
24
|
+
PBSkybox_SkyColors.encode(message.skyColors, writer.uint32(18).fork()).ldelim();
|
|
25
|
+
}
|
|
26
|
+
if (message.clouds !== undefined) {
|
|
27
|
+
PBSkybox_Clouds.encode(message.clouds, writer.uint32(26).fork()).ldelim();
|
|
28
|
+
}
|
|
29
|
+
if (message.stars !== undefined) {
|
|
30
|
+
PBSkybox_Stars.encode(message.stars, writer.uint32(34).fork()).ldelim();
|
|
31
|
+
}
|
|
32
|
+
return writer;
|
|
33
|
+
}
|
|
34
|
+
PBSkybox.encode = encode;
|
|
35
|
+
function decode(input, length) {
|
|
36
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
37
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
38
|
+
const message = createBasePBSkybox();
|
|
39
|
+
while (reader.pos < end) {
|
|
40
|
+
const tag = reader.uint32();
|
|
41
|
+
switch (tag >>> 3) {
|
|
42
|
+
case 1:
|
|
43
|
+
if (tag !== 10) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
message.skyboxTexture = reader.string();
|
|
47
|
+
continue;
|
|
48
|
+
case 2:
|
|
49
|
+
if (tag !== 18) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
message.skyColors = PBSkybox_SkyColors.decode(reader, reader.uint32());
|
|
53
|
+
continue;
|
|
54
|
+
case 3:
|
|
55
|
+
if (tag !== 26) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
message.clouds = PBSkybox_Clouds.decode(reader, reader.uint32());
|
|
59
|
+
continue;
|
|
60
|
+
case 4:
|
|
61
|
+
if (tag !== 34) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
message.stars = PBSkybox_Stars.decode(reader, reader.uint32());
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
reader.skipType(tag & 7);
|
|
71
|
+
}
|
|
72
|
+
return message;
|
|
73
|
+
}
|
|
74
|
+
PBSkybox.decode = decode;
|
|
75
|
+
})(PBSkybox = exports.PBSkybox || (exports.PBSkybox = {}));
|
|
76
|
+
function createBasePBSkybox_SkyColors() {
|
|
77
|
+
return { zenith: undefined, horizon: undefined, nadir: undefined, rim: undefined };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
var PBSkybox_SkyColors;
|
|
83
|
+
(function (PBSkybox_SkyColors) {
|
|
84
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
85
|
+
if (message.zenith !== undefined) {
|
|
86
|
+
gradient_gen_1.ColorGradient.encode(message.zenith, writer.uint32(10).fork()).ldelim();
|
|
87
|
+
}
|
|
88
|
+
if (message.horizon !== undefined) {
|
|
89
|
+
gradient_gen_1.ColorGradient.encode(message.horizon, writer.uint32(18).fork()).ldelim();
|
|
90
|
+
}
|
|
91
|
+
if (message.nadir !== undefined) {
|
|
92
|
+
gradient_gen_1.ColorGradient.encode(message.nadir, writer.uint32(26).fork()).ldelim();
|
|
93
|
+
}
|
|
94
|
+
if (message.rim !== undefined) {
|
|
95
|
+
gradient_gen_1.ColorGradient.encode(message.rim, writer.uint32(34).fork()).ldelim();
|
|
96
|
+
}
|
|
97
|
+
return writer;
|
|
98
|
+
}
|
|
99
|
+
PBSkybox_SkyColors.encode = encode;
|
|
100
|
+
function decode(input, length) {
|
|
101
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
102
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
103
|
+
const message = createBasePBSkybox_SkyColors();
|
|
104
|
+
while (reader.pos < end) {
|
|
105
|
+
const tag = reader.uint32();
|
|
106
|
+
switch (tag >>> 3) {
|
|
107
|
+
case 1:
|
|
108
|
+
if (tag !== 10) {
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
message.zenith = gradient_gen_1.ColorGradient.decode(reader, reader.uint32());
|
|
112
|
+
continue;
|
|
113
|
+
case 2:
|
|
114
|
+
if (tag !== 18) {
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
message.horizon = gradient_gen_1.ColorGradient.decode(reader, reader.uint32());
|
|
118
|
+
continue;
|
|
119
|
+
case 3:
|
|
120
|
+
if (tag !== 26) {
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
message.nadir = gradient_gen_1.ColorGradient.decode(reader, reader.uint32());
|
|
124
|
+
continue;
|
|
125
|
+
case 4:
|
|
126
|
+
if (tag !== 34) {
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
message.rim = gradient_gen_1.ColorGradient.decode(reader, reader.uint32());
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
reader.skipType(tag & 7);
|
|
136
|
+
}
|
|
137
|
+
return message;
|
|
138
|
+
}
|
|
139
|
+
PBSkybox_SkyColors.decode = decode;
|
|
140
|
+
})(PBSkybox_SkyColors = exports.PBSkybox_SkyColors || (exports.PBSkybox_SkyColors = {}));
|
|
141
|
+
function createBasePBSkybox_Clouds() {
|
|
142
|
+
return { opacity: undefined, speed: undefined, color: undefined };
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @public
|
|
146
|
+
*/
|
|
147
|
+
var PBSkybox_Clouds;
|
|
148
|
+
(function (PBSkybox_Clouds) {
|
|
149
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
150
|
+
if (message.opacity !== undefined) {
|
|
151
|
+
writer.uint32(13).float(message.opacity);
|
|
152
|
+
}
|
|
153
|
+
if (message.speed !== undefined) {
|
|
154
|
+
writer.uint32(21).float(message.speed);
|
|
155
|
+
}
|
|
156
|
+
if (message.color !== undefined) {
|
|
157
|
+
gradient_gen_1.ColorGradient.encode(message.color, writer.uint32(26).fork()).ldelim();
|
|
158
|
+
}
|
|
159
|
+
return writer;
|
|
160
|
+
}
|
|
161
|
+
PBSkybox_Clouds.encode = encode;
|
|
162
|
+
function decode(input, length) {
|
|
163
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
164
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
165
|
+
const message = createBasePBSkybox_Clouds();
|
|
166
|
+
while (reader.pos < end) {
|
|
167
|
+
const tag = reader.uint32();
|
|
168
|
+
switch (tag >>> 3) {
|
|
169
|
+
case 1:
|
|
170
|
+
if (tag !== 13) {
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
message.opacity = reader.float();
|
|
174
|
+
continue;
|
|
175
|
+
case 2:
|
|
176
|
+
if (tag !== 21) {
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
message.speed = reader.float();
|
|
180
|
+
continue;
|
|
181
|
+
case 3:
|
|
182
|
+
if (tag !== 26) {
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
message.color = gradient_gen_1.ColorGradient.decode(reader, reader.uint32());
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
reader.skipType(tag & 7);
|
|
192
|
+
}
|
|
193
|
+
return message;
|
|
194
|
+
}
|
|
195
|
+
PBSkybox_Clouds.decode = decode;
|
|
196
|
+
})(PBSkybox_Clouds = exports.PBSkybox_Clouds || (exports.PBSkybox_Clouds = {}));
|
|
197
|
+
function createBasePBSkybox_Stars() {
|
|
198
|
+
return { brightness: undefined };
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* @public
|
|
202
|
+
*/
|
|
203
|
+
var PBSkybox_Stars;
|
|
204
|
+
(function (PBSkybox_Stars) {
|
|
205
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
206
|
+
if (message.brightness !== undefined) {
|
|
207
|
+
writer.uint32(13).float(message.brightness);
|
|
208
|
+
}
|
|
209
|
+
return writer;
|
|
210
|
+
}
|
|
211
|
+
PBSkybox_Stars.encode = encode;
|
|
212
|
+
function decode(input, length) {
|
|
213
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
214
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
215
|
+
const message = createBasePBSkybox_Stars();
|
|
216
|
+
while (reader.pos < end) {
|
|
217
|
+
const tag = reader.uint32();
|
|
218
|
+
switch (tag >>> 3) {
|
|
219
|
+
case 1:
|
|
220
|
+
if (tag !== 13) {
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
message.brightness = reader.float();
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
reader.skipType(tag & 7);
|
|
230
|
+
}
|
|
231
|
+
return message;
|
|
232
|
+
}
|
|
233
|
+
PBSkybox_Stars.decode = decode;
|
|
234
|
+
})(PBSkybox_Stars = exports.PBSkybox_Stars || (exports.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
|
+
}
|