angular-three 2.13.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/angular-three-nativescript.mjs +3 -3
- package/fesm2022/angular-three-nativescript.mjs.map +1 -1
- package/fesm2022/angular-three-testing.mjs +12 -14
- package/fesm2022/angular-three-testing.mjs.map +1 -1
- package/fesm2022/angular-three.mjs +123 -106
- package/fesm2022/angular-three.mjs.map +1 -1
- package/lib/canvas.d.ts +7 -7
- package/lib/html.d.ts +2 -2
- package/lib/portal.d.ts +2 -2
- package/lib/routed-scene.d.ts +8 -2
- package/lib/utils/object-events.d.ts +0 -19
- package/package.json +4 -10
- package/plugin/src/generators/init/schema.json +8 -8
- package/testing/lib/utils/web-gl-rendering-context.d.ts +1 -1
- package/esm2022/angular-three.mjs +0 -5
- package/esm2022/index.mjs +0 -25
- package/esm2022/lib/canvas.mjs +0 -188
- package/esm2022/lib/directives/args.mjs +0 -53
- package/esm2022/lib/directives/selection.mjs +0 -69
- package/esm2022/lib/dom/events.mjs +0 -73
- package/esm2022/lib/events.mjs +0 -361
- package/esm2022/lib/html.mjs +0 -44
- package/esm2022/lib/instance.mjs +0 -83
- package/esm2022/lib/loader.mjs +0 -93
- package/esm2022/lib/loop.mjs +0 -141
- package/esm2022/lib/pipes/hexify.mjs +0 -86
- package/esm2022/lib/portal.mjs +0 -220
- package/esm2022/lib/renderer/catalogue.mjs +0 -7
- package/esm2022/lib/renderer/constants.mjs +0 -23
- package/esm2022/lib/renderer/index.mjs +0 -544
- package/esm2022/lib/renderer/state.mjs +0 -54
- package/esm2022/lib/renderer/utils.mjs +0 -223
- package/esm2022/lib/roots.mjs +0 -275
- package/esm2022/lib/routed-scene.mjs +0 -33
- package/esm2022/lib/store.mjs +0 -176
- package/esm2022/lib/three-types.mjs +0 -2
- package/esm2022/lib/types.mjs +0 -2
- package/esm2022/lib/utils/apply-props.mjs +0 -130
- package/esm2022/lib/utils/attach.mjs +0 -46
- package/esm2022/lib/utils/before-render.mjs +0 -41
- package/esm2022/lib/utils/is.mjs +0 -52
- package/esm2022/lib/utils/make.mjs +0 -52
- package/esm2022/lib/utils/object-events.mjs +0 -137
- package/esm2022/lib/utils/output-ref.mjs +0 -9
- package/esm2022/lib/utils/parameters.mjs +0 -70
- package/esm2022/lib/utils/resolve-ref.mjs +0 -8
- package/esm2022/lib/utils/signal-store.mjs +0 -90
- package/esm2022/lib/utils/update.mjs +0 -37
- package/esm2022/nativescript/angular-three-nativescript.mjs +0 -5
- package/esm2022/nativescript/index.mjs +0 -2
- package/esm2022/nativescript/lib/canvas.mjs +0 -127
- package/esm2022/testing/angular-three-testing.mjs +0 -5
- package/esm2022/testing/index.mjs +0 -3
- package/esm2022/testing/lib/test-bed.mjs +0 -130
- package/esm2022/testing/lib/test-canvas.mjs +0 -45
- package/esm2022/testing/lib/utils/mock-canvas.mjs +0 -37
- package/esm2022/testing/lib/utils/web-gl-rendering-context.mjs +0 -752
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { untracked, computed, signal, ElementRef, input, inject, ViewContainerRef, TemplateRef, effect, DestroyRef, Directive, InjectionToken, DebugNode, RendererFactory2, Injectable, makeEnvironmentProviders, Component, NgZone,
|
|
3
|
-
import {
|
|
2
|
+
import { untracked, computed, signal, ElementRef, input, inject, ViewContainerRef, TemplateRef, effect, DestroyRef, Directive, InjectionToken, DebugNode, RendererFactory2, Injectable, makeEnvironmentProviders, EnvironmentInjector, InjectFlags, runInInjectionContext, Component, NgZone, Injector, booleanAttribute, output, viewChild, afterNextRender, createEnvironmentInjector, ChangeDetectionStrategy, Pipe, CUSTOM_ELEMENTS_SCHEMA, contentChild, model, Renderer2 } from '@angular/core';
|
|
3
|
+
import { outputFromObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { provideResizeOptions, NgxResize } from 'ngxtension/resize';
|
|
5
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';
|
|
6
6
|
import { DOCUMENT } from '@angular/common';
|
|
@@ -8,7 +8,7 @@ import { Subject, filter } from 'rxjs';
|
|
|
8
8
|
import { createInjectionToken } from 'ngxtension/create-injection-token';
|
|
9
9
|
import { assertInjector } from 'ngxtension/assert-injector';
|
|
10
10
|
import * as i1 from '@angular/router';
|
|
11
|
-
import {
|
|
11
|
+
import { RouterOutlet, ActivationEnd } from '@angular/router';
|
|
12
12
|
|
|
13
13
|
const STORE_COMPUTED_KEY = '__ngt_signal_store_computed__';
|
|
14
14
|
function reducer(state) {
|
|
@@ -811,10 +811,10 @@ class NgtArgs {
|
|
|
811
811
|
this.view = this.vcr.createEmbeddedView(this.template);
|
|
812
812
|
this.view.detectChanges();
|
|
813
813
|
}
|
|
814
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
815
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
814
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtArgs, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
815
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.5", type: NgtArgs, isStandalone: true, selector: "ng-template[args]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
|
816
816
|
}
|
|
817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
817
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtArgs, decorators: [{
|
|
818
818
|
type: Directive,
|
|
819
819
|
args: [{ selector: 'ng-template[args]', standalone: true }]
|
|
820
820
|
}], ctorParameters: () => [] });
|
|
@@ -961,6 +961,8 @@ const [injectLoop] = createInjectionToken(() => createLoop(roots));
|
|
|
961
961
|
|
|
962
962
|
function storeFactory(previousStore) {
|
|
963
963
|
const loop = injectLoop();
|
|
964
|
+
const document = inject(DOCUMENT);
|
|
965
|
+
const window = document.defaultView || undefined;
|
|
964
966
|
// NOTE: using Subject because we do not care about late-subscribers
|
|
965
967
|
const pointerMissed$ = new Subject();
|
|
966
968
|
const store = signalStore(({ get, update }) => {
|
|
@@ -1021,8 +1023,8 @@ function storeFactory(previousStore) {
|
|
|
1021
1023
|
},
|
|
1022
1024
|
size: { width: 0, height: 0, top: 0, left: 0, updateStyle: false },
|
|
1023
1025
|
viewport: {
|
|
1024
|
-
initialDpr:
|
|
1025
|
-
dpr:
|
|
1026
|
+
initialDpr: window?.devicePixelRatio || 1,
|
|
1027
|
+
dpr: window?.devicePixelRatio || 1,
|
|
1026
1028
|
width: 0,
|
|
1027
1029
|
height: 0,
|
|
1028
1030
|
top: 0,
|
|
@@ -1603,10 +1605,10 @@ class NgtRendererFactory {
|
|
|
1603
1605
|
}
|
|
1604
1606
|
return renderer;
|
|
1605
1607
|
}
|
|
1606
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1607
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1608
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtRendererFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1609
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtRendererFactory }); }
|
|
1608
1610
|
}
|
|
1609
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1611
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtRendererFactory, decorators: [{
|
|
1610
1612
|
type: Injectable
|
|
1611
1613
|
}] });
|
|
1612
1614
|
class NgtRenderer {
|
|
@@ -1792,6 +1794,10 @@ class NgtRenderer {
|
|
|
1792
1794
|
if (cRS[0 /* NgtRendererClassId.type */] === 'three') {
|
|
1793
1795
|
removeThreeChild(oldChild, undefined, true);
|
|
1794
1796
|
}
|
|
1797
|
+
// if the child is the root scene, we don't want to destroy it
|
|
1798
|
+
if (is.scene(oldChild) && oldChild.name === '__ngt_root_scene__')
|
|
1799
|
+
return;
|
|
1800
|
+
// otherwise, we'll destroy it
|
|
1795
1801
|
this.destroyInternal(oldChild, undefined);
|
|
1796
1802
|
}
|
|
1797
1803
|
return;
|
|
@@ -2168,7 +2174,7 @@ function injectCanvasRootInitializer(injector) {
|
|
|
2168
2174
|
if (!state.camera || (state.camera === lastCamera && !is.equ(lastCamera, cameraOptions, shallowLoose))) {
|
|
2169
2175
|
lastCamera = cameraOptions;
|
|
2170
2176
|
const isCamera = is.camera(cameraOptions);
|
|
2171
|
-
let camera = isCamera ? cameraOptions : makeCameraInstance(orthographic, state.size);
|
|
2177
|
+
let camera = isCamera ? cameraOptions : makeCameraInstance(orthographic, sizeOptions ?? state.size);
|
|
2172
2178
|
if (!isCamera) {
|
|
2173
2179
|
camera.position.z = 5;
|
|
2174
2180
|
if (cameraOptions) {
|
|
@@ -2213,6 +2219,7 @@ function injectCanvasRootInitializer(injector) {
|
|
|
2213
2219
|
applyProps(scene, sceneOptions);
|
|
2214
2220
|
}
|
|
2215
2221
|
applyProps(scene, {
|
|
2222
|
+
name: '__ngt_root_scene__',
|
|
2216
2223
|
setAttribute: (name, value) => {
|
|
2217
2224
|
if (canvas instanceof HTMLCanvasElement) {
|
|
2218
2225
|
if (canvas.parentElement) {
|
|
@@ -2311,7 +2318,7 @@ function injectCanvasRootInitializer(injector) {
|
|
|
2311
2318
|
if (gl.setClearAlpha) {
|
|
2312
2319
|
gl.setClearAlpha(0);
|
|
2313
2320
|
}
|
|
2314
|
-
gl.setPixelRatio(makeDpr(state.viewport.dpr
|
|
2321
|
+
gl.setPixelRatio(makeDpr(state.viewport.dpr));
|
|
2315
2322
|
gl.setSize(sizeOptions?.width ?? state.size.width, sizeOptions?.height ?? state.size.height);
|
|
2316
2323
|
if (is.obj(glOptions) &&
|
|
2317
2324
|
!(typeof glOptions === 'function') &&
|
|
@@ -2347,9 +2354,8 @@ function injectCanvasRootInitializer(injector) {
|
|
|
2347
2354
|
});
|
|
2348
2355
|
}
|
|
2349
2356
|
function computeInitialSize(canvas, defaultSize) {
|
|
2350
|
-
if (defaultSize)
|
|
2357
|
+
if (defaultSize)
|
|
2351
2358
|
return defaultSize;
|
|
2352
|
-
}
|
|
2353
2359
|
if (typeof HTMLCanvasElement !== 'undefined' && canvas instanceof HTMLCanvasElement && canvas.parentElement) {
|
|
2354
2360
|
return canvas.parentElement.getBoundingClientRect();
|
|
2355
2361
|
}
|
|
@@ -2369,28 +2375,90 @@ function dispose(obj) {
|
|
|
2369
2375
|
}
|
|
2370
2376
|
|
|
2371
2377
|
var _a$1;
|
|
2378
|
+
/**
|
|
2379
|
+
* This is a custom EnvironmentInjector that returns the RendererFactory2 from the `ngtEnvironmentInjector`
|
|
2380
|
+
* for `NgtRendererFactory`
|
|
2381
|
+
*/
|
|
2382
|
+
class NgtOutletEnvironmentInjector extends EnvironmentInjector {
|
|
2383
|
+
constructor(routeEnvInjector, ngtEnvInjector) {
|
|
2384
|
+
super();
|
|
2385
|
+
this.routeEnvInjector = routeEnvInjector;
|
|
2386
|
+
this.ngtEnvInjector = ngtEnvInjector;
|
|
2387
|
+
}
|
|
2388
|
+
get(token, notFoundValue, flags = InjectFlags.Default) {
|
|
2389
|
+
const options = {};
|
|
2390
|
+
if (typeof flags === 'object') {
|
|
2391
|
+
Object.assign(options, flags);
|
|
2392
|
+
}
|
|
2393
|
+
else {
|
|
2394
|
+
Object.assign(options, {
|
|
2395
|
+
optional: !!(flags & InjectFlags.Optional),
|
|
2396
|
+
host: !!(flags & InjectFlags.Host),
|
|
2397
|
+
self: !!(flags & InjectFlags.Self),
|
|
2398
|
+
skipSelf: !!(flags & InjectFlags.SkipSelf),
|
|
2399
|
+
});
|
|
2400
|
+
}
|
|
2401
|
+
if (token === RendererFactory2) {
|
|
2402
|
+
return this.ngtEnvInjector.get(token, notFoundValue, options);
|
|
2403
|
+
}
|
|
2404
|
+
return this.routeEnvInjector.get(token, notFoundValue, options);
|
|
2405
|
+
}
|
|
2406
|
+
runInContext(fn) {
|
|
2407
|
+
try {
|
|
2408
|
+
return runInInjectionContext(this.routeEnvInjector, fn);
|
|
2409
|
+
}
|
|
2410
|
+
catch { }
|
|
2411
|
+
return runInInjectionContext(this.ngtEnvInjector, fn);
|
|
2412
|
+
}
|
|
2413
|
+
destroy() {
|
|
2414
|
+
this.routeEnvInjector.destroy();
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
/**
|
|
2418
|
+
* This is a custom RouterOutlet that modifies `activateWith` to inherit the `EnvironmentInjector`
|
|
2419
|
+
* that contains the custom `NgtRendererFactory`.
|
|
2420
|
+
*
|
|
2421
|
+
* Use this with extreme caution.
|
|
2422
|
+
*/
|
|
2423
|
+
class NgtRouterOutlet extends RouterOutlet {
|
|
2424
|
+
constructor() {
|
|
2425
|
+
super(...arguments);
|
|
2426
|
+
this.environmentInjector = inject(EnvironmentInjector);
|
|
2427
|
+
}
|
|
2428
|
+
activateWith(activatedRoute, environmentInjector) {
|
|
2429
|
+
return super.activateWith(activatedRoute, new NgtOutletEnvironmentInjector(environmentInjector, this.environmentInjector));
|
|
2430
|
+
}
|
|
2431
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtRouterOutlet, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2432
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: NgtRouterOutlet, isStandalone: true, selector: "ngt-router-outlet", usesInheritance: true, ngImport: i0 }); }
|
|
2433
|
+
}
|
|
2434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtRouterOutlet, decorators: [{
|
|
2435
|
+
type: Directive,
|
|
2436
|
+
args: [{ selector: 'ngt-router-outlet' }]
|
|
2437
|
+
}] });
|
|
2372
2438
|
class NgtRoutedScene {
|
|
2373
2439
|
static { _a$1 = ROUTED_SCENE; }
|
|
2374
2440
|
static { this[_a$1] = true; }
|
|
2375
2441
|
constructor(router, cdr) {
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2442
|
+
effect((onCleanup) => {
|
|
2443
|
+
const sub = router.events
|
|
2444
|
+
.pipe(filter((event) => event instanceof ActivationEnd))
|
|
2445
|
+
.subscribe(cdr.detectChanges.bind(cdr));
|
|
2446
|
+
onCleanup(() => sub.unsubscribe());
|
|
2447
|
+
});
|
|
2379
2448
|
}
|
|
2380
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2381
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2382
|
-
<router-outlet />
|
|
2383
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
2449
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtRoutedScene, deps: [{ token: i1.Router }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2450
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: NgtRoutedScene, isStandalone: true, selector: "ngt-routed-scene", ngImport: i0, template: `
|
|
2451
|
+
<ngt-router-outlet />
|
|
2452
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtRouterOutlet, selector: "ngt-router-outlet" }] }); }
|
|
2384
2453
|
}
|
|
2385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtRoutedScene, decorators: [{
|
|
2386
2455
|
type: Component,
|
|
2387
2456
|
args: [{
|
|
2388
|
-
standalone: true,
|
|
2389
2457
|
selector: 'ngt-routed-scene',
|
|
2390
2458
|
template: `
|
|
2391
|
-
<router-outlet />
|
|
2459
|
+
<ngt-router-outlet />
|
|
2392
2460
|
`,
|
|
2393
|
-
imports: [
|
|
2461
|
+
imports: [NgtRouterOutlet],
|
|
2394
2462
|
}]
|
|
2395
2463
|
}], ctorParameters: () => [{ type: i1.Router }, { type: i0.ChangeDetectorRef }] });
|
|
2396
2464
|
|
|
@@ -2404,10 +2472,8 @@ class NgtCanvas {
|
|
|
2404
2472
|
this.injector = inject(Injector);
|
|
2405
2473
|
this.sceneGraph = input.required({
|
|
2406
2474
|
transform: (value) => {
|
|
2407
|
-
if (value === 'routed')
|
|
2408
|
-
console.warn(`[NGT] 'routed' sceneGraph is not working properly.`);
|
|
2475
|
+
if (value === 'routed')
|
|
2409
2476
|
return NgtRoutedScene;
|
|
2410
|
-
}
|
|
2411
2477
|
return value;
|
|
2412
2478
|
},
|
|
2413
2479
|
});
|
|
@@ -2531,8 +2597,8 @@ class NgtCanvas {
|
|
|
2531
2597
|
});
|
|
2532
2598
|
this.glRef.changeDetectorRef.detectChanges();
|
|
2533
2599
|
}
|
|
2534
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2535
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
2600
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtCanvas, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2601
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.5", 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: [
|
|
2536
2602
|
provideResizeOptions({
|
|
2537
2603
|
emitInZone: false,
|
|
2538
2604
|
emitInitialResult: true,
|
|
@@ -2545,11 +2611,10 @@ class NgtCanvas {
|
|
|
2545
2611
|
</div>
|
|
2546
2612
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgxResize, selector: "[ngxResize]", inputs: ["ngxResizeOptions"], outputs: ["ngxResize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2547
2613
|
}
|
|
2548
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2614
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtCanvas, decorators: [{
|
|
2549
2615
|
type: Component,
|
|
2550
2616
|
args: [{
|
|
2551
2617
|
selector: 'ngt-canvas',
|
|
2552
|
-
standalone: true,
|
|
2553
2618
|
template: `
|
|
2554
2619
|
<div (ngxResize)="resizeResult.set($event)" style="height: 100%; width: 100%;">
|
|
2555
2620
|
<canvas #glCanvas style="display: block;"></canvas>
|
|
@@ -2583,10 +2648,10 @@ class NgtSelection {
|
|
|
2583
2648
|
return;
|
|
2584
2649
|
this.source.update(...args);
|
|
2585
2650
|
}
|
|
2586
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2587
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
2651
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtSelection, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2652
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.5", type: NgtSelection, isStandalone: true, selector: "[ngtSelection]", inputs: { enabled: { classPropertyName: "enabled", publicName: "ngtSelection", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
2588
2653
|
}
|
|
2589
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtSelection, decorators: [{
|
|
2590
2655
|
type: Directive,
|
|
2591
2656
|
args: [{ standalone: true, selector: '[ngtSelection]' }]
|
|
2592
2657
|
}] });
|
|
@@ -2630,10 +2695,10 @@ class NgtSelect {
|
|
|
2630
2695
|
});
|
|
2631
2696
|
}, { allowSignalWrites: true });
|
|
2632
2697
|
}
|
|
2633
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2634
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
2698
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2699
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.5", 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 }); }
|
|
2635
2700
|
}
|
|
2636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtSelect, decorators: [{
|
|
2637
2702
|
type: Directive,
|
|
2638
2703
|
args: [{ standalone: true, selector: 'ngt-group[ngtSelect], ngt-mesh[ngtSelect]' }]
|
|
2639
2704
|
}], ctorParameters: () => [] });
|
|
@@ -2670,10 +2735,10 @@ class NgtHTML {
|
|
|
2670
2735
|
delete this.host.nativeElement[DOM_PARENT];
|
|
2671
2736
|
});
|
|
2672
2737
|
}
|
|
2673
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2674
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2738
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtHTML, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2739
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: NgtHTML, isStandalone: true, ngImport: i0 }); }
|
|
2675
2740
|
}
|
|
2676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2741
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtHTML, decorators: [{
|
|
2677
2742
|
type: Directive
|
|
2678
2743
|
}], ctorParameters: () => [] });
|
|
2679
2744
|
|
|
@@ -2842,10 +2907,10 @@ class NgtHexify {
|
|
|
2842
2907
|
const hex = component.toString(16);
|
|
2843
2908
|
return hex.length === 1 ? '0' + hex : hex;
|
|
2844
2909
|
}
|
|
2845
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2846
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2910
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtHexify, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2911
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgtHexify, isStandalone: true, name: "hexify" }); }
|
|
2847
2912
|
}
|
|
2848
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtHexify, decorators: [{
|
|
2849
2914
|
type: Pipe,
|
|
2850
2915
|
args: [{ name: 'hexify', pure: true, standalone: true }]
|
|
2851
2916
|
}] });
|
|
@@ -2881,13 +2946,13 @@ class NgtPortalBeforeRender {
|
|
|
2881
2946
|
onPointerOver() {
|
|
2882
2947
|
/* noop */
|
|
2883
2948
|
}
|
|
2884
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2885
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
2949
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtPortalBeforeRender, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2950
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.5", 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: `
|
|
2886
2951
|
<!-- Without an element that receives pointer events state.pointer will always be 0/0 -->
|
|
2887
2952
|
<ngt-group (pointerover)="onPointerOver()" attach="none" />
|
|
2888
2953
|
`, isInline: true }); }
|
|
2889
2954
|
}
|
|
2890
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtPortalBeforeRender, decorators: [{
|
|
2891
2956
|
type: Component,
|
|
2892
2957
|
args: [{
|
|
2893
2958
|
selector: 'ngt-portal-before-render',
|
|
@@ -2912,10 +2977,10 @@ class NgtPortalContent {
|
|
|
2912
2977
|
static ngTemplateContextGuard(_, ctx) {
|
|
2913
2978
|
return true;
|
|
2914
2979
|
}
|
|
2915
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2916
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2980
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtPortalContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2981
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: NgtPortalContent, isStandalone: true, selector: "ng-template[portalContent]", ngImport: i0 }); }
|
|
2917
2982
|
}
|
|
2918
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2983
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtPortalContent, decorators: [{
|
|
2919
2984
|
type: Directive,
|
|
2920
2985
|
args: [{ selector: 'ng-template[portalContent]', standalone: true }]
|
|
2921
2986
|
}], ctorParameters: () => [] });
|
|
@@ -3025,8 +3090,8 @@ class NgtPortal {
|
|
|
3025
3090
|
...rest,
|
|
3026
3091
|
};
|
|
3027
3092
|
}
|
|
3028
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3029
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3093
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtPortal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3094
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", 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: `
|
|
3030
3095
|
<ng-container #anchor />
|
|
3031
3096
|
|
|
3032
3097
|
@if (shouldAutoRender()) {
|
|
@@ -3038,11 +3103,10 @@ class NgtPortal {
|
|
|
3038
3103
|
}
|
|
3039
3104
|
`, isInline: true, dependencies: [{ kind: "component", type: NgtPortalBeforeRender, selector: "ngt-portal-before-render", inputs: ["renderPriority", "parentScene", "parentCamera"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3040
3105
|
}
|
|
3041
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtPortal, decorators: [{
|
|
3042
3107
|
type: Component,
|
|
3043
3108
|
args: [{
|
|
3044
3109
|
selector: 'ngt-portal',
|
|
3045
|
-
standalone: true,
|
|
3046
3110
|
template: `
|
|
3047
3111
|
<ng-container #anchor />
|
|
3048
3112
|
|
|
@@ -3163,60 +3227,13 @@ class NgtObjectEvents {
|
|
|
3163
3227
|
emitEvent(eventName) {
|
|
3164
3228
|
return this[eventName].emit.bind(this[eventName]);
|
|
3165
3229
|
}
|
|
3166
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3167
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
3230
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtObjectEvents, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3231
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.5", 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 }); }
|
|
3168
3232
|
}
|
|
3169
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgtObjectEvents, decorators: [{
|
|
3170
3234
|
type: Directive,
|
|
3171
3235
|
args: [{ standalone: true, selector: '[ngtObjectEvents]' }]
|
|
3172
3236
|
}], ctorParameters: () => [] });
|
|
3173
|
-
/**
|
|
3174
|
-
* @deprecated this has never worked. Use `NgtObjectEvents` and explicit value for inputs and outputs instead
|
|
3175
|
-
* @since 2.12.0 Will be removed in 3.0.0
|
|
3176
|
-
*/
|
|
3177
|
-
const NgtObjectEventsInputs = ['ngtObjectEvents'];
|
|
3178
|
-
/**
|
|
3179
|
-
* @deprecated this has never worked. Use `NgtObjectEvents` and explicit value for inputs and outputs instead
|
|
3180
|
-
* @since 2.12.0 Will be removed in 3.0.0
|
|
3181
|
-
*/
|
|
3182
|
-
const NgtObjectEventsOutputs = [
|
|
3183
|
-
'click',
|
|
3184
|
-
'dblclick',
|
|
3185
|
-
'contextmenu',
|
|
3186
|
-
'pointerup',
|
|
3187
|
-
'pointerdown',
|
|
3188
|
-
'pointerover',
|
|
3189
|
-
'pointerout',
|
|
3190
|
-
'pointerenter',
|
|
3191
|
-
'pointerleave',
|
|
3192
|
-
'pointermove',
|
|
3193
|
-
'pointermissed',
|
|
3194
|
-
'pointercancel',
|
|
3195
|
-
'wheel',
|
|
3196
|
-
];
|
|
3197
|
-
/**
|
|
3198
|
-
* @deprecated Use NgtObjectEventsInputs and NgtObjectEventsOutputs instead along with NgtObjectEvents
|
|
3199
|
-
* @since 2.6.0 Will be removed in 3.0.0
|
|
3200
|
-
*/
|
|
3201
|
-
const NgtObjectEventsHostDirective = {
|
|
3202
|
-
directive: NgtObjectEvents,
|
|
3203
|
-
inputs: ['ngtObjectEvents'],
|
|
3204
|
-
outputs: [
|
|
3205
|
-
'click',
|
|
3206
|
-
'dblclick',
|
|
3207
|
-
'contextmenu',
|
|
3208
|
-
'pointerup',
|
|
3209
|
-
'pointerdown',
|
|
3210
|
-
'pointerover',
|
|
3211
|
-
'pointerout',
|
|
3212
|
-
'pointerenter',
|
|
3213
|
-
'pointerleave',
|
|
3214
|
-
'pointermove',
|
|
3215
|
-
'pointermissed',
|
|
3216
|
-
'pointercancel',
|
|
3217
|
-
'wheel',
|
|
3218
|
-
],
|
|
3219
|
-
};
|
|
3220
3237
|
function injectObjectEvents(target, events, { injector } = {}) {
|
|
3221
3238
|
return assertInjector(injectObjectEvents, injector, () => {
|
|
3222
3239
|
const renderer = inject(Renderer2);
|
|
@@ -3320,5 +3337,5 @@ const vector4 = createVectorComputed(Vector4);
|
|
|
3320
3337
|
* Generated bundle index. Do not edit.
|
|
3321
3338
|
*/
|
|
3322
3339
|
|
|
3323
|
-
export { HTML, NGT_APPLY_PROPS, NGT_STORE, NON_ROOT, NgtArgs, NgtCanvas, NgtHTML, NgtHexify, NgtObjectEvents,
|
|
3340
|
+
export { HTML, NGT_APPLY_PROPS, NGT_STORE, NON_ROOT, NgtArgs, NgtCanvas, NgtHTML, NgtHexify, NgtObjectEvents, NgtPortal, NgtPortalBeforeRender, NgtPortalContent, NgtRenderer, NgtRendererFactory, NgtRoutedScene, NgtRouterOutlet, NgtSelect, NgtSelection, ROUTED_SCENE, addAfterEffect, addEffect, addTail, applyProps, attach, checkNeedsUpdate, checkUpdate, createAttachFunction, detach, dispose, extend, flushGlobalEffects, getEmitter, getLocalState, hasListener, injectBeforeRender, injectCanvasRootInitializer, injectLoader, injectLoop, injectObjectEvents, injectStore, invalidateInstance, is, makeCameraInstance, makeDpr, makeId, makeObjectGraph, makeRendererInstance, merge, omit, pick, prepare, privateKeys, provideHTMLDomElement, provideNgtRenderer, provideStore, resolveRef, roots, signalStore, updateCamera, vector2, vector3, vector4 };
|
|
3324
3341
|
//# sourceMappingURL=angular-three.mjs.map
|