Engine API Reference - v2.25.0-beta.13
    Preparing search index...

    Class AppOptions

    AppOptions holds configuration settings utilized in the creation of an AppBase instance. It allows functionality to be included or excluded from the AppBase instance.

    Index
    assetPrefix: string

    Prefix to apply to asset urls before loading.

    batchManager: typeof BatchManager

    The BatchManager.

    componentSystems: typeof ComponentSystem[] = []

    The component systems the app requires. Component systems installed by a feature, such as the AnimComponentSystem by featureAnim, the ParticleSystemComponentSystem by featureParticles or the GSplatComponentSystem by featureGsplat, are not listed here, and neither is the CameraComponentSystem, which every application has. The order of the list does not matter: the systems are created in the order of ComponentSystem.order, which is also the order in which they handle the per-frame events.

    devtools: boolean = true

    Whether the app announces itself to developer tools, such as the PlayCanvas Inspector browser extension, so they can find and inspect it. Set to false to keep a production build from announcing itself. This is an opt-out, not a protection: code running on the page can still reach the app by other means. Defaults to true.

    elementInput: ElementInput

    Input handler for ElementComponents.

    features: Feature[] = []

    The features the app requires, such as featureAnim, featureParticles or featureGsplat. A feature brings in everything one piece of engine functionality needs, for example its component system and the resource handlers of its assets, and features the app does not list can be dropped from its bundle by tree-shaking. Features a listed feature depends on are installed with it.

    const options = new AppOptions();
    options.features = [featureAnim];
    gamepads: GamePads

    Gamepad handler for input.

    graphicsDevice: GraphicsDevice

    The graphics device.

    keyboard: Keyboard

    Keyboard handler for input.

    lightmapper: typeof Lightmapper

    The lightmapper.

    mouse: Mouse

    Mouse handler for input.

    physicsWorld: PhysicsWorld

    The physics backend used to simulate rigid bodies, collisions and joints, such as AmmoPhysicsWorld or NullPhysicsWorld. When set, the application installs it into the RigidBodyComponentSystem during AppBase#init, so AppOptions#componentSystems must include RigidBodyComponentSystem. A useful simulation also requires CollisionComponentSystem - rigid bodies and triggers obtain their shapes from collision components - and JointComponentSystem if joints are used. The rigid body system registers its contact listener with the world. When omitted, an AmmoPhysicsWorld is created automatically once application libraries have loaded, if the Ammo.js WasmModule is present. The application takes ownership of the world and destroys it with the application.

    resourceHandlers: typeof ResourceHandler[] = []

    The resource handlers the app requires. Resource handlers installed by a feature, such as the GSplatHandler by featureGsplat, are not listed here.

    scriptPrefix: string

    Prefix to apply to script urls before loading.

    scriptsOrder: string[]

    Scripts in order of loading first.

    soundManager: SoundManager

    The sound manager

    TouchDevice handler for input.

    xr: typeof XrManager

    The XrManager.