See <ComponentProps>
A portion of the configuration object to pass to the DoorComponent constructor.
type DoorComponentPropsV1 = {
isOpen?: number | undefined;
};
type DoorComponentProps = DoorComponentPropsV1;isOpen(optional, defaultfalse)<boolean>
Creates a versioned Door component.
props<ComponentProps & DoorComponentProps>Configuration of the component to create.- Returns:
<DoorComponent>
import { DoorComponent } from 'att-string-transcoder';
const componentVersion = 1;
const component = new DoorComponent({ version: componentVersion });See Component.fromBinary(reader, version)
Note that the following properties are sorted in order of appearance when decoding component binary data.
See Component.hash
See Component.name
Reveals the open state of this component's prefab
- Since:
v1 <boolean>
import { DoorComponent } from 'att-string-transcoder';
const componentVersion = 1;
const component = new DoorComponent({ version: componentVersion });
const isOpen = component.isOpen;
// `isOpen` is `false`See Component.toBinary(version?)