# Perspective() and antialias don't seem to get along in p5.js web editor

**URL:** <https://discourse.processing.org/t/perspective-and-antialias-dont-seem-to-get-along-in-p5-js-web-editor/4308>\
**Category:** Coding Questions\
**Created:** [October 10, 2018, 12:40am UTC](https://discourse.processing.org/t/perspective-and-antialias-dont-seem-to-get-along-in-p5-js-web-editor/4308 "2018-10-10T00:40:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbeg](https://avatars.discourse-cdn.com/v4/letter/c/bc79bd/32.png) [@cbeg](https://discourse.processing.org/u/cbeg)\
**Post date:** [October 10, 2018, 12:40am UTC](https://discourse.processing.org/t/perspective-and-antialias-dont-seem-to-get-along-in-p5-js-web-editor/4308/1 "2018-10-10T00:40:53Z")

</div>

Hi all, the sketch below works fine in Codepen, but the perspective() function only works as expected in the p5js web editor if I comment out the setAttributes line. Thoughts?

```auto
function setup() {
 createCanvas(800, 200, WEBGL);
 setAttributes('antialias', true);
 normalMaterial();
  
 let fov = 1.0* PI / 3.0;
 let cameraZ = 200;
 let fovy = fov;
 let aspect = 1.0;
 let zNear = cameraZ / 10.0;
 let zFar = cameraZ * 10.0;
 perspective(fov,aspect,zNear,zFar);

}

function draw() {
  background(200, 200, 100);
  push();
  rotateZ(frameCount * 0.02);
  rotateX(frameCount * 0.02);
  rotateY(frameCount * 0.02);
  box(50);
  pop();
}

```
