API Reference

Class List

platform

Global namespace that stores flags regarding platform environment and features support.

if (pc.platform.touch) {
    // touch is supported
}

Summary

Static Properties

android

If it is Android.

browser

Convenience boolean indicating whether we're running in the browser.

desktop

Is it a desktop or laptop device.

environment

String identifying the current runtime environment.

gamepads

If platform supports gamepads.

global

The global object.

ios

If it is iOS.

mobile

Is it a mobile or tablet device.

touch

If platform supports touch input.

windows

If it is Windows.

workers

If the platform supports Web Workers.

xbox

If it is Xbox.

Details

Static Properties

android

If it is Android.

browser

Convenience boolean indicating whether we're running in the browser.

desktop

Is it a desktop or laptop device.

environment

String identifying the current runtime environment. Either 'browser' or 'node'.

gamepads

If platform supports gamepads.

global

The global object. This will be the window object when running in a browser and the global object when running in nodejs.

ios

If it is iOS.

mobile

Is it a mobile or tablet device.

touch

If platform supports touch input.

windows

If it is Windows.

workers

If the platform supports Web Workers.

xbox

If it is Xbox.