Interface IMotionControllerLayout
interface IMotionControllerLayout {
assetPath: string;
components: {
[componentId: string]: {
gamepadIndices: { button?: number; xAxis?: number; yAxis?: number };
rootNodeName: string;
touchPointNodeName?: string;
type: MotionControllerComponentType;
visualResponses: {
[stateKey: string]: {
componentProperty: "state" | "button" | "xAxis" | "yAxis";
maxNodeName?: string;
minNodeName?: string;
states: MotionControllerComponentStateType[];
valueNodeName?: string;
valueNodeProperty: "transform" | "visibility";
};
};
};
};
gamepadMapping: ""
| "xr-standard";
rootNodeName: string;
selectComponentId: string;
}
assetPath: string;
components: {
[componentId: string]: {
gamepadIndices: { button?: number; xAxis?: number; yAxis?: number };
rootNodeName: string;
touchPointNodeName?: string;
type: MotionControllerComponentType;
visualResponses: {
[stateKey: string]: {
componentProperty: "state" | "button" | "xAxis" | "yAxis";
maxNodeName?: string;
minNodeName?: string;
states: MotionControllerComponentStateType[];
valueNodeName?: string;
valueNodeProperty: "transform" | "visibility";
};
};
};
};
gamepadMapping: ""
| "xr-standard";
rootNodeName: string;
selectComponentId: string;
}
Index
Properties
asset Path
assetPath: string
Path to load the assets. Usually relative to the base path
components
components: {
[componentId: string]: {
gamepadIndices: { button?: number; xAxis?: number; yAxis?: number };
rootNodeName: string;
touchPointNodeName?: string;
type: MotionControllerComponentType;
visualResponses: {
[stateKey: string]: {
componentProperty: "state" | "button" | "xAxis" | "yAxis";
maxNodeName?: string;
minNodeName?: string;
states: MotionControllerComponentStateType[];
valueNodeName?: string;
valueNodeProperty: "transform" | "visibility";
};
};
};
}
[componentId: string]: {
gamepadIndices: { button?: number; xAxis?: number; yAxis?: number };
rootNodeName: string;
touchPointNodeName?: string;
type: MotionControllerComponentType;
visualResponses: {
[stateKey: string]: {
componentProperty: "state" | "button" | "xAxis" | "yAxis";
maxNodeName?: string;
minNodeName?: string;
states: MotionControllerComponentStateType[];
valueNodeName?: string;
valueNodeProperty: "transform" | "visibility";
};
};
};
}
Available components (unsorted)
Type Declaration
-
[componentId: string]: {
gamepadIndices: { button?: number; xAxis?: number; yAxis?: number };
rootNodeName: string;
touchPointNodeName?: string;
type: MotionControllerComponentType;
visualResponses: {
[stateKey: string]: {
componentProperty: "state" | "button" | "xAxis" | "yAxis";
maxNodeName?: string;
minNodeName?: string;
states: MotionControllerComponentStateType[];
valueNodeName?: string;
valueNodeProperty: "transform" | "visibility";
};
};
}A map of component Ids
Type Declaration
-
gamepadIndices: { button?: number; xAxis?: number; yAxis?: number }
The indices of this component in the gamepad object
-
Optionalbutton?: numberIndex of button
-
OptionalxAxis?: numberIf available, index of x-axis
-
OptionalyAxis?: numberIf available, index of y-axis
-
-
rootNodeName: string
The mesh's root node name
-
OptionaltouchPointNodeName?: stringIf touch enabled, what is the name of node to display user feedback
-
type: MotionControllerComponentType
The type of input the component outputs
-
visualResponses: {
[stateKey: string]: {
componentProperty: "state" | "button" | "xAxis" | "yAxis";
maxNodeName?: string;
minNodeName?: string;
states: MotionControllerComponentStateType[];
valueNodeName?: string;
valueNodeProperty: "transform" | "visibility";
};
}Animation definitions for this model
-
gamepad Mapping
gamepadMapping: "" | "xr-standard"
Is it xr standard mapping or not
root Node Name
rootNodeName: string
Base root node of this entire model
select Component Id
selectComponentId: string
Defines the main button component id
The schema of motion controller layout. No object will be initialized using this interface This is used just to define the profile.