See <ComponentProps>
A portion of the configuration object to pass to the PhysicalMaterialPartComponent
constructor.
type PhysicalMaterialPartComponentPropsV1 = {
materialHash?: number | undefined;
};
type PhysicalMaterialPartComponentProps = PhysicalMaterialPartComponentPropsV1;
materialHash
(optional, default1
)<PhysicalMaterialPartHash>
Creates a versioned PhysicalMaterialPart
component.
props
<ComponentProps & PhysicalMaterialPartComponentProps>
Configuration of the component to create.- Returns:
<PhysicalMaterialPartComponent>
import { PhysicalMaterialPartComponent } from 'att-string-transcoder';
const componentVersion = 1;
const component = new PhysicalMaterialPartComponent({ 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
The hash of the physical material of the prefab this component is attached to.
- Since:
v1
<PhysicalMaterialPartHash>
import { PhysicalMaterialPartComponent } from 'att-string-transcoder';
const componentVersion = 1;
const component = new PhysicalMaterialPartComponent({ version: componentVersion });
const materialHash = component.materialHash;
// `materialHash` is `1`
See Component.toBinary(version?)