ConvertIntBoolMap
Converter for IntBoolMap fields in fragments and data serialization.
This converter handles IntBoolMap instances by converting between object representations and the specialized integer-to-boolean map. Includes special handling for Spine plugin's hiddenSlots field where slot names are converted to indices.
Note: The fieldToBasic conversion is currently not implemented and will log a warning if used.
Instance Members
Convert a basic object to an IntBoolMap instance.
The basic object should have string keys (representing integers) mapped to boolean values. Special handling is provided for Spine plugin's hiddenSlots field where slot names are converted to indices.
Name | Type | Description |
---|---|---|
instance |
Entity | The entity that owns this field |
field |
String | The name of the field being converted |
assets |
Assets | Assets instance for resource loading (unused) |
basic |
Dynamic | Object with string keys and boolean values |
done |
Function | Callback invoked with the converted IntBoolMap |
fieldToBasic(instance: Entity, field: String, value: IntBoolMap): Dynamic
Convert an IntBoolMap to a basic object for serialization.
WARNING: This method is not yet implemented and will log a warning. The implementation should iterate through the map and create an object with string keys representing the integer indices.
Name | Type | Description |
---|---|---|
instance |
Entity | The entity that owns this field |
field |
String | The name of the field being converted |
value |
IntBoolMap | The IntBoolMap to convert |
Returns | Description |
---|---|
Dynamic | An empty object (method not implemented) |
new(): Void
Create a new IntBoolMap converter instance.