Skip to content

Commit

Permalink
Change loadModel example
Browse files Browse the repository at this point in the history
  • Loading branch information
TanviKumar committed Jul 3, 2018
1 parent 0851837 commit 5944b1f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
16 changes: 16 additions & 0 deletions docs/yuidoc-p5-theme/assets/octahedron.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
v 0.000000E+00 0.000000E+00 40.0000
v 22.5000 22.5000 0.000000E+00
v 22.5000 -22.5000 0.000000E+00
v -22.5000 -22.5000 0.000000E+00
v -22.5000 22.5000 0.000000E+00
v 0.000000E+00 0.000000E+00 -40.0000

f 1 2 3
f 1 3 4
f 1 4 5
f 1 5 2
f 6 5 4
f 6 4 3
f 6 3 2
f 6 2 1
f 6 1 5
10 changes: 5 additions & 5 deletions src/webgl/loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ require('./p5.Geometry');
* @example
* <div>
* <code>
* //draw a spinning teapot
* var teapot;
* //draw a spinning octahedron
* var octahedron;
*
* function preload() {
* teapot = loadModel('assets/teapot.obj');
* octahedron = loadModel('assets/octahedron.obj');
* }
*
* function setup() {
Expand All @@ -50,13 +50,13 @@ require('./p5.Geometry');
* background(200);
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* model(teapot);
* model(octahedron);
* }
* </code>
* </div>
*
* @alt
* Vertically rotating 3-d teapot with red, green and blue gradient.
* Vertically rotating 3-d teapot octahedron.
*/
/**
* @method loadModel
Expand Down

0 comments on commit 5944b1f

Please sign in to comment.