@@ -33,8 +33,8 @@ export interface CubeCameraOptions {
33
33
fog ?: THREE . Fog | THREE . FogExp2 ;
34
34
}
35
35
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 , ( ) => {
38
38
const store = injectStore ( ) ;
39
39
40
40
// backfill the options with default values
@@ -78,6 +78,12 @@ export function injectCubeCamera(options: () => CubeCameraOptions, { injector }:
78
78
} ) ;
79
79
}
80
80
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
+
81
87
export type NgtsCubeCameraOptions = Partial < NgtThreeElements [ 'ngt-group' ] > &
82
88
CubeCameraOptions & {
83
89
frames : number ;
@@ -111,7 +117,7 @@ export class NgtsCubeCamera {
111
117
options = input ( defaultOptions , { transform : mergeInputs ( defaultOptions ) } ) ;
112
118
protected parameters = omit ( this . options , [ 'fog' , 'near' , 'far' , 'envMap' , 'resolution' , 'frames' ] ) ;
113
119
114
- private cubeCamera = injectCubeCamera ( pick ( this . options , [ 'near' , 'far' , 'envMap' , 'fog' , 'resolution' ] ) ) ;
120
+ private cubeCamera = cubeCamera ( pick ( this . options , [ 'near' , 'far' , 'envMap' , 'fog' , 'resolution' ] ) ) ;
115
121
116
122
protected camera = this . cubeCamera . camera ;
117
123
protected texture = pick ( this . cubeCamera . fbo , 'texture' ) ;
0 commit comments