Skip to content

Commit efe1e8a

Browse files
committed
fix(soba/staging): adjust lightSource type for caustic
1 parent 1948b34 commit efe1e8a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libs/soba/staging/src/lib/caustics.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ export interface NgtsCausticsOptions extends Partial<NgtThreeElements['ngt-group
5252
/** Buffer resolution, default: 2048 */
5353
resolution: number;
5454
/** Camera position, it will point towards the contents bounds center, default: [5, 5, 5] */
55-
lightSource: [x: number, y: number, z: number] | ElementRef<THREE.Object3D> | THREE.Object3D;
55+
lightSource:
56+
| [x: number, y: number, z: number]
57+
| ElementRef<THREE.Object3D | NgtThreeElements['ngt-object3D']>
58+
| THREE.Object3D
59+
| NgtThreeElements['ngt-object3D'];
5660
}
5761

5862
const defaultOptions: NgtsCausticsOptions = {
@@ -199,7 +203,7 @@ export class NgtsCaustics {
199203
params: Object.assign(rest, {
200204
lightSource: Array.isArray(lightSource)
201205
? new THREE.Vector3(...lightSource)
202-
: resolveRef(lightSource),
206+
: (resolveRef(lightSource) as THREE.Object3D),
203207
}),
204208
normalTarget: this.normalTarget(),
205209
normalTargetB: this.normalTargetB(),

0 commit comments

Comments
 (0)