From cf8995164e7b9fc7420c18a5fe3fbe0f643fce2a Mon Sep 17 00:00:00 2001
From: nimadez <111365948+nimadez@users.noreply.github.com>
Date: Wed, 4 Sep 2024 12:41:00 +0330
Subject: [PATCH] Update 4.3.9
---
CHANGELOG.md | 18 +-
README.md | 4 +-
package.json | 2 +-
src/index.html | 35 +-
src/main.js | 3630 ++++++++++++++------------
src/modules/bakery/bakery.js | 11 +
src/modules/modules.js | 22 +-
src/modules/pathtracer/pathtracer.js | 190 +-
src/modules/raycaster/raycaster.js | 1 +
src/modules/three.js | 2 +-
src/modules/websockets/client.js | 2 +
11 files changed, 2029 insertions(+), 1888 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b5107020..0e021757b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,13 +1,27 @@
All notable changes to this project will be documented in this file.
+## 4.3.9 ES6
+- Load main.js as module
+ - Faster startup avg. 0.4s (it loads faster than most corporate websites!)
+- Manage and prepare axisview scene
+ - Fix pointerdown conflict with the main scene when workplanes are active
+- Isolate the babylon.js engine (prepare for webgpu)
+- Functions to classes from bottom to top!
+- Terrain generator uses height-gradient when 'New Scene' unchecked
+- Window is no longer used to transfer modules
+- Remove setMenuModes, not force closing menus in certain modes
+
+> - I have generally used ES6 in the code, the only problem was loading main as a module, which was solved by transferring 200 events to the main.
+> - Babylon will not be imported as a module, I will never use webpack, react, typescript etc. I don't have a corporation forcing me to use corporate crap, none of these are requirements for ES6.
+
## 4.3.8
- Add keyboard shortcuts map (see about menu)
- Delete key can delete voxels during transforms
- Fix the debug layer, make it useful!
- Improve all the modules
- ~~HDR loader managed by three.js~~ (rolled back)
- - This improves many things include 1 second startup freeze, but also makes PBR and bakery problematic.
-- Prepare dom for complete ES6
+ - This improves many things include startup freeze, but also makes PBR and bakery problematic.
+- Prepare for ES6 (cleanup the dom)
## 4.3.7
- New directory structure
diff --git a/README.md b/README.md
index 6377bf6d5..3625f9e6d 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
Voxel-based 3D modeling application
[https://nimadez.github.io/voxel-builder/](https://nimadez.github.io/voxel-builder/)
-```Version 4.3.8 Beta```
+```Version 4.3.9 Beta```
[Changelog](https://github.com/nimadez/voxel-builder/blob/main/CHANGELOG.md)
[Installation](https://github.com/nimadez/voxel-builder#installation)
@@ -128,7 +128,7 @@ How to run Blender importer script?
## History
```
-↑ New directory structure (x1.5 faster startup)
+↑ ES6 + x1.5 faster startup
↑ Linux and Firefox ready
↑ Voxel engine updated to thin-instances (64k to 1M boost)
↑ Cut half precision (new scene)
diff --git a/package.json b/package.json
index 33d42a8d2..7fe1ca40a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "voxel-builder",
- "version": "4.3.8",
+ "version": "4.3.9",
"description": "Voxel-based 3D modeling application",
"main": "electron.js",
"scripts": {
diff --git a/src/index.html b/src/index.html
index 84f821fb9..d21750488 100644
--- a/src/index.html
+++ b/src/index.html
@@ -193,7 +193,7 @@
#confirm span { width: 100%; margin: 5px 0 10px 0; font-size: var(--font-size); letter-spacing: 0.05em; color: var(--white); display: block; }
#confirm button { width: 48%; padding: 4px; font-size: var(--font-size); text-transform: uppercase; }
#confirmblocker { z-index: 2400; display: none; opacity: 0.4; background: #181b22; position: absolute; width: 100%; height: 100%; }
- #notifier { z-index: 2000; display: none; font-size: 11px; background: #2a2f3aCC; color: var(--btn-color); border: solid 1px #22222280; box-shadow: 0 0 2px #21262e50; position: absolute; width: fit-content; left: 50%; top: 95px; transform: translateX(-50%); padding: 3px 4px 2px 4px; letter-spacing: 1px; text-align: center; border-radius: 3px; pointer-events: none; }
+ #notifier { z-index: 2000; display: none; font-size: 11px; background: #2a2f3aCC; color: var(--btn-color); border: solid 1px #22222280; box-shadow: 0 0 2px #21262e50; position: absolute; width: fit-content; left: 50%; top: 98px; transform: translateX(-50%); padding: 3px 4px 2px 4px; letter-spacing: 1px; text-align: center; border-radius: 3px; pointer-events: none; }
#ws_status { font-size: 11px; color: indianred; }
#shortcuts { z-index: 3000; display: none; opacity: 0.95; background: var(--confirm); padding: 5px; border-radius: 5px; left: 50%; top: 50%; width: 360px; height: 50%; transform: translate(-50%,-50%); position: fixed; }
#shortcuts table { height: 100%; overflow-y: scroll; display: flex; flex-direction: column; }
@@ -229,7 +229,7 @@