JSFiddle - React, Tailwind, and code Playground
HTML
<canvas width="200px" height="200px"></canvas>
CSS
</style>
<script type="text/javascript">
window.addEventListener('load',function() {
var scripts = document.body.getElementsByTagName('script');
var canvases = document.body.getElementsByTagName('canvas');
new Processing(canvases[0],scripts[0].text);
}, false);
// Here prevent javascript in body from throwing error
</script>
<style>
JavaScript
void setup() {
size(400, 400, P3D);
}
void draw() {
background(0);
directionalLight(249, 250, 91, -3, 4, -4);
lightSpecular(0, 255-second(), 255-second());
emissive(0, 26, 51);
directionalLight(255, 255, 255, 0, -4, 30);
fill(255);
translate(mouseX, mouseY, 0);
box(40);
}