File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change 1180
1180
* @example
1181
1181
* <div>
1182
1182
* <code>
1183
- * let img, data;
1183
+ * // Click and drag the mouse to view the scene from different angles.
1184
+ *
1185
+ * let shape;
1184
1186
*
1187
+ * // Load the file and create a p5.Geometry object.
1185
1188
* 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');
1188
1190
*
1189
- * // Pause execution until the JSON data is loaded.
1190
- * data = await loadJSON("./assets/data.json");
1191
+ * createCanvas(100, 100, WEBGL);
1191
1192
*
1192
- * // Create the canvas where the sketch is drawn.
1193
- * createCanvas(400, 400);
1193
+ * describe('A white teapot drawn against a gray background.');
1194
+ * }
1194
1195
*
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();
1198
1201
*
1199
- * // Log the loaded JSON data to the console for debugging or inspection .
1200
- * console.log(data );
1202
+ * // Draw the shape .
1203
+ * model(shape );
1201
1204
* }
1202
1205
* </code>
1203
1206
* </div>
You can’t perform that action at this time.
0 commit comments