diff options
author | Matthew Kosarek <matthew.kosarek@vention.cc> | 2021-03-13 15:43:56 -0500 |
---|---|---|
committer | Matthew Kosarek <matthew.kosarek@vention.cc> | 2021-03-13 15:43:56 -0500 |
commit | 98d7d6cb702af2708f20e7cf16ee10a9f71b578a (patch) | |
tree | 92cec56a5a31a9658c44d49ed896ba8b7859450f /frontend/2d/_collisions | |
parent | 3b0514ed3a21c39b7ea1a68d2fb381c808dcfeeb (diff) |
My First WASM application is rendering a triangle on the frontend
Diffstat (limited to 'frontend/2d/_collisions')
-rw-r--r-- | frontend/2d/_collisions/circle_line.html | 2 | ||||
-rw-r--r-- | frontend/2d/_collisions/rectangle_line.html | 2 | ||||
-rw-r--r-- | frontend/2d/_collisions/rectangle_line.js | 4 |
3 files changed, 2 insertions, 6 deletions
diff --git a/frontend/2d/_collisions/circle_line.html b/frontend/2d/_collisions/circle_line.html index 038c759..b6712f3 100644 --- a/frontend/2d/_collisions/circle_line.html +++ b/frontend/2d/_collisions/circle_line.html @@ -6,7 +6,7 @@ <script src="/index.js"></script> <link rel="stylesheet" href="/index.css"> <link rel="shortcut icon" href="/favicon/favicon.ico" type="image/x-icon"> - <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,300" rel="stylesheet" type="text/css"> + <title>Physics for Games</title> <script src="/_shared/math/vec2.js"></script> diff --git a/frontend/2d/_collisions/rectangle_line.html b/frontend/2d/_collisions/rectangle_line.html index 5db958c..b37f47c 100644 --- a/frontend/2d/_collisions/rectangle_line.html +++ b/frontend/2d/_collisions/rectangle_line.html @@ -6,7 +6,7 @@ <script src="/index.js"></script> <link rel="stylesheet" href="/index.css"> <link rel="shortcut icon" href="/favicon/favicon.ico" type="image/x-icon"> - <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,300" rel="stylesheet" type="text/css"> + <title>Physics for Games</title> <script src="/_shared/math/vec2.js"></script> diff --git a/frontend/2d/_collisions/rectangle_line.js b/frontend/2d/_collisions/rectangle_line.js index dec5108..e42cc84 100644 --- a/frontend/2d/_collisions/rectangle_line.js +++ b/frontend/2d/_collisions/rectangle_line.js @@ -107,19 +107,15 @@ lLowerRight = multMat4ByVec2(pRectangle.model, vec2(pRectangle.width / 2.0, -pRectangle.height / 2.0)); if (doesPointIntersect(lLowerLeft, pLine)) { - console.log('Lwer left'); lCollisionPoint = vec2(-pRectangle.width / 2.0, -pRectangle.height / 2.0); return true; } else if (doesPointIntersect(lUpperLeft, pLine)) { - console.log('Upper left'); lCollisionPoint = vec2(-pRectangle.width / 2.0, pRectangle.height / 2.0); return true; } else if (doesPointIntersect(lUpperRight, pLine)) { - console.log('Upepr right'); lCollisionPoint = vec2(pRectangle.width / 2.0, pRectangle.height / 2.0); return true; } else if (doesPointIntersect(lLowerRight, pLine)) { - console.log('Lower right'); lCollisionPoint = vec2(pRectangle.width / 2.0, -pRectangle.height / 2.0); return true; } |