Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| custom-actions [2023/01/08 23:52] – created renick | custom-actions [2024/02/08 23:23] (current) – removed steve.wang | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== How to write an action function ====== | ||
| - | |||
| - | include arguments for player and current beat | ||
| - | |||
| - | (player, | ||
| - | |||
| - | (player, | ||
| - | |||
| - | store them in the actions property of the MusicalEnvironment as a key with the action name and the function as the value. | ||
| - | |||
| - | e.addAction(' | ||
| - | |||
| - | Because JavaScript is single threaded, a computationally heavy action function could block the next events, and that's especially weird for events that are supposed to be simultaneous or temporally near. | ||
| - | |||
| - | needs a WebSocket tutorial | ||
| - | |||