@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
71 lines (70 loc) • 2.2 kB
TypeScript
import type { Nullable } from "../types.js";
import { Scene } from "../scene.js";
import type { ISceneComponent } from "../sceneComponent.js";
import { GamepadManager } from "./gamepadManager.js";
declare module "../scene.js" {
interface Scene {
/** @internal */
_gamepadManager: Nullable<GamepadManager>;
/**
* Gets the gamepad manager associated with the scene
* @see https://doc.babylonjs.com/features/featuresDeepDive/input/gamepads
*/
gamepadManager: GamepadManager;
}
}
declare module "../Cameras/freeCameraInputsManager.js" {
/**
* Interface representing a free camera inputs manager
*/
interface FreeCameraInputsManager {
/**
* Adds gamepad input support to the FreeCameraInputsManager.
* @returns the FreeCameraInputsManager
*/
addGamepad(): FreeCameraInputsManager;
}
}
declare module "../Cameras/arcRotateCameraInputsManager.js" {
/**
* Interface representing an arc rotate camera inputs manager
*/
interface ArcRotateCameraInputsManager {
/**
* Adds gamepad input support to the ArcRotateCamera InputManager.
* @returns the camera inputs manager
*/
addGamepad(): ArcRotateCameraInputsManager;
}
}
/**
* Defines the gamepad scene component responsible to manage gamepads in a given scene
*/
export declare class GamepadSystemSceneComponent implements ISceneComponent {
/**
* The component name helpfull to identify the component in the list of scene components.
*/
readonly name = "Gamepad";
/**
* The scene the component belongs to.
*/
scene: Scene;
/**
* Creates a new instance of the component for the given scene
* @param scene Defines the scene to register the component in
*/
constructor(scene: Scene);
/**
* Registers the component in a given scene
*/
register(): void;
/**
* Rebuilds the elements related to this component in case of
* context lost for instance.
*/
rebuild(): void;
/**
* Disposes the component and the associated resources
*/
dispose(): void;
}