Skip to content

Commit f743204

Browse files
author
Spongman
committed
add missing createCanvas() call, fix typo
1 parent e13c9ca commit f743204

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/webgl/material.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ p5.prototype.loadShader = function(vertFilename, fragFilename) {
6363
* @example
6464
* <div modernizr='webgl'>
6565
* <code>
66-
* // the 'varying's are shader between both vertex & fragment shaders
66+
* // the 'varying's are shared between both vertex & fragment shaders
6767
* var varying = 'precision highp float; varying vec2 vPos;';
6868
*
6969
* // the vertex shader is called for each vertex
@@ -93,6 +93,8 @@ p5.prototype.loadShader = function(vertFilename, fragFilename) {
9393
*
9494
* var mandel;
9595
* function setup() {
96+
* createCanvas(100, 100, WEBGL);
97+
*
9698
* // create and initialize the shader
9799
* mandel = createShader(vs, fs);
98100
* shader(mandel);

0 commit comments

Comments
 (0)