Skip to content

Commit 2c01692

Browse files
authored
fixes
1 parent cf585ff commit 2c01692

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/core/reference.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,24 +1180,27 @@
11801180
* @example
11811181
* <div>
11821182
* <code>
1183-
* let img, data;
1183+
* // Click and drag the mouse to view the scene from different angles.
1184+
*
1185+
* let shape;
11841186
*
1187+
* // Load the file and create a p5.Geometry object.
11851188
* async function setup() {
1186-
* // Pause execution until the image is loaded.
1187-
* img = await loadImage("./assets/image.png");
1189+
* shape = await loadModel('/assets/teapot.obj');
11881190
*
1189-
* // Pause execution until the JSON data is loaded.
1190-
* data = await loadJSON("./assets/data.json");
1191+
* createCanvas(100, 100, WEBGL);
11911192
*
1192-
* // Create the canvas where the sketch is drawn.
1193-
* createCanvas(400, 400);
1193+
* describe('A white teapot drawn against a gray background.');
1194+
* }
11941195
*
1195-
* // Display the loaded image.
1196-
* background(220);
1197-
* image(img, 0, 0);
1196+
* function draw() {
1197+
* background(200);
1198+
*
1199+
* // Enable orbiting with the mouse.
1200+
* orbitControl();
11981201
*
1199-
* // Log the loaded JSON data to the console for debugging or inspection.
1200-
* console.log(data);
1202+
* // Draw the shape.
1203+
* model(shape);
12011204
* }
12021205
* </code>
12031206
* </div>

0 commit comments

Comments
 (0)