gamepadCamera.js 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. import { UniversalCamera } from "./universalCamera.js";
  2. import { Vector3 } from "../Maths/math.vector.js";
  3. import { Node } from "../node.js";
  4. Node.AddNodeConstructor("GamepadCamera", (name, scene) => {
  5. return () => new GamepadCamera(name, Vector3.Zero(), scene);
  6. });
  7. /**
  8. * This represents a FPS type of camera. This is only here for back compat purpose.
  9. * Please use the UniversalCamera instead as both are identical.
  10. * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#universal-camera
  11. */
  12. export class GamepadCamera extends UniversalCamera {
  13. /**
  14. * Instantiates a new Gamepad Camera
  15. * This represents a FPS type of camera. This is only here for back compat purpose.
  16. * Please use the UniversalCamera instead as both are identical.
  17. * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#universal-camera
  18. * @param name Define the name of the camera in the scene
  19. * @param position Define the start position of the camera in the scene
  20. * @param scene Define the scene the camera belongs to
  21. */
  22. constructor(name, position, scene) {
  23. super(name, position, scene);
  24. }
  25. /**
  26. * Gets the current object class name.
  27. * @returns the class name
  28. */
  29. getClassName() {
  30. return "GamepadCamera";
  31. }
  32. }
  33. //# sourceMappingURL=gamepadCamera.js.map