angular-three-soba 1.0.2 → 1.2.0
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.
- package/esm2020/controls/lib/orbit-controls/orbit-controls.mjs +3 -3
- package/esm2020/loaders/index.mjs +4 -1
- package/esm2020/loaders/lib/loader/loader.mjs +133 -0
- package/esm2020/loaders/lib/progress/progress.mjs +39 -0
- package/esm2020/loaders/lib/texture-loader/texture-loader.mjs +19 -0
- package/esm2020/misc/angular-three-soba-misc.mjs +5 -0
- package/esm2020/misc/index.mjs +2 -0
- package/esm2020/misc/lib/bake-shadows/bake-shadows.mjs +25 -0
- package/esm2020/performance/angular-three-soba-performance.mjs +5 -0
- package/esm2020/performance/index.mjs +5 -0
- package/esm2020/performance/lib/adaptive/adaptive-dpr.mjs +46 -0
- package/esm2020/performance/lib/adaptive/adaptive-events.mjs +36 -0
- package/esm2020/performance/lib/detailed/detailed.mjs +50 -0
- package/esm2020/performance/lib/stats/stats.mjs +63 -0
- package/esm2020/shaders/angular-three-soba-shaders.mjs +5 -0
- package/esm2020/shaders/index.mjs +2 -0
- package/esm2020/shaders/lib/shader-material/shader-material.mjs +34 -0
- package/esm2020/staging/angular-three-soba-staging.mjs +5 -0
- package/esm2020/staging/index.mjs +13 -0
- package/esm2020/staging/lib/accumulative-shadows/accumulative-shadows.mjs +276 -0
- package/esm2020/staging/lib/accumulative-shadows/progressive-light-map.mjs +109 -0
- package/esm2020/staging/lib/accumulative-shadows/randomized-lights.mjs +196 -0
- package/esm2020/staging/lib/bounds/bounds.mjs +283 -0
- package/esm2020/staging/lib/center/center.mjs +142 -0
- package/esm2020/staging/lib/contact-shadows/contact-shadows.mjs +227 -0
- package/esm2020/staging/lib/environment/assets.mjs +13 -0
- package/esm2020/staging/lib/environment/environment-cube.mjs +40 -0
- package/esm2020/staging/lib/environment/environment-ground.mjs +66 -0
- package/esm2020/staging/lib/environment/environment-inputs.mjs +86 -0
- package/esm2020/staging/lib/environment/environment-map.mjs +38 -0
- package/esm2020/staging/lib/environment/environment-portal.mjs +110 -0
- package/esm2020/staging/lib/environment/environment.mjs +163 -0
- package/esm2020/staging/lib/environment/utils.mjs +70 -0
- package/esm2020/staging/lib/float/float.mjs +76 -0
- package/esm2020/staging/lib/sky/sky.mjs +111 -0
- package/esm2020/staging/lib/sparkles/sparkles.mjs +209 -0
- package/esm2020/staging/lib/stage/stage.mjs +369 -0
- package/esm2020/staging/lib/stars/stars.mjs +171 -0
- package/fesm2015/angular-three-soba-controls.mjs +3 -3
- package/fesm2015/angular-three-soba-loaders.mjs +187 -3
- package/fesm2015/angular-three-soba-loaders.mjs.map +1 -1
- package/fesm2015/angular-three-soba-misc.mjs +32 -0
- package/fesm2015/angular-three-soba-misc.mjs.map +1 -0
- package/fesm2015/angular-three-soba-performance.mjs +191 -0
- package/fesm2015/angular-three-soba-performance.mjs.map +1 -0
- package/fesm2015/angular-three-soba-shaders.mjs +38 -0
- package/fesm2015/angular-three-soba-shaders.mjs.map +1 -0
- package/fesm2015/angular-three-soba-staging.mjs +2647 -0
- package/fesm2015/angular-three-soba-staging.mjs.map +1 -0
- package/fesm2020/angular-three-soba-controls.mjs +3 -3
- package/fesm2020/angular-three-soba-loaders.mjs +186 -3
- package/fesm2020/angular-three-soba-loaders.mjs.map +1 -1
- package/fesm2020/angular-three-soba-misc.mjs +32 -0
- package/fesm2020/angular-three-soba-misc.mjs.map +1 -0
- package/fesm2020/angular-three-soba-performance.mjs +191 -0
- package/fesm2020/angular-three-soba-performance.mjs.map +1 -0
- package/fesm2020/angular-three-soba-shaders.mjs +41 -0
- package/fesm2020/angular-three-soba-shaders.mjs.map +1 -0
- package/fesm2020/angular-three-soba-staging.mjs +2654 -0
- package/fesm2020/angular-three-soba-staging.mjs.map +1 -0
- package/loaders/index.d.ts +3 -0
- package/loaders/lib/loader/loader.d.ts +26 -0
- package/loaders/lib/progress/progress.d.ts +16 -0
- package/loaders/lib/texture-loader/texture-loader.d.ts +5 -0
- package/misc/README.md +3 -0
- package/misc/index.d.ts +1 -0
- package/misc/lib/bake-shadows/bake-shadows.d.ts +9 -0
- package/package.json +37 -2
- package/performance/README.md +3 -0
- package/performance/index.d.ts +4 -0
- package/performance/lib/adaptive/adaptive-dpr.d.ts +11 -0
- package/performance/lib/adaptive/adaptive-events.d.ts +10 -0
- package/performance/lib/detailed/detailed.d.ts +12 -0
- package/performance/lib/stats/stats.d.ts +14 -0
- package/plugin/package.json +1 -1
- package/plugin/src/generators/init/init.js +13 -17
- package/plugin/src/generators/init/init.js.map +1 -1
- package/shaders/README.md +3 -0
- package/shaders/index.d.ts +1 -0
- package/shaders/lib/shader-material/shader-material.d.ts +6 -0
- package/staging/README.md +3 -0
- package/staging/index.d.ts +12 -0
- package/staging/lib/accumulative-shadows/accumulative-shadows.d.ts +64 -0
- package/staging/lib/accumulative-shadows/progressive-light-map.d.ts +34 -0
- package/staging/lib/accumulative-shadows/randomized-lights.d.ts +42 -0
- package/staging/lib/bounds/bounds.d.ts +48 -0
- package/staging/lib/center/center.d.ts +40 -0
- package/staging/lib/contact-shadows/contact-shadows.d.ts +29 -0
- package/staging/lib/environment/assets.d.ts +13 -0
- package/staging/lib/environment/environment-cube.d.ts +11 -0
- package/staging/lib/environment/environment-ground.d.ts +9 -0
- package/staging/lib/environment/environment-inputs.d.ts +28 -0
- package/staging/lib/environment/environment-map.d.ts +10 -0
- package/staging/lib/environment/environment-portal.d.ts +15 -0
- package/staging/lib/environment/environment.d.ts +12 -0
- package/staging/lib/environment/utils.d.ts +8 -0
- package/staging/lib/float/float.d.ts +16 -0
- package/staging/lib/sky/sky.d.ts +21 -0
- package/staging/lib/sparkles/sparkles.d.ts +29 -0
- package/staging/lib/stage/stage.d.ts +87 -0
- package/staging/lib/stars/stars.d.ts +20 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { NgtRxStore } from 'angular-three';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgtsAdaptiveEvents extends NgtRxStore implements OnInit {
|
|
5
|
+
private readonly store;
|
|
6
|
+
private readonly actions;
|
|
7
|
+
ngOnInit(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsAdaptiveEvents, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsAdaptiveEvents, "ngts-adaptive-events", never, {}, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { NgtRxStore } from 'angular-three';
|
|
3
|
+
import { LOD } from 'three';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NgtsDetailed extends NgtRxStore implements OnInit {
|
|
6
|
+
lodRef: import("angular-three").NgtInjectedRef<LOD>;
|
|
7
|
+
set distances(distances: number[]);
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
private updateLodChildren;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsDetailed, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsDetailed, "ngts-detailed[distances]", never, { "lodRef": "lodRef"; "distances": "distances"; }, {}, never, ["*"], true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { NgtInjectedRef, NgtRxStore } from 'angular-three';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgtsStats extends NgtRxStore implements OnInit {
|
|
5
|
+
private readonly document;
|
|
6
|
+
private readonly stats;
|
|
7
|
+
set showPanel(showPanel: number);
|
|
8
|
+
set parent(parent: NgtInjectedRef<HTMLElement>);
|
|
9
|
+
set classes(classes: string);
|
|
10
|
+
initialize(): void;
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsStats, never>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsStats, "ngts-stats", never, { "showPanel": "showPanel"; "parent": "parent"; "classes": "classes"; }, {}, never, never, true, never>;
|
|
14
|
+
}
|
package/plugin/package.json
CHANGED
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.THREE_STDLIB_VERSION = exports.ANGULAR_THREE_SOBA_VERSION = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
5
|
exports.ANGULAR_THREE_SOBA_VERSION = '^1.0.0';
|
|
7
6
|
exports.THREE_STDLIB_VERSION = '^2.0.0';
|
|
8
|
-
function default_1(tree) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
(0, devkit_1.installPackagesTask)(tree);
|
|
22
|
-
};
|
|
23
|
-
});
|
|
7
|
+
async function default_1(tree) {
|
|
8
|
+
devkit_1.logger.log('Initializing Angular Three...');
|
|
9
|
+
const packageJson = (0, devkit_1.readJson)(tree, 'package.json');
|
|
10
|
+
const version = packageJson['dependencies']?.['angular-three-soba'] ||
|
|
11
|
+
packageJson['devDependencies']?.['angular-three-soba'] ||
|
|
12
|
+
exports.ANGULAR_THREE_SOBA_VERSION;
|
|
13
|
+
(0, devkit_1.addDependenciesToPackageJson)(tree, {
|
|
14
|
+
'angular-three-soba': version,
|
|
15
|
+
'three-stdlib': exports.THREE_STDLIB_VERSION,
|
|
16
|
+
}, {});
|
|
17
|
+
return () => {
|
|
18
|
+
(0, devkit_1.installPackagesTask)(tree);
|
|
19
|
+
};
|
|
24
20
|
}
|
|
25
21
|
exports.default = default_1;
|
|
26
22
|
//# sourceMappingURL=init.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../../libs/plugin/src/generators/init/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../../libs/plugin/src/generators/init/init.ts"],"names":[],"mappings":";;;AAAA,yCAAyG;AAE5F,QAAA,0BAA0B,GAAG,QAAQ,CAAC;AACtC,QAAA,oBAAoB,GAAG,QAAQ,CAAC;AAE9B,KAAK,oBAAW,IAAU;IACrC,eAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;IAE5C,MAAM,WAAW,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAEnD,MAAM,OAAO,GACT,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC,oBAAoB,CAAC;QACnD,WAAW,CAAC,iBAAiB,CAAC,EAAE,CAAC,oBAAoB,CAAC;QACtD,kCAA0B,CAAC;IAE/B,IAAA,qCAA4B,EACxB,IAAI,EACJ;QACI,oBAAoB,EAAE,OAAO;QAC7B,cAAc,EAAE,4BAAoB;KACvC,EACD,EAAE,CACL,CAAC;IAEF,OAAO,GAAG,EAAE;QACR,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;IAC9B,CAAC,CAAC;AACN,CAAC;AAtBD,4BAsBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/shader-material/shader-material';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare function shaderMaterial(uniforms: {
|
|
3
|
+
[name: string]: THREE.CubeTexture | THREE.Texture | Int32Array | Float32Array | THREE.Matrix4 | THREE.Matrix3 | THREE.Quaternion | THREE.Vector4 | THREE.Vector3 | THREE.Vector2 | THREE.Color | number | boolean | Array<any> | null;
|
|
4
|
+
}, vertexShader: string, fragmentShader: string, onInit?: (material?: THREE.ShaderMaterial) => void): typeof THREE.ShaderMaterial & {
|
|
5
|
+
key: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { NgtsAccumulativeShadows } from './lib/accumulative-shadows/accumulative-shadows';
|
|
2
|
+
export { NgtsRandomizedLights } from './lib/accumulative-shadows/randomized-lights';
|
|
3
|
+
export * from './lib/bounds/bounds';
|
|
4
|
+
export * from './lib/center/center';
|
|
5
|
+
export * from './lib/contact-shadows/contact-shadows';
|
|
6
|
+
export * from './lib/environment/assets';
|
|
7
|
+
export * from './lib/environment/environment';
|
|
8
|
+
export * from './lib/float/float';
|
|
9
|
+
export * from './lib/sky/sky';
|
|
10
|
+
export * from './lib/sparkles/sparkles';
|
|
11
|
+
export * from './lib/stage/stage';
|
|
12
|
+
export * from './lib/stars/stars';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { NgtRxStore } from 'angular-three';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
import { ProgressiveLightMap } from './progressive-light-map';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
type SoftShadowMaterialInputs = {
|
|
7
|
+
map: THREE.Texture;
|
|
8
|
+
color?: THREE.ColorRepresentation;
|
|
9
|
+
alphaTest?: number;
|
|
10
|
+
blend?: number;
|
|
11
|
+
};
|
|
12
|
+
export type NgtsAccumulativeShadowsLightApi = {
|
|
13
|
+
update: () => void;
|
|
14
|
+
};
|
|
15
|
+
export type NgtsAccumulativeShadowsApi = {
|
|
16
|
+
lights: Map<string, NgtsAccumulativeShadowsLightApi>;
|
|
17
|
+
temporal: boolean;
|
|
18
|
+
frames: number;
|
|
19
|
+
blend: number;
|
|
20
|
+
count: number;
|
|
21
|
+
getMesh: () => THREE.Mesh<THREE.PlaneGeometry, SoftShadowMaterialInputs & THREE.ShaderMaterial>;
|
|
22
|
+
reset: () => void;
|
|
23
|
+
update: (frames?: number) => void;
|
|
24
|
+
};
|
|
25
|
+
export declare const NGTS_ACCUMULATIVE_SHADOWS_API: InjectionToken<NgtsAccumulativeShadowsApi>;
|
|
26
|
+
export declare class AccumulativeShadowsConsumer {
|
|
27
|
+
constructor();
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AccumulativeShadowsConsumer, never>;
|
|
29
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AccumulativeShadowsConsumer, "ngts-accumulative-shadows-consumer", never, {}, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
31
|
+
export declare class NgtsAccumulativeShadows extends NgtRxStore {
|
|
32
|
+
readonly nullTraverse: () => null;
|
|
33
|
+
readonly Math: Math;
|
|
34
|
+
private readonly store;
|
|
35
|
+
readonly pLM: ProgressiveLightMap;
|
|
36
|
+
readonly accumulativeShadowsRef: import("angular-three").NgtInjectedRef<THREE.Group>;
|
|
37
|
+
readonly meshRef: import("angular-three").NgtInjectedRef<THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
|
|
38
|
+
/** How many frames it can render, more yields cleaner results but takes more time, 40 */
|
|
39
|
+
set frames(frames: number);
|
|
40
|
+
/** If frames === Infinity blend controls the refresh ratio, 100 */
|
|
41
|
+
set blend(blend: number);
|
|
42
|
+
/** Can limit the amount of frames rendered if frames === Infinity, usually to get some performance back once a movable scene has settled, Infinity */
|
|
43
|
+
set limit(limit: number);
|
|
44
|
+
/** Scale of the plane, */
|
|
45
|
+
set scale(scale: number);
|
|
46
|
+
/** Temporal accumulates shadows over time which is more performant but has a visual regression over instant results, false */
|
|
47
|
+
set temporal(temporal: boolean);
|
|
48
|
+
/** Opacity of the plane, 1 */
|
|
49
|
+
set opacity(opacity: number);
|
|
50
|
+
/** Discards alpha pixels, 0.65 */
|
|
51
|
+
set alphaTest(alphaTest: number);
|
|
52
|
+
/** Shadow color, black */
|
|
53
|
+
set color(color: string);
|
|
54
|
+
/** Colorblend, how much colors turn to black, 0 is black, 2 */
|
|
55
|
+
set colorBlend(colorBlend: number);
|
|
56
|
+
/** Buffer resolution, 1024 */
|
|
57
|
+
set resolution(resolution: number);
|
|
58
|
+
/** Texture tonemapping */
|
|
59
|
+
set toneMapped(toneMapped: boolean);
|
|
60
|
+
initialize(): void;
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsAccumulativeShadows, never>;
|
|
62
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsAccumulativeShadows, "ngts-accumulative-shadows", never, { "frames": "frames"; "blend": "blend"; "limit": "limit"; "scale": "scale"; "temporal": "temporal"; "opacity": "opacity"; "alphaTest": "alphaTest"; "color": "color"; "colorBlend": "colorBlend"; "resolution": "resolution"; "toneMapped": "toneMapped"; }, {}, never, ["*"], true, never>;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare class ProgressiveLightMap {
|
|
3
|
+
renderer: THREE.WebGLRenderer;
|
|
4
|
+
res: number;
|
|
5
|
+
scene: THREE.Scene;
|
|
6
|
+
object: THREE.Mesh | null;
|
|
7
|
+
buffer1Active: boolean;
|
|
8
|
+
progressiveLightMap1: THREE.WebGLRenderTarget;
|
|
9
|
+
progressiveLightMap2: THREE.WebGLRenderTarget;
|
|
10
|
+
discardMat: THREE.ShaderMaterial;
|
|
11
|
+
targetMat: THREE.MeshLambertMaterial;
|
|
12
|
+
previousShadowMap: {
|
|
13
|
+
value: THREE.Texture;
|
|
14
|
+
};
|
|
15
|
+
averagingWindow: {
|
|
16
|
+
value: number;
|
|
17
|
+
};
|
|
18
|
+
clearColor: THREE.Color;
|
|
19
|
+
clearAlpha: number;
|
|
20
|
+
lights: {
|
|
21
|
+
object: THREE.Light;
|
|
22
|
+
intensity: number;
|
|
23
|
+
}[];
|
|
24
|
+
meshes: {
|
|
25
|
+
object: THREE.Mesh;
|
|
26
|
+
material: THREE.Material | THREE.Material[];
|
|
27
|
+
}[];
|
|
28
|
+
constructor(renderer: THREE.WebGLRenderer, scene: THREE.Scene, res?: number);
|
|
29
|
+
clear(): void;
|
|
30
|
+
prepare(): void;
|
|
31
|
+
finish(): void;
|
|
32
|
+
configure(object: any): void;
|
|
33
|
+
update(camera: any, blendWindow?: number): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { NgtRxStore } from 'angular-three';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
import { NgtsAccumulativeShadowsLightApi } from './accumulative-shadows';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare const NGTS_RANDOMIZED_LIGHTS_API: InjectionToken<NgtsAccumulativeShadowsLightApi>;
|
|
7
|
+
export declare class RandomizedLightsConsumer {
|
|
8
|
+
constructor();
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RandomizedLightsConsumer, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RandomizedLightsConsumer, "ngts-randomized-lights-consumer", never, {}, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
12
|
+
export declare class NgtsRandomizedLights extends NgtRxStore {
|
|
13
|
+
lightsRef: import("angular-three").NgtInjectedRef<THREE.Group>;
|
|
14
|
+
/** How many frames it will jiggle the lights, 1.
|
|
15
|
+
* Frames is context aware, if a provider like AccumulativeShadows exists, frames will be taken from there! */
|
|
16
|
+
set frames(frames: number);
|
|
17
|
+
/** Light position, [0, 0, 0] */
|
|
18
|
+
set position(position: [x: number, y: number, z: number]);
|
|
19
|
+
/** Radius of the jiggle, higher values make softer light, 5 */
|
|
20
|
+
set radius(radius: number);
|
|
21
|
+
/** Amount of lights, 8 */
|
|
22
|
+
set amount(amount: number);
|
|
23
|
+
/** Light intensity, 1 */
|
|
24
|
+
set intensity(intensity: number);
|
|
25
|
+
/** Ambient occlusion, lower values mean less AO, hight more, you can mix AO and directional light, 0.5 */
|
|
26
|
+
set ambient(ambient: number);
|
|
27
|
+
/** If the lights cast shadows, this is true by default */
|
|
28
|
+
set castShadow(castShadow: boolean);
|
|
29
|
+
/** Default shadow bias, 0 */
|
|
30
|
+
set bias(bias: number);
|
|
31
|
+
/** Default map size, 512 */
|
|
32
|
+
set mapSize(mapSize: number);
|
|
33
|
+
/** Default size of the shadow camera, 10 */
|
|
34
|
+
set size(size: number);
|
|
35
|
+
/** Default shadow camera near, 0.5 */
|
|
36
|
+
set near(near: number);
|
|
37
|
+
/** Default shadow camera far, 500 */
|
|
38
|
+
set far(far: number);
|
|
39
|
+
initialize(): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsRandomizedLights, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsRandomizedLights, "ngts-randomized-lights", never, { "lightsRef": "lightsRef"; "frames": "frames"; "position": "position"; "radius": "radius"; "amount": "amount"; "intensity": "intensity"; "ambient": "ambient"; "castShadow": "castShadow"; "bias": "bias"; "mapSize": "mapSize"; "size": "size"; "near": "near"; "far": "far"; }, {}, never, never, true, never>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { EventEmitter, InjectionToken, OnInit } from '@angular/core';
|
|
2
|
+
import { NgtRxStore } from 'angular-three';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface NgtsBoundsSize {
|
|
6
|
+
box: THREE.Box3;
|
|
7
|
+
size: THREE.Vector3;
|
|
8
|
+
center: THREE.Vector3;
|
|
9
|
+
distance: number;
|
|
10
|
+
}
|
|
11
|
+
export interface NgtsBoundsApi {
|
|
12
|
+
getSize: () => NgtsBoundsSize;
|
|
13
|
+
refresh: (object?: THREE.Object3D | THREE.Box3) => NgtsBoundsApi;
|
|
14
|
+
clip: () => NgtsBoundsApi;
|
|
15
|
+
fit: () => NgtsBoundsApi;
|
|
16
|
+
to: ({ position, target, }: {
|
|
17
|
+
position: [number, number, number];
|
|
18
|
+
target?: [number, number, number];
|
|
19
|
+
}) => NgtsBoundsApi;
|
|
20
|
+
}
|
|
21
|
+
export declare const NGTS_BOUNDS_API: InjectionToken<NgtsBoundsApi>;
|
|
22
|
+
export declare class NgtsBounds extends NgtRxStore implements OnInit {
|
|
23
|
+
boundsRef: import("angular-three").NgtInjectedRef<THREE.Group>;
|
|
24
|
+
set damping(damping: number);
|
|
25
|
+
set fit(fit: boolean);
|
|
26
|
+
set clip(clip: boolean);
|
|
27
|
+
set observe(observe: boolean);
|
|
28
|
+
set margin(margin: number);
|
|
29
|
+
set eps(eps: number);
|
|
30
|
+
fitted: EventEmitter<NgtsBoundsSize>;
|
|
31
|
+
private readonly store;
|
|
32
|
+
readonly current: {
|
|
33
|
+
animating: boolean;
|
|
34
|
+
focus: THREE.Vector3;
|
|
35
|
+
camera: THREE.Vector3;
|
|
36
|
+
zoom: number;
|
|
37
|
+
};
|
|
38
|
+
readonly goal: {
|
|
39
|
+
focus: THREE.Vector3;
|
|
40
|
+
camera: THREE.Vector3;
|
|
41
|
+
zoom: number;
|
|
42
|
+
};
|
|
43
|
+
initialize(): void;
|
|
44
|
+
ngOnInit(): void;
|
|
45
|
+
private preventDragHijacking;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsBounds, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsBounds, "ngts-bounds", never, { "boundsRef": "boundsRef"; "damping": "damping"; "fit": "fit"; "clip": "clip"; "observe": "observe"; "margin": "margin"; "eps": "eps"; }, { "fitted": "fitted"; }, never, ["*"], true, never>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { NgtRxStore } from 'angular-three';
|
|
3
|
+
import { Box3, Group, Sphere, Vector3 } from 'three';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NgtsCenter extends NgtRxStore implements OnInit {
|
|
6
|
+
centerRef: import("angular-three").NgtInjectedRef<Group>;
|
|
7
|
+
readonly outerRef: import("angular-three").NgtInjectedRef<Group>;
|
|
8
|
+
readonly innerRef: import("angular-three").NgtInjectedRef<Group>;
|
|
9
|
+
set top(top: boolean);
|
|
10
|
+
set right(right: boolean);
|
|
11
|
+
set bottom(bottom: boolean);
|
|
12
|
+
set left(left: boolean);
|
|
13
|
+
set front(front: boolean);
|
|
14
|
+
set back(back: boolean);
|
|
15
|
+
set disableX(disableX: boolean);
|
|
16
|
+
set disableY(disableY: boolean);
|
|
17
|
+
set disableZ(disableZ: boolean);
|
|
18
|
+
set disabled(disabled: boolean);
|
|
19
|
+
set precise(precise: boolean);
|
|
20
|
+
centered: EventEmitter<{
|
|
21
|
+
/** The next parent above <Center> */
|
|
22
|
+
parent: THREE.Object3D;
|
|
23
|
+
/** The outmost container group of the <Center> component */
|
|
24
|
+
container: THREE.Object3D;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
depth: number;
|
|
28
|
+
boundingBox: THREE.Box3;
|
|
29
|
+
boundingSphere: THREE.Sphere;
|
|
30
|
+
center: THREE.Vector3;
|
|
31
|
+
verticalAlignment: number;
|
|
32
|
+
horizontalAlignment: number;
|
|
33
|
+
depthAlignment: number;
|
|
34
|
+
}>;
|
|
35
|
+
initialize(): void;
|
|
36
|
+
ngOnInit(): void;
|
|
37
|
+
private setPosition;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsCenter, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsCenter, "ngts-center", never, { "centerRef": "centerRef"; "top": "top"; "right": "right"; "bottom": "bottom"; "left": "left"; "front": "front"; "back": "back"; "disableX": "disableX"; "disableY": "disableY"; "disableZ": "disableZ"; "disabled": "disabled"; "precise": "precise"; }, { "centered": "centered"; }, never, ["*"], true, never>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { NgtRxStore } from 'angular-three';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgtsContactShadows extends NgtRxStore {
|
|
5
|
+
private readonly store;
|
|
6
|
+
readonly shadowCameraRef: import("angular-three").NgtInjectedRef<THREE.OrthographicCamera>;
|
|
7
|
+
readonly encoding: THREE.TextureEncoding;
|
|
8
|
+
readonly contactShadows$: import("rxjs").Observable<any>;
|
|
9
|
+
readonly Math: Math;
|
|
10
|
+
contactShadowsRef: import("angular-three").NgtInjectedRef<THREE.Group>;
|
|
11
|
+
set opacity(opacity: number);
|
|
12
|
+
set width(width: number);
|
|
13
|
+
set height(height: number);
|
|
14
|
+
set blur(blur: number);
|
|
15
|
+
set far(far: number);
|
|
16
|
+
set smooth(smooth: boolean);
|
|
17
|
+
set resolution(resolution: number);
|
|
18
|
+
set frames(frames: number);
|
|
19
|
+
set scale(scale: number | [x: number, y: number]);
|
|
20
|
+
set color(color: THREE.ColorRepresentation);
|
|
21
|
+
set depthWrite(depthWrite: boolean);
|
|
22
|
+
set renderOrder(renderOrder: number);
|
|
23
|
+
constructor();
|
|
24
|
+
initialize(): void;
|
|
25
|
+
private onBeforeRender;
|
|
26
|
+
private blurShadows;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsContactShadows, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsContactShadows, "ngts-contact-shadows", never, { "contactShadowsRef": "contactShadowsRef"; "opacity": "opacity"; "width": "width"; "height": "height"; "blur": "blur"; "far": "far"; "smooth": "smooth"; "resolution": "resolution"; "frames": "frames"; "scale": "scale"; "color": "color"; "depthWrite": "depthWrite"; "renderOrder": "renderOrder"; }, {}, never, never, true, never>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const ngtsEnvironmentPresetsObj: {
|
|
2
|
+
sunset: string;
|
|
3
|
+
dawn: string;
|
|
4
|
+
night: string;
|
|
5
|
+
warehouse: string;
|
|
6
|
+
forest: string;
|
|
7
|
+
apartment: string;
|
|
8
|
+
studio: string;
|
|
9
|
+
city: string;
|
|
10
|
+
park: string;
|
|
11
|
+
lobby: string;
|
|
12
|
+
};
|
|
13
|
+
export type NgtsEnvironmentPresetsType = keyof typeof ngtsEnvironmentPresetsObj;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { NgtsEnvironmentInputs } from './environment-inputs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgtsEnvironmentCube extends NgtsEnvironmentInputs implements OnInit {
|
|
5
|
+
readonly textureRef: import("angular-three").NgtInjectedRef<import("three").CubeTexture | import("three").Texture>;
|
|
6
|
+
initialize(): void;
|
|
7
|
+
ngOnInit(): void;
|
|
8
|
+
private setEnvProps;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsEnvironmentCube, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsEnvironmentCube, "ngts-environment-cube", never, {}, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { NgtsEnvironmentInputs } from './environment-inputs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgtsEnvironmentGround extends NgtsEnvironmentInputs implements OnInit {
|
|
5
|
+
readonly defaultTexture: import("angular-three").NgtInjectedRef<import("three").CubeTexture | import("three").Texture>;
|
|
6
|
+
ngOnInit(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsEnvironmentGround, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsEnvironmentGround, "ngts-environment-ground", never, {}, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { NgtRxStore, NgtStore } from 'angular-three';
|
|
3
|
+
import { Loader, Scene, Texture, TextureEncoding } from 'three';
|
|
4
|
+
import { NgtsEnvironmentPresetsType } from './assets';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare abstract class NgtsEnvironmentInputs extends NgtRxStore {
|
|
7
|
+
protected readonly store: NgtStore;
|
|
8
|
+
set frames(frames: number);
|
|
9
|
+
set near(near: number);
|
|
10
|
+
set far(far: number);
|
|
11
|
+
set resolution(resolution: number);
|
|
12
|
+
set background(background: boolean | 'only');
|
|
13
|
+
set blur(blur: number);
|
|
14
|
+
set map(map: Texture);
|
|
15
|
+
set files(files: string | string[]);
|
|
16
|
+
set path(path: string);
|
|
17
|
+
set preset(preset: NgtsEnvironmentPresetsType);
|
|
18
|
+
set scene(scene: Scene | ElementRef<Scene>);
|
|
19
|
+
set extensions(extensions: (loader: Loader) => void);
|
|
20
|
+
set ground(ground: boolean | {
|
|
21
|
+
radius?: number;
|
|
22
|
+
height?: number;
|
|
23
|
+
scale?: number;
|
|
24
|
+
});
|
|
25
|
+
set encoding(encoding: TextureEncoding);
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsEnvironmentInputs, never>;
|
|
27
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsEnvironmentInputs, never, never, { "frames": "frames"; "near": "near"; "far": "far"; "resolution": "resolution"; "background": "background"; "blur": "blur"; "map": "map"; "files": "files"; "path": "path"; "preset": "preset"; "scene": "scene"; "extensions": "extensions"; "ground": "ground"; "encoding": "encoding"; }, {}, never, never, false, never>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { NgtsEnvironmentInputs } from './environment-inputs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgtsEnvironmentMap extends NgtsEnvironmentInputs implements OnInit {
|
|
5
|
+
initialize(): void;
|
|
6
|
+
ngOnInit(): void;
|
|
7
|
+
private setEnvProps;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsEnvironmentMap, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsEnvironmentMap, "ngts-environment-map", never, {}, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import { NgtsEnvironmentInputs } from './environment-inputs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NgtsEnvironmentPortal extends NgtsEnvironmentInputs implements OnInit {
|
|
6
|
+
readonly virtualSceneRef: import("angular-three").NgtInjectedRef<THREE.Scene>;
|
|
7
|
+
readonly cubeCameraRef: import("angular-three").NgtInjectedRef<THREE.CubeCamera>;
|
|
8
|
+
initialize(): void;
|
|
9
|
+
constructor();
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
private setEnvProps;
|
|
12
|
+
private onBeforeRender;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsEnvironmentPortal, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsEnvironmentPortal, "ngts-environment-portal", never, {}, {}, never, ["*"], true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { NgtsEnvironmentInputs } from './environment-inputs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgtsEnvironmentContent {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsEnvironmentContent, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsEnvironmentContent, "ng-template[ngtsEnvironmentContent]", never, {}, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
8
|
+
export declare class NgtsEnvironment extends NgtsEnvironmentInputs {
|
|
9
|
+
content?: TemplateRef<unknown>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsEnvironment, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsEnvironment, "ngts-environment", never, {}, {}, ["content"], never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { CubeTexture, Texture } from 'three';
|
|
4
|
+
import { NgtsEnvironmentInputs } from './environment-inputs';
|
|
5
|
+
export declare function setEnvProps(background: boolean | 'only', scene: THREE.Scene | ElementRef<THREE.Scene> | undefined, defaultScene: THREE.Scene, texture: THREE.Texture, blur?: number): () => void;
|
|
6
|
+
type NgtsInjectEnvironmentParams = Partial<Pick<NgtsEnvironmentInputs, 'files' | 'path' | 'preset' | 'extensions' | 'encoding'>>;
|
|
7
|
+
export declare function injectNgtsEnvironment(paramsFactory: (defaultParams: NgtsInjectEnvironmentParams) => NgtsInjectEnvironmentParams | Observable<NgtsInjectEnvironmentParams>): import("angular-three").NgtInjectedRef<CubeTexture | Texture>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NgtRxStore } from 'angular-three';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgtsFloat extends NgtRxStore {
|
|
5
|
+
private readonly offset;
|
|
6
|
+
floatRef: import("angular-three").NgtInjectedRef<THREE.Group>;
|
|
7
|
+
set speed(speed: number);
|
|
8
|
+
set rotationIntensity(rotationIntensity: number);
|
|
9
|
+
set floatIntensity(floatIntensity: number);
|
|
10
|
+
set floatingRange(floatingRange: [number?, number?]);
|
|
11
|
+
initialize(): void;
|
|
12
|
+
constructor();
|
|
13
|
+
private onBeforeRender;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsFloat, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsFloat, "ngts-float", never, { "floatRef": "floatRef"; "speed": "speed"; "rotationIntensity": "rotationIntensity"; "floatIntensity": "floatIntensity"; "floatingRange": "floatingRange"; }, {}, never, ["*"], true, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { NgtRxStore } from 'angular-three';
|
|
3
|
+
import { Vector3 } from 'three';
|
|
4
|
+
import { Sky } from 'three-stdlib';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare function calcPosFromAngles(inclination: number, azimuth: number, vector?: Vector3): Vector3;
|
|
7
|
+
export declare class NgtsSky extends NgtRxStore implements OnInit {
|
|
8
|
+
skyRef: import("angular-three").NgtInjectedRef<Sky>;
|
|
9
|
+
set distance(distance: number);
|
|
10
|
+
set sunPosition(sunPosition: THREE.Vector3 | Parameters<THREE.Vector3['set']>);
|
|
11
|
+
set inclination(inclination: number);
|
|
12
|
+
set azimuth(azimuth: number);
|
|
13
|
+
set mieCoefficient(mieCoefficient: number);
|
|
14
|
+
set mieDirectionalG(mieDirectionalG: number);
|
|
15
|
+
set rayleigh(rayleigh: number);
|
|
16
|
+
set turbidity(turbidity: number);
|
|
17
|
+
initialize(): void;
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsSky, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsSky, "ngts-sky", never, { "skyRef": "skyRef"; "distance": "distance"; "sunPosition": "sunPosition"; "inclination": "inclination"; "azimuth": "azimuth"; "mieCoefficient": "mieCoefficient"; "mieDirectionalG": "mieDirectionalG"; "rayleigh": "rayleigh"; "turbidity": "turbidity"; }, {}, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { NgtRxStore } from 'angular-three';
|
|
2
|
+
import { BufferGeometry, Points } from 'three';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgtsSparkles extends NgtRxStore {
|
|
5
|
+
private readonly store;
|
|
6
|
+
readonly dpr: number;
|
|
7
|
+
readonly materialRef: import("angular-three").NgtInjectedRef<import("three").ShaderMaterial>;
|
|
8
|
+
pointsRef: import("angular-three").NgtInjectedRef<Points<BufferGeometry, import("three").Material | import("three").Material[]>>;
|
|
9
|
+
/** Number of particles (default: 100) */
|
|
10
|
+
set count(count: number);
|
|
11
|
+
/** Speed of particles (default: 1) */
|
|
12
|
+
set speed(speed: number | Float32Array);
|
|
13
|
+
/** Opacity of particles (default: 1) */
|
|
14
|
+
set opacity(opacity: number | Float32Array);
|
|
15
|
+
/** Color of particles (default: 100) */
|
|
16
|
+
set color(color: THREE.ColorRepresentation | Float32Array);
|
|
17
|
+
/** Size of particles (default: randomized between 0 and 1) */
|
|
18
|
+
set size(size: number | Float32Array);
|
|
19
|
+
/** The space the particles occupy (default: 1) */
|
|
20
|
+
set scale(scale: number | [number, number, number] | THREE.Vector3);
|
|
21
|
+
/** Movement factor (default: 1) */
|
|
22
|
+
set noise(noise: number | [number, number, number] | THREE.Vector3 | Float32Array);
|
|
23
|
+
initialize(): void;
|
|
24
|
+
constructor();
|
|
25
|
+
private onBeforeRender;
|
|
26
|
+
private getAttribute$;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsSparkles, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsSparkles, "ngts-sparkles", never, { "pointsRef": "pointsRef"; "count": "count"; "speed": "speed"; "opacity": "opacity"; "color": "color"; "size": "size"; "scale": "scale"; "noise": "noise"; }, {}, never, never, true, never>;
|
|
29
|
+
}
|