angular-three-postprocessing 1.5.2 → 2.0.0-beta.2

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 (102) hide show
  1. package/README.md +4 -12
  2. package/effect-composer.d.ts +53 -0
  3. package/effect.d.ts +24 -0
  4. package/effects/bloom/bloom.d.ts +8 -0
  5. package/effects/{lib/brightness-contrast → brightness-contrast}/brightness-contrast.d.ts +1 -2
  6. package/effects/{lib/color-depth → color-depth}/color-depth.d.ts +1 -2
  7. package/effects/{lib/depth → depth}/depth.d.ts +1 -2
  8. package/effects/{lib/dot-screen → dot-screen}/dot-screen.d.ts +1 -2
  9. package/effects/{lib/hue-saturation → hue-saturation}/hue-saturation.d.ts +1 -2
  10. package/effects/index.d.ts +16 -14
  11. package/effects/lut/lut.d.ts +19 -0
  12. package/effects/{lib/noise → noise}/noise.d.ts +2 -3
  13. package/effects/{lib/scanline → scanline}/scanline.d.ts +2 -3
  14. package/effects/{lib/sepia → sepia}/sepia.d.ts +1 -2
  15. package/effects/shock-wave/shock-wave.d.ts +7 -0
  16. package/effects/smaa/smaa.d.ts +7 -0
  17. package/effects/ssao/ssao.d.ts +38 -0
  18. package/effects/tilt-shift/tilt-shift.d.ts +8 -0
  19. package/effects/tone-mapping/tone-mapping.d.ts +7 -0
  20. package/effects/{lib/vignette → vignette}/vignette.d.ts +1 -2
  21. package/esm2022/angular-three-postprocessing.mjs +5 -0
  22. package/esm2022/effect-composer.mjs +242 -0
  23. package/esm2022/effect.mjs +79 -0
  24. package/esm2022/effects/angular-three-postprocessing-effects.mjs +5 -0
  25. package/esm2022/effects/bloom/bloom.mjs +34 -0
  26. package/esm2022/effects/brightness-contrast/brightness-contrast.mjs +30 -0
  27. package/esm2022/effects/color-depth/color-depth.mjs +30 -0
  28. package/esm2022/effects/depth/depth.mjs +30 -0
  29. package/esm2022/effects/dot-screen/dot-screen.mjs +30 -0
  30. package/esm2022/effects/hue-saturation/hue-saturation.mjs +30 -0
  31. package/esm2022/effects/index.mjs +17 -0
  32. package/esm2022/effects/lut/lut.mjs +77 -0
  33. package/esm2022/effects/noise/noise.mjs +34 -0
  34. package/esm2022/effects/scanline/scanline.mjs +34 -0
  35. package/esm2022/effects/sepia/sepia.mjs +30 -0
  36. package/esm2022/effects/shock-wave/shock-wave.mjs +30 -0
  37. package/esm2022/effects/smaa/smaa.mjs +30 -0
  38. package/esm2022/effects/ssao/ssao.mjs +189 -0
  39. package/esm2022/effects/tilt-shift/tilt-shift.mjs +34 -0
  40. package/esm2022/effects/tone-mapping/tone-mapping.mjs +30 -0
  41. package/esm2022/effects/vignette/vignette.mjs +30 -0
  42. package/esm2022/index.mjs +3 -0
  43. package/fesm2022/angular-three-postprocessing-effects.mjs +619 -0
  44. package/fesm2022/angular-three-postprocessing-effects.mjs.map +1 -0
  45. package/fesm2022/angular-three-postprocessing.mjs +322 -0
  46. package/fesm2022/angular-three-postprocessing.mjs.map +1 -0
  47. package/index.d.ts +2 -2
  48. package/package.json +16 -33
  49. package/plugin/package.json +1 -1
  50. package/plugin/src/generators/init/compat.js +1 -1
  51. package/plugin/src/generators/init/compat.js.map +1 -1
  52. package/plugin/src/generators/init/init.d.ts +2 -2
  53. package/plugin/src/generators/init/init.js +15 -19
  54. package/plugin/src/generators/init/init.js.map +1 -1
  55. package/plugin/src/index.js.map +1 -1
  56. package/effects/lib/bloom/bloom.d.ts +0 -9
  57. package/effects/lib/lut/lut.d.ts +0 -13
  58. package/effects/lib/ssao/ssao.d.ts +0 -13
  59. package/effects/lib/tilt-shift/tilt-shift.d.ts +0 -9
  60. package/effects/lib/tone-mapping/tone-mapping.d.ts +0 -8
  61. package/esm2020/angular-three-postprocessing.mjs +0 -5
  62. package/esm2020/effects/angular-three-postprocessing-effects.mjs +0 -5
  63. package/esm2020/effects/index.mjs +0 -15
  64. package/esm2020/effects/lib/bloom/bloom.mjs +0 -43
  65. package/esm2020/effects/lib/brightness-contrast/brightness-contrast.mjs +0 -28
  66. package/esm2020/effects/lib/color-depth/color-depth.mjs +0 -28
  67. package/esm2020/effects/lib/depth/depth.mjs +0 -28
  68. package/esm2020/effects/lib/dot-screen/dot-screen.mjs +0 -28
  69. package/esm2020/effects/lib/hue-saturation/hue-saturation.mjs +0 -28
  70. package/esm2020/effects/lib/lut/lut.mjs +0 -59
  71. package/esm2020/effects/lib/noise/noise.mjs +0 -32
  72. package/esm2020/effects/lib/scanline/scanline.mjs +0 -32
  73. package/esm2020/effects/lib/sepia/sepia.mjs +0 -28
  74. package/esm2020/effects/lib/ssao/ssao.mjs +0 -101
  75. package/esm2020/effects/lib/tilt-shift/tilt-shift.mjs +0 -42
  76. package/esm2020/effects/lib/tone-mapping/tone-mapping.mjs +0 -38
  77. package/esm2020/effects/lib/vignette/vignette.mjs +0 -28
  78. package/esm2020/index.mjs +0 -3
  79. package/esm2020/lib/effect-composer.mjs +0 -240
  80. package/esm2020/lib/effect.mjs +0 -79
  81. package/esm2020/selection/angular-three-postprocessing-selection.mjs +0 -5
  82. package/esm2020/selection/index.mjs +0 -3
  83. package/esm2020/selection/lib/select.mjs +0 -68
  84. package/esm2020/selection/lib/selection.mjs +0 -43
  85. package/fesm2015/angular-three-postprocessing-effects.mjs +0 -481
  86. package/fesm2015/angular-three-postprocessing-effects.mjs.map +0 -1
  87. package/fesm2015/angular-three-postprocessing-selection.mjs +0 -114
  88. package/fesm2015/angular-three-postprocessing-selection.mjs.map +0 -1
  89. package/fesm2015/angular-three-postprocessing.mjs +0 -317
  90. package/fesm2015/angular-three-postprocessing.mjs.map +0 -1
  91. package/fesm2020/angular-three-postprocessing-effects.mjs +0 -484
  92. package/fesm2020/angular-three-postprocessing-effects.mjs.map +0 -1
  93. package/fesm2020/angular-three-postprocessing-selection.mjs +0 -114
  94. package/fesm2020/angular-three-postprocessing-selection.mjs.map +0 -1
  95. package/fesm2020/angular-three-postprocessing.mjs +0 -321
  96. package/fesm2020/angular-three-postprocessing.mjs.map +0 -1
  97. package/lib/effect-composer.d.ts +0 -39
  98. package/lib/effect.d.ts +0 -22
  99. package/selection/README.md +0 -3
  100. package/selection/index.d.ts +0 -2
  101. package/selection/lib/select.d.ts +0 -14
  102. package/selection/lib/selection.d.ts +0 -18
@@ -1,114 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, Component, Input, inject, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
- import { NgtRxStore, extend, injectNgtRef } from 'angular-three';
4
- import { combineLatest } from 'rxjs';
5
- import { Group } from 'three';
6
-
7
- const NGTP_SELECTION_API = new InjectionToken('NgtpSelection API');
8
- function ngtpSelectionApiFactory(selection) {
9
- const api = {
10
- get selected() {
11
- return selection.get('selected');
12
- },
13
- select: selection.set.bind(selection),
14
- get enabled() {
15
- return selection.get('enabled');
16
- },
17
- };
18
- return api;
19
- }
20
- class NgtpSelection extends NgtRxStore {
21
- set enabled(enabled) {
22
- this.set({ enabled });
23
- }
24
- initialize() {
25
- super.initialize();
26
- this.set({ selected: [], enabled: true });
27
- }
28
- }
29
- NgtpSelection.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpSelection, deps: null, target: i0.ɵɵFactoryTarget.Component });
30
- NgtpSelection.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpSelection, isStandalone: true, selector: "ngtp-selection", inputs: { enabled: "enabled" }, providers: [{ provide: NGTP_SELECTION_API, useFactory: ngtpSelectionApiFactory, deps: [NgtpSelection] }], usesInheritance: true, ngImport: i0, template: `
31
- <ng-content />
32
- `, isInline: true });
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpSelection, decorators: [{
34
- type: Component,
35
- args: [{
36
- selector: 'ngtp-selection',
37
- standalone: true,
38
- template: `
39
- <ng-content />
40
- `,
41
- providers: [{ provide: NGTP_SELECTION_API, useFactory: ngtpSelectionApiFactory, deps: [NgtpSelection] }],
42
- }]
43
- }], propDecorators: { enabled: [{
44
- type: Input
45
- }] } });
46
-
47
- extend({ Group });
48
- class NgtpSelect extends NgtRxStore {
49
- constructor() {
50
- super(...arguments);
51
- this.groupRef = injectNgtRef();
52
- this.selectionApi = inject(NGTP_SELECTION_API);
53
- }
54
- set enabled(enabled) {
55
- this.set({ enabled });
56
- }
57
- initialize() {
58
- super.initialize();
59
- this.set({ enabled: false });
60
- }
61
- ngOnInit() {
62
- this.setSelectEffect();
63
- }
64
- setSelectEffect() {
65
- this.effect(combineLatest([this.select('enabled'), this.groupRef.children$()]), ([enabled]) => {
66
- if (enabled) {
67
- let changed = false;
68
- const current = [];
69
- this.groupRef.nativeElement.traverse((obj) => {
70
- if (obj.type === 'Mesh')
71
- current.push(obj);
72
- if (this.selectionApi.selected.indexOf(obj) === -1)
73
- changed = true;
74
- });
75
- if (changed) {
76
- this.selectionApi.select((state) => ({ selected: [...state.selected, ...current] }));
77
- return () => {
78
- this.selectionApi.select((state) => ({
79
- selected: state.selected.filter((selected) => !current.includes(selected)),
80
- }));
81
- };
82
- }
83
- }
84
- });
85
- }
86
- }
87
- NgtpSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpSelect, deps: null, target: i0.ɵɵFactoryTarget.Component });
88
- NgtpSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpSelect, isStandalone: true, selector: "ngtp-select", inputs: { enabled: "enabled" }, usesInheritance: true, ngImport: i0, template: `
89
- <ngt-group ngtCompound [ref]="groupRef">
90
- <ng-content />
91
- </ngt-group>
92
- `, isInline: true });
93
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpSelect, decorators: [{
94
- type: Component,
95
- args: [{
96
- selector: 'ngtp-select',
97
- standalone: true,
98
- template: `
99
- <ngt-group ngtCompound [ref]="groupRef">
100
- <ng-content />
101
- </ngt-group>
102
- `,
103
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
104
- }]
105
- }], propDecorators: { enabled: [{
106
- type: Input
107
- }] } });
108
-
109
- /**
110
- * Generated bundle index. Do not edit.
111
- */
112
-
113
- export { NGTP_SELECTION_API, NgtpSelect, NgtpSelection };
114
- //# sourceMappingURL=angular-three-postprocessing-selection.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"angular-three-postprocessing-selection.mjs","sources":["../../../../libs/angular-three-postprocessing/selection/src/lib/selection.ts","../../../../libs/angular-three-postprocessing/selection/src/lib/select.ts","../../../../libs/angular-three-postprocessing/selection/src/angular-three-postprocessing-selection.ts"],"sourcesContent":["import { Component, InjectionToken, Input } from '@angular/core';\nimport { RxState } from '@rx-angular/state';\nimport { NgtRxStore } from 'angular-three';\n\nexport interface NgtpSelectionAPI {\n selected: THREE.Object3D[];\n select: RxState<{ selected: THREE.Object3D[] }>['set'];\n enabled: boolean;\n}\n\nexport const NGTP_SELECTION_API = new InjectionToken<NgtpSelectionAPI>('NgtpSelection API');\nfunction ngtpSelectionApiFactory(selection: NgtpSelection) {\n const api: NgtpSelectionAPI = {\n get selected() {\n return selection.get('selected');\n },\n select: selection.set.bind(selection),\n get enabled() {\n return selection.get('enabled');\n },\n };\n return api;\n}\n\n@Component({\n selector: 'ngtp-selection',\n standalone: true,\n template: `\n <ng-content />\n `,\n providers: [{ provide: NGTP_SELECTION_API, useFactory: ngtpSelectionApiFactory, deps: [NgtpSelection] }],\n})\nexport class NgtpSelection extends NgtRxStore {\n @Input() set enabled(enabled: boolean) {\n this.set({ enabled });\n }\n\n override initialize(): void {\n super.initialize();\n this.set({ selected: [], enabled: true });\n }\n}\n","import { Component, CUSTOM_ELEMENTS_SCHEMA, inject, Input, OnInit } from '@angular/core';\nimport { extend, injectNgtRef, NgtRxStore } from 'angular-three';\nimport { combineLatest } from 'rxjs';\nimport { Group } from 'three';\nimport { NGTP_SELECTION_API } from './selection';\n\nextend({ Group });\n\n@Component({\n selector: 'ngtp-select',\n standalone: true,\n template: `\n <ngt-group ngtCompound [ref]=\"groupRef\">\n <ng-content />\n </ngt-group>\n `,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtpSelect extends NgtRxStore implements OnInit {\n readonly groupRef = injectNgtRef<THREE.Group>();\n\n private readonly selectionApi = inject(NGTP_SELECTION_API);\n\n @Input() set enabled(enabled: boolean) {\n this.set({ enabled });\n }\n\n override initialize(): void {\n super.initialize();\n this.set({ enabled: false });\n }\n\n ngOnInit() {\n this.setSelectEffect();\n }\n\n private setSelectEffect() {\n this.effect(combineLatest([this.select('enabled'), this.groupRef.children$()]), ([enabled]) => {\n if (enabled) {\n let changed = false;\n const current: THREE.Object3D[] = [];\n this.groupRef.nativeElement.traverse((obj) => {\n if (obj.type === 'Mesh') current.push(obj);\n if (this.selectionApi.selected.indexOf(obj) === -1) changed = true;\n });\n if (changed) {\n this.selectionApi.select((state) => ({ selected: [...state.selected, ...current] }));\n return () => {\n this.selectionApi.select((state) => ({\n selected: state.selected.filter((selected) => !current.includes(selected)),\n }));\n };\n }\n }\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAUa,kBAAkB,GAAG,IAAI,cAAc,CAAmB,mBAAmB,EAAE;AAC5F,SAAS,uBAAuB,CAAC,SAAwB,EAAA;AACrD,IAAA,MAAM,GAAG,GAAqB;AAC1B,QAAA,IAAI,QAAQ,GAAA;AACR,YAAA,OAAO,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;SACpC;QACD,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;AACrC,QAAA,IAAI,OAAO,GAAA;AACP,YAAA,OAAO,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;SACnC;KACJ,CAAC;AACF,IAAA,OAAO,GAAG,CAAC;AACf,CAAC;AAUK,MAAO,aAAc,SAAQ,UAAU,CA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, reflectComponentType, InjectionToken, Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
- import { NgtRxStore, NgtStore, startWithUndefined, extend, injectNgtRef, getLocalState } from 'angular-three';
4
- import { BlendFunction, EffectComposer, RenderPass, NormalPass, DepthDownsamplingPass, EffectPass } from 'postprocessing';
5
- import { combineLatest, map } from 'rxjs';
6
- import { RxActionFactory } from '@rx-angular/state/actions';
7
- import * as THREE from 'three';
8
- import { Group } from 'three';
9
- import { isWebGL2Available } from 'three-stdlib';
10
-
11
- class NgtpEffect extends NgtRxStore {
12
- constructor() {
13
- super(...arguments);
14
- this.defaultBlendMode = BlendFunction.NORMAL;
15
- this.store = inject(NgtStore);
16
- }
17
- set blendFunction(blendFunction) {
18
- this.set({ blendFunction });
19
- }
20
- set opacity(opacity) {
21
- this.set({ opacity });
22
- }
23
- ngOnChanges(changes) {
24
- this.set((s) => ({
25
- ...s,
26
- ...simpleChangesToStateObject(changes, ['blendFunction', 'opacity']),
27
- }));
28
- }
29
- ngOnInit() {
30
- this.connect('effect', componentInputsToCombinedStream(this), (props) => {
31
- delete props['__ngt_dummy__'];
32
- delete props['effect'];
33
- return new this.effectConstructor(props);
34
- });
35
- this.configureBlendMode();
36
- }
37
- configureBlendMode() {
38
- this.hold(combineLatest([
39
- this.select('effect'),
40
- this.select('blendFunction').pipe(startWithUndefined()),
41
- this.select('opacity').pipe(startWithUndefined()),
42
- ]), ([effect, blendFunction, opacity]) => {
43
- const invalidate = this.store.get('invalidate');
44
- effect.blendMode.blendFunction =
45
- !blendFunction && blendFunction !== 0 ? this.defaultBlendMode : blendFunction;
46
- if (opacity !== undefined)
47
- effect.blendMode.opacity.value = opacity;
48
- invalidate();
49
- });
50
- }
51
- }
52
- NgtpEffect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpEffect, deps: null, target: i0.ɵɵFactoryTarget.Directive });
53
- NgtpEffect.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: NgtpEffect, inputs: { blendFunction: "blendFunction", opacity: "opacity" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpEffect, decorators: [{
55
- type: Directive
56
- }], propDecorators: { blendFunction: [{
57
- type: Input
58
- }], opacity: [{
59
- type: Input
60
- }] } });
61
- function simpleChangesToStateObject(changes, keysToDelete = []) {
62
- for (const key of keysToDelete) {
63
- if (changes[key])
64
- delete changes[key];
65
- }
66
- return Object.entries(changes).reduce((obj, [key, change]) => {
67
- obj[key] = change.currentValue;
68
- return obj;
69
- }, {});
70
- }
71
- function componentInputsToCombinedStream(component, filterFn = () => true) {
72
- const inputs = reflectComponentType(component.constructor)
73
- ?.inputs.filter(filterFn)
74
- .map((input) => input.propName) || [];
75
- return combineLatest(inputs.reduce((combined, input) => {
76
- let input$ = component.select(input);
77
- if (component.get(input) === undefined) {
78
- input$ = input$.pipe(startWithUndefined());
79
- }
80
- combined[input] = input$;
81
- return combined;
82
- }, {}));
83
- }
84
-
85
- extend({ Group });
86
- const NGTP_EFFECT_COMPOSER_API = new InjectionToken('NgtpEffectComposer API');
87
- function effectComposerApiFactory(composer) {
88
- const api = {};
89
- Object.defineProperties(api, {
90
- composer: { get: () => composer.get('entities')[0] },
91
- normalPass: { get: () => composer.get('entities')[1] },
92
- downSamplingPass: { get: () => composer.get('entities')[2] },
93
- resolutionScale: { get: () => composer.get('resolutionScale') },
94
- scene: { get: () => composer.get('activeScene') },
95
- camera: { get: () => composer.get('activeCamera') },
96
- select: { get: () => composer.select.bind(composer) },
97
- get: { get: () => composer.get.bind(composer) },
98
- });
99
- return api;
100
- }
101
- class NgtpEffectComposer extends NgtRxStore {
102
- constructor() {
103
- super(...arguments);
104
- this.composerRef = injectNgtRef();
105
- this.store = inject(NgtStore);
106
- this.actions = inject((RxActionFactory)).create();
107
- }
108
- set enabled(enabled) {
109
- this.set({ enabled });
110
- }
111
- set depthBuffer(depthBuffer) {
112
- this.set({ depthBuffer });
113
- }
114
- set disableNormalPass(disableNormalPass) {
115
- this.set({ disableNormalPass });
116
- }
117
- set stencilBuffer(stencilBuffer) {
118
- this.set({ stencilBuffer });
119
- }
120
- set autoClear(autoClear) {
121
- this.set({ autoClear });
122
- }
123
- set resolutionScale(resolutionScale) {
124
- this.set({ resolutionScale });
125
- }
126
- set multisampling(multisampling) {
127
- this.set({ multisampling });
128
- }
129
- set frameBufferType(frameBufferType) {
130
- this.set({ frameBufferType });
131
- }
132
- set renderPriority(renderPriority) {
133
- this.set({ renderPriority });
134
- }
135
- set camera(camera) {
136
- this.set({ camera });
137
- }
138
- set scene(scene) {
139
- this.set({ scene });
140
- }
141
- initialize() {
142
- super.initialize();
143
- this.set({
144
- enabled: true,
145
- renderPriority: 1,
146
- autoClear: true,
147
- multisampling: 0,
148
- frameBufferType: THREE.HalfFloatType,
149
- });
150
- }
151
- ngOnInit() {
152
- this.connect('activeScene', combineLatest([this.store.select('scene'), this.select('scene').pipe(startWithUndefined())]).pipe(map(([defaultScene, scene]) => scene || defaultScene)));
153
- this.connect('activeCamera', combineLatest([this.store.select('camera'), this.select('camera').pipe(startWithUndefined())]).pipe(map(([defaultCamera, camera]) => camera || defaultCamera)));
154
- this.connect('entities', combineLatest([
155
- this.store.select('gl'),
156
- this.select('activeScene'),
157
- this.select('activeCamera'),
158
- this.select('multisampling'),
159
- this.select('frameBufferType'),
160
- this.select('depthBuffer').pipe(startWithUndefined()),
161
- this.select('stencilBuffer').pipe(startWithUndefined()),
162
- this.select('disableNormalPass').pipe(startWithUndefined()),
163
- this.select('resolutionScale').pipe(startWithUndefined()),
164
- ]).pipe(map(([gl, scene, camera, multisampling, frameBufferType, depthBuffer, stencilBuffer, disableNormalPass, resolutionScale,]) => {
165
- const webGL2Available = isWebGL2Available();
166
- // Initialize composer
167
- const effectComposer = new EffectComposer(gl, {
168
- depthBuffer,
169
- stencilBuffer,
170
- multisampling: multisampling > 0 && webGL2Available ? multisampling : 0,
171
- frameBufferType,
172
- });
173
- // Add render pass
174
- effectComposer.addPass(new RenderPass(scene, camera));
175
- // Create normal pass
176
- let downSamplingPass = null;
177
- let normalPass = null;
178
- if (!disableNormalPass) {
179
- normalPass = new NormalPass(scene, camera);
180
- normalPass.enabled = false;
181
- effectComposer.addPass(normalPass);
182
- if (resolutionScale !== undefined && webGL2Available) {
183
- downSamplingPass = new DepthDownsamplingPass({
184
- normalBuffer: normalPass.texture,
185
- resolutionScale,
186
- });
187
- downSamplingPass.enabled = false;
188
- effectComposer.addPass(downSamplingPass);
189
- }
190
- }
191
- return [effectComposer, normalPass, downSamplingPass];
192
- })));
193
- this.setComposerSize();
194
- this.setEffectPassed();
195
- this.setBeforeRender();
196
- }
197
- setComposerSize() {
198
- this.hold(combineLatest([this.select('entities'), this.store.select('size')]), ([[composer], size]) => void composer.setSize(size.width, size.height));
199
- }
200
- setEffectPassed() {
201
- this.effect(combineLatest([
202
- this.select('entities'),
203
- this.select('activeCamera'),
204
- this.composerRef.children$('nonObjects'),
205
- ]), ([[composer, normalPass, downSamplingPass], camera, effects]) => {
206
- let effectPass;
207
- if (this.composerRef.nativeElement &&
208
- Object.keys(getLocalState(this.composerRef.nativeElement)).length &&
209
- composer) {
210
- effectPass = new EffectPass(camera, ...effects);
211
- effectPass.renderToScreen = true;
212
- composer.addPass(effectPass);
213
- if (normalPass)
214
- normalPass.enabled = true;
215
- if (downSamplingPass)
216
- downSamplingPass.enabled = true;
217
- }
218
- return () => {
219
- if (effectPass)
220
- composer?.removePass(effectPass);
221
- if (normalPass)
222
- normalPass.enabled = false;
223
- if (downSamplingPass)
224
- downSamplingPass.enabled = false;
225
- };
226
- });
227
- }
228
- setBeforeRender() {
229
- const renderPriority = this.get('renderPriority');
230
- const enabled = this.get('enabled');
231
- this.effect(this.actions.setBeforeRender$, () => this.store.get('internal').subscribe(({ delta }) => {
232
- const [composer] = this.get('entities') || [];
233
- const enabled = this.get('enabled');
234
- const autoClear = this.get('autoClear');
235
- const gl = this.store.get('gl');
236
- const size = this.store.get('size');
237
- const camera = this.store.get('camera');
238
- if (composer && enabled) {
239
- if (!gl.xr.isPresenting) {
240
- gl.autoClear = autoClear;
241
- composer.render(delta);
242
- return;
243
- }
244
- // manually handle XR
245
- gl.xr.enabled = false;
246
- // update camera with XRPose
247
- gl.xr.updateCamera(camera);
248
- // render stereo cameras
249
- const { cameras } = gl.xr.getCamera();
250
- cameras.forEach(({ viewport, matrixWorld, projectionMatrix }) => {
251
- gl.setViewport(viewport);
252
- camera.position.setFromMatrixPosition(matrixWorld);
253
- camera.projectionMatrix.copy(projectionMatrix);
254
- composer.render(delta);
255
- });
256
- // reset
257
- gl.setViewport(0, 0, size.width, size.height);
258
- gl.xr.updateCamera(camera);
259
- gl.xr.enabled = true;
260
- }
261
- }, enabled ? renderPriority : 0));
262
- this.actions.setBeforeRender();
263
- }
264
- }
265
- NgtpEffectComposer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpEffectComposer, deps: null, target: i0.ɵɵFactoryTarget.Component });
266
- NgtpEffectComposer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpEffectComposer, isStandalone: true, selector: "ngtp-effect-composer", inputs: { composerRef: "composerRef", enabled: "enabled", depthBuffer: "depthBuffer", disableNormalPass: "disableNormalPass", stencilBuffer: "stencilBuffer", autoClear: "autoClear", resolutionScale: "resolutionScale", multisampling: "multisampling", frameBufferType: "frameBufferType", renderPriority: "renderPriority", camera: "camera", scene: "scene" }, providers: [
267
- { provide: NGTP_EFFECT_COMPOSER_API, useFactory: effectComposerApiFactory, deps: [NgtpEffectComposer] },
268
- RxActionFactory,
269
- ], usesInheritance: true, ngImport: i0, template: `
270
- <ngt-group [ref]="composerRef">
271
- <ng-content />
272
- </ngt-group>
273
- `, isInline: true });
274
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpEffectComposer, decorators: [{
275
- type: Component,
276
- args: [{
277
- selector: 'ngtp-effect-composer',
278
- standalone: true,
279
- template: `
280
- <ngt-group [ref]="composerRef">
281
- <ng-content />
282
- </ngt-group>
283
- `,
284
- providers: [
285
- { provide: NGTP_EFFECT_COMPOSER_API, useFactory: effectComposerApiFactory, deps: [NgtpEffectComposer] },
286
- RxActionFactory,
287
- ],
288
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
289
- }]
290
- }], propDecorators: { composerRef: [{
291
- type: Input
292
- }], enabled: [{
293
- type: Input
294
- }], depthBuffer: [{
295
- type: Input
296
- }], disableNormalPass: [{
297
- type: Input
298
- }], stencilBuffer: [{
299
- type: Input
300
- }], autoClear: [{
301
- type: Input
302
- }], resolutionScale: [{
303
- type: Input
304
- }], multisampling: [{
305
- type: Input
306
- }], frameBufferType: [{
307
- type: Input
308
- }], renderPriority: [{
309
- type: Input
310
- }], camera: [{
311
- type: Input
312
- }], scene: [{
313
- type: Input
314
- }] } });
315
-
316
- /**
317
- * Generated bundle index. Do not edit.
318
- */
319
-
320
- export { NGTP_EFFECT_COMPOSER_API, NgtpEffect, NgtpEffectComposer, componentInputsToCombinedStream, simpleChangesToStateObject };
321
- //# sourceMappingURL=angular-three-postprocessing.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"angular-three-postprocessing.mjs","sources":["../../../../libs/angular-three-postprocessing/src/lib/effect.ts","../../../../libs/angular-three-postprocessing/src/lib/effect-composer.ts","../../../../libs/angular-three-postprocessing/src/angular-three-postprocessing.ts"],"sourcesContent":["import { Directive, inject, Input, OnChanges, OnInit, reflectComponentType, SimpleChanges, Type } from '@angular/core';\nimport { NgtAnyRecord, NgtRxStore, NgtStore, startWithUndefined } from 'angular-three';\nimport { BlendFunction, Effect } from 'postprocessing';\nimport { combineLatest, Observable } from 'rxjs';\n\n@Directive()\nexport abstract class NgtpEffect<T extends Effect> extends NgtRxStore implements OnInit, OnChanges {\n @Input() set blendFunction(blendFunction: BlendFunction) {\n this.set({ blendFunction });\n }\n\n @Input() set opacity(opacity: number) {\n this.set({ opacity });\n }\n\n abstract get effectConstructor(): new (...args: any[]) => T;\n\n protected defaultBlendMode = BlendFunction.NORMAL;\n protected readonly store = inject(NgtStore);\n\n ngOnChanges(changes: SimpleChanges) {\n this.set((s) => ({\n ...s,\n ...simpleChangesToStateObject(changes, ['blendFunction', 'opacity']),\n }));\n }\n\n ngOnInit() {\n this.connect('effect', componentInputsToCombinedStream(this), (props) => {\n delete props['__ngt_dummy__'];\n delete props['effect'];\n return new this.effectConstructor(props);\n });\n this.configureBlendMode();\n }\n\n private configureBlendMode() {\n this.hold(\n combineLatest([\n this.select('effect'),\n this.select('blendFunction').pipe(startWithUndefined()),\n this.select('opacity').pipe(startWithUndefined()),\n ]),\n ([effect, blendFunction, opacity]) => {\n const invalidate = this.store.get('invalidate');\n effect.blendMode.blendFunction =\n !blendFunction && blendFunction !== 0 ? this.defaultBlendMode : blendFunction;\n if (opacity !== undefined) effect.blendMode.opacity.value = opacity;\n invalidate();\n }\n );\n }\n}\n\nexport function simpleChangesToStateObject(changes: SimpleChanges, keysToDelete: string[] = []) {\n for (const key of keysToDelete) {\n if (changes[key]) delete changes[key];\n }\n\n return Object.entries(changes).reduce((obj, [key, change]) => {\n obj[key] = change.currentValue;\n return obj;\n }, {} as NgtAnyRecord);\n}\n\nexport function componentInputsToCombinedStream(\n component: NgtRxStore,\n filterFn: (input: { propName: string; templateName: string }) => boolean = () => true\n): Observable<NgtAnyRecord> {\n const inputs =\n reflectComponentType(component.constructor as Type<any>)\n ?.inputs.filter(filterFn)\n .map((input) => input.propName) || [];\n\n return combineLatest(\n inputs.reduce((combined, input) => {\n let input$ = component.select(input);\n if (component.get(input) === undefined) {\n input$ = input$.pipe(startWithUndefined());\n }\n combined[input] = input$;\n return combined;\n }, {} as Record<string, Observable<any>>)\n );\n}\n","import { Component, CUSTOM_ELEMENTS_SCHEMA, inject, InjectionToken, Input, OnInit } from '@angular/core';\nimport { RxActionFactory } from '@rx-angular/state/actions';\nimport { extend, getLocalState, injectNgtRef, NgtRxStore, NgtStore, startWithUndefined } from 'angular-three';\nimport { DepthDownsamplingPass, EffectComposer, EffectPass, NormalPass, RenderPass } from 'postprocessing';\nimport { combineLatest, map } from 'rxjs';\nimport * as THREE from 'three';\nimport { Group } from 'three';\nimport { isWebGL2Available } from 'three-stdlib';\n\nextend({ Group });\n\nexport interface NgtpEffectComposerApi {\n composer: EffectComposer;\n normalPass: NormalPass | null;\n depthPass: DepthDownsamplingPass | null;\n scene: THREE.Scene;\n camera: THREE.Camera;\n resolutionScale?: number;\n select: NgtpEffectComposer['select'];\n get: NgtpEffectComposer['get'];\n}\n\nexport const NGTP_EFFECT_COMPOSER_API = new InjectionToken<NgtpEffectComposerApi>('NgtpEffectComposer API');\n\nfunction effectComposerApiFactory(composer: NgtpEffectComposer) {\n const api = {} as NgtpEffectComposerApi;\n\n Object.defineProperties(api, {\n composer: { get: () => composer.get('entities')[0] },\n normalPass: { get: () => composer.get('entities')[1] },\n downSamplingPass: { get: () => composer.get('entities')[2] },\n resolutionScale: { get: () => composer.get('resolutionScale') },\n scene: { get: () => composer.get('activeScene') },\n camera: { get: () => composer.get('activeCamera') },\n select: { get: () => composer.select.bind(composer) },\n get: { get: () => composer.get.bind(composer) },\n });\n\n return api;\n}\n\n@Component({\n selector: 'ngtp-effect-composer',\n standalone: true,\n template: `\n <ngt-group [ref]=\"composerRef\">\n <ng-content />\n </ngt-group>\n `,\n providers: [\n { provide: NGTP_EFFECT_COMPOSER_API, useFactory: effectComposerApiFactory, deps: [NgtpEffectComposer] },\n RxActionFactory,\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtpEffectComposer extends NgtRxStore implements OnInit {\n @Input() composerRef = injectNgtRef<Group>();\n\n @Input() set enabled(enabled: boolean) {\n this.set({ enabled });\n }\n\n @Input() set depthBuffer(depthBuffer: boolean) {\n this.set({ depthBuffer });\n }\n\n @Input() set disableNormalPass(disableNormalPass: boolean) {\n this.set({ disableNormalPass });\n }\n\n @Input() set stencilBuffer(stencilBuffer: boolean) {\n this.set({ stencilBuffer });\n }\n\n @Input() set autoClear(autoClear: boolean) {\n this.set({ autoClear });\n }\n\n @Input() set resolutionScale(resolutionScale: number) {\n this.set({ resolutionScale });\n }\n\n @Input() set multisampling(multisampling: number) {\n this.set({ multisampling });\n }\n\n @Input() set frameBufferType(frameBufferType: THREE.TextureDataType) {\n this.set({ frameBufferType });\n }\n\n @Input() set renderPriority(renderPriority: number) {\n this.set({ renderPriority });\n }\n\n @Input() set camera(camera: THREE.Camera) {\n this.set({ camera });\n }\n\n @Input() set scene(scene: THREE.Scene) {\n this.set({ scene });\n }\n\n override initialize(): void {\n super.initialize();\n this.set({\n enabled: true,\n renderPriority: 1,\n autoClear: true,\n multisampling: 0,\n frameBufferType: THREE.HalfFloatType,\n });\n }\n\n private readonly store = inject(NgtStore);\n private readonly actions = inject(RxActionFactory<{ setBeforeRender: void }>).create();\n\n ngOnInit() {\n this.connect(\n 'activeScene',\n combineLatest([this.store.select('scene'), this.select('scene').pipe(startWithUndefined())]).pipe(\n map(([defaultScene, scene]) => scene || defaultScene)\n )\n );\n\n this.connect(\n 'activeCamera',\n combineLatest([this.store.select('camera'), this.select('camera').pipe(startWithUndefined())]).pipe(\n map(([defaultCamera, camera]) => camera || defaultCamera)\n )\n );\n\n this.connect(\n 'entities',\n combineLatest([\n this.store.select('gl'),\n this.select('activeScene'),\n this.select('activeCamera'),\n this.select('multisampling'),\n this.select('frameBufferType'),\n this.select('depthBuffer').pipe(startWithUndefined()),\n this.select('stencilBuffer').pipe(startWithUndefined()),\n this.select('disableNormalPass').pipe(startWithUndefined()),\n this.select('resolutionScale').pipe(startWithUndefined()),\n ]).pipe(\n map(\n ([\n gl,\n scene,\n camera,\n multisampling,\n frameBufferType,\n depthBuffer,\n stencilBuffer,\n disableNormalPass,\n resolutionScale,\n ]) => {\n const webGL2Available = isWebGL2Available();\n // Initialize composer\n const effectComposer = new EffectComposer(gl, {\n depthBuffer,\n stencilBuffer,\n multisampling: multisampling > 0 && webGL2Available ? multisampling : 0,\n frameBufferType,\n });\n\n // Add render pass\n effectComposer.addPass(new RenderPass(scene, camera));\n\n // Create normal pass\n let downSamplingPass = null;\n let normalPass = null;\n if (!disableNormalPass) {\n normalPass = new NormalPass(scene, camera);\n normalPass.enabled = false;\n effectComposer.addPass(normalPass);\n if (resolutionScale !== undefined && webGL2Available) {\n downSamplingPass = new DepthDownsamplingPass({\n normalBuffer: normalPass.texture,\n resolutionScale,\n });\n downSamplingPass.enabled = false;\n effectComposer.addPass(downSamplingPass);\n }\n }\n\n return [effectComposer, normalPass, downSamplingPass];\n }\n )\n )\n );\n\n this.setComposerSize();\n this.setEffectPassed();\n this.setBeforeRender();\n }\n\n private setComposerSize() {\n this.hold(\n combineLatest([this.select('entities'), this.store.select('size')]),\n ([[composer], size]) => void (composer as EffectComposer).setSize(size.width, size.height)\n );\n }\n\n private setEffectPassed() {\n this.effect(\n combineLatest([\n this.select('entities'),\n this.select('activeCamera'),\n this.composerRef.children$('nonObjects'),\n ]),\n ([[composer, normalPass, downSamplingPass], camera, effects]) => {\n let effectPass: EffectPass;\n if (\n this.composerRef.nativeElement &&\n Object.keys(getLocalState(this.composerRef.nativeElement)).length &&\n composer\n ) {\n effectPass = new EffectPass(camera, ...effects);\n effectPass.renderToScreen = true;\n composer.addPass(effectPass);\n if (normalPass) normalPass.enabled = true;\n if (downSamplingPass) downSamplingPass.enabled = true;\n }\n\n return () => {\n if (effectPass) composer?.removePass(effectPass);\n if (normalPass) normalPass.enabled = false;\n if (downSamplingPass) downSamplingPass.enabled = false;\n };\n }\n );\n }\n\n private setBeforeRender() {\n const renderPriority = this.get('renderPriority');\n const enabled = this.get('enabled');\n this.effect(this.actions.setBeforeRender$, () =>\n this.store.get('internal').subscribe(\n ({ delta }) => {\n const [composer] = this.get('entities') || [];\n const enabled = this.get('enabled');\n const autoClear = this.get('autoClear');\n const gl = this.store.get('gl');\n const size = this.store.get('size');\n const camera = this.store.get('camera');\n if (composer && enabled) {\n if (!gl.xr.isPresenting) {\n gl.autoClear = autoClear;\n composer.render(delta);\n return;\n }\n\n // manually handle XR\n gl.xr.enabled = false;\n // update camera with XRPose\n gl.xr.updateCamera(camera as THREE.PerspectiveCamera);\n\n // render stereo cameras\n const { cameras } = gl.xr.getCamera();\n cameras.forEach(({ viewport, matrixWorld, projectionMatrix }) => {\n gl.setViewport(viewport);\n camera.position.setFromMatrixPosition(matrixWorld);\n camera.projectionMatrix.copy(projectionMatrix);\n\n composer.render(delta);\n });\n\n // reset\n gl.setViewport(0, 0, size.width, size.height);\n gl.xr.updateCamera(camera as THREE.PerspectiveCamera);\n gl.xr.enabled = true;\n }\n },\n enabled ? renderPriority : 0\n )\n );\n this.actions.setBeforeRender();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAMM,MAAgB,UAA6B,SAAQ,UAAU,CAAA;AADrE,IAAA,WAAA,GAAA;;AAYc,QAAA,IAAA,CAAA,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC;AAC/B,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAkC/C,KAAA;IA7CG,IAAa,aAAa,CAAC,aAA4B,EAAA;AACnD,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC;KAC/B;IAED,IAAa,OAAO,CAAC,OAAe,EAAA;AAChC,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;KACzB;AAOD,IAAA,WAAW,CAAC,OAAsB,EAAA;QAC9B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;AACb,YAAA,GAAG,CAAC;YACJ,GAAG,0BAA0B,CAAC,OAAO,EAAE,CAAC,eAAe,EAAE,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Token, OnInit } from '@angular/core';
2
- import { NgtRxStore } from 'angular-three';
3
- import { DepthDownsamplingPass, EffectComposer, NormalPass } from 'postprocessing';
4
- import * as THREE from 'three';
5
- import * as i0 from "@angular/core";
6
- export interface NgtpEffectComposerApi {
7
- composer: EffectComposer;
8
- normalPass: NormalPass | null;
9
- depthPass: DepthDownsamplingPass | null;
10
- scene: THREE.Scene;
11
- camera: THREE.Camera;
12
- resolutionScale?: number;
13
- select: NgtpEffectComposer['select'];
14
- get: NgtpEffectComposer['get'];
15
- }
16
- export declare const NGTP_EFFECT_COMPOSER_API: InjectionToken<NgtpEffectComposerApi>;
17
- export declare class NgtpEffectComposer extends NgtRxStore implements OnInit {
18
- composerRef: import("angular-three").NgtInjectedRef<THREE.Group>;
19
- set enabled(enabled: boolean);
20
- set depthBuffer(depthBuffer: boolean);
21
- set disableNormalPass(disableNormalPass: boolean);
22
- set stencilBuffer(stencilBuffer: boolean);
23
- set autoClear(autoClear: boolean);
24
- set resolutionScale(resolutionScale: number);
25
- set multisampling(multisampling: number);
26
- set frameBufferType(frameBufferType: THREE.TextureDataType);
27
- set renderPriority(renderPriority: number);
28
- set camera(camera: THREE.Camera);
29
- set scene(scene: THREE.Scene);
30
- initialize(): void;
31
- private readonly store;
32
- private readonly actions;
33
- ngOnInit(): void;
34
- private setComposerSize;
35
- private setEffectPassed;
36
- private setBeforeRender;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<NgtpEffectComposer, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<NgtpEffectComposer, "ngtp-effect-composer", never, { "composerRef": "composerRef"; "enabled": "enabled"; "depthBuffer": "depthBuffer"; "disableNormalPass": "disableNormalPass"; "stencilBuffer": "stencilBuffer"; "autoClear": "autoClear"; "resolutionScale": "resolutionScale"; "multisampling": "multisampling"; "frameBufferType": "frameBufferType"; "renderPriority": "renderPriority"; "camera": "camera"; "scene": "scene"; }, {}, never, ["*"], true, never>;
39
- }
package/lib/effect.d.ts DELETED
@@ -1,22 +0,0 @@
1
- import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
- import { NgtAnyRecord, NgtRxStore, NgtStore } from 'angular-three';
3
- import { BlendFunction, Effect } from 'postprocessing';
4
- import { Observable } from 'rxjs';
5
- import * as i0 from "@angular/core";
6
- export declare abstract class NgtpEffect<T extends Effect> extends NgtRxStore implements OnInit, OnChanges {
7
- set blendFunction(blendFunction: BlendFunction);
8
- set opacity(opacity: number);
9
- abstract get effectConstructor(): new (...args: any[]) => T;
10
- protected defaultBlendMode: BlendFunction;
11
- protected readonly store: NgtStore;
12
- ngOnChanges(changes: SimpleChanges): void;
13
- ngOnInit(): void;
14
- private configureBlendMode;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<NgtpEffect<any>, never>;
16
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgtpEffect<any>, never, never, { "blendFunction": "blendFunction"; "opacity": "opacity"; }, {}, never, never, false, never>;
17
- }
18
- export declare function simpleChangesToStateObject(changes: SimpleChanges, keysToDelete?: string[]): NgtAnyRecord;
19
- export declare function componentInputsToCombinedStream(component: NgtRxStore, filterFn?: (input: {
20
- propName: string;
21
- templateName: string;
22
- }) => boolean): Observable<NgtAnyRecord>;
@@ -1,3 +0,0 @@
1
- # angular-three-postprocessing/selection
2
-
3
- Secondary entry point of `angular-three-postprocessing`. It can be used by importing from `angular-three-postprocessing/selection`.
@@ -1,2 +0,0 @@
1
- export * from './lib/select';
2
- export * from './lib/selection';
@@ -1,14 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { NgtRxStore } from 'angular-three';
3
- import { Group } from 'three';
4
- import * as i0 from "@angular/core";
5
- export declare class NgtpSelect extends NgtRxStore implements OnInit {
6
- readonly groupRef: import("angular-three").NgtInjectedRef<Group>;
7
- private readonly selectionApi;
8
- set enabled(enabled: boolean);
9
- initialize(): void;
10
- ngOnInit(): void;
11
- private setSelectEffect;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<NgtpSelect, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<NgtpSelect, "ngtp-select", never, { "enabled": "enabled"; }, {}, never, ["*"], true, never>;
14
- }
@@ -1,18 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { RxState } from '@rx-angular/state';
3
- import { NgtRxStore } from 'angular-three';
4
- import * as i0 from "@angular/core";
5
- export interface NgtpSelectionAPI {
6
- selected: THREE.Object3D[];
7
- select: RxState<{
8
- selected: THREE.Object3D[];
9
- }>['set'];
10
- enabled: boolean;
11
- }
12
- export declare const NGTP_SELECTION_API: InjectionToken<NgtpSelectionAPI>;
13
- export declare class NgtpSelection extends NgtRxStore {
14
- set enabled(enabled: boolean);
15
- initialize(): void;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<NgtpSelection, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<NgtpSelection, "ngtp-selection", never, { "enabled": "enabled"; }, {}, never, ["*"], true, never>;
18
- }