Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb859f9

Browse files
Merge pull request ParticulaCode#4 from W0NDERBREAD/feature/add-onrollstart-api-docs
Adding missing onRollStart method to the API docs
2 parents ad07207 + 850a486 commit eb859f9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,18 @@ Events:
240240
let accZ = xyzAccRaw[2];
241241
};
242242
```
243+
244+
245+
```javascript
246+
/**
247+
* When the die has started rolling the function "onRollStart" will be called from the GoDice class with the following parameter:
248+
* @param {string} diceId - the die unique identifier
249+
*/
250+
251+
// example:
252+
253+
GoDice.prototype.onRollStart = (diceId) => {
254+
// die unique identifier
255+
let dieIdentifier = diceID;
256+
};
257+
```

0 commit comments

Comments
 (0)