File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1204
1204
* }
1205
1205
* </code>
1206
1206
* </div>
1207
+ *
1208
+ * <div>
1209
+ * <code>
1210
+ * let font;
1211
+ *
1212
+ * async function setup() {
1213
+ * // Load a font for WebGL mode.
1214
+ * font = await loadFont('assets/inconsolata.otf');
1215
+ *
1216
+ * createCanvas(100, 100, WEBGL);
1217
+ *
1218
+ * describe(
1219
+ * "A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse."
1220
+ * );
1221
+ * }
1222
+ *
1223
+ * function draw() {
1224
+ * background(200);
1225
+ *
1226
+ * // Style the text.
1227
+ * textAlign(CENTER);
1228
+ * textSize(16);
1229
+ * textFont(font);
1230
+ * fill(0);
1231
+ *
1232
+ * // Display the mouse's coordinates.
1233
+ * text(`x: ${mouseX} y: ${mouseY}`, 0, 0);
1234
+ * }
1235
+ * </code>
1236
+ * </div>
1207
1237
*/
1208
1238
1209
1239
/**
You can’t perform that action at this time.
0 commit comments