summaryrefslogtreecommitdiff
path: root/_shared/math/rectangle.js
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-05-25 20:58:53 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-05-25 20:58:53 -0400
commit76b6fa0ce8cfaaab8e2052bdd43266ded8e404b6 (patch)
tree245508c6121a0b9327d216ba3593a847972f08c1 /_shared/math/rectangle.js
parentc3cad9328cff7bfee8d9d824a2098f1b019e884a (diff)
Finally able to remove all of those unneeded javascript files
Diffstat (limited to '_shared/math/rectangle.js')
-rw-r--r--_shared/math/rectangle.js32
1 files changed, 0 insertions, 32 deletions
diff --git a/_shared/math/rectangle.js b/_shared/math/rectangle.js
deleted file mode 100644
index 012c460..0000000
--- a/_shared/math/rectangle.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/// <reference path="rigidbody2.js" />
-
-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