@dcl/ecs 7.5.7-9960158359.commit-c851663 → 7.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/generated/InputModifier.gen.d.ts +1 -0
- package/dist/components/generated/InputModifier.gen.js +25 -0
- package/dist/components/generated/MapPin.gen.d.ts +1 -0
- package/dist/components/generated/MapPin.gen.js +25 -0
- package/dist/components/generated/component-names.gen.js +2 -0
- package/dist/components/generated/global.gen.d.ts +2 -0
- package/dist/components/generated/global.gen.js +1 -0
- package/dist/components/generated/index.gen.d.ts +4 -0
- package/dist/components/generated/index.gen.js +5 -0
- package/dist/components/generated/pb/decentraland/sdk/components/input_modifier.gen.d.ts +36 -0
- package/dist/components/generated/pb/decentraland/sdk/components/input_modifier.gen.js +133 -0
- package/dist/components/generated/pb/decentraland/sdk/components/map_pin.gen.d.ts +24 -0
- package/dist/components/generated/pb/decentraland/sdk/components/map_pin.gen.js +79 -0
- package/dist/engine/grow-only-value-set-component-definition.js +10 -3
- package/dist/engine/index.js +2 -8
- package/dist/engine/lww-element-set-component-definition.js +10 -3
- package/dist-cjs/components/generated/InputModifier.gen.d.ts +1 -0
- package/dist-cjs/components/generated/InputModifier.gen.js +28 -0
- package/dist-cjs/components/generated/MapPin.gen.d.ts +1 -0
- package/dist-cjs/components/generated/MapPin.gen.js +28 -0
- package/dist-cjs/components/generated/component-names.gen.js +2 -0
- package/dist-cjs/components/generated/global.gen.d.ts +2 -0
- package/dist-cjs/components/generated/global.gen.js +2 -1
- package/dist-cjs/components/generated/index.gen.d.ts +4 -0
- package/dist-cjs/components/generated/index.gen.js +7 -1
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/input_modifier.gen.d.ts +36 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/input_modifier.gen.js +139 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/map_pin.gen.d.ts +24 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/map_pin.gen.js +85 -0
- package/dist-cjs/engine/grow-only-value-set-component-definition.js +10 -3
- package/dist-cjs/engine/index.js +2 -8
- package/dist-cjs/engine/lww-element-set-component-definition.js +10 -3
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PBInputModifier } from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export const InputModifierSchema = {
|
|
6
|
+
COMPONENT_ID: 1078,
|
|
7
|
+
serialize(value, builder) {
|
|
8
|
+
const writer = PBInputModifier.encode(value);
|
|
9
|
+
const buffer = new Uint8Array(writer.finish(), 0, writer.len);
|
|
10
|
+
builder.writeBuffer(buffer, false);
|
|
11
|
+
},
|
|
12
|
+
deserialize(reader) {
|
|
13
|
+
return PBInputModifier.decode(reader.buffer(), reader.remainingBytes());
|
|
14
|
+
},
|
|
15
|
+
create() {
|
|
16
|
+
// TODO: this is a hack.
|
|
17
|
+
return PBInputModifier.decode(new Uint8Array());
|
|
18
|
+
},
|
|
19
|
+
jsonSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {},
|
|
22
|
+
serializationType: "protocol-buffer",
|
|
23
|
+
protocolBuffer: "PBInputModifier"
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PBMapPin } from './pb/decentraland/sdk/components/map_pin.gen';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export const MapPinSchema = {
|
|
6
|
+
COMPONENT_ID: 1097,
|
|
7
|
+
serialize(value, builder) {
|
|
8
|
+
const writer = PBMapPin.encode(value);
|
|
9
|
+
const buffer = new Uint8Array(writer.finish(), 0, writer.len);
|
|
10
|
+
builder.writeBuffer(buffer, false);
|
|
11
|
+
},
|
|
12
|
+
deserialize(reader) {
|
|
13
|
+
return PBMapPin.decode(reader.buffer(), reader.remainingBytes());
|
|
14
|
+
},
|
|
15
|
+
create() {
|
|
16
|
+
// TODO: this is a hack.
|
|
17
|
+
return PBMapPin.decode(new Uint8Array());
|
|
18
|
+
},
|
|
19
|
+
jsonSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {},
|
|
22
|
+
serializationType: "protocol-buffer",
|
|
23
|
+
protocolBuffer: "PBMapPin"
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -19,6 +19,8 @@ export const coreComponentMappings = {
|
|
|
19
19
|
"core::EngineInfo": 1048,
|
|
20
20
|
"core::GltfContainer": 1041,
|
|
21
21
|
"core::GltfContainerLoadingState": 1049,
|
|
22
|
+
"core::InputModifier": 1078,
|
|
23
|
+
"core::MapPin": 1097,
|
|
22
24
|
"core::Material": 1017,
|
|
23
25
|
"core::MeshCollider": 1019,
|
|
24
26
|
"core::MeshRenderer": 1018,
|
|
@@ -15,6 +15,7 @@ import { PBCameraModeArea } from './pb/decentraland/sdk/components/camera_mode_a
|
|
|
15
15
|
import { PBEngineInfo } from './pb/decentraland/sdk/components/engine_info.gen';
|
|
16
16
|
import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
17
17
|
import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
18
|
+
import { PBInputModifier } from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
18
19
|
import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
|
|
19
20
|
import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
20
21
|
import { PBPointerEvents } from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
@@ -52,6 +53,7 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
52
53
|
/** @public */ export declare const EngineInfo: LastWriteWinElementSetComponentDefinition<PBEngineInfo>;
|
|
53
54
|
/** @public */ export declare const GltfContainer: LastWriteWinElementSetComponentDefinition<PBGltfContainer>;
|
|
54
55
|
/** @public */ export declare const GltfContainerLoadingState: LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>;
|
|
56
|
+
/** @public */ export declare const InputModifier: LastWriteWinElementSetComponentDefinition<PBInputModifier>;
|
|
55
57
|
/** @public */ export declare const NftShape: LastWriteWinElementSetComponentDefinition<PBNftShape>;
|
|
56
58
|
/** @public */ export declare const PlayerIdentityData: LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>;
|
|
57
59
|
/** @public */ export declare const PointerEvents: LastWriteWinElementSetComponentDefinition<PBPointerEvents>;
|
|
@@ -16,6 +16,7 @@ export * from './index.gen';
|
|
|
16
16
|
/** @public */ export const EngineInfo = /* @__PURE__ */ components.EngineInfo(engine);
|
|
17
17
|
/** @public */ export const GltfContainer = /* @__PURE__ */ components.GltfContainer(engine);
|
|
18
18
|
/** @public */ export const GltfContainerLoadingState = /* @__PURE__ */ components.GltfContainerLoadingState(engine);
|
|
19
|
+
/** @public */ export const InputModifier = /* @__PURE__ */ components.InputModifier(engine);
|
|
19
20
|
/** @public */ export const NftShape = /* @__PURE__ */ components.NftShape(engine);
|
|
20
21
|
/** @public */ export const PlayerIdentityData = /* @__PURE__ */ components.PlayerIdentityData(engine);
|
|
21
22
|
/** @public */ export const PointerEvents = /* @__PURE__ */ components.PointerEvents(engine);
|
|
@@ -16,6 +16,7 @@ import { PBCameraModeArea } from './pb/decentraland/sdk/components/camera_mode_a
|
|
|
16
16
|
import { PBEngineInfo } from './pb/decentraland/sdk/components/engine_info.gen';
|
|
17
17
|
import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
18
18
|
import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
19
|
+
import { PBInputModifier } from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
19
20
|
import { PBMaterial } from './pb/decentraland/sdk/components/material.gen';
|
|
20
21
|
import { PBMeshCollider } from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
21
22
|
import { PBMeshRenderer } from './pb/decentraland/sdk/components/mesh_renderer.gen';
|
|
@@ -58,6 +59,7 @@ export * from './pb/decentraland/sdk/components/camera_mode_area.gen';
|
|
|
58
59
|
export * from './pb/decentraland/sdk/components/engine_info.gen';
|
|
59
60
|
export * from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
60
61
|
export * from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
62
|
+
export * from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
61
63
|
export * from './pb/decentraland/sdk/components/material.gen';
|
|
62
64
|
export * from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
63
65
|
export * from './pb/decentraland/sdk/components/mesh_renderer.gen';
|
|
@@ -102,6 +104,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
102
104
|
/** @public */ export declare const EngineInfo: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
|
|
103
105
|
/** @public */ export declare const GltfContainer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
104
106
|
/** @public */ export declare const GltfContainerLoadingState: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
|
107
|
+
/** @public */ export declare const InputModifier: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
|
|
105
108
|
/** @public */ export declare const Material: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
106
109
|
/** @public */ export declare const MeshCollider: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
107
110
|
/** @public */ export declare const MeshRenderer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
@@ -146,6 +149,7 @@ export declare const componentDefinitionByName: {
|
|
|
146
149
|
"core::EngineInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
|
|
147
150
|
"core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
148
151
|
"core::GltfContainerLoadingState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
|
152
|
+
"core::InputModifier": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
|
|
149
153
|
"core::Material": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
150
154
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
151
155
|
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
@@ -14,6 +14,7 @@ import { CameraModeAreaSchema } from './CameraModeArea.gen';
|
|
|
14
14
|
import { EngineInfoSchema } from './EngineInfo.gen';
|
|
15
15
|
import { GltfContainerSchema } from './GltfContainer.gen';
|
|
16
16
|
import { GltfContainerLoadingStateSchema } from './GltfContainerLoadingState.gen';
|
|
17
|
+
import { InputModifierSchema } from './InputModifier.gen';
|
|
17
18
|
import { MaterialSchema } from './Material.gen';
|
|
18
19
|
import { MeshColliderSchema } from './MeshCollider.gen';
|
|
19
20
|
import { MeshRendererSchema } from './MeshRenderer.gen';
|
|
@@ -56,6 +57,7 @@ export * from './pb/decentraland/sdk/components/camera_mode_area.gen';
|
|
|
56
57
|
export * from './pb/decentraland/sdk/components/engine_info.gen';
|
|
57
58
|
export * from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
58
59
|
export * from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
60
|
+
export * from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
59
61
|
export * from './pb/decentraland/sdk/components/material.gen';
|
|
60
62
|
export * from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
61
63
|
export * from './pb/decentraland/sdk/components/mesh_renderer.gen';
|
|
@@ -118,6 +120,8 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
118
120
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::GltfContainer", GltfContainerSchema);
|
|
119
121
|
/** @public */ export const GltfContainerLoadingState = engine =>
|
|
120
122
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::GltfContainerLoadingState", GltfContainerLoadingStateSchema);
|
|
123
|
+
/** @public */ export const InputModifier = engine =>
|
|
124
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::InputModifier", InputModifierSchema);
|
|
121
125
|
/** @public */ export const Material = engine =>
|
|
122
126
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::Material", MaterialSchema);
|
|
123
127
|
/** @public */ export const MeshCollider = engine =>
|
|
@@ -192,6 +196,7 @@ export const componentDefinitionByName = /* @__PURE__ */ {
|
|
|
192
196
|
"core::EngineInfo": EngineInfo,
|
|
193
197
|
"core::GltfContainer": GltfContainer,
|
|
194
198
|
"core::GltfContainerLoadingState": GltfContainerLoadingState,
|
|
199
|
+
"core::InputModifier": InputModifier,
|
|
195
200
|
"core::Material": Material,
|
|
196
201
|
"core::MeshCollider": MeshCollider,
|
|
197
202
|
"core::MeshRenderer": MeshRenderer,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface PBInputModifier {
|
|
6
|
+
mode?: {
|
|
7
|
+
$case: "standard";
|
|
8
|
+
standard: PBInputModifier_StandardInput;
|
|
9
|
+
} | undefined;
|
|
10
|
+
}
|
|
11
|
+
/** when a boolean = false (default) the message is ignored and doesn't consume bandwidth */
|
|
12
|
+
/**
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export interface PBInputModifier_StandardInput {
|
|
16
|
+
disableAll?: boolean | undefined;
|
|
17
|
+
disableWalk?: boolean | undefined;
|
|
18
|
+
disableJog?: boolean | undefined;
|
|
19
|
+
disableRun?: boolean | undefined;
|
|
20
|
+
disableJump?: boolean | undefined;
|
|
21
|
+
disableEmote?: boolean | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare namespace PBInputModifier {
|
|
27
|
+
function encode(message: PBInputModifier, writer?: _m0.Writer): _m0.Writer;
|
|
28
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBInputModifier;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
export declare namespace PBInputModifier_StandardInput {
|
|
34
|
+
function encode(message: PBInputModifier_StandardInput, writer?: _m0.Writer): _m0.Writer;
|
|
35
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBInputModifier_StandardInput;
|
|
36
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
4
|
+
function createBasePBInputModifier() {
|
|
5
|
+
return { mode: undefined };
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export var PBInputModifier;
|
|
11
|
+
(function (PBInputModifier) {
|
|
12
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
13
|
+
switch (message.mode?.$case) {
|
|
14
|
+
case "standard":
|
|
15
|
+
PBInputModifier_StandardInput.encode(message.mode.standard, writer.uint32(10).fork()).ldelim();
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
return writer;
|
|
19
|
+
}
|
|
20
|
+
PBInputModifier.encode = encode;
|
|
21
|
+
function decode(input, length) {
|
|
22
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
23
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
24
|
+
const message = createBasePBInputModifier();
|
|
25
|
+
while (reader.pos < end) {
|
|
26
|
+
const tag = reader.uint32();
|
|
27
|
+
switch (tag >>> 3) {
|
|
28
|
+
case 1:
|
|
29
|
+
if (tag !== 10) {
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
message.mode = { $case: "standard", standard: PBInputModifier_StandardInput.decode(reader, reader.uint32()) };
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
reader.skipType(tag & 7);
|
|
39
|
+
}
|
|
40
|
+
return message;
|
|
41
|
+
}
|
|
42
|
+
PBInputModifier.decode = decode;
|
|
43
|
+
})(PBInputModifier || (PBInputModifier = {}));
|
|
44
|
+
function createBasePBInputModifier_StandardInput() {
|
|
45
|
+
return {
|
|
46
|
+
disableAll: undefined,
|
|
47
|
+
disableWalk: undefined,
|
|
48
|
+
disableJog: undefined,
|
|
49
|
+
disableRun: undefined,
|
|
50
|
+
disableJump: undefined,
|
|
51
|
+
disableEmote: undefined,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
57
|
+
export var PBInputModifier_StandardInput;
|
|
58
|
+
(function (PBInputModifier_StandardInput) {
|
|
59
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
60
|
+
if (message.disableAll !== undefined) {
|
|
61
|
+
writer.uint32(8).bool(message.disableAll);
|
|
62
|
+
}
|
|
63
|
+
if (message.disableWalk !== undefined) {
|
|
64
|
+
writer.uint32(16).bool(message.disableWalk);
|
|
65
|
+
}
|
|
66
|
+
if (message.disableJog !== undefined) {
|
|
67
|
+
writer.uint32(24).bool(message.disableJog);
|
|
68
|
+
}
|
|
69
|
+
if (message.disableRun !== undefined) {
|
|
70
|
+
writer.uint32(32).bool(message.disableRun);
|
|
71
|
+
}
|
|
72
|
+
if (message.disableJump !== undefined) {
|
|
73
|
+
writer.uint32(40).bool(message.disableJump);
|
|
74
|
+
}
|
|
75
|
+
if (message.disableEmote !== undefined) {
|
|
76
|
+
writer.uint32(48).bool(message.disableEmote);
|
|
77
|
+
}
|
|
78
|
+
return writer;
|
|
79
|
+
}
|
|
80
|
+
PBInputModifier_StandardInput.encode = encode;
|
|
81
|
+
function decode(input, length) {
|
|
82
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
83
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
84
|
+
const message = createBasePBInputModifier_StandardInput();
|
|
85
|
+
while (reader.pos < end) {
|
|
86
|
+
const tag = reader.uint32();
|
|
87
|
+
switch (tag >>> 3) {
|
|
88
|
+
case 1:
|
|
89
|
+
if (tag !== 8) {
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
message.disableAll = reader.bool();
|
|
93
|
+
continue;
|
|
94
|
+
case 2:
|
|
95
|
+
if (tag !== 16) {
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
message.disableWalk = reader.bool();
|
|
99
|
+
continue;
|
|
100
|
+
case 3:
|
|
101
|
+
if (tag !== 24) {
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
message.disableJog = reader.bool();
|
|
105
|
+
continue;
|
|
106
|
+
case 4:
|
|
107
|
+
if (tag !== 32) {
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
message.disableRun = reader.bool();
|
|
111
|
+
continue;
|
|
112
|
+
case 5:
|
|
113
|
+
if (tag !== 40) {
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
message.disableJump = reader.bool();
|
|
117
|
+
continue;
|
|
118
|
+
case 6:
|
|
119
|
+
if (tag !== 48) {
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
message.disableEmote = reader.bool();
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
reader.skipType(tag & 7);
|
|
129
|
+
}
|
|
130
|
+
return message;
|
|
131
|
+
}
|
|
132
|
+
PBInputModifier_StandardInput.decode = decode;
|
|
133
|
+
})(PBInputModifier_StandardInput || (PBInputModifier_StandardInput = {}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
import { TextureUnion } from "../../common/texture.gen";
|
|
3
|
+
import { Vector2 } from "../../common/vectors.gen";
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated
|
|
6
|
+
* Used internally for the game orchestrator PX, not exposed in the SDK
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export interface PBMapPin {
|
|
12
|
+
position: Vector2 | undefined;
|
|
13
|
+
texture?: TextureUnion | undefined;
|
|
14
|
+
iconSize: number;
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare namespace PBMapPin {
|
|
22
|
+
function encode(message: PBMapPin, writer?: _m0.Writer): _m0.Writer;
|
|
23
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBMapPin;
|
|
24
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { TextureUnion } from "../../common/texture.gen";
|
|
4
|
+
import { Vector2 } from "../../common/vectors.gen";
|
|
5
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
6
|
+
function createBasePBMapPin() {
|
|
7
|
+
return { position: undefined, texture: undefined, iconSize: 0, title: "", description: "" };
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export var PBMapPin;
|
|
13
|
+
(function (PBMapPin) {
|
|
14
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
15
|
+
if (message.position !== undefined) {
|
|
16
|
+
Vector2.encode(message.position, writer.uint32(10).fork()).ldelim();
|
|
17
|
+
}
|
|
18
|
+
if (message.texture !== undefined) {
|
|
19
|
+
TextureUnion.encode(message.texture, writer.uint32(18).fork()).ldelim();
|
|
20
|
+
}
|
|
21
|
+
if (message.iconSize !== 0) {
|
|
22
|
+
writer.uint32(29).float(message.iconSize);
|
|
23
|
+
}
|
|
24
|
+
if (message.title !== "") {
|
|
25
|
+
writer.uint32(34).string(message.title);
|
|
26
|
+
}
|
|
27
|
+
if (message.description !== "") {
|
|
28
|
+
writer.uint32(42).string(message.description);
|
|
29
|
+
}
|
|
30
|
+
return writer;
|
|
31
|
+
}
|
|
32
|
+
PBMapPin.encode = encode;
|
|
33
|
+
function decode(input, length) {
|
|
34
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
35
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
36
|
+
const message = createBasePBMapPin();
|
|
37
|
+
while (reader.pos < end) {
|
|
38
|
+
const tag = reader.uint32();
|
|
39
|
+
switch (tag >>> 3) {
|
|
40
|
+
case 1:
|
|
41
|
+
if (tag !== 10) {
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
message.position = Vector2.decode(reader, reader.uint32());
|
|
45
|
+
continue;
|
|
46
|
+
case 2:
|
|
47
|
+
if (tag !== 18) {
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
message.texture = TextureUnion.decode(reader, reader.uint32());
|
|
51
|
+
continue;
|
|
52
|
+
case 3:
|
|
53
|
+
if (tag !== 29) {
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
message.iconSize = reader.float();
|
|
57
|
+
continue;
|
|
58
|
+
case 4:
|
|
59
|
+
if (tag !== 34) {
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
message.title = reader.string();
|
|
63
|
+
continue;
|
|
64
|
+
case 5:
|
|
65
|
+
if (tag !== 42) {
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
message.description = reader.string();
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
reader.skipType(tag & 7);
|
|
75
|
+
}
|
|
76
|
+
return message;
|
|
77
|
+
}
|
|
78
|
+
PBMapPin.decode = decode;
|
|
79
|
+
})(PBMapPin || (PBMapPin = {}));
|
|
@@ -141,10 +141,17 @@ export function createValueSetComponentDefinitionFromSchema(componentName, compo
|
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
143
|
onChange(entity, cb) {
|
|
144
|
-
onChangeCallbacks.
|
|
144
|
+
const cbs = onChangeCallbacks.get(entity) ?? [];
|
|
145
|
+
cbs.push(cb);
|
|
146
|
+
onChangeCallbacks.set(entity, cbs);
|
|
145
147
|
},
|
|
146
|
-
__onChangeCallbacks(entity) {
|
|
147
|
-
|
|
148
|
+
__onChangeCallbacks(entity, value) {
|
|
149
|
+
const cbs = onChangeCallbacks.get(entity);
|
|
150
|
+
if (!cbs)
|
|
151
|
+
return;
|
|
152
|
+
for (const cb of cbs) {
|
|
153
|
+
cb(value);
|
|
154
|
+
}
|
|
148
155
|
}
|
|
149
156
|
};
|
|
150
157
|
return ret;
|
package/dist/engine/index.js
CHANGED
|
@@ -203,17 +203,11 @@ export function Engine(options) {
|
|
|
203
203
|
const onChangeFunction = (entity, operation, component, componentValue) => {
|
|
204
204
|
if (operation === CrdtMessageType.DELETE_ENTITY) {
|
|
205
205
|
for (const component of partialEngine.componentsIter()) {
|
|
206
|
-
|
|
207
|
-
if (onChange) {
|
|
208
|
-
onChange(undefined);
|
|
209
|
-
}
|
|
206
|
+
component?.__onChangeCallbacks(entity, undefined);
|
|
210
207
|
}
|
|
211
208
|
}
|
|
212
209
|
else {
|
|
213
|
-
|
|
214
|
-
if (onChange) {
|
|
215
|
-
onChange(componentValue);
|
|
216
|
-
}
|
|
210
|
+
component?.__onChangeCallbacks(entity, componentValue);
|
|
217
211
|
}
|
|
218
212
|
return options?.onChangeFunction(entity, operation, component, componentValue);
|
|
219
213
|
};
|
|
@@ -264,10 +264,17 @@ export function createComponentDefinitionFromSchema(componentName, componentId,
|
|
|
264
264
|
updateFromCrdt: createUpdateLwwFromCrdt(componentId, timestamps, schema, data),
|
|
265
265
|
dumpCrdtStateToBuffer: createDumpLwwFunctionFromCrdt(componentId, timestamps, schema, data),
|
|
266
266
|
onChange(entity, cb) {
|
|
267
|
-
onChangeCallbacks.
|
|
267
|
+
const cbs = onChangeCallbacks.get(entity) ?? [];
|
|
268
|
+
cbs.push(cb);
|
|
269
|
+
onChangeCallbacks.set(entity, cbs);
|
|
268
270
|
},
|
|
269
|
-
__onChangeCallbacks(entity) {
|
|
270
|
-
|
|
271
|
+
__onChangeCallbacks(entity, value) {
|
|
272
|
+
const cbs = onChangeCallbacks.get(entity);
|
|
273
|
+
if (!cbs)
|
|
274
|
+
return;
|
|
275
|
+
for (const cb of cbs) {
|
|
276
|
+
cb(value);
|
|
277
|
+
}
|
|
271
278
|
}
|
|
272
279
|
};
|
|
273
280
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InputModifierSchema = void 0;
|
|
4
|
+
const input_modifier_gen_1 = require("./pb/decentraland/sdk/components/input_modifier.gen");
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
exports.InputModifierSchema = {
|
|
9
|
+
COMPONENT_ID: 1078,
|
|
10
|
+
serialize(value, builder) {
|
|
11
|
+
const writer = input_modifier_gen_1.PBInputModifier.encode(value);
|
|
12
|
+
const buffer = new Uint8Array(writer.finish(), 0, writer.len);
|
|
13
|
+
builder.writeBuffer(buffer, false);
|
|
14
|
+
},
|
|
15
|
+
deserialize(reader) {
|
|
16
|
+
return input_modifier_gen_1.PBInputModifier.decode(reader.buffer(), reader.remainingBytes());
|
|
17
|
+
},
|
|
18
|
+
create() {
|
|
19
|
+
// TODO: this is a hack.
|
|
20
|
+
return input_modifier_gen_1.PBInputModifier.decode(new Uint8Array());
|
|
21
|
+
},
|
|
22
|
+
jsonSchema: {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: {},
|
|
25
|
+
serializationType: "protocol-buffer",
|
|
26
|
+
protocolBuffer: "PBInputModifier"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MapPinSchema = void 0;
|
|
4
|
+
const map_pin_gen_1 = require("./pb/decentraland/sdk/components/map_pin.gen");
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
exports.MapPinSchema = {
|
|
9
|
+
COMPONENT_ID: 1097,
|
|
10
|
+
serialize(value, builder) {
|
|
11
|
+
const writer = map_pin_gen_1.PBMapPin.encode(value);
|
|
12
|
+
const buffer = new Uint8Array(writer.finish(), 0, writer.len);
|
|
13
|
+
builder.writeBuffer(buffer, false);
|
|
14
|
+
},
|
|
15
|
+
deserialize(reader) {
|
|
16
|
+
return map_pin_gen_1.PBMapPin.decode(reader.buffer(), reader.remainingBytes());
|
|
17
|
+
},
|
|
18
|
+
create() {
|
|
19
|
+
// TODO: this is a hack.
|
|
20
|
+
return map_pin_gen_1.PBMapPin.decode(new Uint8Array());
|
|
21
|
+
},
|
|
22
|
+
jsonSchema: {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: {},
|
|
25
|
+
serializationType: "protocol-buffer",
|
|
26
|
+
protocolBuffer: "PBMapPin"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -22,6 +22,8 @@ exports.coreComponentMappings = {
|
|
|
22
22
|
"core::EngineInfo": 1048,
|
|
23
23
|
"core::GltfContainer": 1041,
|
|
24
24
|
"core::GltfContainerLoadingState": 1049,
|
|
25
|
+
"core::InputModifier": 1078,
|
|
26
|
+
"core::MapPin": 1097,
|
|
25
27
|
"core::Material": 1017,
|
|
26
28
|
"core::MeshCollider": 1019,
|
|
27
29
|
"core::MeshRenderer": 1018,
|
|
@@ -15,6 +15,7 @@ import { PBCameraModeArea } from './pb/decentraland/sdk/components/camera_mode_a
|
|
|
15
15
|
import { PBEngineInfo } from './pb/decentraland/sdk/components/engine_info.gen';
|
|
16
16
|
import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
17
17
|
import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
18
|
+
import { PBInputModifier } from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
18
19
|
import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
|
|
19
20
|
import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
20
21
|
import { PBPointerEvents } from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
@@ -52,6 +53,7 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
52
53
|
/** @public */ export declare const EngineInfo: LastWriteWinElementSetComponentDefinition<PBEngineInfo>;
|
|
53
54
|
/** @public */ export declare const GltfContainer: LastWriteWinElementSetComponentDefinition<PBGltfContainer>;
|
|
54
55
|
/** @public */ export declare const GltfContainerLoadingState: LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>;
|
|
56
|
+
/** @public */ export declare const InputModifier: LastWriteWinElementSetComponentDefinition<PBInputModifier>;
|
|
55
57
|
/** @public */ export declare const NftShape: LastWriteWinElementSetComponentDefinition<PBNftShape>;
|
|
56
58
|
/** @public */ export declare const PlayerIdentityData: LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>;
|
|
57
59
|
/** @public */ export declare const PointerEvents: LastWriteWinElementSetComponentDefinition<PBPointerEvents>;
|
|
@@ -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.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.TextShape = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.NftShape = 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.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.TextShape = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.NftShape = exports.InputModifier = 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;
|
|
30
30
|
const initialization_1 = require("../../runtime/initialization");
|
|
31
31
|
const components = __importStar(require("./index.gen"));
|
|
32
32
|
__exportStar(require("./index.gen"), exports);
|
|
@@ -45,6 +45,7 @@ __exportStar(require("./index.gen"), exports);
|
|
|
45
45
|
/** @public */ exports.EngineInfo = components.EngineInfo(initialization_1.engine);
|
|
46
46
|
/** @public */ exports.GltfContainer = components.GltfContainer(initialization_1.engine);
|
|
47
47
|
/** @public */ exports.GltfContainerLoadingState = components.GltfContainerLoadingState(initialization_1.engine);
|
|
48
|
+
/** @public */ exports.InputModifier = components.InputModifier(initialization_1.engine);
|
|
48
49
|
/** @public */ exports.NftShape = components.NftShape(initialization_1.engine);
|
|
49
50
|
/** @public */ exports.PlayerIdentityData = components.PlayerIdentityData(initialization_1.engine);
|
|
50
51
|
/** @public */ exports.PointerEvents = components.PointerEvents(initialization_1.engine);
|
|
@@ -16,6 +16,7 @@ import { PBCameraModeArea } from './pb/decentraland/sdk/components/camera_mode_a
|
|
|
16
16
|
import { PBEngineInfo } from './pb/decentraland/sdk/components/engine_info.gen';
|
|
17
17
|
import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
18
18
|
import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
19
|
+
import { PBInputModifier } from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
19
20
|
import { PBMaterial } from './pb/decentraland/sdk/components/material.gen';
|
|
20
21
|
import { PBMeshCollider } from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
21
22
|
import { PBMeshRenderer } from './pb/decentraland/sdk/components/mesh_renderer.gen';
|
|
@@ -58,6 +59,7 @@ export * from './pb/decentraland/sdk/components/camera_mode_area.gen';
|
|
|
58
59
|
export * from './pb/decentraland/sdk/components/engine_info.gen';
|
|
59
60
|
export * from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
60
61
|
export * from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
62
|
+
export * from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
61
63
|
export * from './pb/decentraland/sdk/components/material.gen';
|
|
62
64
|
export * from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
63
65
|
export * from './pb/decentraland/sdk/components/mesh_renderer.gen';
|
|
@@ -102,6 +104,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
102
104
|
/** @public */ export declare const EngineInfo: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
|
|
103
105
|
/** @public */ export declare const GltfContainer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
104
106
|
/** @public */ export declare const GltfContainerLoadingState: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
|
107
|
+
/** @public */ export declare const InputModifier: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
|
|
105
108
|
/** @public */ export declare const Material: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
106
109
|
/** @public */ export declare const MeshCollider: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
107
110
|
/** @public */ export declare const MeshRenderer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
@@ -146,6 +149,7 @@ export declare const componentDefinitionByName: {
|
|
|
146
149
|
"core::EngineInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
|
|
147
150
|
"core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
148
151
|
"core::GltfContainerLoadingState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
|
152
|
+
"core::InputModifier": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
|
|
149
153
|
"core::Material": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
150
154
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
151
155
|
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
@@ -14,7 +14,7 @@ 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.componentDefinitionByName = exports.VisibilityComponent = 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.TextShape = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.NftShape = exports.MeshRenderer = exports.MeshCollider = exports.Material = 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;
|
|
17
|
+
exports.componentDefinitionByName = exports.VisibilityComponent = 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.TextShape = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.NftShape = exports.MeshRenderer = exports.MeshCollider = exports.Material = exports.InputModifier = 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
18
|
const Animator_gen_1 = require("./Animator.gen");
|
|
19
19
|
const AudioEvent_gen_1 = require("./AudioEvent.gen");
|
|
20
20
|
const AudioSource_gen_1 = require("./AudioSource.gen");
|
|
@@ -31,6 +31,7 @@ const CameraModeArea_gen_1 = require("./CameraModeArea.gen");
|
|
|
31
31
|
const EngineInfo_gen_1 = require("./EngineInfo.gen");
|
|
32
32
|
const GltfContainer_gen_1 = require("./GltfContainer.gen");
|
|
33
33
|
const GltfContainerLoadingState_gen_1 = require("./GltfContainerLoadingState.gen");
|
|
34
|
+
const InputModifier_gen_1 = require("./InputModifier.gen");
|
|
34
35
|
const Material_gen_1 = require("./Material.gen");
|
|
35
36
|
const MeshCollider_gen_1 = require("./MeshCollider.gen");
|
|
36
37
|
const MeshRenderer_gen_1 = require("./MeshRenderer.gen");
|
|
@@ -73,6 +74,7 @@ __exportStar(require("./pb/decentraland/sdk/components/camera_mode_area.gen"), e
|
|
|
73
74
|
__exportStar(require("./pb/decentraland/sdk/components/engine_info.gen"), exports);
|
|
74
75
|
__exportStar(require("./pb/decentraland/sdk/components/gltf_container.gen"), exports);
|
|
75
76
|
__exportStar(require("./pb/decentraland/sdk/components/gltf_container_loading_state.gen"), exports);
|
|
77
|
+
__exportStar(require("./pb/decentraland/sdk/components/input_modifier.gen"), exports);
|
|
76
78
|
__exportStar(require("./pb/decentraland/sdk/components/material.gen"), exports);
|
|
77
79
|
__exportStar(require("./pb/decentraland/sdk/components/mesh_collider.gen"), exports);
|
|
78
80
|
__exportStar(require("./pb/decentraland/sdk/components/mesh_renderer.gen"), exports);
|
|
@@ -151,6 +153,9 @@ exports.GltfContainer = GltfContainer;
|
|
|
151
153
|
/** @public */ const GltfContainerLoadingState = engine =>
|
|
152
154
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::GltfContainerLoadingState", GltfContainerLoadingState_gen_1.GltfContainerLoadingStateSchema);
|
|
153
155
|
exports.GltfContainerLoadingState = GltfContainerLoadingState;
|
|
156
|
+
/** @public */ const InputModifier = engine =>
|
|
157
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::InputModifier", InputModifier_gen_1.InputModifierSchema);
|
|
158
|
+
exports.InputModifier = InputModifier;
|
|
154
159
|
/** @public */ const Material = engine =>
|
|
155
160
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::Material", Material_gen_1.MaterialSchema);
|
|
156
161
|
exports.Material = Material;
|
|
@@ -251,6 +256,7 @@ exports.componentDefinitionByName = {
|
|
|
251
256
|
"core::EngineInfo": exports.EngineInfo,
|
|
252
257
|
"core::GltfContainer": exports.GltfContainer,
|
|
253
258
|
"core::GltfContainerLoadingState": exports.GltfContainerLoadingState,
|
|
259
|
+
"core::InputModifier": exports.InputModifier,
|
|
254
260
|
"core::Material": exports.Material,
|
|
255
261
|
"core::MeshCollider": exports.MeshCollider,
|
|
256
262
|
"core::MeshRenderer": exports.MeshRenderer,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface PBInputModifier {
|
|
6
|
+
mode?: {
|
|
7
|
+
$case: "standard";
|
|
8
|
+
standard: PBInputModifier_StandardInput;
|
|
9
|
+
} | undefined;
|
|
10
|
+
}
|
|
11
|
+
/** when a boolean = false (default) the message is ignored and doesn't consume bandwidth */
|
|
12
|
+
/**
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export interface PBInputModifier_StandardInput {
|
|
16
|
+
disableAll?: boolean | undefined;
|
|
17
|
+
disableWalk?: boolean | undefined;
|
|
18
|
+
disableJog?: boolean | undefined;
|
|
19
|
+
disableRun?: boolean | undefined;
|
|
20
|
+
disableJump?: boolean | undefined;
|
|
21
|
+
disableEmote?: boolean | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare namespace PBInputModifier {
|
|
27
|
+
function encode(message: PBInputModifier, writer?: _m0.Writer): _m0.Writer;
|
|
28
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBInputModifier;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
export declare namespace PBInputModifier_StandardInput {
|
|
34
|
+
function encode(message: PBInputModifier_StandardInput, writer?: _m0.Writer): _m0.Writer;
|
|
35
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBInputModifier_StandardInput;
|
|
36
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
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.PBInputModifier_StandardInput = exports.PBInputModifier = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
10
|
+
function createBasePBInputModifier() {
|
|
11
|
+
return { mode: undefined };
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
var PBInputModifier;
|
|
17
|
+
(function (PBInputModifier) {
|
|
18
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
19
|
+
switch (message.mode?.$case) {
|
|
20
|
+
case "standard":
|
|
21
|
+
PBInputModifier_StandardInput.encode(message.mode.standard, writer.uint32(10).fork()).ldelim();
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
return writer;
|
|
25
|
+
}
|
|
26
|
+
PBInputModifier.encode = encode;
|
|
27
|
+
function decode(input, length) {
|
|
28
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
29
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
30
|
+
const message = createBasePBInputModifier();
|
|
31
|
+
while (reader.pos < end) {
|
|
32
|
+
const tag = reader.uint32();
|
|
33
|
+
switch (tag >>> 3) {
|
|
34
|
+
case 1:
|
|
35
|
+
if (tag !== 10) {
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
message.mode = { $case: "standard", standard: PBInputModifier_StandardInput.decode(reader, reader.uint32()) };
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
reader.skipType(tag & 7);
|
|
45
|
+
}
|
|
46
|
+
return message;
|
|
47
|
+
}
|
|
48
|
+
PBInputModifier.decode = decode;
|
|
49
|
+
})(PBInputModifier = exports.PBInputModifier || (exports.PBInputModifier = {}));
|
|
50
|
+
function createBasePBInputModifier_StandardInput() {
|
|
51
|
+
return {
|
|
52
|
+
disableAll: undefined,
|
|
53
|
+
disableWalk: undefined,
|
|
54
|
+
disableJog: undefined,
|
|
55
|
+
disableRun: undefined,
|
|
56
|
+
disableJump: undefined,
|
|
57
|
+
disableEmote: undefined,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
var PBInputModifier_StandardInput;
|
|
64
|
+
(function (PBInputModifier_StandardInput) {
|
|
65
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
66
|
+
if (message.disableAll !== undefined) {
|
|
67
|
+
writer.uint32(8).bool(message.disableAll);
|
|
68
|
+
}
|
|
69
|
+
if (message.disableWalk !== undefined) {
|
|
70
|
+
writer.uint32(16).bool(message.disableWalk);
|
|
71
|
+
}
|
|
72
|
+
if (message.disableJog !== undefined) {
|
|
73
|
+
writer.uint32(24).bool(message.disableJog);
|
|
74
|
+
}
|
|
75
|
+
if (message.disableRun !== undefined) {
|
|
76
|
+
writer.uint32(32).bool(message.disableRun);
|
|
77
|
+
}
|
|
78
|
+
if (message.disableJump !== undefined) {
|
|
79
|
+
writer.uint32(40).bool(message.disableJump);
|
|
80
|
+
}
|
|
81
|
+
if (message.disableEmote !== undefined) {
|
|
82
|
+
writer.uint32(48).bool(message.disableEmote);
|
|
83
|
+
}
|
|
84
|
+
return writer;
|
|
85
|
+
}
|
|
86
|
+
PBInputModifier_StandardInput.encode = encode;
|
|
87
|
+
function decode(input, length) {
|
|
88
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
89
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
90
|
+
const message = createBasePBInputModifier_StandardInput();
|
|
91
|
+
while (reader.pos < end) {
|
|
92
|
+
const tag = reader.uint32();
|
|
93
|
+
switch (tag >>> 3) {
|
|
94
|
+
case 1:
|
|
95
|
+
if (tag !== 8) {
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
message.disableAll = reader.bool();
|
|
99
|
+
continue;
|
|
100
|
+
case 2:
|
|
101
|
+
if (tag !== 16) {
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
message.disableWalk = reader.bool();
|
|
105
|
+
continue;
|
|
106
|
+
case 3:
|
|
107
|
+
if (tag !== 24) {
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
message.disableJog = reader.bool();
|
|
111
|
+
continue;
|
|
112
|
+
case 4:
|
|
113
|
+
if (tag !== 32) {
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
message.disableRun = reader.bool();
|
|
117
|
+
continue;
|
|
118
|
+
case 5:
|
|
119
|
+
if (tag !== 40) {
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
message.disableJump = reader.bool();
|
|
123
|
+
continue;
|
|
124
|
+
case 6:
|
|
125
|
+
if (tag !== 48) {
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
message.disableEmote = reader.bool();
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
reader.skipType(tag & 7);
|
|
135
|
+
}
|
|
136
|
+
return message;
|
|
137
|
+
}
|
|
138
|
+
PBInputModifier_StandardInput.decode = decode;
|
|
139
|
+
})(PBInputModifier_StandardInput = exports.PBInputModifier_StandardInput || (exports.PBInputModifier_StandardInput = {}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
import { TextureUnion } from "../../common/texture.gen";
|
|
3
|
+
import { Vector2 } from "../../common/vectors.gen";
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated
|
|
6
|
+
* Used internally for the game orchestrator PX, not exposed in the SDK
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export interface PBMapPin {
|
|
12
|
+
position: Vector2 | undefined;
|
|
13
|
+
texture?: TextureUnion | undefined;
|
|
14
|
+
iconSize: number;
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare namespace PBMapPin {
|
|
22
|
+
function encode(message: PBMapPin, writer?: _m0.Writer): _m0.Writer;
|
|
23
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBMapPin;
|
|
24
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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.PBMapPin = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
|
+
const texture_gen_1 = require("../../common/texture.gen");
|
|
10
|
+
const vectors_gen_1 = require("../../common/vectors.gen");
|
|
11
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
12
|
+
function createBasePBMapPin() {
|
|
13
|
+
return { position: undefined, texture: undefined, iconSize: 0, title: "", description: "" };
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
var PBMapPin;
|
|
19
|
+
(function (PBMapPin) {
|
|
20
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
21
|
+
if (message.position !== undefined) {
|
|
22
|
+
vectors_gen_1.Vector2.encode(message.position, writer.uint32(10).fork()).ldelim();
|
|
23
|
+
}
|
|
24
|
+
if (message.texture !== undefined) {
|
|
25
|
+
texture_gen_1.TextureUnion.encode(message.texture, writer.uint32(18).fork()).ldelim();
|
|
26
|
+
}
|
|
27
|
+
if (message.iconSize !== 0) {
|
|
28
|
+
writer.uint32(29).float(message.iconSize);
|
|
29
|
+
}
|
|
30
|
+
if (message.title !== "") {
|
|
31
|
+
writer.uint32(34).string(message.title);
|
|
32
|
+
}
|
|
33
|
+
if (message.description !== "") {
|
|
34
|
+
writer.uint32(42).string(message.description);
|
|
35
|
+
}
|
|
36
|
+
return writer;
|
|
37
|
+
}
|
|
38
|
+
PBMapPin.encode = encode;
|
|
39
|
+
function decode(input, length) {
|
|
40
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
41
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
42
|
+
const message = createBasePBMapPin();
|
|
43
|
+
while (reader.pos < end) {
|
|
44
|
+
const tag = reader.uint32();
|
|
45
|
+
switch (tag >>> 3) {
|
|
46
|
+
case 1:
|
|
47
|
+
if (tag !== 10) {
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
message.position = vectors_gen_1.Vector2.decode(reader, reader.uint32());
|
|
51
|
+
continue;
|
|
52
|
+
case 2:
|
|
53
|
+
if (tag !== 18) {
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
message.texture = texture_gen_1.TextureUnion.decode(reader, reader.uint32());
|
|
57
|
+
continue;
|
|
58
|
+
case 3:
|
|
59
|
+
if (tag !== 29) {
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
message.iconSize = reader.float();
|
|
63
|
+
continue;
|
|
64
|
+
case 4:
|
|
65
|
+
if (tag !== 34) {
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
message.title = reader.string();
|
|
69
|
+
continue;
|
|
70
|
+
case 5:
|
|
71
|
+
if (tag !== 42) {
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
message.description = reader.string();
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
reader.skipType(tag & 7);
|
|
81
|
+
}
|
|
82
|
+
return message;
|
|
83
|
+
}
|
|
84
|
+
PBMapPin.decode = decode;
|
|
85
|
+
})(PBMapPin = exports.PBMapPin || (exports.PBMapPin = {}));
|
|
@@ -144,10 +144,17 @@ function createValueSetComponentDefinitionFromSchema(componentName, componentId,
|
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
146
|
onChange(entity, cb) {
|
|
147
|
-
onChangeCallbacks.
|
|
147
|
+
const cbs = onChangeCallbacks.get(entity) ?? [];
|
|
148
|
+
cbs.push(cb);
|
|
149
|
+
onChangeCallbacks.set(entity, cbs);
|
|
148
150
|
},
|
|
149
|
-
__onChangeCallbacks(entity) {
|
|
150
|
-
|
|
151
|
+
__onChangeCallbacks(entity, value) {
|
|
152
|
+
const cbs = onChangeCallbacks.get(entity);
|
|
153
|
+
if (!cbs)
|
|
154
|
+
return;
|
|
155
|
+
for (const cb of cbs) {
|
|
156
|
+
cb(value);
|
|
157
|
+
}
|
|
151
158
|
}
|
|
152
159
|
};
|
|
153
160
|
return ret;
|
package/dist-cjs/engine/index.js
CHANGED
|
@@ -232,17 +232,11 @@ function Engine(options) {
|
|
|
232
232
|
const onChangeFunction = (entity, operation, component, componentValue) => {
|
|
233
233
|
if (operation === crdt_2.CrdtMessageType.DELETE_ENTITY) {
|
|
234
234
|
for (const component of partialEngine.componentsIter()) {
|
|
235
|
-
|
|
236
|
-
if (onChange) {
|
|
237
|
-
onChange(undefined);
|
|
238
|
-
}
|
|
235
|
+
component?.__onChangeCallbacks(entity, undefined);
|
|
239
236
|
}
|
|
240
237
|
}
|
|
241
238
|
else {
|
|
242
|
-
|
|
243
|
-
if (onChange) {
|
|
244
|
-
onChange(componentValue);
|
|
245
|
-
}
|
|
239
|
+
component?.__onChangeCallbacks(entity, componentValue);
|
|
246
240
|
}
|
|
247
241
|
return options?.onChangeFunction(entity, operation, component, componentValue);
|
|
248
242
|
};
|
|
@@ -271,10 +271,17 @@ function createComponentDefinitionFromSchema(componentName, componentId, schema)
|
|
|
271
271
|
updateFromCrdt: createUpdateLwwFromCrdt(componentId, timestamps, schema, data),
|
|
272
272
|
dumpCrdtStateToBuffer: createDumpLwwFunctionFromCrdt(componentId, timestamps, schema, data),
|
|
273
273
|
onChange(entity, cb) {
|
|
274
|
-
onChangeCallbacks.
|
|
274
|
+
const cbs = onChangeCallbacks.get(entity) ?? [];
|
|
275
|
+
cbs.push(cb);
|
|
276
|
+
onChangeCallbacks.set(entity, cbs);
|
|
275
277
|
},
|
|
276
|
-
__onChangeCallbacks(entity) {
|
|
277
|
-
|
|
278
|
+
__onChangeCallbacks(entity, value) {
|
|
279
|
+
const cbs = onChangeCallbacks.get(entity);
|
|
280
|
+
if (!cbs)
|
|
281
|
+
return;
|
|
282
|
+
for (const cb of cbs) {
|
|
283
|
+
cb(value);
|
|
284
|
+
}
|
|
278
285
|
}
|
|
279
286
|
};
|
|
280
287
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/ecs",
|
|
3
3
|
"description": "Decentraland ECS",
|
|
4
|
-
"version": "7.5.7
|
|
4
|
+
"version": "7.5.7",
|
|
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": "
|
|
36
|
+
"commit": "bc3c487938573c47cc154a97be8b1742628c0d69"
|
|
37
37
|
}
|