JSFiddle - React, Tailwind, and code Playground
by mizarjp
JavaScript 1.7
!function(t,r){for(var s in r)t[s]=r[s]}(window,function(t){var r={};function s(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,s),n.l=!0,n.exports}return s.m=t,s.c=r,s.d=function(t,r,e){s.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},s.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},s.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(r,"a",r),r},s.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},s.p="",s(s.s=3)}({3:function(t,r,s){"use strict";s.r(r);class e{get values(){return this._values}get magnitude(){const t=this._values.reduce((t,r)=>t+r*r,0);return Math.sqrt(t)}toString(){return`Vector${this._values.length}(${this._values.join(", ")})`}}class n extends e{get x(){return this._values[0]}get y(){return this._values[1]}set x(t){this._values[0]=t}set y(t){this._values[1]=t}}class i extends e{get x(){return this._values[0]}get y(){return this._values[1]}get z(){return this._values[2]}set x(t){this._values[0]=t}set y(t){this._values[1]=t}set z(t){this._values[2]=t}}class u extends e{get x(){return this._values[0]}get y(){return this._values[1]}get z(){return this._values[2]}get w(){return this._values[3]}set x(t){this._values[0]=t}set y(t){this._values[1]=t}set z(t){this._values[2]=t}set w(t){this._values[3]=t}}class a extends n{constructor(t,r){super(),this._values=new Float32Array([t,r])}add(t){return new a(this.x+t.x,this.y+t.y)}sub(t){return new a(this.x-t.x,this.y-t.y)}mulByScalar(t){return new a(this.x*t,this.y*t)}}class o extends i{constructor(t,r,s){super(),this._values=new Float32Array([t,r,s])}add(t){return new o(this.x+t.x,this.y+t.y,this.z+t.z)}sub(t){return new o(this.x-t.x,this.y-t.y,this.z-t.z)}mulByScalar(t){return new o(this.x*t,this.y*t,this.z*t)}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}cross(t){const...