Get an object containing all the axes of the controller. X360Controller has the following buttons:Īll of these buttons are instances of InputButton (documented below). This property differs between the controller types. Get an object containing all the buttons of the controller. but don't forget that you have to call update() yourself when in this mode. Set to "manual" if you often update multiple values at once. Per default the mode is set to "auto", which leads to every change of each button or axis to be sent to the driver instantly. Can only be accessed after connect() has been called. Either "Xbox360Wired", "XboxOneWired" or "DualShock4Wired". Get a string describing the type of the device. Most of the methods and properties are the same for both controller types and where they aren't, the differences will be made clear. ViGEmTargetīoth X360Controller and DS4Controller inherit from this class, but you can not instantiate it yourself. If the extended parameter is set to true, a DS4ControllerExtended will be instantiated, which gives access to an experimental feature, allowing access to gyro, accelerometer, trackpad and more, but which is otherwise exactly the same as DS4Controller. Returns null on success and an Error if there was an error.Ĭreate a new X360Controller instance, with this client as its parent.Ĭan only be called after a connection to the driver has been established.Ĭreate a new DS4Controller instance, with this client as its parent. Methods ViGEmClientĬonnect to the ViGEmBus driver. More examples can be found in the examples/ directory. setValue ( 1 ) // press in left trigger all the way controller. setValue ( - 0.5 ) // move left stick 50% down controller. setValue ( 0.5 ) // move left stick 50% to the left controller. connect ( ) // plug in the virtual controller // change some axes and buttons controller. connect ( ) // establish connection to the ViGEmBus driver let controller = client. Const ViGEmClient = require ( 'vigemclient' ) let client = new ViGEmClient ( ) client.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |