@dcl/playground-assets 7.0.5 → 7.0.6-3713220614.commit-d02ef9f
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/alpha.d.ts +11 -4
- package/dist/beta.d.ts +11 -4
- package/dist/index.bundled.d.ts +11 -4
- package/dist/index.js +209 -133
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +11 -4
- package/etc/playground-assets.api.json +137 -16
- package/etc/playground-assets.api.md +8 -6
- package/package.json +3 -3
package/dist/alpha.d.ts
CHANGED
|
@@ -1042,6 +1042,7 @@ export declare type ComponentDefinition<T extends ISchema<ConstructorType>, Cons
|
|
|
1042
1042
|
*/
|
|
1043
1043
|
createOrReplace(entity: Entity, val?: ConstructorType): ComponentType<T>;
|
|
1044
1044
|
/**
|
|
1045
|
+
* @public
|
|
1045
1046
|
* Delete the current component to an entity, return null if the entity doesn't have the current component.
|
|
1046
1047
|
* - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame
|
|
1047
1048
|
* @param entity - Entity to delete the component from
|
|
@@ -1338,6 +1339,12 @@ export declare type IEngine = {
|
|
|
1338
1339
|
* @returns if it was found and removed
|
|
1339
1340
|
*/
|
|
1340
1341
|
removeSystem(selector: string | SystemFn): boolean;
|
|
1342
|
+
/**
|
|
1343
|
+
* Registers a custom component definition.
|
|
1344
|
+
* @param component - The component definition
|
|
1345
|
+
* @param componentId - unique id to identify the component, if the component id already exist, it will fail.
|
|
1346
|
+
*/
|
|
1347
|
+
registerCustomComponent<T extends ISchema, V>(component: ComponentDefinition<T, V>, componentId: number): ComponentDefinition<T, V>;
|
|
1341
1348
|
/**
|
|
1342
1349
|
* Define a component and add it to the engine.
|
|
1343
1350
|
* @param spec - An object with schema fields
|
|
@@ -1403,7 +1410,7 @@ export declare type IEngine = {
|
|
|
1403
1410
|
/**
|
|
1404
1411
|
* @param deltaTime - deltaTime in seconds
|
|
1405
1412
|
*/
|
|
1406
|
-
update(deltaTime: number): void
|
|
1413
|
+
update(deltaTime: number): Promise<void>;
|
|
1407
1414
|
/**
|
|
1408
1415
|
* @public
|
|
1409
1416
|
* Refer to the root of the scene, all Transforms without a parent are parenting with RootEntity.
|
|
@@ -4019,7 +4026,7 @@ export declare type ReceiveMessage = {
|
|
|
4019
4026
|
entity: Entity;
|
|
4020
4027
|
componentId: number;
|
|
4021
4028
|
timestamp: number;
|
|
4022
|
-
|
|
4029
|
+
transportId?: number;
|
|
4023
4030
|
data?: Uint8Array;
|
|
4024
4031
|
messageBuffer: Uint8Array;
|
|
4025
4032
|
};
|
|
@@ -4394,8 +4401,7 @@ export declare type TransformType = {
|
|
|
4394
4401
|
};
|
|
4395
4402
|
|
|
4396
4403
|
export declare type Transport = {
|
|
4397
|
-
|
|
4398
|
-
send(message: Uint8Array): void;
|
|
4404
|
+
send(message: Uint8Array): Promise<void>;
|
|
4399
4405
|
onmessage?(message: Uint8Array): void;
|
|
4400
4406
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
|
4401
4407
|
};
|
|
@@ -5108,6 +5114,7 @@ export declare namespace WireMessage {
|
|
|
5108
5114
|
*/
|
|
5109
5115
|
export function validate(buf: ByteBuffer): boolean;
|
|
5110
5116
|
export function readHeader(buf: ByteBuffer): Header | null;
|
|
5117
|
+
export function getType(component: ComponentDefinition<ISchema<unknown>, unknown>, entity: Entity): Enum;
|
|
5111
5118
|
}
|
|
5112
5119
|
|
|
5113
5120
|
export declare const enum YGAlign {
|
package/dist/beta.d.ts
CHANGED
|
@@ -1042,6 +1042,7 @@ export declare type ComponentDefinition<T extends ISchema<ConstructorType>, Cons
|
|
|
1042
1042
|
*/
|
|
1043
1043
|
createOrReplace(entity: Entity, val?: ConstructorType): ComponentType<T>;
|
|
1044
1044
|
/**
|
|
1045
|
+
* @public
|
|
1045
1046
|
* Delete the current component to an entity, return null if the entity doesn't have the current component.
|
|
1046
1047
|
* - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame
|
|
1047
1048
|
* @param entity - Entity to delete the component from
|
|
@@ -1338,6 +1339,12 @@ export declare type IEngine = {
|
|
|
1338
1339
|
* @returns if it was found and removed
|
|
1339
1340
|
*/
|
|
1340
1341
|
removeSystem(selector: string | SystemFn): boolean;
|
|
1342
|
+
/**
|
|
1343
|
+
* Registers a custom component definition.
|
|
1344
|
+
* @param component - The component definition
|
|
1345
|
+
* @param componentId - unique id to identify the component, if the component id already exist, it will fail.
|
|
1346
|
+
*/
|
|
1347
|
+
registerCustomComponent<T extends ISchema, V>(component: ComponentDefinition<T, V>, componentId: number): ComponentDefinition<T, V>;
|
|
1341
1348
|
/**
|
|
1342
1349
|
* Define a component and add it to the engine.
|
|
1343
1350
|
* @param spec - An object with schema fields
|
|
@@ -1403,7 +1410,7 @@ export declare type IEngine = {
|
|
|
1403
1410
|
/**
|
|
1404
1411
|
* @param deltaTime - deltaTime in seconds
|
|
1405
1412
|
*/
|
|
1406
|
-
update(deltaTime: number): void
|
|
1413
|
+
update(deltaTime: number): Promise<void>;
|
|
1407
1414
|
/**
|
|
1408
1415
|
* @public
|
|
1409
1416
|
* Refer to the root of the scene, all Transforms without a parent are parenting with RootEntity.
|
|
@@ -4019,7 +4026,7 @@ export declare type ReceiveMessage = {
|
|
|
4019
4026
|
entity: Entity;
|
|
4020
4027
|
componentId: number;
|
|
4021
4028
|
timestamp: number;
|
|
4022
|
-
|
|
4029
|
+
transportId?: number;
|
|
4023
4030
|
data?: Uint8Array;
|
|
4024
4031
|
messageBuffer: Uint8Array;
|
|
4025
4032
|
};
|
|
@@ -4394,8 +4401,7 @@ export declare type TransformType = {
|
|
|
4394
4401
|
};
|
|
4395
4402
|
|
|
4396
4403
|
export declare type Transport = {
|
|
4397
|
-
|
|
4398
|
-
send(message: Uint8Array): void;
|
|
4404
|
+
send(message: Uint8Array): Promise<void>;
|
|
4399
4405
|
onmessage?(message: Uint8Array): void;
|
|
4400
4406
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
|
4401
4407
|
};
|
|
@@ -5108,6 +5114,7 @@ export declare namespace WireMessage {
|
|
|
5108
5114
|
*/
|
|
5109
5115
|
export function validate(buf: ByteBuffer): boolean;
|
|
5110
5116
|
export function readHeader(buf: ByteBuffer): Header | null;
|
|
5117
|
+
export function getType(component: ComponentDefinition<ISchema<unknown>, unknown>, entity: Entity): Enum;
|
|
5111
5118
|
}
|
|
5112
5119
|
|
|
5113
5120
|
export declare const enum YGAlign {
|
package/dist/index.bundled.d.ts
CHANGED
|
@@ -1042,6 +1042,7 @@ export declare type ComponentDefinition<T extends ISchema<ConstructorType>, Cons
|
|
|
1042
1042
|
*/
|
|
1043
1043
|
createOrReplace(entity: Entity, val?: ConstructorType): ComponentType<T>;
|
|
1044
1044
|
/**
|
|
1045
|
+
* @public
|
|
1045
1046
|
* Delete the current component to an entity, return null if the entity doesn't have the current component.
|
|
1046
1047
|
* - Internal comment: This method adds the <entity,component> to the list to be reviewed next frame
|
|
1047
1048
|
* @param entity - Entity to delete the component from
|
|
@@ -1338,6 +1339,12 @@ export declare type IEngine = {
|
|
|
1338
1339
|
* @returns if it was found and removed
|
|
1339
1340
|
*/
|
|
1340
1341
|
removeSystem(selector: string | SystemFn): boolean;
|
|
1342
|
+
/**
|
|
1343
|
+
* Registers a custom component definition.
|
|
1344
|
+
* @param component - The component definition
|
|
1345
|
+
* @param componentId - unique id to identify the component, if the component id already exist, it will fail.
|
|
1346
|
+
*/
|
|
1347
|
+
registerCustomComponent<T extends ISchema, V>(component: ComponentDefinition<T, V>, componentId: number): ComponentDefinition<T, V>;
|
|
1341
1348
|
/**
|
|
1342
1349
|
* Define a component and add it to the engine.
|
|
1343
1350
|
* @param spec - An object with schema fields
|
|
@@ -1403,7 +1410,7 @@ export declare type IEngine = {
|
|
|
1403
1410
|
/**
|
|
1404
1411
|
* @param deltaTime - deltaTime in seconds
|
|
1405
1412
|
*/
|
|
1406
|
-
update(deltaTime: number): void
|
|
1413
|
+
update(deltaTime: number): Promise<void>;
|
|
1407
1414
|
/**
|
|
1408
1415
|
* @public
|
|
1409
1416
|
* Refer to the root of the scene, all Transforms without a parent are parenting with RootEntity.
|
|
@@ -4019,7 +4026,7 @@ export declare type ReceiveMessage = {
|
|
|
4019
4026
|
entity: Entity;
|
|
4020
4027
|
componentId: number;
|
|
4021
4028
|
timestamp: number;
|
|
4022
|
-
|
|
4029
|
+
transportId?: number;
|
|
4023
4030
|
data?: Uint8Array;
|
|
4024
4031
|
messageBuffer: Uint8Array;
|
|
4025
4032
|
};
|
|
@@ -4394,8 +4401,7 @@ export declare type TransformType = {
|
|
|
4394
4401
|
};
|
|
4395
4402
|
|
|
4396
4403
|
export declare type Transport = {
|
|
4397
|
-
|
|
4398
|
-
send(message: Uint8Array): void;
|
|
4404
|
+
send(message: Uint8Array): Promise<void>;
|
|
4399
4405
|
onmessage?(message: Uint8Array): void;
|
|
4400
4406
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
|
4401
4407
|
};
|
|
@@ -5108,6 +5114,7 @@ export declare namespace WireMessage {
|
|
|
5108
5114
|
*/
|
|
5109
5115
|
export function validate(buf: ByteBuffer): boolean;
|
|
5110
5116
|
export function readHeader(buf: ByteBuffer): Header | null;
|
|
5117
|
+
export function getType(component: ComponentDefinition<ISchema<unknown>, unknown>, entity: Entity): Enum;
|
|
5111
5118
|
}
|
|
5112
5119
|
|
|
5113
5120
|
export declare const enum YGAlign {
|