@dcl/sdk 7.0.0-3324163949.commit-e6d499f → 7.0.0-3328933314.commit-597ac43
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/ecs7/index.d.ts +27 -12
- package/dist/ecs7/index.js +134 -52
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/dist/ecs7/proto-definitions/material.proto +6 -23
- package/dist/playground/snippets/billboard.ts +4 -1
- package/package.json +4 -4
- package/types/ecs7/index.d.ts +27 -12
@@ -3,23 +3,11 @@ syntax = "proto3";
|
|
3
3
|
package decentraland.sdk.components;
|
4
4
|
|
5
5
|
import "decentraland/common/colors.proto";
|
6
|
+
import "decentraland/common/texture.proto";
|
6
7
|
import "decentraland/sdk/components/common/id.proto";
|
7
8
|
|
8
9
|
option (common.ecs_component_id) = 1017;
|
9
10
|
|
10
|
-
enum TextureWrapMode {
|
11
|
-
TWM_REPEAT = 0;
|
12
|
-
TWM_CLAMP = 1;
|
13
|
-
TWM_MIRROR = 2;
|
14
|
-
TWM_MIRROR_ONCE = 3;
|
15
|
-
}
|
16
|
-
|
17
|
-
enum TextureFilterMode {
|
18
|
-
TFM_POINT = 0;
|
19
|
-
TFM_BILINEAR = 1;
|
20
|
-
TFM_TRILINEAR = 2;
|
21
|
-
}
|
22
|
-
|
23
11
|
enum MaterialTransparencyMode {
|
24
12
|
MTM_OPAQUE = 0;
|
25
13
|
MTM_ALPHA_TEST = 1;
|
@@ -29,19 +17,14 @@ enum MaterialTransparencyMode {
|
|
29
17
|
}
|
30
18
|
|
31
19
|
message PBMaterial {
|
32
|
-
|
33
|
-
|
34
|
-
optional TextureWrapMode wrap_mode = 2; // default = TextureWrapMode.Clamp
|
35
|
-
optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear
|
36
|
-
}
|
37
|
-
|
38
|
-
optional Texture texture = 1; // default = null
|
20
|
+
optional decentraland.common.TextureUnion texture = 1; // default = null
|
21
|
+
|
39
22
|
optional float alpha_test = 2; // default = 0.5. range value: from 0 to 1
|
40
23
|
optional bool cast_shadows = 3; // default = true
|
41
24
|
|
42
|
-
optional
|
43
|
-
optional
|
44
|
-
optional
|
25
|
+
optional decentraland.common.TextureUnion alpha_texture = 4; // default = null
|
26
|
+
optional decentraland.common.TextureUnion emissive_texture = 5; // default = null
|
27
|
+
optional decentraland.common.TextureUnion bump_texture = 6; // default = null
|
45
28
|
|
46
29
|
optional decentraland.common.Color3 albedo_color = 7; // default = white;
|
47
30
|
optional decentraland.common.Color3 emissive_color = 8; // default = black;
|
@@ -2,7 +2,10 @@ function createPlaneTexture(x: number, y: number, z: number): Entity {
|
|
2
2
|
const meshEntity = engine.addEntity()
|
3
3
|
|
4
4
|
Material.create(meshEntity, {
|
5
|
-
texture: {
|
5
|
+
texture: {
|
6
|
+
texture: { src: 'models/polaroid2.png' },
|
7
|
+
avatarTexture: undefined
|
8
|
+
}
|
6
9
|
})
|
7
10
|
Transform.create(meshEntity, {
|
8
11
|
position: { x, y, z },
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dcl/sdk",
|
3
|
-
"version": "7.0.0-
|
3
|
+
"version": "7.0.0-3328933314.commit-597ac43",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/src/index.js",
|
6
6
|
"typings": "dist/index.d.ts",
|
@@ -23,12 +23,12 @@
|
|
23
23
|
"artifacts"
|
24
24
|
],
|
25
25
|
"dependencies": {
|
26
|
-
"@dcl/amd": "6.11.10-
|
27
|
-
"@dcl/build-ecs": "6.11.10-
|
26
|
+
"@dcl/amd": "6.11.10-3328933314.commit-597ac43",
|
27
|
+
"@dcl/build-ecs": "6.11.10-3328933314.commit-597ac43",
|
28
28
|
"@dcl/kernel": "1.0.0-2994874542.commit-c3ae489",
|
29
29
|
"@dcl/posix": "^1.0.4",
|
30
30
|
"@dcl/unity-renderer": "^1.0.40531-20220621125654.commit-472137e"
|
31
31
|
},
|
32
32
|
"minCliVersion": "3.10.2",
|
33
|
-
"commit": "
|
33
|
+
"commit": "597ac43ec24f75271586e818f2f00fb6db63b820"
|
34
34
|
}
|
package/types/ecs7/index.d.ts
CHANGED
@@ -30,6 +30,14 @@ declare const enum AvatarModifierType {
|
|
30
30
|
/** @public */
|
31
31
|
declare const AvatarShape: ComponentDefinition<ISchema<PBAvatarShape>, PBAvatarShape>;
|
32
32
|
|
33
|
+
declare interface AvatarTexture {
|
34
|
+
userId: string;
|
35
|
+
/** default = TextureWrapMode.Clamp */
|
36
|
+
wrapMode?: TextureWrapMode | undefined;
|
37
|
+
/** default = FilterMode.Bilinear */
|
38
|
+
filterMode?: TextureFilterMode | undefined;
|
39
|
+
}
|
40
|
+
|
33
41
|
/** @public */
|
34
42
|
declare const Billboard: ComponentDefinition<ISchema<PBBillboard>, PBBillboard>;
|
35
43
|
|
@@ -2668,17 +2676,17 @@ declare interface PBGltfContainer {
|
|
2668
2676
|
|
2669
2677
|
declare interface PBMaterial {
|
2670
2678
|
/** default = null */
|
2671
|
-
texture?:
|
2679
|
+
texture?: TextureUnion | undefined;
|
2672
2680
|
/** default = 0.5. range value: from 0 to 1 */
|
2673
2681
|
alphaTest?: number | undefined;
|
2674
2682
|
/** default = true */
|
2675
2683
|
castShadows?: boolean | undefined;
|
2676
2684
|
/** default = null */
|
2677
|
-
alphaTexture?:
|
2685
|
+
alphaTexture?: TextureUnion | undefined;
|
2678
2686
|
/** default = null */
|
2679
|
-
emissiveTexture?:
|
2687
|
+
emissiveTexture?: TextureUnion | undefined;
|
2680
2688
|
/** default = null */
|
2681
|
-
bumpTexture?:
|
2689
|
+
bumpTexture?: TextureUnion | undefined;
|
2682
2690
|
/** default = white; */
|
2683
2691
|
albedoColor?: Color3_2 | undefined;
|
2684
2692
|
/** default = black; */
|
@@ -2701,14 +2709,6 @@ declare interface PBMaterial {
|
|
2701
2709
|
directIntensity?: number | undefined;
|
2702
2710
|
}
|
2703
2711
|
|
2704
|
-
declare interface PBMaterial_Texture {
|
2705
|
-
src: string;
|
2706
|
-
/** default = TextureWrapMode.Clamp */
|
2707
|
-
wrapMode?: TextureWrapMode | undefined;
|
2708
|
-
/** default = FilterMode.Bilinear */
|
2709
|
-
filterMode?: TextureFilterMode | undefined;
|
2710
|
-
}
|
2711
|
-
|
2712
2712
|
declare interface PBMeshCollider {
|
2713
2713
|
/** default = ColliderLayer.Physics | ColliderLayer.Pointer */
|
2714
2714
|
collisionMask?: number | undefined;
|
@@ -3662,12 +3662,27 @@ declare const enum TextAlignMode {
|
|
3662
3662
|
/** @public */
|
3663
3663
|
declare const TextShape: ComponentDefinition<ISchema<PBTextShape>, PBTextShape>;
|
3664
3664
|
|
3665
|
+
declare interface Texture {
|
3666
|
+
src: string;
|
3667
|
+
/** default = TextureWrapMode.Clamp */
|
3668
|
+
wrapMode?: TextureWrapMode | undefined;
|
3669
|
+
/** default = FilterMode.Bilinear */
|
3670
|
+
filterMode?: TextureFilterMode | undefined;
|
3671
|
+
}
|
3672
|
+
|
3665
3673
|
declare const enum TextureFilterMode {
|
3666
3674
|
TFM_POINT = 0,
|
3667
3675
|
TFM_BILINEAR = 1,
|
3668
3676
|
TFM_TRILINEAR = 2
|
3669
3677
|
}
|
3670
3678
|
|
3679
|
+
declare interface TextureUnion {
|
3680
|
+
/** default = null */
|
3681
|
+
texture: Texture | undefined;
|
3682
|
+
/** default = null */
|
3683
|
+
avatarTexture: AvatarTexture | undefined;
|
3684
|
+
}
|
3685
|
+
|
3671
3686
|
declare const enum TextureWrapMode {
|
3672
3687
|
TWM_REPEAT = 0,
|
3673
3688
|
TWM_CLAMP = 1,
|