|
@@ -3,9 +3,19 @@ module BABYLON {
|
|
|
* Google Daydream controller
|
|
|
*/
|
|
|
export class DaydreamController extends WebVRController {
|
|
|
- public static MODEL_BASE_URL:string = 'https://controllers.babylonjs.com/generic/';
|
|
|
- public static MODEL_FILENAME:string = 'generic.babylon';
|
|
|
+ /**
|
|
|
+ * Base Url for the controller model.
|
|
|
+ */
|
|
|
+ public static MODEL_BASE_URL: string = 'https://controllers.babylonjs.com/generic/';
|
|
|
|
|
|
+ /**
|
|
|
+ * File name for the controller model.
|
|
|
+ */
|
|
|
+ public static MODEL_FILENAME: string = 'generic.babylon';
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Gamepad Id prefix used to identify Gear VR Controller.
|
|
|
+ */
|
|
|
public static readonly GAMEPAD_ID_PREFIX: string = 'Daydream'; // id is 'Daydream Controller'
|
|
|
|
|
|
constructor(vrGamepad: any) {
|
|
@@ -24,7 +34,7 @@ module BABYLON {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- protected handleButtonChange(buttonIdx: number, state: ExtendedGamepadButton, changes: GamepadButtonChanges) {
|
|
|
+ protected _handleButtonChange(buttonIdx: number, state: ExtendedGamepadButton, changes: GamepadButtonChanges) {
|
|
|
// Daydream controller only has 1 GamepadButton (on the trackpad).
|
|
|
if (buttonIdx === 0) {
|
|
|
let observable = this.onTriggerStateChangedObservable;
|