From c5e5d7c939a2640763775b0688ed698c51ec28c1 Mon Sep 17 00:00:00 2001
From: Matthew Kosarek
Date: Mon, 24 May 2021 13:32:27 -0400
Subject: Applying force to the object using the mouse cursor
---
_wasm/intro/intro.cpp | 6 +++---
_wasm/intro/intro.html | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
(limited to '_wasm')
diff --git a/_wasm/intro/intro.cpp b/_wasm/intro/intro.cpp
index 63c80ef..8e1574b 100644
--- a/_wasm/intro/intro.cpp
+++ b/_wasm/intro/intro.cpp
@@ -112,7 +112,7 @@ EM_BOOL terminateScene(int eventType, const EmscriptenMouseEvent* mouseEvent, vo
int main() {
printf("Initializing the canvas...\n");
- emscripten_set_canvas_element_size( "#wasm_canvas", 640, 480 );
+ emscripten_set_canvas_element_size( "#wasm_canvas", 800, 600 );
EmscriptenWebGLContextAttributes attrs;
emscripten_webgl_init_context_attributes(&attrs);
@@ -160,10 +160,10 @@ EM_BOOL runScene(int eventType, const EmscriptenMouseEvent* mouseEvent, void* us
scene.triangleObject.vertices[0] = { Vector2 { -100, -50 }, Vector4 { 1.f, 0.f, 0.f, 1.f }};
scene.triangleObject.vertices[1] = { Vector2 { 0, 50 }, Vector4 { 0.f, 1.f, 0.f, 1.f }};
scene.triangleObject.vertices[2] = { Vector2 { 100, -50 }, Vector4 { 0.f, 0.f, 1.f, 1.f }};
- scene.triangleObject.position = { 320.f, 480.f - 100.f };
+ scene.triangleObject.position = { 320.f, 600.f - 100.f };
scene.triangleObject.initialize(&scene.programData);
- scene.projection = Mat4x4().getOrthographicMatrix(0, 640, 0, 480);
+ scene.projection = Mat4x4().getOrthographicMatrix(0, 800, 0, 600);
scene.isTerminated = false;
printf("Scene initialized.\n");
diff --git a/_wasm/intro/intro.html b/_wasm/intro/intro.html
index 92a6ea8..a5ac225 100644
--- a/_wasm/intro/intro.html
+++ b/_wasm/intro/intro.html
@@ -38,7 +38,7 @@
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.
-
+
--
cgit v1.2.1