@dcl/playground-assets 7.3.15-6200631111.commit-2a2ff73 → 7.3.15-6201308535.commit-dd17bb7
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 +50 -4
- package/dist/beta.d.ts +35 -4
- package/dist/index.bundled.d.ts +35 -4
- package/dist/index.js +5 -5
- package/dist/index.js.map +4 -4
- package/dist/playground/sdk/apis.d.ts +6 -0
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +50 -4
- package/etc/playground-assets.api.json +296 -26
- package/etc/playground-assets.api.md +44 -3
- package/package.json +4 -4
package/dist/alpha.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ export declare interface BaseComponent<T> {
|
|
|
196
196
|
* This function writes the whole state of the component into a ByteBuffer
|
|
197
197
|
* @public
|
|
198
198
|
*/
|
|
199
|
-
dumpCrdtStateToBuffer(buffer: ByteBuffer): void;
|
|
199
|
+
dumpCrdtStateToBuffer(buffer: ByteBuffer, filterEntity?: (entity: Entity) => boolean): void;
|
|
200
200
|
/**
|
|
201
201
|
* @public
|
|
202
202
|
* Marks the entity as deleted and signals it cannot be used ever again. It must
|
|
@@ -1614,13 +1614,14 @@ export declare type EntityComponents = {
|
|
|
1614
1614
|
* @intenral
|
|
1615
1615
|
*/
|
|
1616
1616
|
export declare type EntityContainer = {
|
|
1617
|
-
generateEntity(): Entity;
|
|
1617
|
+
generateEntity(networked?: boolean): Entity;
|
|
1618
1618
|
removeEntity(entity: Entity): boolean;
|
|
1619
1619
|
getEntityState(entity: Entity): EntityState;
|
|
1620
1620
|
getExistingEntities(): Set<Entity>;
|
|
1621
1621
|
releaseRemovedEntities(): Entity[];
|
|
1622
1622
|
updateRemovedEntity(entity: Entity): boolean;
|
|
1623
1623
|
updateUsedEntity(entity: Entity): boolean;
|
|
1624
|
+
setNetworkEntitiesRange(reservedLocalEntities: number, range: [number, number]): void;
|
|
1624
1625
|
};
|
|
1625
1626
|
|
|
1626
1627
|
/** @public */
|
|
@@ -1662,6 +1663,20 @@ export declare enum EntityState {
|
|
|
1662
1663
|
Reserved = 3
|
|
1663
1664
|
}
|
|
1664
1665
|
|
|
1666
|
+
/**
|
|
1667
|
+
* @public
|
|
1668
|
+
*/
|
|
1669
|
+
export declare namespace EntityUtils {
|
|
1670
|
+
/**
|
|
1671
|
+
* @returns [entityNumber, entityVersion]
|
|
1672
|
+
*/
|
|
1673
|
+
export function fromEntityId(entityId: Entity): [number, number];
|
|
1674
|
+
/**
|
|
1675
|
+
* @returns compound number from entityNumber and entityVerison
|
|
1676
|
+
*/
|
|
1677
|
+
export function toEntityId(entityNumber: number, entityVersion: number): Entity;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1665
1680
|
/**
|
|
1666
1681
|
* Constant used to define the minimal number value in Babylon.js
|
|
1667
1682
|
* @public
|
|
@@ -1817,10 +1832,9 @@ export declare interface IEngine {
|
|
|
1817
1832
|
/**
|
|
1818
1833
|
* @public
|
|
1819
1834
|
* Increment the used entity counter and return the next one.
|
|
1820
|
-
* @param dynamic - whether or no the entity should be considered as Dynamic (vs Static)
|
|
1821
1835
|
* @returns the next entity unused
|
|
1822
1836
|
*/
|
|
1823
|
-
addEntity(
|
|
1837
|
+
addEntity(): Entity;
|
|
1824
1838
|
/**
|
|
1825
1839
|
* @public
|
|
1826
1840
|
* Remove all components of an entity
|
|
@@ -1999,6 +2013,18 @@ export declare interface IEngine {
|
|
|
1999
2013
|
* components that will be available to this engine and to run optimizations.
|
|
2000
2014
|
*/
|
|
2001
2015
|
seal(): void;
|
|
2016
|
+
/**
|
|
2017
|
+
* @alpha
|
|
2018
|
+
* Initialize network manager
|
|
2019
|
+
*/
|
|
2020
|
+
addNetworkManager(reservedLocalEntities: number, range: [number, number]): {
|
|
2021
|
+
addEntity: IEngine['addEntity'];
|
|
2022
|
+
};
|
|
2023
|
+
/**
|
|
2024
|
+
* @alpha
|
|
2025
|
+
* Get netowrk manager to create entities.
|
|
2026
|
+
*/
|
|
2027
|
+
getNetworkManager(): ReturnType<IEngine['addNetworkManager']>;
|
|
2002
2028
|
}
|
|
2003
2029
|
|
|
2004
2030
|
/**
|
|
@@ -2275,6 +2301,12 @@ export declare interface ISchema<T = any> {
|
|
|
2275
2301
|
*/
|
|
2276
2302
|
export declare function isEqual(p1: Coords, p2: Coords): boolean;
|
|
2277
2303
|
|
|
2304
|
+
export declare type ISyncComponents = LastWriteWinElementSetComponentDefinition<ISyncComponentsType>;
|
|
2305
|
+
|
|
2306
|
+
export declare interface ISyncComponentsType {
|
|
2307
|
+
componentIds: number[];
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2278
2310
|
/**
|
|
2279
2311
|
* @public
|
|
2280
2312
|
*/
|
|
@@ -5697,6 +5729,13 @@ export declare namespace Rect {
|
|
|
5697
5729
|
*/
|
|
5698
5730
|
export declare function removeEntityWithChildren(engine: Pick<IEngine, 'getEntitiesWith' | 'defineComponentFromSchema' | 'removeEntity'>, entity: Entity): void;
|
|
5699
5731
|
|
|
5732
|
+
export declare const RESERVED_LOCAL_ENTITIES = 65535;
|
|
5733
|
+
|
|
5734
|
+
/**
|
|
5735
|
+
* This first 512 entities are reserved by the renderer
|
|
5736
|
+
*/
|
|
5737
|
+
export declare const RESERVED_STATIC_ENTITIES = 512;
|
|
5738
|
+
|
|
5700
5739
|
export declare type RPCSendableMessage = {
|
|
5701
5740
|
jsonrpc: '2.0';
|
|
5702
5741
|
id: number;
|
|
@@ -5977,6 +6016,13 @@ export declare interface Spec {
|
|
|
5977
6016
|
[key: string]: ISchema;
|
|
5978
6017
|
}
|
|
5979
6018
|
|
|
6019
|
+
/**
|
|
6020
|
+
* @alpha
|
|
6021
|
+
* This is going to be used for sync components through a server.
|
|
6022
|
+
* Can be modified in the future since it's still in research
|
|
6023
|
+
*/
|
|
6024
|
+
export declare const SyncComponents: ISyncComponents;
|
|
6025
|
+
|
|
5980
6026
|
/**
|
|
5981
6027
|
* @public
|
|
5982
6028
|
*/
|
package/dist/beta.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ export declare interface BaseComponent<T> {
|
|
|
196
196
|
* This function writes the whole state of the component into a ByteBuffer
|
|
197
197
|
* @public
|
|
198
198
|
*/
|
|
199
|
-
dumpCrdtStateToBuffer(buffer: ByteBuffer): void;
|
|
199
|
+
dumpCrdtStateToBuffer(buffer: ByteBuffer, filterEntity?: (entity: Entity) => boolean): void;
|
|
200
200
|
/**
|
|
201
201
|
* @public
|
|
202
202
|
* Marks the entity as deleted and signals it cannot be used ever again. It must
|
|
@@ -1614,13 +1614,14 @@ export declare type EntityComponents = {
|
|
|
1614
1614
|
* @intenral
|
|
1615
1615
|
*/
|
|
1616
1616
|
export declare type EntityContainer = {
|
|
1617
|
-
generateEntity(): Entity;
|
|
1617
|
+
generateEntity(networked?: boolean): Entity;
|
|
1618
1618
|
removeEntity(entity: Entity): boolean;
|
|
1619
1619
|
getEntityState(entity: Entity): EntityState;
|
|
1620
1620
|
getExistingEntities(): Set<Entity>;
|
|
1621
1621
|
releaseRemovedEntities(): Entity[];
|
|
1622
1622
|
updateRemovedEntity(entity: Entity): boolean;
|
|
1623
1623
|
updateUsedEntity(entity: Entity): boolean;
|
|
1624
|
+
setNetworkEntitiesRange(reservedLocalEntities: number, range: [number, number]): void;
|
|
1624
1625
|
};
|
|
1625
1626
|
|
|
1626
1627
|
/** @public */
|
|
@@ -1662,6 +1663,20 @@ export declare enum EntityState {
|
|
|
1662
1663
|
Reserved = 3
|
|
1663
1664
|
}
|
|
1664
1665
|
|
|
1666
|
+
/**
|
|
1667
|
+
* @public
|
|
1668
|
+
*/
|
|
1669
|
+
export declare namespace EntityUtils {
|
|
1670
|
+
/**
|
|
1671
|
+
* @returns [entityNumber, entityVersion]
|
|
1672
|
+
*/
|
|
1673
|
+
export function fromEntityId(entityId: Entity): [number, number];
|
|
1674
|
+
/**
|
|
1675
|
+
* @returns compound number from entityNumber and entityVerison
|
|
1676
|
+
*/
|
|
1677
|
+
export function toEntityId(entityNumber: number, entityVersion: number): Entity;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1665
1680
|
/**
|
|
1666
1681
|
* Constant used to define the minimal number value in Babylon.js
|
|
1667
1682
|
* @public
|
|
@@ -1817,10 +1832,9 @@ export declare interface IEngine {
|
|
|
1817
1832
|
/**
|
|
1818
1833
|
* @public
|
|
1819
1834
|
* Increment the used entity counter and return the next one.
|
|
1820
|
-
* @param dynamic - whether or no the entity should be considered as Dynamic (vs Static)
|
|
1821
1835
|
* @returns the next entity unused
|
|
1822
1836
|
*/
|
|
1823
|
-
addEntity(
|
|
1837
|
+
addEntity(): Entity;
|
|
1824
1838
|
/**
|
|
1825
1839
|
* @public
|
|
1826
1840
|
* Remove all components of an entity
|
|
@@ -1990,6 +2004,8 @@ export declare interface IEngine {
|
|
|
1990
2004
|
* components that will be available to this engine and to run optimizations.
|
|
1991
2005
|
*/
|
|
1992
2006
|
seal(): void;
|
|
2007
|
+
/* Excluded from this release type: addNetworkManager */
|
|
2008
|
+
/* Excluded from this release type: getNetworkManager */
|
|
1993
2009
|
}
|
|
1994
2010
|
|
|
1995
2011
|
/**
|
|
@@ -2266,6 +2282,12 @@ export declare interface ISchema<T = any> {
|
|
|
2266
2282
|
*/
|
|
2267
2283
|
export declare function isEqual(p1: Coords, p2: Coords): boolean;
|
|
2268
2284
|
|
|
2285
|
+
export declare type ISyncComponents = LastWriteWinElementSetComponentDefinition<ISyncComponentsType>;
|
|
2286
|
+
|
|
2287
|
+
export declare interface ISyncComponentsType {
|
|
2288
|
+
componentIds: number[];
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2269
2291
|
/**
|
|
2270
2292
|
* @public
|
|
2271
2293
|
*/
|
|
@@ -5688,6 +5710,13 @@ export declare namespace Rect {
|
|
|
5688
5710
|
*/
|
|
5689
5711
|
export declare function removeEntityWithChildren(engine: Pick<IEngine, 'getEntitiesWith' | 'defineComponentFromSchema' | 'removeEntity'>, entity: Entity): void;
|
|
5690
5712
|
|
|
5713
|
+
export declare const RESERVED_LOCAL_ENTITIES = 65535;
|
|
5714
|
+
|
|
5715
|
+
/**
|
|
5716
|
+
* This first 512 entities are reserved by the renderer
|
|
5717
|
+
*/
|
|
5718
|
+
export declare const RESERVED_STATIC_ENTITIES = 512;
|
|
5719
|
+
|
|
5691
5720
|
export declare type RPCSendableMessage = {
|
|
5692
5721
|
jsonrpc: '2.0';
|
|
5693
5722
|
id: number;
|
|
@@ -5968,6 +5997,8 @@ export declare interface Spec {
|
|
|
5968
5997
|
[key: string]: ISchema;
|
|
5969
5998
|
}
|
|
5970
5999
|
|
|
6000
|
+
/* Excluded from this release type: SyncComponents */
|
|
6001
|
+
|
|
5971
6002
|
/**
|
|
5972
6003
|
* @public
|
|
5973
6004
|
*/
|
package/dist/index.bundled.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ export declare interface BaseComponent<T> {
|
|
|
196
196
|
* This function writes the whole state of the component into a ByteBuffer
|
|
197
197
|
* @public
|
|
198
198
|
*/
|
|
199
|
-
dumpCrdtStateToBuffer(buffer: ByteBuffer): void;
|
|
199
|
+
dumpCrdtStateToBuffer(buffer: ByteBuffer, filterEntity?: (entity: Entity) => boolean): void;
|
|
200
200
|
/**
|
|
201
201
|
* @public
|
|
202
202
|
* Marks the entity as deleted and signals it cannot be used ever again. It must
|
|
@@ -1614,13 +1614,14 @@ export declare type EntityComponents = {
|
|
|
1614
1614
|
* @intenral
|
|
1615
1615
|
*/
|
|
1616
1616
|
export declare type EntityContainer = {
|
|
1617
|
-
generateEntity(): Entity;
|
|
1617
|
+
generateEntity(networked?: boolean): Entity;
|
|
1618
1618
|
removeEntity(entity: Entity): boolean;
|
|
1619
1619
|
getEntityState(entity: Entity): EntityState;
|
|
1620
1620
|
getExistingEntities(): Set<Entity>;
|
|
1621
1621
|
releaseRemovedEntities(): Entity[];
|
|
1622
1622
|
updateRemovedEntity(entity: Entity): boolean;
|
|
1623
1623
|
updateUsedEntity(entity: Entity): boolean;
|
|
1624
|
+
setNetworkEntitiesRange(reservedLocalEntities: number, range: [number, number]): void;
|
|
1624
1625
|
};
|
|
1625
1626
|
|
|
1626
1627
|
/** @public */
|
|
@@ -1662,6 +1663,20 @@ export declare enum EntityState {
|
|
|
1662
1663
|
Reserved = 3
|
|
1663
1664
|
}
|
|
1664
1665
|
|
|
1666
|
+
/**
|
|
1667
|
+
* @public
|
|
1668
|
+
*/
|
|
1669
|
+
export declare namespace EntityUtils {
|
|
1670
|
+
/**
|
|
1671
|
+
* @returns [entityNumber, entityVersion]
|
|
1672
|
+
*/
|
|
1673
|
+
export function fromEntityId(entityId: Entity): [number, number];
|
|
1674
|
+
/**
|
|
1675
|
+
* @returns compound number from entityNumber and entityVerison
|
|
1676
|
+
*/
|
|
1677
|
+
export function toEntityId(entityNumber: number, entityVersion: number): Entity;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1665
1680
|
/**
|
|
1666
1681
|
* Constant used to define the minimal number value in Babylon.js
|
|
1667
1682
|
* @public
|
|
@@ -1817,10 +1832,9 @@ export declare interface IEngine {
|
|
|
1817
1832
|
/**
|
|
1818
1833
|
* @public
|
|
1819
1834
|
* Increment the used entity counter and return the next one.
|
|
1820
|
-
* @param dynamic - whether or no the entity should be considered as Dynamic (vs Static)
|
|
1821
1835
|
* @returns the next entity unused
|
|
1822
1836
|
*/
|
|
1823
|
-
addEntity(
|
|
1837
|
+
addEntity(): Entity;
|
|
1824
1838
|
/**
|
|
1825
1839
|
* @public
|
|
1826
1840
|
* Remove all components of an entity
|
|
@@ -1990,6 +2004,8 @@ export declare interface IEngine {
|
|
|
1990
2004
|
* components that will be available to this engine and to run optimizations.
|
|
1991
2005
|
*/
|
|
1992
2006
|
seal(): void;
|
|
2007
|
+
/* Excluded from this release type: addNetworkManager */
|
|
2008
|
+
/* Excluded from this release type: getNetworkManager */
|
|
1993
2009
|
}
|
|
1994
2010
|
|
|
1995
2011
|
/**
|
|
@@ -2266,6 +2282,12 @@ export declare interface ISchema<T = any> {
|
|
|
2266
2282
|
*/
|
|
2267
2283
|
export declare function isEqual(p1: Coords, p2: Coords): boolean;
|
|
2268
2284
|
|
|
2285
|
+
export declare type ISyncComponents = LastWriteWinElementSetComponentDefinition<ISyncComponentsType>;
|
|
2286
|
+
|
|
2287
|
+
export declare interface ISyncComponentsType {
|
|
2288
|
+
componentIds: number[];
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2269
2291
|
/**
|
|
2270
2292
|
* @public
|
|
2271
2293
|
*/
|
|
@@ -5688,6 +5710,13 @@ export declare namespace Rect {
|
|
|
5688
5710
|
*/
|
|
5689
5711
|
export declare function removeEntityWithChildren(engine: Pick<IEngine, 'getEntitiesWith' | 'defineComponentFromSchema' | 'removeEntity'>, entity: Entity): void;
|
|
5690
5712
|
|
|
5713
|
+
export declare const RESERVED_LOCAL_ENTITIES = 65535;
|
|
5714
|
+
|
|
5715
|
+
/**
|
|
5716
|
+
* This first 512 entities are reserved by the renderer
|
|
5717
|
+
*/
|
|
5718
|
+
export declare const RESERVED_STATIC_ENTITIES = 512;
|
|
5719
|
+
|
|
5691
5720
|
export declare type RPCSendableMessage = {
|
|
5692
5721
|
jsonrpc: '2.0';
|
|
5693
5722
|
id: number;
|
|
@@ -5968,6 +5997,8 @@ export declare interface Spec {
|
|
|
5968
5997
|
[key: string]: ISchema;
|
|
5969
5998
|
}
|
|
5970
5999
|
|
|
6000
|
+
/* Excluded from this release type: SyncComponents */
|
|
6001
|
+
|
|
5971
6002
|
/**
|
|
5972
6003
|
* @public
|
|
5973
6004
|
*/
|