angular-three 1.9.12 → 1.9.13

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.
@@ -501,12 +501,9 @@ function tapEffect(effectFn) {
501
501
  let cleanupFn = () => { };
502
502
  let firstRun = false;
503
503
  let prev = undefined;
504
- const teardown = (error) => {
505
- return () => {
506
- if (cleanupFn) {
507
- cleanupFn({ prev, complete: true, error });
508
- }
509
- };
504
+ const teardown = (error) => () => {
505
+ if (cleanupFn)
506
+ cleanupFn({ prev, complete: true, error });
510
507
  };
511
508
  return tap({
512
509
  next: (value) => {
@@ -549,14 +546,11 @@ class NgtRxStore extends RxState {
549
546
  // override get to return {} if get() returns undefined
550
547
  const originalGet = this.get.bind(this);
551
548
  Object.defineProperty(this, 'get', {
552
- get: () => {
553
- return (...args) => {
554
- var _a;
555
- if (args.length === 0) {
556
- return (_a = originalGet()) !== null && _a !== void 0 ? _a : {};
557
- }
558
- return originalGet(...args);
559
- };
549
+ get: () => (...args) => {
550
+ var _a;
551
+ if (args.length === 0)
552
+ return (_a = originalGet()) !== null && _a !== void 0 ? _a : {};
553
+ return originalGet(...args);
560
554
  },
561
555
  });
562
556
  // call initialize that might be setup by derived Stores
@@ -573,14 +567,12 @@ class NgtRxStore extends RxState {
573
567
  if (keys.length) {
574
568
  $ = combineLatest(keys.map((key) => { var _a; return this.select(key).pipe(startWith((_a = this.get(key)) !== null && _a !== void 0 ? _a : undefined)); }));
575
569
  }
576
- this.hold($, () => {
577
- requestAnimationFrame(() => void safeDetectChanges(cdr));
578
- });
570
+ this.hold($, () => void requestAnimationFrame(() => void safeDetectChanges(cdr)));
579
571
  }
580
572
  }
581
- NgtRxStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtRxStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
582
- NgtRxStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtRxStore });
583
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtRxStore, decorators: [{
573
+ NgtRxStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtRxStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
574
+ NgtRxStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtRxStore });
575
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtRxStore, decorators: [{
584
576
  type: Injectable
585
577
  }], ctorParameters: function () { return []; } });
586
578
 
@@ -757,14 +749,12 @@ class NgtStore extends NgtRxStore {
757
749
  const stateToUpdate = {};
758
750
  // setup renderer
759
751
  let gl = state.gl;
760
- if (!state.gl) {
752
+ if (!state.gl)
761
753
  stateToUpdate.gl = gl = makeDefaultRenderer(glOptions, canvasElement);
762
- }
763
754
  // setup raycaster
764
755
  let raycaster = state.raycaster;
765
- if (!raycaster) {
756
+ if (!raycaster)
766
757
  stateToUpdate.raycaster = raycaster = new THREE.Raycaster();
767
- }
768
758
  // set raycaster options
769
759
  const _b = raycasterOptions || {}, { params } = _b, options = __rest(_b, ["params"]);
770
760
  if (!is.equ(options, raycaster, shallowLoose))
@@ -900,9 +890,7 @@ class NgtStore extends NgtRxStore {
900
890
  this.invalidate();
901
891
  }
902
892
  destroy(canvas) {
903
- this.set((state) => ({
904
- internal: Object.assign(Object.assign({}, state.internal), { active: false }),
905
- }));
893
+ this.set((state) => ({ internal: Object.assign(Object.assign({}, state.internal), { active: false }) }));
906
894
  setTimeout(() => {
907
895
  const { gl, xr, events } = this.get();
908
896
  if (gl) {
@@ -949,15 +937,14 @@ class NgtStore extends NgtRxStore {
949
937
  this.hold(this.select(), () => invalidate(this));
950
938
  }
951
939
  }
952
- NgtStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtStore, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
953
- NgtStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtStore });
954
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtStore, decorators: [{
940
+ NgtStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtStore, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
941
+ NgtStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtStore });
942
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtStore, decorators: [{
955
943
  type: Injectable
956
944
  }] });
957
945
  function computeInitialSize(canvas, defaultSize) {
958
- if (defaultSize) {
946
+ if (defaultSize)
959
947
  return defaultSize;
960
- }
961
948
  if (canvas instanceof HTMLCanvasElement && canvas.parentElement) {
962
949
  return canvas.parentElement.getBoundingClientRect();
963
950
  }
@@ -1004,9 +991,9 @@ class NgtCommonDirective {
1004
991
  }
1005
992
  }
1006
993
  }
1007
- NgtCommonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtCommonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1008
- NgtCommonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: NgtCommonDirective, ngImport: i0 });
1009
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtCommonDirective, decorators: [{
994
+ NgtCommonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtCommonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
995
+ NgtCommonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: NgtCommonDirective, ngImport: i0 });
996
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtCommonDirective, decorators: [{
1010
997
  type: Directive
1011
998
  }], ctorParameters: function () { return []; } });
1012
999
 
@@ -1016,9 +1003,7 @@ class NgtArgs extends NgtCommonDirective {
1016
1003
  this.injectedArgs = [];
1017
1004
  }
1018
1005
  set args(args) {
1019
- if (args == null || !Array.isArray(args))
1020
- return;
1021
- if (args.length === 1 && args[0] === null)
1006
+ if (args == null || !Array.isArray(args) || (args.length === 1 && args[0] === null))
1022
1007
  return;
1023
1008
  this.injected = false;
1024
1009
  this.injectedArgs = args;
@@ -1035,9 +1020,9 @@ class NgtArgs extends NgtCommonDirective {
1035
1020
  return !this.injected && !!this.injectedArgs.length;
1036
1021
  }
1037
1022
  }
1038
- NgtArgs.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtArgs, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1039
- NgtArgs.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: NgtArgs, isStandalone: true, selector: "[args]", inputs: { args: "args" }, usesInheritance: true, ngImport: i0 });
1040
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtArgs, decorators: [{
1023
+ NgtArgs.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtArgs, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1024
+ NgtArgs.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: NgtArgs, isStandalone: true, selector: "[args]", inputs: { args: "args" }, usesInheritance: true, ngImport: i0 });
1025
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtArgs, decorators: [{
1041
1026
  type: Directive,
1042
1027
  args: [{ selector: '[args]', standalone: true }]
1043
1028
  }], propDecorators: { args: [{
@@ -1067,9 +1052,9 @@ class NgtParent extends NgtCommonDirective {
1067
1052
  return !this.injected && !!this.injectedParent;
1068
1053
  }
1069
1054
  }
1070
- NgtParent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtParent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1071
- NgtParent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: NgtParent, isStandalone: true, selector: "[parent]", inputs: { parent: "parent" }, usesInheritance: true, ngImport: i0 });
1072
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtParent, decorators: [{
1055
+ NgtParent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtParent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1056
+ NgtParent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: NgtParent, isStandalone: true, selector: "[parent]", inputs: { parent: "parent" }, usesInheritance: true, ngImport: i0 });
1057
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtParent, decorators: [{
1073
1058
  type: Directive,
1074
1059
  args: [{ selector: '[parent]', standalone: true }]
1075
1060
  }], propDecorators: { parent: [{
@@ -1514,9 +1499,8 @@ function attachThreeChild(parent, child) {
1514
1499
  }
1515
1500
  pLS.add(child, added ? 'objects' : 'nonObjects');
1516
1501
  cLS.parent = parent;
1517
- if (cLS.afterAttach) {
1502
+ if (cLS.afterAttach)
1518
1503
  cLS.afterAttach.emit({ parent, node: child });
1519
- }
1520
1504
  invalidateInstance(child);
1521
1505
  invalidateInstance(parent);
1522
1506
  }
@@ -1527,12 +1511,10 @@ function removeThreeChild(parent, child, dispose) {
1527
1511
  // clear parent ref
1528
1512
  cLS.parent = null;
1529
1513
  // remove child from parent
1530
- if (pLS.objects) {
1514
+ if (pLS.objects)
1531
1515
  pLS.remove(child, 'objects');
1532
- }
1533
- if (pLS.nonObjects) {
1516
+ if (pLS.nonObjects)
1534
1517
  pLS.remove(child, 'nonObjects');
1535
- }
1536
1518
  if (cLS.attach) {
1537
1519
  detach(parent, child, cLS.attach);
1538
1520
  }
@@ -1556,7 +1538,6 @@ function removeThreeRecursive(array, parent, dispose) {
1556
1538
  [...array].forEach((child) => removeThreeChild(parent, child, dispose));
1557
1539
  }
1558
1540
  function processThreeEvent(instance, priority, eventName, callback, cdr, targetCdr) {
1559
- var _a;
1560
1541
  const lS = getLocalState(instance);
1561
1542
  if (eventName === SPECIAL_EVENTS.BEFORE_RENDER) {
1562
1543
  return lS.store
@@ -1564,15 +1545,14 @@ function processThreeEvent(instance, priority, eventName, callback, cdr, targetC
1564
1545
  .subscribe((state) => callback({ state, object: instance }), priority || lS.priority || 0);
1565
1546
  }
1566
1547
  if (eventName === SPECIAL_EVENTS.AFTER_UPDATE || eventName === SPECIAL_EVENTS.AFTER_ATTACH) {
1567
- if (!lS[eventName]) {
1568
- lS[eventName] = new EventEmitter();
1569
- }
1570
- const sub = (_a = lS[eventName]) === null || _a === void 0 ? void 0 : _a.subscribe(callback);
1548
+ let emitter = lS[eventName];
1549
+ if (!emitter)
1550
+ emitter = new EventEmitter();
1551
+ const sub = emitter.subscribe(callback);
1571
1552
  return sub.unsubscribe.bind(sub);
1572
1553
  }
1573
- if (!lS.handlers) {
1554
+ if (!lS.handlers)
1574
1555
  lS.handlers = {};
1575
- }
1576
1556
  // try to get the previous handler. compound might have one, the THREE object might also have one with the same name
1577
1557
  const previousHandler = lS.handlers[eventName];
1578
1558
  // readjust the callback
@@ -1581,20 +1561,18 @@ function processThreeEvent(instance, priority, eventName, callback, cdr, targetC
1581
1561
  previousHandler(event);
1582
1562
  callback(event);
1583
1563
  };
1584
- lS.handlers = Object.assign(Object.assign({}, lS.handlers), { [eventName]: eventToHandler(updatedCallback, cdr, targetCdr) });
1564
+ Object.assign(lS.handlers, { [eventName]: eventToHandler(updatedCallback, cdr, targetCdr) });
1585
1565
  // increment the count everytime
1586
1566
  lS.eventCount += 1;
1587
1567
  // but only add the instance (target) to the interaction array (so that it is handled by the EventManager with Raycast)
1588
1568
  // the first time eventCount is incremented
1589
- if (lS.eventCount === 1 && instance['raycast']) {
1569
+ if (lS.eventCount === 1 && instance['raycast'])
1590
1570
  lS.store.get('addInteraction')(instance);
1591
- }
1592
1571
  // clean up the event listener by removing the target from the interaction array
1593
1572
  return () => {
1594
1573
  const localState = getLocalState(instance);
1595
- if (localState && localState.eventCount) {
1574
+ if (localState && localState.eventCount)
1596
1575
  localState.store.get('removeInteraction')(instance['uuid']);
1597
- }
1598
1576
  };
1599
1577
  }
1600
1578
  function eventToHandler(callback, cdr, targetCdr) {
@@ -1608,9 +1586,7 @@ function kebabToPascal(str) {
1608
1586
  // split the string at each hyphen
1609
1587
  const parts = str.split('-');
1610
1588
  // map over the parts, capitalizing the first letter of each part
1611
- const pascalParts = parts.map((part) => {
1612
- return part.charAt(0).toUpperCase() + part.slice(1);
1613
- });
1589
+ const pascalParts = parts.map((part) => part.charAt(0).toUpperCase() + part.slice(1));
1614
1590
  // join the parts together to create the final PascalCase string
1615
1591
  return pascalParts.join('');
1616
1592
  }
@@ -1640,9 +1616,8 @@ class NgtRendererStore {
1640
1616
  ];
1641
1617
  const rendererNode = Object.assign(node, { __ngt_renderer__: state });
1642
1618
  // assign ownerDocument to node so we can use HostListener in Component
1643
- if (!rendererNode['ownerDocument']) {
1619
+ if (!rendererNode['ownerDocument'])
1644
1620
  rendererNode['ownerDocument'] = this.root.document;
1645
- }
1646
1621
  // assign injectorFactory on non-three type since
1647
1622
  // rendererNode is an instance of DOM Node
1648
1623
  if (state[0 /* NgtRendererClassId.type */] !== 'three') {
@@ -1652,9 +1627,9 @@ class NgtRendererStore {
1652
1627
  // we attach an arrow function to the Comment node
1653
1628
  // In our directives, we can call this function to then start tracking the RendererNode
1654
1629
  // this is done to limit the amount of Nodes we need to process for getCreationState
1655
- rendererNode['__ngt_renderer_add_comment__'] = (portalNode) => {
1656
- if (portalNode && portalNode.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'portal') {
1657
- this.portals.push(portalNode);
1630
+ rendererNode['__ngt_renderer_add_comment__'] = (node) => {
1631
+ if (node && node.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'portal') {
1632
+ this.portals.push(node);
1658
1633
  }
1659
1634
  else {
1660
1635
  this.comments.push(rendererNode);
@@ -1691,15 +1666,11 @@ class NgtRendererStore {
1691
1666
  rS[7 /* NgtRendererClassId.compounded */] = instance;
1692
1667
  const attributes = Object.keys(rS[9 /* NgtRendererClassId.attributes */]);
1693
1668
  const properties = Object.keys(rS[10 /* NgtRendererClassId.properties */]);
1694
- if (attributes.length) {
1695
- for (const key of attributes) {
1696
- this.applyAttribute(instance, key, rS[9 /* NgtRendererClassId.attributes */][key]);
1697
- }
1669
+ for (const key of attributes) {
1670
+ this.applyAttribute(instance, key, rS[9 /* NgtRendererClassId.attributes */][key]);
1698
1671
  }
1699
- if (properties.length) {
1700
- for (const key of properties) {
1701
- this.applyProperty(instance, key, rS[10 /* NgtRendererClassId.properties */][key]);
1702
- }
1672
+ for (const key of properties) {
1673
+ this.applyProperty(instance, key, rS[10 /* NgtRendererClassId.properties */][key]);
1703
1674
  }
1704
1675
  this.executeOperation(compound);
1705
1676
  }
@@ -1996,6 +1967,7 @@ class NgtRendererFactory {
1996
1967
  this.catalogue = inject(NGT_CATALOGUE);
1997
1968
  this.rendererMap = new Map();
1998
1969
  this.routedSet = new Set();
1970
+ // all Renderer instances share the same Store
1999
1971
  this.rendererStore = new NgtRendererStore({
2000
1972
  store: inject(NgtStore),
2001
1973
  cdr: inject(ChangeDetectorRef),
@@ -2021,9 +1993,9 @@ class NgtRendererFactory {
2021
1993
  return renderer;
2022
1994
  }
2023
1995
  }
2024
- NgtRendererFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtRendererFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2025
- NgtRendererFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtRendererFactory });
2026
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtRendererFactory, decorators: [{
1996
+ NgtRendererFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtRendererFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1997
+ NgtRendererFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtRendererFactory });
1998
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtRendererFactory, decorators: [{
2027
1999
  type: Injectable
2028
2000
  }] });
2029
2001
  /**
@@ -2332,12 +2304,10 @@ class NgtRenderer {
2332
2304
  }
2333
2305
 
2334
2306
  function provideNgtRenderer({ store, changeDetectorRef, compoundPrefixes = [] }) {
2335
- if (!compoundPrefixes.includes('ngts')) {
2307
+ if (!compoundPrefixes.includes('ngts'))
2336
2308
  compoundPrefixes.push('ngts');
2337
- }
2338
- if (!compoundPrefixes.includes('ngtp')) {
2309
+ if (!compoundPrefixes.includes('ngtp'))
2339
2310
  compoundPrefixes.push('ngtp');
2340
- }
2341
2311
  return makeEnvironmentProviders([
2342
2312
  { provide: RendererFactory2, useClass: NgtRendererFactory },
2343
2313
  { provide: NgtStore, useValue: store },
@@ -2422,7 +2392,7 @@ class NgtCanvas extends NgtRxStore {
2422
2392
  this.envInjector = inject(EnvironmentInjector);
2423
2393
  this.host = inject(ElementRef);
2424
2394
  this.store = inject(NgtStore);
2425
- this.hostClass = true;
2395
+ this.hbClass = true;
2426
2396
  this.sceneGraphInputs = {};
2427
2397
  this.compoundPrefixes = [];
2428
2398
  this.created = new EventEmitter();
@@ -2441,7 +2411,7 @@ class NgtCanvas extends NgtRxStore {
2441
2411
  events: createPointerEvents,
2442
2412
  });
2443
2413
  }
2444
- get pointerEvents() {
2414
+ get hbPointerEvents() {
2445
2415
  return this.get('eventSource') !== this.host.nativeElement ? 'none' : 'auto';
2446
2416
  }
2447
2417
  set linear(linear) {
@@ -2541,9 +2511,8 @@ class NgtCanvas extends NgtRxStore {
2541
2511
  });
2542
2512
  }
2543
2513
  // emit created event if observed
2544
- if (this.created.observed) {
2514
+ if (this.created.observed)
2545
2515
  this.created.emit(this.store.get());
2546
- }
2547
2516
  // render
2548
2517
  if (this.glRef)
2549
2518
  this.glRef.destroy();
@@ -2584,23 +2553,23 @@ class NgtCanvas extends NgtRxStore {
2584
2553
  safeDetectChanges(this.cdr);
2585
2554
  }
2586
2555
  }
2587
- NgtCanvas.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtCanvas, deps: null, target: i0.ɵɵFactoryTarget.Component });
2588
- NgtCanvas.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: NgtCanvas, isStandalone: true, selector: "ngt-canvas", inputs: { sceneGraph: "sceneGraph", sceneGraphInputs: "sceneGraphInputs", 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, usesOnChanges: true, ngImport: i0, template: `
2556
+ NgtCanvas.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtCanvas, deps: null, target: i0.ɵɵFactoryTarget.Component });
2557
+ NgtCanvas.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtCanvas, isStandalone: true, selector: "ngt-canvas", inputs: { sceneGraph: "sceneGraph", sceneGraphInputs: "sceneGraphInputs", 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.hbClass", "style.pointerEvents": "this.hbPointerEvents" } }, 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, usesOnChanges: true, ngImport: i0, template: `
2589
2558
  <div (ngxResize)="onResize($event)" style="height: 100%; width: 100%;">
2590
2559
  <canvas #glCanvas style="display: block;"></canvas>
2591
2560
  </div>
2592
2561
  `, 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"] }] });
2593
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtCanvas, decorators: [{
2562
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtCanvas, decorators: [{
2594
2563
  type: Component,
2595
2564
  args: [{ selector: 'ngt-canvas', standalone: true, template: `
2596
2565
  <div (ngxResize)="onResize($event)" style="height: 100%; width: 100%;">
2597
2566
  <canvas #glCanvas style="display: block;"></canvas>
2598
2567
  </div>
2599
2568
  `, imports: [NgxResize], providers: [NgtStore, provideNgxResizeOptions({ emitInZone: false })], styles: [":host{display:block;position:relative;width:100%;height:100%;overflow:hidden}\n"] }]
2600
- }], propDecorators: { hostClass: [{
2569
+ }], propDecorators: { hbClass: [{
2601
2570
  type: HostBinding,
2602
2571
  args: ['class.ngt-canvas']
2603
- }], pointerEvents: [{
2572
+ }], hbPointerEvents: [{
2604
2573
  type: HostBinding,
2605
2574
  args: ['style.pointerEvents']
2606
2575
  }], sceneGraph: [{
@@ -2673,7 +2642,7 @@ function injectNgtDestroy(cb) {
2673
2642
  function injectBeforeRender(cb, priority = 0) {
2674
2643
  try {
2675
2644
  const store = inject(NgtStore);
2676
- const sub = store.get('internal').subscribe((state) => cb(state), priority, store);
2645
+ const sub = store.get('internal').subscribe(cb, priority, store);
2677
2646
  injectNgtDestroy(() => void sub());
2678
2647
  return sub;
2679
2648
  }
@@ -2687,17 +2656,13 @@ function injectNgtRef(initialValue = null) {
2687
2656
  let lastValue = ref.nativeElement;
2688
2657
  const cdRefs = [];
2689
2658
  const ref$ = new BehaviorSubject(lastValue);
2690
- const { destroy$, cdr } = injectNgtDestroy(() => {
2691
- ref$.complete();
2692
- });
2659
+ const { destroy$, cdr } = injectNgtDestroy(() => void ref$.complete());
2693
2660
  cdRefs.push(cdr);
2694
2661
  const obs$ = ref$.asObservable().pipe(distinctUntilChanged(), takeUntil(destroy$));
2695
- const subscribe = (callback) => {
2696
- return obs$.subscribe((current) => {
2697
- callback(current, lastValue);
2698
- lastValue = current;
2699
- });
2700
- };
2662
+ const subscribe = (callback) => obs$.subscribe((current) => {
2663
+ callback(current, lastValue);
2664
+ lastValue = current;
2665
+ });
2701
2666
  const useCDR = (cdr) => void cdRefs.push(cdr);
2702
2667
  const $ = obs$.pipe(filter((value, index) => index > 0 || value != null), takeUntil(destroy$));
2703
2668
  const children$ = (type = 'objects') => $.pipe(switchMap((instance) => {
@@ -2789,9 +2754,9 @@ class NgtRepeat extends NgForOf {
2789
2754
  this.ngForOf = Number.isInteger(count) ? Array.from({ length: count }, (_, i) => i) : [];
2790
2755
  }
2791
2756
  }
2792
- NgtRepeat.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtRepeat, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2793
- NgtRepeat.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: NgtRepeat, isStandalone: true, selector: "[ngFor][ngForRepeat]", inputs: { ngForRepeat: "ngForRepeat" }, usesInheritance: true, ngImport: i0 });
2794
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtRepeat, decorators: [{
2757
+ NgtRepeat.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtRepeat, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2758
+ NgtRepeat.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: NgtRepeat, isStandalone: true, selector: "[ngFor][ngForRepeat]", inputs: { ngForRepeat: "ngForRepeat" }, usesInheritance: true, ngImport: i0 });
2759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtRepeat, decorators: [{
2795
2760
  type: Directive,
2796
2761
  args: [{ selector: '[ngFor][ngForRepeat]', standalone: true }]
2797
2762
  }], propDecorators: { ngForRepeat: [{
@@ -2836,9 +2801,9 @@ class NgtPush {
2836
2801
  this.obj = undefined;
2837
2802
  }
2838
2803
  }
2839
- NgtPush.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtPush, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2840
- NgtPush.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: NgtPush, isStandalone: true, name: "ngtPush", pure: false });
2841
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtPush, decorators: [{
2804
+ NgtPush.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtPush, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2805
+ NgtPush.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.5", ngImport: i0, type: NgtPush, isStandalone: true, name: "ngtPush", pure: false });
2806
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtPush, decorators: [{
2842
2807
  type: Pipe,
2843
2808
  args: [{ name: 'ngtPush', pure: false, standalone: true }]
2844
2809
  }] });
@@ -2888,14 +2853,11 @@ class NgtPortalBeforeRender {
2888
2853
  (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.call(this);
2889
2854
  }
2890
2855
  }
2891
- NgtPortalBeforeRender.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtPortalBeforeRender, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2892
- NgtPortalBeforeRender.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: NgtPortalBeforeRender, isStandalone: true, selector: "ngt-portal-before-render", inputs: { renderPriority: "renderPriority", parentScene: "parentScene", parentCamera: "parentCamera" }, outputs: { beforeRender: "beforeRender" }, ngImport: i0 });
2893
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtPortalBeforeRender, decorators: [{
2856
+ NgtPortalBeforeRender.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtPortalBeforeRender, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2857
+ NgtPortalBeforeRender.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: NgtPortalBeforeRender, isStandalone: true, selector: "[ngtPortalBeforeRender]", inputs: { renderPriority: "renderPriority", parentScene: "parentScene", parentCamera: "parentCamera" }, outputs: { beforeRender: "beforeRender" }, ngImport: i0 });
2858
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtPortalBeforeRender, decorators: [{
2894
2859
  type: Directive,
2895
- args: [{
2896
- selector: 'ngt-portal-before-render',
2897
- standalone: true,
2898
- }]
2860
+ args: [{ selector: '[ngtPortalBeforeRender]', standalone: true }]
2899
2861
  }], propDecorators: { renderPriority: [{
2900
2862
  type: Input
2901
2863
  }], parentScene: [{
@@ -2914,9 +2876,9 @@ class NgtPortalContent {
2914
2876
  }
2915
2877
  }
2916
2878
  }
2917
- NgtPortalContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtPortalContent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ViewContainerRef, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
2918
- NgtPortalContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: NgtPortalContent, isStandalone: true, selector: "ng-template[ngtPortalContent]", ngImport: i0 });
2919
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtPortalContent, decorators: [{
2879
+ NgtPortalContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtPortalContent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ViewContainerRef, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
2880
+ NgtPortalContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: NgtPortalContent, isStandalone: true, selector: "ng-template[ngtPortalContent]", ngImport: i0 });
2881
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtPortalContent, decorators: [{
2920
2882
  type: Directive,
2921
2883
  args: [{ selector: 'ng-template[ngtPortalContent]', standalone: true }]
2922
2884
  }], ctorParameters: function () {
@@ -3002,27 +2964,29 @@ class NgtPortal extends NgtRxStore {
3002
2964
  return Object.assign(Object.assign(Object.assign({}, intersect), { scene: is.ref(inputs.container) ? inputs.container.nativeElement : inputs.container, raycaster: this.raycaster, pointer: this.pointer, previousStore: this.parentStore, events: Object.assign(Object.assign(Object.assign({}, rootState.events), ((injectState === null || injectState === void 0 ? void 0 : injectState.events) || {})), events), size: Object.assign(Object.assign({}, rootState.size), size), viewport: Object.assign(Object.assign({}, rootState.viewport), (viewport || {})) }), restInputsState);
3003
2965
  }
3004
2966
  }
3005
- NgtPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtPortal, deps: null, target: i0.ɵɵFactoryTarget.Component });
3006
- NgtPortal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", 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: `
2967
+ NgtPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtPortal, deps: null, target: i0.ɵɵFactoryTarget.Component });
2968
+ NgtPortal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", 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: `
3007
2969
  <ng-container #portalContentAnchor>
3008
- <ngt-portal-before-render
2970
+ <ng-container
3009
2971
  *ngIf="autoRender && portalContentRendered"
2972
+ ngtPortalBeforeRender
3010
2973
  [renderPriority]="autoRenderPriority"
3011
2974
  [parentScene]="parentScene"
3012
2975
  [parentCamera]="parentCamera"
3013
2976
  (beforeRender)="onBeforeRender($event)"
3014
2977
  />
3015
2978
  </ng-container>
3016
- `, 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"] }] });
3017
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtPortal, decorators: [{
2979
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgtPortalBeforeRender, selector: "[ngtPortalBeforeRender]", inputs: ["renderPriority", "parentScene", "parentCamera"], outputs: ["beforeRender"] }] });
2980
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtPortal, decorators: [{
3018
2981
  type: Component,
3019
2982
  args: [{
3020
2983
  selector: 'ngt-portal',
3021
2984
  standalone: true,
3022
2985
  template: `
3023
2986
  <ng-container #portalContentAnchor>
3024
- <ngt-portal-before-render
2987
+ <ng-container
3025
2988
  *ngIf="autoRender && portalContentRendered"
2989
+ ngtPortalBeforeRender
3026
2990
  [renderPriority]="autoRenderPriority"
3027
2991
  [parentScene]="parentScene"
3028
2992
  [parentCamera]="parentCamera"
@@ -3060,9 +3024,9 @@ class NgtRoutedScene {
3060
3024
  }
3061
3025
  }
3062
3026
  NgtRoutedScene.isRoutedScene = true;
3063
- NgtRoutedScene.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtRoutedScene, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
3064
- NgtRoutedScene.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: NgtRoutedScene, isStandalone: true, selector: "ngt-routed-scene", ngImport: i0, template: `<router-outlet />`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
3065
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: NgtRoutedScene, decorators: [{
3027
+ NgtRoutedScene.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtRoutedScene, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
3028
+ NgtRoutedScene.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtRoutedScene, isStandalone: true, selector: "ngt-routed-scene", ngImport: i0, template: `<router-outlet />`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
3029
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtRoutedScene, decorators: [{
3066
3030
  type: Component,
3067
3031
  args: [{
3068
3032
  standalone: true,