@rbxts/device
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Device

A utility to get device information.

Useful for knowing what controls to assign to a user, or a custom experience/UI per platform/device.

GetPlatformType()

Returns the platform type

  • console - Is XBox
  • desktop - Is Windows or MacOS
  • tablet - Is iOS or Android tablet
  • phone Is iOS or Android phone

GetAspectRatio

Gets the aspect ratio of the screen

Returns an array of two numbers, e.g. a 1920x1080 screen will give you [16, 9]

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i @rbxts/device

    Weekly Downloads

    1

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    3.64 kB

    Total Files

    6

    Last publish

    Collaborators

    • vorlias