Skip to content

Commit 01b4322

Browse files
committed
Update 4.6.5
1 parent c449e40 commit 01b4322

File tree

14 files changed

+423
-327
lines changed

14 files changed

+423
-327
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ git reset --hard $HASH
162162

163163
## History
164164
```
165+
↑ A major upgrade and overhaul
165166
↑ Unsafe WebGPU support
166167
↑ Core initialization!
167168
↑ Rendering was left to Three and three-gpu-pathtracer

media/screenshot.png

297 Bytes
Loading

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "voxel-builder",
3-
"version": "4.6.4",
3+
"version": "4.6.5",
44
"description": "Voxel-based 3D modeling application",
55
"main": "electron.js",
66
"scripts": {
@@ -11,7 +11,7 @@
1111
"license": "MIT",
1212
"devDependencies": {
1313
"electron": "^37.0.0",
14-
"babylonjs": "8.16.0",
14+
"babylonjs": "8.17.0",
1515
"three": "0.178.0",
1616
"three-mesh-bvh": "0.9.1",
1717
"three-gpu-pathtracer": "0.0.23",

src/index.html

Lines changed: 86 additions & 78 deletions
Large diffs are not rendered by default.

src/libs/babylon.inspector.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/libs/babylon.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/libs/babylonjs.serializers.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/modules/babylon.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ export function Animator(target, property, from, to, fps, totalFrames) {
350350

351351
export function AnimatorCamera(scene, camera, newRadius, newTarget, speedRatio = 1) {
352352
const totalFrames = 20;
353+
const storedAlpha = camera.alpha;
354+
const storedBeta = camera.beta;
353355
return new Promise(async resolve => {
354356
const anim_radius = new BABYLON.Animation(
355357
"anim_camera_radius", "radius", 60,
@@ -361,6 +363,16 @@ export function AnimatorCamera(scene, camera, newRadius, newTarget, speedRatio =
361363
BABYLON.Animation.ANIMATIONTYPE_VECTOR3,
362364
BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT);
363365

366+
const anim_alpha = new BABYLON.Animation(
367+
"anim_camera_alpha", "alpha", 60,
368+
BABYLON.Animation.ANIMATIONTYPE_FLOAT,
369+
BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT);
370+
371+
const anim_beta = new BABYLON.Animation(
372+
"anim_camera_beta", "beta", 60,
373+
BABYLON.Animation.ANIMATIONTYPE_FLOAT,
374+
BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT);
375+
364376
const anim_keys_radius = [
365377
{ frame: 0, value: camera.radius },
366378
{ frame: totalFrames, value: newRadius }];
@@ -369,13 +381,25 @@ export function AnimatorCamera(scene, camera, newRadius, newTarget, speedRatio =
369381
{ frame: 0, value: camera.target.clone() },
370382
{ frame: totalFrames, value: newTarget }];
371383

384+
const anim_keys_alpha = [
385+
{ frame: 0, value: camera.alpha },
386+
{ frame: totalFrames, value: storedAlpha }];
387+
388+
const anim_keys_beta = [
389+
{ frame: 0, value: camera.beta },
390+
{ frame: totalFrames, value: storedBeta }];
391+
372392
anim_radius.setKeys(anim_keys_radius);
373393
anim_target.setKeys(anim_keys_target);
394+
anim_alpha.setKeys(anim_keys_alpha);
395+
anim_beta.setKeys(anim_keys_beta);
374396
anim_radius.setEasingFunction(easingFunction);
375397
anim_target.setEasingFunction(easingFunction);
398+
anim_alpha.setEasingFunction(easingFunction);
399+
anim_beta.setEasingFunction(easingFunction);
376400

377401
const anim = scene.beginDirectAnimation(camera,
378-
[ anim_radius, anim_target ],
402+
[ anim_radius, anim_target, anim_alpha, anim_beta ],
379403
0, totalFrames, false, speedRatio);
380404

381405
await anim.waitAsync();

0 commit comments

Comments
 (0)