pixi.js
    Preparing search index...

    Variable isMobileConst

    isMobile: isMobileResult = ...

    Detects whether the device is mobile and what type of mobile device it is. Provides a comprehensive detection system for mobile platforms and devices.

    import { isMobile } from 'pixi.js';

    // Check specific device types
    if (isMobile.apple.tablet) {
    console.log('Running on iPad');
    }

    // Check platform categories
    if (isMobile.android.any) {
    console.log('Running on Android');
    }

    // Conditional rendering
    if (isMobile.phone) {
    renderer.resolution = 2;
    view.style.width = '100vw';
    }
    • Detects all major mobile platforms
    • Distinguishes between phones and tablets
    • Updates when navigator changes
    • Common in responsive design

    isMobileResult For full type definition