From a00c0aab1eb5a7a55bef8ca08115bdd722ab5699 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sun, 16 May 2021 19:50:15 -0400 Subject: Moved the frontend directory up so that it no longer exists --- frontend/_shared/math/rectangle.js | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 frontend/_shared/math/rectangle.js (limited to 'frontend/_shared/math/rectangle.js') diff --git a/frontend/_shared/math/rectangle.js b/frontend/_shared/math/rectangle.js deleted file mode 100644 index 012c460..0000000 --- a/frontend/_shared/math/rectangle.js +++ /dev/null @@ -1,32 +0,0 @@ -/// - -function rectangle(pGl, pData) { - var lBuffer = pGl.createBuffer(), - lColor = pData.color || { x: 1, y: 0, z: 0, w: 1 }; - - pGl.bindBuffer(pGl.ARRAY_BUFFER, lBuffer); - - var lBufferedData = [ - -pData.width / 2.0, -pData.height / 2.0, lColor.x, lColor.y, lColor.z, lColor.w, - -pData.width / 2.0, pData.height / 2.0, lColor.x, lColor.y, lColor.z, lColor.w, - pData.width / 2.0, pData.height / 2.0, lColor.x, lColor.y, lColor.z, lColor.w, - pData.width / 2.0, pData.height /2.0, lColor.x, lColor.y, lColor.z, lColor.w, - pData.width / 2.0, -pData.height / 2.0, lColor.x, lColor.y, lColor.z, lColor.w, - -pData.width / 2.0, -pData.height / 2.0, lColor.x, lColor.y, lColor.z, lColor.w - ]; - - pGl.bufferData(pGl.ARRAY_BUFFER, new Float32Array(lBufferedData), pGl.STATIC_DRAW) - pGl.bindBuffer(pGl.ARRAY_BUFFER, undefined); - - pData.getMomentOfInertia = function() { - return (1.0 / 12.0) * pData.mass * (pData.height * pData.height + pData.width * pData.width); - }; - - return makeRigidBody2({ - vertexCount: 6, - buffer: lBuffer, - width: pData.width, - height: pData.height, - model: translateMatrix(mat4(), pData.position ? pData.position.x : 0, pData.position ? pData.position.y : 0, 0), - }, pData); -} \ No newline at end of file -- cgit v1.2.1