# Rotated polygons with collision detection

**URL:** <https://discourse.processing.org/t/rotated-polygons-with-collision-detection/10755>\
**Category:** Coding Questions\
**Created:** [April 29, 2019, 12:44pm UTC](https://discourse.processing.org/t/rotated-polygons-with-collision-detection/10755 "2019-04-29T12:44:21Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [May 3, 2019, 10:29am UTC](https://discourse.processing.org/t/rotated-polygons-with-collision-detection/10755/6 "2019-05-03T10:29:54Z")

</div>

> [@JoeM](#):
>
> I just downloaded the the p5.js file from the [p5js.org](http://p5js.org) website.

We don’t need to download anything in order to use JS libraries! 🙅‍♂️

We just need an “.html” template file like this 1: 😮

```auto
<script defer src=https://cdn.JsDelivr.net/npm/p5></script>
<script defer src=sketch.js></script>

```

And btW, here’s some sketch that also relies on `angleMode(DEGREES)`: 🔺

> <https://gist.github.com/GoSubRoutine/a117ecb16a8b0f939a190f87d3a13267>

More tips to run p5js sketches locally: 💁‍♂️

> [@Code 800A0404 issue](https://discourse.processing.org/t/code-800a0404-issue/2036/3):
>
> Easiest & fastest recipe to run “.js” sketches under p5.js: running_man Install any Firefox-based browser in your OS and use it to open your “index.html” file: fox_faceInstall Notepad2 or Notepad++ (or both) in your OS and use it to type in your “sketch.js” file there: scroll[https://XhmikosR.GitHub.io/notepad2-mod/](https://XhmikosR.GitHub.io/notepad2-mod/)[https://Notepad-Plus-Plus.org](https://Notepad-Plus-Plus.org) You can setup those text editors to use UTF-8 and LF line endings for better compatibility. bulbHere’s my minimum “index.html” te…

---

_[View the full topic](https://discourse.processing.org/t/rotated-polygons-with-collision-detection/10755)._
