webXROculusTouchMotionController.d.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import type { IMinimalMotionControllerObject, MotionControllerHandedness } from "./webXRAbstractMotionController";
  2. import { WebXRAbstractMotionController } from "./webXRAbstractMotionController";
  3. import type { AbstractMesh } from "../../Meshes/abstractMesh";
  4. import type { Scene } from "../../scene";
  5. /**
  6. * The motion controller class for oculus touch (quest, rift).
  7. * This class supports legacy mapping as well the standard xr mapping
  8. */
  9. export declare class WebXROculusTouchMotionController extends WebXRAbstractMotionController {
  10. private _forceLegacyControllers;
  11. private _modelRootNode;
  12. /**
  13. * The base url used to load the left and right controller models
  14. */
  15. static MODEL_BASE_URL: string;
  16. /**
  17. * The name of the left controller model file
  18. */
  19. static MODEL_LEFT_FILENAME: string;
  20. /**
  21. * The name of the right controller model file
  22. */
  23. static MODEL_RIGHT_FILENAME: string;
  24. /**
  25. * Base Url for the Quest controller model.
  26. */
  27. static QUEST_MODEL_BASE_URL: string;
  28. profileId: string;
  29. constructor(scene: Scene, gamepadObject: IMinimalMotionControllerObject, handedness: MotionControllerHandedness, _legacyMapping?: boolean, _forceLegacyControllers?: boolean);
  30. protected _getFilenameAndPath(): {
  31. filename: string;
  32. path: string;
  33. };
  34. protected _getModelLoadingConstraints(): boolean;
  35. protected _processLoadedModel(_meshes: AbstractMesh[]): void;
  36. protected _setRootMesh(meshes: AbstractMesh[]): void;
  37. protected _updateModel(): void;
  38. /**
  39. * Is this the new type of oculus touch. At the moment both have the same profile and it is impossible to differentiate
  40. * between the touch and touch 2.
  41. * @returns true if this is the new type of oculus touch controllers.
  42. */
  43. private _isQuest;
  44. }