angular-three 1.2.4 → 1.3.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/esm2020/lib/canvas.mjs +3 -3
- package/esm2020/lib/directives/args.mjs +3 -3
- package/esm2020/lib/directives/repeat.mjs +3 -3
- package/esm2020/lib/pipes/push.mjs +3 -3
- package/esm2020/lib/portal.mjs +9 -9
- package/esm2020/lib/renderer/provider.mjs +4 -4
- package/esm2020/lib/renderer/renderer.mjs +5 -5
- package/esm2020/lib/stores/rx-store.mjs +3 -3
- package/esm2020/lib/stores/store.mjs +3 -3
- package/esm2020/lib/types.mjs +1 -1
- package/fesm2015/angular-three.mjs +34 -34
- package/fesm2015/angular-three.mjs.map +1 -1
- package/fesm2020/angular-three.mjs +34 -34
- package/fesm2020/angular-three.mjs.map +1 -1
- package/lib/renderer/provider.d.ts +2 -19
- package/lib/types.d.ts +1 -0
- package/package.json +2 -2
- package/plugin/package.json +2 -2
- package/plugin/src/generators/init/init.d.ts +2 -2
- package/plugin/src/generators/init/init.js +2 -2
- package/plugin/src/generators/init/init.js.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ElementRef, Injectable, inject, InjectionToken, ViewContainerRef, TemplateRef, Directive, Input, EventEmitter, getDebugNode, RendererFactory2, ChangeDetectorRef, EnvironmentInjector, createEnvironmentInjector, Component, HostBinding, Output, ViewChild, Pipe, SkipSelf, ContentChild } from '@angular/core';
|
|
2
|
+
import { ElementRef, Injectable, inject, InjectionToken, ViewContainerRef, TemplateRef, Directive, Input, EventEmitter, getDebugNode, RendererFactory2, ChangeDetectorRef, makeEnvironmentProviders, EnvironmentInjector, createEnvironmentInjector, Component, HostBinding, Output, ViewChild, Pipe, SkipSelf, ContentChild } from '@angular/core';
|
|
3
3
|
import { provideNgxResizeOptions, NgxResize } from 'ngx-resize';
|
|
4
4
|
import { isObservable, of, map, from, tap, retry, catchError, share, ReplaySubject, switchMap, forkJoin, take, BehaviorSubject, startWith, filter, distinctUntilChanged, takeUntil, merge } from 'rxjs';
|
|
5
5
|
import * as THREE from 'three';
|
|
@@ -547,9 +547,9 @@ class NgtRxStore extends RxState {
|
|
|
547
547
|
return this.hold(obs.pipe(tapEffect(sideEffectFn)));
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
NgtRxStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.
|
|
551
|
-
NgtRxStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.
|
|
552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.
|
|
550
|
+
NgtRxStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtRxStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
551
|
+
NgtRxStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtRxStore });
|
|
552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtRxStore, decorators: [{
|
|
553
553
|
type: Injectable
|
|
554
554
|
}], ctorParameters: function () { return []; } });
|
|
555
555
|
|
|
@@ -898,9 +898,9 @@ class NgtStore extends NgtRxStore {
|
|
|
898
898
|
this.hold(this.select(), () => invalidate(this));
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
|
-
NgtStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.
|
|
902
|
-
NgtStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.
|
|
903
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.
|
|
901
|
+
NgtStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtStore, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
902
|
+
NgtStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtStore });
|
|
903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtStore, decorators: [{
|
|
904
904
|
type: Injectable
|
|
905
905
|
}] });
|
|
906
906
|
function computeInitialSize(canvas, defaultSize) {
|
|
@@ -961,9 +961,9 @@ class NgtArgs {
|
|
|
961
961
|
this.view.detectChanges();
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
|
-
NgtArgs.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.
|
|
965
|
-
NgtArgs.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.
|
|
966
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.
|
|
964
|
+
NgtArgs.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtArgs, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
965
|
+
NgtArgs.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.3", type: NgtArgs, isStandalone: true, selector: "[args]", inputs: { args: "args" }, ngImport: i0 });
|
|
966
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtArgs, decorators: [{
|
|
967
967
|
type: Directive,
|
|
968
968
|
args: [{ selector: '[args]', standalone: true }]
|
|
969
969
|
}], ctorParameters: function () { return []; }, propDecorators: { args: [{
|
|
@@ -1912,9 +1912,9 @@ class NgtRendererFactory {
|
|
|
1912
1912
|
return renderer;
|
|
1913
1913
|
}
|
|
1914
1914
|
}
|
|
1915
|
-
NgtRendererFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.
|
|
1916
|
-
NgtRendererFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.
|
|
1917
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.
|
|
1915
|
+
NgtRendererFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtRendererFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1916
|
+
NgtRendererFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtRendererFactory });
|
|
1917
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtRendererFactory, decorators: [{
|
|
1918
1918
|
type: Injectable
|
|
1919
1919
|
}] });
|
|
1920
1920
|
class NgtRenderer {
|
|
@@ -2081,7 +2081,7 @@ class NgtRenderer {
|
|
|
2081
2081
|
// refChild: NgtRendererNode
|
|
2082
2082
|
// isMove?: boolean | undefined
|
|
2083
2083
|
) {
|
|
2084
|
-
if (!parent.__ngt_renderer__)
|
|
2084
|
+
if (!parent.__ngt_renderer__ || parent === newChild)
|
|
2085
2085
|
return;
|
|
2086
2086
|
this.appendChild(parent, newChild);
|
|
2087
2087
|
}
|
|
@@ -2183,12 +2183,12 @@ function provideNgtRenderer({ store, changeDetectorRef, compoundPrefixes = [] })
|
|
|
2183
2183
|
if (!compoundPrefixes.includes('ngtp')) {
|
|
2184
2184
|
compoundPrefixes.push('ngtp');
|
|
2185
2185
|
}
|
|
2186
|
-
return [
|
|
2186
|
+
return makeEnvironmentProviders([
|
|
2187
2187
|
{ provide: RendererFactory2, useClass: NgtRendererFactory },
|
|
2188
2188
|
{ provide: NgtStore, useValue: store },
|
|
2189
2189
|
{ provide: ChangeDetectorRef, useValue: changeDetectorRef },
|
|
2190
2190
|
{ provide: NGT_COMPOUND_PREFIXES, useValue: compoundPrefixes },
|
|
2191
|
-
];
|
|
2191
|
+
]);
|
|
2192
2192
|
}
|
|
2193
2193
|
|
|
2194
2194
|
const DOM_EVENTS = {
|
|
@@ -2417,13 +2417,13 @@ class NgtCanvas extends NgtRxStore {
|
|
|
2417
2417
|
};
|
|
2418
2418
|
}
|
|
2419
2419
|
}
|
|
2420
|
-
NgtCanvas.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.
|
|
2421
|
-
NgtCanvas.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.
|
|
2420
|
+
NgtCanvas.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtCanvas, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2421
|
+
NgtCanvas.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtCanvas, isStandalone: true, selector: "ngt-canvas", inputs: { sceneGraph: "sceneGraph", compoundPrefixes: "compoundPrefixes", linear: "linear", legacy: "legacy", flat: "flat", orthographic: "orthographic", frameloop: "frameloop", dpr: "dpr", raycaster: "raycaster", shadows: "shadows", camera: "camera", gl: "gl", eventSource: "eventSource", eventPrefix: "eventPrefix", lookAt: "lookAt", performance: "performance" }, outputs: { created: "created", pointerMissed: "pointerMissed" }, host: { properties: { "class.ngt-canvas": "this.hostClass", "style.pointerEvents": "this.pointerEvents" } }, providers: [NgtStore, provideNgxResizeOptions({ emitInZone: false })], viewQueries: [{ propertyName: "glCanvas", first: true, predicate: ["glCanvas"], descendants: true, static: true }, { propertyName: "glAnchor", first: true, predicate: ["glCanvas"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
2422
2422
|
<div (ngxResize)="onResize($event)" style="height: 100%; width: 100%;">
|
|
2423
2423
|
<canvas #glCanvas style="display: block;"></canvas>
|
|
2424
2424
|
</div>
|
|
2425
2425
|
`, isInline: true, styles: [":host{display:block;position:relative;width:100%;height:100%;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgxResize, selector: "[ngxResize]", inputs: ["ngxResizeOptions"], outputs: ["ngxResize"] }] });
|
|
2426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.
|
|
2426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtCanvas, decorators: [{
|
|
2427
2427
|
type: Component,
|
|
2428
2428
|
args: [{ selector: 'ngt-canvas', standalone: true, template: `
|
|
2429
2429
|
<div (ngxResize)="onResize($event)" style="height: 100%; width: 100%;">
|
|
@@ -2581,9 +2581,9 @@ class NgtRepeat extends NgForOf {
|
|
|
2581
2581
|
this.ngForOf = Number.isInteger(count) ? Array.from({ length: count }, (_, i) => i) : [];
|
|
2582
2582
|
}
|
|
2583
2583
|
}
|
|
2584
|
-
NgtRepeat.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.
|
|
2585
|
-
NgtRepeat.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.
|
|
2586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.
|
|
2584
|
+
NgtRepeat.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtRepeat, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2585
|
+
NgtRepeat.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.3", type: NgtRepeat, isStandalone: true, selector: "[ngFor][ngForRepeat]", inputs: { ngForRepeat: "ngForRepeat" }, usesInheritance: true, ngImport: i0 });
|
|
2586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtRepeat, decorators: [{
|
|
2587
2587
|
type: Directive,
|
|
2588
2588
|
args: [{ selector: '[ngFor][ngForRepeat]', standalone: true }]
|
|
2589
2589
|
}], propDecorators: { ngForRepeat: [{
|
|
@@ -2634,9 +2634,9 @@ class NgtPush {
|
|
|
2634
2634
|
this.obj = undefined;
|
|
2635
2635
|
}
|
|
2636
2636
|
}
|
|
2637
|
-
NgtPush.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.
|
|
2638
|
-
NgtPush.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.
|
|
2639
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.
|
|
2637
|
+
NgtPush.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtPush, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2638
|
+
NgtPush.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.3", ngImport: i0, type: NgtPush, isStandalone: true, name: "ngtPush", pure: false });
|
|
2639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtPush, decorators: [{
|
|
2640
2640
|
type: Pipe,
|
|
2641
2641
|
args: [{ name: 'ngtPush', pure: false, standalone: true }]
|
|
2642
2642
|
}] });
|
|
@@ -2686,9 +2686,9 @@ class NgtPortalBeforeRender {
|
|
|
2686
2686
|
this.subscription?.();
|
|
2687
2687
|
}
|
|
2688
2688
|
}
|
|
2689
|
-
NgtPortalBeforeRender.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.
|
|
2690
|
-
NgtPortalBeforeRender.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.
|
|
2691
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.
|
|
2689
|
+
NgtPortalBeforeRender.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtPortalBeforeRender, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2690
|
+
NgtPortalBeforeRender.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.3", type: NgtPortalBeforeRender, isStandalone: true, selector: "ngt-portal-before-render", inputs: { renderPriority: "renderPriority", parentScene: "parentScene", parentCamera: "parentCamera" }, outputs: { beforeRender: "beforeRender" }, ngImport: i0 });
|
|
2691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtPortalBeforeRender, decorators: [{
|
|
2692
2692
|
type: Directive,
|
|
2693
2693
|
args: [{
|
|
2694
2694
|
selector: 'ngt-portal-before-render',
|
|
@@ -2712,9 +2712,9 @@ class NgtPortalContent {
|
|
|
2712
2712
|
}
|
|
2713
2713
|
}
|
|
2714
2714
|
}
|
|
2715
|
-
NgtPortalContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.
|
|
2716
|
-
NgtPortalContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.
|
|
2717
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.
|
|
2715
|
+
NgtPortalContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtPortalContent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ViewContainerRef, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2716
|
+
NgtPortalContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.3", type: NgtPortalContent, isStandalone: true, selector: "ng-template[ngtPortalContent]", ngImport: i0 });
|
|
2717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtPortalContent, decorators: [{
|
|
2718
2718
|
type: Directive,
|
|
2719
2719
|
args: [{ selector: 'ng-template[ngtPortalContent]', standalone: true }]
|
|
2720
2720
|
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ViewContainerRef, decorators: [{
|
|
@@ -2822,8 +2822,8 @@ _NgtPortal_instances = new WeakSet(), _NgtPortal_inject = function _NgtPortal_in
|
|
|
2822
2822
|
...restInputsState,
|
|
2823
2823
|
};
|
|
2824
2824
|
};
|
|
2825
|
-
NgtPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.
|
|
2826
|
-
NgtPortal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.
|
|
2825
|
+
NgtPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtPortal, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2826
|
+
NgtPortal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtPortal, isStandalone: true, selector: "ngt-portal", inputs: { container: "container", state: "state", autoRender: "autoRender", autoRenderPriority: "autoRenderPriority" }, outputs: { beforeRender: "beforeRender" }, providers: [NgtStore], queries: [{ propertyName: "portalContentTemplate", first: true, predicate: NgtPortalContent, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "portalContentAnchor", first: true, predicate: ["portalContentAnchor"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
2827
2827
|
<ng-container #portalContentAnchor>
|
|
2828
2828
|
<ngt-portal-before-render
|
|
2829
2829
|
*ngIf="autoRender && portalContentRendered"
|
|
@@ -2834,7 +2834,7 @@ NgtPortal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15
|
|
|
2834
2834
|
/>
|
|
2835
2835
|
</ng-container>
|
|
2836
2836
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgtPortalBeforeRender, selector: "ngt-portal-before-render", inputs: ["renderPriority", "parentScene", "parentCamera"], outputs: ["beforeRender"] }] });
|
|
2837
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.
|
|
2837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtPortal, decorators: [{
|
|
2838
2838
|
type: Component,
|
|
2839
2839
|
args: [{
|
|
2840
2840
|
selector: 'ngt-portal',
|