angular-three-soba 4.0.0-next.97 → 4.0.0-next.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/abstractions/lib/catmull-rom-line.d.ts +88 -88
  2. package/abstractions/lib/edges.d.ts +88 -88
  3. package/abstractions/lib/gradient-texture.d.ts +1 -1
  4. package/abstractions/lib/helper.d.ts +6 -1
  5. package/abstractions/lib/line.d.ts +1 -1
  6. package/abstractions/lib/text-3d.d.ts +1 -1
  7. package/cameras/lib/cube-camera.d.ts +7 -2
  8. package/cameras/lib/orthographic-camera.d.ts +1 -1
  9. package/cameras/lib/perspective-camera.d.ts +1 -1
  10. package/fesm2022/angular-three-soba-abstractions.mjs +16 -11
  11. package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
  12. package/fesm2022/angular-three-soba-cameras.mjs +16 -11
  13. package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
  14. package/fesm2022/angular-three-soba-controls.mjs +7 -7
  15. package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
  16. package/fesm2022/angular-three-soba-gizmos.mjs +10 -10
  17. package/fesm2022/angular-three-soba-gizmos.mjs.map +1 -1
  18. package/fesm2022/angular-three-soba-loaders.mjs +186 -49
  19. package/fesm2022/angular-three-soba-loaders.mjs.map +1 -1
  20. package/fesm2022/angular-three-soba-materials.mjs +14 -14
  21. package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
  22. package/fesm2022/angular-three-soba-misc.mjs +68 -52
  23. package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
  24. package/fesm2022/angular-three-soba-performances.mjs +6 -6
  25. package/fesm2022/angular-three-soba-performances.mjs.map +1 -1
  26. package/fesm2022/angular-three-soba-staging.mjs +142 -54
  27. package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
  28. package/gizmos/lib/pivot-controls/axis-arrow.d.ts +1 -1
  29. package/gizmos/lib/pivot-controls/axis-rotator.d.ts +1 -1
  30. package/gizmos/lib/pivot-controls/pivot-controls.d.ts +1 -1
  31. package/gizmos/lib/pivot-controls/plane-slider.d.ts +1 -1
  32. package/gizmos/lib/pivot-controls/scaling-sphere.d.ts +1 -1
  33. package/loaders/index.d.ts +4 -0
  34. package/loaders/lib/fbx-loader.d.ts +9 -1
  35. package/loaders/lib/fbx-resource.d.ts +7 -0
  36. package/loaders/lib/font-loader.d.ts +6 -20
  37. package/loaders/lib/font-resource.d.ts +28 -0
  38. package/loaders/lib/gltf-loader.d.ts +8 -0
  39. package/loaders/lib/gltf-resource.d.ts +32 -0
  40. package/loaders/lib/loader.d.ts +2 -2
  41. package/loaders/lib/progress.d.ts +6 -1
  42. package/loaders/lib/texture-loader.d.ts +8 -0
  43. package/loaders/lib/texture-resource.d.ts +10 -0
  44. package/misc/lib/animations.d.ts +6 -1
  45. package/misc/lib/decal.d.ts +1 -1
  46. package/misc/lib/depth-buffer.d.ts +6 -1
  47. package/misc/lib/fbo.d.ts +7 -2
  48. package/misc/lib/html/html.d.ts +2 -2
  49. package/misc/lib/intersect.d.ts +6 -1
  50. package/misc/lib/sampler.d.ts +1 -1
  51. package/package.json +9 -9
  52. package/staging/index.d.ts +1 -0
  53. package/staging/lib/accumulative-shadows.d.ts +1 -1
  54. package/staging/lib/caustics.d.ts +1 -1
  55. package/staging/lib/center.d.ts +2 -2
  56. package/staging/lib/contact-shadows.d.ts +1 -1
  57. package/staging/lib/environment/environment-resource.d.ts +35 -0
  58. package/staging/lib/environment/environment.d.ts +3 -3
  59. package/staging/lib/environment/inject-environment.d.ts +8 -24
  60. package/staging/lib/lightformer.d.ts +1 -1
  61. package/staging/lib/mask.d.ts +1 -1
  62. package/staging/lib/matcap-texture.d.ts +17 -4
  63. package/staging/lib/normal-texture.d.ts +20 -7
  64. package/staging/lib/sky.d.ts +1 -1
  65. package/staging/lib/spot-light.d.ts +4 -4
  66. package/staging/lib/stage.d.ts +6 -6
@@ -6,7 +6,7 @@ export declare function calculateOffset(clickPoint: THREE.Vector3, normal: THREE
6
6
  export declare class NgtsAxisArrow {
7
7
  protected readonly DoubleSide: 2;
8
8
  direction: import("@angular/core").InputSignal<THREE.Vector3>;
9
- axis: import("@angular/core").InputSignal<0 | 1 | 2>;
9
+ axis: import("@angular/core").InputSignal<0 | 2 | 1>;
10
10
  private groupRef;
11
11
  private innerGroupRef;
12
12
  private annotationRef;
@@ -7,7 +7,7 @@ export declare class NgtsAxisRotator {
7
7
  protected readonly DoubleSide: 2;
8
8
  dir1: import("@angular/core").InputSignal<THREE.Vector3>;
9
9
  dir2: import("@angular/core").InputSignal<THREE.Vector3>;
10
- axis: import("@angular/core").InputSignal<0 | 1 | 2>;
10
+ axis: import("@angular/core").InputSignal<0 | 2 | 1>;
11
11
  groupRef: import("@angular/core").Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
12
12
  annotationRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
13
13
  protected pivotControls: NgtsPivotControls;
@@ -60,7 +60,7 @@ export interface NgtsPivotControlsOptions {
60
60
  }
61
61
  export declare class NgtsPivotControls {
62
62
  options: import("@angular/core").InputSignalWithTransform<NgtsPivotControlsOptions, "" | Partial<NgtsPivotControlsOptions>>;
63
- protected parameters: import("@angular/core").Signal<Omit<NgtsPivotControlsOptions, "opacity" | "anchor" | "fixed" | "rotation" | "scale" | "matrix" | "visible" | "userData" | "axisColors" | "hoveredColor" | "enabled" | "lineWidth" | "offset" | "autoTransform" | "activeAxes" | "disableAxes" | "disableSliders" | "disableRotations" | "disableScaling" | "translationLimits" | "rotationLimits" | "scaleLimits" | "annotations" | "annotationsClass" | "depthTest">>;
63
+ protected parameters: import("@angular/core").Signal<Omit<NgtsPivotControlsOptions, "rotation" | "scale" | "matrix" | "visible" | "userData" | "opacity" | "anchor" | "fixed" | "axisColors" | "hoveredColor" | "enabled" | "lineWidth" | "offset" | "autoTransform" | "activeAxes" | "disableAxes" | "disableSliders" | "disableRotations" | "disableScaling" | "translationLimits" | "rotationLimits" | "scaleLimits" | "annotations" | "annotationsClass" | "depthTest">>;
64
64
  dragStarted: import("@angular/core").OutputEmitterRef<OnDragStartParameters>;
65
65
  dragEnded: import("@angular/core").OutputEmitterRef<void>;
66
66
  dragged: import("@angular/core").OutputEmitterRef<OnDragParameters>;
@@ -7,7 +7,7 @@ export declare class NgtsPlaneSlider {
7
7
  protected readonly DoubleSide: 2;
8
8
  dir1: import("@angular/core").InputSignal<THREE.Vector3>;
9
9
  dir2: import("@angular/core").InputSignal<THREE.Vector3>;
10
- axis: import("@angular/core").InputSignal<0 | 1 | 2>;
10
+ axis: import("@angular/core").InputSignal<0 | 2 | 1>;
11
11
  groupRef: import("@angular/core").Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
12
12
  private meshRef;
13
13
  annotationRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
@@ -6,7 +6,7 @@ import * as i0 from "@angular/core";
6
6
  export declare function calculateOffset(clickPoint: THREE.Vector3, normal: THREE.Vector3, rayStart: THREE.Vector3, rayDir: THREE.Vector3): number;
7
7
  export declare class NgtsScalingSphere {
8
8
  direction: import("@angular/core").InputSignal<THREE.Vector3>;
9
- axis: import("@angular/core").InputSignal<0 | 1 | 2>;
9
+ axis: import("@angular/core").InputSignal<0 | 2 | 1>;
10
10
  groupRef: import("@angular/core").Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
11
11
  private innerGroupRef;
12
12
  annotationRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
@@ -1,6 +1,10 @@
1
1
  export * from './lib/fbx-loader';
2
+ export * from './lib/fbx-resource';
2
3
  export * from './lib/font-loader';
4
+ export * from './lib/font-resource';
3
5
  export * from './lib/gltf-loader';
6
+ export * from './lib/gltf-resource';
4
7
  export * from './lib/loader';
5
8
  export * from './lib/progress';
6
9
  export * from './lib/texture-loader';
10
+ export * from './lib/texture-resource';
@@ -1,10 +1,18 @@
1
1
  import { Injector } from '@angular/core';
2
+ /**
3
+ * @deprecated Use fbxResource instead. Will be removed in v5.0.0
4
+ * @since v4.0.0
5
+ */
2
6
  declare function _injectFBX<TUrl extends string | string[] | Record<string, string>>(input: () => TUrl, { injector }?: {
3
7
  injector?: Injector;
4
- }): import("@angular/core").Signal<import("angular-three").NgtLoaderResults<TUrl, import("three").Group<import("three").Object3DEventMap>> | null>;
8
+ }): import("@angular/core").Signal<import("angular-three").NgtLoaderResults<TUrl, import("three").Group<import("three").Object3DEventMap>> | undefined>;
5
9
  declare namespace _injectFBX {
6
10
  var preload: <TUrl extends string | string[] | Record<string, string>>(input: () => TUrl) => void;
7
11
  }
8
12
  export type NgtsFBXLoader = typeof _injectFBX;
13
+ /**
14
+ * @deprecated Use fbxResource instead. Will be removed in v5.0.0
15
+ * @since v4.0.0
16
+ */
9
17
  export declare const injectFBX: NgtsFBXLoader;
10
18
  export {};
@@ -0,0 +1,7 @@
1
+ import { Injector } from '@angular/core';
2
+ export declare function fbxResource<TUrl extends string | string[] | Record<string, string>>(input: () => TUrl, { injector }?: {
3
+ injector?: Injector;
4
+ }): import("@angular/core").ResourceRef<import("angular-three").NgtLoaderResults<TUrl, import("three").Group<import("three").Object3DEventMap>> | undefined>;
5
+ export declare namespace fbxResource {
6
+ var preload: <TUrl extends string | string[] | Record<string, string>>(input: TUrl) => void;
7
+ }
@@ -1,26 +1,12 @@
1
1
  import { Injector } from '@angular/core';
2
- import { Font } from 'three-stdlib';
3
- export type Glyph = {
4
- _cachedOutline: string[];
5
- ha: number;
6
- o: string;
7
- };
8
- export type FontData = {
9
- boundingBox: {
10
- yMax: number;
11
- yMin: number;
12
- };
13
- familyName: string;
14
- glyphs: {
15
- [k: string]: Glyph;
16
- };
17
- resolution: number;
18
- underlineThickness: number;
19
- };
20
- export type NgtsFontInput = string | FontData;
2
+ import { type NgtsFontInput } from './font-resource';
3
+ /**
4
+ * @deprecated Use fontResource instead. Will be removed in v5.0.0
5
+ * @since v4.0.0
6
+ */
21
7
  export declare function injectFont(input: () => NgtsFontInput, { injector }?: {
22
8
  injector?: Injector;
23
- }): import("@angular/core").Signal<Font | null>;
9
+ }): import("@angular/core").Signal<import("three-stdlib").Font | undefined>;
24
10
  export declare namespace injectFont {
25
11
  var preload: (input: () => NgtsFontInput) => void;
26
12
  var clear: (input?: () => NgtsFontInput) => void;
@@ -0,0 +1,28 @@
1
+ import { Injector } from '@angular/core';
2
+ import { Font } from 'three-stdlib';
3
+ type Glyph = {
4
+ _cachedOutline: string[];
5
+ ha: number;
6
+ o: string;
7
+ };
8
+ type FontData = {
9
+ boundingBox: {
10
+ yMax: number;
11
+ yMin: number;
12
+ };
13
+ familyName: string;
14
+ glyphs: {
15
+ [k: string]: Glyph;
16
+ };
17
+ resolution: number;
18
+ underlineThickness: number;
19
+ };
20
+ export type NgtsFontInput = string | FontData;
21
+ export declare function fontResource(input: () => NgtsFontInput, { injector }?: {
22
+ injector?: Injector;
23
+ }): import("@angular/core").ResourceRef<Font | undefined>;
24
+ export declare namespace fontResource {
25
+ var preload: (input: NgtsFontInput) => void;
26
+ var clear: (input?: NgtsFontInput) => void;
27
+ }
28
+ export {};
@@ -3,6 +3,10 @@ import { NgtLoaderResults, NgtObjectMap } from 'angular-three';
3
3
  import { GLTF, GLTFLoader } from 'three-stdlib';
4
4
  type InjectGLTFUrl<TGltf extends GLTF | GLTF[] | Record<string, GLTF>> = TGltf extends GLTF ? string : TGltf extends GLTF[] ? string[] : TGltf extends Record<string, GLTF> ? Record<string, string> : never;
5
5
  type InjectGLTFObjectMap<TGltf extends GLTF | GLTF[] | Record<string, GLTF>> = TGltf extends GLTF ? TGltf & NgtObjectMap : TGltf extends Array<infer _GLTF extends GLTF> ? Array<_GLTF & NgtObjectMap> : TGltf extends Record<string, infer _GLTF extends GLTF> ? Record<string, _GLTF & NgtObjectMap> : never;
6
+ /**
7
+ * @deprecated Use gltfResource instead. Will be removed in v5.0.0
8
+ * @since v4.0.0
9
+ */
6
10
  declare function _injectGLTF<TGltf extends GLTF | GLTF[] | Record<string, GLTF> = GLTF, TUrl extends string | string[] | Record<string, string> = InjectGLTFUrl<TGltf>>(path: () => TUrl, { useDraco, useMeshOpt, injector, extensions, onLoad, }?: {
7
11
  useDraco?: boolean | string;
8
12
  useMeshOpt?: boolean;
@@ -22,5 +26,9 @@ declare namespace _injectGLTF {
22
26
  var setDecoderPath: (path: string) => void;
23
27
  }
24
28
  export type NgtsGLTFLoader = typeof _injectGLTF;
29
+ /**
30
+ * @deprecated Use gltfResource instead. Will be removed in v5.0.0
31
+ * @since v4.0.0
32
+ */
25
33
  export declare const injectGLTF: NgtsGLTFLoader;
26
34
  export {};
@@ -0,0 +1,32 @@
1
+ import { Injector, ResourceRef, Signal } from '@angular/core';
2
+ import { type NgtObjectMap } from 'angular-three';
3
+ import { type GLTF, GLTFLoader } from 'three-stdlib';
4
+ type GLTFUrl<TGLTF extends GLTF | GLTF[] | Record<string, GLTF>> = TGLTF extends GLTF ? string : TGLTF extends GLTF[] ? string[] : TGLTF extends Record<string, GLTF> ? Record<string, string> : never;
5
+ type GLTFObjectMap<TGLTF extends GLTF | GLTF[] | Record<string, GLTF>, TUrl extends string | string[] | Record<string, string>> = [TGLTF, TUrl] extends [GLTF, string] ? TGLTF & NgtObjectMap : [TGLTF, TUrl] extends [Array<infer _GLTF extends GLTF>, string[]] ? Array<_GLTF & NgtObjectMap> : [TGLTF, TUrl] extends [Record<string, infer _GLTF extends GLTF>, Record<string, string>] ? {
6
+ [Key in keyof TGLTF]: _GLTF & NgtObjectMap;
7
+ } : [TGLTF, TUrl] extends [GLTF, string[] | Record<string, string>] ? TUrl extends string[] ? Array<TGLTF & NgtObjectMap> : {
8
+ [K in keyof TUrl]: TGLTF & NgtObjectMap;
9
+ } : never;
10
+ type GLTFObjectSceneMap<TGLTF extends GLTF | GLTF[] | Record<string, GLTF>, TUrl extends string | string[] | Record<string, string>> = [TGLTF, TUrl] extends [GLTF, string] ? GLTF['scene'] : [TGLTF, TUrl] extends [Array<infer _GLTF extends GLTF>, string[]] ? Array<_GLTF['scene']> : [TGLTF, TUrl] extends [Record<string, infer _GLTF extends GLTF>, Record<string, string>] ? {
11
+ [Key in keyof TGLTF]: _GLTF['scene'];
12
+ } : [TGLTF, TUrl] extends [GLTF, string[] | Record<string, string>] ? TUrl extends string[] ? Array<GLTF['scene']> : {
13
+ [K in keyof TUrl]: GLTF['scene'];
14
+ } : never;
15
+ export declare function gltfResource<TGLTF extends GLTF | GLTF[] | Record<string, GLTF> = GLTF, TUrl extends string | string[] | Record<string, string> = GLTFUrl<TGLTF>>(input: () => TUrl, { useDraco, useMeshOpt, injector, extensions, onLoad, }?: {
16
+ useDraco?: boolean | string;
17
+ useMeshOpt?: boolean;
18
+ injector?: Injector;
19
+ extensions?: (loader: GLTFLoader) => void;
20
+ onLoad?: (data: GLTFObjectMap<TGLTF, TUrl>) => void;
21
+ }): ResourceRef<GLTFObjectMap<TGLTF, TUrl> | undefined> & {
22
+ scene: Signal<GLTFObjectSceneMap<TGLTF, TUrl> | null>;
23
+ };
24
+ export declare namespace gltfResource {
25
+ var preload: <TUrl extends string | string[] | Record<string, string>>(input: TUrl, { useDraco, useMeshOpt, extensions, }?: {
26
+ useDraco?: boolean | string;
27
+ useMeshOpt?: boolean;
28
+ extensions?: (loader: GLTFLoader) => void;
29
+ }) => void;
30
+ var setDecoderPath: (path: string) => void;
31
+ }
32
+ export {};
@@ -9,8 +9,8 @@ export interface NgtsLoaderOptions {
9
9
  }
10
10
  export declare class NgtsLoader {
11
11
  private progressState;
12
- protected active: import("@angular/core").Signal<boolean>;
13
- protected progress: import("@angular/core").Signal<number>;
12
+ protected active: import("angular-three").Signal<boolean>;
13
+ protected progress: import("angular-three").Signal<number>;
14
14
  options: import("@angular/core").InputSignalWithTransform<NgtsLoaderOptions, "" | Partial<NgtsLoaderOptions>>;
15
15
  protected containerClass: import("@angular/core").Signal<string | undefined>;
16
16
  protected innerClass: import("@angular/core").Signal<string | undefined>;
@@ -1,5 +1,5 @@
1
1
  import { Injector } from '@angular/core';
2
- export declare function injectProgress(injector?: Injector): import("@angular/core").Signal<{
2
+ export declare function progress(injector?: Injector): import("angular-three").SignalState<{
3
3
  errors: string[];
4
4
  active: boolean;
5
5
  progress: number;
@@ -7,3 +7,8 @@ export declare function injectProgress(injector?: Injector): import("@angular/co
7
7
  loaded: number;
8
8
  total: number;
9
9
  }>;
10
+ /**
11
+ * @deprecated Use `progress` instead. Will be removed in v5.0.0
12
+ * @since v4.0.0
13
+ */
14
+ export declare const injectProgress: typeof progress;
@@ -1,6 +1,10 @@
1
1
  import { Injector, Signal } from '@angular/core';
2
2
  import { NgtLoaderResults } from 'angular-three';
3
3
  import * as THREE from 'three';
4
+ /**
5
+ * @deprecated Use textureResource instead. Will be removed in v5.0.0
6
+ * @since v4.0.0
7
+ */
4
8
  declare function _injectTexture<TInput extends string[] | string | Record<string, string>>(input: () => TInput, { onLoad, injector }?: {
5
9
  onLoad?: (texture: THREE.Texture[]) => void;
6
10
  injector?: Injector;
@@ -9,5 +13,9 @@ declare namespace _injectTexture {
9
13
  var preload: <TInput extends string[] | string | Record<string, string>>(input: () => TInput) => void;
10
14
  }
11
15
  export type NgtsTextureLoader = typeof _injectTexture;
16
+ /**
17
+ * @deprecated Use textureResource instead. Will be removed in v5.0.0
18
+ * @since v4.0.0
19
+ */
12
20
  export declare const injectTexture: NgtsTextureLoader;
13
21
  export {};
@@ -0,0 +1,10 @@
1
+ import { Injector } from '@angular/core';
2
+ import { NgtLoaderResults } from 'angular-three';
3
+ import * as THREE from 'three';
4
+ export declare function textureResource<TUrl extends string[] | string | Record<string, string>>(input: () => TUrl, { onLoad, injector, }?: {
5
+ onLoad?: (result: NgtLoaderResults<TUrl, THREE.Texture>) => void;
6
+ injector?: Injector;
7
+ }): import("@angular/core").ResourceRef<NgtLoaderResults<TUrl, THREE.Texture> | undefined>;
8
+ export declare namespace textureResource {
9
+ var preload: <TUrl extends string[] | string | Record<string, string>>(input: TUrl) => void;
10
+ }
@@ -38,7 +38,12 @@ export type NgtsAnimation<TAnimation extends NgtsAnimationClip = NgtsAnimationCl
38
38
  /**
39
39
  * Use afterNextRender
40
40
  */
41
- export declare function injectAnimations<TAnimation extends NgtsAnimationClip>(animations: () => NgtsAnimation<TAnimation> | undefined | null, object: ElementRef<THREE.Object3D> | THREE.Object3D | (() => ElementRef<THREE.Object3D> | THREE.Object3D | undefined | null), { injector }?: {
41
+ export declare function animations<TAnimation extends NgtsAnimationClip>(animationsFactory: () => NgtsAnimation<TAnimation> | undefined | null, object: ElementRef<THREE.Object3D> | THREE.Object3D | (() => ElementRef<THREE.Object3D> | THREE.Object3D | undefined | null), { injector }?: {
42
42
  injector?: Injector;
43
43
  }): NgtsAnimationApi<TAnimation>;
44
+ /**
45
+ * @deprecated use animations instead. Will be removed in v5.0.0
46
+ * @since v4.0.0
47
+ */
48
+ export declare const injectAnimations: typeof animations;
44
49
  export {};
@@ -11,7 +11,7 @@ export interface NgtsDecalOptions extends Partial<NgtThreeElements['ngt-mesh']>
11
11
  export declare class NgtsDecal {
12
12
  mesh: import("@angular/core").InputSignal<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | ElementRef<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>> | null | undefined>;
13
13
  options: import("@angular/core").InputSignalWithTransform<NgtsDecalOptions, "" | Partial<NgtsDecalOptions>>;
14
- protected parameters: import("@angular/core").Signal<Omit<NgtsDecalOptions, "position" | "rotation" | "scale" | "map" | "debug" | "depthTest" | "polygonOffsetFactor">>;
14
+ protected parameters: import("@angular/core").Signal<Omit<NgtsDecalOptions, "position" | "scale" | "debug" | "rotation" | "map" | "depthTest" | "polygonOffsetFactor">>;
15
15
  meshRef: import("@angular/core").Signal<ElementRef<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>>;
16
16
  private helperRef;
17
17
  protected map: import("@angular/core").Signal<THREE.Texture | null | undefined>;
@@ -1,8 +1,13 @@
1
1
  import { Injector } from '@angular/core';
2
2
  import * as THREE from 'three';
3
- export declare function injectDepthBuffer(params?: () => {
3
+ export declare function depthBuffer(params?: () => {
4
4
  size?: number;
5
5
  frames?: number;
6
6
  }, { injector }?: {
7
7
  injector?: Injector;
8
8
  }): THREE.DepthTexture | null;
9
+ /**
10
+ * @deprecated use depthBuffer instead. Will be removed in v5.0.0
11
+ * @since v4.0.0
12
+ */
13
+ export declare const injectDepthBuffer: typeof depthBuffer;
package/misc/lib/fbo.d.ts CHANGED
@@ -24,9 +24,14 @@ export interface NgtsFBOParams {
24
24
  height?: number;
25
25
  settings?: FBOSettings;
26
26
  }
27
- export declare function injectFBO(params?: () => NgtsFBOParams, { injector }?: {
27
+ export declare function fbo(params?: () => NgtsFBOParams, { injector }?: {
28
28
  injector?: Injector;
29
29
  }): THREE.WebGLRenderTarget<THREE.Texture>;
30
+ /**
31
+ * @deprecated use fbo instead. Will be removed in v5.0.0
32
+ * @since v4.0.0
33
+ */
34
+ export declare const injectFBO: typeof fbo;
30
35
  export declare class NgtsFBO {
31
36
  fbo: import("@angular/core").InputSignal<{
32
37
  width: NgtsFBOParams["width"];
@@ -36,7 +41,7 @@ export declare class NgtsFBO {
36
41
  private viewContainerRef;
37
42
  constructor();
38
43
  static ngTemplateContextGuard(_: NgtsFBO, ctx: unknown): ctx is {
39
- $implicit: ReturnType<typeof injectFBO>;
44
+ $implicit: ReturnType<typeof fbo>;
40
45
  };
41
46
  static ɵfac: i0.ɵɵFactoryDeclaration<NgtsFBO, never>;
42
47
  static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsFBO, "ng-template[fbo]", never, { "fbo": { "alias": "fbo"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
@@ -11,13 +11,13 @@ export interface NgtsHTMLOptions extends Partial<NgtThreeElements['ngt-group']>
11
11
  }
12
12
  export declare class NgtsHTMLImpl {
13
13
  options: import("@angular/core").InputSignalWithTransform<NgtsHTMLOptions, "" | Partial<NgtsHTMLOptions>>;
14
- protected parameters: import("@angular/core").Signal<Omit<NgtsHTMLOptions, "castShadow" | "receiveShadow" | "transform" | "occlude">>;
14
+ protected parameters: import("@angular/core").Signal<Omit<NgtsHTMLOptions, "transform" | "castShadow" | "receiveShadow" | "occlude">>;
15
15
  groupRef: import("@angular/core").Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
16
16
  occlusionMeshRef: import("@angular/core").Signal<ElementRef<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>> | undefined>;
17
17
  occlusionGeometryRef: import("@angular/core").Signal<ElementRef<THREE.PlaneGeometry> | undefined>;
18
18
  protected castShadow: import("@angular/core").Signal<boolean>;
19
19
  protected receiveShadow: import("@angular/core").Signal<boolean>;
20
- occlude: import("@angular/core").Signal<boolean | "raycast" | THREE.Object3D<THREE.Object3DEventMap>[] | "blending" | ElementRef<THREE.Object3D<THREE.Object3DEventMap>>[]>;
20
+ occlude: import("@angular/core").Signal<boolean | "raycast" | THREE.Object3D<THREE.Object3DEventMap>[] | ElementRef<THREE.Object3D<THREE.Object3DEventMap>>[] | "blending">;
21
21
  transform: import("@angular/core").Signal<boolean>;
22
22
  isRaycastOcclusion: import("@angular/core").Signal<boolean | 0>;
23
23
  private shaders;
@@ -1,10 +1,15 @@
1
1
  import { ElementRef, Injector, WritableSignal } from '@angular/core';
2
2
  import * as THREE from 'three';
3
3
  import * as i0 from "@angular/core";
4
- export declare function injectIntersect<TObject extends THREE.Object3D>(object: () => ElementRef<TObject> | TObject | undefined | null, { injector, source }?: {
4
+ export declare function intersect<TObject extends THREE.Object3D>(object: () => ElementRef<TObject> | TObject | undefined | null, { injector, source }?: {
5
5
  injector?: Injector;
6
6
  source?: WritableSignal<boolean>;
7
7
  }): import("@angular/core").Signal<boolean>;
8
+ /**
9
+ * @deprecated Use `intersect` instead. Will be removed in v5.0.0
10
+ * @since v4.0.0
11
+ */
12
+ export declare const injectIntersect: typeof intersect;
8
13
  export declare class NgtsIntersect {
9
14
  intersect: import("@angular/core").ModelSignal<boolean>;
10
15
  constructor();
@@ -60,7 +60,7 @@ export declare class NgtsSampler {
60
60
  mesh: import("@angular/core").InputSignal<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | ElementRef<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>> | null>;
61
61
  instances: import("@angular/core").InputSignal<THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.InstancedMeshEventMap> | ElementRef<THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.InstancedMeshEventMap>> | null>;
62
62
  options: import("@angular/core").InputSignalWithTransform<NgtsSamplerOptions, "" | Partial<NgtsSamplerOptions>>;
63
- protected parameters: import("@angular/core").Signal<Omit<NgtsSamplerOptions, "count" | "transform" | "weight">>;
63
+ protected parameters: import("@angular/core").Signal<Omit<NgtsSamplerOptions, "transform" | "count" | "weight">>;
64
64
  groupRef: import("@angular/core").Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
65
65
  private count;
66
66
  private weight;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-three-soba",
3
- "version": "4.0.0-next.97",
3
+ "version": "4.0.0-next.99",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,14 +35,6 @@
35
35
  "types": "./abstractions/index.d.ts",
36
36
  "default": "./fesm2022/angular-three-soba-abstractions.mjs"
37
37
  },
38
- "./cameras": {
39
- "types": "./cameras/index.d.ts",
40
- "default": "./fesm2022/angular-three-soba-cameras.mjs"
41
- },
42
- "./controls": {
43
- "types": "./controls/index.d.ts",
44
- "default": "./fesm2022/angular-three-soba-controls.mjs"
45
- },
46
38
  "./gizmos": {
47
39
  "types": "./gizmos/index.d.ts",
48
40
  "default": "./fesm2022/angular-three-soba-gizmos.mjs"
@@ -55,6 +47,14 @@
55
47
  "types": "./materials/index.d.ts",
56
48
  "default": "./fesm2022/angular-three-soba-materials.mjs"
57
49
  },
50
+ "./controls": {
51
+ "types": "./controls/index.d.ts",
52
+ "default": "./fesm2022/angular-three-soba-controls.mjs"
53
+ },
54
+ "./cameras": {
55
+ "types": "./cameras/index.d.ts",
56
+ "default": "./fesm2022/angular-three-soba-cameras.mjs"
57
+ },
58
58
  "./misc": {
59
59
  "types": "./misc/index.d.ts",
60
60
  "default": "./fesm2022/angular-three-soba-misc.mjs"
@@ -7,6 +7,7 @@ export * from './lib/caustics';
7
7
  export * from './lib/center';
8
8
  export * from './lib/contact-shadows';
9
9
  export * from './lib/environment/environment';
10
+ export * from './lib/environment/environment-resource';
10
11
  export * from './lib/environment/inject-environment';
11
12
  export * from './lib/float';
12
13
  export * from './lib/lightformer';
@@ -30,7 +30,7 @@ export declare class NgtsAccumulativeShadows {
30
30
  protected readonly nullTraversal: () => null;
31
31
  protected readonly Math: Math;
32
32
  options: import("@angular/core").InputSignalWithTransform<NgtsAccumulativeShadowsOptions, "" | Partial<NgtsAccumulativeShadowsOptions>>;
33
- parameters: import("@angular/core").Signal<Omit<NgtsAccumulativeShadowsOptions, "scale" | "temporal" | "frames" | "limit" | "blend" | "opacity" | "alphaTest" | "color" | "colorBlend" | "resolution" | "toneMapped">>;
33
+ parameters: import("@angular/core").Signal<Omit<NgtsAccumulativeShadowsOptions, "scale" | "frames" | "blend" | "limit" | "temporal" | "opacity" | "alphaTest" | "color" | "colorBlend" | "resolution" | "toneMapped">>;
34
34
  lightsRef: import("@angular/core").Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
35
35
  planeRef: import("@angular/core").Signal<ElementRef<THREE.Mesh<THREE.PlaneGeometry, THREE.ShaderMaterial & {
36
36
  map: THREE.Texture | null;
@@ -32,7 +32,7 @@ export declare class NgtsCaustics {
32
32
  protected readonly OneFactor: 201;
33
33
  protected readonly SrcAlphaFactor: 204;
34
34
  options: import("@angular/core").InputSignalWithTransform<NgtsCausticsOptions, "" | Partial<NgtsCausticsOptions>>;
35
- protected parameters: import("@angular/core").Signal<Omit<NgtsCausticsOptions, "frames" | "color" | "resolution" | "debug" | "intensity" | "causticsOnly" | "backside" | "ior" | "backsideIOR" | "worldRadius" | "lightSource">>;
35
+ protected parameters: import("@angular/core").Signal<Omit<NgtsCausticsOptions, "frames" | "color" | "resolution" | "debug" | "causticsOnly" | "backside" | "ior" | "backsideIOR" | "worldRadius" | "intensity" | "lightSource">>;
36
36
  protected debug: import("@angular/core").Signal<boolean>;
37
37
  protected color: import("@angular/core").Signal<THREE.ColorRepresentation>;
38
38
  private resolution;
@@ -38,12 +38,12 @@ export interface NgtsCenterOptions {
38
38
  }
39
39
  export declare class NgtsCenter {
40
40
  options: import("@angular/core").InputSignalWithTransform<Partial<import("angular-three").NgtThreeElement<typeof THREE.Group>> & NgtsCenterOptions, "" | Partial<Partial<import("angular-three").NgtThreeElement<typeof THREE.Group>> & NgtsCenterOptions>>;
41
- protected parameters: import("@angular/core").Signal<Omit<Partial<import("angular-three").NgtThreeElement<typeof THREE.Group>> & NgtsCenterOptions, "top" | "right" | "bottom" | "left" | "front" | "back" | "disable" | "disableX" | "disableY" | "disableZ" | "precise" | "cacheKey">>;
41
+ protected parameters: import("@angular/core").Signal<Omit<Partial<import("angular-three").NgtThreeElement<typeof THREE.Group>> & NgtsCenterOptions, "disable" | "top" | "left" | "right" | "bottom" | "precise" | "cacheKey" | "front" | "back" | "disableX" | "disableY" | "disableZ">>;
42
42
  centered: import("@angular/core").OutputEmitterRef<NgtsCenterState>;
43
43
  groupRef: import("@angular/core").Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
44
44
  private outerRef;
45
45
  private innerRef;
46
- centerOptions: import("@angular/core").Signal<Pick<Partial<import("angular-three").NgtThreeElement<typeof THREE.Group>> & NgtsCenterOptions, "top" | "right" | "bottom" | "left" | "front" | "back" | "disable" | "disableX" | "disableY" | "disableZ" | "precise" | "cacheKey">>;
46
+ centerOptions: import("@angular/core").Signal<Pick<Partial<import("angular-three").NgtThreeElement<typeof THREE.Group>> & NgtsCenterOptions, "disable" | "top" | "left" | "right" | "bottom" | "precise" | "cacheKey" | "front" | "back" | "disableX" | "disableY" | "disableZ">>;
47
47
  constructor();
48
48
  static ɵfac: i0.ɵɵFactoryDeclaration<NgtsCenter, never>;
49
49
  static ɵcmp: i0.ɵɵComponentDeclaration<NgtsCenter, "ngts-center", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, { "centered": "centered"; }, never, ["*"], true, never>;
@@ -19,7 +19,7 @@ export interface NgtsContactShadowsOptions extends Partial<Omit<NgtThreeElements
19
19
  export declare class NgtsContactShadows {
20
20
  protected readonly Math: Math;
21
21
  options: import("@angular/core").InputSignalWithTransform<NgtsContactShadowsOptions, "" | Partial<NgtsContactShadowsOptions>>;
22
- protected parameters: import("@angular/core").Signal<Omit<NgtsContactShadowsOptions, "scale" | "renderOrder" | "frames" | "opacity" | "color" | "resolution" | "width" | "height" | "near" | "far" | "blur" | "smooth" | "depthWrite">>;
22
+ protected parameters: import("@angular/core").Signal<Omit<NgtsContactShadowsOptions, "scale" | "renderOrder" | "frames" | "opacity" | "color" | "resolution" | "depthWrite" | "width" | "height" | "near" | "far" | "blur" | "smooth">>;
23
23
  contactShadowsRef: import("@angular/core").Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
24
24
  private shadowsCameraRef;
25
25
  private store;
@@ -0,0 +1,35 @@
1
+ import { Injector } from '@angular/core';
2
+ import * as THREE from 'three';
3
+ export declare const ENVIRONMENT_PRESETS: {
4
+ apartment: string;
5
+ city: string;
6
+ dawn: string;
7
+ forest: string;
8
+ lobby: string;
9
+ night: string;
10
+ park: string;
11
+ studio: string;
12
+ sunset: string;
13
+ warehouse: string;
14
+ };
15
+ export type NgtsEnvironmentPresets = keyof typeof ENVIRONMENT_PRESETS;
16
+ export interface NgtsEnvironmentResourceOptions {
17
+ files: string | string[];
18
+ path: string;
19
+ preset?: NgtsEnvironmentPresets;
20
+ extensions?: (loader: THREE.Loader) => void;
21
+ colorSpace?: THREE.ColorSpace;
22
+ }
23
+ export declare function environmentResource(options?: () => Partial<NgtsEnvironmentResourceOptions>, { injector }?: {
24
+ injector?: Injector;
25
+ }): {
26
+ texture: import("@angular/core").Signal<THREE.Texture | THREE.CubeTexture | null>;
27
+ resource: import("@angular/core").ResourceRef<unknown>;
28
+ };
29
+ export declare namespace environmentResource {
30
+ var preload: (options?: Partial<NgtsEnvironmentResourceOptions>) => void;
31
+ var clear: (clearOptions: {
32
+ files?: string | string[];
33
+ preset?: NgtsEnvironmentPresets;
34
+ }) => void;
35
+ }
@@ -1,9 +1,9 @@
1
1
  import { ElementRef, TemplateRef } from '@angular/core';
2
2
  import { NgtEuler } from 'angular-three';
3
3
  import * as THREE from 'three';
4
- import { NgtsEnvironmentPresets, NgtsInjectEnvironmentOptions } from './inject-environment';
4
+ import { type NgtsEnvironmentPresets, type NgtsEnvironmentResourceOptions } from './environment-resource';
5
5
  import * as i0 from "@angular/core";
6
- export interface NgtsEnvironmentOptions extends Partial<NgtsInjectEnvironmentOptions> {
6
+ export interface NgtsEnvironmentOptions extends Partial<NgtsEnvironmentResourceOptions> {
7
7
  frames?: number;
8
8
  near?: number;
9
9
  far?: number;
@@ -82,7 +82,7 @@ export declare class NgtsEnvironmentPortal {
82
82
  export declare class NgtsEnvironmentGround {
83
83
  options: import("@angular/core").InputSignal<NgtsEnvironmentOptions>;
84
84
  envSet: import("@angular/core").OutputEmitterRef<void>;
85
- private defaultTexture;
85
+ private defaultEnvironment;
86
86
  protected height: import("@angular/core").Signal<any>;
87
87
  protected radius: import("@angular/core").Signal<any>;
88
88
  protected scale: import("@angular/core").Signal<any>;
@@ -1,30 +1,14 @@
1
1
  import { Injector } from '@angular/core';
2
- import * as THREE from 'three';
3
- export declare const ENVIRONMENT_PRESETS: {
4
- apartment: string;
5
- city: string;
6
- dawn: string;
7
- forest: string;
8
- lobby: string;
9
- night: string;
10
- park: string;
11
- studio: string;
12
- sunset: string;
13
- warehouse: string;
14
- };
15
- export type NgtsEnvironmentPresets = keyof typeof ENVIRONMENT_PRESETS;
16
- export interface NgtsInjectEnvironmentOptions {
17
- files: string | string[];
18
- path: string;
19
- preset?: NgtsEnvironmentPresets;
20
- extensions?: (loader: THREE.Loader) => void;
21
- colorSpace?: THREE.ColorSpace;
22
- }
23
- export declare function injectEnvironment(options?: () => Partial<NgtsInjectEnvironmentOptions>, { injector }?: {
2
+ import { type NgtsEnvironmentPresets, type NgtsEnvironmentResourceOptions } from './environment-resource';
3
+ /**
4
+ * @deprecated use environmentResource instead. Will be removed in v5.0.0
5
+ * @since v4.0.0
6
+ */
7
+ export declare function injectEnvironment(options?: () => Partial<NgtsEnvironmentResourceOptions>, { injector }?: {
24
8
  injector?: Injector;
25
- }): import("@angular/core").Signal<THREE.Texture | THREE.CubeTexture | null>;
9
+ }): import("@angular/core").Signal<import("three").Texture | import("three").CubeTexture | null>;
26
10
  export declare namespace injectEnvironment {
27
- var preload: (options?: () => Partial<NgtsInjectEnvironmentOptions>) => void;
11
+ var preload: (options?: () => Partial<NgtsEnvironmentResourceOptions>) => void;
28
12
  var clear: (clearOptions: {
29
13
  files?: string | string[];
30
14
  preset?: NgtsEnvironmentPresets;
@@ -14,7 +14,7 @@ export interface NgtsLightformerOptions {
14
14
  export declare class NgtsLightformer {
15
15
  protected readonly side: 2;
16
16
  options: import("@angular/core").InputSignalWithTransform<Partial<Omit<import("angular-three").NgtThreeElement<typeof THREE.Mesh>, "scale">> & NgtsLightformerOptions, "" | Partial<Partial<Omit<import("angular-three").NgtThreeElement<typeof THREE.Mesh>, "scale">> & NgtsLightformerOptions>>;
17
- protected parameters: import("@angular/core").Signal<Omit<Partial<Omit<import("angular-three").NgtThreeElement<typeof THREE.Mesh>, "scale">> & NgtsLightformerOptions, "scale" | "map" | "color" | "toneMapped" | "intensity" | "target" | "form">>;
17
+ protected parameters: import("@angular/core").Signal<Omit<Partial<Omit<import("angular-three").NgtThreeElement<typeof THREE.Mesh>, "scale">> & NgtsLightformerOptions, "scale" | "map" | "color" | "toneMapped" | "target" | "intensity" | "form">>;
18
18
  private intensity;
19
19
  private color;
20
20
  private target;
@@ -9,7 +9,7 @@ export interface NgtsMaskOptions extends Partial<NgtThreeElements['ngt-mesh']> {
9
9
  export declare class NgtsMask {
10
10
  id: import("@angular/core").InputSignalWithTransform<number, unknown>;
11
11
  options: import("@angular/core").InputSignalWithTransform<NgtsMaskOptions, "" | Partial<NgtsMaskOptions>>;
12
- protected parameters: import("@angular/core").Signal<Omit<NgtsMaskOptions, "depthWrite" | "colorWrite">>;
12
+ protected parameters: import("@angular/core").Signal<Omit<NgtsMaskOptions, "colorWrite" | "depthWrite">>;
13
13
  meshRef: import("@angular/core").Signal<ElementRef<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material, THREE.Object3DEventMap>>>;
14
14
  private colorWrite;
15
15
  private depthWrite;