From 7c1aa8b8aac9a61eb52116a5b7f16ba1013b8453 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 27 Aug 2023 16:24:39 +0300 Subject: [WGL/P] Added a second level --- Year 2/Computer Graphics with WebGL/Project/level.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Year 2/Computer Graphics with WebGL/Project/level.js b/Year 2/Computer Graphics with WebGL/Project/level.js index 7f4120a..0172175 100644 --- a/Year 2/Computer Graphics with WebGL/Project/level.js +++ b/Year 2/Computer Graphics with WebGL/Project/level.js @@ -37,4 +37,11 @@ function createLevels() { [1000,0,650]); l1.addStar([1100,0,1000], 10, (t, star) => [1100 -100 * (1 + Math.sin(t/300 + 1.5 * Math.PI)),0,1000]); l1.addBlackHole([1000,0,900], 30, undefined); + + var l2 = new Level( + "Star gets closer to event horizon", + "As the star passes by behind the black hole, we can see it approaching the event horizon, however, it will never truly reach it and dissapear (at least until it's width becomes smaller than a pixel).", + [1014,0,892]); + l2.addStar([1100,0,1000], 10, (t, star) => vecSum(star.sphere.center, [-1,0,0])); + l2.addBlackHole([1000,0,900], 30, undefined); } -- cgit v1.3.1-26-gb76a