Skip to content

A JS library for using daydream controllers in Javascript!

License

Notifications You must be signed in to change notification settings

WebXR-iOS/daydream-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Daydream Controller

A JS library for using daydream controllers in Javascript!

How to use

Get controller api

var controller = new DaydreamController(); // returns Object

Connect to device

controller.connect(); // returns Bool

Disconnect from device

controller.disconnect(); // returns Undefined

Get all info

controller.getInfo(); // returns Object

{
  battery: int,
  model: string,
  serial: string,
  firmware: float,
  hardware: float,
  software: string,
  manufacturer: string,
  pnp_id: string
}

Get battery

controller.getBattery(); // returns Int (0 - 100)

Get model

controller.getModel(); // returns String

Get serial

controller.getSerial(); // returns String

Get firmware revision

controller.getFirmware(); // returns Float

Get hardware revision

controller.getHardware(); // returns Float

Get software revision

controller.getSoftware(); // returns String

Get manufacturer name

controller.getManufacturer(); // returns String

Get PnP ID

controller.getPnPID(); // returns String