@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
|
@@ -14,6 +14,12 @@ export interface TouchScreenControlsComponentDefinitionExtended extends LastWrit
|
|
|
14
14
|
* Does NOT change the joystick/crosshair — use `showJoystick()` / `showCrosshair()` for those.
|
|
15
15
|
*/
|
|
16
16
|
showAll(): void;
|
|
17
|
+
/**
|
|
18
|
+
* Show the default button set: jump, pointer and primary visible, secondary and
|
|
19
|
+
* actions 3-6 hidden. This is the state every scene starts in.
|
|
20
|
+
* Does NOT change the joystick/crosshair, the main action or custom icons.
|
|
21
|
+
*/
|
|
22
|
+
showDefault(): void;
|
|
17
23
|
/** Hide the given on-screen buttons (merged into the current config). */
|
|
18
24
|
hide(actions: InputAction[]): void;
|
|
19
25
|
/** Set which action the large central button triggers. */
|
|
@@ -11,6 +11,17 @@ const ALL_BUTTONS = [
|
|
|
11
11
|
12 /* InputAction.IA_ACTION_5 */,
|
|
12
12
|
13 /* InputAction.IA_ACTION_6 */
|
|
13
13
|
];
|
|
14
|
+
// Buttons hidden in the default set; the rest of ALL_BUTTONS stay visible.
|
|
15
|
+
const DEFAULT_HIDDEN_BUTTONS = [
|
|
16
|
+
2 /* InputAction.IA_SECONDARY */,
|
|
17
|
+
10 /* InputAction.IA_ACTION_3 */,
|
|
18
|
+
11 /* InputAction.IA_ACTION_4 */,
|
|
19
|
+
12 /* InputAction.IA_ACTION_5 */,
|
|
20
|
+
13 /* InputAction.IA_ACTION_6 */
|
|
21
|
+
];
|
|
22
|
+
// Component definitions on which a button-visibility helper ran. Keyed by the definition, which is
|
|
23
|
+
// shared by every wrapper built for the same engine.
|
|
24
|
+
const visibilityExpressed = new WeakSet();
|
|
14
25
|
export function defineTouchScreenControlsComponent(engine) {
|
|
15
26
|
const theComponent = TouchScreenControls(engine);
|
|
16
27
|
// A mutable copy of the current RootEntity value (or a fresh default).
|
|
@@ -26,6 +37,7 @@ export function defineTouchScreenControlsComponent(engine) {
|
|
|
26
37
|
};
|
|
27
38
|
}
|
|
28
39
|
function setHidden(actions) {
|
|
40
|
+
visibilityExpressed.add(theComponent);
|
|
29
41
|
const value = current();
|
|
30
42
|
const byAction = new Map();
|
|
31
43
|
for (const input of value.touchInputs)
|
|
@@ -35,16 +47,40 @@ export function defineTouchScreenControlsComponent(engine) {
|
|
|
35
47
|
value.touchInputs = [...byAction.values()];
|
|
36
48
|
theComponent.createOrReplace(ROOT_ENTITY, value);
|
|
37
49
|
}
|
|
50
|
+
// Every button visible except DEFAULT_HIDDEN_BUTTONS; existing entries keep their position and icon.
|
|
51
|
+
function writeDefault() {
|
|
52
|
+
const value = current();
|
|
53
|
+
const byAction = new Map();
|
|
54
|
+
for (const input of value.touchInputs)
|
|
55
|
+
byAction.set(input.inputAction, { ...input, hide: false });
|
|
56
|
+
for (const action of DEFAULT_HIDDEN_BUTTONS) {
|
|
57
|
+
byAction.set(action, { ...byAction.get(action), inputAction: action, hide: true });
|
|
58
|
+
}
|
|
59
|
+
value.touchInputs = [...byAction.values()];
|
|
60
|
+
theComponent.createOrReplace(ROOT_ENTITY, value);
|
|
61
|
+
}
|
|
38
62
|
return {
|
|
39
63
|
...theComponent,
|
|
40
64
|
hideAll() {
|
|
41
65
|
setHidden(ALL_BUTTONS);
|
|
42
66
|
},
|
|
43
67
|
showAll() {
|
|
68
|
+
visibilityExpressed.add(theComponent);
|
|
44
69
|
const value = current();
|
|
45
70
|
value.touchInputs = [];
|
|
46
71
|
theComponent.createOrReplace(ROOT_ENTITY, value);
|
|
47
72
|
},
|
|
73
|
+
showDefault() {
|
|
74
|
+
visibilityExpressed.add(theComponent);
|
|
75
|
+
writeDefault();
|
|
76
|
+
},
|
|
77
|
+
applyDefaultIfUnset() {
|
|
78
|
+
if (visibilityExpressed.has(theComponent))
|
|
79
|
+
return;
|
|
80
|
+
if (theComponent.getOrNull(ROOT_ENTITY)?.touchInputs.length)
|
|
81
|
+
return;
|
|
82
|
+
writeDefault();
|
|
83
|
+
},
|
|
48
84
|
hide(actions) {
|
|
49
85
|
setHidden(actions);
|
|
50
86
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PBEnvironmentFog } from './pb/decentraland/sdk/components/environment_fog.gen';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export const EnvironmentFogSchema = {
|
|
6
|
+
COMPONENT_ID: 1225,
|
|
7
|
+
serialize(value, builder) {
|
|
8
|
+
const writer = PBEnvironmentFog.encode(value);
|
|
9
|
+
const buffer = new Uint8Array(writer.finish(), 0, writer.len);
|
|
10
|
+
builder.writeBuffer(buffer, false);
|
|
11
|
+
},
|
|
12
|
+
deserialize(reader) {
|
|
13
|
+
return PBEnvironmentFog.decode(reader.buffer(), reader.remainingBytes());
|
|
14
|
+
},
|
|
15
|
+
create() {
|
|
16
|
+
// TODO: this is a hack.
|
|
17
|
+
return PBEnvironmentFog.decode(new Uint8Array());
|
|
18
|
+
},
|
|
19
|
+
jsonSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {},
|
|
22
|
+
serializationType: "protocol-buffer",
|
|
23
|
+
protocolBuffer: "PBEnvironmentFog"
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PBSkybox } from './pb/decentraland/sdk/components/skybox.gen';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export const SkyboxSchema = {
|
|
6
|
+
COMPONENT_ID: 1223,
|
|
7
|
+
serialize(value, builder) {
|
|
8
|
+
const writer = PBSkybox.encode(value);
|
|
9
|
+
const buffer = new Uint8Array(writer.finish(), 0, writer.len);
|
|
10
|
+
builder.writeBuffer(buffer, false);
|
|
11
|
+
},
|
|
12
|
+
deserialize(reader) {
|
|
13
|
+
return PBSkybox.decode(reader.buffer(), reader.remainingBytes());
|
|
14
|
+
},
|
|
15
|
+
create() {
|
|
16
|
+
// TODO: this is a hack.
|
|
17
|
+
return PBSkybox.decode(new Uint8Array());
|
|
18
|
+
},
|
|
19
|
+
jsonSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {},
|
|
22
|
+
serializationType: "protocol-buffer",
|
|
23
|
+
protocolBuffer: "PBSkybox"
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PBSun } from './pb/decentraland/sdk/components/sun.gen';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export const SunSchema = {
|
|
6
|
+
COMPONENT_ID: 1224,
|
|
7
|
+
serialize(value, builder) {
|
|
8
|
+
const writer = PBSun.encode(value);
|
|
9
|
+
const buffer = new Uint8Array(writer.finish(), 0, writer.len);
|
|
10
|
+
builder.writeBuffer(buffer, false);
|
|
11
|
+
},
|
|
12
|
+
deserialize(reader) {
|
|
13
|
+
return PBSun.decode(reader.buffer(), reader.remainingBytes());
|
|
14
|
+
},
|
|
15
|
+
create() {
|
|
16
|
+
// TODO: this is a hack.
|
|
17
|
+
return PBSun.decode(new Uint8Array());
|
|
18
|
+
},
|
|
19
|
+
jsonSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {},
|
|
22
|
+
serializationType: "protocol-buffer",
|
|
23
|
+
protocolBuffer: "PBSun"
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -22,6 +22,7 @@ export const coreComponentMappings = {
|
|
|
22
22
|
"core::CameraMode": 1072,
|
|
23
23
|
"core::CameraModeArea": 1071,
|
|
24
24
|
"core::EngineInfo": 1048,
|
|
25
|
+
"core::EnvironmentFog": 1225,
|
|
25
26
|
"core::ExplorerItemPurchaseResult": 1222,
|
|
26
27
|
"core::ExplorerUiEventsResult": 1220,
|
|
27
28
|
"core::GltfContainer": 1041,
|
|
@@ -46,7 +47,9 @@ export const coreComponentMappings = {
|
|
|
46
47
|
"core::Raycast": 1067,
|
|
47
48
|
"core::RaycastResult": 1068,
|
|
48
49
|
"core::RealmInfo": 1106,
|
|
50
|
+
"core::Skybox": 1223,
|
|
49
51
|
"core::SkyboxTime": 1210,
|
|
52
|
+
"core::Sun": 1224,
|
|
50
53
|
"core::TextShape": 1030,
|
|
51
54
|
"core::TouchScreenControls": 1218,
|
|
52
55
|
"core::TriggerArea": 1060,
|
|
@@ -18,6 +18,7 @@ import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
|
|
|
18
18
|
import { PBCameraMode } from './pb/decentraland/sdk/components/camera_mode.gen';
|
|
19
19
|
import { PBCameraModeArea } from './pb/decentraland/sdk/components/camera_mode_area.gen';
|
|
20
20
|
import { PBEngineInfo } from './pb/decentraland/sdk/components/engine_info.gen';
|
|
21
|
+
import { PBEnvironmentFog } from './pb/decentraland/sdk/components/environment_fog.gen';
|
|
21
22
|
import { PBExplorerItemPurchaseResult } from './pb/decentraland/sdk/components/explorer_item_purchase_result.gen';
|
|
22
23
|
import { PBExplorerUiEventsResult } from './pb/decentraland/sdk/components/explorer_ui_events_result.gen';
|
|
23
24
|
import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
@@ -38,7 +39,9 @@ import { PBPrimaryPointerInfo } from './pb/decentraland/sdk/components/primary_p
|
|
|
38
39
|
import { PBRaycast } from './pb/decentraland/sdk/components/raycast.gen';
|
|
39
40
|
import { PBRaycastResult } from './pb/decentraland/sdk/components/raycast_result.gen';
|
|
40
41
|
import { PBRealmInfo } from './pb/decentraland/sdk/components/realm_info.gen';
|
|
42
|
+
import { PBSkybox } from './pb/decentraland/sdk/components/skybox.gen';
|
|
41
43
|
import { PBSkyboxTime } from './pb/decentraland/sdk/components/skybox_time.gen';
|
|
44
|
+
import { PBSun } from './pb/decentraland/sdk/components/sun.gen';
|
|
42
45
|
import { PBTextShape } from './pb/decentraland/sdk/components/text_shape.gen';
|
|
43
46
|
import { PBTouchScreenControls } from './pb/decentraland/sdk/components/touch_screen_controls.gen';
|
|
44
47
|
import { PBTriggerArea } from './pb/decentraland/sdk/components/trigger_area.gen';
|
|
@@ -76,6 +79,7 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
76
79
|
/** @public */ export declare const CameraMode: LastWriteWinElementSetComponentDefinition<PBCameraMode>;
|
|
77
80
|
/** @public */ export declare const CameraModeArea: LastWriteWinElementSetComponentDefinition<PBCameraModeArea>;
|
|
78
81
|
/** @public */ export declare const EngineInfo: LastWriteWinElementSetComponentDefinition<PBEngineInfo>;
|
|
82
|
+
/** @public */ export declare const EnvironmentFog: LastWriteWinElementSetComponentDefinition<PBEnvironmentFog>;
|
|
79
83
|
/** @public */ export declare const ExplorerItemPurchaseResult: GrowOnlyValueSetComponentDefinition<PBExplorerItemPurchaseResult>;
|
|
80
84
|
/** @public */ export declare const ExplorerUiEventsResult: GrowOnlyValueSetComponentDefinition<PBExplorerUiEventsResult>;
|
|
81
85
|
/** @public */ export declare const GltfContainer: LastWriteWinElementSetComponentDefinition<PBGltfContainer>;
|
|
@@ -96,7 +100,9 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
96
100
|
/** @public */ export declare const Raycast: LastWriteWinElementSetComponentDefinition<PBRaycast>;
|
|
97
101
|
/** @public */ export declare const RaycastResult: LastWriteWinElementSetComponentDefinition<PBRaycastResult>;
|
|
98
102
|
/** @public */ export declare const RealmInfo: LastWriteWinElementSetComponentDefinition<PBRealmInfo>;
|
|
103
|
+
/** @public */ export declare const Skybox: LastWriteWinElementSetComponentDefinition<PBSkybox>;
|
|
99
104
|
/** @public */ export declare const SkyboxTime: LastWriteWinElementSetComponentDefinition<PBSkyboxTime>;
|
|
105
|
+
/** @public */ export declare const Sun: LastWriteWinElementSetComponentDefinition<PBSun>;
|
|
100
106
|
/** @public */ export declare const TextShape: LastWriteWinElementSetComponentDefinition<PBTextShape>;
|
|
101
107
|
/** @public */ export declare const TouchScreenControls: LastWriteWinElementSetComponentDefinition<PBTouchScreenControls>;
|
|
102
108
|
/** @public */ export declare const TriggerArea: LastWriteWinElementSetComponentDefinition<PBTriggerArea>;
|
|
@@ -19,6 +19,7 @@ export * from './index.gen';
|
|
|
19
19
|
/** @public */ export const CameraMode = /* @__PURE__ */ components.CameraMode(engine);
|
|
20
20
|
/** @public */ export const CameraModeArea = /* @__PURE__ */ components.CameraModeArea(engine);
|
|
21
21
|
/** @public */ export const EngineInfo = /* @__PURE__ */ components.EngineInfo(engine);
|
|
22
|
+
/** @public */ export const EnvironmentFog = /* @__PURE__ */ components.EnvironmentFog(engine);
|
|
22
23
|
/** @public */ export const ExplorerItemPurchaseResult = /* @__PURE__ */ components.ExplorerItemPurchaseResult(engine);
|
|
23
24
|
/** @public */ export const ExplorerUiEventsResult = /* @__PURE__ */ components.ExplorerUiEventsResult(engine);
|
|
24
25
|
/** @public */ export const GltfContainer = /* @__PURE__ */ components.GltfContainer(engine);
|
|
@@ -39,7 +40,9 @@ export * from './index.gen';
|
|
|
39
40
|
/** @public */ export const Raycast = /* @__PURE__ */ components.Raycast(engine);
|
|
40
41
|
/** @public */ export const RaycastResult = /* @__PURE__ */ components.RaycastResult(engine);
|
|
41
42
|
/** @public */ export const RealmInfo = /* @__PURE__ */ components.RealmInfo(engine);
|
|
43
|
+
/** @public */ export const Skybox = /* @__PURE__ */ components.Skybox(engine);
|
|
42
44
|
/** @public */ export const SkyboxTime = /* @__PURE__ */ components.SkyboxTime(engine);
|
|
45
|
+
/** @public */ export const Sun = /* @__PURE__ */ components.Sun(engine);
|
|
43
46
|
/** @public */ export const TextShape = /* @__PURE__ */ components.TextShape(engine);
|
|
44
47
|
/** @public */ export const TouchScreenControls = /* @__PURE__ */ components.TouchScreenControls(engine);
|
|
45
48
|
/** @public */ export const TriggerArea = /* @__PURE__ */ components.TriggerArea(engine);
|
|
@@ -19,6 +19,7 @@ import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
|
|
|
19
19
|
import { PBCameraMode } from './pb/decentraland/sdk/components/camera_mode.gen';
|
|
20
20
|
import { PBCameraModeArea } from './pb/decentraland/sdk/components/camera_mode_area.gen';
|
|
21
21
|
import { PBEngineInfo } from './pb/decentraland/sdk/components/engine_info.gen';
|
|
22
|
+
import { PBEnvironmentFog } from './pb/decentraland/sdk/components/environment_fog.gen';
|
|
22
23
|
import { PBExplorerItemPurchaseResult } from './pb/decentraland/sdk/components/explorer_item_purchase_result.gen';
|
|
23
24
|
import { PBExplorerUiEventsResult } from './pb/decentraland/sdk/components/explorer_ui_events_result.gen';
|
|
24
25
|
import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
@@ -42,7 +43,9 @@ import { PBPrimaryPointerInfo } from './pb/decentraland/sdk/components/primary_p
|
|
|
42
43
|
import { PBRaycast } from './pb/decentraland/sdk/components/raycast.gen';
|
|
43
44
|
import { PBRaycastResult } from './pb/decentraland/sdk/components/raycast_result.gen';
|
|
44
45
|
import { PBRealmInfo } from './pb/decentraland/sdk/components/realm_info.gen';
|
|
46
|
+
import { PBSkybox } from './pb/decentraland/sdk/components/skybox.gen';
|
|
45
47
|
import { PBSkyboxTime } from './pb/decentraland/sdk/components/skybox_time.gen';
|
|
48
|
+
import { PBSun } from './pb/decentraland/sdk/components/sun.gen';
|
|
46
49
|
import { PBTextShape } from './pb/decentraland/sdk/components/text_shape.gen';
|
|
47
50
|
import { PBTouchScreenControls } from './pb/decentraland/sdk/components/touch_screen_controls.gen';
|
|
48
51
|
import { PBTriggerArea } from './pb/decentraland/sdk/components/trigger_area.gen';
|
|
@@ -82,6 +85,7 @@ export * from './pb/decentraland/sdk/components/billboard.gen';
|
|
|
82
85
|
export * from './pb/decentraland/sdk/components/camera_mode.gen';
|
|
83
86
|
export * from './pb/decentraland/sdk/components/camera_mode_area.gen';
|
|
84
87
|
export * from './pb/decentraland/sdk/components/engine_info.gen';
|
|
88
|
+
export * from './pb/decentraland/sdk/components/environment_fog.gen';
|
|
85
89
|
export * from './pb/decentraland/sdk/components/explorer_item_purchase_result.gen';
|
|
86
90
|
export * from './pb/decentraland/sdk/components/explorer_ui_events_result.gen';
|
|
87
91
|
export * from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
@@ -105,7 +109,9 @@ export * from './pb/decentraland/sdk/components/primary_pointer_info.gen';
|
|
|
105
109
|
export * from './pb/decentraland/sdk/components/raycast.gen';
|
|
106
110
|
export * from './pb/decentraland/sdk/components/raycast_result.gen';
|
|
107
111
|
export * from './pb/decentraland/sdk/components/realm_info.gen';
|
|
112
|
+
export * from './pb/decentraland/sdk/components/skybox.gen';
|
|
108
113
|
export * from './pb/decentraland/sdk/components/skybox_time.gen';
|
|
114
|
+
export * from './pb/decentraland/sdk/components/sun.gen';
|
|
109
115
|
export * from './pb/decentraland/sdk/components/text_shape.gen';
|
|
110
116
|
export * from './pb/decentraland/sdk/components/touch_screen_controls.gen';
|
|
111
117
|
export * from './pb/decentraland/sdk/components/trigger_area.gen';
|
|
@@ -147,6 +153,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
147
153
|
/** @public */ export declare const CameraMode: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
|
|
148
154
|
/** @public */ export declare const CameraModeArea: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
|
|
149
155
|
/** @public */ export declare const EngineInfo: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
|
|
156
|
+
/** @public */ export declare const EnvironmentFog: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEnvironmentFog>>;
|
|
150
157
|
/** @public */ export declare const ExplorerItemPurchaseResult: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerItemPurchaseResult>>;
|
|
151
158
|
/** @public */ export declare const ExplorerUiEventsResult: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerUiEventsResult>>;
|
|
152
159
|
/** @public */ export declare const GltfContainer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
@@ -170,7 +177,9 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
170
177
|
/** @public */ export declare const Raycast: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
|
|
171
178
|
/** @public */ export declare const RaycastResult: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
|
|
172
179
|
/** @public */ export declare const RealmInfo: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
|
|
180
|
+
/** @public */ export declare const Skybox: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkybox>>;
|
|
173
181
|
/** @public */ export declare const SkyboxTime: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkyboxTime>>;
|
|
182
|
+
/** @public */ export declare const Sun: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSun>>;
|
|
174
183
|
/** @public */ export declare const TextShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
|
|
175
184
|
/** @public */ export declare const TouchScreenControls: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTouchScreenControls>>;
|
|
176
185
|
/** @public */ export declare const TriggerArea: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTriggerArea>>;
|
|
@@ -212,6 +221,7 @@ export declare const componentDefinitionByName: {
|
|
|
212
221
|
"core::CameraMode": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
|
|
213
222
|
"core::CameraModeArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
|
|
214
223
|
"core::EngineInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
|
|
224
|
+
"core::EnvironmentFog": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEnvironmentFog>>;
|
|
215
225
|
"core::ExplorerItemPurchaseResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerItemPurchaseResult>>;
|
|
216
226
|
"core::ExplorerUiEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerUiEventsResult>>;
|
|
217
227
|
"core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
@@ -235,7 +245,9 @@ export declare const componentDefinitionByName: {
|
|
|
235
245
|
"core::Raycast": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
|
|
236
246
|
"core::RaycastResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
|
|
237
247
|
"core::RealmInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
|
|
248
|
+
"core::Skybox": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkybox>>;
|
|
238
249
|
"core::SkyboxTime": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkyboxTime>>;
|
|
250
|
+
"core::Sun": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSun>>;
|
|
239
251
|
"core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
|
|
240
252
|
"core::TouchScreenControls": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTouchScreenControls>>;
|
|
241
253
|
"core::TriggerArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTriggerArea>>;
|
|
@@ -17,6 +17,7 @@ import { BillboardSchema } from './Billboard.gen';
|
|
|
17
17
|
import { CameraModeSchema } from './CameraMode.gen';
|
|
18
18
|
import { CameraModeAreaSchema } from './CameraModeArea.gen';
|
|
19
19
|
import { EngineInfoSchema } from './EngineInfo.gen';
|
|
20
|
+
import { EnvironmentFogSchema } from './EnvironmentFog.gen';
|
|
20
21
|
import { ExplorerItemPurchaseResultSchema } from './ExplorerItemPurchaseResult.gen';
|
|
21
22
|
import { ExplorerUiEventsResultSchema } from './ExplorerUiEventsResult.gen';
|
|
22
23
|
import { GltfContainerSchema } from './GltfContainer.gen';
|
|
@@ -40,7 +41,9 @@ import { PrimaryPointerInfoSchema } from './PrimaryPointerInfo.gen';
|
|
|
40
41
|
import { RaycastSchema } from './Raycast.gen';
|
|
41
42
|
import { RaycastResultSchema } from './RaycastResult.gen';
|
|
42
43
|
import { RealmInfoSchema } from './RealmInfo.gen';
|
|
44
|
+
import { SkyboxSchema } from './Skybox.gen';
|
|
43
45
|
import { SkyboxTimeSchema } from './SkyboxTime.gen';
|
|
46
|
+
import { SunSchema } from './Sun.gen';
|
|
44
47
|
import { TextShapeSchema } from './TextShape.gen';
|
|
45
48
|
import { TouchScreenControlsSchema } from './TouchScreenControls.gen';
|
|
46
49
|
import { TriggerAreaSchema } from './TriggerArea.gen';
|
|
@@ -80,6 +83,7 @@ export * from './pb/decentraland/sdk/components/billboard.gen';
|
|
|
80
83
|
export * from './pb/decentraland/sdk/components/camera_mode.gen';
|
|
81
84
|
export * from './pb/decentraland/sdk/components/camera_mode_area.gen';
|
|
82
85
|
export * from './pb/decentraland/sdk/components/engine_info.gen';
|
|
86
|
+
export * from './pb/decentraland/sdk/components/environment_fog.gen';
|
|
83
87
|
export * from './pb/decentraland/sdk/components/explorer_item_purchase_result.gen';
|
|
84
88
|
export * from './pb/decentraland/sdk/components/explorer_ui_events_result.gen';
|
|
85
89
|
export * from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
@@ -103,7 +107,9 @@ export * from './pb/decentraland/sdk/components/primary_pointer_info.gen';
|
|
|
103
107
|
export * from './pb/decentraland/sdk/components/raycast.gen';
|
|
104
108
|
export * from './pb/decentraland/sdk/components/raycast_result.gen';
|
|
105
109
|
export * from './pb/decentraland/sdk/components/realm_info.gen';
|
|
110
|
+
export * from './pb/decentraland/sdk/components/skybox.gen';
|
|
106
111
|
export * from './pb/decentraland/sdk/components/skybox_time.gen';
|
|
112
|
+
export * from './pb/decentraland/sdk/components/sun.gen';
|
|
107
113
|
export * from './pb/decentraland/sdk/components/text_shape.gen';
|
|
108
114
|
export * from './pb/decentraland/sdk/components/touch_screen_controls.gen';
|
|
109
115
|
export * from './pb/decentraland/sdk/components/trigger_area.gen';
|
|
@@ -168,6 +174,8 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
168
174
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::CameraModeArea", CameraModeAreaSchema);
|
|
169
175
|
/** @public */ export const EngineInfo = engine =>
|
|
170
176
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::EngineInfo", EngineInfoSchema);
|
|
177
|
+
/** @public */ export const EnvironmentFog = engine =>
|
|
178
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::EnvironmentFog", EnvironmentFogSchema);
|
|
171
179
|
/** @public */ export const ExplorerItemPurchaseResult = (engine) => /* @__PURE__ */ engine.defineValueSetComponentFromSchema("core::ExplorerItemPurchaseResult", ExplorerItemPurchaseResultSchema, {
|
|
172
180
|
timestampFunction: (t) => t.timestamp,
|
|
173
181
|
maxElements: 100
|
|
@@ -220,8 +228,12 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
220
228
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::RaycastResult", RaycastResultSchema);
|
|
221
229
|
/** @public */ export const RealmInfo = engine =>
|
|
222
230
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::RealmInfo", RealmInfoSchema);
|
|
231
|
+
/** @public */ export const Skybox = engine =>
|
|
232
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::Skybox", SkyboxSchema);
|
|
223
233
|
/** @public */ export const SkyboxTime = engine =>
|
|
224
234
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::SkyboxTime", SkyboxTimeSchema);
|
|
235
|
+
/** @public */ export const Sun = engine =>
|
|
236
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::Sun", SunSchema);
|
|
225
237
|
/** @public */ export const TextShape = engine =>
|
|
226
238
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::TextShape", TextShapeSchema);
|
|
227
239
|
/** @public */ export const TouchScreenControls = engine =>
|
|
@@ -287,6 +299,7 @@ export const componentDefinitionByName = /* @__PURE__ */ {
|
|
|
287
299
|
"core::CameraMode": CameraMode,
|
|
288
300
|
"core::CameraModeArea": CameraModeArea,
|
|
289
301
|
"core::EngineInfo": EngineInfo,
|
|
302
|
+
"core::EnvironmentFog": EnvironmentFog,
|
|
290
303
|
"core::ExplorerItemPurchaseResult": ExplorerItemPurchaseResult,
|
|
291
304
|
"core::ExplorerUiEventsResult": ExplorerUiEventsResult,
|
|
292
305
|
"core::GltfContainer": GltfContainer,
|
|
@@ -310,7 +323,9 @@ export const componentDefinitionByName = /* @__PURE__ */ {
|
|
|
310
323
|
"core::Raycast": Raycast,
|
|
311
324
|
"core::RaycastResult": RaycastResult,
|
|
312
325
|
"core::RealmInfo": RealmInfo,
|
|
326
|
+
"core::Skybox": Skybox,
|
|
313
327
|
"core::SkyboxTime": SkyboxTime,
|
|
328
|
+
"core::Sun": Sun,
|
|
314
329
|
"core::TextShape": TextShape,
|
|
315
330
|
"core::TouchScreenControls": TouchScreenControls,
|
|
316
331
|
"core::TriggerArea": 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,89 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Color4 } from "./colors.gen";
|
|
4
|
+
const protobufPackageSarasa = "decentraland.common";
|
|
5
|
+
function createBaseColorKey() {
|
|
6
|
+
return { time: 0, color: undefined };
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export var ColorKey;
|
|
12
|
+
(function (ColorKey) {
|
|
13
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
14
|
+
if (message.time !== 0) {
|
|
15
|
+
writer.uint32(13).float(message.time);
|
|
16
|
+
}
|
|
17
|
+
if (message.color !== undefined) {
|
|
18
|
+
Color4.encode(message.color, writer.uint32(18).fork()).ldelim();
|
|
19
|
+
}
|
|
20
|
+
return writer;
|
|
21
|
+
}
|
|
22
|
+
ColorKey.encode = encode;
|
|
23
|
+
function decode(input, length) {
|
|
24
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
25
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
26
|
+
const message = createBaseColorKey();
|
|
27
|
+
while (reader.pos < end) {
|
|
28
|
+
const tag = reader.uint32();
|
|
29
|
+
switch (tag >>> 3) {
|
|
30
|
+
case 1:
|
|
31
|
+
if (tag !== 13) {
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
message.time = reader.float();
|
|
35
|
+
continue;
|
|
36
|
+
case 2:
|
|
37
|
+
if (tag !== 18) {
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
message.color = Color4.decode(reader, reader.uint32());
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
reader.skipType(tag & 7);
|
|
47
|
+
}
|
|
48
|
+
return message;
|
|
49
|
+
}
|
|
50
|
+
ColorKey.decode = decode;
|
|
51
|
+
})(ColorKey || (ColorKey = {}));
|
|
52
|
+
function createBaseColorGradient() {
|
|
53
|
+
return { keys: [] };
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
export var ColorGradient;
|
|
59
|
+
(function (ColorGradient) {
|
|
60
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
61
|
+
for (const v of message.keys) {
|
|
62
|
+
ColorKey.encode(v, writer.uint32(10).fork()).ldelim();
|
|
63
|
+
}
|
|
64
|
+
return writer;
|
|
65
|
+
}
|
|
66
|
+
ColorGradient.encode = encode;
|
|
67
|
+
function decode(input, length) {
|
|
68
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
69
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
70
|
+
const message = createBaseColorGradient();
|
|
71
|
+
while (reader.pos < end) {
|
|
72
|
+
const tag = reader.uint32();
|
|
73
|
+
switch (tag >>> 3) {
|
|
74
|
+
case 1:
|
|
75
|
+
if (tag !== 10) {
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
message.keys.push(ColorKey.decode(reader, reader.uint32()));
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
reader.skipType(tag & 7);
|
|
85
|
+
}
|
|
86
|
+
return message;
|
|
87
|
+
}
|
|
88
|
+
ColorGradient.decode = decode;
|
|
89
|
+
})(ColorGradient || (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,51 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { ColorGradient } from "../../common/gradient.gen";
|
|
4
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
5
|
+
function createBasePBEnvironmentFog() {
|
|
6
|
+
return { color: undefined, density: undefined };
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export var PBEnvironmentFog;
|
|
12
|
+
(function (PBEnvironmentFog) {
|
|
13
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
14
|
+
if (message.color !== undefined) {
|
|
15
|
+
ColorGradient.encode(message.color, writer.uint32(10).fork()).ldelim();
|
|
16
|
+
}
|
|
17
|
+
if (message.density !== undefined) {
|
|
18
|
+
writer.uint32(21).float(message.density);
|
|
19
|
+
}
|
|
20
|
+
return writer;
|
|
21
|
+
}
|
|
22
|
+
PBEnvironmentFog.encode = encode;
|
|
23
|
+
function decode(input, length) {
|
|
24
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
25
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
26
|
+
const message = createBasePBEnvironmentFog();
|
|
27
|
+
while (reader.pos < end) {
|
|
28
|
+
const tag = reader.uint32();
|
|
29
|
+
switch (tag >>> 3) {
|
|
30
|
+
case 1:
|
|
31
|
+
if (tag !== 10) {
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
message.color = ColorGradient.decode(reader, reader.uint32());
|
|
35
|
+
continue;
|
|
36
|
+
case 2:
|
|
37
|
+
if (tag !== 21) {
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
message.density = reader.float();
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
reader.skipType(tag & 7);
|
|
47
|
+
}
|
|
48
|
+
return message;
|
|
49
|
+
}
|
|
50
|
+
PBEnvironmentFog.decode = decode;
|
|
51
|
+
})(PBEnvironmentFog || (PBEnvironmentFog = {}));
|