Skip to content

Commit

Permalink
Update 4.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
nimadez committed Nov 8, 2024
1 parent 5d7b603 commit d98b011
Show file tree
Hide file tree
Showing 11 changed files with 365 additions and 299 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
**Export Meshes**
- Bake voxels to editable meshes
- Bake voxels by color groups
- Unbake exported GLB to voxels
- Unbake exported GLB back to voxels
- glTF compatible editor

**Extensibility**
Expand All @@ -52,7 +52,7 @@
- Blender importer script

**More**
- Average startup time 300 ms
- Average startup time 300 ms *(after the first launch)*
- Unique handcrafted user-interface
- Minimum dependency, portable, online and offline
- Ad-free, no trackers, no logging, no loading screens
Expand Down Expand Up @@ -141,8 +141,9 @@ git reset --hard $HASH

## History
```
↑ Unsafe WebGPU support
↑ Core initialization
↑ Rendering was left to three and three-gpu-pathtracer
↑ Rendering was left to Three and three-gpu-pathtracer
↑ ES6 (the original index.html playground was moved)
↑ x1.5 faster startup (2s to 300ms)
↑ Migrating to Linux: Firefox ready
Expand Down
Binary file modified media/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "voxel-builder",
"version": "4.5.6",
"version": "4.5.7",
"description": "Voxel-based 3D modeling application",
"main": "electron.js",
"scripts": {
Expand Down
Binary file modified src/assets/appicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 27 additions & 24 deletions src/index.html

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ import * as CORE from './modules/core.js';


const startTime = performance.now();
const adapter = navigator.gpu && await navigator.gpu.requestAdapter();


engine.init().then(eng => {
CORE.preferences.init(adapter);

CORE.preferences.init();
engine.init(CORE.preferences.isWebGPU()).then(eng => {

CORE.mainScene.create(eng).then(scn => {

Expand All @@ -25,6 +26,7 @@ engine.init().then(eng => {
CORE.light.init();
CORE.material.init();

CORE.vMesh.init();
CORE.builder.init();
CORE.xformer.init();

Expand Down
4 changes: 2 additions & 2 deletions src/manifest.webmanifest

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion src/modules/babylon.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ class Engine {
this.isRendering = false;
}

init() {
init(useWebGPU) {
if (useWebGPU)
return this.initWebGPU();

return new Promise(resolve => {
this.engine = new BABYLON.Engine(this.canvas, true, {});
this.engine.disablePerformanceMonitorInBackground = true;
Expand All @@ -27,6 +30,21 @@ class Engine {
});
}

initWebGPU() {
return new Promise(async resolve => {
this.engine = new BABYLON.WebGPUEngine(this.canvas);
this.engine.disablePerformanceMonitorInBackground = true;
this.engine.preserveDrawingBuffer = false;
this.engine.premultipliedAlpha = true;
this.engine.enableOfflineSupport = false;
this.engine.doNotHandleContextLost = true;

await this.engine.initAsync();

resolve(this.engine);
});
}

getFps() {
return ~~this.engine.getFps();
}
Expand Down
Loading

0 comments on commit d98b011

Please sign in to comment.