@momo2555/koppeliajs 0.0.157 → 0.0.159

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,8 @@ type Color = {
7
7
  r: number;
8
8
  g: number;
9
9
  b: number;
10
+ lon?: number;
11
+ loff?: number;
10
12
  };
11
13
  export declare class Device {
12
14
  private _address;
@@ -21,6 +23,7 @@ export declare class Device {
21
23
  get name(): string;
22
24
  onEvent(eventName: string, callback: () => void): void;
23
25
  onCursor(callback: (x: number, y: number) => void): void;
26
+ onBiking(callback: (speed: number) => void): void;
24
27
  onVerticalDetector(callback: (vertical: boolean) => void): void;
25
28
  private _attachEvent;
26
29
  private _enableModule;
@@ -48,6 +48,15 @@ export class Device {
48
48
  }
49
49
  });
50
50
  }
51
+ onBiking(callback) {
52
+ this._enableModule("biking");
53
+ this._attachEvent("biking");
54
+ this._console.onRequest((request, params, form, address) => {
55
+ if (request == "biking" && address == this._address) {
56
+ callback(params.speed);
57
+ }
58
+ });
59
+ }
51
60
  onVerticalDetector(callback) {
52
61
  this._enableModule("vDetct");
53
62
  this._attachEvent("verticalDetector");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo2555/koppeliajs",
3
- "version": "0.0.157",
3
+ "version": "0.0.159",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",