Skip to content

Commit 66eb44f

Browse files
committed
fix(soba): fix billboard rotation
1 parent 68da7aa commit 66eb44f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

libs/soba/abstractions/src/lib/billboard.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ export class NgtsBillboard {
5555
this.innerRef().nativeElement,
5656
];
5757

58-
if (!follow || !group) return;
58+
if (!follow || !group || !inner) return;
5959

6060
// save previous rotation in case we're locking an axis
61-
const prevRotation = group.rotation.clone();
61+
const prevRotation = inner.rotation.clone();
6262

6363
// always face the camera
6464
group.updateMatrix();
@@ -67,9 +67,9 @@ export class NgtsBillboard {
6767
camera.getWorldQuaternion(inner.quaternion).premultiply(q.invert());
6868

6969
// readjust any axis that is locked
70-
if (lockX) group.rotation.x = prevRotation.x;
71-
if (lockY) group.rotation.y = prevRotation.y;
72-
if (lockZ) group.rotation.z = prevRotation.z;
70+
if (lockX) inner.rotation.x = prevRotation.x;
71+
if (lockY) inner.rotation.y = prevRotation.y;
72+
if (lockZ) inner.rotation.z = prevRotation.z;
7373
});
7474
}
7575
}

libs/soba/abstractions/src/lib/text.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export interface NgtsTextOptions extends Partial<NgtThreeElements['ngt-mesh']> {
4545
fillOpacity?: number;
4646
sdfGlyphSize: number;
4747
debugSDF?: boolean;
48+
glyphGeometryDetail?: number;
4849
}
4950

5051
const defaultOptions: NgtsTextOptions = {

0 commit comments

Comments
 (0)