@dcl/sdk 7.0.0-3491045797.commit-404a2a7 → 7.0.0-3516622799.commit-ce3da22
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 +115 -9
- package/dist/ecs7/index.js +114 -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 +115 -9
package/dist/ecs7/index.d.ts
CHANGED
@@ -1069,11 +1069,11 @@ 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
|
-
const MeshCollider:
|
1074
|
+
const MeshCollider: MeshColliderComponentDefinition;
|
1075
1075
|
/** @public */
|
1076
|
-
const MeshRenderer:
|
1076
|
+
const MeshRenderer: MeshRendererComponentDefinition;
|
1077
1077
|
/** @public */
|
1078
1078
|
const NftShape: ComponentDefinition<ISchema<PBNftShape>, PBNftShape>;
|
1079
1079
|
/** @public */
|
@@ -1179,7 +1179,10 @@ 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;
|
1184
|
+
MeshRenderer: MeshRendererComponentDefinition;
|
1185
|
+
MeshCollider: MeshColliderComponentDefinition;
|
1183
1186
|
Transform: ComponentDefinition<ISchema<TransformType>, Partial<TransformType>>;
|
1184
1187
|
AudioSource: ComponentDefinition<ISchema<PBAudioSource>, PBAudioSource>;
|
1185
1188
|
AudioStream: ComponentDefinition<ISchema<PBAudioStream>, PBAudioStream>;
|
@@ -1190,9 +1193,6 @@ export declare function defineSdkComponents(engine: Pick<IEngine, 'defineCompone
|
|
1190
1193
|
CameraMode: ComponentDefinition<ISchema<PBCameraMode>, PBCameraMode>;
|
1191
1194
|
CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>, PBCameraModeArea>;
|
1192
1195
|
GltfContainer: ComponentDefinition<ISchema<PBGltfContainer>, PBGltfContainer>;
|
1193
|
-
Material: ComponentDefinition<ISchema<PBMaterial>, PBMaterial>;
|
1194
|
-
MeshCollider: ComponentDefinition<ISchema<PBMeshCollider>, PBMeshCollider>;
|
1195
|
-
MeshRenderer: ComponentDefinition<ISchema<PBMeshRenderer>, PBMeshRenderer>;
|
1196
1196
|
NftShape: ComponentDefinition<ISchema<PBNftShape>, PBNftShape>;
|
1197
1197
|
PointerEventsResult: ComponentDefinition<ISchema<PBPointerEventsResult>, PBPointerEventsResult>;
|
1198
1198
|
PointerHoverFeedback: ComponentDefinition<ISchema<PBPointerHoverFeedback>, PBPointerHoverFeedback>;
|
@@ -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,
|
@@ -2270,10 +2292,80 @@ export declare namespace Matrix {
|
|
2270
2292
|
}
|
2271
2293
|
|
2272
2294
|
/** @public */
|
2273
|
-
export declare const MeshCollider:
|
2295
|
+
export declare const MeshCollider: MeshColliderComponentDefinition;
|
2296
|
+
|
2297
|
+
/**
|
2298
|
+
* @public
|
2299
|
+
*/
|
2300
|
+
export declare interface MeshColliderComponentDefinition extends ComponentDefinition {
|
2301
|
+
/**
|
2302
|
+
* @public
|
2303
|
+
* Set a box in the MeshCollider component
|
2304
|
+
* @param entity - entity to create or replace the MeshCollider component
|
2305
|
+
* @param colliderMask - the set of layer where the collider reacts, default: Physics and Pointer
|
2306
|
+
*/
|
2307
|
+
setBox(entity: Entity, colliderLayers?: ColliderLayer | ColliderLayer[]): void;
|
2308
|
+
/**
|
2309
|
+
* @public
|
2310
|
+
* Set a plane in the MeshCollider component
|
2311
|
+
* @param entity - entity to create or replace the MeshCollider component
|
2312
|
+
* @param colliderMask - the set of layer where the collider reacts, default: Physics and Pointer
|
2313
|
+
*/
|
2314
|
+
setPlane(entity: Entity, colliderLayers?: ColliderLayer | ColliderLayer[]): void;
|
2315
|
+
/**
|
2316
|
+
* @public
|
2317
|
+
* Set a cylinder in the MeshCollider component
|
2318
|
+
* @param entity - entity to create or replace the MeshCollider component
|
2319
|
+
* @param radiusBottom - radius of bottom of cylinder
|
2320
|
+
* @param radiusTop - radius of top of cylinder
|
2321
|
+
* @param colliderMask - the set of layer where the collider reacts, default: Physics and Pointer
|
2322
|
+
*/
|
2323
|
+
setCylinder(entity: Entity, radiusBottom?: number, radiusTop?: number, colliderLayers?: ColliderLayer | ColliderLayer[]): void;
|
2324
|
+
/**
|
2325
|
+
* @public
|
2326
|
+
* Set a sphere in the MeshCollider component
|
2327
|
+
* @param entity - entity to create or replace the MeshCollider component
|
2328
|
+
* @param colliderMask - the set of layer where the collider reacts, default: Physics and Pointer
|
2329
|
+
*/
|
2330
|
+
setSphere(entity: Entity, colliderLayers?: ColliderLayer | ColliderLayer[]): void;
|
2331
|
+
}
|
2274
2332
|
|
2275
2333
|
/** @public */
|
2276
|
-
export declare const MeshRenderer:
|
2334
|
+
export declare const MeshRenderer: MeshRendererComponentDefinition;
|
2335
|
+
|
2336
|
+
/**
|
2337
|
+
* @public
|
2338
|
+
*/
|
2339
|
+
export declare interface MeshRendererComponentDefinition extends ComponentDefinition {
|
2340
|
+
/**
|
2341
|
+
* @public
|
2342
|
+
* Set a box in the MeshRenderer component
|
2343
|
+
* @param entity - entity to create or replace the MeshRenderer component
|
2344
|
+
* @param uvs - uvs coord
|
2345
|
+
*/
|
2346
|
+
setBox(entity: Entity, uvs?: number[]): void;
|
2347
|
+
/**
|
2348
|
+
* @public
|
2349
|
+
* Set a plane in the MeshRenderer component
|
2350
|
+
* @param entity - entity to create or replace the MeshRenderer component
|
2351
|
+
* @param uvs - uvs coord
|
2352
|
+
*/
|
2353
|
+
setPlane(entity: Entity, uvs?: number[]): void;
|
2354
|
+
/**
|
2355
|
+
* @public
|
2356
|
+
* Set a cylinder in the MeshRenderer component
|
2357
|
+
* @param entity - entity to create or replace the MeshRenderer component
|
2358
|
+
* @param radiusBottom -
|
2359
|
+
* @param radiusTop -
|
2360
|
+
*/
|
2361
|
+
setCylinder(entity: Entity, radiusBottom?: number, radiusTop?: number): void;
|
2362
|
+
/**
|
2363
|
+
* @public
|
2364
|
+
* Set a sphere in the MeshRenderer component
|
2365
|
+
* @param entity - entity to create or replace the MeshRenderer component
|
2366
|
+
*/
|
2367
|
+
setSphere(entity: Entity): void;
|
2368
|
+
}
|
2277
2369
|
|
2278
2370
|
/**
|
2279
2371
|
* @public
|
@@ -3784,6 +3876,20 @@ export declare const enum TextureFilterMode {
|
|
3784
3876
|
TFM_TRILINEAR = 2
|
3785
3877
|
}
|
3786
3878
|
|
3879
|
+
/**
|
3880
|
+
* @public
|
3881
|
+
*/
|
3882
|
+
export declare type TextureHelper = {
|
3883
|
+
/**
|
3884
|
+
* @returns a common texture with a source file
|
3885
|
+
*/
|
3886
|
+
Common: (texture: Texture) => TextureUnion;
|
3887
|
+
/**
|
3888
|
+
* @returns the avatar texture of userId specified
|
3889
|
+
*/
|
3890
|
+
Avatar: (avatarTexture: AvatarTexture) => TextureUnion;
|
3891
|
+
};
|
3892
|
+
|
3787
3893
|
export declare interface TextureUnion {
|
3788
3894
|
tex?: {
|
3789
3895
|
$case: 'texture';
|