Unlock custom brushes, natural fill effects and intuitive hatching in p5.js
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Angle Mode Test — Standalone</title>
<style>
* { box-sizing: border-box; }
body {
margin: 0;
color: #22313f;
background:
radial-gradient(circle at top left, rgba(20, 48, 73, 0.08), transparent 24%),
linear-gradient(180deg, #f7f2e7 0%, #ece3d3 100%);
font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
}
main {
width: min(1240px, calc(100vw - 24px));
margin: 0 auto;
padding: 18px 0 24px;
display: grid;
justify-items: center;
}
main > * { width: 100%; }
.nav {
margin-bottom: 14px;
font: 11px/1.2 Menlo, Monaco, "Courier New", monospace;
display: flex;
gap: 12px;
}
.nav a { color: #153e5c; text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav .sep { color: #8a9aa8; }
h1 {
margin: 0 0 8px;
font-size: clamp(24px, 3.6vw, 34px);
letter-spacing: -0.04em;
}
p {
max-width: 860px;
margin: 0 0 8px;
color: #52616e;
line-height: 1.45;
font-size: 13px;
}
#canvas-host {
margin-top: 18px;
display: grid;
justify-content: center;
width: 100%;
overflow: hidden;
}
#canvas-host canvas {
grid-area: 1 / 1;
display: block;
max-width: 100%;
height: auto !important;
}
#label-canvas { pointer-events: none; }
</style>
</head>
<body>
<main>
<div class="nav">
<a href="../index.html">All tests</a>
<span class="sep">·</span>
<a href="../p5/angle_mode_test.html">← p5 version</a>
</div>
<h1>Angle Mode Test <small style="font-size:0.55em;color:#8a9aa8;">standalone</small></h1>
<p>
Each row compares equivalent degree and radian inputs across public APIs. Matching panels should produce the same direction, curvature, and hatch orientation.
</p>
<p>
Red dashed lines are mathematical references. The hatch row intentionally changes brush.angleMode() after brush.hatch() and should still match.
</p>
<div id="canvas-host"></div>
<script src="./standalone_profiler.js"></script>
<script type="module" src="./angle_mode_test.js"></script>
</main>
<script src="../test-nav.js"></script>
</body>
</html>