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

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 (69) hide show
  1. package/abstractions/lib/catmull-rom-line.d.ts +55 -55
  2. package/abstractions/lib/edges.d.ts +55 -55
  3. package/abstractions/lib/helper.d.ts +6 -1
  4. package/abstractions/lib/line.d.ts +1 -1
  5. package/abstractions/lib/text-3d.d.ts +1 -1
  6. package/cameras/lib/cube-camera.d.ts +7 -2
  7. package/cameras/lib/orthographic-camera.d.ts +1 -1
  8. package/cameras/lib/perspective-camera.d.ts +1 -1
  9. package/fesm2022/angular-three-soba-abstractions.mjs +16 -11
  10. package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
  11. package/fesm2022/angular-three-soba-cameras.mjs +16 -11
  12. package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
  13. package/fesm2022/angular-three-soba-controls.mjs +7 -7
  14. package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
  15. package/fesm2022/angular-three-soba-gizmos.mjs +10 -10
  16. package/fesm2022/angular-three-soba-gizmos.mjs.map +1 -1
  17. package/fesm2022/angular-three-soba-loaders.mjs +186 -49
  18. package/fesm2022/angular-three-soba-loaders.mjs.map +1 -1
  19. package/fesm2022/angular-three-soba-materials.mjs +14 -14
  20. package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
  21. package/fesm2022/angular-three-soba-misc.mjs +38 -18
  22. package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
  23. package/fesm2022/angular-three-soba-performances.mjs +6 -6
  24. package/fesm2022/angular-three-soba-performances.mjs.map +1 -1
  25. package/fesm2022/angular-three-soba-staging.mjs +142 -54
  26. package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
  27. package/gizmos/lib/pivot-controls/axis-arrow.d.ts +1 -1
  28. package/gizmos/lib/pivot-controls/axis-rotator.d.ts +1 -1
  29. package/gizmos/lib/pivot-controls/pivot-controls.d.ts +1 -1
  30. package/gizmos/lib/pivot-controls/plane-slider.d.ts +1 -1
  31. package/gizmos/lib/pivot-controls/scaling-sphere.d.ts +1 -1
  32. package/loaders/index.d.ts +4 -0
  33. package/loaders/lib/fbx-loader.d.ts +9 -1
  34. package/loaders/lib/fbx-resource.d.ts +7 -0
  35. package/loaders/lib/font-loader.d.ts +6 -20
  36. package/loaders/lib/font-resource.d.ts +28 -0
  37. package/loaders/lib/gltf-loader.d.ts +8 -0
  38. package/loaders/lib/gltf-resource.d.ts +32 -0
  39. package/loaders/lib/loader.d.ts +2 -2
  40. package/loaders/lib/progress.d.ts +6 -1
  41. package/loaders/lib/texture-loader.d.ts +8 -0
  42. package/loaders/lib/texture-resource.d.ts +10 -0
  43. package/materials/lib/custom-shader-material.d.ts +2 -2
  44. package/materials/lib/mesh-portal-material.d.ts +1 -1
  45. package/materials/lib/mesh-refraction-material.d.ts +1 -1
  46. package/materials/lib/mesh-transmission-material.d.ts +1 -1
  47. package/misc/lib/animations.d.ts +6 -1
  48. package/misc/lib/decal.d.ts +1 -1
  49. package/misc/lib/depth-buffer.d.ts +6 -1
  50. package/misc/lib/fbo.d.ts +7 -2
  51. package/misc/lib/intersect.d.ts +6 -1
  52. package/package.json +5 -5
  53. package/performances/lib/bvh.d.ts +1 -1
  54. package/performances/lib/instances/instances.d.ts +1 -1
  55. package/performances/lib/points/points.d.ts +1 -1
  56. package/performances/lib/segments/segments.d.ts +23 -23
  57. package/staging/index.d.ts +1 -0
  58. package/staging/lib/accumulative-shadows.d.ts +1 -1
  59. package/staging/lib/caustics.d.ts +1 -1
  60. package/staging/lib/contact-shadows.d.ts +1 -1
  61. package/staging/lib/environment/environment-resource.d.ts +35 -0
  62. package/staging/lib/environment/environment.d.ts +3 -3
  63. package/staging/lib/environment/inject-environment.d.ts +8 -24
  64. package/staging/lib/lightformer.d.ts +1 -1
  65. package/staging/lib/matcap-texture.d.ts +17 -4
  66. package/staging/lib/normal-texture.d.ts +20 -7
  67. package/staging/lib/render-texture.d.ts +1 -1
  68. package/staging/lib/spot-light.d.ts +4 -4
  69. package/staging/lib/stage.d.ts +1 -1
@@ -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" | "intensity" | "color" | "toneMapped" | "target" | "form">>;
18
18
  private intensity;
19
19
  private color;
20
20
  private target;
@@ -1,6 +1,10 @@
1
- import { Injector, Signal } from '@angular/core';
1
+ import { Injector, ResourceRef, Signal } from '@angular/core';
2
2
  import * as THREE from 'three';
3
3
  import * as i0 from "@angular/core";
4
+ /**
5
+ * @deprecated Use matcapTexture instead. Will be removed in v5.0.0
6
+ * @since v4.0.0
7
+ */
4
8
  export declare function injectMatcapTexture(id?: () => number | string, { format, onLoad, injector, }?: {
5
9
  format?: () => number;
6
10
  onLoad?: (texture: THREE.Texture[]) => void;
@@ -10,13 +14,22 @@ export declare function injectMatcapTexture(id?: () => number | string, { format
10
14
  texture: Signal<THREE.Texture | null>;
11
15
  numTot: Signal<number>;
12
16
  };
17
+ export declare function matcapTextureResource(id?: () => number | string, { format, onLoad, injector, }?: {
18
+ format?: () => number;
19
+ onLoad?: (texture: THREE.Texture) => void;
20
+ injector?: Injector;
21
+ }): {
22
+ url: Signal<string>;
23
+ resource: ResourceRef<THREE.Texture | undefined>;
24
+ numTot: Signal<number>;
25
+ };
13
26
  export interface NgtsMatcapTextureOptions {
14
27
  id?: number | string;
15
28
  format?: number;
16
29
  }
17
30
  export declare class NgtsMatcapTexture {
18
31
  matcapTexture: import("@angular/core").InputSignal<NgtsMatcapTextureOptions | undefined>;
19
- matcapTextureLoaded: import("@angular/core").OutputEmitterRef<THREE.Texture[]>;
32
+ matcapTextureLoaded: import("@angular/core").InputSignal<((texture: THREE.Texture) => void) | undefined>;
20
33
  private template;
21
34
  private vcr;
22
35
  private id;
@@ -24,8 +37,8 @@ export declare class NgtsMatcapTexture {
24
37
  private ref?;
25
38
  constructor();
26
39
  static ngTemplateContextGuard(_: NgtsMatcapTexture, ctx: unknown): ctx is {
27
- $implicit: Signal<THREE.Texture | null>;
40
+ $implicit: ResourceRef<THREE.Texture | undefined>;
28
41
  };
29
42
  static ɵfac: i0.ɵɵFactoryDeclaration<NgtsMatcapTexture, never>;
30
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsMatcapTexture, "ng-template[matcapTexture]", never, { "matcapTexture": { "alias": "matcapTexture"; "required": false; "isSignal": true; }; }, { "matcapTextureLoaded": "matcapTextureLoaded"; }, never, never, true, never>;
43
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsMatcapTexture, "ng-template[matcapTexture]", never, { "matcapTexture": { "alias": "matcapTexture"; "required": false; "isSignal": true; }; "matcapTextureLoaded": { "alias": "matcapTextureLoaded"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
31
44
  }
@@ -1,4 +1,4 @@
1
- import { Injector, Signal } from '@angular/core';
1
+ import { Injector, ResourceRef } from '@angular/core';
2
2
  import * as THREE from 'three';
3
3
  import * as i0 from "@angular/core";
4
4
  interface NgtsNormalTextureSettings {
@@ -6,21 +6,34 @@ interface NgtsNormalTextureSettings {
6
6
  anisotropy?: number;
7
7
  offset?: number[];
8
8
  }
9
+ /**
10
+ * @deprecated Use normalTexture instead. Will be removed in v5.0.0
11
+ * @since v4.0.0
12
+ */
9
13
  export declare function injectNormalTexture(id: (() => string | number) | undefined, { settings, onLoad, injector, }: {
10
14
  settings?: () => NgtsNormalTextureSettings;
11
15
  onLoad?: (texture: THREE.Texture[]) => void;
12
16
  injector?: Injector;
13
17
  }): {
14
- url: Signal<string>;
15
- texture: Signal<THREE.Texture | null>;
16
- numTot: Signal<number>;
18
+ url: import("@angular/core").Signal<string>;
19
+ texture: import("@angular/core").Signal<THREE.Texture | null>;
20
+ numTot: import("@angular/core").Signal<number>;
21
+ };
22
+ export declare function normalTextureResource(id: (() => string | number) | undefined, { settings, onLoad, injector, }: {
23
+ settings?: () => NgtsNormalTextureSettings;
24
+ onLoad?: (texture: THREE.Texture) => void;
25
+ injector?: Injector;
26
+ }): {
27
+ url: import("@angular/core").Signal<string>;
28
+ resource: ResourceRef<THREE.Texture | undefined>;
29
+ numTot: import("@angular/core").Signal<number>;
17
30
  };
18
31
  export interface NgtsNormalTextureOptions extends NgtsNormalTextureSettings {
19
32
  id?: number | string;
20
33
  }
21
34
  export declare class NgtsNormalTexture {
22
35
  normalTexture: import("@angular/core").InputSignal<NgtsNormalTextureOptions | undefined>;
23
- normalTextureLoaded: import("@angular/core").OutputEmitterRef<THREE.Texture[]>;
36
+ normalTextureLoaded: import("@angular/core").InputSignal<((texture: THREE.Texture) => void) | undefined>;
24
37
  private template;
25
38
  private vcr;
26
39
  private id;
@@ -28,9 +41,9 @@ export declare class NgtsNormalTexture {
28
41
  private ref?;
29
42
  constructor();
30
43
  static ngTemplateContextGuard(_: NgtsNormalTexture, ctx: unknown): ctx is {
31
- $implicit: Signal<THREE.Texture | null>;
44
+ $implicit: ResourceRef<THREE.Texture | undefined>;
32
45
  };
33
46
  static ɵfac: i0.ɵɵFactoryDeclaration<NgtsNormalTexture, never>;
34
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsNormalTexture, "ng-template[normalTexture]", never, { "normalTexture": { "alias": "normalTexture"; "required": false; "isSignal": true; }; }, { "normalTextureLoaded": "normalTextureLoaded"; }, never, never, true, never>;
47
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsNormalTexture, "ng-template[normalTexture]", never, { "normalTexture": { "alias": "normalTexture"; "required": false; "isSignal": true; }; "normalTextureLoaded": { "alias": "normalTextureLoaded"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
35
48
  }
36
49
  export {};
@@ -44,7 +44,7 @@ export declare class NgtsRenderTextureContent {
44
44
  export declare class NgtsRenderTextureImpl {
45
45
  attach: import("@angular/core").InputSignal<NgtAttachable>;
46
46
  options: import("@angular/core").InputSignalWithTransform<NgtsRenderTextureOptions, "" | Partial<NgtsRenderTextureOptions>>;
47
- protected parameters: import("@angular/core").Signal<Omit<NgtsRenderTextureOptions, "frames" | "width" | "height" | "depthBuffer" | "stencilBuffer" | "samples" | "generateMipmaps" | "renderPriority" | "eventPriority" | "compute">>;
47
+ protected parameters: import("@angular/core").Signal<Omit<NgtsRenderTextureOptions, "width" | "height" | "frames" | "depthBuffer" | "stencilBuffer" | "generateMipmaps" | "samples" | "renderPriority" | "eventPriority" | "compute">>;
48
48
  content: import("@angular/core").Signal<TemplateRef<any>>;
49
49
  private store;
50
50
  private width;
@@ -3,7 +3,7 @@ import { NgtThreeElements } from 'angular-three';
3
3
  import * as THREE from 'three';
4
4
  import * as i0 from "@angular/core";
5
5
  export interface NgtsSpotLightOptions extends Partial<NgtThreeElements['ngt-spot-light']> {
6
- depthBuffer?: THREE.DepthTexture;
6
+ depthBuffer: THREE.DepthTexture | null;
7
7
  attenuation?: number;
8
8
  anglePower?: number;
9
9
  radiusTop?: number;
@@ -44,7 +44,7 @@ export declare class NgtsVolumetricMesh {
44
44
  protected color: import("@angular/core").Signal<THREE.ColorRepresentation | undefined>;
45
45
  protected attenuation: import("@angular/core").Signal<number | undefined>;
46
46
  protected anglePower: import("@angular/core").Signal<number | undefined>;
47
- protected depthBuffer: import("@angular/core").Signal<THREE.DepthTexture | undefined>;
47
+ protected depthBuffer: import("@angular/core").Signal<THREE.DepthTexture | null>;
48
48
  protected geometry: import("@angular/core").Signal<THREE.CylinderGeometry>;
49
49
  constructor();
50
50
  static ɵfac: i0.ɵɵFactoryDeclaration<NgtsVolumetricMesh, never>;
@@ -104,8 +104,8 @@ export declare class NgtsSpotLightShadow {
104
104
  export declare class NgtsSpotLight {
105
105
  protected readonly SpotLightHelper: typeof THREE.SpotLightHelper;
106
106
  options: import("@angular/core").InputSignalWithTransform<NgtsSpotLightOptions, "" | Partial<NgtsSpotLightOptions>>;
107
- protected parameters: import("@angular/core").Signal<Omit<NgtsSpotLightOptions, "opacity" | "color" | "debug" | "distance" | "volumetric" | "angle" | "depthBuffer" | "attenuation" | "anglePower" | "radiusTop" | "radiusBottom">>;
108
- protected volumetricOptions: import("@angular/core").Signal<Pick<NgtsSpotLightOptions, "opacity" | "color" | "debug" | "distance" | "angle" | "depthBuffer" | "attenuation" | "anglePower" | "radiusTop" | "radiusBottom">>;
107
+ protected parameters: import("@angular/core").Signal<Omit<NgtsSpotLightOptions, "opacity" | "color" | "volumetric" | "distance" | "angle" | "depthBuffer" | "attenuation" | "anglePower" | "radiusTop" | "radiusBottom" | "debug">>;
108
+ protected volumetricOptions: import("@angular/core").Signal<Pick<NgtsSpotLightOptions, "opacity" | "color" | "distance" | "angle" | "depthBuffer" | "attenuation" | "anglePower" | "radiusTop" | "radiusBottom" | "debug">>;
109
109
  spotLightRef: import("@angular/core").Signal<ElementRef<THREE.SpotLight>>;
110
110
  debug: import("@angular/core").Signal<boolean | undefined>;
111
111
  protected angle: import("@angular/core").Signal<Readonly<number | undefined>>;
@@ -4,7 +4,7 @@ import { NgtsAccumulativeShadowsOptions } from './accumulative-shadows';
4
4
  import { NgtsCenterOptions, NgtsCenterState } from './center';
5
5
  import { NgtsContactShadowsOptions } from './contact-shadows';
6
6
  import { NgtsEnvironmentOptions } from './environment/environment';
7
- import { NgtsEnvironmentPresets } from './environment/inject-environment';
7
+ import { type NgtsEnvironmentPresets } from './environment/environment-resource';
8
8
  import { NgtsRandomizedLightsOptions } from './randomized-lights';
9
9
  import * as i0 from "@angular/core";
10
10
  type NgtsStageShadowsOptions = Partial<NgtsAccumulativeShadowsOptions> & Partial<NgtsRandomizedLightsOptions> & Partial<NgtsContactShadowsOptions> & {