API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceNodeSerializer
@codexo/exojs / core / stable
Bidirectional serializer for one scene-graph node type. Registered against a type name + constructor in a SerializationRegistry. The framework owns the common transform/visual fields and the `type` tag; an implementation handles only the fields unique to its type.
0
props
2
methods
0
events
Import
import { NodeSerializer } from '@codexo/exojs'Bidirectional serializer for one scene-graph node type. Registered against a type name + constructor in a SerializationRegistry. The framework owns the common transform/visual fields and the `type` tag; an implementation handles only the fields unique to its type.
Methods2
read(data: SerializedNodePlain-old-JSON description of a single scene-graph node. Always carries a `type` tag (the registered type name) plus an open set of common transform/visual fie…, ctx: DeserializeContextContext handed to NodeSerializer.read. Mirror of SerializeContext for the inverse direction: child recursion and asset lookup. The framework applies the common…): TConstruct a fresh node from data and set its type-specific fields. The framework applies the common transform/visual fields afterwards, so do not read them here. Recurse into children via DeserializeContext.readNode.
write(node: T, ctx: SerializeContextContext handed to NodeSerializer.write. Carries the framework services a type serializer needs: recursion into children and asset-key resolution. The framework…): Record<string, unknown>Return the type-specific fields for node as a JSON-serialisable record. Do **not** include the type tag or common transform/visual fields - the framework adds those. Recurse into children via SerializeContext.writeNode.
Source