angular-three-soba 1.8.1 → 1.9.1

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 (43) hide show
  1. package/assets/default-spot-light-shadow.glsl +10 -0
  2. package/esm2020/misc/index.mjs +2 -1
  3. package/esm2020/misc/lib/depth-buffer/depth-buffer.mjs +39 -0
  4. package/esm2020/shaders/index.mjs +2 -1
  5. package/esm2020/shaders/lib/mesh-distort-material/mesh-distort-material.mjs +3 -3
  6. package/esm2020/shaders/lib/spot-light-material/spot-light-material.mjs +86 -0
  7. package/esm2020/staging/index.mjs +3 -1
  8. package/esm2020/staging/lib/spot-light/common.mjs +40 -0
  9. package/esm2020/staging/lib/spot-light/shadow-mesh-input.mjs +46 -0
  10. package/esm2020/staging/lib/spot-light/spot-light-input.mjs +61 -0
  11. package/esm2020/staging/lib/spot-light/spot-light-shadow-no-shader.mjs +73 -0
  12. package/esm2020/staging/lib/spot-light/spot-light-shadow-shader.mjs +124 -0
  13. package/esm2020/staging/lib/spot-light/spot-light-shadow.mjs +63 -0
  14. package/esm2020/staging/lib/spot-light/spot-light.mjs +116 -0
  15. package/esm2020/staging/lib/spot-light/volumetric-mesh.mjs +85 -0
  16. package/fesm2015/angular-three-soba-misc.mjs +38 -4
  17. package/fesm2015/angular-three-soba-misc.mjs.map +1 -1
  18. package/fesm2015/angular-three-soba-shaders.mjs +89 -4
  19. package/fesm2015/angular-three-soba-shaders.mjs.map +1 -1
  20. package/fesm2015/angular-three-soba-staging.mjs +564 -5
  21. package/fesm2015/angular-three-soba-staging.mjs.map +1 -1
  22. package/fesm2020/angular-three-soba-misc.mjs +37 -3
  23. package/fesm2020/angular-three-soba-misc.mjs.map +1 -1
  24. package/fesm2020/angular-three-soba-shaders.mjs +89 -4
  25. package/fesm2020/angular-three-soba-shaders.mjs.map +1 -1
  26. package/fesm2020/angular-three-soba-staging.mjs +564 -5
  27. package/fesm2020/angular-three-soba-staging.mjs.map +1 -1
  28. package/misc/index.d.ts +1 -0
  29. package/misc/lib/depth-buffer/depth-buffer.d.ts +7 -0
  30. package/package.json +1 -1
  31. package/plugin/package.json +1 -1
  32. package/shaders/index.d.ts +1 -0
  33. package/shaders/lib/mesh-distort-material/mesh-distort-material.d.ts +7 -1
  34. package/shaders/lib/spot-light-material/spot-light-material.d.ts +4 -0
  35. package/staging/index.d.ts +2 -0
  36. package/staging/lib/spot-light/common.d.ts +3 -0
  37. package/staging/lib/spot-light/shadow-mesh-input.d.ts +13 -0
  38. package/staging/lib/spot-light/spot-light-input.d.ts +16 -0
  39. package/staging/lib/spot-light/spot-light-shadow-no-shader.d.ts +14 -0
  40. package/staging/lib/spot-light/spot-light-shadow-shader.d.ts +25 -0
  41. package/staging/lib/spot-light/spot-light-shadow.d.ts +6 -0
  42. package/staging/lib/spot-light/spot-light.d.ts +17 -0
  43. package/staging/lib/spot-light/volumetric-mesh.d.ts +15 -0
package/misc/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './lib/bake-shadows/bake-shadows';
2
+ export * from './lib/depth-buffer/depth-buffer';
2
3
  export * from './lib/fbo/fbo';
@@ -0,0 +1,7 @@
1
+ import { Observable } from 'rxjs';
2
+ import * as THREE from 'three';
3
+ export interface NgtsDepthBufferParams {
4
+ size: number;
5
+ frames: number;
6
+ }
7
+ export declare function injectNgtsDepthBuffer(paramsFactory?: (defaultParams: Partial<NgtsDepthBufferParams>) => NgtsDepthBufferParams | Observable<NgtsDepthBufferParams>): import("angular-three").NgtInjectedRef<THREE.DepthTexture>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-three-soba",
3
- "version": "1.8.1",
3
+ "version": "1.9.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -6,5 +6,5 @@
6
6
  },
7
7
  "main": "./src/index.js",
8
8
  "types": "./src/index.d.ts",
9
- "version": "1.8.1"
9
+ "version": "1.9.1"
10
10
  }
@@ -4,3 +4,4 @@ export * from './lib/mesh-distort-material/mesh-distort-material';
4
4
  export * from './lib/mesh-reflector-material/mesh-reflector-material';
5
5
  export * from './lib/mesh-wobble-material/mesh-wobble-material';
6
6
  export * from './lib/shader-material/shader-material';
7
+ export * from './lib/spot-light-material/spot-light-material';
@@ -3,13 +3,19 @@ import * as THREE from 'three';
3
3
  interface Uniform<T> {
4
4
  value: T;
5
5
  }
6
+ /**
7
+ * npm i -D raw-loader glslify-loader
8
+ * Usage: import distort from 'raw-loader!glslify-loader!angular-three-soba/assets/distort.vert.glsl'
9
+ *
10
+ * provideNgtsMeshDistortMaterialShader(distort)
11
+ */
6
12
  export type MeshDistortMaterial = Type<{
7
13
  time: number;
8
14
  distort: number;
9
15
  radius: number;
10
16
  } & THREE.MeshPhysicalMaterial>;
11
17
  export declare const NGTS_DISTORT_MATERIAL_SHADER: InjectionToken<MeshDistortMaterial>;
12
- export declare function provideDistortMaterialShader(distortShader: string): {
18
+ export declare function provideNgtsMeshDistortMaterialShader(distortShader: string): {
13
19
  provide: InjectionToken<MeshDistortMaterial>;
14
20
  useFactory: () => {
15
21
  new (parameters?: THREE.MeshPhysicalMaterialParameters): {
@@ -0,0 +1,4 @@
1
+ import { ShaderMaterial } from 'three';
2
+ export declare class SpotLightMaterial extends ShaderMaterial {
3
+ constructor();
4
+ }
@@ -10,5 +10,7 @@ export * from './lib/environment/environment';
10
10
  export * from './lib/float/float';
11
11
  export * from './lib/sky/sky';
12
12
  export * from './lib/sparkles/sparkles';
13
+ export * from './lib/spot-light/spot-light';
14
+ export * from './lib/spot-light/spot-light-shadow';
13
15
  export * from './lib/stage/stage';
14
16
  export * from './lib/stars/stars';
@@ -0,0 +1,3 @@
1
+ import { NgtInjectedRef, NgtRxStore } from 'angular-three';
2
+ import * as THREE from 'three';
3
+ export declare function injectShadowMeshCommon(spotLight: NgtInjectedRef<THREE.SpotLight>, mesh: NgtInjectedRef<THREE.Mesh>, width: number, height: number, distance: number): (instance: NgtRxStore) => void;
@@ -0,0 +1,13 @@
1
+ import { NgtRxStore } from 'angular-three';
2
+ import * as i0 from "@angular/core";
3
+ export declare abstract class NgtsSpotLightShadowMeshInput extends NgtRxStore {
4
+ set distance(distance: number);
5
+ set alphaTest(alphaTest: number);
6
+ set scale(scale: number);
7
+ set map(map: THREE.Texture);
8
+ set shader(shader: string);
9
+ set width(width: number);
10
+ set height(height: number);
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsSpotLightShadowMeshInput, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsSpotLightShadowMeshInput, never, never, { "distance": "distance"; "alphaTest": "alphaTest"; "scale": "scale"; "map": "map"; "shader": "shader"; "width": "width"; "height": "height"; }, {}, never, never, false, never>;
13
+ }
@@ -0,0 +1,16 @@
1
+ import { NgtRxStore } from 'angular-three';
2
+ import * as i0 from "@angular/core";
3
+ export declare abstract class NgtsSpotLightInput extends NgtRxStore {
4
+ set depthBuffer(depthBuffer: THREE.DepthTexture);
5
+ set angle(angle: number);
6
+ set distance(distance: number);
7
+ set attenuation(attenuation: number);
8
+ set anglePower(anglePower: number);
9
+ set radiusTop(radiusTop: number);
10
+ set radiusBottom(radiusBottom: number);
11
+ set opacity(opacity: number);
12
+ set color(color: string | number);
13
+ set debug(debug: boolean);
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsSpotLightInput, never>;
15
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsSpotLightInput, never, never, { "depthBuffer": "depthBuffer"; "angle": "angle"; "distance": "distance"; "attenuation": "attenuation"; "anglePower": "anglePower"; "radiusTop": "radiusTop"; "radiusBottom": "radiusBottom"; "opacity": "opacity"; "color": "color"; "debug": "debug"; }, {}, never, never, false, never>;
16
+ }
@@ -0,0 +1,14 @@
1
+ import { OnInit } from '@angular/core';
2
+ import * as THREE from 'three';
3
+ import { NgtsSpotLightShadowMeshInput } from './shadow-mesh-input';
4
+ import * as i0 from "@angular/core";
5
+ export declare class NgtsSpotLightShadowNoShader extends NgtsSpotLightShadowMeshInput implements OnInit {
6
+ readonly mesh: import("angular-three").NgtInjectedRef<THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
7
+ readonly spotLightApi: import("./spot-light").NgtsSpotLightAPI;
8
+ readonly DoubleSide: THREE.Side;
9
+ readonly runInContext: <TReturn>(cb: () => TReturn) => TReturn;
10
+ initialize(): void;
11
+ ngOnInit(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsSpotLightShadowNoShader, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgtsSpotLightShadowNoShader, "ngts-spot-light-shadow-no-shader", never, {}, {}, never, ["*"], true, never>;
14
+ }
@@ -0,0 +1,25 @@
1
+ import { OnInit } from '@angular/core';
2
+ import * as THREE from 'three';
3
+ import { NgtsSpotLightShadowMeshInput } from './shadow-mesh-input';
4
+ import * as i0 from "@angular/core";
5
+ export declare class NgtsSpotLightShadowShader extends NgtsSpotLightShadowMeshInput implements OnInit {
6
+ readonly mesh: import("angular-three").NgtInjectedRef<THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
7
+ readonly spotLightApi: import("./spot-light").NgtsSpotLightAPI;
8
+ readonly DoubleSide: THREE.Side;
9
+ readonly RepeatWrapping: THREE.Wrapping;
10
+ readonly runInContext: <TReturn>(cb: () => TReturn) => TReturn;
11
+ readonly texture$: import("rxjs").Observable<any>;
12
+ initialize(): void;
13
+ readonly uniforms: {
14
+ uShadowMap: {
15
+ value: any;
16
+ };
17
+ uTime: {
18
+ value: number;
19
+ };
20
+ };
21
+ constructor();
22
+ ngOnInit(): void;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsSpotLightShadowShader, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgtsSpotLightShadowShader, "ngts-spot-light-shadow-shader", never, {}, {}, never, ["*"], true, never>;
25
+ }
@@ -0,0 +1,6 @@
1
+ import { NgtsSpotLightShadowMeshInput } from './shadow-mesh-input';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NgtsSpotLightShadow extends NgtsSpotLightShadowMeshInput {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsSpotLightShadow, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgtsSpotLightShadow, "ngts-spot-light-shadow", never, {}, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,17 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { NgtInjectedRef } from 'angular-three';
3
+ import { SpotLight } from 'three';
4
+ import { NgtsSpotLightInput } from './spot-light-input';
5
+ import * as i0 from "@angular/core";
6
+ export interface NgtsSpotLightAPI {
7
+ spotLight: NgtInjectedRef<THREE.SpotLight>;
8
+ debug: boolean;
9
+ }
10
+ export declare const NGTS_SPOT_LIGHT_API: InjectionToken<NgtsSpotLightAPI>;
11
+ export declare class NgtsSpotLight extends NgtsSpotLightInput {
12
+ spotLightRef: NgtInjectedRef<SpotLight>;
13
+ set volumetric(volumetric: boolean);
14
+ initialize(): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsSpotLight, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgtsSpotLight, "ngts-spot-light", never, { "spotLightRef": "spotLightRef"; "volumetric": "volumetric"; }, {}, never, ["*"], true, never>;
17
+ }
@@ -0,0 +1,15 @@
1
+ import { SpotLightMaterial } from 'angular-three-soba/shaders';
2
+ import * as THREE from 'three';
3
+ import { NgtsSpotLightInput } from './spot-light-input';
4
+ import * as i0 from "@angular/core";
5
+ export declare class NgtsVolumetricMesh extends NgtsSpotLightInput {
6
+ readonly mesh: import("angular-three").NgtInjectedRef<THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
7
+ readonly material: SpotLightMaterial;
8
+ readonly nullRaycast: () => null;
9
+ private readonly vec;
10
+ private readonly store;
11
+ initialize(): void;
12
+ constructor();
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsVolumetricMesh, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgtsVolumetricMesh, "ngts-volumetric-mesh", never, {}, {}, never, never, true, never>;
15
+ }