funground 0.1.0__py3-none-any.whl

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.
Files changed (275) hide show
  1. funground/__init__.py +449 -0
  2. funground/_colornames.py +678 -0
  3. funground/analysis.py +451 -0
  4. funground/api.py +4046 -0
  5. funground/capabilities.py +44 -0
  6. funground/color.py +483 -0
  7. funground/controls.py +526 -0
  8. funground/data/ragas.json +973 -0
  9. funground/data/sRGB.icc +0 -0
  10. funground/examples/animation/01_bounce.py +44 -0
  11. funground/examples/animation/02_time_based.py +44 -0
  12. funground/examples/animation/03_clock.py +61 -0
  13. funground/examples/animation/04_pause.py +62 -0
  14. funground/examples/animation/05_record_a_gif.py +44 -0
  15. funground/examples/basics/01_first_sketch.py +34 -0
  16. funground/examples/basics/02_setup_and_draw.py +46 -0
  17. funground/examples/basics/03_a_script.py +55 -0
  18. funground/examples/basics/04_without_f.py +50 -0
  19. funground/examples/colour/01_colour_forms.py +48 -0
  20. funground/examples/colour/02_hsb_and_hsl.py +57 -0
  21. funground/examples/colour/03_gradients.py +56 -0
  22. funground/examples/colour/04_color_mode.py +62 -0
  23. funground/examples/colour/05_cmyk_poster.py +70 -0
  24. funground/examples/compositing/01_blend_opacity_shadow.py +74 -0
  25. funground/examples/compositing/02_graphics.py +55 -0
  26. funground/examples/compositing/03_scratch_card.py +73 -0
  27. funground/examples/compositing/04_layers.py +65 -0
  28. funground/examples/curves/01_curves.py +89 -0
  29. funground/examples/documents/01_booklet.py +92 -0
  30. funground/examples/documents/02_flip_book.py +43 -0
  31. funground/examples/images/01_load_image.py +55 -0
  32. funground/examples/images/02_tint_and_parts.py +69 -0
  33. funground/examples/images/03_pixels.py +124 -0
  34. funground/examples/images/04_filters.py +110 -0
  35. funground/examples/images/05_svg.py +72 -0
  36. funground/examples/images/data/badge.svg +19 -0
  37. funground/examples/images/data/make_photo.py +47 -0
  38. funground/examples/images/data/photo.jpg +0 -0
  39. funground/examples/interaction/01_follow_the_mouse.py +44 -0
  40. funground/examples/interaction/02_paint.py +74 -0
  41. funground/examples/interaction/03_keyboard_mover.py +68 -0
  42. funground/examples/interaction/04_window.py +65 -0
  43. funground/examples/interaction/05_controls.py +62 -0
  44. funground/examples/lines/01_fill_and_stroke.py +51 -0
  45. funground/examples/lines/02_caps_joins_dashes.py +69 -0
  46. funground/examples/lines/03_pixel_art.py +59 -0
  47. funground/examples/maths/01_map_and_lerp.py +51 -0
  48. funground/examples/motion/01_movers.py +66 -0
  49. funground/examples/music/01_tap_along.py +102 -0
  50. funground/examples/music/02_see_a_chord.py +112 -0
  51. funground/examples/music/03_sing_with_the_drone.py +120 -0
  52. funground/examples/music/04_hear_a_raga.py +135 -0
  53. funground/examples/music/05_tala.py +111 -0
  54. funground/examples/music/06_see_your_voice.py +84 -0
  55. funground/examples/music/07_a_songs_fingerprint.py +81 -0
  56. funground/examples/music/08_draw_a_wave.py +198 -0
  57. funground/examples/music/09_compose_and_save.py +226 -0
  58. funground/examples/music/10_ear_training.py +284 -0
  59. funground/examples/music/11_piano_roll.py +168 -0
  60. funground/examples/paths/01_star.py +55 -0
  61. funground/examples/paths/02_path_and_clip.py +54 -0
  62. funground/examples/paths/03_no_clip.py +47 -0
  63. funground/examples/paths/04_holes.py +60 -0
  64. funground/examples/paths/05_booleans.py +94 -0
  65. funground/examples/paths/06_outlines.py +97 -0
  66. funground/examples/projects/01_event_posters.py +375 -0
  67. funground/examples/projects/02_rangoli.py +173 -0
  68. funground/examples/projects/03_raga_explorer.py +365 -0
  69. funground/examples/projects/04_voice_game.py +452 -0
  70. funground/examples/projects/05_typographic_portrait.py +171 -0
  71. funground/examples/projects/06_kinetic_type.py +172 -0
  72. funground/examples/projects/07_scratch_card.py +253 -0
  73. funground/examples/projects/08_flow_field_print.py +186 -0
  74. funground/examples/randomness/01_confetti.py +43 -0
  75. funground/examples/randomness/02_gaussian_and_choice.py +41 -0
  76. funground/examples/randomness/03_noise.py +62 -0
  77. funground/examples/saving/01_save_a_picture.py +42 -0
  78. funground/examples/saving/02_transparent_png.py +38 -0
  79. funground/examples/saving/03_save_frames.py +45 -0
  80. funground/examples/saving/04_poster_file.py +87 -0
  81. funground/examples/shapes/01_basic_shapes.py +43 -0
  82. funground/examples/shapes/02_more_shapes.py +54 -0
  83. funground/examples/shapes/03_modes.py +102 -0
  84. funground/examples/shapes/04_rounded.py +76 -0
  85. funground/examples/sound/01_visualiser.py +55 -0
  86. funground/examples/sound/02_write_a_tune.py +104 -0
  87. funground/examples/sound/03_sargam_over_a_drone.py +152 -0
  88. funground/examples/sound/04_tuner.py +106 -0
  89. funground/examples/sound/data/make_tune.py +65 -0
  90. funground/examples/sound/data/tune.wav +0 -0
  91. funground/examples/studios/01_placement.py +52 -0
  92. funground/examples/studios/02_proximity.py +46 -0
  93. funground/examples/studios/03_rhythm.py +82 -0
  94. funground/examples/studios/04_boolean_shapes.py +56 -0
  95. funground/examples/studios/05_text_as_geometry.py +49 -0
  96. funground/examples/studios/06_poster_series.py +92 -0
  97. funground/examples/text/01_text.py +45 -0
  98. funground/examples/text/02_align.py +60 -0
  99. funground/examples/text/03_text_box.py +62 -0
  100. funground/examples/text/04_fonts.py +56 -0
  101. funground/examples/text/05_text_path.py +78 -0
  102. funground/examples/text/06_tracking_and_features.py +80 -0
  103. funground/examples/text/07_formatted.py +82 -0
  104. funground/examples/text/08_variations.py +51 -0
  105. funground/examples/text/09_text_dots.py +59 -0
  106. funground/examples/text/10_fallback.py +75 -0
  107. funground/examples/text/11_fitted_headline.py +62 -0
  108. funground/examples/text/12_justified_columns.py +84 -0
  109. funground/examples/text/13_text_on_a_path.py +102 -0
  110. funground/examples/text/fonts/DejaVu-LICENSE.txt +187 -0
  111. funground/examples/text/fonts/DejaVuSansMono.ttf +0 -0
  112. funground/examples/transforms/01_rotating_squares.py +43 -0
  113. funground/examples/transforms/02_saved_state.py +51 -0
  114. funground/examples/transforms/03_shear_and_matrices.py +61 -0
  115. funground/exploring.py +476 -0
  116. funground/export/__init__.py +299 -0
  117. funground/export/cmyk.py +70 -0
  118. funground/export/layers.py +474 -0
  119. funground/export/motion.py +185 -0
  120. funground/export/pdf_colour.py +295 -0
  121. funground/export/pdf_text.py +526 -0
  122. funground/export/printing.py +126 -0
  123. funground/export/svg_text.py +506 -0
  124. funground/fonts/DejaVu-LICENSE.txt +187 -0
  125. funground/fonts/DejaVuSans-Bold.ttf +0 -0
  126. funground/fonts/DejaVuSans-BoldOblique.ttf +0 -0
  127. funground/fonts/DejaVuSans-Oblique.ttf +0 -0
  128. funground/fonts/DejaVuSans.ttf +0 -0
  129. funground/fonts/Noto-OFL.txt +105 -0
  130. funground/fonts/NotoEmoji-Regular.ttf +0 -0
  131. funground/fonts/NotoSansDevanagari-Regular.ttf +0 -0
  132. funground/fonts/NotoSansSymbols2-Regular.ttf +0 -0
  133. funground/formatted.py +374 -0
  134. funground/gallery.py +997 -0
  135. funground/gallery_images/animation-01_bounce.png +0 -0
  136. funground/gallery_images/animation-02_time_based.png +0 -0
  137. funground/gallery_images/animation-03_clock.png +0 -0
  138. funground/gallery_images/animation-04_pause.png +0 -0
  139. funground/gallery_images/animation-05_record_a_gif.png +0 -0
  140. funground/gallery_images/basics-01_first_sketch.png +0 -0
  141. funground/gallery_images/basics-02_setup_and_draw.png +0 -0
  142. funground/gallery_images/basics-03_a_script.png +0 -0
  143. funground/gallery_images/basics-04_without_f.png +0 -0
  144. funground/gallery_images/colour-01_colour_forms.png +0 -0
  145. funground/gallery_images/colour-02_hsb_and_hsl.png +0 -0
  146. funground/gallery_images/colour-03_gradients.png +0 -0
  147. funground/gallery_images/colour-04_color_mode.png +0 -0
  148. funground/gallery_images/colour-05_cmyk_poster.png +0 -0
  149. funground/gallery_images/compositing-01_blend_opacity_shadow.png +0 -0
  150. funground/gallery_images/compositing-02_graphics.png +0 -0
  151. funground/gallery_images/compositing-03_scratch_card.png +0 -0
  152. funground/gallery_images/compositing-04_layers.png +0 -0
  153. funground/gallery_images/curves-01_curves.png +0 -0
  154. funground/gallery_images/documents-01_booklet.png +0 -0
  155. funground/gallery_images/documents-02_flip_book.png +0 -0
  156. funground/gallery_images/images-01_load_image.png +0 -0
  157. funground/gallery_images/images-02_tint_and_parts.png +0 -0
  158. funground/gallery_images/images-03_pixels.png +0 -0
  159. funground/gallery_images/images-04_filters.png +0 -0
  160. funground/gallery_images/images-05_svg.png +0 -0
  161. funground/gallery_images/interaction-01_follow_the_mouse.png +0 -0
  162. funground/gallery_images/interaction-02_paint.png +0 -0
  163. funground/gallery_images/interaction-03_keyboard_mover.png +0 -0
  164. funground/gallery_images/interaction-04_window.png +0 -0
  165. funground/gallery_images/interaction-05_controls.png +0 -0
  166. funground/gallery_images/lines-01_fill_and_stroke.png +0 -0
  167. funground/gallery_images/lines-02_caps_joins_dashes.png +0 -0
  168. funground/gallery_images/lines-03_pixel_art.png +0 -0
  169. funground/gallery_images/maths-01_map_and_lerp.png +0 -0
  170. funground/gallery_images/motion-01_movers.png +0 -0
  171. funground/gallery_images/music-01_tap_along.png +0 -0
  172. funground/gallery_images/music-02_see_a_chord.png +0 -0
  173. funground/gallery_images/music-03_sing_with_the_drone.png +0 -0
  174. funground/gallery_images/music-04_hear_a_raga.png +0 -0
  175. funground/gallery_images/music-05_tala.png +0 -0
  176. funground/gallery_images/music-06_see_your_voice.png +0 -0
  177. funground/gallery_images/music-07_a_songs_fingerprint.png +0 -0
  178. funground/gallery_images/music-08_draw_a_wave.png +0 -0
  179. funground/gallery_images/music-09_compose_and_save.png +0 -0
  180. funground/gallery_images/music-10_ear_training.png +0 -0
  181. funground/gallery_images/music-11_piano_roll.png +0 -0
  182. funground/gallery_images/paths-01_star.png +0 -0
  183. funground/gallery_images/paths-02_path_and_clip.png +0 -0
  184. funground/gallery_images/paths-03_no_clip.png +0 -0
  185. funground/gallery_images/paths-04_holes.png +0 -0
  186. funground/gallery_images/paths-05_booleans.png +0 -0
  187. funground/gallery_images/paths-06_outlines.png +0 -0
  188. funground/gallery_images/projects-01_event_posters.png +0 -0
  189. funground/gallery_images/projects-02_rangoli.png +0 -0
  190. funground/gallery_images/projects-03_raga_explorer.png +0 -0
  191. funground/gallery_images/projects-04_voice_game.png +0 -0
  192. funground/gallery_images/projects-05_typographic_portrait.png +0 -0
  193. funground/gallery_images/projects-06_kinetic_type.png +0 -0
  194. funground/gallery_images/projects-07_scratch_card.png +0 -0
  195. funground/gallery_images/projects-08_flow_field_print.png +0 -0
  196. funground/gallery_images/randomness-01_confetti.png +0 -0
  197. funground/gallery_images/randomness-02_gaussian_and_choice.png +0 -0
  198. funground/gallery_images/randomness-03_noise.png +0 -0
  199. funground/gallery_images/saving-01_save_a_picture.png +0 -0
  200. funground/gallery_images/saving-02_transparent_png.png +0 -0
  201. funground/gallery_images/saving-03_save_frames.png +0 -0
  202. funground/gallery_images/saving-04_poster_file.png +0 -0
  203. funground/gallery_images/shapes-01_basic_shapes.png +0 -0
  204. funground/gallery_images/shapes-02_more_shapes.png +0 -0
  205. funground/gallery_images/shapes-03_modes.png +0 -0
  206. funground/gallery_images/shapes-04_rounded.png +0 -0
  207. funground/gallery_images/sound-01_visualiser.png +0 -0
  208. funground/gallery_images/sound-02_write_a_tune.png +0 -0
  209. funground/gallery_images/sound-03_sargam_over_a_drone.png +0 -0
  210. funground/gallery_images/sound-04_tuner.png +0 -0
  211. funground/gallery_images/studios-01_placement.png +0 -0
  212. funground/gallery_images/studios-02_proximity.png +0 -0
  213. funground/gallery_images/studios-03_rhythm.png +0 -0
  214. funground/gallery_images/studios-04_boolean_shapes.png +0 -0
  215. funground/gallery_images/studios-05_text_as_geometry.png +0 -0
  216. funground/gallery_images/studios-06_poster_series.png +0 -0
  217. funground/gallery_images/text-01_text.png +0 -0
  218. funground/gallery_images/text-02_align.png +0 -0
  219. funground/gallery_images/text-03_text_box.png +0 -0
  220. funground/gallery_images/text-04_fonts.png +0 -0
  221. funground/gallery_images/text-05_text_path.png +0 -0
  222. funground/gallery_images/text-06_tracking_and_features.png +0 -0
  223. funground/gallery_images/text-07_formatted.png +0 -0
  224. funground/gallery_images/text-08_variations.png +0 -0
  225. funground/gallery_images/text-09_text_dots.png +0 -0
  226. funground/gallery_images/text-10_fallback.png +0 -0
  227. funground/gallery_images/text-11_fitted_headline.png +0 -0
  228. funground/gallery_images/text-12_justified_columns.png +0 -0
  229. funground/gallery_images/text-13_text_on_a_path.png +0 -0
  230. funground/gallery_images/transforms-01_rotating_squares.png +0 -0
  231. funground/gallery_images/transforms-02_saved_state.png +0 -0
  232. funground/gallery_images/transforms-03_shear_and_matrices.png +0 -0
  233. funground/geometry.py +638 -0
  234. funground/global_style.py +102 -0
  235. funground/hindustani.py +506 -0
  236. funground/imaging.py +376 -0
  237. funground/ir.py +418 -0
  238. funground/llms-full.txt +9360 -0
  239. funground/llms.txt +111 -0
  240. funground/marks.py +615 -0
  241. funground/microphone_input.py +373 -0
  242. funground/noise.py +104 -0
  243. funground/pages.py +34 -0
  244. funground/paint.py +84 -0
  245. funground/pathops.py +186 -0
  246. funground/paths.py +531 -0
  247. funground/picture.py +574 -0
  248. funground/platform/__init__.py +1 -0
  249. funground/platform/base.py +129 -0
  250. funground/platform/browser.py +112 -0
  251. funground/platform/browser_audio.py +224 -0
  252. funground/platform/headless.py +112 -0
  253. funground/platform/pygame_platform.py +394 -0
  254. funground/renderers/__init__.py +32 -0
  255. funground/renderers/cairo2d.py +834 -0
  256. funground/shapes.py +178 -0
  257. funground/sketch.py +2629 -0
  258. funground/sound.py +1007 -0
  259. funground/sound_views.py +303 -0
  260. funground/state.py +123 -0
  261. funground/surface.py +629 -0
  262. funground/svg.py +390 -0
  263. funground/synth.py +692 -0
  264. funground/typography.py +962 -0
  265. funground/vector.py +520 -0
  266. funground/web.py +143 -0
  267. funground-0.1.0.dist-info/METADATA +143 -0
  268. funground-0.1.0.dist-info/RECORD +275 -0
  269. funground-0.1.0.dist-info/WHEEL +5 -0
  270. funground-0.1.0.dist-info/licenses/LICENSE +501 -0
  271. funground-0.1.0.dist-info/licenses/THIRD_PARTY_LICENSES.md +62 -0
  272. funground-0.1.0.dist-info/licenses/examples/LICENSE +121 -0
  273. funground-0.1.0.dist-info/licenses/funground/fonts/DejaVu-LICENSE.txt +187 -0
  274. funground-0.1.0.dist-info/licenses/funground/fonts/Noto-OFL.txt +105 -0
  275. funground-0.1.0.dist-info/top_level.txt +1 -0
funground/__init__.py ADDED
@@ -0,0 +1,449 @@
1
+ """A tiny teaching-friendly visual programming wrapper around pygame-ce.
2
+
3
+ Typical use::
4
+
5
+ import funground as f
6
+
7
+ x = 50
8
+
9
+ def setup():
10
+ f.size(640, 400)
11
+
12
+ def draw():
13
+ global x
14
+ f.background("white")
15
+ f.circle(x, f.height / 2, 40)
16
+ x += 2
17
+
18
+ f.run()
19
+ """
20
+
21
+ from . import api as _api
22
+ from .api import (
23
+ FormattedString,
24
+ Vector,
25
+ apply_filter,
26
+ apply_matrix,
27
+ arc,
28
+ background,
29
+ begin_contour,
30
+ begin_shape,
31
+ bezier,
32
+ bezier_point,
33
+ bezier_tangent,
34
+ bezier_vertex,
35
+ blend_mode,
36
+ circle,
37
+ clear,
38
+ clip,
39
+ cmyk,
40
+ color,
41
+ color_mode,
42
+ constrain,
43
+ create_button,
44
+ create_checkbox,
45
+ create_graphics,
46
+ create_slider,
47
+ cursor,
48
+ curve,
49
+ curve_point,
50
+ curve_tangent,
51
+ curve_tightness,
52
+ curve_vertex,
53
+ day,
54
+ degrees,
55
+ distance,
56
+ draw_path,
57
+ ellipse,
58
+ ellipse_mode,
59
+ end_contour,
60
+ end_shape,
61
+ exit,
62
+ fill,
63
+ filter,
64
+ frame_rate,
65
+ full_screen,
66
+ get,
67
+ hour,
68
+ hsb,
69
+ hsl,
70
+ image,
71
+ image_mode,
72
+ is_looping,
73
+ key_down,
74
+ hide_layer,
75
+ layer,
76
+ lerp,
77
+ lerp_color,
78
+ line,
79
+ linear_gradient,
80
+ load_font,
81
+ load_image,
82
+ load_pixels,
83
+ load_sound,
84
+ create_sound,
85
+ tone,
86
+ note,
87
+ pluck,
88
+ melody,
89
+ sequence,
90
+ mix,
91
+ note_to_frequency,
92
+ frequency_to_note,
93
+ chord_notes,
94
+ microphone,
95
+ microphones,
96
+ ragas,
97
+ raga,
98
+ talas,
99
+ tala_info,
100
+ tala,
101
+ drone,
102
+ match_ragas,
103
+ draw_wave,
104
+ draw_spectrum,
105
+ spectrogram,
106
+ draw_pitch_line,
107
+ load_svg,
108
+ loop,
109
+ mag,
110
+ map_range,
111
+ mark,
112
+ keep,
113
+ variations,
114
+ millis,
115
+ minute,
116
+ miter_limit,
117
+ month,
118
+ new_page,
119
+ no_clip,
120
+ no_cursor,
121
+ no_dash,
122
+ no_fill,
123
+ no_loop,
124
+ no_shadow,
125
+ no_smooth,
126
+ no_stroke,
127
+ no_erase,
128
+ no_tint,
129
+ noise,
130
+ noise_detail,
131
+ noise_seed,
132
+ norm,
133
+ erase,
134
+ opacity,
135
+ page_count,
136
+ page_size,
137
+ area,
138
+ grid,
139
+ inch,
140
+ mm,
141
+ path,
142
+ point,
143
+ polygon,
144
+ pop,
145
+ push,
146
+ quad,
147
+ quadratic_vertex,
148
+ radial_gradient,
149
+ radians,
150
+ random,
151
+ random_number,
152
+ random_choice,
153
+ random_gaussian,
154
+ random_seed,
155
+ rect,
156
+ rect_mode,
157
+ redraw,
158
+ reset_matrix,
159
+ resize_canvas,
160
+ rotate,
161
+ run,
162
+ save,
163
+ save_frames,
164
+ save_gif,
165
+ save_movie,
166
+ frame_duration,
167
+ saved_state,
168
+ scale,
169
+ second,
170
+ set,
171
+ set_pixel,
172
+ shadow,
173
+ shear_x,
174
+ shear_y,
175
+ show,
176
+ show_layer,
177
+ size,
178
+ smooth,
179
+ square,
180
+ stop,
181
+ stroke,
182
+ stroke_cap,
183
+ stroke_dash,
184
+ stroke_join,
185
+ stroke_width,
186
+ svg_paths,
187
+ text,
188
+ text_align,
189
+ text_ascent,
190
+ text_box,
191
+ text_descent,
192
+ text_font,
193
+ text_leading,
194
+ text_path,
195
+ text_to_points,
196
+ current_font,
197
+ text_size,
198
+ text_style,
199
+ text_tracking,
200
+ text_fallback,
201
+ system_font,
202
+ text_features,
203
+ font_variations,
204
+ text_width,
205
+ fit_text_size,
206
+ text_on_path,
207
+ tint,
208
+ translate,
209
+ triangle,
210
+ update_pixels,
211
+ vertex,
212
+ year,
213
+ )
214
+
215
+ __version__ = "0.1.0"
216
+
217
+ # The public names: the contract (tests/test_api_contract.py), the reference and the gallery cover each one.
218
+ _PUBLIC_NAMES = [
219
+ "FormattedString",
220
+ "Vector",
221
+ "apply_matrix",
222
+ "arc",
223
+ "background",
224
+ "begin_contour",
225
+ "begin_shape",
226
+ "bezier",
227
+ "bezier_point",
228
+ "bezier_tangent",
229
+ "bezier_vertex",
230
+ "blend_mode",
231
+ "circle",
232
+ "clear",
233
+ "clip",
234
+ "cmyk",
235
+ "color",
236
+ "color_mode",
237
+ "constrain",
238
+ "create_button",
239
+ "create_checkbox",
240
+ "create_graphics",
241
+ "create_slider",
242
+ "cursor",
243
+ "curve",
244
+ "curve_point",
245
+ "curve_tangent",
246
+ "curve_tightness",
247
+ "curve_vertex",
248
+ "day",
249
+ "degrees",
250
+ "distance",
251
+ "draw_path",
252
+ "ellipse",
253
+ "ellipse_mode",
254
+ "end_contour",
255
+ "end_shape",
256
+ "exit",
257
+ "fill",
258
+ "filter",
259
+ "apply_filter",
260
+ "frame_rate",
261
+ "full_screen",
262
+ "get",
263
+ "hour",
264
+ "hsb",
265
+ "hsl",
266
+ "image",
267
+ "image_mode",
268
+ "is_looping",
269
+ "key_down",
270
+ "hide_layer",
271
+ "layer",
272
+ "lerp",
273
+ "lerp_color",
274
+ "line",
275
+ "linear_gradient",
276
+ "load_font",
277
+ "load_image",
278
+ "load_pixels",
279
+ "load_sound",
280
+ "create_sound",
281
+ "tone",
282
+ "note",
283
+ "pluck",
284
+ "melody",
285
+ "sequence",
286
+ "mix",
287
+ "note_to_frequency",
288
+ "frequency_to_note",
289
+ "chord_notes",
290
+ "microphone",
291
+ "microphones",
292
+ "ragas",
293
+ "raga",
294
+ "talas",
295
+ "tala_info",
296
+ "tala",
297
+ "drone",
298
+ "match_ragas",
299
+ "draw_wave",
300
+ "draw_spectrum",
301
+ "spectrogram",
302
+ "draw_pitch_line",
303
+ "load_svg",
304
+ "loop",
305
+ "mag",
306
+ "map_range",
307
+ "mark",
308
+ "keep",
309
+ "variations",
310
+ "millis",
311
+ "minute",
312
+ "miter_limit",
313
+ "month",
314
+ "new_page",
315
+ "no_clip",
316
+ "no_cursor",
317
+ "no_dash",
318
+ "no_fill",
319
+ "no_loop",
320
+ "no_shadow",
321
+ "no_smooth",
322
+ "no_stroke",
323
+ "no_erase",
324
+ "no_tint",
325
+ "erase",
326
+ "noise",
327
+ "noise_detail",
328
+ "noise_seed",
329
+ "norm",
330
+ "opacity",
331
+ "page_count",
332
+ "page_size",
333
+ "area",
334
+ "grid",
335
+ "inch",
336
+ "mm",
337
+ "path",
338
+ "point",
339
+ "polygon",
340
+ "pop",
341
+ "push",
342
+ "quad",
343
+ "quadratic_vertex",
344
+ "radial_gradient",
345
+ "radians",
346
+ "random",
347
+ "random_number",
348
+ "random_choice",
349
+ "random_gaussian",
350
+ "random_seed",
351
+ "rect",
352
+ "rect_mode",
353
+ "redraw",
354
+ "reset_matrix",
355
+ "resize_canvas",
356
+ "rotate",
357
+ "run",
358
+ "save",
359
+ "save_frames",
360
+ "save_gif",
361
+ "save_movie",
362
+ "frame_duration",
363
+ "saved_state",
364
+ "scale",
365
+ "second",
366
+ "set",
367
+ "set_pixel",
368
+ "shadow",
369
+ "shear_x",
370
+ "shear_y",
371
+ "show",
372
+ "show_layer",
373
+ "size",
374
+ "smooth",
375
+ "square",
376
+ "stop",
377
+ "stroke",
378
+ "stroke_cap",
379
+ "stroke_dash",
380
+ "stroke_join",
381
+ "stroke_width",
382
+ "svg_paths",
383
+ "text",
384
+ "text_align",
385
+ "text_ascent",
386
+ "text_box",
387
+ "text_descent",
388
+ "text_font",
389
+ "text_leading",
390
+ "text_path",
391
+ "text_to_points",
392
+ "current_font",
393
+ "text_size",
394
+ "text_style",
395
+ "text_tracking",
396
+ "text_fallback",
397
+ "system_font",
398
+ "text_features",
399
+ "font_variations",
400
+ "text_width",
401
+ "fit_text_size",
402
+ "text_on_path",
403
+ "tint",
404
+ "translate",
405
+ "triangle",
406
+ "update_pixels",
407
+ "vertex",
408
+ "year",
409
+ "width",
410
+ "height",
411
+ "mouse_x",
412
+ "mouse_y",
413
+ "is_mouse_pressed",
414
+ "pmouse_x",
415
+ "pmouse_y",
416
+ "mouse_button",
417
+ "key",
418
+ "key_code",
419
+ "is_key_pressed",
420
+ "frame_count",
421
+ "delta_time",
422
+ "pixels",
423
+ "ground",
424
+ ]
425
+
426
+
427
+ # What ``from funground import *`` brings in (D-088, S-176): every public name except four that would hide Python's
428
+ # own: set, filter and exit are built-ins, and random is the standard-library module. There they are set_pixel(),
429
+ # apply_filter(), stop() and random_number(), the same functions under names that hide nothing (STAR_NAMES_FOR).
430
+ # tests/test_global_style.py keeps the list free of any built-in or standard-library name.
431
+ STAR_NAMES_FOR = {"exit": "stop", "filter": "apply_filter", "random": "random_number", "set": "set_pixel"}
432
+ STAR_LEAVES_OUT = tuple(sorted(STAR_NAMES_FOR))
433
+ __all__ = [name for name in _PUBLIC_NAMES if name not in STAR_LEAVES_OUT]
434
+
435
+ # D-016: v0.5's live value mouse_pressed became is_mouse_pressed, because mouse_pressed() is
436
+ # now the name of the callback (as in p5). The old name fails with a pointer to the new one.
437
+ _RENAMED = {
438
+ "mouse_pressed": "f.mouse_pressed was renamed to f.is_mouse_pressed (True while a mouse button is "
439
+ "held). To react to a click, define a function called mouse_pressed() in your sketch.",
440
+ }
441
+
442
+
443
+ def __getattr__(name: str):
444
+ """Expose live values without copying stale integers into this module."""
445
+ if name in _api.LIVE_NAMES:
446
+ return _api.live_value(name)
447
+ if name in _RENAMED:
448
+ raise AttributeError(_RENAMED[name])
449
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")