@@ -123,7 +123,7 @@ function rendering(p5, fn){
123
123
* @param {HTMLCanvasElement } [canvas]
124
124
* @return {p5.Renderer }
125
125
*/
126
- p5 . prototype . createCanvas = function ( w , h , renderer , ...args ) {
126
+ fn . createCanvas = function ( w , h , renderer , ...args ) {
127
127
// p5._validateParameters('createCanvas', arguments);
128
128
//optional: renderer, otherwise defaults to p2d
129
129
@@ -239,7 +239,7 @@ function rendering(p5, fn){
239
239
* </code>
240
240
* </div>
241
241
*/
242
- p5 . prototype . resizeCanvas = function ( w , h , noRedraw ) {
242
+ fn . resizeCanvas = function ( w , h , noRedraw ) {
243
243
// p5._validateParameters('resizeCanvas', arguments);
244
244
if ( this . _renderer ) {
245
245
// Make sure width and height are updated before the renderer resizes so
@@ -274,7 +274,7 @@ function rendering(p5, fn){
274
274
* </code>
275
275
* </div>
276
276
*/
277
- p5 . prototype . noCanvas = function ( ) {
277
+ fn . noCanvas = function ( ) {
278
278
if ( this . canvas ) {
279
279
this . canvas . parentNode . removeChild ( this . canvas ) ;
280
280
}
@@ -392,7 +392,7 @@ function rendering(p5, fn){
392
392
* @param {HTMLCanvasElement } [canvas]
393
393
* @return {p5.Graphics }
394
394
*/
395
- p5 . prototype . createGraphics = function ( w , h , ...args ) {
395
+ fn . createGraphics = function ( w , h , ...args ) {
396
396
/**
397
397
* args[0] is expected to be renderer
398
398
* args[1] is expected to be canvas
@@ -541,7 +541,7 @@ function rendering(p5, fn){
541
541
* </code>
542
542
* </div>
543
543
*/
544
- p5 . prototype . createFramebuffer = function ( options ) {
544
+ fn . createFramebuffer = function ( options ) {
545
545
return new Framebuffer ( this . _renderer , options ) ;
546
546
} ;
547
547
@@ -625,7 +625,7 @@ function rendering(p5, fn){
625
625
* </code>
626
626
* </div>
627
627
*/
628
- p5 . prototype . clearDepth = function ( depth ) {
628
+ fn . clearDepth = function ( depth ) {
629
629
this . _assert3d ( 'clearDepth' ) ;
630
630
this . _renderer . clearDepth ( depth ) ;
631
631
} ;
0 commit comments