angular-three 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/canvas.mjs +40 -42
- package/esm2022/lib/directives/args.mjs +17 -25
- package/esm2022/lib/directives/selection.mjs +47 -43
- package/esm2022/lib/html.mjs +3 -3
- package/esm2022/lib/instance.mjs +13 -2
- package/esm2022/lib/loader.mjs +18 -27
- package/esm2022/lib/pipes/hexify.mjs +3 -3
- package/esm2022/lib/portal.mjs +25 -27
- package/esm2022/lib/renderer/index.mjs +11 -5
- package/esm2022/lib/renderer/utils.mjs +4 -2
- package/esm2022/lib/routed-scene.mjs +3 -3
- package/esm2022/lib/types.mjs +1 -1
- package/esm2022/lib/utils/object-events.mjs +19 -22
- package/esm2022/nativescript/lib/canvas.mjs +3 -3
- package/esm2022/testing/lib/test-canvas.mjs +3 -3
- package/fesm2022/angular-three-nativescript.mjs +3 -3
- package/fesm2022/angular-three-testing.mjs +3 -3
- package/fesm2022/angular-three.mjs +197 -195
- package/fesm2022/angular-three.mjs.map +1 -1
- package/lib/canvas.d.ts +0 -1
- package/lib/directives/args.d.ts +0 -2
- package/lib/directives/selection.d.ts +1 -1
- package/lib/types.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { untracked, computed, signal, ElementRef, input, inject, ViewContainerRef,
|
|
2
|
+
import { untracked, computed, signal, ElementRef, input, inject, ViewContainerRef, TemplateRef, effect, DestroyRef, Directive, InjectionToken, DebugNode, RendererFactory2, Injectable, makeEnvironmentProviders, Component, NgZone, EnvironmentInjector, Injector, booleanAttribute, output, viewChild, afterNextRender, createEnvironmentInjector, ChangeDetectionStrategy, Pipe, CUSTOM_ELEMENTS_SCHEMA, contentChild, model, Renderer2 } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed, outputFromObservable } from '@angular/core/rxjs-interop';
|
|
4
|
-
import { injectAutoEffect } from 'ngxtension/auto-effect';
|
|
5
4
|
import { provideResizeOptions, NgxResize } from 'ngxtension/resize';
|
|
6
5
|
import { MathUtils, WebGLRenderer, OrthographicCamera, PerspectiveCamera, Vector3, Vector2, Clock, Layers, Color, ColorManagement, Texture, RGBAFormat, UnsignedByteType, EventDispatcher, Raycaster, Scene, PCFSoftShadowMap, BasicShadowMap, PCFShadowMap, VSMShadowMap, NoToneMapping, ACESFilmicToneMapping, Vector4 } from 'three';
|
|
7
6
|
import { DOCUMENT } from '@angular/common';
|
|
@@ -211,7 +210,14 @@ function prepare(object, localState) {
|
|
|
211
210
|
parent: null,
|
|
212
211
|
objects: [],
|
|
213
212
|
nonObjects: [],
|
|
213
|
+
geometryStamp: Date.now(),
|
|
214
214
|
}), ...rest } = localState || {};
|
|
215
|
+
const nonObjects = instanceStore.select('nonObjects');
|
|
216
|
+
const geometryStamp = instanceStore.select('geometryStamp');
|
|
217
|
+
const nonObjectsChanged = computed(() => {
|
|
218
|
+
const [_nonObjects] = [nonObjects(), geometryStamp()];
|
|
219
|
+
return _nonObjects;
|
|
220
|
+
});
|
|
215
221
|
instance.__ngt__ = {
|
|
216
222
|
previousAttach: null,
|
|
217
223
|
store: null,
|
|
@@ -221,7 +227,7 @@ function prepare(object, localState) {
|
|
|
221
227
|
instanceStore,
|
|
222
228
|
parent: instanceStore.select('parent'),
|
|
223
229
|
objects: instanceStore.select('objects'),
|
|
224
|
-
nonObjects:
|
|
230
|
+
nonObjects: nonObjectsChanged,
|
|
225
231
|
add(object, type) {
|
|
226
232
|
const current = instance.__ngt__.instanceStore.snapshot[type];
|
|
227
233
|
const foundIndex = current.indexOf((node) => object === node);
|
|
@@ -241,6 +247,9 @@ function prepare(object, localState) {
|
|
|
241
247
|
setParent(parent) {
|
|
242
248
|
instance.__ngt__.instanceStore.update({ parent });
|
|
243
249
|
},
|
|
250
|
+
updateGeometryStamp() {
|
|
251
|
+
instance.__ngt__.instanceStore.update({ geometryStamp: Date.now() });
|
|
252
|
+
},
|
|
244
253
|
...rest,
|
|
245
254
|
};
|
|
246
255
|
}
|
|
@@ -763,9 +772,7 @@ class NgtArgs {
|
|
|
763
772
|
constructor() {
|
|
764
773
|
this.args = input.required();
|
|
765
774
|
this.vcr = inject(ViewContainerRef);
|
|
766
|
-
this.zone = inject(NgZone);
|
|
767
775
|
this.template = inject(TemplateRef);
|
|
768
|
-
this.autoEffect = injectAutoEffect();
|
|
769
776
|
this.injected = false;
|
|
770
777
|
this.injectedArgs = null;
|
|
771
778
|
const commentNode = this.vcr.element.nativeElement;
|
|
@@ -773,16 +780,14 @@ class NgtArgs {
|
|
|
773
780
|
commentNode[SPECIAL_INTERNAL_ADD_COMMENT]('args');
|
|
774
781
|
delete commentNode[SPECIAL_INTERNAL_ADD_COMMENT];
|
|
775
782
|
}
|
|
776
|
-
|
|
777
|
-
this.
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
this.createView();
|
|
785
|
-
});
|
|
783
|
+
effect(() => {
|
|
784
|
+
const value = this.args();
|
|
785
|
+
if (value == null || !Array.isArray(value) || (value.length === 1 && value[0] === null))
|
|
786
|
+
return;
|
|
787
|
+
this.injected = false;
|
|
788
|
+
this.injectedArgs = value;
|
|
789
|
+
untracked(() => {
|
|
790
|
+
this.createView();
|
|
786
791
|
});
|
|
787
792
|
});
|
|
788
793
|
inject(DestroyRef).onDestroy(() => {
|
|
@@ -800,18 +805,15 @@ class NgtArgs {
|
|
|
800
805
|
return !this.injected && !!this.injectedArgs?.length;
|
|
801
806
|
}
|
|
802
807
|
createView() {
|
|
803
|
-
this.
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
this.view = this.vcr.createEmbeddedView(this.template);
|
|
808
|
-
this.view.detectChanges();
|
|
809
|
-
});
|
|
808
|
+
if (this.view && !this.view.destroyed)
|
|
809
|
+
this.view.destroy();
|
|
810
|
+
this.view = this.vcr.createEmbeddedView(this.template);
|
|
811
|
+
this.view.detectChanges();
|
|
810
812
|
}
|
|
811
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
812
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
813
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtArgs, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
814
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.4", type: NgtArgs, isStandalone: true, selector: "ng-template[args]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
|
813
815
|
}
|
|
814
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
816
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtArgs, decorators: [{
|
|
815
817
|
type: Directive,
|
|
816
818
|
args: [{ selector: 'ng-template[args]', standalone: true }]
|
|
817
819
|
}], ctorParameters: () => [] });
|
|
@@ -1447,7 +1449,9 @@ function attachThreeChild(parent, child) {
|
|
|
1447
1449
|
parent.add(child);
|
|
1448
1450
|
added = true;
|
|
1449
1451
|
}
|
|
1450
|
-
pLS.add
|
|
1452
|
+
if (pLS.add) {
|
|
1453
|
+
pLS.add(child, added ? 'objects' : 'nonObjects');
|
|
1454
|
+
}
|
|
1451
1455
|
if (cLS.parent && untracked(cLS.parent) !== parent) {
|
|
1452
1456
|
cLS.setParent(parent);
|
|
1453
1457
|
}
|
|
@@ -1598,10 +1602,10 @@ class NgtRendererFactory {
|
|
|
1598
1602
|
}
|
|
1599
1603
|
return renderer;
|
|
1600
1604
|
}
|
|
1601
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1602
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.
|
|
1605
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtRendererFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1606
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtRendererFactory }); }
|
|
1603
1607
|
}
|
|
1604
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtRendererFactory, decorators: [{
|
|
1605
1609
|
type: Injectable
|
|
1606
1610
|
}] });
|
|
1607
1611
|
class NgtRenderer {
|
|
@@ -1901,6 +1905,7 @@ class NgtRenderer {
|
|
|
1901
1905
|
const rS = el.__ngt_renderer__;
|
|
1902
1906
|
if (!rS || rS[3 /* NgtRendererClassId.destroyed */])
|
|
1903
1907
|
return;
|
|
1908
|
+
const localState = getLocalState(el);
|
|
1904
1909
|
if (rS[0 /* NgtRendererClassId.type */] === 'three') {
|
|
1905
1910
|
if (name === SPECIAL_PROPERTIES.PARAMETERS) {
|
|
1906
1911
|
// NOTE: short-cut for null raycast to prevent upstream from creating a nullRaycast property
|
|
@@ -1908,9 +1913,11 @@ class NgtRenderer {
|
|
|
1908
1913
|
value['raycast'] = () => null;
|
|
1909
1914
|
}
|
|
1910
1915
|
applyProps(el, value);
|
|
1916
|
+
if ('geometry' in value && value['geometry'].isBufferGeometry) {
|
|
1917
|
+
localState?.updateGeometryStamp();
|
|
1918
|
+
}
|
|
1911
1919
|
return;
|
|
1912
1920
|
}
|
|
1913
|
-
const localState = getLocalState(el);
|
|
1914
1921
|
const parent = localState?.instanceStore.get('parent') || rS[1 /* NgtRendererClassId.parent */];
|
|
1915
1922
|
// [rawValue]
|
|
1916
1923
|
if (localState?.isRaw && name === SPECIAL_PROPERTIES.RAW_VALUE) {
|
|
@@ -1938,6 +1945,9 @@ class NgtRenderer {
|
|
|
1938
1945
|
value = () => null;
|
|
1939
1946
|
}
|
|
1940
1947
|
applyProps(el, { [name]: value });
|
|
1948
|
+
if (name === 'geometry' && value.isBufferGeometry) {
|
|
1949
|
+
localState?.updateGeometryStamp();
|
|
1950
|
+
}
|
|
1941
1951
|
return;
|
|
1942
1952
|
}
|
|
1943
1953
|
return this.delegate.setProperty(el, name, value);
|
|
@@ -2374,12 +2384,12 @@ class NgtRoutedScene {
|
|
|
2374
2384
|
.pipe(filter((event) => event instanceof ActivationEnd), takeUntilDestroyed())
|
|
2375
2385
|
.subscribe(cdr.detectChanges.bind(cdr));
|
|
2376
2386
|
}
|
|
2377
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2378
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
2387
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtRoutedScene, deps: [{ token: i1.Router }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2388
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.4", type: NgtRoutedScene, isStandalone: true, selector: "ngt-routed-scene", ngImport: i0, template: `
|
|
2379
2389
|
<router-outlet />
|
|
2380
2390
|
`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
|
|
2381
2391
|
}
|
|
2382
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtRoutedScene, decorators: [{
|
|
2383
2393
|
type: Component,
|
|
2384
2394
|
args: [{
|
|
2385
2395
|
standalone: true,
|
|
@@ -2395,7 +2405,6 @@ class NgtCanvas {
|
|
|
2395
2405
|
constructor() {
|
|
2396
2406
|
this.store = injectStore();
|
|
2397
2407
|
this.initRoot = injectCanvasRootInitializer();
|
|
2398
|
-
this.autoEffect = injectAutoEffect();
|
|
2399
2408
|
this.host = inject(ElementRef);
|
|
2400
2409
|
this.zone = inject(NgZone);
|
|
2401
2410
|
this.environmentInjector = inject(EnvironmentInjector);
|
|
@@ -2440,7 +2449,9 @@ class NgtCanvas {
|
|
|
2440
2449
|
afterNextRender(() => {
|
|
2441
2450
|
this.zone.runOutsideAngular(() => {
|
|
2442
2451
|
this.configurator = this.initRoot(this.glCanvas().nativeElement);
|
|
2443
|
-
|
|
2452
|
+
effect(() => {
|
|
2453
|
+
this.noZoneResizeEffect();
|
|
2454
|
+
}, { injector: this.injector });
|
|
2444
2455
|
});
|
|
2445
2456
|
});
|
|
2446
2457
|
inject(DestroyRef).onDestroy(() => {
|
|
@@ -2450,40 +2461,38 @@ class NgtCanvas {
|
|
|
2450
2461
|
});
|
|
2451
2462
|
}
|
|
2452
2463
|
noZoneResizeEffect() {
|
|
2453
|
-
this.
|
|
2454
|
-
|
|
2455
|
-
if (
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
this.
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
}
|
|
2486
|
-
});
|
|
2464
|
+
const resizeResult = this.resizeResult();
|
|
2465
|
+
if (resizeResult.width > 0 && resizeResult.height > 0) {
|
|
2466
|
+
if (!this.configurator)
|
|
2467
|
+
this.configurator = this.initRoot(this.glCanvas().nativeElement);
|
|
2468
|
+
this.configurator.configure({
|
|
2469
|
+
gl: this.gl(),
|
|
2470
|
+
shadows: this.shadows(),
|
|
2471
|
+
legacy: this.legacy(),
|
|
2472
|
+
linear: this.linear(),
|
|
2473
|
+
flat: this.flat(),
|
|
2474
|
+
orthographic: this.orthographic(),
|
|
2475
|
+
frameloop: this.frameloop(),
|
|
2476
|
+
performance: this.performance(),
|
|
2477
|
+
dpr: this.dpr(),
|
|
2478
|
+
raycaster: this.raycaster(),
|
|
2479
|
+
scene: this.scene(),
|
|
2480
|
+
camera: this.camera(),
|
|
2481
|
+
events: this.events(),
|
|
2482
|
+
eventSource: this.eventSource(),
|
|
2483
|
+
eventPrefix: this.eventPrefix(),
|
|
2484
|
+
lookAt: this.lookAt(),
|
|
2485
|
+
size: resizeResult,
|
|
2486
|
+
});
|
|
2487
|
+
untracked(() => {
|
|
2488
|
+
if (this.glRef) {
|
|
2489
|
+
this.glRef.changeDetectorRef.detectChanges();
|
|
2490
|
+
}
|
|
2491
|
+
else {
|
|
2492
|
+
this.noZoneRender();
|
|
2493
|
+
}
|
|
2494
|
+
});
|
|
2495
|
+
}
|
|
2487
2496
|
}
|
|
2488
2497
|
noZoneRender() {
|
|
2489
2498
|
// NOTE: destroy previous instances if existed
|
|
@@ -2522,8 +2531,8 @@ class NgtCanvas {
|
|
|
2522
2531
|
});
|
|
2523
2532
|
this.glRef.changeDetectorRef.detectChanges();
|
|
2524
2533
|
}
|
|
2525
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2526
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.
|
|
2534
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtCanvas, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2535
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtCanvas, isStandalone: true, selector: "ngt-canvas", inputs: { sceneGraph: { classPropertyName: "sceneGraph", publicName: "sceneGraph", isSignal: true, isRequired: true, transformFunction: null }, gl: { classPropertyName: "gl", publicName: "gl", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shadows: { classPropertyName: "shadows", publicName: "shadows", isSignal: true, isRequired: false, transformFunction: null }, legacy: { classPropertyName: "legacy", publicName: "legacy", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, flat: { classPropertyName: "flat", publicName: "flat", isSignal: true, isRequired: false, transformFunction: null }, orthographic: { classPropertyName: "orthographic", publicName: "orthographic", isSignal: true, isRequired: false, transformFunction: null }, frameloop: { classPropertyName: "frameloop", publicName: "frameloop", isSignal: true, isRequired: false, transformFunction: null }, performance: { classPropertyName: "performance", publicName: "performance", isSignal: true, isRequired: false, transformFunction: null }, dpr: { classPropertyName: "dpr", publicName: "dpr", isSignal: true, isRequired: false, transformFunction: null }, raycaster: { classPropertyName: "raycaster", publicName: "raycaster", isSignal: true, isRequired: false, transformFunction: null }, scene: { classPropertyName: "scene", publicName: "scene", isSignal: true, isRequired: false, transformFunction: null }, camera: { classPropertyName: "camera", publicName: "camera", isSignal: true, isRequired: false, transformFunction: null }, events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: false, transformFunction: null }, eventSource: { classPropertyName: "eventSource", publicName: "eventSource", isSignal: true, isRequired: false, transformFunction: null }, eventPrefix: { classPropertyName: "eventPrefix", publicName: "eventPrefix", isSignal: true, isRequired: false, transformFunction: null }, lookAt: { classPropertyName: "lookAt", publicName: "lookAt", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { created: "created", pointerMissed: "pointerMissed" }, host: { properties: { "style.pointerEvents": "hbPointerEvents()" }, styleAttribute: "display: block;position: relative;width: 100%;height: 100%;overflow: hidden;" }, providers: [
|
|
2527
2536
|
provideResizeOptions({
|
|
2528
2537
|
emitInZone: false,
|
|
2529
2538
|
emitInitialResult: true,
|
|
@@ -2536,7 +2545,7 @@ class NgtCanvas {
|
|
|
2536
2545
|
</div>
|
|
2537
2546
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgxResize, selector: "[ngxResize]", inputs: ["ngxResizeOptions"], outputs: ["ngxResize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2538
2547
|
}
|
|
2539
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2548
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtCanvas, decorators: [{
|
|
2540
2549
|
type: Component,
|
|
2541
2550
|
args: [{
|
|
2542
2551
|
selector: 'ngt-canvas',
|
|
@@ -2568,12 +2577,16 @@ class NgtSelection {
|
|
|
2568
2577
|
this.enabled = input(true, { alias: 'ngtSelection', transform: booleanAttribute });
|
|
2569
2578
|
this.source = signal([]);
|
|
2570
2579
|
this.selected = this.source.asReadonly();
|
|
2571
|
-
this.update = this.source.update.bind(this.source);
|
|
2572
2580
|
}
|
|
2573
|
-
|
|
2574
|
-
|
|
2581
|
+
update(...args) {
|
|
2582
|
+
if (!this.enabled())
|
|
2583
|
+
return;
|
|
2584
|
+
this.source.update(...args);
|
|
2585
|
+
}
|
|
2586
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtSelection, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2587
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.4", type: NgtSelection, isStandalone: true, selector: "[ngtSelection]", inputs: { enabled: { classPropertyName: "enabled", publicName: "ngtSelection", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
2575
2588
|
}
|
|
2576
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtSelection, decorators: [{
|
|
2577
2590
|
type: Directive,
|
|
2578
2591
|
args: [{ standalone: true, selector: '[ngtSelection]' }]
|
|
2579
2592
|
}] });
|
|
@@ -2582,44 +2595,45 @@ class NgtSelect {
|
|
|
2582
2595
|
this.enabled = input(false, { transform: booleanAttribute, alias: 'ngtSelect' });
|
|
2583
2596
|
const elementRef = inject(ElementRef);
|
|
2584
2597
|
const selection = inject(NgtSelection);
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
return
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2598
|
+
effect((onCleanup) => {
|
|
2599
|
+
const selectionEnabled = selection.enabled();
|
|
2600
|
+
if (!selectionEnabled)
|
|
2601
|
+
return;
|
|
2602
|
+
const enabled = this.enabled();
|
|
2603
|
+
if (!enabled)
|
|
2604
|
+
return;
|
|
2605
|
+
const host = elementRef.nativeElement;
|
|
2606
|
+
if (!host)
|
|
2607
|
+
return;
|
|
2608
|
+
const localState = getLocalState(host);
|
|
2609
|
+
if (!localState)
|
|
2610
|
+
return;
|
|
2611
|
+
// ngt-mesh[ngtSelect]
|
|
2612
|
+
if (host.type === 'Mesh') {
|
|
2613
|
+
selection.update((prev) => [...prev, host]);
|
|
2614
|
+
onCleanup(() => selection.update((prev) => prev.filter((el) => el !== host)));
|
|
2615
|
+
return;
|
|
2616
|
+
}
|
|
2617
|
+
const [collection] = [untracked(selection.selected), localState.objects()];
|
|
2618
|
+
let changed = false;
|
|
2619
|
+
const current = [];
|
|
2620
|
+
host.traverse((child) => {
|
|
2621
|
+
child.type === 'Mesh' && current.push(child);
|
|
2622
|
+
if (collection.indexOf(child) === -1)
|
|
2623
|
+
changed = true;
|
|
2624
|
+
});
|
|
2625
|
+
if (!changed)
|
|
2626
|
+
return;
|
|
2627
|
+
selection.update((prev) => [...prev, ...current]);
|
|
2628
|
+
onCleanup(() => {
|
|
2629
|
+
selection.update((prev) => prev.filter((el) => !current.includes(el)));
|
|
2630
|
+
});
|
|
2631
|
+
}, { allowSignalWrites: true });
|
|
2618
2632
|
}
|
|
2619
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2620
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
2633
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2634
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.4", type: NgtSelect, isStandalone: true, selector: "ngt-group[ngtSelect], ngt-mesh[ngtSelect]", inputs: { enabled: { classPropertyName: "enabled", publicName: "ngtSelect", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
2621
2635
|
}
|
|
2622
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtSelect, decorators: [{
|
|
2623
2637
|
type: Directive,
|
|
2624
2638
|
args: [{ standalone: true, selector: 'ngt-group[ngtSelect], ngt-mesh[ngtSelect]' }]
|
|
2625
2639
|
}], ctorParameters: () => [] });
|
|
@@ -2653,10 +2667,10 @@ class NgtHTML {
|
|
|
2653
2667
|
delete this.host.nativeElement['__ngt_dom_parent__'];
|
|
2654
2668
|
});
|
|
2655
2669
|
}
|
|
2656
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2657
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.
|
|
2670
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtHTML, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2671
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: NgtHTML, ngImport: i0 }); }
|
|
2658
2672
|
}
|
|
2659
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtHTML, decorators: [{
|
|
2660
2674
|
type: Directive
|
|
2661
2675
|
}], ctorParameters: () => [] });
|
|
2662
2676
|
|
|
@@ -2673,9 +2687,7 @@ function normalizeInputs(input) {
|
|
|
2673
2687
|
else {
|
|
2674
2688
|
urls = Object.values(input);
|
|
2675
2689
|
}
|
|
2676
|
-
return urls.map((url) =>
|
|
2677
|
-
return url.includes('undefined') || url.includes('null') || !url ? '' : url;
|
|
2678
|
-
});
|
|
2690
|
+
return urls.map((url) => (url.includes('undefined') || url.includes('null') || !url ? '' : url));
|
|
2679
2691
|
}
|
|
2680
2692
|
function load(loaderConstructorFactory, inputs, { extensions, onLoad, onProgress, } = {}) {
|
|
2681
2693
|
return () => {
|
|
@@ -2687,11 +2699,9 @@ function load(loaderConstructorFactory, inputs, { extensions, onLoad, onProgress
|
|
|
2687
2699
|
}
|
|
2688
2700
|
if (extensions)
|
|
2689
2701
|
extensions(loader);
|
|
2690
|
-
// TODO: reevaluate this
|
|
2691
2702
|
return urls.map((url) => {
|
|
2692
|
-
if (url === '')
|
|
2693
|
-
return null;
|
|
2694
|
-
}
|
|
2703
|
+
if (url === '')
|
|
2704
|
+
return Promise.resolve(null);
|
|
2695
2705
|
if (!cached.has(url)) {
|
|
2696
2706
|
cached.set(url, new Promise((resolve, reject) => {
|
|
2697
2707
|
loader.load(url, (data) => {
|
|
@@ -2720,25 +2730,20 @@ function _injectLoader(loaderConstructorFactory, inputs, { extensions, onProgres
|
|
|
2720
2730
|
effect(() => {
|
|
2721
2731
|
const originalUrls = inputs();
|
|
2722
2732
|
const cachedEffect = effector();
|
|
2723
|
-
|
|
2724
|
-
response.
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
return keys.reduce((result, key) => {
|
|
2735
|
-
result[key] = results[keys.indexOf(key)];
|
|
2736
|
-
return result;
|
|
2737
|
-
}, {});
|
|
2738
|
-
});
|
|
2733
|
+
Promise.all(cachedEffect).then((results) => {
|
|
2734
|
+
response.update(() => {
|
|
2735
|
+
if (Array.isArray(originalUrls))
|
|
2736
|
+
return results;
|
|
2737
|
+
if (typeof originalUrls === 'string')
|
|
2738
|
+
return results[0];
|
|
2739
|
+
const keys = Object.keys(originalUrls);
|
|
2740
|
+
return keys.reduce((result, key) => {
|
|
2741
|
+
result[key] = results[keys.indexOf(key)];
|
|
2742
|
+
return result;
|
|
2743
|
+
}, {});
|
|
2739
2744
|
});
|
|
2740
|
-
}
|
|
2741
|
-
}
|
|
2745
|
+
});
|
|
2746
|
+
});
|
|
2742
2747
|
return response.asReadonly();
|
|
2743
2748
|
});
|
|
2744
2749
|
}
|
|
@@ -2815,61 +2820,52 @@ class NgtHexify {
|
|
|
2815
2820
|
const hex = component.toString(16);
|
|
2816
2821
|
return hex.length === 1 ? '0' + hex : hex;
|
|
2817
2822
|
}
|
|
2818
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2819
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.
|
|
2823
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtHexify, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2824
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.4", ngImport: i0, type: NgtHexify, isStandalone: true, name: "hexify" }); }
|
|
2820
2825
|
}
|
|
2821
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtHexify, decorators: [{
|
|
2822
2827
|
type: Pipe,
|
|
2823
2828
|
args: [{ name: 'hexify', pure: true, standalone: true }]
|
|
2824
2829
|
}] });
|
|
2825
2830
|
|
|
2826
|
-
function injectBeforeRender(cb, { priority = 0, injector } = {}) {
|
|
2827
|
-
return assertInjector(injectBeforeRender, injector, () => {
|
|
2828
|
-
const store = injectStore();
|
|
2829
|
-
const sub = store.get('internal').subscribe(cb, priority, store);
|
|
2830
|
-
inject(DestroyRef).onDestroy(() => void sub());
|
|
2831
|
-
return sub;
|
|
2832
|
-
});
|
|
2833
|
-
}
|
|
2834
|
-
|
|
2835
2831
|
class NgtPortalBeforeRender {
|
|
2836
2832
|
constructor() {
|
|
2837
2833
|
this.portalStore = injectStore();
|
|
2838
2834
|
this.renderPriority = input(1);
|
|
2839
2835
|
this.parentScene = input.required();
|
|
2840
2836
|
this.parentCamera = input.required();
|
|
2841
|
-
|
|
2837
|
+
effect((onCleanup) => {
|
|
2842
2838
|
// track state
|
|
2843
|
-
this.portalStore.state();
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
if (this.renderPriority() === 1) {
|
|
2839
|
+
const [renderPriority, { internal }] = [this.renderPriority(), this.portalStore.state()];
|
|
2840
|
+
let oldClean;
|
|
2841
|
+
const cleanup = internal.subscribe(({ gl, scene, camera }) => {
|
|
2842
|
+
const [parentScene, parentCamera] = [untracked(this.parentScene), untracked(this.parentCamera)];
|
|
2843
|
+
oldClean = gl.autoClear;
|
|
2844
|
+
if (renderPriority === 1) {
|
|
2850
2845
|
// clear scene and render with default
|
|
2851
2846
|
gl.autoClear = true;
|
|
2852
|
-
gl.render(
|
|
2847
|
+
gl.render(parentScene, parentCamera);
|
|
2853
2848
|
}
|
|
2854
2849
|
// disable cleaning
|
|
2855
2850
|
gl.autoClear = false;
|
|
2856
2851
|
gl.clearDepth();
|
|
2857
2852
|
gl.render(scene, camera);
|
|
2858
2853
|
// restore
|
|
2859
|
-
gl.autoClear =
|
|
2860
|
-
},
|
|
2854
|
+
gl.autoClear = oldClean;
|
|
2855
|
+
}, renderPriority, this.portalStore);
|
|
2856
|
+
onCleanup(() => cleanup());
|
|
2861
2857
|
});
|
|
2862
2858
|
}
|
|
2863
2859
|
onPointerOver() {
|
|
2864
2860
|
/* noop */
|
|
2865
2861
|
}
|
|
2866
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2867
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.
|
|
2862
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtPortalBeforeRender, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2863
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.4", type: NgtPortalBeforeRender, isStandalone: true, selector: "ngt-portal-before-render", inputs: { renderPriority: { classPropertyName: "renderPriority", publicName: "renderPriority", isSignal: true, isRequired: false, transformFunction: null }, parentScene: { classPropertyName: "parentScene", publicName: "parentScene", isSignal: true, isRequired: true, transformFunction: null }, parentCamera: { classPropertyName: "parentCamera", publicName: "parentCamera", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
2868
2864
|
<!-- Without an element that receives pointer events state.pointer will always be 0/0 -->
|
|
2869
2865
|
<ngt-group (pointerover)="onPointerOver()" attach="none" />
|
|
2870
2866
|
`, isInline: true }); }
|
|
2871
2867
|
}
|
|
2872
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2868
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtPortalBeforeRender, decorators: [{
|
|
2873
2869
|
type: Component,
|
|
2874
2870
|
args: [{
|
|
2875
2871
|
selector: 'ngt-portal-before-render',
|
|
@@ -2894,10 +2890,10 @@ class NgtPortalContent {
|
|
|
2894
2890
|
static ngTemplateContextGuard(_, ctx) {
|
|
2895
2891
|
return true;
|
|
2896
2892
|
}
|
|
2897
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2898
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.
|
|
2893
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtPortalContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2894
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: NgtPortalContent, isStandalone: true, selector: "ng-template[portalContent]", ngImport: i0 }); }
|
|
2899
2895
|
}
|
|
2900
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtPortalContent, decorators: [{
|
|
2901
2897
|
type: Directive,
|
|
2902
2898
|
args: [{ selector: 'ng-template[portalContent]', standalone: true }]
|
|
2903
2899
|
}], ctorParameters: () => [] });
|
|
@@ -2933,8 +2929,8 @@ class NgtPortal {
|
|
|
2933
2929
|
this.pointer = new Vector2();
|
|
2934
2930
|
this.portalRendered = signal(false);
|
|
2935
2931
|
this.renderAutoBeforeRender = computed(() => this.portalRendered() && this.autoRender());
|
|
2936
|
-
const autoEffect = injectAutoEffect();
|
|
2937
2932
|
const parentState = this.parentStore.select();
|
|
2933
|
+
// NOTE: we run this in afterNextRender for inputs to resolve
|
|
2938
2934
|
afterNextRender(() => {
|
|
2939
2935
|
const previousState = this.parentStore.snapshot;
|
|
2940
2936
|
const { events = {}, size = {}, ...rest } = this.state();
|
|
@@ -2957,7 +2953,7 @@ class NgtPortal {
|
|
|
2957
2953
|
...rest,
|
|
2958
2954
|
setEvents: (events) => this.portalStore.update((state) => ({ ...state, events: { ...state.events, ...events } })),
|
|
2959
2955
|
});
|
|
2960
|
-
|
|
2956
|
+
effect(() => {
|
|
2961
2957
|
const state = this.state();
|
|
2962
2958
|
const _parentState = parentState();
|
|
2963
2959
|
this.portalStore.update((prev) => this.inject(_parentState, prev, state, untracked(this.container)));
|
|
@@ -2970,7 +2966,7 @@ class NgtPortal {
|
|
|
2970
2966
|
this.portalView.detectChanges();
|
|
2971
2967
|
this.portalRendered.set(true);
|
|
2972
2968
|
});
|
|
2973
|
-
});
|
|
2969
|
+
}, { injector: this.injector });
|
|
2974
2970
|
});
|
|
2975
2971
|
inject(DestroyRef).onDestroy(() => {
|
|
2976
2972
|
this.portalView?.destroy();
|
|
@@ -3007,8 +3003,8 @@ class NgtPortal {
|
|
|
3007
3003
|
...rest,
|
|
3008
3004
|
};
|
|
3009
3005
|
}
|
|
3010
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
3011
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
3006
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtPortal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3007
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.4", type: NgtPortal, isStandalone: true, selector: "ngt-portal", inputs: { container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: true, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, autoRender: { classPropertyName: "autoRender", publicName: "autoRender", isSignal: true, isRequired: false, transformFunction: null }, autoRenderPriority: { classPropertyName: "autoRenderPriority", publicName: "autoRenderPriority", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideStore(() => signalStore({}))], queries: [{ propertyName: "portalContent", first: true, predicate: NgtPortalContent, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "portalAnchor", first: true, predicate: ["anchor"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: `
|
|
3012
3008
|
<ng-container #anchor />
|
|
3013
3009
|
|
|
3014
3010
|
@if (renderAutoBeforeRender()) {
|
|
@@ -3020,7 +3016,7 @@ class NgtPortal {
|
|
|
3020
3016
|
}
|
|
3021
3017
|
`, isInline: true, dependencies: [{ kind: "component", type: NgtPortalBeforeRender, selector: "ngt-portal-before-render", inputs: ["renderPriority", "parentScene", "parentCamera"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3022
3018
|
}
|
|
3023
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
3019
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtPortal, decorators: [{
|
|
3024
3020
|
type: Component,
|
|
3025
3021
|
args: [{
|
|
3026
3022
|
selector: 'ngt-portal',
|
|
@@ -3043,6 +3039,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
3043
3039
|
}]
|
|
3044
3040
|
}], ctorParameters: () => [] });
|
|
3045
3041
|
|
|
3042
|
+
function injectBeforeRender(cb, { priority = 0, injector } = {}) {
|
|
3043
|
+
return assertInjector(injectBeforeRender, injector, () => {
|
|
3044
|
+
const store = injectStore();
|
|
3045
|
+
const sub = store.get('internal').subscribe(cb, priority, store);
|
|
3046
|
+
inject(DestroyRef).onDestroy(() => void sub());
|
|
3047
|
+
return sub;
|
|
3048
|
+
});
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3046
3051
|
function resolveRef(ref) {
|
|
3047
3052
|
if (is.ref(ref)) {
|
|
3048
3053
|
return ref.nativeElement;
|
|
@@ -3067,32 +3072,29 @@ class NgtObjectEvents {
|
|
|
3067
3072
|
this.wheel = output();
|
|
3068
3073
|
// NOTE: we use model here to allow for the hostDirective host to set this value
|
|
3069
3074
|
this.ngtObjectEvents = model();
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
pointercancel: this.emitEvent('pointercancel'),
|
|
3085
|
-
wheel: this.emitEvent('wheel'),
|
|
3086
|
-
}, { injector });
|
|
3075
|
+
injectObjectEvents(this.ngtObjectEvents, {
|
|
3076
|
+
click: this.emitEvent('click'),
|
|
3077
|
+
dblclick: this.emitEvent('dblclick'),
|
|
3078
|
+
contextmenu: this.emitEvent('contextmenu'),
|
|
3079
|
+
pointerup: this.emitEvent('pointerup'),
|
|
3080
|
+
pointerdown: this.emitEvent('pointerdown'),
|
|
3081
|
+
pointerover: this.emitEvent('pointerover'),
|
|
3082
|
+
pointerout: this.emitEvent('pointerout'),
|
|
3083
|
+
pointerenter: this.emitEvent('pointerenter'),
|
|
3084
|
+
pointerleave: this.emitEvent('pointerleave'),
|
|
3085
|
+
pointermove: this.emitEvent('pointermove'),
|
|
3086
|
+
pointermissed: this.emitEvent('pointermissed'),
|
|
3087
|
+
pointercancel: this.emitEvent('pointercancel'),
|
|
3088
|
+
wheel: this.emitEvent('wheel'),
|
|
3087
3089
|
});
|
|
3088
3090
|
}
|
|
3089
3091
|
emitEvent(eventName) {
|
|
3090
3092
|
return this[eventName].emit.bind(this[eventName]);
|
|
3091
3093
|
}
|
|
3092
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
3093
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
3094
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtObjectEvents, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3095
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.4", type: NgtObjectEvents, isStandalone: true, selector: "[ngtObjectEvents]", inputs: { ngtObjectEvents: { classPropertyName: "ngtObjectEvents", publicName: "ngtObjectEvents", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click", dblclick: "dblclick", contextmenu: "contextmenu", pointerup: "pointerup", pointerdown: "pointerdown", pointerover: "pointerover", pointerout: "pointerout", pointerenter: "pointerenter", pointerleave: "pointerleave", pointermove: "pointermove", pointermissed: "pointermissed", pointercancel: "pointercancel", wheel: "wheel", ngtObjectEvents: "ngtObjectEventsChange" }, ngImport: i0 }); }
|
|
3094
3096
|
}
|
|
3095
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
3097
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtObjectEvents, decorators: [{
|
|
3096
3098
|
type: Directive,
|
|
3097
3099
|
args: [{ standalone: true, selector: '[ngtObjectEvents]' }]
|
|
3098
3100
|
}], ctorParameters: () => [] });
|