Skip to content

Commit

Permalink
Update 4.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nimadez committed Jul 18, 2024
1 parent 7e635d2 commit 50a7e13
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 45 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
All notable changes to this project will be documented in this file.

## 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)<br>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Voxel-based 3D modeling application<br>
[https://nimadez.github.io/voxel-builder/](https://nimadez.github.io/voxel-builder/)

```Version 4.3.1 Beta```<br>
```Version 4.3.2 Beta```<br>
[Changelog](https://github.com/nimadez/voxel-builder/blob/main/CHANGELOG.md)

[Installation](https://github.com/nimadez/voxel-builder#installation)<br>
Expand Down Expand Up @@ -75,7 +75,7 @@ python3 update.py
## Supported Browsers
- Electron *(recommended)*
- Google Chrome
- Mozilla Firefox *(with minor CSS issues)*
- Mozilla Firefox
> - PWA A2HS-ready *(add to home screen)*
> - Tablets with a stylus or Wacom recommended for best experience
> - Voxel Builder has not been fully tested on mobile devices
Expand Down
16 changes: 7 additions & 9 deletions electron.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,9 @@
input[type=color] { height: 18px; }
input[type=color]::-moz-color-swatch { border: none; }
select { text-indent: 2px; }
#palette { top: 158px; bottom: 168px; }
#bakerylist { top: 158px; }
#palette { top: 158px; bottom: 168px; scrollbar-color: steelblue transparent; }
#bakerylist { top: 158px; scrollbar-color: steelblue transparent; }
#bakerylist .item_name { width: 55px; }
#colorpicker { width: 38px; left: 3px; }
#colorpicker :first-child { height: 26px; }
#menu-inscreen-bottom { bottom: 22px; }
Expand Down Expand Up @@ -314,7 +315,7 @@
<li><button onclick="window.open('https://nimadez.github.io/voxel-builder/extras/pixel-monk', '_blank').focus();">Pixel Monk</button></li>
<li class="spacer"></li>
<li class="about">
4.3.1 Beta 2024
4.3.2 Beta 2024
<br>&#8627; <a href="https://github.com/nimadez/voxel-builder/">GitHub</a>
<br>Developer
<br>&#8627; <a href="https://nimadez.github.io/">@nimadez</a>
Expand Down
2 changes: 1 addition & 1 deletion libs/babylon.gui.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/babylon.inspector.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/babylon.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/babylonjs.loaders.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/babylonjs.serializers.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/three.module.min.js

Large diffs are not rendered by default.

Binary file modified media/screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "voxel-builder",
"version": "4.3.1",
"version": "4.3.2",
"description": "Voxel-based 3D modeling application",
"main": "electron.js",
"scripts": {
Expand All @@ -11,8 +11,8 @@
"license": "MIT",
"devDependencies": {
"electron": "^29.2.0",
"babylonjs": "^7.10.0",
"three": "^0.165.0",
"babylonjs": "^7.13.1",
"three": "^0.166.0",
"three-mesh-bvh": "^0.7.5"
}
}
14 changes: 1 addition & 13 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ function createScene(engine) {
shadowcatcher.isPickable = false;
shadowcatcher.doNotSyncBoundingInfo = true;
shadowcatcher.doNotSerialize = true;
shadowcatcher.convertToUnIndexedMesh();
shadowcatcher.freezeWorldMatrix();
shadowcatcher.freezeNormals();

Expand Down Expand Up @@ -279,7 +278,6 @@ function createAxisViewScene(engine, mainScene) {
cube.material.freeze();
cube.doNotSyncBoundingInfo = true;
cube.doNotSerialize = true;
cube.convertToUnIndexedMesh();
cube.freezeWorldMatrix();
cube.freezeNormals();

Expand All @@ -301,7 +299,6 @@ function createAxisViewScene(engine, mainScene) {
a.overlayAlpha = 0.8;
a.doNotSyncBoundingInfo = true;
a.doNotSerialize = true;
a.convertToUnIndexedMesh();
a.freezeNormals();
viewAxes.push(a);
}
Expand Down Expand Up @@ -694,7 +691,6 @@ function HDRI(scene) {
skybox.ignoreCameraMaxZ = true;
skybox.rotation.y = -Math.PI / 2;
skybox.doNotSyncBoundingInfo = true;
skybox.convertToUnIndexedMesh();
skybox.freezeWorldMatrix();
skybox.freezeNormals();
return skybox;
Expand Down Expand Up @@ -1939,7 +1935,6 @@ function Helper(scene, sceneAxisView) {
this.floorPlane.position.z = -0.5;
this.floorPlane.rotation.x = PIH;
this.floorPlane.doNotSerialize = true;
this.floorPlane.convertToUnIndexedMesh();
this.floorPlane.freezeNormals();

this.axisPlane.isVisible = false; // indicate symmetry-axis plane in AxisView scene
Expand All @@ -1950,23 +1945,20 @@ function Helper(scene, sceneAxisView) {
this.axisPlane.edgesWidth = 6;
this.axisPlane.edgesColor = COL_AQUA_RGBA;
this.axisPlane.enableEdgesRendering();
this.axisPlane.convertToUnIndexedMesh();
this.axisPlane.freezeNormals();

this.overlayPlane.isVisible = false;
this.overlayPlane.isPickable = false;
this.overlayPlane.visibility = 0.01;
this.overlayPlane.doNotSerialize = true;
highlightOverlayMesh(this.overlayPlane, COL_ORANGE_RGB, 1);
this.overlayPlane.convertToUnIndexedMesh();
this.overlayPlane.freezeNormals();

this.overlayCube.isVisible = false;
this.overlayCube.isPickable = false;
this.overlayCube.visibility = 0.1;
this.overlayCube.doNotSerialize = true;
highlightOverlayMesh(this.overlayCube, COL_ORANGE_RGB);
this.overlayCube.convertToUnIndexedMesh();
this.overlayCube.freezeNormals();

this.gridPlane.position.copyFrom(this.floorPlane.position);
Expand All @@ -1976,7 +1968,6 @@ function Helper(scene, sceneAxisView) {
this.gridPlane.isPickable = true; // overrided
this.gridPlane.visibility = WORKPLANE_VISIBILITY;
this.gridPlane.doNotSerialize = true;
this.gridPlane.convertToUnIndexedMesh();
this.gridPlane.freezeNormals();

const wpHalf = WORKPLANE_SIZE / 2;
Expand Down Expand Up @@ -2007,7 +1998,6 @@ function Helper(scene, sceneAxisView) {
this.workplane.position.z = wpHalf - 0.5;
this.workplane.visibility = WORKPLANE_VISIBILITY;
this.workplane.doNotSerialize = true;
this.workplane.convertToUnIndexedMesh();
this.workplane.freezeNormals();

this.boxShape.isVisible = false;
Expand All @@ -2017,7 +2007,6 @@ function Helper(scene, sceneAxisView) {
this.boxShape.doNotSerialize = true;
highlightOverlayMesh(this.boxShape, COL_ORANGE_RGB);
highlightEdgesMesh(this.boxShape, COL_ORANGE_RGBA);
this.boxShape.convertToUnIndexedMesh();
this.boxShape.freezeNormals();

this.boxShapeSymm.renderingGroupId = 1;
Expand All @@ -2027,7 +2016,6 @@ function Helper(scene, sceneAxisView) {
this.boxShapeSymm.doNotSerialize = true;
highlightEdgesMesh(this.boxShapeSymm, COL_AQUA_RGBA);
this.boxShapeSymm.edgesColor.a = 0.4;
this.boxShapeSymm.convertToUnIndexedMesh();
this.boxShapeSymm.freezeNormals();

const r = Math.max(10, ~~builder.getRadius());
Expand Down Expand Up @@ -4146,7 +4134,7 @@ function Memory() {
function Project(scene) {
function serializeScene(voxels, meshes) {
const json = {
version: "Voxel Builder 4.3.1",
version: "Voxel Builder 4.3.2",
project: {
name: "name",
voxels: builder.voxels.length,
Expand Down
16 changes: 7 additions & 9 deletions src/modules/pathtracer/pathtracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class Pathtracer {
this.rtQuadB = new FullScreenQuad(rtMaterialRender);
}

createGeometry() {
createGeometry(isUpdateCamera = true) {
if (this.geom) {
this.geom.boundsTree.geometry.dispose();
this.geom.dispose()
Expand Down Expand Up @@ -246,7 +246,7 @@ class Pathtracer {
this.updateAttributeColors();

this.isLoaded = true;
this.updateCamera();
if (isUpdateCamera) this.updateCamera();
this.resetSamples();
}

Expand Down Expand Up @@ -479,14 +479,12 @@ class Pathtracer {
}

frameCamera() {
const size = new THREE.Vector3();
const center = new THREE.Vector3();
this.geom.boundingBox.getSize(size);
this.geom.boundingBox.getCenter(center);
const center = new THREE.Vector3(this.framed.target.x, this.framed.target.y, this.framed.target.z);
const direction = this.controls.target.clone().sub(this.camera.position).normalize().multiplyScalar(this.framed.radius);

this.camera.position.copy(center).sub(direction);
this.controls.target.copy(new THREE.Vector3(this.framed.target.x, this.framed.target.y, this.framed.target.z));
this.camera.lookAt(center);
this.controls.target.copy(center);

this.camera.updateProjectionMatrix();
this.controls.update();
Expand Down Expand Up @@ -657,7 +655,7 @@ document.getElementById('input-pt-shade').oninput = () => {

document.getElementById('input-pt-floor').oninput = () => {
if (pt.isLoaded)
pt.createGeometry();
pt.createGeometry(false);
};

document.getElementById('btn-pt-pause').onclick = () => {
Expand Down

0 comments on commit 50a7e13

Please sign in to comment.