angular-three-soba 1.10.0 → 1.11.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.
Files changed (62) hide show
  1. package/abstractions/index.d.ts +1 -0
  2. package/abstractions/lib/edges/edges.d.ts +18 -0
  3. package/cameras/index.d.ts +1 -0
  4. package/cameras/lib/camera/camera-content.d.ts +1 -1
  5. package/cameras/lib/cube-camera/cube-camera.d.ts +27 -0
  6. package/esm2020/abstractions/index.mjs +2 -1
  7. package/esm2020/abstractions/lib/edges/edges.mjs +95 -0
  8. package/esm2020/cameras/index.mjs +2 -1
  9. package/esm2020/cameras/lib/camera/camera-content.mjs +1 -1
  10. package/esm2020/cameras/lib/cube-camera/cube-camera.mjs +130 -0
  11. package/esm2020/materials/index.mjs +3 -1
  12. package/esm2020/materials/lib/mesh-refraction-material/mesh-refraction-material.mjs +157 -0
  13. package/esm2020/materials/lib/mesh-transmission-material/mesh-transmission-material.mjs +240 -0
  14. package/esm2020/misc/lib/fbo/fbo.mjs +5 -4
  15. package/esm2020/shaders/index.mjs +5 -1
  16. package/esm2020/shaders/lib/caustics-material/caustics-material.mjs +128 -0
  17. package/esm2020/shaders/lib/caustics-projection-material/caustics-projection-material.mjs +33 -0
  18. package/esm2020/shaders/lib/discard-material/discard-material.mjs +3 -0
  19. package/esm2020/shaders/lib/mesh-transmission-material/mesh-transmission-material.mjs +268 -0
  20. package/esm2020/staging/index.mjs +2 -1
  21. package/esm2020/staging/lib/accumulative-shadows/progressive-light-map.mjs +2 -3
  22. package/esm2020/staging/lib/caustics/caustics.mjs +364 -0
  23. package/fesm2015/angular-three-soba-abstractions.mjs +91 -2
  24. package/fesm2015/angular-three-soba-abstractions.mjs.map +1 -1
  25. package/fesm2015/angular-three-soba-cameras.mjs +127 -4
  26. package/fesm2015/angular-three-soba-cameras.mjs.map +1 -1
  27. package/fesm2015/angular-three-soba-materials.mjs +389 -2
  28. package/fesm2015/angular-three-soba-materials.mjs.map +1 -1
  29. package/fesm2015/angular-three-soba-misc.mjs +4 -3
  30. package/fesm2015/angular-three-soba-misc.mjs.map +1 -1
  31. package/fesm2015/angular-three-soba-shaders.mjs +454 -31
  32. package/fesm2015/angular-three-soba-shaders.mjs.map +1 -1
  33. package/fesm2015/angular-three-soba-staging.mjs +363 -9
  34. package/fesm2015/angular-three-soba-staging.mjs.map +1 -1
  35. package/fesm2020/angular-three-soba-abstractions.mjs +91 -2
  36. package/fesm2020/angular-three-soba-abstractions.mjs.map +1 -1
  37. package/fesm2020/angular-three-soba-cameras.mjs +127 -4
  38. package/fesm2020/angular-three-soba-cameras.mjs.map +1 -1
  39. package/fesm2020/angular-three-soba-materials.mjs +387 -2
  40. package/fesm2020/angular-three-soba-materials.mjs.map +1 -1
  41. package/fesm2020/angular-three-soba-misc.mjs +4 -3
  42. package/fesm2020/angular-three-soba-misc.mjs.map +1 -1
  43. package/fesm2020/angular-three-soba-shaders.mjs +460 -34
  44. package/fesm2020/angular-three-soba-shaders.mjs.map +1 -1
  45. package/fesm2020/angular-three-soba-staging.mjs +362 -9
  46. package/fesm2020/angular-three-soba-staging.mjs.map +1 -1
  47. package/materials/index.d.ts +2 -0
  48. package/materials/lib/mesh-refraction-material/mesh-refraction-material.d.ts +28 -0
  49. package/materials/lib/mesh-transmission-material/mesh-transmission-material.d.ts +47 -0
  50. package/misc/lib/fbo/fbo.d.ts +8 -6
  51. package/package.json +2 -2
  52. package/plugin/package.json +1 -1
  53. package/shaders/index.d.ts +4 -0
  54. package/shaders/lib/caustics-material/caustics-material.d.ts +4 -0
  55. package/shaders/lib/caustics-projection-material/caustics-projection-material.d.ts +4 -0
  56. package/shaders/lib/discard-material/discard-material.d.ts +3 -0
  57. package/shaders/lib/mesh-transmission-material/mesh-transmission-material.d.ts +25 -0
  58. package/staging/index.d.ts +1 -0
  59. package/staging/lib/caustics/caustics.d.ts +48 -0
  60. package/staging/lib/environment/environment-cube.d.ts +1 -1
  61. package/staging/lib/environment/environment-ground.d.ts +1 -1
  62. package/staging/lib/environment/utils.d.ts +1 -1
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { Component, CUSTOM_ELEMENTS_SCHEMA, Input, Directive, inject, InjectionToken, EventEmitter, TemplateRef, Output, ContentChild } from '@angular/core';
3
3
  import { extend, NgtRxStore, injectNgtRef, NgtStore, startWithUndefined, NgtArgs, NgtPortal, NgtPortalContent, NgtRepeat, NgtPush } from 'angular-three';
4
4
  import * as THREE from 'three';
5
- import { Group, CatmullRomCurve3, Vector3, Quaternion, Object3D, Matrix4, Mesh, BoxGeometry, MeshBasicMaterial, MeshLambertMaterial, CanvasTexture, AmbientLight, PointLight, Sprite, SpriteMaterial } from 'three';
5
+ import { Group, CatmullRomCurve3, LineSegments, LineBasicMaterial, Vector3, Quaternion, Object3D, Matrix4, Mesh, BoxGeometry, MeshBasicMaterial, MeshLambertMaterial, CanvasTexture, AmbientLight, PointLight, Sprite, SpriteMaterial } from 'three';
6
6
  import { combineLatest, map, switchMap, of } from 'rxjs';
7
7
  import { LineMaterial, LineSegmentsGeometry, LineGeometry, LineSegments2, Line2, TextGeometry, FontLoader } from 'three-stdlib';
8
8
  import { NgIf, NgTemplateOutlet, DOCUMENT, NgFor } from '@angular/common';
@@ -479,6 +479,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
479
479
  type: Input
480
480
  }] } });
481
481
 
482
+ extend({ LineSegments, LineBasicMaterial });
483
+ class NgtsEdges extends NgtRxStore {
484
+ constructor() {
485
+ super(...arguments);
486
+ this.edgesRef = injectNgtRef();
487
+ this.withChildren = false;
488
+ this.noop = () => null;
489
+ }
490
+ set threshold(threshold) {
491
+ this.set({ threshold });
492
+ }
493
+ set color(color) {
494
+ this.set({ color });
495
+ }
496
+ set geometry(geometry) {
497
+ this.set({ geometry });
498
+ }
499
+ set userData(userData) {
500
+ this.set({ userData });
501
+ }
502
+ initialize() {
503
+ super.initialize();
504
+ this.set({
505
+ threshold: 15,
506
+ color: 'black',
507
+ userData: {},
508
+ });
509
+ }
510
+ ngOnInit() {
511
+ this.setupGeometry();
512
+ }
513
+ setupGeometry() {
514
+ this.hold(this.edgesRef.$, (segments) => {
515
+ const parent = segments.parent;
516
+ if (parent) {
517
+ const geom = this.get('geometry') || parent.geometry;
518
+ const threshold = this.get('threshold');
519
+ if (geom !== segments.userData['currentGeom'] || threshold !== segments.userData['currentThreshold']) {
520
+ segments.userData['currentGeom'] = geom;
521
+ segments.userData['currentThreshold'] = threshold;
522
+ segments.geometry = new THREE.EdgesGeometry(geom, threshold);
523
+ }
524
+ }
525
+ });
526
+ }
527
+ }
528
+ NgtsEdges.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: NgtsEdges, deps: null, target: i0.ɵɵFactoryTarget.Component });
529
+ NgtsEdges.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: NgtsEdges, isStandalone: true, selector: "ngts-edges", inputs: { edgesRef: "edgesRef", threshold: "threshold", color: "color", geometry: "geometry", userData: "userData", withChildren: "withChildren" }, usesInheritance: true, ngImport: i0, template: `
530
+ <ngt-line-segments [ref]="edgesRef" [raycast]="noop" ngtCompound>
531
+ <ng-container *ngIf="withChildren; else noChildren">
532
+ <ng-content />
533
+ </ng-container>
534
+ <ng-template #noChildren>
535
+ <ngt-line-basic-material [color]="color" />
536
+ </ng-template>
537
+ </ngt-line-segments>
538
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
539
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: NgtsEdges, decorators: [{
540
+ type: Component,
541
+ args: [{
542
+ selector: 'ngts-edges',
543
+ standalone: true,
544
+ template: `
545
+ <ngt-line-segments [ref]="edgesRef" [raycast]="noop" ngtCompound>
546
+ <ng-container *ngIf="withChildren; else noChildren">
547
+ <ng-content />
548
+ </ng-container>
549
+ <ng-template #noChildren>
550
+ <ngt-line-basic-material [color]="color" />
551
+ </ng-template>
552
+ </ngt-line-segments>
553
+ `,
554
+ imports: [NgIf],
555
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
556
+ }]
557
+ }], propDecorators: { edgesRef: [{
558
+ type: Input
559
+ }], threshold: [{
560
+ type: Input
561
+ }], color: [{
562
+ type: Input
563
+ }], geometry: [{
564
+ type: Input
565
+ }], userData: [{
566
+ type: Input
567
+ }], withChildren: [{
568
+ type: Input
569
+ }] } });
570
+
482
571
  const isOrbitControls = (controls) => {
483
572
  return 'minPolarAngle' in controls;
484
573
  };
@@ -1947,5 +2036,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
1947
2036
  * Generated bundle index. Do not edit.
1948
2037
  */
1949
2038
 
1950
- export { NGTS_GIZMO_HELPER_API, NgtsBillboard, NgtsCatmullRomLine, NgtsCubicBezierLine, NgtsGizmoHelper, NgtsGizmoHelperContent, NgtsGizmoViewcube, NgtsGizmoViewport, NgtsLine, NgtsQuadraticBezierLine, NgtsText, NgtsText3D };
2039
+ export { NGTS_GIZMO_HELPER_API, NgtsBillboard, NgtsCatmullRomLine, NgtsCubicBezierLine, NgtsEdges, NgtsGizmoHelper, NgtsGizmoHelperContent, NgtsGizmoViewcube, NgtsGizmoViewport, NgtsLine, NgtsQuadraticBezierLine, NgtsText, NgtsText3D };
1951
2040
  //# sourceMappingURL=angular-three-soba-abstractions.mjs.map