These utilities manage solid-three's per-instance metadata. Metadata lives on the three.js instance itself under a non-enumerable symbol key ($S3C) — there is no external WeakMap. Each entry stores the entity's solid-three props, its scene-graph parent, and its set of children.
meta(instance, augmentation?): Attachessolid-threemetadata toinstance(idempotent — re-applying is a no-op).augmentationdefaults to{ props: {} }; pass a{ props }object (commonly with a getter) when you want the entity's props to be reactive. Returns the same instance, narrowed toMeta<T>.getMeta(object): Returns the metadataData<T>attached toobject, orundefinedif no metadata is present.hasMeta(object): Type guard — returnstrue(narrowing toMeta<T>) when the object carries solid-three metadata.$S3C: TheSymbolkey used to store metadata on instances. Exposed for advanced introspection (e.g. directly readinginstance[$S3C]in custom integrations); prefergetMeta/hasMetain normal code.
import { getMeta, hasMeta, meta, $S3C } from "solid-three"
// Check if an object has solid-three metadataif (hasMeta(mesh)) { const metadata = getMeta(mesh) console.log(metadata.props, metadata.parent, metadata.children)}
// Attach metadata to a raw three.js instance (e.g. when integrating an existing object)const tagged = meta(new Mesh(), { props: {} })
// The symbol key, for direct access in advanced casestagged[$S3C] // same shape as getMeta(tagged)See also
useThree— itsgl,scene, andcameraare allMeta-tagged and can be inspected withgetMeta.
Last updated: 6/8/26, 11:20 AM