Skip to content

lesson_033 fix for non-windows users #20

Description

@Philius

Here's the patch

From 3f43ae33ab0e000d2d6937ffefae27104110f69a Mon Sep 17 00:00:00 2001
From: Philip Ashmore <contact@philipashmore.com>
Date: Wed, 13 Jan 2021 12:45:53 +0000
Subject: [PATCH] Fixed lesson_033 for non Windows users

---
 lesson_033/fungi.core.js | 6 ++----
 lesson_033/test.html     | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/lesson_033/fungi.core.js b/lesson_033/fungi.core.js
index cc38c8c..0996c54 100644
--- a/lesson_033/fungi.core.js
+++ b/lesson_033/fungi.core.js
@@ -1775,10 +1775,8 @@ var Fungi = (function(){
 			}
 
 			//Check if the final offset is divisiable by 16, if not add remaining chunk space to last element.
-			//if(offset % 16 != 0){
-				//ary[ary.length-1].chunkLen += 16 - offset % 16;
-				//offset += 16 - offset % 16;
-			//}
+			let padding = offset % 16;
+			if( padding != 0) offset += 16 - padding;
 
 			//console.log("UBO Buffer Size ",offset);
 			return offset;
diff --git a/lesson_033/test.html b/lesson_033/test.html
index 6479b8a..5ac3fdf 100644
--- a/lesson_033/test.html
+++ b/lesson_033/test.html
@@ -12,7 +12,7 @@
 		<script src="fungi.core.js"></script>
 		<script src="fungi.primatives.js"></script>
 		<script src="fungi.KBMCtrl.js"></script>
-		<script src="fungi.Debug.js"></script>
+		<script src="fungi.debug.js"></script>
 		<script src="fungi.ext.js"></script>
 		<script src="fungiApp.js"></script>
 
-- 
2.29.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions