Skip to content

Commit 9e92d42

Browse files
committed
fix(soba): gizmo rotation should respect camera up
1 parent 66eb44f commit 9e92d42

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

libs/soba/gizmos/src/lib/gizmo-helper/gizmo-helper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ export class NgtsGizmoHelper {
221221
private updateDefaultUpEffect() {
222222
const mainCamera = this.store.camera();
223223
this.defaultUp.copy(mainCamera.up);
224+
dummy.up.copy(mainCamera.up);
224225
}
225226

226227
private isOrbitControls(controls: ControlsProto): controls is OrbitControls {

libs/soba/src/staging/accumulative-shadows.stories.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
NgtsRandomizedLights,
1111
} from 'angular-three-soba/staging';
1212
import { CanvasTexture, MeshStandardMaterial, RepeatWrapping, UVMapping } from 'three';
13-
import { FlakesTexture } from 'three/examples/jsm/textures/FlakesTexture.js';
13+
import { FlakesTexture } from 'three-stdlib';
1414
import { color, storyDecorators, storyObject } from '../setup-canvas';
1515

1616
@Component({
@@ -35,7 +35,12 @@ class Suzi {
3535

3636
material.color.set('orange');
3737
material.roughness = 0;
38-
material.normalMap = new CanvasTexture(new FlakesTexture(), UVMapping, RepeatWrapping, RepeatWrapping);
38+
material.normalMap = new CanvasTexture(
39+
new FlakesTexture() as HTMLCanvasElement,
40+
UVMapping,
41+
RepeatWrapping,
42+
RepeatWrapping,
43+
);
3944
material.normalMap.flipY = false;
4045
material.normalMap.repeat.set(40, 40);
4146
material.normalScale.set(0.05, 0.05);

0 commit comments

Comments
 (0)