@dcl/playground-assets 7.10.2-17472798061.commit-931de89 → 7.10.3-17918694201.commit-b983b3b

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 CHANGED
@@ -2250,6 +2250,13 @@ export declare interface IEngine {
2250
2250
  * @typeParam T - The type of the entity name value
2251
2251
  */
2252
2252
  getEntityByName<T = never, K = T>(value: K & (T extends never ? never : string)): Entity;
2253
+ /**
2254
+ * @public
2255
+ * Get all entities that have a specific tag in their Tag component
2256
+ * @param tag - Tag to search
2257
+ * @returns Iterator of entities that have the given tag
2258
+ */
2259
+ getEntitiesByTag(tagName: string): Iterable<Entity>;
2253
2260
  /**
2254
2261
  * @public
2255
2262
  * @param deltaTime - deltaTime in seconds
@@ -7277,6 +7284,33 @@ export declare type SystemItem = {
7277
7284
 
7278
7285
  export declare const SYSTEMS_REGULAR_PRIORITY = 100000;
7279
7286
 
7287
+ export declare const Tags: TagsComponentDefinitionExtended;
7288
+
7289
+ export declare interface TagsComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<TagsType> {
7290
+ /**
7291
+ * @public
7292
+ *
7293
+ * Add a tag to the entity's Tags component or create the component if it doesn't exist and add the tag
7294
+ * @param entity - entity to add the tag to
7295
+ * @param tagName - the tag name to add
7296
+ * @returns true
7297
+ */
7298
+ add(entity: Entity, tagName: string): boolean;
7299
+ /**
7300
+ * @public
7301
+ *
7302
+ * Remove a tag from the entity's Tags component
7303
+ * @param entity - entity to remove the tag from
7304
+ * @param tagName - the tag name to remove
7305
+ * @returns true if successful, false if the entity doesn't have a Tags component or the tag doesn't exist
7306
+ */
7307
+ remove(entity: Entity, tagName: string): boolean;
7308
+ }
7309
+
7310
+ export declare interface TagsType {
7311
+ tags: string[];
7312
+ }
7313
+
7280
7314
  export declare type TargetEntityRaycastOptions = RaycastSystemOptions & TargetEntityRaycastSystemOptions;
7281
7315
 
7282
7316
  export declare type TargetEntityRaycastSystemOptions = {
package/dist/beta.d.ts CHANGED
@@ -2245,6 +2245,13 @@ export declare interface IEngine {
2245
2245
  * @typeParam T - The type of the entity name value
2246
2246
  */
2247
2247
  getEntityByName<T = never, K = T>(value: K & (T extends never ? never : string)): Entity;
2248
+ /**
2249
+ * @public
2250
+ * Get all entities that have a specific tag in their Tag component
2251
+ * @param tag - Tag to search
2252
+ * @returns Iterator of entities that have the given tag
2253
+ */
2254
+ getEntitiesByTag(tagName: string): Iterable<Entity>;
2248
2255
  /**
2249
2256
  * @public
2250
2257
  * @param deltaTime - deltaTime in seconds
@@ -7244,6 +7251,33 @@ export declare type SystemItem = {
7244
7251
 
7245
7252
  export declare const SYSTEMS_REGULAR_PRIORITY = 100000;
7246
7253
 
7254
+ export declare const Tags: TagsComponentDefinitionExtended;
7255
+
7256
+ export declare interface TagsComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<TagsType> {
7257
+ /**
7258
+ * @public
7259
+ *
7260
+ * Add a tag to the entity's Tags component or create the component if it doesn't exist and add the tag
7261
+ * @param entity - entity to add the tag to
7262
+ * @param tagName - the tag name to add
7263
+ * @returns true
7264
+ */
7265
+ add(entity: Entity, tagName: string): boolean;
7266
+ /**
7267
+ * @public
7268
+ *
7269
+ * Remove a tag from the entity's Tags component
7270
+ * @param entity - entity to remove the tag from
7271
+ * @param tagName - the tag name to remove
7272
+ * @returns true if successful, false if the entity doesn't have a Tags component or the tag doesn't exist
7273
+ */
7274
+ remove(entity: Entity, tagName: string): boolean;
7275
+ }
7276
+
7277
+ export declare interface TagsType {
7278
+ tags: string[];
7279
+ }
7280
+
7247
7281
  export declare type TargetEntityRaycastOptions = RaycastSystemOptions & TargetEntityRaycastSystemOptions;
7248
7282
 
7249
7283
  export declare type TargetEntityRaycastSystemOptions = {
@@ -2245,6 +2245,13 @@ export declare interface IEngine {
2245
2245
  * @typeParam T - The type of the entity name value
2246
2246
  */
2247
2247
  getEntityByName<T = never, K = T>(value: K & (T extends never ? never : string)): Entity;
2248
+ /**
2249
+ * @public
2250
+ * Get all entities that have a specific tag in their Tag component
2251
+ * @param tag - Tag to search
2252
+ * @returns Iterator of entities that have the given tag
2253
+ */
2254
+ getEntitiesByTag(tagName: string): Iterable<Entity>;
2248
2255
  /**
2249
2256
  * @public
2250
2257
  * @param deltaTime - deltaTime in seconds
@@ -7244,6 +7251,33 @@ export declare type SystemItem = {
7244
7251
 
7245
7252
  export declare const SYSTEMS_REGULAR_PRIORITY = 100000;
7246
7253
 
7254
+ export declare const Tags: TagsComponentDefinitionExtended;
7255
+
7256
+ export declare interface TagsComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<TagsType> {
7257
+ /**
7258
+ * @public
7259
+ *
7260
+ * Add a tag to the entity's Tags component or create the component if it doesn't exist and add the tag
7261
+ * @param entity - entity to add the tag to
7262
+ * @param tagName - the tag name to add
7263
+ * @returns true
7264
+ */
7265
+ add(entity: Entity, tagName: string): boolean;
7266
+ /**
7267
+ * @public
7268
+ *
7269
+ * Remove a tag from the entity's Tags component
7270
+ * @param entity - entity to remove the tag from
7271
+ * @param tagName - the tag name to remove
7272
+ * @returns true if successful, false if the entity doesn't have a Tags component or the tag doesn't exist
7273
+ */
7274
+ remove(entity: Entity, tagName: string): boolean;
7275
+ }
7276
+
7277
+ export declare interface TagsType {
7278
+ tags: string[];
7279
+ }
7280
+
7247
7281
  export declare type TargetEntityRaycastOptions = RaycastSystemOptions & TargetEntityRaycastSystemOptions;
7248
7282
 
7249
7283
  export declare type TargetEntityRaycastSystemOptions = {