From 2094922912467b1044ab49b0d0fb77f2907ddfb3 Mon Sep 17 00:00:00 2001 From: nimadez <111365948+nimadez@users.noreply.github.com> Date: Mon, 2 Sep 2024 23:52:07 +0330 Subject: [PATCH] Update 4.3.8 --- .gitattributes | 2 - CHANGELOG.md | 9 + README.md | 6 +- package.json | 2 +- scripts/ws-connect.py | 2 +- src/index.html | 288 +++++---- src/main.js | 882 +++++++++++++++------------ src/modules/bakery/bakery.js | 148 +++-- src/modules/loaders/magicavoxel.js | 1 + src/modules/modules.js | 22 +- src/modules/pathtracer/pathtracer.js | 64 +- src/modules/raycaster/raycaster.js | 132 ++-- src/modules/three.js | 4 +- src/modules/websockets/client.js | 107 ++++ src/user/user.js | 2 +- 15 files changed, 962 insertions(+), 709 deletions(-) create mode 100644 src/modules/websockets/client.js diff --git a/.gitattributes b/.gitattributes index 3fd26849..6576705c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,5 +2,3 @@ *.js linguist-vendored=false *.py linguist-vendored=false * text=auto -libs/*.js binary -samples/*.vbx binary diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b0fbe0b..1b510702 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ All notable changes to this project will be documented in this file. +## 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 + ## 4.3.7 - New directory structure - Improve project management and speed up the build time of github pages diff --git a/README.md b/README.md index 03d25c93..6377bf6d 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.7 Beta```
+```Version 4.3.8 Beta```
[Changelog](https://github.com/nimadez/voxel-builder/blob/main/CHANGELOG.md) [Installation](https://github.com/nimadez/voxel-builder#installation)
@@ -26,7 +26,7 @@ Voxel-based 3D modeling application
- 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 *(the second inventor)* +- High performance GPU picking system **Rendering** - High performance voxel engine @@ -50,7 +50,7 @@ Voxel-based 3D modeling application
- Blender importer script **More** -- Unique handcrafted user-interface woven into the code +- 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) diff --git a/package.json b/package.json index bbdee0b0..33d42a8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "voxel-builder", - "version": "4.3.7", + "version": "4.3.8", "description": "Voxel-based 3D modeling application", "main": "electron.js", "scripts": { diff --git a/scripts/ws-connect.py b/scripts/ws-connect.py index b21bfc40..f4298026 100644 --- a/scripts/ws-connect.py +++ b/scripts/ws-connect.py @@ -7,7 +7,7 @@ import os, sys, json, random, time, asyncio -sys.path.insert(1, os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + '/libs') +sys.path.insert(1, os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + '/src/libs') from websockets.server import serve if __import__('platform').system == 'Windows': # fix [WinError 10054] diff --git a/src/index.html b/src/index.html index d110c9e2..84f821fb 100644 --- a/src/index.html +++ b/src/index.html @@ -113,14 +113,14 @@ .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: 200px; left: 50%; margin-left: -100px; top: 0; text-align: center; position: fixed; } - #toolbar_C { display: flex; opacity: 0.9; } + #toolbar_C { display: flex; } #toolbar_C li { width: 100%; padding: 6px 0 6px 0; 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) { 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; opacity: 0.9; margin-bottom: 2px; } + #toolbar_C_mem { display: flex; margin-bottom: 2px; } #toolbar_C_mem li { width: 100%; font-size: 11px; padding: 7px 0 7px 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; } @@ -156,7 +156,7 @@ #pathtracer { z-index: 10; display: none; width: 100%; height: 100%; position: fixed; } #palette { z-index: 400; display: none; background: #31394b30; position: absolute; left: 2px; top: 153px; bottom: 218px; padding-right: 1px; overflow-y: scroll; overflow-x: hidden; } #bakerylist { z-index: 400; display: none; background: #31394b30; position: absolute; left: 2px; top: 153px; bottom: 2px; overflow-y: scroll; overflow-x: hidden; } - #bakerylist .item_name { background: #3e4558cc; width: 62px; font-size: 10px; padding: 5px 2px 5px 2px; margin-bottom: 1px; border: 1px solid var(--borders); border-radius: 2px; text-align: center; } + #bakerylist .item_name { background: #3e4558; width: 62px; font-size: 10px; padding: 5px 2px 5px 2px; margin-bottom: 1px; border: 1px solid var(--borders); border-radius: 2px; text-align: center; } #bakerylist .item_name:hover { background: var(--btn-bg); color: orange; } #bakerylist .item_name.bakery_select { background: var(--btn-bg); color: orange; } #marquee { z-index: 500; display: none; background: #00ffff20; border: dotted 2px aqua; position: absolute; } @@ -195,6 +195,12 @@ #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; } #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; } + #shortcuts tr { font-size: 13px; border: solid 1px var(--cat-border); background: var(--cat-bg); } + #shortcuts tr :first-child { width: 120px; text-align: center; } + #shortcuts tr :last-child { text-indent: 5px; } + #shortcuts th, td { width: 380px; padding: 4px 0 4px 0; } .spacer { height: 3px; } .row { display: flex; width: 100%; align-items: center; } .row_panel { display: flex; width: 100%; align-items: center; gap: 11px; text-indent: 6px; } @@ -242,8 +248,8 @@ -
+
@@ -706,13 +713,42 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Shortcut Description
SPACE / ALT Toggle Free Camera Tool (MODEL)
ENTER Apply Voxel Transforms (MODEL)
DEL Delete Selected Voxels (Transform)
DEL Delete Selected Bake (EXPORT)
` Free Camera Tool (MODEL)
C Free Camera Tool (MODEL)
C Clone Selected Bake (EXPORT)
F Frame Camera
F Frame Voxels (Transform)
O Toggle Orthographic View
R Toggle Renderer - Path Tracer
S Switch Symmetry Axis (MODEL)
T Transform Box Tool
1 Add Voxel Tool
2 Remove Voxel Tool
3 Box Add Tool
4 Box Remove Tool
5 Paint Voxel Tool
6 Box Paint Tool
7 Paint Bucket Tool
8 Color Eyedropper Tool
CTRL + L Load JSON Project
CTRL + Z Undo (MODEL)
CTRL + X Redo (MODEL)
/ Toggle Debug Layer (Dev Mode)
+
- -