Skip to content

Commit

Permalink
Add second example
Browse files Browse the repository at this point in the history
  • Loading branch information
TanviKumar committed Jul 4, 2018
1 parent 5944b1f commit 44c99ff
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/webgl/loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,35 @@ require('./p5.Geometry');
*
* @alt
* Vertically rotating 3-d teapot octahedron.
*
* @example
* <div>
* <code>
* //draw a spinning teapot
* var teapot;
*
* function preload() {
* // Load model with normalise parameter set to true
* teapot = loadModel('assets/teapot.obj', true);
* }
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(200);
* scale(0.4); // Scaled to make model fit into canvas
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* normalMaterial(); // For effect
* model(teapot);
* }
* </code>
* </div>
*
* @alt
* Vertically rotating 3-d teapot with red, green and blue gradient.
*/
/**
* @method loadModel
Expand Down

0 comments on commit 44c99ff

Please sign in to comment.