angular-three-soba 1.10.0 → 1.11.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/abstractions/index.d.ts +1 -0
- package/abstractions/lib/edges/edges.d.ts +18 -0
- package/cameras/index.d.ts +1 -0
- package/cameras/lib/camera/camera-content.d.ts +1 -1
- package/cameras/lib/cube-camera/cube-camera.d.ts +27 -0
- package/esm2020/abstractions/index.mjs +2 -1
- package/esm2020/abstractions/lib/edges/edges.mjs +95 -0
- package/esm2020/cameras/index.mjs +2 -1
- package/esm2020/cameras/lib/camera/camera-content.mjs +1 -1
- package/esm2020/cameras/lib/cube-camera/cube-camera.mjs +130 -0
- package/esm2020/materials/index.mjs +3 -1
- package/esm2020/materials/lib/mesh-refraction-material/mesh-refraction-material.mjs +157 -0
- package/esm2020/materials/lib/mesh-transmission-material/mesh-transmission-material.mjs +240 -0
- package/esm2020/misc/lib/fbo/fbo.mjs +5 -4
- package/esm2020/shaders/index.mjs +5 -1
- package/esm2020/shaders/lib/caustics-material/caustics-material.mjs +128 -0
- package/esm2020/shaders/lib/caustics-projection-material/caustics-projection-material.mjs +33 -0
- package/esm2020/shaders/lib/discard-material/discard-material.mjs +3 -0
- package/esm2020/shaders/lib/mesh-transmission-material/mesh-transmission-material.mjs +268 -0
- package/esm2020/staging/index.mjs +2 -1
- package/esm2020/staging/lib/accumulative-shadows/progressive-light-map.mjs +2 -3
- package/esm2020/staging/lib/caustics/caustics.mjs +364 -0
- package/fesm2015/angular-three-soba-abstractions.mjs +91 -2
- package/fesm2015/angular-three-soba-abstractions.mjs.map +1 -1
- package/fesm2015/angular-three-soba-cameras.mjs +127 -4
- package/fesm2015/angular-three-soba-cameras.mjs.map +1 -1
- package/fesm2015/angular-three-soba-materials.mjs +389 -2
- package/fesm2015/angular-three-soba-materials.mjs.map +1 -1
- package/fesm2015/angular-three-soba-misc.mjs +4 -3
- package/fesm2015/angular-three-soba-misc.mjs.map +1 -1
- package/fesm2015/angular-three-soba-shaders.mjs +454 -31
- package/fesm2015/angular-three-soba-shaders.mjs.map +1 -1
- package/fesm2015/angular-three-soba-staging.mjs +363 -9
- package/fesm2015/angular-three-soba-staging.mjs.map +1 -1
- package/fesm2020/angular-three-soba-abstractions.mjs +91 -2
- package/fesm2020/angular-three-soba-abstractions.mjs.map +1 -1
- package/fesm2020/angular-three-soba-cameras.mjs +127 -4
- package/fesm2020/angular-three-soba-cameras.mjs.map +1 -1
- package/fesm2020/angular-three-soba-materials.mjs +387 -2
- package/fesm2020/angular-three-soba-materials.mjs.map +1 -1
- package/fesm2020/angular-three-soba-misc.mjs +4 -3
- package/fesm2020/angular-three-soba-misc.mjs.map +1 -1
- package/fesm2020/angular-three-soba-shaders.mjs +460 -34
- package/fesm2020/angular-three-soba-shaders.mjs.map +1 -1
- package/fesm2020/angular-three-soba-staging.mjs +362 -9
- package/fesm2020/angular-three-soba-staging.mjs.map +1 -1
- package/materials/index.d.ts +2 -0
- package/materials/lib/mesh-refraction-material/mesh-refraction-material.d.ts +28 -0
- package/materials/lib/mesh-transmission-material/mesh-transmission-material.d.ts +47 -0
- package/misc/lib/fbo/fbo.d.ts +8 -6
- package/package.json +2 -2
- package/plugin/package.json +1 -1
- package/shaders/index.d.ts +4 -0
- package/shaders/lib/caustics-material/caustics-material.d.ts +4 -0
- package/shaders/lib/caustics-projection-material/caustics-projection-material.d.ts +4 -0
- package/shaders/lib/discard-material/discard-material.d.ts +3 -0
- package/shaders/lib/mesh-transmission-material/mesh-transmission-material.d.ts +25 -0
- package/staging/index.d.ts +1 -0
- package/staging/lib/caustics/caustics.d.ts +48 -0
- package/staging/lib/environment/environment-cube.d.ts +1 -1
- package/staging/lib/environment/environment-ground.d.ts +1 -1
- package/staging/lib/environment/utils.d.ts +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, TemplateRef, Directive, Input, Component, CUSTOM_ELEMENTS_SCHEMA, ContentChild } from '@angular/core';
|
|
2
|
+
import { inject, TemplateRef, Directive, Input, Component, CUSTOM_ELEMENTS_SCHEMA, ViewChild, ContentChild } from '@angular/core';
|
|
3
3
|
import { NgIf, NgTemplateOutlet } from '@angular/common';
|
|
4
|
-
import { NgtRxStore, injectNgtRef, NgtStore,
|
|
4
|
+
import { extend, NgtRxStore, injectNgtRef, NgtStore, injectBeforeRender, NgtArgs, NgtPush } from 'angular-three';
|
|
5
5
|
import { map, combineLatest } from 'rxjs';
|
|
6
|
-
import
|
|
6
|
+
import * as THREE from 'three';
|
|
7
|
+
import { Group, CubeCamera, OrthographicCamera, PerspectiveCamera } from 'three';
|
|
7
8
|
import { injectNgtsFBO } from 'angular-three-soba/misc';
|
|
8
9
|
|
|
9
10
|
class NgtsCameraContent {
|
|
@@ -24,6 +25,128 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
24
25
|
type: Input
|
|
25
26
|
}] } });
|
|
26
27
|
|
|
28
|
+
extend({ Group, CubeCamera });
|
|
29
|
+
class NgtsCubeCamera extends NgtRxStore {
|
|
30
|
+
/** Number of frames to render, Infinity */
|
|
31
|
+
set frames(frames) {
|
|
32
|
+
this.set({ frames });
|
|
33
|
+
}
|
|
34
|
+
/** Resolution of the FBO, 256 */
|
|
35
|
+
set resolution(resolution) {
|
|
36
|
+
this.set({ resolution });
|
|
37
|
+
}
|
|
38
|
+
/** Camera near, 0.1 */
|
|
39
|
+
set near(near) {
|
|
40
|
+
this.set({ near });
|
|
41
|
+
}
|
|
42
|
+
/** Camera far, 1000 */
|
|
43
|
+
set far(far) {
|
|
44
|
+
this.set({ far });
|
|
45
|
+
}
|
|
46
|
+
/** Custom environment map that is temporarily set as the scenes background */
|
|
47
|
+
set envMap(envMap) {
|
|
48
|
+
this.set({ envMap });
|
|
49
|
+
}
|
|
50
|
+
/** Custom fog that is temporarily set as the scenes fog */
|
|
51
|
+
set fog(fog) {
|
|
52
|
+
this.set({ fog });
|
|
53
|
+
}
|
|
54
|
+
initialize() {
|
|
55
|
+
super.initialize();
|
|
56
|
+
this.set({
|
|
57
|
+
frames: Infinity,
|
|
58
|
+
resolution: 256,
|
|
59
|
+
near: 0.1,
|
|
60
|
+
far: 1000,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
constructor() {
|
|
64
|
+
super();
|
|
65
|
+
this.cameraRef = injectNgtRef();
|
|
66
|
+
this.store = inject(NgtStore);
|
|
67
|
+
this.connect('fbo', this.select('resolution').pipe(map((resolution) => {
|
|
68
|
+
const fbo = new THREE.WebGLCubeRenderTarget(resolution);
|
|
69
|
+
fbo.texture.encoding = this.store.get('gl').outputEncoding;
|
|
70
|
+
fbo.texture.type = THREE.HalfFloatType;
|
|
71
|
+
return fbo;
|
|
72
|
+
})));
|
|
73
|
+
this.connect('cameraArgs', combineLatest([this.select('near'), this.select('far'), this.select('fbo')]));
|
|
74
|
+
let count = 0;
|
|
75
|
+
let originalFog;
|
|
76
|
+
let originalBackground;
|
|
77
|
+
injectBeforeRender(({ scene, gl }) => {
|
|
78
|
+
const { frames, envMap, fog } = this.get();
|
|
79
|
+
if (envMap &&
|
|
80
|
+
this.cameraRef.nativeElement &&
|
|
81
|
+
this.groupRef.nativeElement &&
|
|
82
|
+
(frames === Infinity || count < frames)) {
|
|
83
|
+
this.groupRef.nativeElement.visible = false;
|
|
84
|
+
originalFog = scene.fog;
|
|
85
|
+
originalBackground = scene.background;
|
|
86
|
+
scene.background = envMap || originalBackground;
|
|
87
|
+
scene.fog = fog || originalFog;
|
|
88
|
+
this.cameraRef.nativeElement.update(gl, scene);
|
|
89
|
+
scene.fog = originalFog;
|
|
90
|
+
scene.background = originalBackground;
|
|
91
|
+
this.groupRef.nativeElement.visible = true;
|
|
92
|
+
count++;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
NgtsCubeCamera.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: NgtsCubeCamera, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
98
|
+
NgtsCubeCamera.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: NgtsCubeCamera, isStandalone: true, selector: "ngts-cube-camera", inputs: { frames: "frames", resolution: "resolution", near: "near", far: "far", envMap: "envMap", fog: "fog" }, queries: [{ propertyName: "cameraContent", first: true, predicate: NgtsCameraContent, descendants: true }], viewQueries: [{ propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
99
|
+
<ngt-group ngtCompound>
|
|
100
|
+
<ngt-cube-camera [ref]="cameraRef" *args="get('cameraArgs')" />
|
|
101
|
+
<ngt-group #group>
|
|
102
|
+
<ng-container
|
|
103
|
+
*ngIf="cameraContent && cameraContent.ngtsCameraContent && get('fbo')"
|
|
104
|
+
[ngTemplateOutlet]="cameraContent.template"
|
|
105
|
+
[ngTemplateOutletContext]="{ fbo: get('fbo').texture, group }"
|
|
106
|
+
/>
|
|
107
|
+
</ngt-group>
|
|
108
|
+
</ngt-group>
|
|
109
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: NgtsCubeCamera, decorators: [{
|
|
111
|
+
type: Component,
|
|
112
|
+
args: [{
|
|
113
|
+
selector: 'ngts-cube-camera',
|
|
114
|
+
standalone: true,
|
|
115
|
+
template: `
|
|
116
|
+
<ngt-group ngtCompound>
|
|
117
|
+
<ngt-cube-camera [ref]="cameraRef" *args="get('cameraArgs')" />
|
|
118
|
+
<ngt-group #group>
|
|
119
|
+
<ng-container
|
|
120
|
+
*ngIf="cameraContent && cameraContent.ngtsCameraContent && get('fbo')"
|
|
121
|
+
[ngTemplateOutlet]="cameraContent.template"
|
|
122
|
+
[ngTemplateOutletContext]="{ fbo: get('fbo').texture, group }"
|
|
123
|
+
/>
|
|
124
|
+
</ngt-group>
|
|
125
|
+
</ngt-group>
|
|
126
|
+
`,
|
|
127
|
+
imports: [NgIf, NgTemplateOutlet, NgtArgs],
|
|
128
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
129
|
+
}]
|
|
130
|
+
}], ctorParameters: function () { return []; }, propDecorators: { groupRef: [{
|
|
131
|
+
type: ViewChild,
|
|
132
|
+
args: ['group', { static: true }]
|
|
133
|
+
}], cameraContent: [{
|
|
134
|
+
type: ContentChild,
|
|
135
|
+
args: [NgtsCameraContent]
|
|
136
|
+
}], frames: [{
|
|
137
|
+
type: Input
|
|
138
|
+
}], resolution: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}], near: [{
|
|
141
|
+
type: Input
|
|
142
|
+
}], far: [{
|
|
143
|
+
type: Input
|
|
144
|
+
}], envMap: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}], fog: [{
|
|
147
|
+
type: Input
|
|
148
|
+
}] } });
|
|
149
|
+
|
|
27
150
|
class NgtsCamera extends NgtRxStore {
|
|
28
151
|
constructor() {
|
|
29
152
|
super(...arguments);
|
|
@@ -220,5 +343,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
220
343
|
* Generated bundle index. Do not edit.
|
|
221
344
|
*/
|
|
222
345
|
|
|
223
|
-
export { NgtsCameraContent, NgtsOrthographicCamera, NgtsPerspectiveCamera };
|
|
346
|
+
export { NgtsCameraContent, NgtsCubeCamera, NgtsOrthographicCamera, NgtsPerspectiveCamera };
|
|
224
347
|
//# sourceMappingURL=angular-three-soba-cameras.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-three-soba-cameras.mjs","sources":["../../../../libs/angular-three-soba/cameras/src/lib/camera/camera-content.ts","../../../../libs/angular-three-soba/cameras/src/lib/camera/camera.ts","../../../../libs/angular-three-soba/cameras/src/lib/orthographic-camera/orthographic-camera.ts","../../../../libs/angular-three-soba/cameras/src/lib/perspective-camera/perspective-camera.ts","../../../../libs/angular-three-soba/cameras/src/angular-three-soba-cameras.ts"],"sourcesContent":["import { Directive, inject, Input, TemplateRef } from '@angular/core';\nimport * as THREE from 'three';\n\n@Directive({ selector: 'ng-template[ngtsCameraContent]', standalone: true })\nexport class NgtsCameraContent {\n readonly template = inject(TemplateRef);\n @Input() ngtsCameraContent: boolean | '' = '';\n\n static ngTemplateContextGuard(\n _: NgtsCameraContent,\n ctx: unknown\n ): ctx is { target: THREE.WebGLRenderTarget; group?: THREE.Group } {\n return true;\n }\n}\n","import { Directive, inject, Input, OnInit } from '@angular/core';\nimport { injectNgtRef, NgtCamera, NgtRxStore, NgtStore } from 'angular-three';\nimport { injectNgtsFBO } from 'angular-three-soba/misc';\nimport { combineLatest, map } from 'rxjs';\n\n@Directive()\nexport abstract class NgtsCamera<TCamera extends NgtCamera> extends NgtRxStore implements OnInit {\n @Input() set makeDefault(makeDefault: boolean) {\n this.set({ makeDefault });\n }\n\n @Input() set manual(manual: boolean) {\n this.set({ manual });\n }\n\n @Input() set frames(frames: number) {\n this.set({ frames });\n }\n\n @Input() set resolution(resolution: number) {\n this.set({ resolution });\n }\n\n @Input() set envMap(envMap: THREE.Texture) {\n this.set({ envMap });\n }\n\n @Input() cameraRef = injectNgtRef<TCamera>();\n\n protected readonly store = inject(NgtStore);\n readonly fboRef = injectNgtsFBO(() => this.select('resolution').pipe(map((resolution) => ({ width: resolution }))));\n\n override initialize() {\n super.initialize();\n this.set({ resolution: 256, frames: Infinity, makeDefault: false, manual: false });\n }\n\n ngOnInit() {\n this.hold(this.cameraRef.$, (camera) => {\n camera.updateProjectionMatrix();\n this.setDefaultCamera();\n this.updateProjectionMatrix();\n });\n }\n\n private setDefaultCamera() {\n this.effect(combineLatest([this.cameraRef.$, this.select('makeDefault')]), ([camera, makeDefault]) => {\n if (makeDefault) {\n const { camera: oldCamera } = this.store.get();\n this.store.set({ camera });\n return () => {\n this.store.set({ camera: oldCamera });\n };\n }\n });\n }\n\n private updateProjectionMatrix() {\n this.effect(combineLatest([this.cameraRef.$, this.select('manual')]), ([camera, manual]) => {\n if (!manual && camera) camera.updateProjectionMatrix();\n });\n }\n}\n","import { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { Component, ContentChild, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';\nimport { extend, NgtPush } from 'angular-three';\nimport { combineLatest, map } from 'rxjs';\nimport { Group, OrthographicCamera } from 'three';\nimport { NgtsCamera } from '../camera/camera';\nimport { NgtsCameraContent } from '../camera/camera-content';\n\nextend({ OrthographicCamera, Group });\n\n@Component({\n selector: 'ngts-orthographic-camera',\n standalone: true,\n template: `\n <ngt-orthographic-camera\n ngtCompound\n [ref]=\"cameraRef\"\n [left]=\"left$ | ngtPush\"\n [right]=\"right$ | ngtPush\"\n [top]=\"top$ | ngtPush\"\n [bottom]=\"bottom$ | ngtPush\"\n >\n <ng-container\n *ngIf=\"cameraContent && !cameraContent.ngtsCameraContent\"\n [ngTemplateOutlet]=\"cameraContent.template\"\n />\n </ngt-orthographic-camera>\n <ngt-group #group *ngIf=\"cameraContent && cameraContent.ngtsCameraContent\">\n <ng-container *ngTemplateOutlet=\"cameraContent.template; context: { fbo: fboRef.nativeElement, group }\" />\n </ngt-group>\n `,\n imports: [NgIf, NgTemplateOutlet, NgtPush],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsOrthographicCamera extends NgtsCamera<THREE.OrthographicCamera> {\n @ContentChild(NgtsCameraContent) cameraContent?: NgtsCameraContent;\n\n @Input() set left(left: number) {\n this.set({ left });\n }\n\n @Input() set right(right: number) {\n this.set({ right });\n }\n\n @Input() set top(top: number) {\n this.set({ top });\n }\n\n @Input() set bottom(bottom: number) {\n this.set({ bottom });\n }\n\n override initialize(): void {\n super.initialize();\n this.set({ left: 0, right: 0, top: 0, bottom: 0 });\n }\n\n readonly left$ = combineLatest([this.select('left'), this.store.select('size')]).pipe(\n map(([left, size]) => left || size.width / -2)\n );\n\n readonly right$ = combineLatest([this.select('right'), this.store.select('size')]).pipe(\n map(([right, size]) => right || size.width / 2)\n );\n\n readonly top$ = combineLatest([this.select('top'), this.store.select('size')]).pipe(\n map(([top, size]) => top || size.height / 2)\n );\n\n readonly bottom$ = combineLatest([this.select('bottom'), this.store.select('size')]).pipe(\n map(([bottom, size]) => bottom || size.height / -2)\n );\n}\n","import { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { Component, ContentChild, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { extend } from 'angular-three';\nimport { Group, PerspectiveCamera } from 'three';\nimport { NgtsCamera } from '../camera/camera';\nimport { NgtsCameraContent } from '../camera/camera-content';\n\nextend({ PerspectiveCamera, Group });\n\n@Component({\n selector: 'ngts-perspective-camera',\n standalone: true,\n template: `\n <ngt-perspective-camera [ref]=\"cameraRef\" ngtCompound>\n <ng-container\n *ngIf=\"cameraContent && !cameraContent.ngtsCameraContent\"\n [ngTemplateOutlet]=\"cameraContent.template\"\n />\n </ngt-perspective-camera>\n <ngt-group #group *ngIf=\"cameraContent && cameraContent.ngtsCameraContent\">\n <ng-container *ngTemplateOutlet=\"cameraContent.template; context: { fbo: fboRef.nativeElement, group }\" />\n </ngt-group>\n `,\n imports: [NgIf, NgTemplateOutlet],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsPerspectiveCamera extends NgtsCamera<PerspectiveCamera> {\n @ContentChild(NgtsCameraContent) cameraContent?: NgtsCameraContent;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAIa,i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,EAAA,QAAA,EAAA,yBAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,eAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAChB,iBAAiB,EAfrB,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;KAUT,EACS,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,IAAI,6FAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;2FAGvB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAjBjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;AAUT,IAAA,CAAA;AACD,oBAAA,OAAO,EAAE,CAAC,IAAI,EAAE,gBAAgB,CAAC;oBACjC,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBACpC,CAAA;8BAEoC,aAAa,EAAA,CAAA;sBAA7C,YAAY;uBAAC,iBAAiB,CAAA;;;AC3BnC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"angular-three-soba-cameras.mjs","sources":["../../../../libs/angular-three-soba/cameras/src/lib/camera/camera-content.ts","../../../../libs/angular-three-soba/cameras/src/lib/cube-camera/cube-camera.ts","../../../../libs/angular-three-soba/cameras/src/lib/camera/camera.ts","../../../../libs/angular-three-soba/cameras/src/lib/orthographic-camera/orthographic-camera.ts","../../../../libs/angular-three-soba/cameras/src/lib/perspective-camera/perspective-camera.ts","../../../../libs/angular-three-soba/cameras/src/angular-three-soba-cameras.ts"],"sourcesContent":["import { Directive, inject, Input, TemplateRef } from '@angular/core';\nimport * as THREE from 'three';\n\n@Directive({ selector: 'ng-template[ngtsCameraContent]', standalone: true })\nexport class NgtsCameraContent {\n readonly template = inject(TemplateRef);\n @Input() ngtsCameraContent: boolean | '' = '';\n\n static ngTemplateContextGuard(\n _: NgtsCameraContent,\n ctx: unknown\n ): ctx is { fbo: THREE.WebGLRenderTarget; group?: THREE.Group } {\n return true;\n }\n}\n","import { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { Component, ContentChild, CUSTOM_ELEMENTS_SCHEMA, ElementRef, inject, Input, ViewChild } from '@angular/core';\nimport { extend, injectBeforeRender, injectNgtRef, NgtArgs, NgtRxStore, NgtStore } from 'angular-three';\nimport { combineLatest, map } from 'rxjs';\nimport * as THREE from 'three';\nimport { CubeCamera, Group } from 'three';\nimport { NgtsCameraContent } from '../camera/camera-content';\n\nextend({ Group, CubeCamera });\n\n@Component({\n selector: 'ngts-cube-camera',\n standalone: true,\n template: `\n <ngt-group ngtCompound>\n <ngt-cube-camera [ref]=\"cameraRef\" *args=\"get('cameraArgs')\" />\n <ngt-group #group>\n <ng-container\n *ngIf=\"cameraContent && cameraContent.ngtsCameraContent && get('fbo')\"\n [ngTemplateOutlet]=\"cameraContent.template\"\n [ngTemplateOutletContext]=\"{ fbo: get('fbo').texture, group }\"\n />\n </ngt-group>\n </ngt-group>\n `,\n imports: [NgIf, NgTemplateOutlet, NgtArgs],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsCubeCamera extends NgtRxStore {\n @ViewChild('group', { static: true }) groupRef!: ElementRef<THREE.Group>;\n @ContentChild(NgtsCameraContent) cameraContent?: NgtsCameraContent;\n\n readonly cameraRef = injectNgtRef<THREE.CubeCamera>();\n\n /** Number of frames to render, Infinity */\n @Input() set frames(frames: number) {\n this.set({ frames });\n }\n /** Resolution of the FBO, 256 */\n @Input() set resolution(resolution: number) {\n this.set({ resolution });\n }\n /** Camera near, 0.1 */\n @Input() set near(near: number) {\n this.set({ near });\n }\n /** Camera far, 1000 */\n @Input() set far(far: number) {\n this.set({ far });\n }\n /** Custom environment map that is temporarily set as the scenes background */\n @Input() set envMap(envMap: THREE.Texture) {\n this.set({ envMap });\n }\n /** Custom fog that is temporarily set as the scenes fog */\n @Input() set fog(fog: THREE.Fog | THREE.FogExp2) {\n this.set({ fog });\n }\n\n private readonly store = inject(NgtStore);\n\n override initialize(): void {\n super.initialize();\n this.set({\n frames: Infinity,\n resolution: 256,\n near: 0.1,\n far: 1000,\n });\n }\n\n constructor() {\n super();\n this.connect(\n 'fbo',\n this.select('resolution').pipe(\n map((resolution) => {\n const fbo = new THREE.WebGLCubeRenderTarget(resolution);\n fbo.texture.encoding = this.store.get('gl').outputEncoding;\n fbo.texture.type = THREE.HalfFloatType;\n return fbo;\n })\n )\n );\n this.connect('cameraArgs', combineLatest([this.select('near'), this.select('far'), this.select('fbo')]));\n\n let count = 0;\n let originalFog: THREE.Scene['fog'];\n let originalBackground: THREE.Scene['background'];\n injectBeforeRender(({ scene, gl }) => {\n const { frames, envMap, fog } = this.get();\n if (\n envMap &&\n this.cameraRef.nativeElement &&\n this.groupRef.nativeElement &&\n (frames === Infinity || count < frames)\n ) {\n this.groupRef.nativeElement.visible = false;\n originalFog = scene.fog;\n originalBackground = scene.background;\n scene.background = envMap || originalBackground;\n scene.fog = fog || originalFog;\n this.cameraRef.nativeElement.update(gl, scene);\n scene.fog = originalFog;\n scene.background = originalBackground;\n this.groupRef.nativeElement.visible = true;\n count++;\n }\n });\n }\n}\n","import { Directive, inject, Input, OnInit } from '@angular/core';\nimport { injectNgtRef, NgtCamera, NgtRxStore, NgtStore } from 'angular-three';\nimport { injectNgtsFBO } from 'angular-three-soba/misc';\nimport { combineLatest, map } from 'rxjs';\n\n@Directive()\nexport abstract class NgtsCamera<TCamera extends NgtCamera> extends NgtRxStore implements OnInit {\n @Input() set makeDefault(makeDefault: boolean) {\n this.set({ makeDefault });\n }\n\n @Input() set manual(manual: boolean) {\n this.set({ manual });\n }\n\n @Input() set frames(frames: number) {\n this.set({ frames });\n }\n\n @Input() set resolution(resolution: number) {\n this.set({ resolution });\n }\n\n @Input() set envMap(envMap: THREE.Texture) {\n this.set({ envMap });\n }\n\n @Input() cameraRef = injectNgtRef<TCamera>();\n\n protected readonly store = inject(NgtStore);\n readonly fboRef = injectNgtsFBO(() => this.select('resolution').pipe(map((resolution) => ({ width: resolution }))));\n\n override initialize() {\n super.initialize();\n this.set({ resolution: 256, frames: Infinity, makeDefault: false, manual: false });\n }\n\n ngOnInit() {\n this.hold(this.cameraRef.$, (camera) => {\n camera.updateProjectionMatrix();\n this.setDefaultCamera();\n this.updateProjectionMatrix();\n });\n }\n\n private setDefaultCamera() {\n this.effect(combineLatest([this.cameraRef.$, this.select('makeDefault')]), ([camera, makeDefault]) => {\n if (makeDefault) {\n const { camera: oldCamera } = this.store.get();\n this.store.set({ camera });\n return () => {\n this.store.set({ camera: oldCamera });\n };\n }\n });\n }\n\n private updateProjectionMatrix() {\n this.effect(combineLatest([this.cameraRef.$, this.select('manual')]), ([camera, manual]) => {\n if (!manual && camera) camera.updateProjectionMatrix();\n });\n }\n}\n","import { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { Component, ContentChild, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';\nimport { extend, NgtPush } from 'angular-three';\nimport { combineLatest, map } from 'rxjs';\nimport { Group, OrthographicCamera } from 'three';\nimport { NgtsCamera } from '../camera/camera';\nimport { NgtsCameraContent } from '../camera/camera-content';\n\nextend({ OrthographicCamera, Group });\n\n@Component({\n selector: 'ngts-orthographic-camera',\n standalone: true,\n template: `\n <ngt-orthographic-camera\n ngtCompound\n [ref]=\"cameraRef\"\n [left]=\"left$ | ngtPush\"\n [right]=\"right$ | ngtPush\"\n [top]=\"top$ | ngtPush\"\n [bottom]=\"bottom$ | ngtPush\"\n >\n <ng-container\n *ngIf=\"cameraContent && !cameraContent.ngtsCameraContent\"\n [ngTemplateOutlet]=\"cameraContent.template\"\n />\n </ngt-orthographic-camera>\n <ngt-group #group *ngIf=\"cameraContent && cameraContent.ngtsCameraContent\">\n <ng-container *ngTemplateOutlet=\"cameraContent.template; context: { fbo: fboRef.nativeElement, group }\" />\n </ngt-group>\n `,\n imports: [NgIf, NgTemplateOutlet, NgtPush],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsOrthographicCamera extends NgtsCamera<THREE.OrthographicCamera> {\n @ContentChild(NgtsCameraContent) cameraContent?: NgtsCameraContent;\n\n @Input() set left(left: number) {\n this.set({ left });\n }\n\n @Input() set right(right: number) {\n this.set({ right });\n }\n\n @Input() set top(top: number) {\n this.set({ top });\n }\n\n @Input() set bottom(bottom: number) {\n this.set({ bottom });\n }\n\n override initialize(): void {\n super.initialize();\n this.set({ left: 0, right: 0, top: 0, bottom: 0 });\n }\n\n readonly left$ = combineLatest([this.select('left'), this.store.select('size')]).pipe(\n map(([left, size]) => left || size.width / -2)\n );\n\n readonly right$ = combineLatest([this.select('right'), this.store.select('size')]).pipe(\n map(([right, size]) => right || size.width / 2)\n );\n\n readonly top$ = combineLatest([this.select('top'), this.store.select('size')]).pipe(\n map(([top, size]) => top || size.height / 2)\n );\n\n readonly bottom$ = combineLatest([this.select('bottom'), this.store.select('size')]).pipe(\n map(([bottom, size]) => bottom || size.height / -2)\n );\n}\n","import { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { Component, ContentChild, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { extend } from 'angular-three';\nimport { Group, PerspectiveCamera } from 'three';\nimport { NgtsCamera } from '../camera/camera';\nimport { NgtsCameraContent } from '../camera/camera-content';\n\nextend({ PerspectiveCamera, Group });\n\n@Component({\n selector: 'ngts-perspective-camera',\n standalone: true,\n template: `\n <ngt-perspective-camera [ref]=\"cameraRef\" ngtCompound>\n <ng-container\n *ngIf=\"cameraContent && !cameraContent.ngtsCameraContent\"\n [ngTemplateOutlet]=\"cameraContent.template\"\n />\n </ngt-perspective-camera>\n <ngt-group #group *ngIf=\"cameraContent && cameraContent.ngtsCameraContent\">\n <ng-container *ngTemplateOutlet=\"cameraContent.template; context: { fbo: fboRef.nativeElement, group }\" />\n </ngt-group>\n `,\n imports: [NgIf, NgTemplateOutlet],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsPerspectiveCamera extends NgtsCamera<PerspectiveCamera> {\n @ContentChild(NgtsCameraContent) cameraContent?: NgtsCameraContent;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAIa,iBAAiB,CAAA;AAD9B,IAAA,WAAA,GAAA;AAEa,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAC/B,QAAA,IAAiB,CAAA,iBAAA,GAAiB,EAAE,CAAC;KAQjD;AANG,IAAA,OAAO,sBAAsB,CACzB,CAAoB,EACpB,GAAY,EAAA;AAEZ,QAAA,OAAO,IAAI,CAAC;KACf;;8GATQ,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gCAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,SAAS;YAAC,IAAA,EAAA,CAAA,EAAE,QAAQ,EAAE,gCAAgC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;8BAG9D,iBAAiB,EAAA,CAAA;sBAAzB,KAAK;;;ACEV,MAAM,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AAoBxB,MAAO,cAAe,SAAQ,UAAU,CAAA;;IAO1C,IAAa,MAAM,CAAC,MAAc,EAAA;AAC9B,Q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ular/core';
|
|
2
2
|
import { inject, Component, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';
|
|
3
3
|
import { NgtRxStore, injectNgtRef, injectBeforeRender, NgtArgs, extend, NgtStore, startWithUndefined, getLocalState, NgtPush } from 'angular-three';
|
|
4
|
-
import { NGTS_DISTORT_MATERIAL_SHADER, MeshReflectorMaterial, BlurPass, MeshWobbleMaterial } from 'angular-three-soba/shaders';
|
|
4
|
+
import { NGTS_DISTORT_MATERIAL_SHADER, MeshReflectorMaterial, BlurPass, MeshRefractionMaterial, MeshTransmissionMaterial, DiscardMaterial, MeshWobbleMaterial } from 'angular-three-soba/shaders';
|
|
5
5
|
import { NgIf } from '@angular/common';
|
|
6
6
|
import { debounceTime, map, combineLatest } from 'rxjs';
|
|
7
7
|
import * as THREE from 'three';
|
|
8
|
+
import { MeshBVH, SAH } from 'three-mesh-bvh';
|
|
9
|
+
import { injectNgtsFBO } from 'angular-three-soba/misc';
|
|
8
10
|
|
|
9
11
|
class NgtsMeshDistortMaterial extends NgtRxStore {
|
|
10
12
|
set time(time) {
|
|
@@ -396,6 +398,391 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
396
398
|
type: Input
|
|
397
399
|
}] } });
|
|
398
400
|
|
|
401
|
+
extend({ MeshRefractionMaterial });
|
|
402
|
+
const isCubeTexture = (def) => def && def.isCubeTexture;
|
|
403
|
+
class NgtsMeshRefractionMaterial extends NgtRxStore {
|
|
404
|
+
/** Environment map */
|
|
405
|
+
set envMap(envMap) {
|
|
406
|
+
this.set({ envMap });
|
|
407
|
+
}
|
|
408
|
+
/** Number of ray-cast bounces, it can be expensive to have too many, 2 */
|
|
409
|
+
set bounces(bounces) {
|
|
410
|
+
this.set({ bounces });
|
|
411
|
+
}
|
|
412
|
+
/** Refraction index, 2.4 */
|
|
413
|
+
set ior(ior) {
|
|
414
|
+
this.set({ ior });
|
|
415
|
+
}
|
|
416
|
+
/** Fresnel (strip light), 0 */
|
|
417
|
+
set fresnel(fresnel) {
|
|
418
|
+
this.set({ fresnel });
|
|
419
|
+
}
|
|
420
|
+
/** RGB shift intensity, can be expensive, 0 */
|
|
421
|
+
set aberrationStrength(aberrationStrength) {
|
|
422
|
+
this.set({ aberrationStrength });
|
|
423
|
+
}
|
|
424
|
+
/** Color, white */
|
|
425
|
+
set color(color) {
|
|
426
|
+
this.set({ color });
|
|
427
|
+
}
|
|
428
|
+
/** If this is on it uses fewer ray casts for the RGB shift sacrificing physical accuracy, true */
|
|
429
|
+
set fastChroma(fastChroma) {
|
|
430
|
+
this.set({ fastChroma });
|
|
431
|
+
}
|
|
432
|
+
initialize() {
|
|
433
|
+
super.initialize();
|
|
434
|
+
this.set({
|
|
435
|
+
aberrationStrength: 0,
|
|
436
|
+
fastChroma: true,
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
constructor() {
|
|
440
|
+
super();
|
|
441
|
+
this.materialRef = injectNgtRef();
|
|
442
|
+
this.defines$ = this.select('defines');
|
|
443
|
+
this.store = inject(NgtStore);
|
|
444
|
+
this.connect('defines', combineLatest([this.select('aberrationStrength'), this.select('fastChroma'), this.select('envMap')]).pipe(map(([aberrationStrength, fastChroma, envMap]) => {
|
|
445
|
+
var _a, _b;
|
|
446
|
+
const temp = {};
|
|
447
|
+
// Sampler2D and SamplerCube need different defines
|
|
448
|
+
const isCubeMap = isCubeTexture(envMap);
|
|
449
|
+
const w = (_b = (isCubeMap ? (_a = envMap.image[0]) === null || _a === void 0 ? void 0 : _a.width : envMap.image.width)) !== null && _b !== void 0 ? _b : 1024;
|
|
450
|
+
const cubeSize = w / 4;
|
|
451
|
+
const _lodMax = Math.floor(Math.log2(cubeSize));
|
|
452
|
+
const _cubeSize = Math.pow(2, _lodMax);
|
|
453
|
+
const width = 3 * Math.max(_cubeSize, 16 * 7);
|
|
454
|
+
const height = 4 * _cubeSize;
|
|
455
|
+
if (isCubeMap)
|
|
456
|
+
temp['ENVMAP_TYPE_CUBEM'] = '';
|
|
457
|
+
temp['CUBEUV_TEXEL_WIDTH'] = `${1.0 / width}`;
|
|
458
|
+
temp['CUBEUV_TEXEL_HEIGHT'] = `${1.0 / height}`;
|
|
459
|
+
temp['CUBEUV_MAX_MIP'] = `${_lodMax}.0`;
|
|
460
|
+
// Add defines from chromatic aberration
|
|
461
|
+
if (aberrationStrength > 0)
|
|
462
|
+
temp['CHROMATIC_ABERRATIONS'] = '';
|
|
463
|
+
if (fastChroma)
|
|
464
|
+
temp['FAST_CHROMA'] = '';
|
|
465
|
+
return temp;
|
|
466
|
+
})));
|
|
467
|
+
this.connect('resolution', this.store.select('size').pipe(map((size) => [size.width, size.height])));
|
|
468
|
+
injectBeforeRender(({ camera }) => {
|
|
469
|
+
if (this.materialRef.nativeElement) {
|
|
470
|
+
this.materialRef.nativeElement.viewMatrixInverse = camera.matrixWorld;
|
|
471
|
+
this.materialRef.nativeElement.projectionMatrixInverse = camera.projectionMatrixInverse;
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
ngOnInit() {
|
|
476
|
+
this.setupGeometry();
|
|
477
|
+
}
|
|
478
|
+
setupGeometry() {
|
|
479
|
+
this.hold(this.materialRef.$, (material) => {
|
|
480
|
+
var _a;
|
|
481
|
+
const geometry = (_a = getLocalState(material).parent) === null || _a === void 0 ? void 0 : _a.geometry;
|
|
482
|
+
if (geometry) {
|
|
483
|
+
material.bvh.updateFrom(new MeshBVH(geometry.toNonIndexed(), { lazyGeneration: false, strategy: SAH }));
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
NgtsMeshRefractionMaterial.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: NgtsMeshRefractionMaterial, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
489
|
+
NgtsMeshRefractionMaterial.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: NgtsMeshRefractionMaterial, isStandalone: true, selector: "ngts-mesh-refraction-material", inputs: { materialRef: "materialRef", envMap: "envMap", bounces: "bounces", ior: "ior", fresnel: "fresnel", aberrationStrength: "aberrationStrength", color: "color", fastChroma: "fastChroma" }, usesInheritance: true, ngImport: i0, template: `
|
|
490
|
+
<ngt-mesh-refraction-material
|
|
491
|
+
*ngIf="defines$ | ngtPush as defines"
|
|
492
|
+
[ref]="materialRef"
|
|
493
|
+
[defines]="defines"
|
|
494
|
+
[resolution]="get('resolution')"
|
|
495
|
+
[aberrationStrength]="get('aberrationStrength')"
|
|
496
|
+
[envMap]="get('envMap')"
|
|
497
|
+
[bounces]="get('bounces')"
|
|
498
|
+
[ior]="get('ior')"
|
|
499
|
+
[fresnel]="get('fresnel')"
|
|
500
|
+
[color]="get('color')"
|
|
501
|
+
[fastChroma]="get('fastChroma')"
|
|
502
|
+
ngtCompound
|
|
503
|
+
attach="material"
|
|
504
|
+
>
|
|
505
|
+
<ng-content />
|
|
506
|
+
</ngt-mesh-refraction-material>
|
|
507
|
+
`, isInline: true, dependencies: [{ kind: "pipe", type: NgtPush, name: "ngtPush" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: NgtsMeshRefractionMaterial, decorators: [{
|
|
509
|
+
type: Component,
|
|
510
|
+
args: [{
|
|
511
|
+
selector: 'ngts-mesh-refraction-material',
|
|
512
|
+
standalone: true,
|
|
513
|
+
template: `
|
|
514
|
+
<ngt-mesh-refraction-material
|
|
515
|
+
*ngIf="defines$ | ngtPush as defines"
|
|
516
|
+
[ref]="materialRef"
|
|
517
|
+
[defines]="defines"
|
|
518
|
+
[resolution]="get('resolution')"
|
|
519
|
+
[aberrationStrength]="get('aberrationStrength')"
|
|
520
|
+
[envMap]="get('envMap')"
|
|
521
|
+
[bounces]="get('bounces')"
|
|
522
|
+
[ior]="get('ior')"
|
|
523
|
+
[fresnel]="get('fresnel')"
|
|
524
|
+
[color]="get('color')"
|
|
525
|
+
[fastChroma]="get('fastChroma')"
|
|
526
|
+
ngtCompound
|
|
527
|
+
attach="material"
|
|
528
|
+
>
|
|
529
|
+
<ng-content />
|
|
530
|
+
</ngt-mesh-refraction-material>
|
|
531
|
+
`,
|
|
532
|
+
imports: [NgtPush, NgIf],
|
|
533
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
534
|
+
}]
|
|
535
|
+
}], ctorParameters: function () { return []; }, propDecorators: { materialRef: [{
|
|
536
|
+
type: Input
|
|
537
|
+
}], envMap: [{
|
|
538
|
+
type: Input
|
|
539
|
+
}], bounces: [{
|
|
540
|
+
type: Input
|
|
541
|
+
}], ior: [{
|
|
542
|
+
type: Input
|
|
543
|
+
}], fresnel: [{
|
|
544
|
+
type: Input
|
|
545
|
+
}], aberrationStrength: [{
|
|
546
|
+
type: Input
|
|
547
|
+
}], color: [{
|
|
548
|
+
type: Input
|
|
549
|
+
}], fastChroma: [{
|
|
550
|
+
type: Input
|
|
551
|
+
}] } });
|
|
552
|
+
|
|
553
|
+
extend({ MeshTransmissionMaterial });
|
|
554
|
+
class NgtsMeshTranmissionMaterial extends NgtRxStore {
|
|
555
|
+
/** transmissionSampler, you can use the threejs transmission sampler texture that is
|
|
556
|
+
* generated once for all transmissive materials. The upside is that it can be faster if you
|
|
557
|
+
* use multiple MeshPhysical and Transmission materials, the downside is that transmissive materials
|
|
558
|
+
* using this can't see other transparent or transmissive objects, default: false */
|
|
559
|
+
set transmissionSampler(transmissionSampler) {
|
|
560
|
+
this.set({ transmissionSampler });
|
|
561
|
+
}
|
|
562
|
+
/** Render the backside of the material (more cost, better results), default: false */
|
|
563
|
+
set backside(backside) {
|
|
564
|
+
this.set({ backside });
|
|
565
|
+
}
|
|
566
|
+
/** Backside thickness (when backside is true), default: 0 */
|
|
567
|
+
set backsideThickness(backsideThickness) {
|
|
568
|
+
this.set({ backsideThickness });
|
|
569
|
+
}
|
|
570
|
+
/** Resolution of the local buffer, default: undefined (fullscreen) */
|
|
571
|
+
set resolution(resolution) {
|
|
572
|
+
this.set({ resolution });
|
|
573
|
+
}
|
|
574
|
+
/** Resolution of the local buffer for backfaces, default: undefined (fullscreen) */
|
|
575
|
+
set backsideResolution(backsideResolution) {
|
|
576
|
+
this.set({ backsideResolution });
|
|
577
|
+
}
|
|
578
|
+
/** Refraction samples, default: 10 */
|
|
579
|
+
set samples(samples) {
|
|
580
|
+
this.set({ samples });
|
|
581
|
+
}
|
|
582
|
+
/** Buffer scene background (can be a texture, a cubetexture or a color), default: null */
|
|
583
|
+
set background(background) {
|
|
584
|
+
this.set({ background });
|
|
585
|
+
}
|
|
586
|
+
/* Transmission, default: 1 */
|
|
587
|
+
set transmission(transmission) {
|
|
588
|
+
this.set({ transmission });
|
|
589
|
+
}
|
|
590
|
+
/* Thickness (refraction), default: 0 */
|
|
591
|
+
set thickness(thickness) {
|
|
592
|
+
this.set({ thickness });
|
|
593
|
+
}
|
|
594
|
+
/* Roughness (blur), default: 0 */
|
|
595
|
+
set roughness(roughness) {
|
|
596
|
+
this.set({ roughness });
|
|
597
|
+
}
|
|
598
|
+
/* Chromatic aberration, default: 0.03 */
|
|
599
|
+
set chromaticAberration(chromaticAberration) {
|
|
600
|
+
this.set({ chromaticAberration });
|
|
601
|
+
}
|
|
602
|
+
/* Anisotropy, default: 0.1 */
|
|
603
|
+
set anisotropy(anisotropy) {
|
|
604
|
+
this.set({ anisotropy });
|
|
605
|
+
}
|
|
606
|
+
/* Distortion, default: 0 */
|
|
607
|
+
set distortion(distortion) {
|
|
608
|
+
this.set({ distortion });
|
|
609
|
+
}
|
|
610
|
+
/* Distortion scale, default: 0.5 */
|
|
611
|
+
set distortionScale(distortionScale) {
|
|
612
|
+
this.set({ distortionScale });
|
|
613
|
+
}
|
|
614
|
+
/* Temporal distortion (speed of movement), default: 0.0 */
|
|
615
|
+
set temporalDistortion(temporalDistortion) {
|
|
616
|
+
this.set({ temporalDistortion });
|
|
617
|
+
}
|
|
618
|
+
/** The scene rendered into a texture (use it to share a texture between materials), default: null */
|
|
619
|
+
set buffer(buffer) {
|
|
620
|
+
this.set({ buffer });
|
|
621
|
+
}
|
|
622
|
+
/** Internals */
|
|
623
|
+
set time(time) {
|
|
624
|
+
this.set({ time });
|
|
625
|
+
}
|
|
626
|
+
initialize() {
|
|
627
|
+
super.initialize();
|
|
628
|
+
this.set({
|
|
629
|
+
transmissionSampler: false,
|
|
630
|
+
backside: false,
|
|
631
|
+
side: THREE.FrontSide,
|
|
632
|
+
transmission: 1,
|
|
633
|
+
thickness: 0,
|
|
634
|
+
backsideThickness: 0,
|
|
635
|
+
samples: 10,
|
|
636
|
+
roughness: 0,
|
|
637
|
+
anisotropy: 0.1,
|
|
638
|
+
chromaticAberration: 0.03,
|
|
639
|
+
distortion: 0,
|
|
640
|
+
distortionScale: 0.5,
|
|
641
|
+
temporalDistortion: 0.0,
|
|
642
|
+
buffer: null,
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
constructor() {
|
|
646
|
+
super();
|
|
647
|
+
this.materialRef = injectNgtRef();
|
|
648
|
+
this.discardMaterial = new DiscardMaterial();
|
|
649
|
+
this.fboBackRef = injectNgtsFBO(() => combineLatest([this.select('backsideResolution'), this.select('resolution')]).pipe(map(([backsideResolution, resolution]) => backsideResolution || resolution)));
|
|
650
|
+
this.fboMainRef = injectNgtsFBO(() => this.select('resolution'));
|
|
651
|
+
let oldBg;
|
|
652
|
+
let oldTone;
|
|
653
|
+
let parent;
|
|
654
|
+
injectBeforeRender((state) => {
|
|
655
|
+
const { transmissionSampler, background, backside, backsideThickness, thickness, side } = this.get();
|
|
656
|
+
this.materialRef.nativeElement.time = state.clock.getElapsedTime();
|
|
657
|
+
// Render only if the buffer matches the built-in and no transmission sampler is set
|
|
658
|
+
if (this.materialRef.nativeElement.buffer === this.fboMainRef.nativeElement.texture &&
|
|
659
|
+
!transmissionSampler) {
|
|
660
|
+
parent = getLocalState(this.materialRef.nativeElement).parent;
|
|
661
|
+
if (parent) {
|
|
662
|
+
// Save defaults
|
|
663
|
+
oldTone = state.gl.toneMapping;
|
|
664
|
+
oldBg = state.scene.background;
|
|
665
|
+
// Switch off tonemapping lest it double tone maps
|
|
666
|
+
// Save the current background and set the HDR as the new BG
|
|
667
|
+
// Use discardmaterial, the parent will be invisible, but it's shadows will still be cast
|
|
668
|
+
state.gl.toneMapping = THREE.NoToneMapping;
|
|
669
|
+
if (background)
|
|
670
|
+
state.scene.background = background;
|
|
671
|
+
parent['material'] = this.discardMaterial;
|
|
672
|
+
if (backside) {
|
|
673
|
+
// Render into the backside buffer
|
|
674
|
+
state.gl.setRenderTarget(this.fboBackRef.nativeElement);
|
|
675
|
+
state.gl.render(state.scene, state.camera);
|
|
676
|
+
// And now prepare the material for the main render using the backside buffer
|
|
677
|
+
parent['material'] = this.materialRef.nativeElement;
|
|
678
|
+
parent['material'].buffer = this.fboBackRef.nativeElement.texture;
|
|
679
|
+
parent['material'].thickness = backsideThickness;
|
|
680
|
+
parent['material'].side = THREE.BackSide;
|
|
681
|
+
}
|
|
682
|
+
// Render into the main buffer
|
|
683
|
+
state.gl.setRenderTarget(this.fboMainRef.nativeElement);
|
|
684
|
+
state.gl.render(state.scene, state.camera);
|
|
685
|
+
parent['material'].thickness = thickness;
|
|
686
|
+
parent['material'].side = side;
|
|
687
|
+
parent['material'].buffer = this.fboMainRef.nativeElement.texture;
|
|
688
|
+
// Set old state back
|
|
689
|
+
state.scene.background = oldBg;
|
|
690
|
+
state.gl.setRenderTarget(null);
|
|
691
|
+
parent['material'] = this.materialRef.nativeElement;
|
|
692
|
+
state.gl.toneMapping = oldTone;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
ngOnInit() {
|
|
698
|
+
console.log(this.materialRef);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
NgtsMeshTranmissionMaterial.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: NgtsMeshTranmissionMaterial, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
702
|
+
NgtsMeshTranmissionMaterial.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: NgtsMeshTranmissionMaterial, isStandalone: true, selector: "ngts-mesh-transmission-material", inputs: { materialRef: "materialRef", transmissionSampler: "transmissionSampler", backside: "backside", backsideThickness: "backsideThickness", resolution: "resolution", backsideResolution: "backsideResolution", samples: "samples", background: "background", transmission: "transmission", thickness: "thickness", roughness: "roughness", chromaticAberration: "chromaticAberration", anisotropy: "anisotropy", distortion: "distortion", distortionScale: "distortionScale", temporalDistortion: "temporalDistortion", buffer: "buffer", time: "time" }, usesInheritance: true, ngImport: i0, template: `
|
|
703
|
+
<ngt-mesh-transmission-material
|
|
704
|
+
*args="[get('samples'), get('transmissionSampler')]"
|
|
705
|
+
ngtCompound
|
|
706
|
+
[ref]="materialRef"
|
|
707
|
+
[buffer]="get('buffer') || fboMainRef.nativeElement?.texture"
|
|
708
|
+
[_transmission]="get('transmission')"
|
|
709
|
+
[transmission]="get('transmissionSampler') ? get('transmission') : 0"
|
|
710
|
+
[thickness]="get('thickness')"
|
|
711
|
+
[side]="get('side')"
|
|
712
|
+
[anisotropy]="get('anisotropy')"
|
|
713
|
+
[roughness]="get('roughness')"
|
|
714
|
+
[chromaticAberration]="get('chromaticAberration')"
|
|
715
|
+
[distortion]="get('distortion')"
|
|
716
|
+
[distortionScale]="get('distortionScale')"
|
|
717
|
+
[temporalDistortion]="get('temporalDistortion')"
|
|
718
|
+
[time]="get('time')"
|
|
719
|
+
/>
|
|
720
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
|
|
721
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: NgtsMeshTranmissionMaterial, decorators: [{
|
|
722
|
+
type: Component,
|
|
723
|
+
args: [{
|
|
724
|
+
selector: 'ngts-mesh-transmission-material',
|
|
725
|
+
standalone: true,
|
|
726
|
+
template: `
|
|
727
|
+
<ngt-mesh-transmission-material
|
|
728
|
+
*args="[get('samples'), get('transmissionSampler')]"
|
|
729
|
+
ngtCompound
|
|
730
|
+
[ref]="materialRef"
|
|
731
|
+
[buffer]="get('buffer') || fboMainRef.nativeElement?.texture"
|
|
732
|
+
[_transmission]="get('transmission')"
|
|
733
|
+
[transmission]="get('transmissionSampler') ? get('transmission') : 0"
|
|
734
|
+
[thickness]="get('thickness')"
|
|
735
|
+
[side]="get('side')"
|
|
736
|
+
[anisotropy]="get('anisotropy')"
|
|
737
|
+
[roughness]="get('roughness')"
|
|
738
|
+
[chromaticAberration]="get('chromaticAberration')"
|
|
739
|
+
[distortion]="get('distortion')"
|
|
740
|
+
[distortionScale]="get('distortionScale')"
|
|
741
|
+
[temporalDistortion]="get('temporalDistortion')"
|
|
742
|
+
[time]="get('time')"
|
|
743
|
+
/>
|
|
744
|
+
`,
|
|
745
|
+
imports: [NgtArgs],
|
|
746
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
747
|
+
}]
|
|
748
|
+
}], ctorParameters: function () { return []; }, propDecorators: { materialRef: [{
|
|
749
|
+
type: Input
|
|
750
|
+
}], transmissionSampler: [{
|
|
751
|
+
type: Input
|
|
752
|
+
}], backside: [{
|
|
753
|
+
type: Input
|
|
754
|
+
}], backsideThickness: [{
|
|
755
|
+
type: Input
|
|
756
|
+
}], resolution: [{
|
|
757
|
+
type: Input
|
|
758
|
+
}], backsideResolution: [{
|
|
759
|
+
type: Input
|
|
760
|
+
}], samples: [{
|
|
761
|
+
type: Input
|
|
762
|
+
}], background: [{
|
|
763
|
+
type: Input
|
|
764
|
+
}], transmission: [{
|
|
765
|
+
type: Input
|
|
766
|
+
}], thickness: [{
|
|
767
|
+
type: Input
|
|
768
|
+
}], roughness: [{
|
|
769
|
+
type: Input
|
|
770
|
+
}], chromaticAberration: [{
|
|
771
|
+
type: Input
|
|
772
|
+
}], anisotropy: [{
|
|
773
|
+
type: Input
|
|
774
|
+
}], distortion: [{
|
|
775
|
+
type: Input
|
|
776
|
+
}], distortionScale: [{
|
|
777
|
+
type: Input
|
|
778
|
+
}], temporalDistortion: [{
|
|
779
|
+
type: Input
|
|
780
|
+
}], buffer: [{
|
|
781
|
+
type: Input
|
|
782
|
+
}], time: [{
|
|
783
|
+
type: Input
|
|
784
|
+
}] } });
|
|
785
|
+
|
|
399
786
|
extend({ MeshWobbleMaterial });
|
|
400
787
|
class NgtsMeshWobbleMaterial extends NgtRxStore {
|
|
401
788
|
set time(time) {
|
|
@@ -463,5 +850,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
463
850
|
* Generated bundle index. Do not edit.
|
|
464
851
|
*/
|
|
465
852
|
|
|
466
|
-
export { NgtsMeshDistortMaterial, NgtsMeshReflectorMaterial, NgtsMeshWobbleMaterial };
|
|
853
|
+
export { NgtsMeshDistortMaterial, NgtsMeshReflectorMaterial, NgtsMeshRefractionMaterial, NgtsMeshTranmissionMaterial, NgtsMeshWobbleMaterial };
|
|
467
854
|
//# sourceMappingURL=angular-three-soba-materials.mjs.map
|