@dcl/ecs 7.9.3-16574576809.commit-c0a4156 → 7.9.3-16616194522.commit-20ff207
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/component-names.gen.js +1 -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/light_source.gen.d.ts +62 -0
- package/dist/components/generated/pb/decentraland/sdk/components/light_source.gen.js +192 -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/component-names.gen.js +1 -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/light_source.gen.d.ts +62 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/light_source.gen.js +198 -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
|
+
};
|
|
@@ -17,6 +17,7 @@ import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container
|
|
|
17
17
|
import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
18
18
|
import { PBGltfNodeModifiers } from './pb/decentraland/sdk/components/gltf_node_modifiers.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 { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
|
|
22
23
|
import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
@@ -60,6 +61,7 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
60
61
|
/** @public */ export declare const GltfContainerLoadingState: LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>;
|
|
61
62
|
/** @public */ export declare const GltfNodeModifiers: LastWriteWinElementSetComponentDefinition<PBGltfNodeModifiers>;
|
|
62
63
|
/** @public */ export declare const InputModifier: LastWriteWinElementSetComponentDefinition<PBInputModifier>;
|
|
64
|
+
/** @public */ export declare const LightSource: LastWriteWinElementSetComponentDefinition<PBLightSource>;
|
|
63
65
|
/** @public */ export declare const MainCamera: LastWriteWinElementSetComponentDefinition<PBMainCamera>;
|
|
64
66
|
/** @public */ export declare const NftShape: LastWriteWinElementSetComponentDefinition<PBNftShape>;
|
|
65
67
|
/** @public */ export declare const PlayerIdentityData: LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>;
|
|
@@ -18,6 +18,7 @@ export * from './index.gen';
|
|
|
18
18
|
/** @public */ export const GltfContainerLoadingState = /* @__PURE__ */ components.GltfContainerLoadingState(engine);
|
|
19
19
|
/** @public */ export const GltfNodeModifiers = /* @__PURE__ */ components.GltfNodeModifiers(engine);
|
|
20
20
|
/** @public */ export const InputModifier = /* @__PURE__ */ components.InputModifier(engine);
|
|
21
|
+
/** @public */ export const LightSource = /* @__PURE__ */ components.LightSource(engine);
|
|
21
22
|
/** @public */ export const MainCamera = /* @__PURE__ */ components.MainCamera(engine);
|
|
22
23
|
/** @public */ export const NftShape = /* @__PURE__ */ components.NftShape(engine);
|
|
23
24
|
/** @public */ export const PlayerIdentityData = /* @__PURE__ */ components.PlayerIdentityData(engine);
|
|
@@ -18,6 +18,7 @@ import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container
|
|
|
18
18
|
import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
19
19
|
import { PBGltfNodeModifiers } from './pb/decentraland/sdk/components/gltf_node_modifiers.gen';
|
|
20
20
|
import { PBInputModifier } from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
21
|
+
import { PBLightSource } from './pb/decentraland/sdk/components/light_source.gen';
|
|
21
22
|
import { PBMainCamera } from './pb/decentraland/sdk/components/main_camera.gen';
|
|
22
23
|
import { PBMaterial } from './pb/decentraland/sdk/components/material.gen';
|
|
23
24
|
import { PBMeshCollider } from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
@@ -66,6 +67,7 @@ export * from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
|
66
67
|
export * from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
67
68
|
export * from './pb/decentraland/sdk/components/gltf_node_modifiers.gen';
|
|
68
69
|
export * from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
70
|
+
export * from './pb/decentraland/sdk/components/light_source.gen';
|
|
69
71
|
export * from './pb/decentraland/sdk/components/main_camera.gen';
|
|
70
72
|
export * from './pb/decentraland/sdk/components/material.gen';
|
|
71
73
|
export * from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
@@ -116,6 +118,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
116
118
|
/** @public */ export declare const GltfContainerLoadingState: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
|
117
119
|
/** @public */ export declare const GltfNodeModifiers: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfNodeModifiers>>;
|
|
118
120
|
/** @public */ export declare const InputModifier: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
|
|
121
|
+
/** @public */ export declare const LightSource: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBLightSource>>;
|
|
119
122
|
/** @public */ export declare const MainCamera: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMainCamera>>;
|
|
120
123
|
/** @public */ export declare const Material: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
121
124
|
/** @public */ export declare const MeshCollider: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
@@ -166,6 +169,7 @@ export declare const componentDefinitionByName: {
|
|
|
166
169
|
"core::GltfContainerLoadingState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
|
167
170
|
"core::GltfNodeModifiers": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfNodeModifiers>>;
|
|
168
171
|
"core::InputModifier": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
|
|
172
|
+
"core::LightSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBLightSource>>;
|
|
169
173
|
"core::MainCamera": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMainCamera>>;
|
|
170
174
|
"core::Material": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
171
175
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
@@ -16,6 +16,7 @@ import { GltfContainerSchema } from './GltfContainer.gen';
|
|
|
16
16
|
import { GltfContainerLoadingStateSchema } from './GltfContainerLoadingState.gen';
|
|
17
17
|
import { GltfNodeModifiersSchema } from './GltfNodeModifiers.gen';
|
|
18
18
|
import { InputModifierSchema } from './InputModifier.gen';
|
|
19
|
+
import { LightSourceSchema } from './LightSource.gen';
|
|
19
20
|
import { MainCameraSchema } from './MainCamera.gen';
|
|
20
21
|
import { MaterialSchema } from './Material.gen';
|
|
21
22
|
import { MeshColliderSchema } from './MeshCollider.gen';
|
|
@@ -64,6 +65,7 @@ export * from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
|
64
65
|
export * from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
65
66
|
export * from './pb/decentraland/sdk/components/gltf_node_modifiers.gen';
|
|
66
67
|
export * from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
68
|
+
export * from './pb/decentraland/sdk/components/light_source.gen';
|
|
67
69
|
export * from './pb/decentraland/sdk/components/main_camera.gen';
|
|
68
70
|
export * from './pb/decentraland/sdk/components/material.gen';
|
|
69
71
|
export * from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
@@ -134,6 +136,8 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
134
136
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::GltfNodeModifiers", GltfNodeModifiersSchema);
|
|
135
137
|
/** @public */ export const InputModifier = engine =>
|
|
136
138
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::InputModifier", InputModifierSchema);
|
|
139
|
+
/** @public */ export const LightSource = engine =>
|
|
140
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::LightSource", LightSourceSchema);
|
|
137
141
|
/** @public */ export const MainCamera = engine =>
|
|
138
142
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::MainCamera", MainCameraSchema);
|
|
139
143
|
/** @public */ export const Material = engine =>
|
|
@@ -218,6 +222,7 @@ export const componentDefinitionByName = /* @__PURE__ */ {
|
|
|
218
222
|
"core::GltfContainerLoadingState": GltfContainerLoadingState,
|
|
219
223
|
"core::GltfNodeModifiers": GltfNodeModifiers,
|
|
220
224
|
"core::InputModifier": InputModifier,
|
|
225
|
+
"core::LightSource": LightSource,
|
|
221
226
|
"core::MainCamera": MainCamera,
|
|
222
227
|
"core::Material": Material,
|
|
223
228
|
"core::MeshCollider": MeshCollider,
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
intensity?: number | undefined;
|
|
14
|
+
/** default = 0, how far the light travels, expressed in meters. If left at 0 will be computed automatically */
|
|
15
|
+
range?: number | undefined;
|
|
16
|
+
/** default = false, whether the light casts shadows or not. */
|
|
17
|
+
shadow?: boolean | undefined;
|
|
18
|
+
/** Texture mask through which shadows are cast to simulate caustics, soft shadows, and light shapes such as light entering from a window. */
|
|
19
|
+
shadowMaskTexture?: TextureUnion | undefined;
|
|
20
|
+
type?: {
|
|
21
|
+
$case: "point";
|
|
22
|
+
point: PBLightSource_Point;
|
|
23
|
+
} | {
|
|
24
|
+
$case: "spot";
|
|
25
|
+
spot: PBLightSource_Spot;
|
|
26
|
+
} | undefined;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export interface PBLightSource_Point {
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export interface PBLightSource_Spot {
|
|
37
|
+
/** 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. */
|
|
38
|
+
innerAngle?: number | undefined;
|
|
39
|
+
/** 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. */
|
|
40
|
+
outerAngle?: number | undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export declare namespace PBLightSource {
|
|
46
|
+
function encode(message: PBLightSource, writer?: _m0.Writer): _m0.Writer;
|
|
47
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBLightSource;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export declare namespace PBLightSource_Point {
|
|
53
|
+
function encode(_: PBLightSource_Point, writer?: _m0.Writer): _m0.Writer;
|
|
54
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBLightSource_Point;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
export declare namespace PBLightSource_Spot {
|
|
60
|
+
function encode(message: PBLightSource_Spot, writer?: _m0.Writer): _m0.Writer;
|
|
61
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBLightSource_Spot;
|
|
62
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
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
|
+
function createBasePBLightSource() {
|
|
7
|
+
return {
|
|
8
|
+
active: undefined,
|
|
9
|
+
color: undefined,
|
|
10
|
+
intensity: undefined,
|
|
11
|
+
range: undefined,
|
|
12
|
+
shadow: undefined,
|
|
13
|
+
shadowMaskTexture: undefined,
|
|
14
|
+
type: undefined,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export var PBLightSource;
|
|
21
|
+
(function (PBLightSource) {
|
|
22
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
23
|
+
if (message.active !== undefined) {
|
|
24
|
+
writer.uint32(8).bool(message.active);
|
|
25
|
+
}
|
|
26
|
+
if (message.color !== undefined) {
|
|
27
|
+
Color3.encode(message.color, writer.uint32(18).fork()).ldelim();
|
|
28
|
+
}
|
|
29
|
+
if (message.intensity !== undefined) {
|
|
30
|
+
writer.uint32(29).float(message.intensity);
|
|
31
|
+
}
|
|
32
|
+
if (message.range !== undefined) {
|
|
33
|
+
writer.uint32(37).float(message.range);
|
|
34
|
+
}
|
|
35
|
+
if (message.shadow !== undefined) {
|
|
36
|
+
writer.uint32(40).bool(message.shadow);
|
|
37
|
+
}
|
|
38
|
+
if (message.shadowMaskTexture !== undefined) {
|
|
39
|
+
TextureUnion.encode(message.shadowMaskTexture, writer.uint32(50).fork()).ldelim();
|
|
40
|
+
}
|
|
41
|
+
switch (message.type?.$case) {
|
|
42
|
+
case "point":
|
|
43
|
+
PBLightSource_Point.encode(message.type.point, writer.uint32(58).fork()).ldelim();
|
|
44
|
+
break;
|
|
45
|
+
case "spot":
|
|
46
|
+
PBLightSource_Spot.encode(message.type.spot, writer.uint32(66).fork()).ldelim();
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
return writer;
|
|
50
|
+
}
|
|
51
|
+
PBLightSource.encode = encode;
|
|
52
|
+
function decode(input, length) {
|
|
53
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
54
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
55
|
+
const message = createBasePBLightSource();
|
|
56
|
+
while (reader.pos < end) {
|
|
57
|
+
const tag = reader.uint32();
|
|
58
|
+
switch (tag >>> 3) {
|
|
59
|
+
case 1:
|
|
60
|
+
if (tag !== 8) {
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
message.active = reader.bool();
|
|
64
|
+
continue;
|
|
65
|
+
case 2:
|
|
66
|
+
if (tag !== 18) {
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
message.color = Color3.decode(reader, reader.uint32());
|
|
70
|
+
continue;
|
|
71
|
+
case 3:
|
|
72
|
+
if (tag !== 29) {
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
message.intensity = reader.float();
|
|
76
|
+
continue;
|
|
77
|
+
case 4:
|
|
78
|
+
if (tag !== 37) {
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
message.range = reader.float();
|
|
82
|
+
continue;
|
|
83
|
+
case 5:
|
|
84
|
+
if (tag !== 40) {
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
message.shadow = reader.bool();
|
|
88
|
+
continue;
|
|
89
|
+
case 6:
|
|
90
|
+
if (tag !== 50) {
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
message.shadowMaskTexture = TextureUnion.decode(reader, reader.uint32());
|
|
94
|
+
continue;
|
|
95
|
+
case 7:
|
|
96
|
+
if (tag !== 58) {
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
message.type = { $case: "point", point: PBLightSource_Point.decode(reader, reader.uint32()) };
|
|
100
|
+
continue;
|
|
101
|
+
case 8:
|
|
102
|
+
if (tag !== 66) {
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
message.type = { $case: "spot", spot: PBLightSource_Spot.decode(reader, reader.uint32()) };
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
reader.skipType(tag & 7);
|
|
112
|
+
}
|
|
113
|
+
return message;
|
|
114
|
+
}
|
|
115
|
+
PBLightSource.decode = decode;
|
|
116
|
+
})(PBLightSource || (PBLightSource = {}));
|
|
117
|
+
function createBasePBLightSource_Point() {
|
|
118
|
+
return {};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* @public
|
|
122
|
+
*/
|
|
123
|
+
export var PBLightSource_Point;
|
|
124
|
+
(function (PBLightSource_Point) {
|
|
125
|
+
function encode(_, writer = _m0.Writer.create()) {
|
|
126
|
+
return writer;
|
|
127
|
+
}
|
|
128
|
+
PBLightSource_Point.encode = encode;
|
|
129
|
+
function decode(input, length) {
|
|
130
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
131
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
132
|
+
const message = createBasePBLightSource_Point();
|
|
133
|
+
while (reader.pos < end) {
|
|
134
|
+
const tag = reader.uint32();
|
|
135
|
+
switch (tag >>> 3) {
|
|
136
|
+
}
|
|
137
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
reader.skipType(tag & 7);
|
|
141
|
+
}
|
|
142
|
+
return message;
|
|
143
|
+
}
|
|
144
|
+
PBLightSource_Point.decode = decode;
|
|
145
|
+
})(PBLightSource_Point || (PBLightSource_Point = {}));
|
|
146
|
+
function createBasePBLightSource_Spot() {
|
|
147
|
+
return { innerAngle: undefined, outerAngle: undefined };
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
export var PBLightSource_Spot;
|
|
153
|
+
(function (PBLightSource_Spot) {
|
|
154
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
155
|
+
if (message.innerAngle !== undefined) {
|
|
156
|
+
writer.uint32(77).float(message.innerAngle);
|
|
157
|
+
}
|
|
158
|
+
if (message.outerAngle !== undefined) {
|
|
159
|
+
writer.uint32(85).float(message.outerAngle);
|
|
160
|
+
}
|
|
161
|
+
return writer;
|
|
162
|
+
}
|
|
163
|
+
PBLightSource_Spot.encode = encode;
|
|
164
|
+
function decode(input, length) {
|
|
165
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
166
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
167
|
+
const message = createBasePBLightSource_Spot();
|
|
168
|
+
while (reader.pos < end) {
|
|
169
|
+
const tag = reader.uint32();
|
|
170
|
+
switch (tag >>> 3) {
|
|
171
|
+
case 9:
|
|
172
|
+
if (tag !== 77) {
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
message.innerAngle = reader.float();
|
|
176
|
+
continue;
|
|
177
|
+
case 10:
|
|
178
|
+
if (tag !== 85) {
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
message.outerAngle = reader.float();
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
reader.skipType(tag & 7);
|
|
188
|
+
}
|
|
189
|
+
return message;
|
|
190
|
+
}
|
|
191
|
+
PBLightSource_Spot.decode = decode;
|
|
192
|
+
})(PBLightSource_Spot || (PBLightSource_Spot = {}));
|
|
@@ -6,6 +6,7 @@ import { CameraTransition } from "./common/camera_transition.gen";
|
|
|
6
6
|
* an 'instant' transition (like using speed/time = 0)
|
|
7
7
|
* * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
|
|
8
8
|
* the holding entity transform).
|
|
9
|
+
* * The fov defines the Field of View of the virtual camera
|
|
9
10
|
*/
|
|
10
11
|
/**
|
|
11
12
|
* @public
|
|
@@ -13,6 +14,8 @@ import { CameraTransition } from "./common/camera_transition.gen";
|
|
|
13
14
|
export interface PBVirtualCamera {
|
|
14
15
|
defaultTransition?: CameraTransition | undefined;
|
|
15
16
|
lookAtEntity?: number | undefined;
|
|
17
|
+
/** default: 60 */
|
|
18
|
+
fov?: number | undefined;
|
|
16
19
|
}
|
|
17
20
|
/**
|
|
18
21
|
* @public
|
|
@@ -3,7 +3,7 @@ import _m0 from "protobufjs/minimal";
|
|
|
3
3
|
import { CameraTransition } from "./common/camera_transition.gen";
|
|
4
4
|
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
5
5
|
function createBasePBVirtualCamera() {
|
|
6
|
-
return { defaultTransition: undefined, lookAtEntity: undefined };
|
|
6
|
+
return { defaultTransition: undefined, lookAtEntity: undefined, fov: undefined };
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* @public
|
|
@@ -17,6 +17,9 @@ export var PBVirtualCamera;
|
|
|
17
17
|
if (message.lookAtEntity !== undefined) {
|
|
18
18
|
writer.uint32(16).uint32(message.lookAtEntity);
|
|
19
19
|
}
|
|
20
|
+
if (message.fov !== undefined) {
|
|
21
|
+
writer.uint32(29).float(message.fov);
|
|
22
|
+
}
|
|
20
23
|
return writer;
|
|
21
24
|
}
|
|
22
25
|
PBVirtualCamera.encode = encode;
|
|
@@ -39,6 +42,12 @@ export var PBVirtualCamera;
|
|
|
39
42
|
}
|
|
40
43
|
message.lookAtEntity = reader.uint32();
|
|
41
44
|
continue;
|
|
45
|
+
case 3:
|
|
46
|
+
if (tag !== 29) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
message.fov = reader.float();
|
|
50
|
+
continue;
|
|
42
51
|
}
|
|
43
52
|
if ((tag & 7) === 4 || tag === 0) {
|
|
44
53
|
break;
|
|
@@ -16,6 +16,7 @@ import { AudioStreamComponentDefinitionExtended } from './extended/AudioStream';
|
|
|
16
16
|
import { MediaState } from './generated/pb/decentraland/sdk/components/common/media_state.gen';
|
|
17
17
|
import { VirtualCameraComponentDefinitionExtended } from './extended/VirtualCamera';
|
|
18
18
|
import { InputModifierComponentDefinitionExtended } from './extended/InputModifier';
|
|
19
|
+
import { LightSourceComponentDefinitionExtended } from './extended/LightSource';
|
|
19
20
|
export * from './generated/index.gen';
|
|
20
21
|
export type { GrowOnlyValueSetComponentDefinition, LastWriteWinElementSetComponentDefinition, LwwComponentGetter, GSetComponentGetter };
|
|
21
22
|
export declare const Transform: LwwComponentGetter<TransformComponentExtended>;
|
|
@@ -28,6 +29,7 @@ export declare const MeshCollider: LwwComponentGetter<MeshColliderComponentDefin
|
|
|
28
29
|
export declare const Tween: LwwComponentGetter<TweenComponentDefinitionExtended>;
|
|
29
30
|
export declare const VirtualCamera: LwwComponentGetter<VirtualCameraComponentDefinitionExtended>;
|
|
30
31
|
export declare const InputModifier: LwwComponentGetter<InputModifierComponentDefinitionExtended>;
|
|
32
|
+
export declare const LightSource: LwwComponentGetter<LightSourceComponentDefinitionExtended>;
|
|
31
33
|
/**
|
|
32
34
|
* @alpha
|
|
33
35
|
*/
|
package/dist/components/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { defineAudioStreamComponent } from './extended/AudioStream';
|
|
|
13
13
|
import { MediaState } from './generated/pb/decentraland/sdk/components/common/media_state.gen';
|
|
14
14
|
import { defineVirtualCameraComponent } from './extended/VirtualCamera';
|
|
15
15
|
import { defineInputModifierComponent } from './extended/InputModifier';
|
|
16
|
+
import { defineLightSourceComponent } from './extended/LightSource';
|
|
16
17
|
export * from './generated/index.gen';
|
|
17
18
|
/* @__PURE__ */
|
|
18
19
|
export const Transform = (engine) => defineTransformComponent(engine);
|
|
@@ -34,6 +35,8 @@ export const Tween = (engine) => defineTweenComponent(engine);
|
|
|
34
35
|
export const VirtualCamera = (engine) => defineVirtualCameraComponent(engine);
|
|
35
36
|
/* @__PURE__*/
|
|
36
37
|
export const InputModifier = (engine) => defineInputModifierComponent(engine);
|
|
38
|
+
/* @__PURE__*/
|
|
39
|
+
export const LightSource = (engine) => defineLightSourceComponent(engine);
|
|
37
40
|
/**
|
|
38
41
|
* @alpha
|
|
39
42
|
*/
|
|
@@ -12,3 +12,4 @@ export type { ISyncComponents, ISyncComponentsType } from './manual/SyncComponen
|
|
|
12
12
|
export type { INetowrkEntity, INetowrkEntityType } from './manual/NetworkEntity';
|
|
13
13
|
export type { INetowrkParent, INetowrkParentType } from './manual/NetworkParent';
|
|
14
14
|
export type { InputModifierHelper, InputModifierComponentDefinitionExtended } from './extended/InputModifier';
|
|
15
|
+
export type { LightSourceHelper, LightSourceComponentDefinitionExtended } from './extended/LightSource';
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export * from './systems/async-task';
|
|
|
11
11
|
export * from './systems/tween';
|
|
12
12
|
export * from './engine/entity';
|
|
13
13
|
export * from './components/types';
|
|
14
|
-
import { MaterialComponentDefinitionExtended, MeshColliderComponentDefinitionExtended, MeshRendererComponentDefinitionExtended, TransformComponentExtended, AnimatorComponentDefinitionExtended, AudioSourceComponentDefinitionExtended, AudioStreamComponentDefinitionExtended, ISyncComponents, TweenComponentDefinitionExtended, INetowrkEntity, INetowrkParent, VirtualCameraComponentDefinitionExtended, InputModifierComponentDefinitionExtended } from './components/types';
|
|
14
|
+
import { MaterialComponentDefinitionExtended, MeshColliderComponentDefinitionExtended, MeshRendererComponentDefinitionExtended, TransformComponentExtended, AnimatorComponentDefinitionExtended, AudioSourceComponentDefinitionExtended, AudioStreamComponentDefinitionExtended, ISyncComponents, TweenComponentDefinitionExtended, INetowrkEntity, INetowrkParent, VirtualCameraComponentDefinitionExtended, InputModifierComponentDefinitionExtended, LightSourceComponentDefinitionExtended } from './components/types';
|
|
15
15
|
import { NameComponent } from './components/manual/Name';
|
|
16
16
|
export declare const Transform: TransformComponentExtended;
|
|
17
17
|
export declare const Animator: AnimatorComponentDefinitionExtended;
|
|
@@ -24,6 +24,7 @@ export declare const Name: NameComponent;
|
|
|
24
24
|
export declare const Tween: TweenComponentDefinitionExtended;
|
|
25
25
|
export declare const VirtualCamera: VirtualCameraComponentDefinitionExtended;
|
|
26
26
|
export declare const InputModifier: InputModifierComponentDefinitionExtended;
|
|
27
|
+
export declare const LightSource: LightSourceComponentDefinitionExtended;
|
|
27
28
|
/**
|
|
28
29
|
* @alpha
|
|
29
30
|
* This is going to be used for sync components through a server.
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ export const Name = components.Name(engine);
|
|
|
29
29
|
export const Tween = /* @__PURE__*/ components.Tween(engine);
|
|
30
30
|
export const VirtualCamera = /* @__PURE__*/ components.VirtualCamera(engine);
|
|
31
31
|
export const InputModifier = /* @__PURE__*/ components.InputModifier(engine);
|
|
32
|
+
export const LightSource = /* @__PURE__*/ components.LightSource(engine);
|
|
32
33
|
/**
|
|
33
34
|
* @alpha
|
|
34
35
|
* This is going to be used for sync components through a server.
|
|
@@ -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,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineLightSourceComponent = void 0;
|
|
4
|
+
const index_gen_1 = require("../generated/index.gen");
|
|
5
|
+
const LightSourceHelper = {
|
|
6
|
+
Point(point) {
|
|
7
|
+
return {
|
|
8
|
+
$case: 'point',
|
|
9
|
+
point
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
Spot(spot) {
|
|
13
|
+
return {
|
|
14
|
+
$case: 'spot',
|
|
15
|
+
spot
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
function defineLightSourceComponent(engine) {
|
|
20
|
+
const theComponent = (0, index_gen_1.LightSource)(engine);
|
|
21
|
+
return {
|
|
22
|
+
...theComponent,
|
|
23
|
+
Type: LightSourceHelper
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.defineLightSourceComponent = defineLightSourceComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LightSourceSchema = void 0;
|
|
4
|
+
const light_source_gen_1 = require("./pb/decentraland/sdk/components/light_source.gen");
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
exports.LightSourceSchema = {
|
|
9
|
+
COMPONENT_ID: 1079,
|
|
10
|
+
serialize(value, builder) {
|
|
11
|
+
const writer = light_source_gen_1.PBLightSource.encode(value);
|
|
12
|
+
const buffer = new Uint8Array(writer.finish(), 0, writer.len);
|
|
13
|
+
builder.writeBuffer(buffer, false);
|
|
14
|
+
},
|
|
15
|
+
deserialize(reader) {
|
|
16
|
+
return light_source_gen_1.PBLightSource.decode(reader.buffer(), reader.remainingBytes());
|
|
17
|
+
},
|
|
18
|
+
create() {
|
|
19
|
+
// TODO: this is a hack.
|
|
20
|
+
return light_source_gen_1.PBLightSource.decode(new Uint8Array());
|
|
21
|
+
},
|
|
22
|
+
jsonSchema: {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: {},
|
|
25
|
+
serializationType: "protocol-buffer",
|
|
26
|
+
protocolBuffer: "PBLightSource"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -17,6 +17,7 @@ import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container
|
|
|
17
17
|
import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
18
18
|
import { PBGltfNodeModifiers } from './pb/decentraland/sdk/components/gltf_node_modifiers.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 { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
|
|
22
23
|
import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
@@ -60,6 +61,7 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
60
61
|
/** @public */ export declare const GltfContainerLoadingState: LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>;
|
|
61
62
|
/** @public */ export declare const GltfNodeModifiers: LastWriteWinElementSetComponentDefinition<PBGltfNodeModifiers>;
|
|
62
63
|
/** @public */ export declare const InputModifier: LastWriteWinElementSetComponentDefinition<PBInputModifier>;
|
|
64
|
+
/** @public */ export declare const LightSource: LastWriteWinElementSetComponentDefinition<PBLightSource>;
|
|
63
65
|
/** @public */ export declare const MainCamera: LastWriteWinElementSetComponentDefinition<PBMainCamera>;
|
|
64
66
|
/** @public */ export declare const NftShape: LastWriteWinElementSetComponentDefinition<PBNftShape>;
|
|
65
67
|
/** @public */ export declare const PlayerIdentityData: LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>;
|
|
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.NftShape = exports.MainCamera = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarModifierArea = exports.AvatarEquippedData = exports.AvatarEmoteCommand = exports.AvatarBase = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.AudioEvent = void 0;
|
|
29
|
+
exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.NftShape = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarModifierArea = exports.AvatarEquippedData = exports.AvatarEmoteCommand = exports.AvatarBase = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.AudioEvent = void 0;
|
|
30
30
|
const initialization_1 = require("../../runtime/initialization");
|
|
31
31
|
const components = __importStar(require("./index.gen"));
|
|
32
32
|
__exportStar(require("./index.gen"), exports);
|
|
@@ -47,6 +47,7 @@ __exportStar(require("./index.gen"), exports);
|
|
|
47
47
|
/** @public */ exports.GltfContainerLoadingState = components.GltfContainerLoadingState(initialization_1.engine);
|
|
48
48
|
/** @public */ exports.GltfNodeModifiers = components.GltfNodeModifiers(initialization_1.engine);
|
|
49
49
|
/** @public */ exports.InputModifier = components.InputModifier(initialization_1.engine);
|
|
50
|
+
/** @public */ exports.LightSource = components.LightSource(initialization_1.engine);
|
|
50
51
|
/** @public */ exports.MainCamera = components.MainCamera(initialization_1.engine);
|
|
51
52
|
/** @public */ exports.NftShape = components.NftShape(initialization_1.engine);
|
|
52
53
|
/** @public */ exports.PlayerIdentityData = components.PlayerIdentityData(initialization_1.engine);
|
|
@@ -18,6 +18,7 @@ import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container
|
|
|
18
18
|
import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
19
19
|
import { PBGltfNodeModifiers } from './pb/decentraland/sdk/components/gltf_node_modifiers.gen';
|
|
20
20
|
import { PBInputModifier } from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
21
|
+
import { PBLightSource } from './pb/decentraland/sdk/components/light_source.gen';
|
|
21
22
|
import { PBMainCamera } from './pb/decentraland/sdk/components/main_camera.gen';
|
|
22
23
|
import { PBMaterial } from './pb/decentraland/sdk/components/material.gen';
|
|
23
24
|
import { PBMeshCollider } from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
@@ -66,6 +67,7 @@ export * from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
|
66
67
|
export * from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
67
68
|
export * from './pb/decentraland/sdk/components/gltf_node_modifiers.gen';
|
|
68
69
|
export * from './pb/decentraland/sdk/components/input_modifier.gen';
|
|
70
|
+
export * from './pb/decentraland/sdk/components/light_source.gen';
|
|
69
71
|
export * from './pb/decentraland/sdk/components/main_camera.gen';
|
|
70
72
|
export * from './pb/decentraland/sdk/components/material.gen';
|
|
71
73
|
export * from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
@@ -116,6 +118,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
116
118
|
/** @public */ export declare const GltfContainerLoadingState: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
|
117
119
|
/** @public */ export declare const GltfNodeModifiers: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfNodeModifiers>>;
|
|
118
120
|
/** @public */ export declare const InputModifier: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
|
|
121
|
+
/** @public */ export declare const LightSource: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBLightSource>>;
|
|
119
122
|
/** @public */ export declare const MainCamera: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMainCamera>>;
|
|
120
123
|
/** @public */ export declare const Material: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
121
124
|
/** @public */ export declare const MeshCollider: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
@@ -166,6 +169,7 @@ export declare const componentDefinitionByName: {
|
|
|
166
169
|
"core::GltfContainerLoadingState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
|
167
170
|
"core::GltfNodeModifiers": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfNodeModifiers>>;
|
|
168
171
|
"core::InputModifier": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
|
|
172
|
+
"core::LightSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBLightSource>>;
|
|
169
173
|
"core::MainCamera": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMainCamera>>;
|
|
170
174
|
"core::Material": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
|
|
171
175
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
@@ -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.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.Tween = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.NftShape = exports.MeshRenderer = exports.MeshCollider = exports.Material = exports.MainCamera = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarModifierArea = exports.AvatarEquippedData = exports.AvatarEmoteCommand = exports.AvatarBase = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.AudioEvent = exports.Animator = void 0;
|
|
17
|
+
exports.componentDefinitionByName = exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.Tween = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.NftShape = exports.MeshRenderer = exports.MeshCollider = exports.Material = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarModifierArea = exports.AvatarEquippedData = exports.AvatarEmoteCommand = exports.AvatarBase = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.AudioEvent = exports.Animator = void 0;
|
|
18
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");
|
|
@@ -33,6 +33,7 @@ const GltfContainer_gen_1 = require("./GltfContainer.gen");
|
|
|
33
33
|
const GltfContainerLoadingState_gen_1 = require("./GltfContainerLoadingState.gen");
|
|
34
34
|
const GltfNodeModifiers_gen_1 = require("./GltfNodeModifiers.gen");
|
|
35
35
|
const InputModifier_gen_1 = require("./InputModifier.gen");
|
|
36
|
+
const LightSource_gen_1 = require("./LightSource.gen");
|
|
36
37
|
const MainCamera_gen_1 = require("./MainCamera.gen");
|
|
37
38
|
const Material_gen_1 = require("./Material.gen");
|
|
38
39
|
const MeshCollider_gen_1 = require("./MeshCollider.gen");
|
|
@@ -81,6 +82,7 @@ __exportStar(require("./pb/decentraland/sdk/components/gltf_container.gen"), exp
|
|
|
81
82
|
__exportStar(require("./pb/decentraland/sdk/components/gltf_container_loading_state.gen"), exports);
|
|
82
83
|
__exportStar(require("./pb/decentraland/sdk/components/gltf_node_modifiers.gen"), exports);
|
|
83
84
|
__exportStar(require("./pb/decentraland/sdk/components/input_modifier.gen"), exports);
|
|
85
|
+
__exportStar(require("./pb/decentraland/sdk/components/light_source.gen"), exports);
|
|
84
86
|
__exportStar(require("./pb/decentraland/sdk/components/main_camera.gen"), exports);
|
|
85
87
|
__exportStar(require("./pb/decentraland/sdk/components/material.gen"), exports);
|
|
86
88
|
__exportStar(require("./pb/decentraland/sdk/components/mesh_collider.gen"), exports);
|
|
@@ -169,6 +171,9 @@ exports.GltfNodeModifiers = GltfNodeModifiers;
|
|
|
169
171
|
/** @public */ const InputModifier = engine =>
|
|
170
172
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::InputModifier", InputModifier_gen_1.InputModifierSchema);
|
|
171
173
|
exports.InputModifier = InputModifier;
|
|
174
|
+
/** @public */ const LightSource = engine =>
|
|
175
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::LightSource", LightSource_gen_1.LightSourceSchema);
|
|
176
|
+
exports.LightSource = LightSource;
|
|
172
177
|
/** @public */ const MainCamera = engine =>
|
|
173
178
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::MainCamera", MainCamera_gen_1.MainCameraSchema);
|
|
174
179
|
exports.MainCamera = MainCamera;
|
|
@@ -283,6 +288,7 @@ exports.componentDefinitionByName = {
|
|
|
283
288
|
"core::GltfContainerLoadingState": exports.GltfContainerLoadingState,
|
|
284
289
|
"core::GltfNodeModifiers": exports.GltfNodeModifiers,
|
|
285
290
|
"core::InputModifier": exports.InputModifier,
|
|
291
|
+
"core::LightSource": exports.LightSource,
|
|
286
292
|
"core::MainCamera": exports.MainCamera,
|
|
287
293
|
"core::Material": exports.Material,
|
|
288
294
|
"core::MeshCollider": exports.MeshCollider,
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
intensity?: number | undefined;
|
|
14
|
+
/** default = 0, how far the light travels, expressed in meters. If left at 0 will be computed automatically */
|
|
15
|
+
range?: number | undefined;
|
|
16
|
+
/** default = false, whether the light casts shadows or not. */
|
|
17
|
+
shadow?: boolean | undefined;
|
|
18
|
+
/** Texture mask through which shadows are cast to simulate caustics, soft shadows, and light shapes such as light entering from a window. */
|
|
19
|
+
shadowMaskTexture?: TextureUnion | undefined;
|
|
20
|
+
type?: {
|
|
21
|
+
$case: "point";
|
|
22
|
+
point: PBLightSource_Point;
|
|
23
|
+
} | {
|
|
24
|
+
$case: "spot";
|
|
25
|
+
spot: PBLightSource_Spot;
|
|
26
|
+
} | undefined;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export interface PBLightSource_Point {
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export interface PBLightSource_Spot {
|
|
37
|
+
/** 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. */
|
|
38
|
+
innerAngle?: number | undefined;
|
|
39
|
+
/** 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. */
|
|
40
|
+
outerAngle?: number | undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export declare namespace PBLightSource {
|
|
46
|
+
function encode(message: PBLightSource, writer?: _m0.Writer): _m0.Writer;
|
|
47
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBLightSource;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export declare namespace PBLightSource_Point {
|
|
53
|
+
function encode(_: PBLightSource_Point, writer?: _m0.Writer): _m0.Writer;
|
|
54
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBLightSource_Point;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
export declare namespace PBLightSource_Spot {
|
|
60
|
+
function encode(message: PBLightSource_Spot, writer?: _m0.Writer): _m0.Writer;
|
|
61
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBLightSource_Spot;
|
|
62
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
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.PBLightSource_Spot = exports.PBLightSource_Point = exports.PBLightSource = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
|
+
const colors_gen_1 = require("../../common/colors.gen");
|
|
10
|
+
const texture_gen_1 = require("../../common/texture.gen");
|
|
11
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
12
|
+
function createBasePBLightSource() {
|
|
13
|
+
return {
|
|
14
|
+
active: undefined,
|
|
15
|
+
color: undefined,
|
|
16
|
+
intensity: undefined,
|
|
17
|
+
range: undefined,
|
|
18
|
+
shadow: undefined,
|
|
19
|
+
shadowMaskTexture: undefined,
|
|
20
|
+
type: undefined,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
var PBLightSource;
|
|
27
|
+
(function (PBLightSource) {
|
|
28
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
29
|
+
if (message.active !== undefined) {
|
|
30
|
+
writer.uint32(8).bool(message.active);
|
|
31
|
+
}
|
|
32
|
+
if (message.color !== undefined) {
|
|
33
|
+
colors_gen_1.Color3.encode(message.color, writer.uint32(18).fork()).ldelim();
|
|
34
|
+
}
|
|
35
|
+
if (message.intensity !== undefined) {
|
|
36
|
+
writer.uint32(29).float(message.intensity);
|
|
37
|
+
}
|
|
38
|
+
if (message.range !== undefined) {
|
|
39
|
+
writer.uint32(37).float(message.range);
|
|
40
|
+
}
|
|
41
|
+
if (message.shadow !== undefined) {
|
|
42
|
+
writer.uint32(40).bool(message.shadow);
|
|
43
|
+
}
|
|
44
|
+
if (message.shadowMaskTexture !== undefined) {
|
|
45
|
+
texture_gen_1.TextureUnion.encode(message.shadowMaskTexture, writer.uint32(50).fork()).ldelim();
|
|
46
|
+
}
|
|
47
|
+
switch (message.type?.$case) {
|
|
48
|
+
case "point":
|
|
49
|
+
PBLightSource_Point.encode(message.type.point, writer.uint32(58).fork()).ldelim();
|
|
50
|
+
break;
|
|
51
|
+
case "spot":
|
|
52
|
+
PBLightSource_Spot.encode(message.type.spot, writer.uint32(66).fork()).ldelim();
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
return writer;
|
|
56
|
+
}
|
|
57
|
+
PBLightSource.encode = encode;
|
|
58
|
+
function decode(input, length) {
|
|
59
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
60
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
61
|
+
const message = createBasePBLightSource();
|
|
62
|
+
while (reader.pos < end) {
|
|
63
|
+
const tag = reader.uint32();
|
|
64
|
+
switch (tag >>> 3) {
|
|
65
|
+
case 1:
|
|
66
|
+
if (tag !== 8) {
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
message.active = reader.bool();
|
|
70
|
+
continue;
|
|
71
|
+
case 2:
|
|
72
|
+
if (tag !== 18) {
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
message.color = colors_gen_1.Color3.decode(reader, reader.uint32());
|
|
76
|
+
continue;
|
|
77
|
+
case 3:
|
|
78
|
+
if (tag !== 29) {
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
message.intensity = reader.float();
|
|
82
|
+
continue;
|
|
83
|
+
case 4:
|
|
84
|
+
if (tag !== 37) {
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
message.range = reader.float();
|
|
88
|
+
continue;
|
|
89
|
+
case 5:
|
|
90
|
+
if (tag !== 40) {
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
message.shadow = reader.bool();
|
|
94
|
+
continue;
|
|
95
|
+
case 6:
|
|
96
|
+
if (tag !== 50) {
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
message.shadowMaskTexture = texture_gen_1.TextureUnion.decode(reader, reader.uint32());
|
|
100
|
+
continue;
|
|
101
|
+
case 7:
|
|
102
|
+
if (tag !== 58) {
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
message.type = { $case: "point", point: PBLightSource_Point.decode(reader, reader.uint32()) };
|
|
106
|
+
continue;
|
|
107
|
+
case 8:
|
|
108
|
+
if (tag !== 66) {
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
message.type = { $case: "spot", spot: PBLightSource_Spot.decode(reader, reader.uint32()) };
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
reader.skipType(tag & 7);
|
|
118
|
+
}
|
|
119
|
+
return message;
|
|
120
|
+
}
|
|
121
|
+
PBLightSource.decode = decode;
|
|
122
|
+
})(PBLightSource = exports.PBLightSource || (exports.PBLightSource = {}));
|
|
123
|
+
function createBasePBLightSource_Point() {
|
|
124
|
+
return {};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
var PBLightSource_Point;
|
|
130
|
+
(function (PBLightSource_Point) {
|
|
131
|
+
function encode(_, writer = minimal_1.default.Writer.create()) {
|
|
132
|
+
return writer;
|
|
133
|
+
}
|
|
134
|
+
PBLightSource_Point.encode = encode;
|
|
135
|
+
function decode(input, length) {
|
|
136
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
137
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
138
|
+
const message = createBasePBLightSource_Point();
|
|
139
|
+
while (reader.pos < end) {
|
|
140
|
+
const tag = reader.uint32();
|
|
141
|
+
switch (tag >>> 3) {
|
|
142
|
+
}
|
|
143
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
reader.skipType(tag & 7);
|
|
147
|
+
}
|
|
148
|
+
return message;
|
|
149
|
+
}
|
|
150
|
+
PBLightSource_Point.decode = decode;
|
|
151
|
+
})(PBLightSource_Point = exports.PBLightSource_Point || (exports.PBLightSource_Point = {}));
|
|
152
|
+
function createBasePBLightSource_Spot() {
|
|
153
|
+
return { innerAngle: undefined, outerAngle: undefined };
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
158
|
+
var PBLightSource_Spot;
|
|
159
|
+
(function (PBLightSource_Spot) {
|
|
160
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
161
|
+
if (message.innerAngle !== undefined) {
|
|
162
|
+
writer.uint32(77).float(message.innerAngle);
|
|
163
|
+
}
|
|
164
|
+
if (message.outerAngle !== undefined) {
|
|
165
|
+
writer.uint32(85).float(message.outerAngle);
|
|
166
|
+
}
|
|
167
|
+
return writer;
|
|
168
|
+
}
|
|
169
|
+
PBLightSource_Spot.encode = encode;
|
|
170
|
+
function decode(input, length) {
|
|
171
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
172
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
173
|
+
const message = createBasePBLightSource_Spot();
|
|
174
|
+
while (reader.pos < end) {
|
|
175
|
+
const tag = reader.uint32();
|
|
176
|
+
switch (tag >>> 3) {
|
|
177
|
+
case 9:
|
|
178
|
+
if (tag !== 77) {
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
message.innerAngle = reader.float();
|
|
182
|
+
continue;
|
|
183
|
+
case 10:
|
|
184
|
+
if (tag !== 85) {
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
message.outerAngle = reader.float();
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
reader.skipType(tag & 7);
|
|
194
|
+
}
|
|
195
|
+
return message;
|
|
196
|
+
}
|
|
197
|
+
PBLightSource_Spot.decode = decode;
|
|
198
|
+
})(PBLightSource_Spot = exports.PBLightSource_Spot || (exports.PBLightSource_Spot = {}));
|
package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { CameraTransition } from "./common/camera_transition.gen";
|
|
|
6
6
|
* an 'instant' transition (like using speed/time = 0)
|
|
7
7
|
* * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
|
|
8
8
|
* the holding entity transform).
|
|
9
|
+
* * The fov defines the Field of View of the virtual camera
|
|
9
10
|
*/
|
|
10
11
|
/**
|
|
11
12
|
* @public
|
|
@@ -13,6 +14,8 @@ import { CameraTransition } from "./common/camera_transition.gen";
|
|
|
13
14
|
export interface PBVirtualCamera {
|
|
14
15
|
defaultTransition?: CameraTransition | undefined;
|
|
15
16
|
lookAtEntity?: number | undefined;
|
|
17
|
+
/** default: 60 */
|
|
18
|
+
fov?: number | undefined;
|
|
16
19
|
}
|
|
17
20
|
/**
|
|
18
21
|
* @public
|
|
@@ -9,7 +9,7 @@ const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
|
9
9
|
const camera_transition_gen_1 = require("./common/camera_transition.gen");
|
|
10
10
|
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
11
11
|
function createBasePBVirtualCamera() {
|
|
12
|
-
return { defaultTransition: undefined, lookAtEntity: undefined };
|
|
12
|
+
return { defaultTransition: undefined, lookAtEntity: undefined, fov: undefined };
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* @public
|
|
@@ -23,6 +23,9 @@ var PBVirtualCamera;
|
|
|
23
23
|
if (message.lookAtEntity !== undefined) {
|
|
24
24
|
writer.uint32(16).uint32(message.lookAtEntity);
|
|
25
25
|
}
|
|
26
|
+
if (message.fov !== undefined) {
|
|
27
|
+
writer.uint32(29).float(message.fov);
|
|
28
|
+
}
|
|
26
29
|
return writer;
|
|
27
30
|
}
|
|
28
31
|
PBVirtualCamera.encode = encode;
|
|
@@ -45,6 +48,12 @@ var PBVirtualCamera;
|
|
|
45
48
|
}
|
|
46
49
|
message.lookAtEntity = reader.uint32();
|
|
47
50
|
continue;
|
|
51
|
+
case 3:
|
|
52
|
+
if (tag !== 29) {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
message.fov = reader.float();
|
|
56
|
+
continue;
|
|
48
57
|
}
|
|
49
58
|
if ((tag & 7) === 4 || tag === 0) {
|
|
50
59
|
break;
|
|
@@ -16,6 +16,7 @@ import { AudioStreamComponentDefinitionExtended } from './extended/AudioStream';
|
|
|
16
16
|
import { MediaState } from './generated/pb/decentraland/sdk/components/common/media_state.gen';
|
|
17
17
|
import { VirtualCameraComponentDefinitionExtended } from './extended/VirtualCamera';
|
|
18
18
|
import { InputModifierComponentDefinitionExtended } from './extended/InputModifier';
|
|
19
|
+
import { LightSourceComponentDefinitionExtended } from './extended/LightSource';
|
|
19
20
|
export * from './generated/index.gen';
|
|
20
21
|
export type { GrowOnlyValueSetComponentDefinition, LastWriteWinElementSetComponentDefinition, LwwComponentGetter, GSetComponentGetter };
|
|
21
22
|
export declare const Transform: LwwComponentGetter<TransformComponentExtended>;
|
|
@@ -28,6 +29,7 @@ export declare const MeshCollider: LwwComponentGetter<MeshColliderComponentDefin
|
|
|
28
29
|
export declare const Tween: LwwComponentGetter<TweenComponentDefinitionExtended>;
|
|
29
30
|
export declare const VirtualCamera: LwwComponentGetter<VirtualCameraComponentDefinitionExtended>;
|
|
30
31
|
export declare const InputModifier: LwwComponentGetter<InputModifierComponentDefinitionExtended>;
|
|
32
|
+
export declare const LightSource: LwwComponentGetter<LightSourceComponentDefinitionExtended>;
|
|
31
33
|
/**
|
|
32
34
|
* @alpha
|
|
33
35
|
*/
|
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.MediaState = exports.NetworkParent = exports.NetworkEntity = exports.SyncComponents = exports.Name = exports.InputModifier = exports.VirtualCamera = exports.Tween = exports.MeshCollider = exports.MeshRenderer = exports.AudioStream = exports.AudioSource = exports.Animator = exports.Material = exports.Transform = void 0;
|
|
20
|
+
exports.MediaState = exports.NetworkParent = exports.NetworkEntity = exports.SyncComponents = exports.Name = exports.LightSource = exports.InputModifier = exports.VirtualCamera = exports.Tween = exports.MeshCollider = exports.MeshRenderer = exports.AudioStream = exports.AudioSource = exports.Animator = exports.Material = exports.Transform = void 0;
|
|
21
21
|
const Animator_1 = require("./extended/Animator");
|
|
22
22
|
const AudioSource_1 = require("./extended/AudioSource");
|
|
23
23
|
const Material_1 = require("./extended/Material");
|
|
@@ -34,6 +34,7 @@ const media_state_gen_1 = require("./generated/pb/decentraland/sdk/components/co
|
|
|
34
34
|
Object.defineProperty(exports, "MediaState", { enumerable: true, get: function () { return media_state_gen_1.MediaState; } });
|
|
35
35
|
const VirtualCamera_1 = require("./extended/VirtualCamera");
|
|
36
36
|
const InputModifier_1 = require("./extended/InputModifier");
|
|
37
|
+
const LightSource_1 = require("./extended/LightSource");
|
|
37
38
|
__exportStar(require("./generated/index.gen"), exports);
|
|
38
39
|
/* @__PURE__ */
|
|
39
40
|
const Transform = (engine) => (0, Transform_1.defineTransformComponent)(engine);
|
|
@@ -65,6 +66,9 @@ exports.VirtualCamera = VirtualCamera;
|
|
|
65
66
|
/* @__PURE__*/
|
|
66
67
|
const InputModifier = (engine) => (0, InputModifier_1.defineInputModifierComponent)(engine);
|
|
67
68
|
exports.InputModifier = InputModifier;
|
|
69
|
+
/* @__PURE__*/
|
|
70
|
+
const LightSource = (engine) => (0, LightSource_1.defineLightSourceComponent)(engine);
|
|
71
|
+
exports.LightSource = LightSource;
|
|
68
72
|
/**
|
|
69
73
|
* @alpha
|
|
70
74
|
*/
|
|
@@ -12,3 +12,4 @@ export type { ISyncComponents, ISyncComponentsType } from './manual/SyncComponen
|
|
|
12
12
|
export type { INetowrkEntity, INetowrkEntityType } from './manual/NetworkEntity';
|
|
13
13
|
export type { INetowrkParent, INetowrkParentType } from './manual/NetworkParent';
|
|
14
14
|
export type { InputModifierHelper, InputModifierComponentDefinitionExtended } from './extended/InputModifier';
|
|
15
|
+
export type { LightSourceHelper, LightSourceComponentDefinitionExtended } from './extended/LightSource';
|
package/dist-cjs/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export * from './systems/async-task';
|
|
|
11
11
|
export * from './systems/tween';
|
|
12
12
|
export * from './engine/entity';
|
|
13
13
|
export * from './components/types';
|
|
14
|
-
import { MaterialComponentDefinitionExtended, MeshColliderComponentDefinitionExtended, MeshRendererComponentDefinitionExtended, TransformComponentExtended, AnimatorComponentDefinitionExtended, AudioSourceComponentDefinitionExtended, AudioStreamComponentDefinitionExtended, ISyncComponents, TweenComponentDefinitionExtended, INetowrkEntity, INetowrkParent, VirtualCameraComponentDefinitionExtended, InputModifierComponentDefinitionExtended } from './components/types';
|
|
14
|
+
import { MaterialComponentDefinitionExtended, MeshColliderComponentDefinitionExtended, MeshRendererComponentDefinitionExtended, TransformComponentExtended, AnimatorComponentDefinitionExtended, AudioSourceComponentDefinitionExtended, AudioStreamComponentDefinitionExtended, ISyncComponents, TweenComponentDefinitionExtended, INetowrkEntity, INetowrkParent, VirtualCameraComponentDefinitionExtended, InputModifierComponentDefinitionExtended, LightSourceComponentDefinitionExtended } from './components/types';
|
|
15
15
|
import { NameComponent } from './components/manual/Name';
|
|
16
16
|
export declare const Transform: TransformComponentExtended;
|
|
17
17
|
export declare const Animator: AnimatorComponentDefinitionExtended;
|
|
@@ -24,6 +24,7 @@ export declare const Name: NameComponent;
|
|
|
24
24
|
export declare const Tween: TweenComponentDefinitionExtended;
|
|
25
25
|
export declare const VirtualCamera: VirtualCameraComponentDefinitionExtended;
|
|
26
26
|
export declare const InputModifier: InputModifierComponentDefinitionExtended;
|
|
27
|
+
export declare const LightSource: LightSourceComponentDefinitionExtended;
|
|
27
28
|
/**
|
|
28
29
|
* @alpha
|
|
29
30
|
* This is going to be used for sync components through a server.
|
package/dist-cjs/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.NetworkParent = exports.NetworkEntity = exports.SyncComponents = exports.InputModifier = exports.VirtualCamera = exports.Tween = exports.Name = exports.MeshCollider = exports.MeshRenderer = exports.Material = exports.AudioStream = exports.AudioSource = exports.Animator = exports.Transform = exports.components = exports.cyclicParentingChecker = void 0;
|
|
29
|
+
exports.NetworkParent = exports.NetworkEntity = exports.SyncComponents = exports.LightSource = exports.InputModifier = exports.VirtualCamera = exports.Tween = exports.Name = exports.MeshCollider = exports.MeshRenderer = exports.Material = exports.AudioStream = exports.AudioSource = exports.Animator = exports.Transform = exports.components = exports.cyclicParentingChecker = void 0;
|
|
30
30
|
// The order of the following imports matters. Please do not auto-sort
|
|
31
31
|
__exportStar(require("./engine"), exports);
|
|
32
32
|
__exportStar(require("./schemas"), exports);
|
|
@@ -58,6 +58,7 @@ exports.Name = components.Name(initialization_1.engine);
|
|
|
58
58
|
exports.Tween = components.Tween(initialization_1.engine);
|
|
59
59
|
exports.VirtualCamera = components.VirtualCamera(initialization_1.engine);
|
|
60
60
|
exports.InputModifier = components.InputModifier(initialization_1.engine);
|
|
61
|
+
exports.LightSource = components.LightSource(initialization_1.engine);
|
|
61
62
|
/**
|
|
62
63
|
* @alpha
|
|
63
64
|
* This is going to be used for sync components through a server.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/ecs",
|
|
3
3
|
"description": "Decentraland ECS",
|
|
4
|
-
"version": "7.9.3-
|
|
4
|
+
"version": "7.9.3-16616194522.commit-20ff207",
|
|
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": "20ff207b3b50a0af06592f5794b40563fa445601"
|
|
37
37
|
}
|