@dcl/sdk 7.0.0-3491045797.commit-404a2a7 → 7.0.0-3516578896.commit-9ff50ea
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 +39 -3
- package/dist/ecs7/index.js +44 -1
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/package.json +5 -5
- package/types/ecs7/index.d.ts +39 -3
package/dist/ecs7/index.d.ts
CHANGED
@@ -1069,7 +1069,7 @@ export declare namespace Components {
|
|
1069
1069
|
/** @public */
|
1070
1070
|
const GltfContainer: ComponentDefinition<ISchema<PBGltfContainer>, PBGltfContainer>;
|
1071
1071
|
/** @public */
|
1072
|
-
const Material:
|
1072
|
+
const Material: MaterialComponentDefinition;
|
1073
1073
|
/** @public */
|
1074
1074
|
const MeshCollider: ComponentDefinition<ISchema<PBMeshCollider>, PBMeshCollider>;
|
1075
1075
|
/** @public */
|
@@ -1179,6 +1179,7 @@ export declare function defineLibraryComponents({ defineComponentFromSchema }: P
|
|
1179
1179
|
};
|
1180
1180
|
|
1181
1181
|
export declare function defineSdkComponents(engine: Pick<IEngine, 'defineComponentFromSchema' | 'getComponent'>): {
|
1182
|
+
Material: MaterialComponentDefinition;
|
1182
1183
|
Animator: AnimatorComponentDefinition;
|
1183
1184
|
Transform: ComponentDefinition<ISchema<TransformType>, Partial<TransformType>>;
|
1184
1185
|
AudioSource: ComponentDefinition<ISchema<PBAudioSource>, PBAudioSource>;
|
@@ -1190,7 +1191,6 @@ export declare function defineSdkComponents(engine: Pick<IEngine, 'defineCompone
|
|
1190
1191
|
CameraMode: ComponentDefinition<ISchema<PBCameraMode>, PBCameraMode>;
|
1191
1192
|
CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>, PBCameraModeArea>;
|
1192
1193
|
GltfContainer: ComponentDefinition<ISchema<PBGltfContainer>, PBGltfContainer>;
|
1193
|
-
Material: ComponentDefinition<ISchema<PBMaterial>, PBMaterial>;
|
1194
1194
|
MeshCollider: ComponentDefinition<ISchema<PBMeshCollider>, PBMeshCollider>;
|
1195
1195
|
MeshRenderer: ComponentDefinition<ISchema<PBMeshRenderer>, PBMeshRenderer>;
|
1196
1196
|
NftShape: ComponentDefinition<ISchema<PBNftShape>, PBNftShape>;
|
@@ -1528,7 +1528,29 @@ export declare type ISchema<T = any> = {
|
|
1528
1528
|
export declare const log: (...a: any[]) => void;
|
1529
1529
|
|
1530
1530
|
/** @public */
|
1531
|
-
export declare const Material:
|
1531
|
+
export declare const Material: MaterialComponentDefinition;
|
1532
|
+
|
1533
|
+
/**
|
1534
|
+
* @public
|
1535
|
+
*/
|
1536
|
+
export declare interface MaterialComponentDefinition extends ComponentDefinition {
|
1537
|
+
/**
|
1538
|
+
* Texture helpers with constructor
|
1539
|
+
*/
|
1540
|
+
Texture: TextureHelper;
|
1541
|
+
/**
|
1542
|
+
* Create or replace the component Material in the entity specified
|
1543
|
+
* @param entity - the entity to link the component
|
1544
|
+
* @param material - the Unlit data for this material
|
1545
|
+
*/
|
1546
|
+
setBasicMaterial: (entity: Entity, material: PBMaterial_UnlitMaterial) => void;
|
1547
|
+
/**
|
1548
|
+
* Create or replace the component Material in the entity specified
|
1549
|
+
* @param entity - the entity to link the component
|
1550
|
+
* @param material - the PBR data for this material
|
1551
|
+
*/
|
1552
|
+
setPbrMaterial: (entity: Entity, material: PBMaterial_PbrMaterial) => void;
|
1553
|
+
}
|
1532
1554
|
|
1533
1555
|
export declare const enum MaterialTransparencyMode {
|
1534
1556
|
MTM_OPAQUE = 0,
|
@@ -3784,6 +3806,20 @@ export declare const enum TextureFilterMode {
|
|
3784
3806
|
TFM_TRILINEAR = 2
|
3785
3807
|
}
|
3786
3808
|
|
3809
|
+
/**
|
3810
|
+
* @public
|
3811
|
+
*/
|
3812
|
+
export declare type TextureHelper = {
|
3813
|
+
/**
|
3814
|
+
* @returns a common texture with a source file
|
3815
|
+
*/
|
3816
|
+
Common: (texture: Texture) => TextureUnion;
|
3817
|
+
/**
|
3818
|
+
* @returns the avatar texture of userId specified
|
3819
|
+
*/
|
3820
|
+
Avatar: (avatarTexture: AvatarTexture) => TextureUnion;
|
3821
|
+
};
|
3822
|
+
|
3787
3823
|
export declare interface TextureUnion {
|
3788
3824
|
tex?: {
|
3789
3825
|
$case: 'texture';
|