ConvertFragmentData

ceramic.ConvertFragmentData (Class)
Implements: ConvertField

Converter for FragmentData fields in fragments and data serialization.

This converter provides a pass-through implementation for FragmentData, as FragmentData is already a serializable format that doesn't require conversion. The converter exists to maintain consistency in the fragment system's field conversion architecture.

Instance Members

basicToField(instance: Entity, field: String, assets: Assets, basic: Dynamic, done: Function): Void

Pass through the basic value as FragmentData without conversion.

Since FragmentData is already in a serializable format, no transformation is needed.

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 The FragmentData value to pass through
done Function Callback invoked with the same FragmentData value

fieldToBasic(instance: Entity, field: String, value: FragmentData): Dynamic

Pass through the FragmentData value without conversion.

Since FragmentData is already in a serializable format, no transformation is needed.

Name Type Description
instance Entity The entity that owns this field
field String The name of the field being converted
value FragmentData The FragmentData value to pass through
Returns Description
Dynamic The same FragmentData value

new(): Void

Create a new fragment data converter instance.