Writes a single option value and notifies the subclass of the change.
The value is stored on this.options, then updateForOptions(name, value)
is called so the subclass can react. this.options is lazily initialized
to an empty object on first write.
When a z.ZodObject static schema is declared and the key is part of
it, the value is checked against that field's schema. Validation is
currently soft: an invalid value logs a warning but is still written
through (this may be tightened in a future release). Keys absent from the
schema, and behaviors without a Zod schema, are written through unchanged.
Option key to write.
Value to store under name.
Resets internal behavior state. Default is a no-op for subclasses with no transient state to clear.
Optionaloptions: anyOptional options snapshot to reset against.
Updates the owned native camera from universal parameters.
Universal camera parameters to apply.
The owned native camera object (THREE.Camera, pc.Entity, ...).
The owned camera converted to universal parameters.
Records the viewport size used by the controller's parameter converter.
Viewport width in pixels.
Viewport height in pixels.
Hook invoked after every setOption write, receiving the option name
that changed and its new value. Default is a no-op; override in
subclasses that need to react to option changes (re-render, recompute
derived state, etc.). The arguments are advisory — many subclasses simply
re-read this.options and ignore them.
Optional_name: stringOptional_value: anyStaticdescriptionOptional human-readable description, surfaced in generated docs/UI.
StaticschemaOptional schema describing this behavior's option surface. Declared on
the subclass as static schema = {...} as const. When present, it drives
the build-time manifest dumper that surfaces the option set (with defaults
and types) to Python for automatic UI generation. A z.ZodObject schema
is additionally consulted by setOption to warn about invalid writes.
Subclass option dictionary ({ optionName: value }). Typed as any here
so the base class can read/write generically; subclasses narrow it.
Base for class-based camera controllers: tracks viewport dimensions and binds to the event canvas. Subclasses own the native camera and its conversion.