@dcl/ecs 7.8.9 → 7.8.10-15468321387.commit-ea03486
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/extended/LightSource.d.ts +25 -0
- package/dist/components/extended/LightSource.js +22 -0
- package/dist/components/generated/LightSource.gen.d.ts +1 -0
- package/dist/components/generated/LightSource.gen.js +25 -0
- package/dist/components/generated/PrimaryPointerInfo.gen.d.ts +1 -0
- package/dist/components/generated/PrimaryPointerInfo.gen.js +25 -0
- package/dist/components/generated/component-names.gen.js +2 -0
- package/dist/components/generated/global.gen.d.ts +4 -0
- package/dist/components/generated/global.gen.js +2 -0
- package/dist/components/generated/index.gen.d.ts +8 -0
- package/dist/components/generated/index.gen.js +10 -0
- package/dist/components/generated/pb/decentraland/sdk/components/light_source.gen.d.ts +75 -0
- package/dist/components/generated/pb/decentraland/sdk/components/light_source.gen.js +205 -0
- package/dist/components/generated/pb/decentraland/sdk/components/primary_pointer_info.gen.d.ts +55 -0
- package/dist/components/generated/pb/decentraland/sdk/components/primary_pointer_info.gen.js +83 -0
- package/dist/components/generated/pb/decentraland/sdk/components/realm_info.gen.d.ts +7 -0
- package/dist/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts +3 -0
- package/dist/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.js +10 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +3 -0
- package/dist/components/types.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist-cjs/components/extended/LightSource.d.ts +25 -0
- package/dist-cjs/components/extended/LightSource.js +26 -0
- package/dist-cjs/components/generated/LightSource.gen.d.ts +1 -0
- package/dist-cjs/components/generated/LightSource.gen.js +28 -0
- package/dist-cjs/components/generated/PrimaryPointerInfo.gen.d.ts +1 -0
- package/dist-cjs/components/generated/PrimaryPointerInfo.gen.js +28 -0
- package/dist-cjs/components/generated/component-names.gen.js +2 -0
- package/dist-cjs/components/generated/global.gen.d.ts +4 -0
- package/dist-cjs/components/generated/global.gen.js +3 -1
- package/dist-cjs/components/generated/index.gen.d.ts +8 -0
- package/dist-cjs/components/generated/index.gen.js +13 -1
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/light_source.gen.d.ts +75 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/light_source.gen.js +211 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/primary_pointer_info.gen.d.ts +55 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/primary_pointer_info.gen.js +89 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/realm_info.gen.d.ts +7 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts +3 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.js +10 -1
- package/dist-cjs/components/index.d.ts +2 -0
- package/dist-cjs/components/index.js +5 -1
- package/dist-cjs/components/types.d.ts +1 -0
- package/dist-cjs/index.d.ts +2 -1
- package/dist-cjs/index.js +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IEngine, LastWriteWinElementSetComponentDefinition } from '../../engine';
|
|
2
|
+
import { PBLightSource_Point, PBLightSource_Spot, PBLightSource } from '../generated/index.gen';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface LightSourceHelper {
|
|
7
|
+
/**
|
|
8
|
+
* @returns a Light Source type
|
|
9
|
+
*/
|
|
10
|
+
Point: (point: PBLightSource_Point) => PBLightSource['type'];
|
|
11
|
+
/**
|
|
12
|
+
* @returns a Light Source type
|
|
13
|
+
*/
|
|
14
|
+
Spot: (spot: PBLightSource_Spot) => PBLightSource['type'];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export interface LightSourceComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBLightSource> {
|
|
20
|
+
/**
|
|
21
|
+
* LightSource helper with constructor
|
|
22
|
+
*/
|
|
23
|
+
Type: LightSourceHelper;
|
|
24
|
+
}
|
|
25
|
+
export declare function defineLightSourceComponent(engine: Pick<IEngine, 'defineComponentFromSchema'>): LightSourceComponentDefinitionExtended;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LightSource } from '../generated/index.gen';
|
|
2
|
+
const LightSourceHelper = {
|
|
3
|
+
Point(point) {
|
|
4
|
+
return {
|
|
5
|
+
$case: 'point',
|
|
6
|
+
point
|
|
7
|
+
};
|
|
8
|
+
},
|
|
9
|
+
Spot(spot) {
|
|
10
|
+
return {
|
|
11
|
+
$case: 'spot',
|
|
12
|
+
spot
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export function defineLightSourceComponent(engine) {
|
|
17
|
+
const theComponent = LightSource(engine);
|
|
18
|
+
return {
|
|
19
|
+
...theComponent,
|
|
20
|
+
Type: LightSourceHelper
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PBLightSource } from './pb/decentraland/sdk/components/light_source.gen';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export const LightSourceSchema = {
|
|
6
|
+
COMPONENT_ID: 1079,
|
|
7
|
+
serialize(value, builder) {
|
|
8
|
+
const writer = PBLightSource.encode(value);
|
|
9
|
+
const buffer = new Uint8Array(writer.finish(), 0, writer.len);
|
|
10
|
+
builder.writeBuffer(buffer, false);
|
|
11
|
+
},
|
|
12
|
+
deserialize(reader) {
|
|
13
|
+
return PBLightSource.decode(reader.buffer(), reader.remainingBytes());
|
|
14
|
+
},
|
|
15
|
+
create() {
|
|
16
|
+
// TODO: this is a hack.
|
|
17
|
+
return PBLightSource.decode(new Uint8Array());
|
|
18
|
+
},
|
|
19
|
+
jsonSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {},
|
|
22
|
+
serializationType: "protocol-buffer",
|
|
23
|
+
protocolBuffer: "PBLightSource"
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PBPrimaryPointerInfo } from './pb/decentraland/sdk/components/primary_pointer_info.gen';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export const PrimaryPointerInfoSchema = {
|
|
6
|
+
COMPONENT_ID: 1209,
|
|
7
|
+
serialize(value, builder) {
|
|
8
|
+
const writer = PBPrimaryPointerInfo.encode(value);
|
|
9
|
+
const buffer = new Uint8Array(writer.finish(), 0, writer.len);
|
|
10
|
+
builder.writeBuffer(buffer, false);
|
|
11
|
+
},
|
|
12
|
+
deserialize(reader) {
|
|
13
|
+
return PBPrimaryPointerInfo.decode(reader.buffer(), reader.remainingBytes());
|
|
14
|
+
},
|
|
15
|
+
create() {
|
|
16
|
+
// TODO: this is a hack.
|
|
17
|
+
return PBPrimaryPointerInfo.decode(new Uint8Array());
|
|
18
|
+
},
|
|
19
|
+
jsonSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {},
|
|
22
|
+
serializationType: "protocol-buffer",
|
|
23
|
+
protocolBuffer: "PBPrimaryPointerInfo"
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -20,6 +20,7 @@ export const coreComponentMappings = {
|
|
|
20
20
|
"core::GltfContainer": 1041,
|
|
21
21
|
"core::GltfContainerLoadingState": 1049,
|
|
22
22
|
"core::InputModifier": 1078,
|
|
23
|
+
"core::LightSource": 1079,
|
|
23
24
|
"core::MainCamera": 1075,
|
|
24
25
|
"core::MapPin": 1097,
|
|
25
26
|
"core::Material": 1017,
|
|
@@ -30,6 +31,7 @@ export const coreComponentMappings = {
|
|
|
30
31
|
"core::PointerEvents": 1062,
|
|
31
32
|
"core::PointerEventsResult": 1063,
|
|
32
33
|
"core::PointerLock": 1074,
|
|
34
|
+
"core::PrimaryPointerInfo": 1209,
|
|
33
35
|
"core::Raycast": 1067,
|
|
34
36
|
"core::RaycastResult": 1068,
|
|
35
37
|
"core::RealmInfo": 1106,
|
|
@@ -16,12 +16,14 @@ 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
18
|
import { PBInputModifier } from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
19
|
+
import { PBLightSource } from './pb/decentraland/sdk/components/light_source.gen';
|
|
19
20
|
import { PBMainCamera } from './pb/decentraland/sdk/components/main_camera.gen';
|
|
20
21
|
import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
|
|
21
22
|
import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
22
23
|
import { PBPointerEvents } from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
23
24
|
import { PBPointerEventsResult } from './pb/decentraland/sdk/components/pointer_events_result.gen';
|
|
24
25
|
import { PBPointerLock } from './pb/decentraland/sdk/components/pointer_lock.gen';
|
|
26
|
+
import { PBPrimaryPointerInfo } from './pb/decentraland/sdk/components/primary_pointer_info.gen';
|
|
25
27
|
import { PBRaycast } from './pb/decentraland/sdk/components/raycast.gen';
|
|
26
28
|
import { PBRaycastResult } from './pb/decentraland/sdk/components/raycast_result.gen';
|
|
27
29
|
import { PBRealmInfo } from './pb/decentraland/sdk/components/realm_info.gen';
|
|
@@ -56,12 +58,14 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
56
58
|
/** @public */ export declare const GltfContainer: LastWriteWinElementSetComponentDefinition<PBGltfContainer>;
|
|
57
59
|
/** @public */ export declare const GltfContainerLoadingState: LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>;
|
|
58
60
|
/** @public */ export declare const InputModifier: LastWriteWinElementSetComponentDefinition<PBInputModifier>;
|
|
61
|
+
/** @public */ export declare const LightSource: LastWriteWinElementSetComponentDefinition<PBLightSource>;
|
|
59
62
|
/** @public */ export declare const MainCamera: LastWriteWinElementSetComponentDefinition<PBMainCamera>;
|
|
60
63
|
/** @public */ export declare const NftShape: LastWriteWinElementSetComponentDefinition<PBNftShape>;
|
|
61
64
|
/** @public */ export declare const PlayerIdentityData: LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>;
|
|
62
65
|
/** @public */ export declare const PointerEvents: LastWriteWinElementSetComponentDefinition<PBPointerEvents>;
|
|
63
66
|
/** @public */ export declare const PointerEventsResult: GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>;
|
|
64
67
|
/** @public */ export declare const PointerLock: LastWriteWinElementSetComponentDefinition<PBPointerLock>;
|
|
68
|
+
/** @public */ export declare const PrimaryPointerInfo: LastWriteWinElementSetComponentDefinition<PBPrimaryPointerInfo>;
|
|
65
69
|
/** @public */ export declare const Raycast: LastWriteWinElementSetComponentDefinition<PBRaycast>;
|
|
66
70
|
/** @public */ export declare const RaycastResult: LastWriteWinElementSetComponentDefinition<PBRaycastResult>;
|
|
67
71
|
/** @public */ export declare const RealmInfo: LastWriteWinElementSetComponentDefinition<PBRealmInfo>;
|
|
@@ -17,12 +17,14 @@ export * from './index.gen';
|
|
|
17
17
|
/** @public */ export const GltfContainer = /* @__PURE__ */ components.GltfContainer(engine);
|
|
18
18
|
/** @public */ export const GltfContainerLoadingState = /* @__PURE__ */ components.GltfContainerLoadingState(engine);
|
|
19
19
|
/** @public */ export const InputModifier = /* @__PURE__ */ components.InputModifier(engine);
|
|
20
|
+
/** @public */ export const LightSource = /* @__PURE__ */ components.LightSource(engine);
|
|
20
21
|
/** @public */ export const MainCamera = /* @__PURE__ */ components.MainCamera(engine);
|
|
21
22
|
/** @public */ export const NftShape = /* @__PURE__ */ components.NftShape(engine);
|
|
22
23
|
/** @public */ export const PlayerIdentityData = /* @__PURE__ */ components.PlayerIdentityData(engine);
|
|
23
24
|
/** @public */ export const PointerEvents = /* @__PURE__ */ components.PointerEvents(engine);
|
|
24
25
|
/** @public */ export const PointerEventsResult = /* @__PURE__ */ components.PointerEventsResult(engine);
|
|
25
26
|
/** @public */ export const PointerLock = /* @__PURE__ */ components.PointerLock(engine);
|
|
27
|
+
/** @public */ export const PrimaryPointerInfo = /* @__PURE__ */ components.PrimaryPointerInfo(engine);
|
|
26
28
|
/** @public */ export const Raycast = /* @__PURE__ */ components.Raycast(engine);
|
|
27
29
|
/** @public */ export const RaycastResult = /* @__PURE__ */ components.RaycastResult(engine);
|
|
28
30
|
/** @public */ export const RealmInfo = /* @__PURE__ */ components.RealmInfo(engine);
|
|
@@ -17,6 +17,7 @@ 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
19
|
import { PBInputModifier } from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
20
|
+
import { PBLightSource } from './pb/decentraland/sdk/components/light_source.gen';
|
|
20
21
|
import { PBMainCamera } from './pb/decentraland/sdk/components/main_camera.gen';
|
|
21
22
|
import { PBMaterial } from './pb/decentraland/sdk/components/material.gen';
|
|
22
23
|
import { PBMeshCollider } from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
@@ -26,6 +27,7 @@ import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_id
|
|
|
26
27
|
import { PBPointerEvents } from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
27
28
|
import { PBPointerEventsResult } from './pb/decentraland/sdk/components/pointer_events_result.gen';
|
|
28
29
|
import { PBPointerLock } from './pb/decentraland/sdk/components/pointer_lock.gen';
|
|
30
|
+
import { PBPrimaryPointerInfo } from './pb/decentraland/sdk/components/primary_pointer_info.gen';
|
|
29
31
|
import { PBRaycast } from './pb/decentraland/sdk/components/raycast.gen';
|
|
30
32
|
import { PBRaycastResult } from './pb/decentraland/sdk/components/raycast_result.gen';
|
|
31
33
|
import { PBRealmInfo } from './pb/decentraland/sdk/components/realm_info.gen';
|
|
@@ -62,6 +64,7 @@ export * from './pb/decentraland/sdk/components/engine_info.gen';
|
|
|
62
64
|
export * from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
63
65
|
export * from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
64
66
|
export * from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
67
|
+
export * from './pb/decentraland/sdk/components/light_source.gen';
|
|
65
68
|
export * from './pb/decentraland/sdk/components/main_camera.gen';
|
|
66
69
|
export * from './pb/decentraland/sdk/components/material.gen';
|
|
67
70
|
export * from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
@@ -71,6 +74,7 @@ export * from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
|
71
74
|
export * from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
72
75
|
export * from './pb/decentraland/sdk/components/pointer_events_result.gen';
|
|
73
76
|
export * from './pb/decentraland/sdk/components/pointer_lock.gen';
|
|
77
|
+
export * from './pb/decentraland/sdk/components/primary_pointer_info.gen';
|
|
74
78
|
export * from './pb/decentraland/sdk/components/raycast.gen';
|
|
75
79
|
export * from './pb/decentraland/sdk/components/raycast_result.gen';
|
|
76
80
|
export * from './pb/decentraland/sdk/components/realm_info.gen';
|
|
@@ -109,6 +113,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
109
113
|
/** @public */ export declare const GltfContainer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
110
114
|
/** @public */ export declare const GltfContainerLoadingState: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
|
111
115
|
/** @public */ export declare const InputModifier: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
|
|
116
|
+
/** @public */ export declare const LightSource: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBLightSource>>;
|
|
112
117
|
/** @public */ export declare const MainCamera: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMainCamera>>;
|
|
113
118
|
/** @public */ export declare const Material: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
114
119
|
/** @public */ export declare const MeshCollider: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
@@ -118,6 +123,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
118
123
|
/** @public */ export declare const PointerEvents: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
|
119
124
|
/** @public */ export declare const PointerEventsResult: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
|
120
125
|
/** @public */ export declare const PointerLock: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
|
126
|
+
/** @public */ export declare const PrimaryPointerInfo: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPrimaryPointerInfo>>;
|
|
121
127
|
/** @public */ export declare const Raycast: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
|
|
122
128
|
/** @public */ export declare const RaycastResult: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
|
|
123
129
|
/** @public */ export declare const RealmInfo: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
|
|
@@ -156,6 +162,7 @@ export declare const componentDefinitionByName: {
|
|
|
156
162
|
"core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
157
163
|
"core::GltfContainerLoadingState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
|
158
164
|
"core::InputModifier": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
|
|
165
|
+
"core::LightSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBLightSource>>;
|
|
159
166
|
"core::MainCamera": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMainCamera>>;
|
|
160
167
|
"core::Material": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
161
168
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
@@ -165,6 +172,7 @@ export declare const componentDefinitionByName: {
|
|
|
165
172
|
"core::PointerEvents": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
|
166
173
|
"core::PointerEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
|
167
174
|
"core::PointerLock": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
|
175
|
+
"core::PrimaryPointerInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPrimaryPointerInfo>>;
|
|
168
176
|
"core::Raycast": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
|
|
169
177
|
"core::RaycastResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
|
|
170
178
|
"core::RealmInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
|
|
@@ -15,6 +15,7 @@ import { EngineInfoSchema } from './EngineInfo.gen';
|
|
|
15
15
|
import { GltfContainerSchema } from './GltfContainer.gen';
|
|
16
16
|
import { GltfContainerLoadingStateSchema } from './GltfContainerLoadingState.gen';
|
|
17
17
|
import { InputModifierSchema } from './InputModifier.gen';
|
|
18
|
+
import { LightSourceSchema } from './LightSource.gen';
|
|
18
19
|
import { MainCameraSchema } from './MainCamera.gen';
|
|
19
20
|
import { MaterialSchema } from './Material.gen';
|
|
20
21
|
import { MeshColliderSchema } from './MeshCollider.gen';
|
|
@@ -24,6 +25,7 @@ import { PlayerIdentityDataSchema } from './PlayerIdentityData.gen';
|
|
|
24
25
|
import { PointerEventsSchema } from './PointerEvents.gen';
|
|
25
26
|
import { PointerEventsResultSchema } from './PointerEventsResult.gen';
|
|
26
27
|
import { PointerLockSchema } from './PointerLock.gen';
|
|
28
|
+
import { PrimaryPointerInfoSchema } from './PrimaryPointerInfo.gen';
|
|
27
29
|
import { RaycastSchema } from './Raycast.gen';
|
|
28
30
|
import { RaycastResultSchema } from './RaycastResult.gen';
|
|
29
31
|
import { RealmInfoSchema } from './RealmInfo.gen';
|
|
@@ -60,6 +62,7 @@ export * from './pb/decentraland/sdk/components/engine_info.gen';
|
|
|
60
62
|
export * from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
61
63
|
export * from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
62
64
|
export * from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
65
|
+
export * from './pb/decentraland/sdk/components/light_source.gen';
|
|
63
66
|
export * from './pb/decentraland/sdk/components/main_camera.gen';
|
|
64
67
|
export * from './pb/decentraland/sdk/components/material.gen';
|
|
65
68
|
export * from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
@@ -69,6 +72,7 @@ export * from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
|
69
72
|
export * from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
70
73
|
export * from './pb/decentraland/sdk/components/pointer_events_result.gen';
|
|
71
74
|
export * from './pb/decentraland/sdk/components/pointer_lock.gen';
|
|
75
|
+
export * from './pb/decentraland/sdk/components/primary_pointer_info.gen';
|
|
72
76
|
export * from './pb/decentraland/sdk/components/raycast.gen';
|
|
73
77
|
export * from './pb/decentraland/sdk/components/raycast_result.gen';
|
|
74
78
|
export * from './pb/decentraland/sdk/components/realm_info.gen';
|
|
@@ -126,6 +130,8 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
126
130
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::GltfContainerLoadingState", GltfContainerLoadingStateSchema);
|
|
127
131
|
/** @public */ export const InputModifier = engine =>
|
|
128
132
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::InputModifier", InputModifierSchema);
|
|
133
|
+
/** @public */ export const LightSource = engine =>
|
|
134
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::LightSource", LightSourceSchema);
|
|
129
135
|
/** @public */ export const MainCamera = engine =>
|
|
130
136
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::MainCamera", MainCameraSchema);
|
|
131
137
|
/** @public */ export const Material = engine =>
|
|
@@ -146,6 +152,8 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
146
152
|
});
|
|
147
153
|
/** @public */ export const PointerLock = engine =>
|
|
148
154
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::PointerLock", PointerLockSchema);
|
|
155
|
+
/** @public */ export const PrimaryPointerInfo = engine =>
|
|
156
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::PrimaryPointerInfo", PrimaryPointerInfoSchema);
|
|
149
157
|
/** @public */ export const Raycast = engine =>
|
|
150
158
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::Raycast", RaycastSchema);
|
|
151
159
|
/** @public */ export const RaycastResult = engine =>
|
|
@@ -205,6 +213,7 @@ export const componentDefinitionByName = /* @__PURE__ */ {
|
|
|
205
213
|
"core::GltfContainer": GltfContainer,
|
|
206
214
|
"core::GltfContainerLoadingState": GltfContainerLoadingState,
|
|
207
215
|
"core::InputModifier": InputModifier,
|
|
216
|
+
"core::LightSource": LightSource,
|
|
208
217
|
"core::MainCamera": MainCamera,
|
|
209
218
|
"core::Material": Material,
|
|
210
219
|
"core::MeshCollider": MeshCollider,
|
|
@@ -214,6 +223,7 @@ export const componentDefinitionByName = /* @__PURE__ */ {
|
|
|
214
223
|
"core::PointerEvents": PointerEvents,
|
|
215
224
|
"core::PointerEventsResult": PointerEventsResult,
|
|
216
225
|
"core::PointerLock": PointerLock,
|
|
226
|
+
"core::PrimaryPointerInfo": PrimaryPointerInfo,
|
|
217
227
|
"core::Raycast": Raycast,
|
|
218
228
|
"core::RaycastResult": RaycastResult,
|
|
219
229
|
"core::RealmInfo": RealmInfo,
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
import { Color3 } from "../../common/colors.gen";
|
|
3
|
+
import { TextureUnion } from "../../common/texture.gen";
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface PBLightSource {
|
|
8
|
+
/** default = true, whether the lightSource is active or not. */
|
|
9
|
+
active?: boolean | undefined;
|
|
10
|
+
/** default = Color.white, the tint of the light, in RGB format where each component is a floating point value with a range from 0 to 1. */
|
|
11
|
+
color?: Color3 | undefined;
|
|
12
|
+
/** default = 250, ranges from 1 (dim) to 100,000 (very bright), expressed in Lumens for Point and Spot. */
|
|
13
|
+
brightness?: number | undefined;
|
|
14
|
+
/** default = 10, how far the light travels, expressed in meters. */
|
|
15
|
+
range?: number | undefined;
|
|
16
|
+
type?: {
|
|
17
|
+
$case: "point";
|
|
18
|
+
point: PBLightSource_Point;
|
|
19
|
+
} | {
|
|
20
|
+
$case: "spot";
|
|
21
|
+
spot: PBLightSource_Spot;
|
|
22
|
+
} | undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export declare const enum PBLightSource_ShadowType {
|
|
28
|
+
/** ST_NONE - No shadows are cast from this LightSource. */
|
|
29
|
+
ST_NONE = 0,
|
|
30
|
+
/** ST_SOFT - More realistic type of shadow that reduces block artifacts, noise or pixelation, but requires more processing. */
|
|
31
|
+
ST_SOFT = 1,
|
|
32
|
+
/** ST_HARD - Less realistic type of shadow but more performant, uses hard edges. */
|
|
33
|
+
ST_HARD = 2
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export interface PBLightSource_Point {
|
|
39
|
+
/** default = ShadowType.ST_NONE The type of shadow the light source supports. */
|
|
40
|
+
shadow?: PBLightSource_ShadowType | undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export interface PBLightSource_Spot {
|
|
46
|
+
/** default = 21.8. Inner angle can't be higher than outer angle, otherwise will default to same value. Min value is 0. Max value is 179. */
|
|
47
|
+
innerAngle?: number | undefined;
|
|
48
|
+
/** default = 30. Outer angle can't be lower than inner angle, otherwise will inner angle will be set to same value. Max value is 179. */
|
|
49
|
+
outerAngle?: number | undefined;
|
|
50
|
+
/** default = ShadowType.ST_NONE The type of shadow the light source supports. */
|
|
51
|
+
shadow?: PBLightSource_ShadowType | undefined;
|
|
52
|
+
/** Texture mask through which shadows are cast to simulate caustics, soft shadows, and light shapes such as light entering from a window. */
|
|
53
|
+
shadowMaskTexture?: TextureUnion | undefined;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
export declare namespace PBLightSource {
|
|
59
|
+
function encode(message: PBLightSource, writer?: _m0.Writer): _m0.Writer;
|
|
60
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBLightSource;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
export declare namespace PBLightSource_Point {
|
|
66
|
+
function encode(message: PBLightSource_Point, writer?: _m0.Writer): _m0.Writer;
|
|
67
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBLightSource_Point;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
export declare namespace PBLightSource_Spot {
|
|
73
|
+
function encode(message: PBLightSource_Spot, writer?: _m0.Writer): _m0.Writer;
|
|
74
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBLightSource_Spot;
|
|
75
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Color3 } from "../../common/colors.gen";
|
|
4
|
+
import { TextureUnion } from "../../common/texture.gen";
|
|
5
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export var PBLightSource_ShadowType;
|
|
10
|
+
(function (PBLightSource_ShadowType) {
|
|
11
|
+
/** ST_NONE - No shadows are cast from this LightSource. */
|
|
12
|
+
PBLightSource_ShadowType[PBLightSource_ShadowType["ST_NONE"] = 0] = "ST_NONE";
|
|
13
|
+
/** ST_SOFT - More realistic type of shadow that reduces block artifacts, noise or pixelation, but requires more processing. */
|
|
14
|
+
PBLightSource_ShadowType[PBLightSource_ShadowType["ST_SOFT"] = 1] = "ST_SOFT";
|
|
15
|
+
/** ST_HARD - Less realistic type of shadow but more performant, uses hard edges. */
|
|
16
|
+
PBLightSource_ShadowType[PBLightSource_ShadowType["ST_HARD"] = 2] = "ST_HARD";
|
|
17
|
+
})(PBLightSource_ShadowType || (PBLightSource_ShadowType = {}));
|
|
18
|
+
function createBasePBLightSource() {
|
|
19
|
+
return { active: undefined, color: undefined, brightness: undefined, range: undefined, type: undefined };
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export var PBLightSource;
|
|
25
|
+
(function (PBLightSource) {
|
|
26
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
27
|
+
if (message.active !== undefined) {
|
|
28
|
+
writer.uint32(32).bool(message.active);
|
|
29
|
+
}
|
|
30
|
+
if (message.color !== undefined) {
|
|
31
|
+
Color3.encode(message.color, writer.uint32(10).fork()).ldelim();
|
|
32
|
+
}
|
|
33
|
+
if (message.brightness !== undefined) {
|
|
34
|
+
writer.uint32(21).float(message.brightness);
|
|
35
|
+
}
|
|
36
|
+
if (message.range !== undefined) {
|
|
37
|
+
writer.uint32(29).float(message.range);
|
|
38
|
+
}
|
|
39
|
+
switch (message.type?.$case) {
|
|
40
|
+
case "point":
|
|
41
|
+
PBLightSource_Point.encode(message.type.point, writer.uint32(50).fork()).ldelim();
|
|
42
|
+
break;
|
|
43
|
+
case "spot":
|
|
44
|
+
PBLightSource_Spot.encode(message.type.spot, writer.uint32(58).fork()).ldelim();
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
return writer;
|
|
48
|
+
}
|
|
49
|
+
PBLightSource.encode = encode;
|
|
50
|
+
function decode(input, length) {
|
|
51
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
52
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
53
|
+
const message = createBasePBLightSource();
|
|
54
|
+
while (reader.pos < end) {
|
|
55
|
+
const tag = reader.uint32();
|
|
56
|
+
switch (tag >>> 3) {
|
|
57
|
+
case 4:
|
|
58
|
+
if (tag !== 32) {
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
message.active = reader.bool();
|
|
62
|
+
continue;
|
|
63
|
+
case 1:
|
|
64
|
+
if (tag !== 10) {
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
message.color = Color3.decode(reader, reader.uint32());
|
|
68
|
+
continue;
|
|
69
|
+
case 2:
|
|
70
|
+
if (tag !== 21) {
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
message.brightness = reader.float();
|
|
74
|
+
continue;
|
|
75
|
+
case 3:
|
|
76
|
+
if (tag !== 29) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
message.range = reader.float();
|
|
80
|
+
continue;
|
|
81
|
+
case 6:
|
|
82
|
+
if (tag !== 50) {
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
message.type = { $case: "point", point: PBLightSource_Point.decode(reader, reader.uint32()) };
|
|
86
|
+
continue;
|
|
87
|
+
case 7:
|
|
88
|
+
if (tag !== 58) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
message.type = { $case: "spot", spot: PBLightSource_Spot.decode(reader, reader.uint32()) };
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
reader.skipType(tag & 7);
|
|
98
|
+
}
|
|
99
|
+
return message;
|
|
100
|
+
}
|
|
101
|
+
PBLightSource.decode = decode;
|
|
102
|
+
})(PBLightSource || (PBLightSource = {}));
|
|
103
|
+
function createBasePBLightSource_Point() {
|
|
104
|
+
return { shadow: undefined };
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @public
|
|
108
|
+
*/
|
|
109
|
+
export var PBLightSource_Point;
|
|
110
|
+
(function (PBLightSource_Point) {
|
|
111
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
112
|
+
if (message.shadow !== undefined) {
|
|
113
|
+
writer.uint32(40).int32(message.shadow);
|
|
114
|
+
}
|
|
115
|
+
return writer;
|
|
116
|
+
}
|
|
117
|
+
PBLightSource_Point.encode = encode;
|
|
118
|
+
function decode(input, length) {
|
|
119
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
120
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
121
|
+
const message = createBasePBLightSource_Point();
|
|
122
|
+
while (reader.pos < end) {
|
|
123
|
+
const tag = reader.uint32();
|
|
124
|
+
switch (tag >>> 3) {
|
|
125
|
+
case 5:
|
|
126
|
+
if (tag !== 40) {
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
message.shadow = reader.int32();
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
reader.skipType(tag & 7);
|
|
136
|
+
}
|
|
137
|
+
return message;
|
|
138
|
+
}
|
|
139
|
+
PBLightSource_Point.decode = decode;
|
|
140
|
+
})(PBLightSource_Point || (PBLightSource_Point = {}));
|
|
141
|
+
function createBasePBLightSource_Spot() {
|
|
142
|
+
return { innerAngle: undefined, outerAngle: undefined, shadow: undefined, shadowMaskTexture: undefined };
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @public
|
|
146
|
+
*/
|
|
147
|
+
export var PBLightSource_Spot;
|
|
148
|
+
(function (PBLightSource_Spot) {
|
|
149
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
150
|
+
if (message.innerAngle !== undefined) {
|
|
151
|
+
writer.uint32(13).float(message.innerAngle);
|
|
152
|
+
}
|
|
153
|
+
if (message.outerAngle !== undefined) {
|
|
154
|
+
writer.uint32(21).float(message.outerAngle);
|
|
155
|
+
}
|
|
156
|
+
if (message.shadow !== undefined) {
|
|
157
|
+
writer.uint32(40).int32(message.shadow);
|
|
158
|
+
}
|
|
159
|
+
if (message.shadowMaskTexture !== undefined) {
|
|
160
|
+
TextureUnion.encode(message.shadowMaskTexture, writer.uint32(66).fork()).ldelim();
|
|
161
|
+
}
|
|
162
|
+
return writer;
|
|
163
|
+
}
|
|
164
|
+
PBLightSource_Spot.encode = encode;
|
|
165
|
+
function decode(input, length) {
|
|
166
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
167
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
168
|
+
const message = createBasePBLightSource_Spot();
|
|
169
|
+
while (reader.pos < end) {
|
|
170
|
+
const tag = reader.uint32();
|
|
171
|
+
switch (tag >>> 3) {
|
|
172
|
+
case 1:
|
|
173
|
+
if (tag !== 13) {
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
message.innerAngle = reader.float();
|
|
177
|
+
continue;
|
|
178
|
+
case 2:
|
|
179
|
+
if (tag !== 21) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
message.outerAngle = reader.float();
|
|
183
|
+
continue;
|
|
184
|
+
case 5:
|
|
185
|
+
if (tag !== 40) {
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
message.shadow = reader.int32();
|
|
189
|
+
continue;
|
|
190
|
+
case 8:
|
|
191
|
+
if (tag !== 66) {
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
message.shadowMaskTexture = TextureUnion.decode(reader, reader.uint32());
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
reader.skipType(tag & 7);
|
|
201
|
+
}
|
|
202
|
+
return message;
|
|
203
|
+
}
|
|
204
|
+
PBLightSource_Spot.decode = decode;
|
|
205
|
+
})(PBLightSource_Spot || (PBLightSource_Spot = {}));
|
package/dist/components/generated/pb/decentraland/sdk/components/primary_pointer_info.gen.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
import { Vector2, Vector3 } from "../../common/vectors.gen";
|
|
3
|
+
/**
|
|
4
|
+
* PointerType enumerates the different input devices that can be used for pointer interactions.
|
|
5
|
+
* Each type has specific characteristics and use cases in the virtual world.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare const enum PointerType {
|
|
11
|
+
/** POT_NONE - No pointer input */
|
|
12
|
+
POT_NONE = 0,
|
|
13
|
+
/** POT_MOUSE - Traditional mouse input */
|
|
14
|
+
POT_MOUSE = 1
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The PBPrimaryPointerInfo component provides information about the current state of the primary
|
|
18
|
+
* pointer input device (mouse, touch, gamepad, or VR controller). It tracks the pointer's position,
|
|
19
|
+
* movement, and interaction capabilities in both 2D screen space and 3D world space.
|
|
20
|
+
*
|
|
21
|
+
* This component is essential for:
|
|
22
|
+
* - Tracking cursor/pointer position and movement
|
|
23
|
+
* - Converting 2D screen coordinates to 3D world space interactions
|
|
24
|
+
* - Supporting multiple input methods (mouse, touch, gamepad, VR)
|
|
25
|
+
* - Enabling ray-based interactions for 3D object selection
|
|
26
|
+
*
|
|
27
|
+
* The component can be used to:
|
|
28
|
+
* - Implement drag-and-drop functionality
|
|
29
|
+
* - Handle touch interactions on mobile devices
|
|
30
|
+
* - Support gamepad navigation
|
|
31
|
+
* - Enable VR controller interactions
|
|
32
|
+
* - Convert screen coordinates to world space rays for 3D interactions
|
|
33
|
+
*
|
|
34
|
+
* Note: Touch, Pad, and Wand support, as well as dragging, will be added later.
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export interface PBPrimaryPointerInfo {
|
|
40
|
+
/** The type of input device being used */
|
|
41
|
+
pointerType?: PointerType | undefined;
|
|
42
|
+
/** Current position in screen space (pixels) */
|
|
43
|
+
screenCoordinates?: Vector2 | undefined;
|
|
44
|
+
/** Movement since last frame (pixels) */
|
|
45
|
+
screenDelta?: Vector2 | undefined;
|
|
46
|
+
/** Direction vector for 3D ray casting */
|
|
47
|
+
worldRayDirection?: Vector3 | undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export declare namespace PBPrimaryPointerInfo {
|
|
53
|
+
function encode(message: PBPrimaryPointerInfo, writer?: _m0.Writer): _m0.Writer;
|
|
54
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBPrimaryPointerInfo;
|
|
55
|
+
}
|