@dcl/playground-assets 7.1.4-4671625513.commit-bfff9b1 → 7.1.4-4672664161.commit-7ba5d40

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
@@ -2255,6 +2255,13 @@ export declare interface LastWriteWinElementSetComponentDefinition<T> extends Ba
2255
2255
  * @param entity - Entity to get the component from
2256
2256
  */
2257
2257
  getMutableOrNull(entity: Entity): T | null;
2258
+ /**
2259
+ * Get the mutable component of the entity. If the entity doesn't have the component, it's created.
2260
+ * - Internal comment: This method adds the &lt;entity,component&gt; to the list to be reviewed next frame
2261
+ * @param entity - Entity to get the component from
2262
+ * @param val - The initial value if it doesn't exist
2263
+ */
2264
+ getOrCreateMutable(entity: Entity, initialValue?: T): T;
2258
2265
  }
2259
2266
 
2260
2267
  /**
@@ -5112,6 +5119,23 @@ export declare namespace Schemas {
5112
5119
  * @returns a ISchema or fail for unsupported json-schema
5113
5120
  */
5114
5121
  const fromJson: (json: JsonSchemaExtended) => ISchema<unknown>;
5122
+ /**
5123
+ * @public
5124
+ *
5125
+ * Traverses and mutates values in a JSON schema-based structure, applying the given mutation function to each value.
5126
+ * The function is designed to work with nested maps and arrays, recursively processing each element.
5127
+ *
5128
+ * @param jsonSchema - The JSON schema object that describes the structure of the value.
5129
+ * It must have a serializationType of 'map', 'array', or other custom types like 'entity'.
5130
+ * @param value - The value to be mutated, which should conform to the provided JSON schema.
5131
+ * @param mutateFn - A function that takes a value and its corresponding valueType (JsonSchemaExtended) as arguments
5132
+ * and returns a tuple [boolean, any]. The boolean indicates whether the mutation should be applied,
5133
+ * and the second element is the mutated value.
5134
+ */
5135
+ const mutateNestedValues: (jsonSchema: JsonSchemaExtended, value: unknown, mutateFn: (value: unknown, valueType: JsonSchemaExtended) => {
5136
+ changed: boolean;
5137
+ value?: any;
5138
+ }) => void;
5115
5139
  }
5116
5140
 
5117
5141
  /**
package/dist/beta.d.ts CHANGED
@@ -2251,6 +2251,13 @@ export declare interface LastWriteWinElementSetComponentDefinition<T> extends Ba
2251
2251
  * @param entity - Entity to get the component from
2252
2252
  */
2253
2253
  getMutableOrNull(entity: Entity): T | null;
2254
+ /**
2255
+ * Get the mutable component of the entity. If the entity doesn't have the component, it's created.
2256
+ * - Internal comment: This method adds the &lt;entity,component&gt; to the list to be reviewed next frame
2257
+ * @param entity - Entity to get the component from
2258
+ * @param val - The initial value if it doesn't exist
2259
+ */
2260
+ getOrCreateMutable(entity: Entity, initialValue?: T): T;
2254
2261
  }
2255
2262
 
2256
2263
  /**
@@ -5108,6 +5115,23 @@ export declare namespace Schemas {
5108
5115
  * @returns a ISchema or fail for unsupported json-schema
5109
5116
  */
5110
5117
  const fromJson: (json: JsonSchemaExtended) => ISchema<unknown>;
5118
+ /**
5119
+ * @public
5120
+ *
5121
+ * Traverses and mutates values in a JSON schema-based structure, applying the given mutation function to each value.
5122
+ * The function is designed to work with nested maps and arrays, recursively processing each element.
5123
+ *
5124
+ * @param jsonSchema - The JSON schema object that describes the structure of the value.
5125
+ * It must have a serializationType of 'map', 'array', or other custom types like 'entity'.
5126
+ * @param value - The value to be mutated, which should conform to the provided JSON schema.
5127
+ * @param mutateFn - A function that takes a value and its corresponding valueType (JsonSchemaExtended) as arguments
5128
+ * and returns a tuple [boolean, any]. The boolean indicates whether the mutation should be applied,
5129
+ * and the second element is the mutated value.
5130
+ */
5131
+ const mutateNestedValues: (jsonSchema: JsonSchemaExtended, value: unknown, mutateFn: (value: unknown, valueType: JsonSchemaExtended) => {
5132
+ changed: boolean;
5133
+ value?: any;
5134
+ }) => void;
5111
5135
  }
5112
5136
 
5113
5137
  /**
@@ -2251,6 +2251,13 @@ export declare interface LastWriteWinElementSetComponentDefinition<T> extends Ba
2251
2251
  * @param entity - Entity to get the component from
2252
2252
  */
2253
2253
  getMutableOrNull(entity: Entity): T | null;
2254
+ /**
2255
+ * Get the mutable component of the entity. If the entity doesn't have the component, it's created.
2256
+ * - Internal comment: This method adds the &lt;entity,component&gt; to the list to be reviewed next frame
2257
+ * @param entity - Entity to get the component from
2258
+ * @param val - The initial value if it doesn't exist
2259
+ */
2260
+ getOrCreateMutable(entity: Entity, initialValue?: T): T;
2254
2261
  }
2255
2262
 
2256
2263
  /**
@@ -5108,6 +5115,23 @@ export declare namespace Schemas {
5108
5115
  * @returns a ISchema or fail for unsupported json-schema
5109
5116
  */
5110
5117
  const fromJson: (json: JsonSchemaExtended) => ISchema<unknown>;
5118
+ /**
5119
+ * @public
5120
+ *
5121
+ * Traverses and mutates values in a JSON schema-based structure, applying the given mutation function to each value.
5122
+ * The function is designed to work with nested maps and arrays, recursively processing each element.
5123
+ *
5124
+ * @param jsonSchema - The JSON schema object that describes the structure of the value.
5125
+ * It must have a serializationType of 'map', 'array', or other custom types like 'entity'.
5126
+ * @param value - The value to be mutated, which should conform to the provided JSON schema.
5127
+ * @param mutateFn - A function that takes a value and its corresponding valueType (JsonSchemaExtended) as arguments
5128
+ * and returns a tuple [boolean, any]. The boolean indicates whether the mutation should be applied,
5129
+ * and the second element is the mutated value.
5130
+ */
5131
+ const mutateNestedValues: (jsonSchema: JsonSchemaExtended, value: unknown, mutateFn: (value: unknown, valueType: JsonSchemaExtended) => {
5132
+ changed: boolean;
5133
+ value?: any;
5134
+ }) => void;
5111
5135
  }
5112
5136
 
5113
5137
  /**