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.
- package/abstractions/index.d.ts +1 -0
- package/abstractions/lib/edges/edges.d.ts +18 -0
- package/cameras/index.d.ts +1 -0
- package/cameras/lib/camera/camera-content.d.ts +1 -1
- package/cameras/lib/cube-camera/cube-camera.d.ts +27 -0
- package/esm2020/abstractions/index.mjs +2 -1
- package/esm2020/abstractions/lib/edges/edges.mjs +95 -0
- package/esm2020/cameras/index.mjs +2 -1
- package/esm2020/cameras/lib/camera/camera-content.mjs +1 -1
- package/esm2020/cameras/lib/cube-camera/cube-camera.mjs +130 -0
- package/esm2020/materials/index.mjs +3 -1
- package/esm2020/materials/lib/mesh-refraction-material/mesh-refraction-material.mjs +157 -0
- package/esm2020/materials/lib/mesh-transmission-material/mesh-transmission-material.mjs +240 -0
- package/esm2020/misc/lib/fbo/fbo.mjs +5 -4
- package/esm2020/shaders/index.mjs +5 -1
- package/esm2020/shaders/lib/caustics-material/caustics-material.mjs +128 -0
- package/esm2020/shaders/lib/caustics-projection-material/caustics-projection-material.mjs +33 -0
- package/esm2020/shaders/lib/discard-material/discard-material.mjs +3 -0
- package/esm2020/shaders/lib/mesh-transmission-material/mesh-transmission-material.mjs +268 -0
- package/esm2020/staging/index.mjs +2 -1
- package/esm2020/staging/lib/accumulative-shadows/progressive-light-map.mjs +2 -3
- package/esm2020/staging/lib/caustics/caustics.mjs +364 -0
- package/fesm2015/angular-three-soba-abstractions.mjs +91 -2
- package/fesm2015/angular-three-soba-abstractions.mjs.map +1 -1
- package/fesm2015/angular-three-soba-cameras.mjs +127 -4
- package/fesm2015/angular-three-soba-cameras.mjs.map +1 -1
- package/fesm2015/angular-three-soba-materials.mjs +389 -2
- package/fesm2015/angular-three-soba-materials.mjs.map +1 -1
- package/fesm2015/angular-three-soba-misc.mjs +4 -3
- package/fesm2015/angular-three-soba-misc.mjs.map +1 -1
- package/fesm2015/angular-three-soba-shaders.mjs +454 -31
- package/fesm2015/angular-three-soba-shaders.mjs.map +1 -1
- package/fesm2015/angular-three-soba-staging.mjs +363 -9
- package/fesm2015/angular-three-soba-staging.mjs.map +1 -1
- package/fesm2020/angular-three-soba-abstractions.mjs +91 -2
- package/fesm2020/angular-three-soba-abstractions.mjs.map +1 -1
- package/fesm2020/angular-three-soba-cameras.mjs +127 -4
- package/fesm2020/angular-three-soba-cameras.mjs.map +1 -1
- package/fesm2020/angular-three-soba-materials.mjs +387 -2
- package/fesm2020/angular-three-soba-materials.mjs.map +1 -1
- package/fesm2020/angular-three-soba-misc.mjs +4 -3
- package/fesm2020/angular-three-soba-misc.mjs.map +1 -1
- package/fesm2020/angular-three-soba-shaders.mjs +460 -34
- package/fesm2020/angular-three-soba-shaders.mjs.map +1 -1
- package/fesm2020/angular-three-soba-staging.mjs +362 -9
- package/fesm2020/angular-three-soba-staging.mjs.map +1 -1
- package/materials/index.d.ts +2 -0
- package/materials/lib/mesh-refraction-material/mesh-refraction-material.d.ts +28 -0
- package/materials/lib/mesh-transmission-material/mesh-transmission-material.d.ts +47 -0
- package/misc/lib/fbo/fbo.d.ts +8 -6
- package/package.json +2 -2
- package/plugin/package.json +1 -1
- package/shaders/index.d.ts +4 -0
- package/shaders/lib/caustics-material/caustics-material.d.ts +4 -0
- package/shaders/lib/caustics-projection-material/caustics-projection-material.d.ts +4 -0
- package/shaders/lib/discard-material/discard-material.d.ts +3 -0
- package/shaders/lib/mesh-transmission-material/mesh-transmission-material.d.ts +25 -0
- package/staging/index.d.ts +1 -0
- package/staging/lib/caustics/caustics.d.ts +48 -0
- package/staging/lib/environment/environment-cube.d.ts +1 -1
- package/staging/lib/environment/environment-ground.d.ts +1 -1
- 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
|