@dcl/ecs 7.14.1-19673051995.commit-94f9a7a → 7.14.1-19678724586.commit-33186ef

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.
Files changed (37) hide show
  1. package/dist/components/generated/AvatarLocomotionSettings.gen.d.ts +1 -0
  2. package/dist/components/generated/AvatarLocomotionSettings.gen.js +25 -0
  3. package/dist/components/generated/component-names.gen.js +1 -0
  4. package/dist/components/generated/global.gen.d.ts +2 -0
  5. package/dist/components/generated/global.gen.js +1 -0
  6. package/dist/components/generated/index.gen.d.ts +4 -0
  7. package/dist/components/generated/index.gen.js +5 -0
  8. package/dist/components/generated/pb/decentraland/sdk/components/audio_stream.gen.d.ts +10 -0
  9. package/dist/components/generated/pb/decentraland/sdk/components/audio_stream.gen.js +35 -1
  10. package/dist/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +29 -0
  11. package/dist/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.js +93 -0
  12. package/dist/components/generated/pb/decentraland/sdk/components/common/input_action.gen.d.ts +2 -1
  13. package/dist/components/generated/pb/decentraland/sdk/components/common/input_action.gen.js +1 -0
  14. package/dist/components/generated/pb/decentraland/sdk/components/video_player.gen.d.ts +10 -0
  15. package/dist/components/generated/pb/decentraland/sdk/components/video_player.gen.js +30 -0
  16. package/dist/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts +3 -0
  17. package/dist/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.js +10 -1
  18. package/dist/systems/tween.js +4 -1
  19. package/dist-cjs/components/generated/AvatarLocomotionSettings.gen.d.ts +1 -0
  20. package/dist-cjs/components/generated/AvatarLocomotionSettings.gen.js +28 -0
  21. package/dist-cjs/components/generated/component-names.gen.js +1 -0
  22. package/dist-cjs/components/generated/global.gen.d.ts +2 -0
  23. package/dist-cjs/components/generated/global.gen.js +2 -1
  24. package/dist-cjs/components/generated/index.gen.d.ts +4 -0
  25. package/dist-cjs/components/generated/index.gen.js +8 -2
  26. package/dist-cjs/components/generated/pb/decentraland/sdk/components/audio_stream.gen.d.ts +10 -0
  27. package/dist-cjs/components/generated/pb/decentraland/sdk/components/audio_stream.gen.js +35 -1
  28. package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +29 -0
  29. package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.js +99 -0
  30. package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/input_action.gen.d.ts +2 -1
  31. package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/input_action.gen.js +1 -0
  32. package/dist-cjs/components/generated/pb/decentraland/sdk/components/video_player.gen.d.ts +10 -0
  33. package/dist-cjs/components/generated/pb/decentraland/sdk/components/video_player.gen.js +30 -0
  34. package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts +3 -0
  35. package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.js +10 -1
  36. package/dist-cjs/systems/tween.js +4 -1
  37. package/package.json +2 -2
@@ -0,0 +1,25 @@
1
+ import { PBAvatarLocomotionSettings } from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
2
+ /**
3
+ * @internal
4
+ */
5
+ export const AvatarLocomotionSettingsSchema = {
6
+ COMPONENT_ID: 1211,
7
+ serialize(value, builder) {
8
+ const writer = PBAvatarLocomotionSettings.encode(value);
9
+ const buffer = new Uint8Array(writer.finish(), 0, writer.len);
10
+ builder.writeBuffer(buffer, false);
11
+ },
12
+ deserialize(reader) {
13
+ return PBAvatarLocomotionSettings.decode(reader.buffer(), reader.remainingBytes());
14
+ },
15
+ create() {
16
+ // TODO: this is a hack.
17
+ return PBAvatarLocomotionSettings.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBAvatarLocomotionSettings"
24
+ }
25
+ };
@@ -11,6 +11,7 @@ export const coreComponentMappings = {
11
11
  "core::AvatarBase": 1087,
12
12
  "core::AvatarEmoteCommand": 1088,
13
13
  "core::AvatarEquippedData": 1091,
14
+ "core::AvatarLocomotionSettings": 1211,
14
15
  "core::AvatarModifierArea": 1070,
15
16
  "core::AvatarShape": 1080,
16
17
  "core::Billboard": 1090,
@@ -7,6 +7,7 @@ import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.g
7
7
  import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
8
8
  import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
9
9
  import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
10
+ import { PBAvatarLocomotionSettings } from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
10
11
  import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
11
12
  import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';
12
13
  import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
@@ -53,6 +54,7 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
53
54
  /** @public */ export declare const AvatarBase: LastWriteWinElementSetComponentDefinition<PBAvatarBase>;
54
55
  /** @public */ export declare const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>;
55
56
  /** @public */ export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
57
+ /** @public */ export declare const AvatarLocomotionSettings: LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>;
56
58
  /** @public */ export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
57
59
  /** @public */ export declare const AvatarShape: LastWriteWinElementSetComponentDefinition<PBAvatarShape>;
58
60
  /** @public */ export declare const Billboard: LastWriteWinElementSetComponentDefinition<PBBillboard>;
@@ -8,6 +8,7 @@ export * from './index.gen';
8
8
  /** @public */ export const AvatarBase = /* @__PURE__ */ components.AvatarBase(engine);
9
9
  /** @public */ export const AvatarEmoteCommand = /* @__PURE__ */ components.AvatarEmoteCommand(engine);
10
10
  /** @public */ export const AvatarEquippedData = /* @__PURE__ */ components.AvatarEquippedData(engine);
11
+ /** @public */ export const AvatarLocomotionSettings = /* @__PURE__ */ components.AvatarLocomotionSettings(engine);
11
12
  /** @public */ export const AvatarModifierArea = /* @__PURE__ */ components.AvatarModifierArea(engine);
12
13
  /** @public */ export const AvatarShape = /* @__PURE__ */ components.AvatarShape(engine);
13
14
  /** @public */ export const Billboard = /* @__PURE__ */ components.Billboard(engine);
@@ -8,6 +8,7 @@ import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.g
8
8
  import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
9
9
  import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
10
10
  import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
11
+ import { PBAvatarLocomotionSettings } from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
11
12
  import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
12
13
  import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';
13
14
  import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
@@ -59,6 +60,7 @@ export * from './pb/decentraland/sdk/components/avatar_attach.gen';
59
60
  export * from './pb/decentraland/sdk/components/avatar_base.gen';
60
61
  export * from './pb/decentraland/sdk/components/avatar_emote_command.gen';
61
62
  export * from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
63
+ export * from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
62
64
  export * from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
63
65
  export * from './pb/decentraland/sdk/components/avatar_shape.gen';
64
66
  export * from './pb/decentraland/sdk/components/billboard.gen';
@@ -112,6 +114,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
112
114
  /** @public */ export declare const AvatarBase: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
113
115
  /** @public */ export declare const AvatarEmoteCommand: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
114
116
  /** @public */ export declare const AvatarEquippedData: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
117
+ /** @public */ export declare const AvatarLocomotionSettings: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
115
118
  /** @public */ export declare const AvatarModifierArea: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
116
119
  /** @public */ export declare const AvatarShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
117
120
  /** @public */ export declare const Billboard: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
@@ -165,6 +168,7 @@ export declare const componentDefinitionByName: {
165
168
  "core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
166
169
  "core::AvatarEmoteCommand": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
167
170
  "core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
171
+ "core::AvatarLocomotionSettings": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
168
172
  "core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
169
173
  "core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
170
174
  "core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
@@ -6,6 +6,7 @@ import { AvatarAttachSchema } from './AvatarAttach.gen';
6
6
  import { AvatarBaseSchema } from './AvatarBase.gen';
7
7
  import { AvatarEmoteCommandSchema } from './AvatarEmoteCommand.gen';
8
8
  import { AvatarEquippedDataSchema } from './AvatarEquippedData.gen';
9
+ import { AvatarLocomotionSettingsSchema } from './AvatarLocomotionSettings.gen';
9
10
  import { AvatarModifierAreaSchema } from './AvatarModifierArea.gen';
10
11
  import { AvatarShapeSchema } from './AvatarShape.gen';
11
12
  import { BillboardSchema } from './Billboard.gen';
@@ -57,6 +58,7 @@ export * from './pb/decentraland/sdk/components/avatar_attach.gen';
57
58
  export * from './pb/decentraland/sdk/components/avatar_base.gen';
58
59
  export * from './pb/decentraland/sdk/components/avatar_emote_command.gen';
59
60
  export * from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
61
+ export * from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
60
62
  export * from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
61
63
  export * from './pb/decentraland/sdk/components/avatar_shape.gen';
62
64
  export * from './pb/decentraland/sdk/components/billboard.gen';
@@ -120,6 +122,8 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
120
122
  });
121
123
  /** @public */ export const AvatarEquippedData = engine =>
122
124
  /* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarEquippedData", AvatarEquippedDataSchema);
125
+ /** @public */ export const AvatarLocomotionSettings = engine =>
126
+ /* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarLocomotionSettings", AvatarLocomotionSettingsSchema);
123
127
  /** @public */ export const AvatarModifierArea = engine =>
124
128
  /* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarModifierArea", AvatarModifierAreaSchema);
125
129
  /** @public */ export const AvatarShape = engine =>
@@ -222,6 +226,7 @@ export const componentDefinitionByName = /* @__PURE__ */ {
222
226
  "core::AvatarBase": AvatarBase,
223
227
  "core::AvatarEmoteCommand": AvatarEmoteCommand,
224
228
  "core::AvatarEquippedData": AvatarEquippedData,
229
+ "core::AvatarLocomotionSettings": AvatarLocomotionSettings,
225
230
  "core::AvatarModifierArea": AvatarModifierArea,
226
231
  "core::AvatarShape": AvatarShape,
227
232
  "core::Billboard": Billboard,
@@ -14,6 +14,16 @@ export interface PBAudioStream {
14
14
  volume?: number | undefined;
15
15
  /** the audio stream HTTP URL */
16
16
  url: string;
17
+ /**
18
+ * either the audio will be global or spatial (default: false)
19
+ * global: plays the same way for every listener. It is not affected by distance, direction, or position.
20
+ * spatial: changes depending on where the listener is relative to the sound source
21
+ */
22
+ spatial?: boolean | undefined;
23
+ /** Within the min distance the audio will cease to grow louder in volume (default: 0) */
24
+ spatialMinDistance?: number | undefined;
25
+ /** The distance where sound either becomes inaudible or stops attenuation (default: 60) */
26
+ spatialMaxDistance?: number | undefined;
17
27
  }
18
28
  /**
19
29
  * @public
@@ -2,7 +2,14 @@
2
2
  import _m0 from "protobufjs/minimal";
3
3
  const protobufPackageSarasa = "decentraland.sdk.components";
4
4
  function createBasePBAudioStream() {
5
- return { playing: undefined, volume: undefined, url: "" };
5
+ return {
6
+ playing: undefined,
7
+ volume: undefined,
8
+ url: "",
9
+ spatial: undefined,
10
+ spatialMinDistance: undefined,
11
+ spatialMaxDistance: undefined,
12
+ };
6
13
  }
7
14
  /**
8
15
  * @public
@@ -19,6 +26,15 @@ export var PBAudioStream;
19
26
  if (message.url !== "") {
20
27
  writer.uint32(26).string(message.url);
21
28
  }
29
+ if (message.spatial !== undefined) {
30
+ writer.uint32(32).bool(message.spatial);
31
+ }
32
+ if (message.spatialMinDistance !== undefined) {
33
+ writer.uint32(45).float(message.spatialMinDistance);
34
+ }
35
+ if (message.spatialMaxDistance !== undefined) {
36
+ writer.uint32(53).float(message.spatialMaxDistance);
37
+ }
22
38
  return writer;
23
39
  }
24
40
  PBAudioStream.encode = encode;
@@ -47,6 +63,24 @@ export var PBAudioStream;
47
63
  }
48
64
  message.url = reader.string();
49
65
  continue;
66
+ case 4:
67
+ if (tag !== 32) {
68
+ break;
69
+ }
70
+ message.spatial = reader.bool();
71
+ continue;
72
+ case 5:
73
+ if (tag !== 45) {
74
+ break;
75
+ }
76
+ message.spatialMinDistance = reader.float();
77
+ continue;
78
+ case 6:
79
+ if (tag !== 53) {
80
+ break;
81
+ }
82
+ message.spatialMaxDistance = reader.float();
83
+ continue;
50
84
  }
51
85
  if ((tag & 7) === 4 || tag === 0) {
52
86
  break;
@@ -0,0 +1,29 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ /**
3
+ * The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
4
+ * as the avatar movement speed, jump height etc.
5
+ */
6
+ /**
7
+ * @public
8
+ */
9
+ export interface PBAvatarLocomotionSettings {
10
+ /** Maximum speed when walking (in meters per second) */
11
+ walkSpeed?: number | undefined;
12
+ /** Maximum speed when jogging (in meters per second) */
13
+ jogSpeed?: number | undefined;
14
+ /** Maximum speed when running (in meters per second) */
15
+ runSpeed?: number | undefined;
16
+ /** Height of a regular jump (in meters) */
17
+ jumpHeight?: number | undefined;
18
+ /** Height of a jump while running (in meters) */
19
+ runJumpHeight?: number | undefined;
20
+ /** Cooldown time after a hard landing before the avatar can move again (in seconds) */
21
+ hardLandingCooldown?: number | undefined;
22
+ }
23
+ /**
24
+ * @public
25
+ */
26
+ export declare namespace PBAvatarLocomotionSettings {
27
+ function encode(message: PBAvatarLocomotionSettings, writer?: _m0.Writer): _m0.Writer;
28
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarLocomotionSettings;
29
+ }
@@ -0,0 +1,93 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+ const protobufPackageSarasa = "decentraland.sdk.components";
4
+ function createBasePBAvatarLocomotionSettings() {
5
+ return {
6
+ walkSpeed: undefined,
7
+ jogSpeed: undefined,
8
+ runSpeed: undefined,
9
+ jumpHeight: undefined,
10
+ runJumpHeight: undefined,
11
+ hardLandingCooldown: undefined,
12
+ };
13
+ }
14
+ /**
15
+ * @public
16
+ */
17
+ export var PBAvatarLocomotionSettings;
18
+ (function (PBAvatarLocomotionSettings) {
19
+ function encode(message, writer = _m0.Writer.create()) {
20
+ if (message.walkSpeed !== undefined) {
21
+ writer.uint32(13).float(message.walkSpeed);
22
+ }
23
+ if (message.jogSpeed !== undefined) {
24
+ writer.uint32(21).float(message.jogSpeed);
25
+ }
26
+ if (message.runSpeed !== undefined) {
27
+ writer.uint32(29).float(message.runSpeed);
28
+ }
29
+ if (message.jumpHeight !== undefined) {
30
+ writer.uint32(37).float(message.jumpHeight);
31
+ }
32
+ if (message.runJumpHeight !== undefined) {
33
+ writer.uint32(45).float(message.runJumpHeight);
34
+ }
35
+ if (message.hardLandingCooldown !== undefined) {
36
+ writer.uint32(53).float(message.hardLandingCooldown);
37
+ }
38
+ return writer;
39
+ }
40
+ PBAvatarLocomotionSettings.encode = encode;
41
+ function decode(input, length) {
42
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
43
+ let end = length === undefined ? reader.len : reader.pos + length;
44
+ const message = createBasePBAvatarLocomotionSettings();
45
+ while (reader.pos < end) {
46
+ const tag = reader.uint32();
47
+ switch (tag >>> 3) {
48
+ case 1:
49
+ if (tag !== 13) {
50
+ break;
51
+ }
52
+ message.walkSpeed = reader.float();
53
+ continue;
54
+ case 2:
55
+ if (tag !== 21) {
56
+ break;
57
+ }
58
+ message.jogSpeed = reader.float();
59
+ continue;
60
+ case 3:
61
+ if (tag !== 29) {
62
+ break;
63
+ }
64
+ message.runSpeed = reader.float();
65
+ continue;
66
+ case 4:
67
+ if (tag !== 37) {
68
+ break;
69
+ }
70
+ message.jumpHeight = reader.float();
71
+ continue;
72
+ case 5:
73
+ if (tag !== 45) {
74
+ break;
75
+ }
76
+ message.runJumpHeight = reader.float();
77
+ continue;
78
+ case 6:
79
+ if (tag !== 53) {
80
+ break;
81
+ }
82
+ message.hardLandingCooldown = reader.float();
83
+ continue;
84
+ }
85
+ if ((tag & 7) === 4 || tag === 0) {
86
+ break;
87
+ }
88
+ reader.skipType(tag & 7);
89
+ }
90
+ return message;
91
+ }
92
+ PBAvatarLocomotionSettings.decode = decode;
93
+ })(PBAvatarLocomotionSettings || (PBAvatarLocomotionSettings = {}));
@@ -15,7 +15,8 @@ export declare const enum InputAction {
15
15
  IA_ACTION_3 = 10,
16
16
  IA_ACTION_4 = 11,
17
17
  IA_ACTION_5 = 12,
18
- IA_ACTION_6 = 13
18
+ IA_ACTION_6 = 13,
19
+ IA_MODIFIER = 14
19
20
  }
20
21
  /** PointerEventType is a kind of interaction that can be detected. */
21
22
  /**
@@ -19,6 +19,7 @@ export var InputAction;
19
19
  InputAction[InputAction["IA_ACTION_4"] = 11] = "IA_ACTION_4";
20
20
  InputAction[InputAction["IA_ACTION_5"] = 12] = "IA_ACTION_5";
21
21
  InputAction[InputAction["IA_ACTION_6"] = 13] = "IA_ACTION_6";
22
+ InputAction[InputAction["IA_MODIFIER"] = 14] = "IA_MODIFIER";
22
23
  })(InputAction || (InputAction = {}));
23
24
  /** PointerEventType is a kind of interaction that can be detected. */
24
25
  /**
@@ -15,6 +15,16 @@ export interface PBVideoPlayer {
15
15
  playbackRate?: number | undefined;
16
16
  /** default false */
17
17
  loop?: boolean | undefined;
18
+ /**
19
+ * either the audio will be global or spatial (default: false)
20
+ * global: plays the same way for every listener. It is not affected by distance, direction, or position.
21
+ * spatial: changes depending on where the listener is relative to the sound source
22
+ */
23
+ spatial?: boolean | undefined;
24
+ /** Within the min distance the audio will cease to grow louder in volume (default: 0) */
25
+ spatialMinDistance?: number | undefined;
26
+ /** The distance where sound either becomes inaudible or stops attenuation (default: 60) */
27
+ spatialMaxDistance?: number | undefined;
18
28
  }
19
29
  /**
20
30
  * @public
@@ -9,6 +9,9 @@ function createBasePBVideoPlayer() {
9
9
  volume: undefined,
10
10
  playbackRate: undefined,
11
11
  loop: undefined,
12
+ spatial: undefined,
13
+ spatialMinDistance: undefined,
14
+ spatialMaxDistance: undefined,
12
15
  };
13
16
  }
14
17
  /**
@@ -35,6 +38,15 @@ export var PBVideoPlayer;
35
38
  if (message.loop !== undefined) {
36
39
  writer.uint32(48).bool(message.loop);
37
40
  }
41
+ if (message.spatial !== undefined) {
42
+ writer.uint32(56).bool(message.spatial);
43
+ }
44
+ if (message.spatialMinDistance !== undefined) {
45
+ writer.uint32(69).float(message.spatialMinDistance);
46
+ }
47
+ if (message.spatialMaxDistance !== undefined) {
48
+ writer.uint32(77).float(message.spatialMaxDistance);
49
+ }
38
50
  return writer;
39
51
  }
40
52
  PBVideoPlayer.encode = encode;
@@ -81,6 +93,24 @@ export var PBVideoPlayer;
81
93
  }
82
94
  message.loop = reader.bool();
83
95
  continue;
96
+ case 7:
97
+ if (tag !== 56) {
98
+ break;
99
+ }
100
+ message.spatial = reader.bool();
101
+ continue;
102
+ case 8:
103
+ if (tag !== 69) {
104
+ break;
105
+ }
106
+ message.spatialMinDistance = reader.float();
107
+ continue;
108
+ case 9:
109
+ if (tag !== 77) {
110
+ break;
111
+ }
112
+ message.spatialMaxDistance = reader.float();
113
+ continue;
84
114
  }
85
115
  if ((tag & 7) === 4 || tag === 0) {
86
116
  break;
@@ -6,6 +6,7 @@ import { CameraTransition } from "./common/camera_transition.gen";
6
6
  * an 'instant' transition (like using speed/time = 0)
7
7
  * * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
8
8
  * the holding entity transform).
9
+ * * The fov defines the Field of View of the virtual camera
9
10
  */
10
11
  /**
11
12
  * @public
@@ -13,6 +14,8 @@ import { CameraTransition } from "./common/camera_transition.gen";
13
14
  export interface PBVirtualCamera {
14
15
  defaultTransition?: CameraTransition | undefined;
15
16
  lookAtEntity?: number | undefined;
17
+ /** default: 60 */
18
+ fov?: number | undefined;
16
19
  }
17
20
  /**
18
21
  * @public
@@ -3,7 +3,7 @@ import _m0 from "protobufjs/minimal";
3
3
  import { CameraTransition } from "./common/camera_transition.gen";
4
4
  const protobufPackageSarasa = "decentraland.sdk.components";
5
5
  function createBasePBVirtualCamera() {
6
- return { defaultTransition: undefined, lookAtEntity: undefined };
6
+ return { defaultTransition: undefined, lookAtEntity: undefined, fov: undefined };
7
7
  }
8
8
  /**
9
9
  * @public
@@ -17,6 +17,9 @@ export var PBVirtualCamera;
17
17
  if (message.lookAtEntity !== undefined) {
18
18
  writer.uint32(16).uint32(message.lookAtEntity);
19
19
  }
20
+ if (message.fov !== undefined) {
21
+ writer.uint32(29).float(message.fov);
22
+ }
20
23
  return writer;
21
24
  }
22
25
  PBVirtualCamera.encode = encode;
@@ -39,6 +42,12 @@ export var PBVirtualCamera;
39
42
  }
40
43
  message.lookAtEntity = reader.uint32();
41
44
  continue;
45
+ case 3:
46
+ if (tag !== 29) {
47
+ break;
48
+ }
49
+ message.fov = reader.float();
50
+ continue;
42
51
  }
43
52
  if ((tag & 7) === 4 || tag === 0) {
44
53
  break;
@@ -85,7 +85,10 @@ export function createTweenSystem(engine) {
85
85
  };
86
86
  }
87
87
  if (tween.mode?.$case === 'scale' && tween.mode.scale) {
88
- return { ...tween, mode: { ...tween.mode, scale: { start: tween.mode.scale.end, end: tween.mode.scale.start } } };
88
+ return {
89
+ ...tween,
90
+ mode: { ...tween.mode, scale: { start: tween.mode.scale.end, end: tween.mode.scale.start } }
91
+ };
89
92
  }
90
93
  if (tween.mode?.$case === 'textureMove' && tween.mode.textureMove) {
91
94
  return {
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AvatarLocomotionSettingsSchema = void 0;
4
+ const avatar_locomotion_settings_gen_1 = require("./pb/decentraland/sdk/components/avatar_locomotion_settings.gen");
5
+ /**
6
+ * @internal
7
+ */
8
+ exports.AvatarLocomotionSettingsSchema = {
9
+ COMPONENT_ID: 1211,
10
+ serialize(value, builder) {
11
+ const writer = avatar_locomotion_settings_gen_1.PBAvatarLocomotionSettings.encode(value);
12
+ const buffer = new Uint8Array(writer.finish(), 0, writer.len);
13
+ builder.writeBuffer(buffer, false);
14
+ },
15
+ deserialize(reader) {
16
+ return avatar_locomotion_settings_gen_1.PBAvatarLocomotionSettings.decode(reader.buffer(), reader.remainingBytes());
17
+ },
18
+ create() {
19
+ // TODO: this is a hack.
20
+ return avatar_locomotion_settings_gen_1.PBAvatarLocomotionSettings.decode(new Uint8Array());
21
+ },
22
+ jsonSchema: {
23
+ type: "object",
24
+ properties: {},
25
+ serializationType: "protocol-buffer",
26
+ protocolBuffer: "PBAvatarLocomotionSettings"
27
+ }
28
+ };
@@ -14,6 +14,7 @@ exports.coreComponentMappings = {
14
14
  "core::AvatarBase": 1087,
15
15
  "core::AvatarEmoteCommand": 1088,
16
16
  "core::AvatarEquippedData": 1091,
17
+ "core::AvatarLocomotionSettings": 1211,
17
18
  "core::AvatarModifierArea": 1070,
18
19
  "core::AvatarShape": 1080,
19
20
  "core::Billboard": 1090,
@@ -7,6 +7,7 @@ import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.g
7
7
  import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
8
8
  import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
9
9
  import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
10
+ import { PBAvatarLocomotionSettings } from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
10
11
  import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
11
12
  import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';
12
13
  import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
@@ -53,6 +54,7 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
53
54
  /** @public */ export declare const AvatarBase: LastWriteWinElementSetComponentDefinition<PBAvatarBase>;
54
55
  /** @public */ export declare const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>;
55
56
  /** @public */ export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
57
+ /** @public */ export declare const AvatarLocomotionSettings: LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>;
56
58
  /** @public */ export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
57
59
  /** @public */ export declare const AvatarShape: LastWriteWinElementSetComponentDefinition<PBAvatarShape>;
58
60
  /** @public */ export declare const Billboard: LastWriteWinElementSetComponentDefinition<PBBillboard>;
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.TriggerAreaResult = exports.TriggerArea = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.NftShape = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarModifierArea = exports.AvatarEquippedData = exports.AvatarEmoteCommand = exports.AvatarBase = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.AudioEvent = void 0;
29
+ exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.TriggerAreaResult = exports.TriggerArea = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.NftShape = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarModifierArea = exports.AvatarLocomotionSettings = exports.AvatarEquippedData = exports.AvatarEmoteCommand = exports.AvatarBase = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.AudioEvent = void 0;
30
30
  const initialization_1 = require("../../runtime/initialization");
31
31
  const components = __importStar(require("./index.gen"));
32
32
  __exportStar(require("./index.gen"), exports);
@@ -37,6 +37,7 @@ __exportStar(require("./index.gen"), exports);
37
37
  /** @public */ exports.AvatarBase = components.AvatarBase(initialization_1.engine);
38
38
  /** @public */ exports.AvatarEmoteCommand = components.AvatarEmoteCommand(initialization_1.engine);
39
39
  /** @public */ exports.AvatarEquippedData = components.AvatarEquippedData(initialization_1.engine);
40
+ /** @public */ exports.AvatarLocomotionSettings = components.AvatarLocomotionSettings(initialization_1.engine);
40
41
  /** @public */ exports.AvatarModifierArea = components.AvatarModifierArea(initialization_1.engine);
41
42
  /** @public */ exports.AvatarShape = components.AvatarShape(initialization_1.engine);
42
43
  /** @public */ exports.Billboard = components.Billboard(initialization_1.engine);
@@ -8,6 +8,7 @@ import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.g
8
8
  import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
9
9
  import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
10
10
  import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
11
+ import { PBAvatarLocomotionSettings } from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
11
12
  import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
12
13
  import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';
13
14
  import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
@@ -59,6 +60,7 @@ export * from './pb/decentraland/sdk/components/avatar_attach.gen';
59
60
  export * from './pb/decentraland/sdk/components/avatar_base.gen';
60
61
  export * from './pb/decentraland/sdk/components/avatar_emote_command.gen';
61
62
  export * from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
63
+ export * from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
62
64
  export * from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
63
65
  export * from './pb/decentraland/sdk/components/avatar_shape.gen';
64
66
  export * from './pb/decentraland/sdk/components/billboard.gen';
@@ -112,6 +114,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
112
114
  /** @public */ export declare const AvatarBase: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
113
115
  /** @public */ export declare const AvatarEmoteCommand: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
114
116
  /** @public */ export declare const AvatarEquippedData: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
117
+ /** @public */ export declare const AvatarLocomotionSettings: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
115
118
  /** @public */ export declare const AvatarModifierArea: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
116
119
  /** @public */ export declare const AvatarShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
117
120
  /** @public */ export declare const Billboard: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
@@ -165,6 +168,7 @@ export declare const componentDefinitionByName: {
165
168
  "core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
166
169
  "core::AvatarEmoteCommand": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
167
170
  "core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
171
+ "core::AvatarLocomotionSettings": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
168
172
  "core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
169
173
  "core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
170
174
  "core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
@@ -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.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.Tween = exports.TriggerAreaResult = exports.TriggerArea = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.NftShape = exports.MeshRenderer = exports.MeshCollider = exports.Material = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarModifierArea = exports.AvatarEquippedData = exports.AvatarEmoteCommand = exports.AvatarBase = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.AudioEvent = exports.Animator = void 0;
18
- exports.componentDefinitionByName = exports.VisibilityComponent = void 0;
17
+ exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.Tween = exports.TriggerAreaResult = exports.TriggerArea = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.NftShape = exports.MeshRenderer = exports.MeshCollider = exports.Material = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarModifierArea = exports.AvatarLocomotionSettings = exports.AvatarEquippedData = exports.AvatarEmoteCommand = exports.AvatarBase = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.AudioEvent = exports.Animator = void 0;
18
+ exports.componentDefinitionByName = exports.VisibilityComponent = exports.VirtualCamera = void 0;
19
19
  const Animator_gen_1 = require("./Animator.gen");
20
20
  const AudioEvent_gen_1 = require("./AudioEvent.gen");
21
21
  const AudioSource_gen_1 = require("./AudioSource.gen");
@@ -24,6 +24,7 @@ const AvatarAttach_gen_1 = require("./AvatarAttach.gen");
24
24
  const AvatarBase_gen_1 = require("./AvatarBase.gen");
25
25
  const AvatarEmoteCommand_gen_1 = require("./AvatarEmoteCommand.gen");
26
26
  const AvatarEquippedData_gen_1 = require("./AvatarEquippedData.gen");
27
+ const AvatarLocomotionSettings_gen_1 = require("./AvatarLocomotionSettings.gen");
27
28
  const AvatarModifierArea_gen_1 = require("./AvatarModifierArea.gen");
28
29
  const AvatarShape_gen_1 = require("./AvatarShape.gen");
29
30
  const Billboard_gen_1 = require("./Billboard.gen");
@@ -75,6 +76,7 @@ __exportStar(require("./pb/decentraland/sdk/components/avatar_attach.gen"), expo
75
76
  __exportStar(require("./pb/decentraland/sdk/components/avatar_base.gen"), exports);
76
77
  __exportStar(require("./pb/decentraland/sdk/components/avatar_emote_command.gen"), exports);
77
78
  __exportStar(require("./pb/decentraland/sdk/components/avatar_equipped_data.gen"), exports);
79
+ __exportStar(require("./pb/decentraland/sdk/components/avatar_locomotion_settings.gen"), exports);
78
80
  __exportStar(require("./pb/decentraland/sdk/components/avatar_modifier_area.gen"), exports);
79
81
  __exportStar(require("./pb/decentraland/sdk/components/avatar_shape.gen"), exports);
80
82
  __exportStar(require("./pb/decentraland/sdk/components/billboard.gen"), exports);
@@ -146,6 +148,9 @@ exports.AvatarEmoteCommand = AvatarEmoteCommand;
146
148
  /** @public */ const AvatarEquippedData = engine =>
147
149
  /* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarEquippedData", AvatarEquippedData_gen_1.AvatarEquippedDataSchema);
148
150
  exports.AvatarEquippedData = AvatarEquippedData;
151
+ /** @public */ const AvatarLocomotionSettings = engine =>
152
+ /* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarLocomotionSettings", AvatarLocomotionSettings_gen_1.AvatarLocomotionSettingsSchema);
153
+ exports.AvatarLocomotionSettings = AvatarLocomotionSettings;
149
154
  /** @public */ const AvatarModifierArea = engine =>
150
155
  /* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarModifierArea", AvatarModifierArea_gen_1.AvatarModifierAreaSchema);
151
156
  exports.AvatarModifierArea = AvatarModifierArea;
@@ -291,6 +296,7 @@ exports.componentDefinitionByName = {
291
296
  "core::AvatarBase": exports.AvatarBase,
292
297
  "core::AvatarEmoteCommand": exports.AvatarEmoteCommand,
293
298
  "core::AvatarEquippedData": exports.AvatarEquippedData,
299
+ "core::AvatarLocomotionSettings": exports.AvatarLocomotionSettings,
294
300
  "core::AvatarModifierArea": exports.AvatarModifierArea,
295
301
  "core::AvatarShape": exports.AvatarShape,
296
302
  "core::Billboard": exports.Billboard,
@@ -14,6 +14,16 @@ export interface PBAudioStream {
14
14
  volume?: number | undefined;
15
15
  /** the audio stream HTTP URL */
16
16
  url: string;
17
+ /**
18
+ * either the audio will be global or spatial (default: false)
19
+ * global: plays the same way for every listener. It is not affected by distance, direction, or position.
20
+ * spatial: changes depending on where the listener is relative to the sound source
21
+ */
22
+ spatial?: boolean | undefined;
23
+ /** Within the min distance the audio will cease to grow louder in volume (default: 0) */
24
+ spatialMinDistance?: number | undefined;
25
+ /** The distance where sound either becomes inaudible or stops attenuation (default: 60) */
26
+ spatialMaxDistance?: number | undefined;
17
27
  }
18
28
  /**
19
29
  * @public
@@ -8,7 +8,14 @@ exports.PBAudioStream = void 0;
8
8
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
9
9
  const protobufPackageSarasa = "decentraland.sdk.components";
10
10
  function createBasePBAudioStream() {
11
- return { playing: undefined, volume: undefined, url: "" };
11
+ return {
12
+ playing: undefined,
13
+ volume: undefined,
14
+ url: "",
15
+ spatial: undefined,
16
+ spatialMinDistance: undefined,
17
+ spatialMaxDistance: undefined,
18
+ };
12
19
  }
13
20
  /**
14
21
  * @public
@@ -25,6 +32,15 @@ var PBAudioStream;
25
32
  if (message.url !== "") {
26
33
  writer.uint32(26).string(message.url);
27
34
  }
35
+ if (message.spatial !== undefined) {
36
+ writer.uint32(32).bool(message.spatial);
37
+ }
38
+ if (message.spatialMinDistance !== undefined) {
39
+ writer.uint32(45).float(message.spatialMinDistance);
40
+ }
41
+ if (message.spatialMaxDistance !== undefined) {
42
+ writer.uint32(53).float(message.spatialMaxDistance);
43
+ }
28
44
  return writer;
29
45
  }
30
46
  PBAudioStream.encode = encode;
@@ -53,6 +69,24 @@ var PBAudioStream;
53
69
  }
54
70
  message.url = reader.string();
55
71
  continue;
72
+ case 4:
73
+ if (tag !== 32) {
74
+ break;
75
+ }
76
+ message.spatial = reader.bool();
77
+ continue;
78
+ case 5:
79
+ if (tag !== 45) {
80
+ break;
81
+ }
82
+ message.spatialMinDistance = reader.float();
83
+ continue;
84
+ case 6:
85
+ if (tag !== 53) {
86
+ break;
87
+ }
88
+ message.spatialMaxDistance = reader.float();
89
+ continue;
56
90
  }
57
91
  if ((tag & 7) === 4 || tag === 0) {
58
92
  break;
@@ -0,0 +1,29 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ /**
3
+ * The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
4
+ * as the avatar movement speed, jump height etc.
5
+ */
6
+ /**
7
+ * @public
8
+ */
9
+ export interface PBAvatarLocomotionSettings {
10
+ /** Maximum speed when walking (in meters per second) */
11
+ walkSpeed?: number | undefined;
12
+ /** Maximum speed when jogging (in meters per second) */
13
+ jogSpeed?: number | undefined;
14
+ /** Maximum speed when running (in meters per second) */
15
+ runSpeed?: number | undefined;
16
+ /** Height of a regular jump (in meters) */
17
+ jumpHeight?: number | undefined;
18
+ /** Height of a jump while running (in meters) */
19
+ runJumpHeight?: number | undefined;
20
+ /** Cooldown time after a hard landing before the avatar can move again (in seconds) */
21
+ hardLandingCooldown?: number | undefined;
22
+ }
23
+ /**
24
+ * @public
25
+ */
26
+ export declare namespace PBAvatarLocomotionSettings {
27
+ function encode(message: PBAvatarLocomotionSettings, writer?: _m0.Writer): _m0.Writer;
28
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarLocomotionSettings;
29
+ }
@@ -0,0 +1,99 @@
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.PBAvatarLocomotionSettings = void 0;
7
+ /* eslint-disable */
8
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
9
+ const protobufPackageSarasa = "decentraland.sdk.components";
10
+ function createBasePBAvatarLocomotionSettings() {
11
+ return {
12
+ walkSpeed: undefined,
13
+ jogSpeed: undefined,
14
+ runSpeed: undefined,
15
+ jumpHeight: undefined,
16
+ runJumpHeight: undefined,
17
+ hardLandingCooldown: undefined,
18
+ };
19
+ }
20
+ /**
21
+ * @public
22
+ */
23
+ var PBAvatarLocomotionSettings;
24
+ (function (PBAvatarLocomotionSettings) {
25
+ function encode(message, writer = minimal_1.default.Writer.create()) {
26
+ if (message.walkSpeed !== undefined) {
27
+ writer.uint32(13).float(message.walkSpeed);
28
+ }
29
+ if (message.jogSpeed !== undefined) {
30
+ writer.uint32(21).float(message.jogSpeed);
31
+ }
32
+ if (message.runSpeed !== undefined) {
33
+ writer.uint32(29).float(message.runSpeed);
34
+ }
35
+ if (message.jumpHeight !== undefined) {
36
+ writer.uint32(37).float(message.jumpHeight);
37
+ }
38
+ if (message.runJumpHeight !== undefined) {
39
+ writer.uint32(45).float(message.runJumpHeight);
40
+ }
41
+ if (message.hardLandingCooldown !== undefined) {
42
+ writer.uint32(53).float(message.hardLandingCooldown);
43
+ }
44
+ return writer;
45
+ }
46
+ PBAvatarLocomotionSettings.encode = encode;
47
+ function decode(input, length) {
48
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
49
+ let end = length === undefined ? reader.len : reader.pos + length;
50
+ const message = createBasePBAvatarLocomotionSettings();
51
+ while (reader.pos < end) {
52
+ const tag = reader.uint32();
53
+ switch (tag >>> 3) {
54
+ case 1:
55
+ if (tag !== 13) {
56
+ break;
57
+ }
58
+ message.walkSpeed = reader.float();
59
+ continue;
60
+ case 2:
61
+ if (tag !== 21) {
62
+ break;
63
+ }
64
+ message.jogSpeed = reader.float();
65
+ continue;
66
+ case 3:
67
+ if (tag !== 29) {
68
+ break;
69
+ }
70
+ message.runSpeed = reader.float();
71
+ continue;
72
+ case 4:
73
+ if (tag !== 37) {
74
+ break;
75
+ }
76
+ message.jumpHeight = reader.float();
77
+ continue;
78
+ case 5:
79
+ if (tag !== 45) {
80
+ break;
81
+ }
82
+ message.runJumpHeight = reader.float();
83
+ continue;
84
+ case 6:
85
+ if (tag !== 53) {
86
+ break;
87
+ }
88
+ message.hardLandingCooldown = reader.float();
89
+ continue;
90
+ }
91
+ if ((tag & 7) === 4 || tag === 0) {
92
+ break;
93
+ }
94
+ reader.skipType(tag & 7);
95
+ }
96
+ return message;
97
+ }
98
+ PBAvatarLocomotionSettings.decode = decode;
99
+ })(PBAvatarLocomotionSettings = exports.PBAvatarLocomotionSettings || (exports.PBAvatarLocomotionSettings = {}));
@@ -15,7 +15,8 @@ export declare const enum InputAction {
15
15
  IA_ACTION_3 = 10,
16
16
  IA_ACTION_4 = 11,
17
17
  IA_ACTION_5 = 12,
18
- IA_ACTION_6 = 13
18
+ IA_ACTION_6 = 13,
19
+ IA_MODIFIER = 14
19
20
  }
20
21
  /** PointerEventType is a kind of interaction that can be detected. */
21
22
  /**
@@ -22,6 +22,7 @@ var InputAction;
22
22
  InputAction[InputAction["IA_ACTION_4"] = 11] = "IA_ACTION_4";
23
23
  InputAction[InputAction["IA_ACTION_5"] = 12] = "IA_ACTION_5";
24
24
  InputAction[InputAction["IA_ACTION_6"] = 13] = "IA_ACTION_6";
25
+ InputAction[InputAction["IA_MODIFIER"] = 14] = "IA_MODIFIER";
25
26
  })(InputAction = exports.InputAction || (exports.InputAction = {}));
26
27
  /** PointerEventType is a kind of interaction that can be detected. */
27
28
  /**
@@ -15,6 +15,16 @@ export interface PBVideoPlayer {
15
15
  playbackRate?: number | undefined;
16
16
  /** default false */
17
17
  loop?: boolean | undefined;
18
+ /**
19
+ * either the audio will be global or spatial (default: false)
20
+ * global: plays the same way for every listener. It is not affected by distance, direction, or position.
21
+ * spatial: changes depending on where the listener is relative to the sound source
22
+ */
23
+ spatial?: boolean | undefined;
24
+ /** Within the min distance the audio will cease to grow louder in volume (default: 0) */
25
+ spatialMinDistance?: number | undefined;
26
+ /** The distance where sound either becomes inaudible or stops attenuation (default: 60) */
27
+ spatialMaxDistance?: number | undefined;
18
28
  }
19
29
  /**
20
30
  * @public
@@ -15,6 +15,9 @@ function createBasePBVideoPlayer() {
15
15
  volume: undefined,
16
16
  playbackRate: undefined,
17
17
  loop: undefined,
18
+ spatial: undefined,
19
+ spatialMinDistance: undefined,
20
+ spatialMaxDistance: undefined,
18
21
  };
19
22
  }
20
23
  /**
@@ -41,6 +44,15 @@ var PBVideoPlayer;
41
44
  if (message.loop !== undefined) {
42
45
  writer.uint32(48).bool(message.loop);
43
46
  }
47
+ if (message.spatial !== undefined) {
48
+ writer.uint32(56).bool(message.spatial);
49
+ }
50
+ if (message.spatialMinDistance !== undefined) {
51
+ writer.uint32(69).float(message.spatialMinDistance);
52
+ }
53
+ if (message.spatialMaxDistance !== undefined) {
54
+ writer.uint32(77).float(message.spatialMaxDistance);
55
+ }
44
56
  return writer;
45
57
  }
46
58
  PBVideoPlayer.encode = encode;
@@ -87,6 +99,24 @@ var PBVideoPlayer;
87
99
  }
88
100
  message.loop = reader.bool();
89
101
  continue;
102
+ case 7:
103
+ if (tag !== 56) {
104
+ break;
105
+ }
106
+ message.spatial = reader.bool();
107
+ continue;
108
+ case 8:
109
+ if (tag !== 69) {
110
+ break;
111
+ }
112
+ message.spatialMinDistance = reader.float();
113
+ continue;
114
+ case 9:
115
+ if (tag !== 77) {
116
+ break;
117
+ }
118
+ message.spatialMaxDistance = reader.float();
119
+ continue;
90
120
  }
91
121
  if ((tag & 7) === 4 || tag === 0) {
92
122
  break;
@@ -6,6 +6,7 @@ import { CameraTransition } from "./common/camera_transition.gen";
6
6
  * an 'instant' transition (like using speed/time = 0)
7
7
  * * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
8
8
  * the holding entity transform).
9
+ * * The fov defines the Field of View of the virtual camera
9
10
  */
10
11
  /**
11
12
  * @public
@@ -13,6 +14,8 @@ import { CameraTransition } from "./common/camera_transition.gen";
13
14
  export interface PBVirtualCamera {
14
15
  defaultTransition?: CameraTransition | undefined;
15
16
  lookAtEntity?: number | undefined;
17
+ /** default: 60 */
18
+ fov?: number | undefined;
16
19
  }
17
20
  /**
18
21
  * @public
@@ -9,7 +9,7 @@ const minimal_1 = __importDefault(require("protobufjs/minimal"));
9
9
  const camera_transition_gen_1 = require("./common/camera_transition.gen");
10
10
  const protobufPackageSarasa = "decentraland.sdk.components";
11
11
  function createBasePBVirtualCamera() {
12
- return { defaultTransition: undefined, lookAtEntity: undefined };
12
+ return { defaultTransition: undefined, lookAtEntity: undefined, fov: undefined };
13
13
  }
14
14
  /**
15
15
  * @public
@@ -23,6 +23,9 @@ var PBVirtualCamera;
23
23
  if (message.lookAtEntity !== undefined) {
24
24
  writer.uint32(16).uint32(message.lookAtEntity);
25
25
  }
26
+ if (message.fov !== undefined) {
27
+ writer.uint32(29).float(message.fov);
28
+ }
26
29
  return writer;
27
30
  }
28
31
  PBVirtualCamera.encode = encode;
@@ -45,6 +48,12 @@ var PBVirtualCamera;
45
48
  }
46
49
  message.lookAtEntity = reader.uint32();
47
50
  continue;
51
+ case 3:
52
+ if (tag !== 29) {
53
+ break;
54
+ }
55
+ message.fov = reader.float();
56
+ continue;
48
57
  }
49
58
  if ((tag & 7) === 4 || tag === 0) {
50
59
  break;
@@ -111,7 +111,10 @@ function createTweenSystem(engine) {
111
111
  };
112
112
  }
113
113
  if (tween.mode?.$case === 'scale' && tween.mode.scale) {
114
- return { ...tween, mode: { ...tween.mode, scale: { start: tween.mode.scale.end, end: tween.mode.scale.start } } };
114
+ return {
115
+ ...tween,
116
+ mode: { ...tween.mode, scale: { start: tween.mode.scale.end, end: tween.mode.scale.start } }
117
+ };
115
118
  }
116
119
  if (tween.mode?.$case === 'textureMove' && tween.mode.textureMove) {
117
120
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcl/ecs",
3
3
  "description": "Decentraland ECS",
4
- "version": "7.14.1-19673051995.commit-94f9a7a",
4
+ "version": "7.14.1-19678724586.commit-33186ef",
5
5
  "author": "DCL",
6
6
  "bugs": "https://github.com/decentraland/ecs/issues",
7
7
  "files": [
@@ -33,5 +33,5 @@
33
33
  },
34
34
  "types": "./dist/index.d.ts",
35
35
  "typings": "./dist/index.d.ts",
36
- "commit": "94f9a7ab1bfa5d78075a601c957705c92be6085f"
36
+ "commit": "33186efbcd48f65eea8fa06e1de23168f7f06a8b"
37
37
  }