Skip to content

Commit c1f7f19

Browse files
authored
Merge pull request #425 from hx2A/addlink
add link to user functions page
2 parents 83ce1de + a4571cd commit c1f7f19

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

py5_docs/Reference/api_en/Sketch.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ processing_name = PApplet
77
@@ description
88
Core py5 class for leveraging py5's functionality. This is analogous to the PApplet class in Processing. Launch the Sketch with the [](sketch_run_sketch) method.
99

10-
The core functions to be implemented by the py5 coder are `settings`, `setup`, and `draw`. The first two will be run once at Sketch initialization and the third will be run in an animation thread, once per frame. The following event functions are also supported:
10+
The core functions to be implemented by the py5 coder are `setup` and `draw`. The first will be run once at Sketch initialization and the second will be run in an animation thread, once per frame. The following event functions are also supported:
1111

1212
* `exiting`
1313
* `key_pressed`
@@ -22,7 +22,10 @@ The core functions to be implemented by the py5 coder are `settings`, `setup`, a
2222
* `mouse_released`
2323
* `mouse_wheel`
2424
* `movie_event`
25+
* `predraw_update`
2526
* `post_draw`
2627
* `pre_draw`
2728

28-
When coding in class mode, all of the above functions should be class methods. When coding in module mode or imported mode, the above functions should be stand-alone functions available in the local namespace in which [](sketch_run_sketch) was called.
29+
When coding in class mode, all of the above functions should be instance methods. When coding in module mode or imported mode, the above functions should be stand-alone functions available in the local namespace in which [](sketch_run_sketch) was called.
30+
31+
For more information, look at the online ["User Functions"](/content/user_functions) documentation.

0 commit comments

Comments
 (0)