Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e14e1dd

Browse files
committed
feat(soba/cameras): rename injectCubeCamera t cubeCamera
1 parent 739041a commit e14e1dd

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

libs/soba/cameras/src/lib/cube-camera.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export interface CubeCameraOptions {
3333
fog?: THREE.Fog | THREE.FogExp2;
3434
}
3535

36-
export function injectCubeCamera(options: () => CubeCameraOptions, { injector }: { injector?: Injector } = {}) {
37-
return assertInjector(injectCubeCamera, injector, () => {
36+
export function cubeCamera(options: () => CubeCameraOptions, { injector }: { injector?: Injector } = {}) {
37+
return assertInjector(cubeCamera, injector, () => {
3838
const store = injectStore();
3939

4040
// backfill the options with default values
@@ -78,6 +78,12 @@ export function injectCubeCamera(options: () => CubeCameraOptions, { injector }:
7878
});
7979
}
8080

81+
/**
82+
* @deprecated Use cubeCamera instead. Will be removed in v5.0.0
83+
* @since v4.0.0
84+
*/
85+
export const injectCubeCamera = cubeCamera;
86+
8187
export type NgtsCubeCameraOptions = Partial<NgtThreeElements['ngt-group']> &
8288
CubeCameraOptions & {
8389
frames: number;
@@ -111,7 +117,7 @@ export class NgtsCubeCamera {
111117
options = input(defaultOptions, { transform: mergeInputs(defaultOptions) });
112118
protected parameters = omit(this.options, ['fog', 'near', 'far', 'envMap', 'resolution', 'frames']);
113119

114-
private cubeCamera = injectCubeCamera(pick(this.options, ['near', 'far', 'envMap', 'fog', 'resolution']));
120+
private cubeCamera = cubeCamera(pick(this.options, ['near', 'far', 'envMap', 'fog', 'resolution']));
115121

116122
protected camera = this.cubeCamera.camera;
117123
protected texture = pick(this.cubeCamera.fbo, 'texture');

0 commit comments

Comments
 (0)