# noFill() not working in p5js

**URL:** <https://discourse.processing.org/t/nofill-not-working-in-p5js/22416>\
**Category:** Beginners\
**Created:** [July 6, 2020, 4:16pm UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416 "2020-07-06T16:16:44Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![CND](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@CND](https://discourse.processing.org/u/CND)\
**Post date:** [July 6, 2020, 4:16pm UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416/1 "2020-07-06T16:16:44Z")

</div>

noFill() in p5js is not working for me. Is this a bug?

---

<div class="post-metadata">

**Author:** ![CND](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@CND](https://discourse.processing.org/u/CND)\
**Post date:** [July 7, 2020, 12:31am UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416/3 "2020-07-07T00:31:45Z")

</div>

Please find below a sample of my issue.  
With noFill() the p5js box shows as wireframe.  
The custom trapezoid is still filled with orange.

var th = .345;  
var v = [0,0,0, 35,0,0, 35,0,47, 13,0,35];

function setup() {  
createCanvas(800, 600, WEBGL);  
}  
function draw() {  
background(204);  
rotateX(-0.345);  
scale(4);

fill(‘orange’);

noFill();  
rotateY(th);  
box(50);

th = th + .02;

```
beginShape();
	for (var i = 0; i < v.length; i+=3) {
            // adjust for right hand system that I have data from
		vertex(v[i], -v[i+2], -v[i+1]);
	}
endShape(CLOSE);

```

}

---

<div class="post-metadata">

**Author:** ![CND](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@CND](https://discourse.processing.org/u/CND)\
**Post date:** [July 7, 2020, 12:40am UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416/4 "2020-07-07T00:40:06Z")

</div>

I should mention that I am tis running under an index.html file with the p5.js source included along with my sample file… not in the editor. I read in an old noFill() discussion that this can make a difference.

---

<div class="post-metadata">

**Author:** ![CND](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@CND](https://discourse.processing.org/u/CND)\
**Post date:** [July 7, 2020, 6:20am UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416/5 "2020-07-07T06:20:50Z")

</div>

More testing on noFill(0)… The following code is straight from the Vertex example in the P5js reference. I only added noFill(). It works in the editor but not when included in the index.html src. This is a bug. Macintos OS10.12 and OS10.14. Can someone please try this in Windows? Thanx.

function setup() {  
createCanvas(800, 600, WEBGL);  
}  
function draw() {  
background(240, 240, 240);  
scale(3);  
fill(237, 34, 93);

//noStroke();  
noFill();  
beginShape();  
vertex(-10, 10);  
vertex(0, 35);  
vertex(10, 10);  
vertex(35, 0);  
vertex(10, -8);  
vertex(0, -35);  
vertex(-10, -8);  
vertex(-35, 0);  
endShape();  
}

---

<div class="post-metadata">

**Author:** ![slow\_izzm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/slow_izzm/32/5637_2.png) [@slow\_izzm](https://discourse.processing.org/u/slow_izzm)\
**Post date:** [July 7, 2020, 4:22pm UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416/6 "2020-07-07T16:22:01Z")

</div>

It seems to be an issue with version [1.0.0](https://github.com/processing/p5.js/releases), it runs as expected in version [0.10.2](https://github.com/processing/p5.js/releases/tag/0.10.2). You can file an issue to report the bug [here](https://github.com/processing/p5.js/issues).

---

<div class="post-metadata">

**Author:** ![ARNAV\_A\_GUPTA](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/arnav_a_gupta/32/9660_2.png) [@ARNAV\_A\_GUPTA](https://discourse.processing.org/u/ARNAV_A_GUPTA)\
**Post date:** [July 7, 2020, 4:33pm UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416/7 "2020-07-07T16:33:17Z")

</div>

> [@CND](#):
>
> fill(237, 34, 93);
> 
> //noStroke();  
> noFill();

you’re telling it to fill and then tell it to not to???

---

<div class="post-metadata">

**Author:** ![slow\_izzm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/slow_izzm/32/5637_2.png) [@slow\_izzm](https://discourse.processing.org/u/slow_izzm)\
**Post date:** [July 7, 2020, 4:54pm UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416/8 "2020-07-07T16:54:01Z")

</div>

> **Code**
>
> ```auto
> var th = 0.345;
> var v = [0, 0, 0, 35, 0, 0, 35, 0, 47, 13, 0, 35];
> 
> function setup() {
> createCanvas(800, 600, WEBGL);
> }
> 
> function draw() {
> background(204);
> scale(4);
> stroke("black");
> strokeWeight(3);
> fill("orange");
> box(50);
> 
> th = th + 0.02;
> 
> noFill();
> beginShape();
> for (let i = 0; i < v.length; i += 3) {
> // adjust for right hand system that I have data from
> vertex(v[i], -v[i + 2], -v[i + 1]);
> }
> endShape(CLOSE);
> }
> 
> ```

v0.10.2  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/5911f13e76ab2b6a307b5c25c82a98746be3c2d4.png)

v1.0.0  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/5a2b74e593f7ce10ba6b4515e72702c815d42f28.png)

---

<div class="post-metadata">

**Author:** ![CND](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@CND](https://discourse.processing.org/u/CND)\
**Post date:** [July 8, 2020, 8:33pm UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416/9 "2020-07-08T20:33:54Z")

</div>

Thank you for verifying this. I will try to report this.

---

<div class="post-metadata">

**Author:** ![CND](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@CND](https://discourse.processing.org/u/CND)\
**Post date:** [July 8, 2020, 9:07pm UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416/10 "2020-07-08T21:07:49Z")

</div>

I downloaded 0.10.2 and as mentioned noFill(); does indeed work there as promised. I signed up for Github and reported the issue. Thanx. CND aka buggles1.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [July 8, 2020, 9:08pm UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416/11 "2020-07-08T21:08:51Z")

</div>

> <https://github.com/processing/p5.js/issues/4680>
>
> Most appropriate sub-area of p5.js?
> Color
> \[X \] Core/Environment/Rendering
> Data
> Dom
> Events
> Image
> IO
> Math
> Typography
> Utilities
> WebGL
> Other (specify if possible)
> Details...

---

<div class="post-metadata">

**Author:** ![CND](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@CND](https://discourse.processing.org/u/CND)\
**Post date:** [July 9, 2020, 5:40pm UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416/12 "2020-07-09T17:40:09Z")

</div>

I have been informed and confirmed that v1.0.0 June 08 works properly with noFill(). My version v1.0.0 Feb 2020 that I am using does not. Hence the confusion. I got my version straight from the download option of the reference section. Where then do I get a current version? Thanx.

---

<div class="post-metadata">

**Author:** ![slow\_izzm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/slow_izzm/32/5637_2.png) [@slow\_izzm](https://discourse.processing.org/u/slow_izzm)\
**Post date:** [July 9, 2020, 7:29pm UTC](https://discourse.processing.org/t/nofill-not-working-in-p5js/22416/13 "2020-07-09T19:29:47Z")

</div>

> [@CND](#):
>
> Where then do I get a current version?

@stalgiag answered your question already on the [issue](https://github.com/processing/p5.js/issues/4680) you filed …

“You do have the latest officially released version which was made on Feb. 29th. The other file (June 8th) was built locally by me with the most recent Github main branch using the steps in the above linked contributor docs.”

The fix has already been resolved, you either need to wait for the next public release or grab the most recent version and build yourself following these steps [steps 1-5 of the Development Process](https://p5js.org/contributor-docs/#/README?id=development-process).
