diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 02e0d7a2..00000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,174 +0,0 @@
-All notable changes to this project will be documented in this file.
-
-## 4.4.3 Debug
-- Improve CEL shader
-- Export: Free resources
- - Remove texture presets (they are heavy on startup)
- - Remove import texture (per-face texturing is a Moiré heaven)
- - Texture menu merged with material menu
-- Improve render sandbox
-- Remove all the range sliders (it doesn't work well in recent chromium updates)
-- Rolled back the batchedmesh raycasting for further investigation
-- ~~Transfer face-normal probe to batchedmesh raycaster~~ (slower)
-- Transfer picking face-normal probe to three raycaster
- - Fix random camera jumps by improving accuracy
-- ~~Transfer fillArrayBuffers() to worker~~ (unlocks the thread but creates a delay because the function runs faster)
-- Update in progress ...
-
-## 4.4.2 Renderer
-- Manage memory to free up some space
-- Manage and improve three scenes
-- Merge sandbox and pathtracer
-- Path Tracing was left to three-gpu-pathtracer (demo is live!)
-- three-mesh-bvh 0.7.7 has been released with BatchedMesh support, we just convert the babylon matrices to three batchedmesh with no performance penalty
-- Speed up the raycast-based tools (e.g. Rect Add)
-- Most of the features were ported to three-gpu-pathtracer and work as before
-
-> - Startup time: avg. 0.35s (-0.05s)
-> - Asterisked items (*) support the render section
-
-## 4.4.1 Unlocked
-- Remove fullscreen engine-based loading screen
-- Add universal progressbar at bottom
-- Remove unnecessary camera framing behaviors
-- New 'Async Bake' option (three.js worker, try 'bake color groups' to see the effect)
-- Encapsulate BABYLON (90% done)
-- Viewaxis-box frame voxel selection on transforms
-- Fix PT not taking screenshot
-- Fix bakery not respect the first voxel at 0,0,0
-- Fix (almost) a few hundred milliseconds of startup lag (BABYLON.HDRCubeTexture locks the main thread - see 4.3.4)
-- Animate the sandbox camera framing behavior similar to babylon.js
-
-> - BABYLON.Quaternion.RotationAxis bug (the update of the babylon.js has been stopped, see 'setOverlayPlane()')
-
-## 4.4.0 Sandbox
-- Generator moved to modules
-- Voxelizer moved to modules
-- Less complex user-interface (no more hide-and-seek ui)
-- Merge cameras for less confusion
-- Officially multi-engine (new three.js sandbox tab)
-- Match the sandbox hdri, camera and materials to babylon's PBR shader
-
-> - The new three.js tab doesn't replace the current functionality, it's a new world and I won't reveal what it's for!
-
-## 4.3.9 ES6
-- Load main.js as module
-- Manage and prepare axisview scene
-- Encapsulate the babylon.js engine (prepare for webgpu)
-- Functions to classes from bottom to top!
-- Window is no longer used to transfer modules
-- Terrain generator uses height-gradient when 'New Scene' unchecked
-- Fix pointerdown conflict with the main scene when workplanes are active
-
-> - Babylon will not be imported as a module
-
-## 4.3.8
-- Add keyboard shortcuts (see about menu)
-- Delete key can delete voxels during transforms
-- Fix the debug layer, make it useful!
-- Prepare for ES6 (cleanup the dom)
-
-## 4.3.7
-- New directory structure
-- Improve project management and speed up the build time of github pages
-- Update the update.py script
-
-## 4.3.6
-- Update three.js to r168
-- New camera frame tools (frame to color group or selected voxels)
-- Improve snapshots (prevent accidental touch)
-- Voxel transformation preserves the floor plane when xforming all voxels
-- Reduce the chance of accidental topbar touch
-- Remove partial unbake due to impossible bug (will return after meeting the conditions)
-- The space key works like the alt key to avoid conflict
-
-> - The gap between babylon.js releases and our library update was extended.
-
-## 4.3.5
-- ~~Update to babylonjs 7.22.3~~
- - The update was rolled back (breaking bug: no mouseover on Z axis)
-- New detachable floating panels!
-- Improve websockets client and server
-- Standalone node.js server (Electron alternative)
-- Improve three.js module (less memory, faster load time)
-- Fix camera-related visual artifacts (fov 0.1 issue)
-- Add three.js WorkerPool library
-
-> - The left button moves the panel, the center button hides the panel and the right button resets the panel to its original position and close it.
-
-## 4.3.4 x1.5
-- Faster startup time (avg. 2s to 0.5s - x1.5 faster)
-- Change default PT material to lambert
-- Remove color grading from FX mode
-- Snapshot frames the camera
-- Automatic camera framing (allow to work with a small group of voxels)
-- Shortcut 'F' can be used to frame camera during voxel transformation
-- New project generates 1 voxel
-- Default ice color is used to generate new voxels (instead of selected color)
-- Darker color theme, larger hover menu, axis view and color picker
-- Improve hover code, we can use this to float multiple elements
-- Improve and manage all the in-screen buttons
-- Measure volume tool show XYZ position on single click
-- Add 'new scene' option for terrain generator
-- Reduce the chance of random holes on the terrain surface
-- Allow double-click for color palette in desktop
-- Add voxel by X,Y,Z direct coordinate input as string
-- The websockets client has been rewritten (auto disconnect after 10 retries)
-- New 'ws-connect.py' script, to connect with machine learning models
-- Fix a bug when the startup project is heavy and the UI doesn't wait for it
-- Fix a bug where you can't select the first voxel at 0,0,0
-
-> - Please clear your browser cache or force reload voxel-builder
-> - BABYLON.HDRCubeTexture seems to be responsible for the potential startup lag/freeze, but other optimizations were done to reach 0.5 second.
-
-## 4.3.3
-- Update three-mesh-bvh to 0.7.6
-- Update three to r167
-- Update to babylonjs 7.17.0
-- Prevent frame camera on quickload voxels (holds the camera for further changes)
-- Remove showSaveFilePicker, this experimental technology is not ready for production
- - Fix save file functionality in electron and mobile
- - Fix save format from .txt to .json in mobile
-
-## 4.3.2
-- Update to babylonjs 7.13.1
-- Update to three r166
-- Fix all convertToUnIndexedMesh related issues introduced by update
-- Fix firefox scrollbars (broken by new firefox update)
-- PT: fix frame camera when floor is checked (overflow, force update)
-
-## 4.3.1
-- Add merge-selected to export tab
-- Add render source to PT (render baked meshes from export tab)
- - Fix multiple camera conflict, camera position returns to the selected source
- - Shortcut R respect selected source
-- Add max-samples to PT (8-8192, 4096 default)
-- Firefox optimization (fix save file, css styles, palette right-click)
-- Update to babylonjs 7.10.0
-- Fix workplanes undetected picking
-- Fix attachableMeshes error in export tab
-- Fix baked meshes visible in model tab under certain conditions
-- Remove deprecated ini format to save resources
-
-## 4.3.0 Nightly
-> This version is a breath of fresh air after the SPS fallout
-- Add tool indicator, display the name of the selected tool
-- Add import voxels and bakes from json file
-- Add voxel measurement tools
-- New normal picking method eliminates bvh-picking (high performance picking by default)
-- No more duplicate voxels (they are automatically removed with no performance penalty)
-- Clean up and improve voxel transforms
-- Update PT to support three r165 framebuffers
-- Voxel colors are used for the point-cloud
-- Fix unwanted camera rotation in most cases
-- Fix PT crashes on 0.0 inputs
-- Fix camera fov
-
-### 4.2.9
-- New power saver for PT and tools (enabled by default in mobile devices)
-- CSS updates, new roboto font
-- Linux compatibility checks
-- Update floor plane to support linux and windows
-- Update all dependencies
-- Fix pixel-eyedropper tool in chromium for linux
-- Fix bakery functionality
diff --git a/README.md b/README.md
index 83802b78..074abe5a 100644
--- a/README.md
+++ b/README.md
@@ -8,9 +8,7 @@
[https://nimadez.github.io/voxel-builder/](https://nimadez.github.io/voxel-builder/)
-```Version 4.4.3 Beta```
-[Changelog](https://github.com/nimadez/voxel-builder/blob/main/CHANGELOG.md)
-
+[Changelog](https://github.com/nimadez/voxel-builder/releases)
[Installation](https://github.com/nimadez/voxel-builder#installation)
[Documentation](https://github.com/nimadez/voxel-builder/wiki)
[Known Issues](https://github.com/nimadez/voxel-builder#known-issues)
@@ -25,18 +23,20 @@
- Local storages, snapshots, quicksave, undo
**Model and Paint**
+- High performance voxel engine
+- High performance GPU picking system
- Generators *(terrain, cube, sphere, isometric...)*
- Interactive modeling toolsets [?](https://github.com/nimadez/voxel-builder/wiki/model)
- Symmetric drawing and painting
-- Color groups and voxel transform tools
-- High performance GPU picking system
+- Color groups and voxel transforms
**Rendering**
-- High performance voxel engine
-- Real-time GPU path tracing [~~?~~](https://github.com/nimadez/voxel-builder/wiki/render)
+- Three.js sandbox
+- Three.js GPU path tracer
+- Basic PBR rendering
**Voxelization**
-- Fast BVH voxelization method
+- Fast BVH voxelization
- 3D model voxelizer [?](https://github.com/nimadez/voxel-builder/wiki/Voxelization)
- Image voxelizer
@@ -53,29 +53,31 @@
- Blender importer script
**More**
+- Average startup time 344 ms
- Unique handcrafted user-interface
- Minimum dependency, portable, online and offline
-- Ad-free, no miners and trackers, no logging
-- Extras [?](https://github.com/nimadez/voxel-builder/wiki/Extras)
+- Ad-free, no trackers, no logging, no loading screens
## Installation
-Install [Electron](https://github.com/electron/electron/releases) for Linux or Windows *(optional)*
+Install [Electron](https://github.com/electron/electron/releases) *(recommended)*
```
electron-v*-linux-x64.zip
electron-v*-win32-x64.zip
```
-Get and run Voxel Builder
+Clone
```
-git clone https://github.com/nimadez/voxel-builder.git
+git clone https://github.com/nimadez/voxel-builder
cd voxel-builder
-
+```
+Run
+```
# Start with Electron:
electron .
# Start with Node.js:
node server.js
```
-Update to the latest version
+Update
```
cd voxel-builder
python3 update.py
@@ -95,8 +97,7 @@ Higher than 512K is not recommended
Electron is recommended for working with a large number of voxels
Higher values can have the following problems:
-- Unable to quick-save baked meshes (DOMException: exceeded the quota)
-- Intolerable delay when starting the real-time renderer
+- Intolerable delay when starting the renderer
- Chrome tab may freeze or crash
Of course, the number of voxels is unlimited,
@@ -131,20 +132,19 @@ How to run Blender importer script?
## History
```
-↑ Path Tracing was left to three-gpu-pathtracer
-↑ Officially multi-engine (three.js is hardwired internally)
-↑ ES6 + x1.5 faster startup + Linux and Firefox ready
-↑ Voxel engine updated to thin-instances (64k to 1M boost)
-↑ Cut half precision (new scene)
+↑ Rendering was left to three and three-gpu-pathtracer
+↑ ES6 (the original index.html playground was moved)
+↑ x1.5 faster startup (2s to 350ms)
+↑ Migrating to Linux: Firefox ready
+↑ High performance GPU picking system
+↑ Voxel engine updated to thin-instances (64k to 512k)
+↑ Cut half precision (from 0.0 to 0.5 center to avoid -0.5/+0.5)
↑ Real-time GPU path tracing
↑ Introducing ES modules
-↑ Stable beta release
↑ Advancing to the next level (bakery)
-↑ Features and uix overhaul
+↑ Changed default handiness to right-handed coordinate
↑ New SPS particles to build the world
↑ 2019 - I wrote a playground for learning Babylon.js
-
-"I don't mean to compete, GL is nostalgic for me."
```
Version 4.3.9 *(BJS 7 - Three r168)*
diff --git a/electron.js b/electron.js
index c6f9a865..c363590a 100644
--- a/electron.js
+++ b/electron.js
@@ -19,10 +19,9 @@ function createWindow() {
}
});
- // Enable SharedArrayBuffer for three-gpu-pathtracer setSceneAsync()
mainWindow.webContents.session.webRequest.onHeadersReceived((details, callback) => {
details.responseHeaders['Cross-Origin-Opener-Policy'] = ['same-origin'];
- details.responseHeaders['Cross-Origin-Embedder-Policy'] = ['require-corp'];
+ details.responseHeaders['Cross-Origin-Embedder-Policy'] = ['require-corp', 'credentialless'];
callback({ responseHeaders: details.responseHeaders });
});
diff --git a/media/screenshot.png b/media/screenshot.png
index aca77d58..ba9e1a86 100644
Binary files a/media/screenshot.png and b/media/screenshot.png differ
diff --git a/package.json b/package.json
index 7bddd023..0fa395bd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "voxel-builder",
- "version": "4.4.3",
+ "version": "4.4.4",
"description": "Voxel-based 3D modeling application",
"main": "electron.js",
"scripts": {
@@ -11,7 +11,7 @@
"license": "MIT",
"devDependencies": {
"electron": "^30.0.0",
- "babylonjs": "^7.17.0",
+ "babylonjs": "^7.25.0",
"three": "^0.168.0",
"three-mesh-bvh": "^0.7.8",
"three-gpu-pathtracer": "^0.0.23",
diff --git a/src/index.html b/src/index.html
index b92dc655..e11cac6f 100644
--- a/src/index.html
+++ b/src/index.html
@@ -51,13 +51,13 @@
body { text-rendering: optimizeSpeed; background: white; font-family: var(--font); font-size: var(--font-size); color: silver; position: fixed; width: 100%; height: 100%; cursor: default; }
a { font-family: var(--font); font-size: var(--font-size); color: steelblue; text-decoration: none; }
a:hover { color: orange; text-decoration: none; }
- input[type=number] { font-family: var(--font); font-size: var(--font-size); width: 100%; height: 12px; padding: 4px 0 4px 0; text-indent: 5px; background: var(--input-bg); color: var(--input-color); border: solid 1px var(--borders); border-radius: 2px; text-align: left; }
+ input[type=number] { font-family: var(--font); font-size: 13px; width: 100%; height: 12px; padding: 4px 0 4px 0; text-indent: 5px; background: var(--input-bg); color: var(--input-color); border: solid 1px var(--borders); border-radius: 2px; text-align: left; }
input[type=number]:hover { color: steelblue; border: solid 1px #43495a; }
input[type=number]:disabled { opacity: 0.5; }
input[type=number] { appearance: textfield; }
- input[type=text] { font-family: var(--font); font-size: var(--font-size); width: 98%; background: var(--input-bg); color: var(--input-color); padding: 4px 0 4px 0; text-indent: 5px; border: solid 1px var(--borders); border-radius: 2px; text-align: left; }
+ input[type=text] { font-family: var(--font); font-size: 13px; width: 98%; background: var(--input-bg); color: var(--input-color); padding: 4px 0 4px 0; text-indent: 5px; border: solid 1px var(--borders); border-radius: 2px; text-align: left; }
input[type=text]:hover { color: steelblue; border: solid 1px #43495a; cursor: text; }
- input[type=url] { font-family: var(--font); font-size: var(--font-size); width: 100%; background: var(--input-bg); color: var(--input-color); padding: 4px 0 4px 0; margin-left: -2px; text-indent: 5px; border: solid 1px var(--borders); border-radius: 2px; text-align: left; }
+ input[type=url] { font-family: var(--font); font-size: 13px; width: 100%; background: var(--input-bg); color: var(--input-color); padding: 4px 0 4px 0; margin-left: -2px; text-indent: 5px; border: solid 1px var(--borders); border-radius: 2px; text-align: left; }
input[type=url]:hover { color: steelblue; border: solid 1px #43495a; cursor: text; }
input[type=range] { accent-color: steelblue; width: 100%; height: 2px; margin: 0 0 7px 0; }
input[type=range]::-webkit-slider-thumb { transform: scale(0.7); }
@@ -101,16 +101,16 @@
.menu_L :first-child { cursor: pointer; }
.menu_L li div i { color: var(--cat-color); margin-top: 3px; }
.menu_L li div:hover i { color: steelblue; }
- #toolbar_top { z-index: 500; width: 210px; left: 50%; margin-left: -105px; top: 0; text-align: center; position: fixed; }
+ #toolbar_top { z-index: 500; width: 220px; left: 50%; margin-left: -110px; top: 0; text-align: center; position: fixed; }
#toolbar_C { display: flex; }
#toolbar_C li { width: 100%; padding: 8px 0 8px 0; font-size: 11px; letter-spacing: 0.05em; background: var(--btn-bg); color: var(--btn-color); border: solid 1px var(--borders); border-radius: 0; cursor: pointer; }
#toolbar_C li:hover { background: var(--btn-bg); color: orange; }
#toolbar_C li:nth-child(1) { border-right: none; border-radius: 0; border-bottom-left-radius: 3px; border-top-left-radius: 3px; }
#toolbar_C li:nth-child(2) { border-radius: 0; }
- #toolbar_C li:nth-child(3) { padding-right: 2px; border-left: none; border-radius: 0; border-bottom-right-radius: 3px; border-top-right-radius: 3px; }
+ #toolbar_C li:nth-child(3) { padding-right: 3px; border-left: none; border-radius: 0; border-bottom-right-radius: 3px; border-top-right-radius: 3px; }
#toolbar_C li.mode_select { color: orange; }
#toolbar_C_mem { display: flex; margin-bottom: 2px; }
- #toolbar_C_mem li { width: 100%; font-size: 11px; padding: 8px 0 8px 0; background: var(--btn-bg); color: var(--btn-color); border: 1px solid var(--borders); border-radius: 0; cursor: pointer; }
+ #toolbar_C_mem li { width: 100%; font-size: 10px; letter-spacing: 0.03em; padding: 8px 0 8px 0; background: var(--btn-bg); color: var(--btn-color); border: 1px solid var(--borders); border-radius: 0; cursor: pointer; }
#toolbar_C_mem li:hover { color: orange; }
#toolbar_C_mem :nth-child(1) { border-right: none; border-bottom-left-radius: 3px; }
#toolbar_C_mem :nth-child(3) { padding: 0 1px 0 1px; width: 0; background: none; border: none; }
@@ -141,7 +141,7 @@
#meshlist .item_name:hover { background: var(--btn-bg); color: orange; }
#meshlist .item_name.mesh_select { background: var(--btn-bg); color: orange; }
#marquee { z-index: 500; display: none; background: #00ffff20; border: dotted 2px aqua; position: fixed; }
- #menu-about .about { font-size: 13px; line-height: 1.3em; background: #21262e; color: #98a1ac; padding: 5px 5px 0 5px; }
+ #menu-about .about { font-size: 13px; line-height: 1.3em; background: #21262e; color: #98a1ac; padding: 6px; }
#menu-about .about h1 { font-size: 13px; font-weight: normal; color: #98a1ac; letter-spacing: 1px; }
#menu-storage img { object-fit: contain; background: #2b334190; border: dotted 1px #1e1f24; width: 115px; height: 60px; margin-left: 1px; cursor: pointer; }
#menu-storage li div button { font-size: 11px; letter-spacing: 0.05em; width: 59px; padding: 5px 0 5px 0; }
@@ -166,7 +166,7 @@
#sandbox_render button i { font-size: 30px; }
#info { z-index: 2; display: none; background: #2c313a80; color: #97a5b880; font-size: 10px; position: absolute; padding: 2px; width: auto; bottom: 2px; left: 50%; transform: translate(-50%,0); text-align: center; pointer-events: none; }
#info span { color: var(--white); letter-spacing: 0.05em; }
- #info_tool { z-index: 2; display: none; color: #97a5b890; letter-spacing: 0.05em; font-size: 11px; position: absolute; padding: 2px; width: auto; top: 75px; left: 50%; transform: translate(-50%,0); text-align: center; pointer-events: none; }
+ #info_tool { z-index: 2; display: none; color: #97a5b890; letter-spacing: 0.05em; font-size: 11px; position: absolute; padding: 2px; width: auto; top: 78px; left: 50%; transform: translate(-50%,0); text-align: center; pointer-events: none; }
#info_render { z-index: 301; display: none; background: #2c313a80; color: #97a5b880; font-size: 10px; position: absolute; padding: 2px; width: 100%; bottom: 2px; text-align: center; pointer-events: none; }
#info_render span { color: var(--white); letter-spacing: 0.05em; }
#progressbar { z-index: 2000; background: linear-gradient(90deg, orange, orange, orange, white); width: 0; max-width: 100%; height: 3px; bottom: 0; position: fixed; }
@@ -174,7 +174,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.2; 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: 102px; 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: #2a2f3aEE; color: var(--btn-color); border: solid 1px #22222280; box-shadow: 0 0 2px #21262e50; position: absolute; width: fit-content; left: 50%; top: 110px; transform: translateX(-50%); padding: 3px 6px 2px 6px; 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; }
@@ -184,6 +184,8 @@
#shortcuts th, td { width: 380px; padding: 4px 0 4px 0; }
.spacer { height: 3px; }
.row { display: flex; width: 100%; align-items: center; }
+ .row_input { display: flex; width: 100%; gap: 5px; align-items: center; }
+ .row_input :first-child { width: 100%; }
.row_panel { display: flex; width: 100%; height: 25px; align-items: center; gap: 11px; text-indent: 6px; }
.material-icons { font-family: 'Material Icons'; font-weight: normal; font-style: normal; font-size: 16px; vertical-align: middle; text-align: center; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; pointer-events: none; font-feature-settings: 'liga'; -webkit-font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; }
::placeholder { color: #45515c; }
@@ -223,8 +225,8 @@