File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,35 @@ require('./p5.Geometry');
57
57
*
58
58
* @alt
59
59
* Vertically rotating 3-d teapot octahedron.
60
+ *
61
+ * @example
62
+ * <div>
63
+ * <code>
64
+ * //draw a spinning teapot
65
+ * var teapot;
66
+ *
67
+ * function preload() {
68
+ * // Load model with normalise parameter set to true
69
+ * teapot = loadModel('assets/teapot.obj', true);
70
+ * }
71
+ *
72
+ * function setup() {
73
+ * createCanvas(100, 100, WEBGL);
74
+ * }
75
+ *
76
+ * function draw() {
77
+ * background(200);
78
+ * scale(0.4); // Scaled to make model fit into canvas
79
+ * rotateX(frameCount * 0.01);
80
+ * rotateY(frameCount * 0.01);
81
+ * normalMaterial(); // For effect
82
+ * model(teapot);
83
+ * }
84
+ * </code>
85
+ * </div>
86
+ *
87
+ * @alt
88
+ * Vertically rotating 3-d teapot with red, green and blue gradient.
60
89
*/
61
90
/**
62
91
* @method loadModel
You can’t perform that action at this time.
0 commit comments