custom-actions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
custom-actions [2023/01/08 23:52] – created renickcustom-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,beat) => {do something here} 
- 
-(player,beat) => {myAction()} 
- 
-store them in the actions property of the MusicalEnvironment as a key with the action name and the function as the value. 
- 
-e.addAction('actionName',action function) 
- 
-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 
- 
  
  • custom-actions.1673250720.txt.gz
  • Last modified: 2023/01/08 23:52
  • by renick