@dcl/protocol 1.0.0-10919819572.commit-895432a → 1.0.0-10919854686.commit-9aef674

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.
@@ -2,12 +2,12 @@ import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "decentraland.sdk.components";
3
3
  /**
4
4
  * a GltfNode links a scene entity with a node from within a gltf, allowing the scene to inspect it or modify it.
5
- * This component must be added to a direct child of an entity with a PbGltfContainer component, or
5
+ * This component must be added to a direct child of an entity with a PBGltfContainer component, or
6
6
  * to a direct child of another entity with a GltfNode component, and the referenced gltf node must be a descendent of the gltf node
7
7
  * in the parent.
8
8
  * The name must match the path of one of the nodes within the Gltf. These are available on the GltfContainerLoadingState component.
9
9
  *
10
- * The renderer will attach a PbGltfNodeState to the entity describing the state. Once the state is `GNS_READY`,
10
+ * The renderer will attach a PBGltfNodeState to the entity describing the state. Once the state is `GNS_READY`,
11
11
  * - the `Transform` will be updated to match the position of the node within the gltf (relative to the gltf root, or the parent node),
12
12
  * - a `MeshRenderer` with a GltfMesh mesh type will be added (if the gltf node has a mesh).
13
13
  * - a `MeshCollider` with a GltfMesh mesh type will be added (if the gltf node has a collider).
@@ -24,7 +24,7 @@ export declare const protobufPackage = "decentraland.sdk.components";
24
24
  * - `MeshCollider` can be added/modified/removed to create/modify/remove a collider on the node.
25
25
  * - `Material` can be added or modified to change the material properties. If the gltf node has a material, the original material will be
26
26
  * used as a base, and any gltf features (e.g. occlusion maps) from the gtlf spec that the renderer supports but that are not exposed in the
27
- * PbMaterial will be maintained.
27
+ * PBMaterial will be maintained.
28
28
  *
29
29
  * The scene can add additional entities as children to the gltf node, but structural modifications of the gltf are not possible:
30
30
  * - changing the scene hierarchy will not change the gltf node hierarchy. Moving the entity out of the gltf will sever the link and
@@ -5,12 +5,12 @@ export const protobufPackage = "decentraland.sdk.components";
5
5
 
6
6
  /**
7
7
  * a GltfNode links a scene entity with a node from within a gltf, allowing the scene to inspect it or modify it.
8
- * This component must be added to a direct child of an entity with a PbGltfContainer component, or
8
+ * This component must be added to a direct child of an entity with a PBGltfContainer component, or
9
9
  * to a direct child of another entity with a GltfNode component, and the referenced gltf node must be a descendent of the gltf node
10
10
  * in the parent.
11
11
  * The name must match the path of one of the nodes within the Gltf. These are available on the GltfContainerLoadingState component.
12
12
  *
13
- * The renderer will attach a PbGltfNodeState to the entity describing the state. Once the state is `GNS_READY`,
13
+ * The renderer will attach a PBGltfNodeState to the entity describing the state. Once the state is `GNS_READY`,
14
14
  * - the `Transform` will be updated to match the position of the node within the gltf (relative to the gltf root, or the parent node),
15
15
  * - a `MeshRenderer` with a GltfMesh mesh type will be added (if the gltf node has a mesh).
16
16
  * - a `MeshCollider` with a GltfMesh mesh type will be added (if the gltf node has a collider).
@@ -27,7 +27,7 @@ export const protobufPackage = "decentraland.sdk.components";
27
27
  * - `MeshCollider` can be added/modified/removed to create/modify/remove a collider on the node.
28
28
  * - `Material` can be added or modified to change the material properties. If the gltf node has a material, the original material will be
29
29
  * used as a base, and any gltf features (e.g. occlusion maps) from the gtlf spec that the renderer supports but that are not exposed in the
30
- * PbMaterial will be maintained.
30
+ * PBMaterial will be maintained.
31
31
  *
32
32
  * The scene can add additional entities as children to the gltf node, but structural modifications of the gltf are not possible:
33
33
  * - changing the scene hierarchy will not change the gltf node hierarchy. Moving the entity out of the gltf will sever the link and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/protocol",
3
- "version": "1.0.0-10919819572.commit-895432a",
3
+ "version": "1.0.0-10919854686.commit-9aef674",
4
4
  "description": "",
5
5
  "repository": "decentraland/protocol.git",
6
6
  "homepage": "https://github.com/decentraland/protocol#readme",
@@ -29,5 +29,5 @@
29
29
  "out-js",
30
30
  "public"
31
31
  ],
32
- "commit": "895432afa98758cc917cd2f0a75b473dc3f367ab"
32
+ "commit": "9aef67442200142928316b03f21b06a67e5f3ce7"
33
33
  }
@@ -0,0 +1,22 @@
1
+ syntax = "proto3";
2
+ package decentraland.sdk.components;
3
+
4
+ import "decentraland/common/colors.proto";
5
+ import "decentraland/common/vectors.proto";
6
+
7
+ import "decentraland/sdk/components/common/id.proto";
8
+ option (common.ecs_component_id) = 1206;
9
+
10
+ // defines the global scene light settings. must be added to the scene root.
11
+ // to control sunlight color, intensity, shadows etc, you can also add a PBLight to the scene root.
12
+ message PBGlobalLight {
13
+ // the direction the directional light shines in.
14
+ // default depends on time of day and explorer implementation
15
+ optional decentraland.common.Vector3 direction = 1;
16
+ // ambient light color
17
+ // default: White
18
+ optional decentraland.common.Color3 ambient_color = 2;
19
+ // ambient light intensity. the explorer default ambient brightness is multiplied by this non-physical quantity.
20
+ // default 1
21
+ optional float ambient_brightness = 3;
22
+ }
@@ -5,12 +5,12 @@ import "decentraland/sdk/components/common/id.proto";
5
5
  option (common.ecs_component_id) = 1200;
6
6
 
7
7
  // a GltfNode links a scene entity with a node from within a gltf, allowing the scene to inspect it or modify it.
8
- // This component must be added to a direct child of an entity with a PbGltfContainer component, or
8
+ // This component must be added to a direct child of an entity with a PBGltfContainer component, or
9
9
  // to a direct child of another entity with a GltfNode component, and the referenced gltf node must be a descendent of the gltf node
10
10
  // in the parent.
11
11
  // The name must match the path of one of the nodes within the Gltf. These are available on the GltfContainerLoadingState component.
12
12
  //
13
- // The renderer will attach a PbGltfNodeState to the entity describing the state. Once the state is `GNS_READY`,
13
+ // The renderer will attach a PBGltfNodeState to the entity describing the state. Once the state is `GNS_READY`,
14
14
  // - the `Transform` will be updated to match the position of the node within the gltf (relative to the gltf root, or the parent node),
15
15
  // - a `MeshRenderer` with a GltfMesh mesh type will be added (if the gltf node has a mesh).
16
16
  // - a `MeshCollider` with a GltfMesh mesh type will be added (if the gltf node has a collider).
@@ -27,7 +27,7 @@ option (common.ecs_component_id) = 1200;
27
27
  // - `MeshCollider` can be added/modified/removed to create/modify/remove a collider on the node.
28
28
  // - `Material` can be added or modified to change the material properties. If the gltf node has a material, the original material will be
29
29
  // used as a base, and any gltf features (e.g. occlusion maps) from the gtlf spec that the renderer supports but that are not exposed in the
30
- // PbMaterial will be maintained.
30
+ // PBMaterial will be maintained.
31
31
  //
32
32
  // The scene can add additional entities as children to the gltf node, but structural modifications of the gltf are not possible:
33
33
  // - changing the scene hierarchy will not change the gltf node hierarchy. Moving the entity out of the gltf will sever the link and
@@ -0,0 +1,42 @@
1
+ syntax = "proto3";
2
+ package decentraland.sdk.components;
3
+
4
+ import "decentraland/common/colors.proto";
5
+
6
+ import "decentraland/sdk/components/common/id.proto";
7
+ option (common.ecs_component_id) = 1204;
8
+
9
+ // defines a light source.
10
+ // the world has a default directional light (like sunlight) which can be overridden by adding the light component to the scene root.
11
+ // a PBGlobalLight component can also be added to the root to control the directional light direction.
12
+ // point lights (lightbulbs) or spotlights can be created by attaching the light component to non-root entities.
13
+ message PBLight {
14
+ // whether the light is on
15
+ // default true
16
+ optional bool enabled = 1;
17
+ // light brightness in lux (lumens/m^2).
18
+ //
19
+ // for global directional light, this applies as a constant value at all surfaces and distances (though the effect on the surface still depends on incidence angle).
20
+ // the default global light illuminance varies from 400 (sunrise/sunset) to 10,000 (midday).
21
+ // for typical values, see https://en.wikipedia.org/wiki/Lux#Illuminance
22
+ //
23
+ // for point and spot lights, this is the lumens/m^2 at 1m distance from the light. to transform from raw lumens,
24
+ // divide lumens by ~12 (4*pi).
25
+ // e.g. a 100w household bulb with 1200 lumens would have an illuminance of ~100.
26
+ // a lighthouse bulb with 200,000 lumens would have an illuminance of ~15,000 (ignoring beam reflections)
27
+ //
28
+ // default
29
+ // for point/spotlights: 10,000
30
+ // for global directional light: depends on explorer implementation. may vary on light direction, time of day, etc
31
+ optional float illuminance = 2;
32
+ // whether the light should cast shadows.
33
+ // note: even when set to true the engine may not display shadows, or may only show shadows for a limited number
34
+ // of lights depending on the implementation, platform, and user settings.
35
+ // default
36
+ // for point/spotlights: false / off
37
+ // for global directional light: true / on
38
+ optional bool shadows = 3;
39
+ // light color
40
+ // default White
41
+ optional decentraland.common.Color3 color = 4;
42
+ }
@@ -0,0 +1,21 @@
1
+ syntax = "proto3";
2
+ package decentraland.sdk.components;
3
+
4
+ import "decentraland/sdk/components/common/id.proto";
5
+ option (common.ecs_component_id) = 1205;
6
+
7
+ // defines a spotlight.
8
+ // spotlights are point lights that emit light only in a cone around the transform's forward direction.
9
+ // add this component together with the PBLight component to transform a point light into a spotlight.
10
+ // note that spotlights do not model any internal reflections / focus, they only restrict the area of effect.
11
+ // so for e.g. a torch beam, the bulb illuminance should be multiplied by the solid angle.
12
+ // a typical torch with a beam width of 15 degrees would use outer angle of 0.15 (7.5 degrees in radians),
13
+ // and an illuminance approximately equal to the bulb's lumens, e.g. 1200.
14
+ message PBSpotlight {
15
+ // the cone radius in radians. distance away from forward in which the light is visible.
16
+ // for a torch a value around 0.15 is appropriate.
17
+ float angle = 1;
18
+ // optional angle at which the light is brightest. should be <= outer angle.
19
+ // if specified, the light will fall off smoothly between `inner_angle` and `angle`.
20
+ optional float inner_angle = 2;
21
+ }