@@ -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+
8187export 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