From 88a08ee48cbbae086ddbfeaff0679bfe4fe6ce47 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sat, 10 Apr 2021 21:54:43 -0400 Subject: Added a transpiler that will make it so that we no longer need any JavaScript of Jquery in our App --- frontend/2d/_collisions/pill_line.html | 120 ++++++++++++++++--------- frontend/2d/_collisions/pill_line.html.content | 26 ++++++ frontend/2d/_collisions/pill_line/main.cpp | 6 ++ 3 files changed, 108 insertions(+), 44 deletions(-) create mode 100644 frontend/2d/_collisions/pill_line.html.content (limited to 'frontend/2d/_collisions') diff --git a/frontend/2d/_collisions/pill_line.html b/frontend/2d/_collisions/pill_line.html index 5152ba6..4cbefde 100644 --- a/frontend/2d/_collisions/pill_line.html +++ b/frontend/2d/_collisions/pill_line.html @@ -1,46 +1,78 @@ - - - - - - - - - Physics for Games - - -
-

Physics for Games

-
-
- -
-

Pill-Line

-
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

-
- - - -
- -
-
-
- - + + + + Physics for Games + + + +
+

Physics for Games

+
+
+ + +
+

Pill-Line

+
+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

+
+ + + +
+ +
+
+
  • + 
  • + + diff --git a/frontend/2d/_collisions/pill_line.html.content b/frontend/2d/_collisions/pill_line.html.content new file mode 100644 index 0000000..fb2994c --- /dev/null +++ b/frontend/2d/_collisions/pill_line.html.content @@ -0,0 +1,26 @@ + +
    +

    Pill-Line

    +
    +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

    +
    + + + +
    + +
    +
    diff --git a/frontend/2d/_collisions/pill_line/main.cpp b/frontend/2d/_collisions/pill_line/main.cpp index 5aa0059..76dc7d4 100644 --- a/frontend/2d/_collisions/pill_line/main.cpp +++ b/frontend/2d/_collisions/pill_line/main.cpp @@ -11,6 +11,7 @@ #include // Side note: It is Eastertime, so I chose this easter color palette. Enjoy: https://htmlcolors.com/palette/144/easter + struct Rigidbody { Vector2 force = { 0, 0 }; Vector2 velocity = { 0, 0 }; @@ -170,6 +171,7 @@ void load(); void update(float32 time, void* userData); void unload(); IntersectionResult getIntersection(Pill* pill, LineSegment* segment); +void resolveCollision(Rigidbody* first, Rigidbody* second, IntersectionResult* ir); // Global Variables WebglContext context; @@ -259,6 +261,10 @@ IntersectionResult getIntersection(Pill* pill, LineSegment* segment) { return result; } +void resolveCollision(Rigidbody* first, Rigidbody* second, IntersectionResult* ir) { + +} + void update(float32 deltaTimeSeconds, void* userData) { // Input -- cgit v1.2.1