angular-three-soba 2.2.0 → 2.2.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/abstractions/lib/catmull-rom-line.d.ts +117 -117
- package/abstractions/lib/edges.d.ts +126 -126
- package/abstractions/lib/grid.d.ts +15 -15
- package/abstractions/lib/line.d.ts +9 -8
- package/abstractions/lib/prism-geometry.d.ts +2 -2
- package/abstractions/lib/rounded-box.d.ts +3 -3
- package/abstractions/lib/text-3d.d.ts +22 -22
- package/abstractions/lib/text.d.ts +0 -1
- package/cameras/lib/cube-camera.d.ts +2 -2
- package/cameras/lib/orthographic-camera.d.ts +7 -8
- package/cameras/lib/perspective-camera.d.ts +2 -3
- package/controls/lib/camera-controls.d.ts +1 -1
- package/controls/lib/orbit-controls.d.ts +1 -1
- package/esm2022/abstractions/lib/billboard.mjs +3 -3
- package/esm2022/abstractions/lib/catmull-rom-line.mjs +3 -3
- package/esm2022/abstractions/lib/cubic-bezier-line.mjs +3 -3
- package/esm2022/abstractions/lib/edges.mjs +30 -34
- package/esm2022/abstractions/lib/gradient-texture.mjs +3 -3
- package/esm2022/abstractions/lib/grid.mjs +3 -3
- package/esm2022/abstractions/lib/helper.mjs +18 -20
- package/esm2022/abstractions/lib/line.mjs +25 -28
- package/esm2022/abstractions/lib/prism-geometry.mjs +3 -3
- package/esm2022/abstractions/lib/quadratic-bezier-line.mjs +3 -3
- package/esm2022/abstractions/lib/rounded-box.mjs +11 -17
- package/esm2022/abstractions/lib/text-3d.mjs +14 -17
- package/esm2022/abstractions/lib/text.mjs +11 -16
- package/esm2022/cameras/lib/camera-content.mjs +3 -3
- package/esm2022/cameras/lib/cube-camera.mjs +18 -27
- package/esm2022/cameras/lib/orthographic-camera.mjs +20 -20
- package/esm2022/cameras/lib/perspective-camera.mjs +21 -21
- package/esm2022/controls/lib/camera-controls.mjs +3 -3
- package/esm2022/controls/lib/orbit-controls.mjs +3 -3
- package/esm2022/controls/lib/scroll-controls.mjs +124 -130
- package/esm2022/gizmos/lib/gizmo-helper/gizmo-helper.mjs +6 -6
- package/esm2022/gizmos/lib/gizmo-helper/gizmo-viewcube.mjs +12 -12
- package/esm2022/gizmos/lib/gizmo-helper/gizmo-viewport.mjs +9 -9
- package/esm2022/gizmos/lib/pivot-controls/axis-arrow.mjs +6 -4
- package/esm2022/gizmos/lib/pivot-controls/axis-rotator.mjs +3 -3
- package/esm2022/gizmos/lib/pivot-controls/pivot-controls.mjs +44 -47
- package/esm2022/gizmos/lib/pivot-controls/plane-slider.mjs +3 -3
- package/esm2022/gizmos/lib/pivot-controls/scaling-sphere.mjs +3 -3
- package/esm2022/gizmos/lib/transform-controls.mjs +3 -3
- package/esm2022/loaders/lib/loader.mjs +3 -3
- package/esm2022/materials/lib/custom-shader-material.mjs +8 -12
- package/esm2022/materials/lib/mesh-distort-material.mjs +3 -3
- package/esm2022/materials/lib/mesh-reflector-material.mjs +11 -15
- package/esm2022/materials/lib/mesh-refraction-material.mjs +26 -30
- package/esm2022/materials/lib/mesh-transmission-material.mjs +3 -3
- package/esm2022/materials/lib/mesh-wobble-material.mjs +3 -3
- package/esm2022/materials/lib/point-material.mjs +3 -3
- package/esm2022/misc/lib/bake-shadows.mjs +8 -10
- package/esm2022/misc/lib/computed-attribute.mjs +15 -19
- package/esm2022/misc/lib/decal.mjs +56 -53
- package/esm2022/misc/lib/fbo.mjs +10 -10
- package/esm2022/misc/lib/html/html-content.mjs +62 -67
- package/esm2022/misc/lib/html/html.mjs +3 -3
- package/esm2022/misc/lib/intersect.mjs +6 -9
- package/esm2022/misc/lib/sampler.mjs +48 -42
- package/esm2022/performances/lib/adaptive-dpr.mjs +29 -35
- package/esm2022/performances/lib/adaptive-events.mjs +12 -16
- package/esm2022/performances/lib/detailed.mjs +14 -18
- package/esm2022/performances/lib/instances/instances.mjs +16 -22
- package/esm2022/performances/lib/points/points.mjs +19 -25
- package/esm2022/performances/lib/segments/segments.mjs +11 -14
- package/esm2022/shaders/lib/mesh-refraction-material.mjs +1 -1
- package/esm2022/staging/index.mjs +3 -2
- package/esm2022/staging/lib/accumulative-shadows.mjs +19 -21
- package/esm2022/staging/lib/backdrop.mjs +19 -23
- package/esm2022/staging/lib/bb-anchor.mjs +3 -3
- package/esm2022/staging/lib/bounds.mjs +39 -43
- package/esm2022/staging/lib/camera-shake.mjs +14 -18
- package/esm2022/staging/lib/caustics.mjs +24 -28
- package/esm2022/staging/lib/center.mjs +28 -32
- package/esm2022/staging/lib/contact-shadows.mjs +3 -3
- package/esm2022/staging/lib/environment/environment.mjs +338 -0
- package/esm2022/staging/lib/environment/inject-environment.mjs +184 -0
- package/esm2022/staging/lib/float.mjs +3 -3
- package/esm2022/staging/lib/lightformer.mjs +18 -22
- package/esm2022/staging/lib/mask.mjs +8 -12
- package/esm2022/staging/lib/matcap-texture.mjs +9 -11
- package/esm2022/staging/lib/normal-texture.mjs +9 -11
- package/esm2022/staging/lib/randomized-lights.mjs +9 -13
- package/esm2022/staging/lib/render-texture.mjs +19 -20
- package/esm2022/staging/lib/sky.mjs +3 -3
- package/esm2022/staging/lib/spot-light.mjs +32 -40
- package/esm2022/staging/lib/stage.mjs +13 -17
- package/esm2022/stats/lib/stats.mjs +21 -27
- package/fesm2022/angular-three-soba-abstractions.mjs +119 -138
- package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
- package/fesm2022/angular-three-soba-cameras.mjs +57 -64
- package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
- package/fesm2022/angular-three-soba-controls.mjs +129 -135
- package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
- package/fesm2022/angular-three-soba-gizmos.mjs +87 -88
- package/fesm2022/angular-three-soba-gizmos.mjs.map +1 -1
- package/fesm2022/angular-three-soba-loaders.mjs +3 -3
- package/fesm2022/angular-three-soba-materials.mjs +52 -62
- package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
- package/fesm2022/angular-three-soba-misc.mjs +194 -195
- package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
- package/fesm2022/angular-three-soba-performances.mjs +90 -114
- package/fesm2022/angular-three-soba-performances.mjs.map +1 -1
- package/fesm2022/angular-three-soba-shaders.mjs.map +1 -1
- package/fesm2022/angular-three-soba-staging.mjs +427 -430
- package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
- package/fesm2022/angular-three-soba-stats.mjs +20 -26
- package/fesm2022/angular-three-soba-stats.mjs.map +1 -1
- package/gizmos/lib/gizmo-helper/gizmo-viewport.d.ts +1 -1
- package/gizmos/lib/pivot-controls/pivot-controls.d.ts +1 -1
- package/gizmos/lib/transform-controls.d.ts +2 -2
- package/materials/lib/custom-shader-material.d.ts +3 -3
- package/materials/lib/mesh-refraction-material.d.ts +2 -2
- package/materials/lib/mesh-transmission-material.d.ts +1 -1
- package/misc/lib/computed-attribute.d.ts +6 -6
- package/misc/lib/decal.d.ts +4 -4
- package/misc/lib/html/html-content.d.ts +6 -6
- package/misc/lib/sampler.d.ts +2 -4
- package/package.json +8 -8
- package/performances/lib/instances/instances.d.ts +11 -11
- package/performances/lib/points/points.d.ts +19 -19
- package/performances/lib/segments/segments.d.ts +4 -4
- package/shaders/lib/mesh-refraction-material.d.ts +2 -5
- package/staging/index.d.ts +2 -1
- package/staging/lib/accumulative-shadows.d.ts +1 -1
- package/staging/lib/camera-shake.d.ts +0 -1
- package/staging/lib/caustics.d.ts +1 -1
- package/staging/lib/contact-shadows.d.ts +1 -1
- package/staging/lib/{environment.d.ts → environment/environment.d.ts} +20 -49
- package/staging/lib/environment/inject-environment.d.ts +33 -0
- package/staging/lib/lightformer.d.ts +1 -1
- package/staging/lib/matcap-texture.d.ts +0 -1
- package/staging/lib/normal-texture.d.ts +0 -1
- package/staging/lib/render-texture.d.ts +1 -1
- package/staging/lib/sky.d.ts +1 -1
- package/staging/lib/spot-light.d.ts +2 -2
- package/staging/lib/stage.d.ts +2 -1
- package/esm2022/staging/lib/environment.mjs +0 -481
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input,
|
|
2
|
+
import { input, effect, untracked, inject, DestroyRef, Directive, viewChild, Component, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, computed } from '@angular/core';
|
|
3
3
|
import { injectStore, omit, pick, extend, getLocalState, injectBeforeRender, resolveRef, checkUpdate, NgtArgs, vector3 } from 'angular-three';
|
|
4
|
-
import { injectAutoEffect } from 'ngxtension/auto-effect';
|
|
5
4
|
import { mergeInputs } from 'ngxtension/inject-inputs';
|
|
6
5
|
import { LOD, Matrix4, Mesh, Group, Color, Material, Vector3, Quaternion, DynamicDrawUsage, InstancedMesh, InstancedBufferAttribute, Ray, Sphere, Points, BufferAttribute, BufferGeometry, Vector2 } from 'three';
|
|
7
6
|
import { setUpdateRange } from 'angular-three-soba/misc';
|
|
@@ -16,65 +15,57 @@ class NgtsAdaptiveDpr {
|
|
|
16
15
|
const current = store.select('performance', 'current');
|
|
17
16
|
const initialDpr = store.select('viewport', 'initialDpr');
|
|
18
17
|
const setDpr = store.select('setDpr');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
];
|
|
44
|
-
_setDpr(_current * _initialDpr);
|
|
45
|
-
if (pixelated && domElement)
|
|
46
|
-
domElement.style.imageRendering = _current === 1 ? 'auto' : 'pixelated';
|
|
47
|
-
});
|
|
18
|
+
effect(() => {
|
|
19
|
+
const [_current, pixelated, domElement, _setDpr, _initialDpr] = [
|
|
20
|
+
current(),
|
|
21
|
+
untracked(this.pixelated),
|
|
22
|
+
untracked(gl).domElement,
|
|
23
|
+
untracked(setDpr),
|
|
24
|
+
untracked(initialDpr),
|
|
25
|
+
];
|
|
26
|
+
_setDpr(_current * _initialDpr);
|
|
27
|
+
if (pixelated && domElement)
|
|
28
|
+
domElement.style.imageRendering = _current === 1 ? 'auto' : 'pixelated';
|
|
29
|
+
});
|
|
30
|
+
inject(DestroyRef).onDestroy(() => {
|
|
31
|
+
const [domElement, _active, _setDpr, _initialDpr, pixelated] = [
|
|
32
|
+
untracked(gl).domElement,
|
|
33
|
+
untracked(active),
|
|
34
|
+
untracked(setDpr),
|
|
35
|
+
untracked(initialDpr),
|
|
36
|
+
untracked(this.pixelated),
|
|
37
|
+
];
|
|
38
|
+
if (_active)
|
|
39
|
+
_setDpr(_initialDpr);
|
|
40
|
+
if (pixelated && domElement)
|
|
41
|
+
domElement.style.imageRendering = 'auto';
|
|
48
42
|
});
|
|
49
43
|
}
|
|
50
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
51
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
44
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsAdaptiveDpr, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
45
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.4", type: NgtsAdaptiveDpr, isStandalone: true, selector: "ngts-adaptive-dpr", inputs: { pixelated: { classPropertyName: "pixelated", publicName: "pixelated", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
52
46
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsAdaptiveDpr, decorators: [{
|
|
54
48
|
type: Directive,
|
|
55
49
|
args: [{ selector: 'ngts-adaptive-dpr', standalone: true }]
|
|
56
50
|
}], ctorParameters: () => [] });
|
|
57
51
|
|
|
58
52
|
class NgtsAdaptiveEvents {
|
|
59
53
|
constructor() {
|
|
60
|
-
const autoEffect = injectAutoEffect();
|
|
61
54
|
const store = injectStore();
|
|
62
55
|
const current = store.select('performance', 'current');
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return () => store.snapshot.setEvents({ enabled: _current === 1 });
|
|
71
|
-
});
|
|
56
|
+
const currentEnabled = store.snapshot.events.enabled;
|
|
57
|
+
effect((onCleanup) => {
|
|
58
|
+
const _current = current();
|
|
59
|
+
onCleanup(() => store.snapshot.setEvents({ enabled: _current === 1 }));
|
|
60
|
+
});
|
|
61
|
+
inject(DestroyRef).onDestroy(() => {
|
|
62
|
+
store.snapshot.setEvents({ enabled: currentEnabled });
|
|
72
63
|
});
|
|
73
64
|
}
|
|
74
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
75
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.
|
|
65
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsAdaptiveEvents, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
66
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: NgtsAdaptiveEvents, isStandalone: true, selector: "ngts-adaptive-events", ngImport: i0 }); }
|
|
76
67
|
}
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsAdaptiveEvents, decorators: [{
|
|
78
69
|
type: Directive,
|
|
79
70
|
args: [{ standalone: true, selector: 'ngts-adaptive-events' }]
|
|
80
71
|
}], ctorParameters: () => [] });
|
|
@@ -90,32 +81,29 @@ class NgtsDetailed {
|
|
|
90
81
|
this.lodRef = viewChild.required('lod');
|
|
91
82
|
this.hysteresis = pick(this.options, 'hysteresis');
|
|
92
83
|
extend({ LOD });
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
lod.levels.
|
|
102
|
-
lod.children.forEach((object, index) => {
|
|
103
|
-
lod.levels.push({ object, distance: distances[index], hysteresis });
|
|
104
|
-
});
|
|
84
|
+
effect(() => {
|
|
85
|
+
const lod = this.lodRef().nativeElement;
|
|
86
|
+
const localState = getLocalState(lod);
|
|
87
|
+
if (!localState)
|
|
88
|
+
return;
|
|
89
|
+
const [, distances, hysteresis] = [localState.objects(), this.distances(), this.hysteresis()];
|
|
90
|
+
lod.levels.length = 0;
|
|
91
|
+
lod.children.forEach((object, index) => {
|
|
92
|
+
lod.levels.push({ object, distance: distances[index], hysteresis });
|
|
105
93
|
});
|
|
106
94
|
});
|
|
107
95
|
injectBeforeRender(({ camera }) => {
|
|
108
96
|
this.lodRef().nativeElement.update(camera);
|
|
109
97
|
});
|
|
110
98
|
}
|
|
111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
112
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.
|
|
99
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsDetailed, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
100
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsDetailed, isStandalone: true, selector: "ngts-detailed", inputs: { distances: { classPropertyName: "distances", publicName: "distances", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "lodRef", first: true, predicate: ["lod"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
113
101
|
<ngt-lOD #lod [parameters]="parameters()">
|
|
114
102
|
<ng-content />
|
|
115
103
|
</ngt-lOD>
|
|
116
104
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
117
105
|
}
|
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsDetailed, decorators: [{
|
|
119
107
|
type: Component,
|
|
120
108
|
args: [{
|
|
121
109
|
selector: 'ngts-detailed',
|
|
@@ -191,21 +179,19 @@ class NgtsInstance {
|
|
|
191
179
|
this.instances = inject(NgtsInstances);
|
|
192
180
|
this.positionMeshRef = viewChild.required('positionMesh');
|
|
193
181
|
extend({ PositionMesh });
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
return this.instances.subscribe(this.positionMeshRef().nativeElement);
|
|
198
|
-
});
|
|
182
|
+
effect((onCleanup) => {
|
|
183
|
+
const cleanup = this.instances.subscribe(this.positionMeshRef().nativeElement);
|
|
184
|
+
onCleanup(() => cleanup());
|
|
199
185
|
});
|
|
200
186
|
}
|
|
201
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
202
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.
|
|
187
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsInstance, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
188
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsInstance, isStandalone: true, selector: "ngts-instance", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "positionMeshRef", first: true, predicate: ["positionMesh"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
203
189
|
<ngt-position-mesh #positionMesh [instance]="instances.instancedMeshRef()" [parameters]="options()">
|
|
204
190
|
<ng-content />
|
|
205
191
|
</ngt-position-mesh>
|
|
206
192
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
207
193
|
}
|
|
208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsInstance, decorators: [{
|
|
209
195
|
type: Component,
|
|
210
196
|
args: [{
|
|
211
197
|
selector: 'ngts-instance',
|
|
@@ -241,14 +227,11 @@ class NgtsInstances {
|
|
|
241
227
|
});
|
|
242
228
|
this.instances = [];
|
|
243
229
|
extend({ InstancedMesh, InstancedBufferAttribute });
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
return;
|
|
250
|
-
checkUpdate(instancedMesh.instanceMatrix);
|
|
251
|
-
});
|
|
230
|
+
effect(() => {
|
|
231
|
+
const instancedMesh = this.instancedMeshRef()?.nativeElement;
|
|
232
|
+
if (!instancedMesh)
|
|
233
|
+
return;
|
|
234
|
+
checkUpdate(instancedMesh.instanceMatrix);
|
|
252
235
|
});
|
|
253
236
|
let iterations = 0;
|
|
254
237
|
let count = 0;
|
|
@@ -291,8 +274,8 @@ class NgtsInstances {
|
|
|
291
274
|
this.instances = this.instances.filter((i) => i !== ref);
|
|
292
275
|
};
|
|
293
276
|
}
|
|
294
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
295
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.
|
|
277
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsInstances, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
278
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsInstances, isStandalone: true, selector: "ngts-instances", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "instancedMeshRef", first: true, predicate: ["instancedMesh"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
296
279
|
<ngt-instanced-mesh
|
|
297
280
|
#instancedMesh
|
|
298
281
|
[userData]="{ instances }"
|
|
@@ -318,7 +301,7 @@ class NgtsInstances {
|
|
|
318
301
|
</ngt-instanced-mesh>
|
|
319
302
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
320
303
|
}
|
|
321
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsInstances, decorators: [{
|
|
322
305
|
type: Component,
|
|
323
306
|
args: [{
|
|
324
307
|
selector: 'ngts-instances',
|
|
@@ -411,21 +394,19 @@ class NgtsPoint {
|
|
|
411
394
|
this.positionPointRef = viewChild.required('positionPoint');
|
|
412
395
|
this.points = inject(NgtsPointsInstances);
|
|
413
396
|
extend({ PositionPoint });
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
return this.points.subscribe(this.positionPointRef().nativeElement);
|
|
418
|
-
});
|
|
397
|
+
effect((onCleanup) => {
|
|
398
|
+
const cleanUp = this.points.subscribe(this.positionPointRef().nativeElement);
|
|
399
|
+
onCleanup(() => cleanUp());
|
|
419
400
|
});
|
|
420
401
|
}
|
|
421
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
422
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.
|
|
402
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsPoint, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
403
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsPoint, isStandalone: true, selector: "ngts-point", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "positionPointRef", first: true, predicate: ["positionPoint"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
423
404
|
<ngt-position-point #positionPoint [parameters]="options()" [instance]="points.pointsRef()">
|
|
424
405
|
<ng-content />
|
|
425
406
|
</ngt-position-point>
|
|
426
407
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
427
408
|
}
|
|
428
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsPoint, decorators: [{
|
|
429
410
|
type: Component,
|
|
430
411
|
args: [{
|
|
431
412
|
selector: 'ngts-point',
|
|
@@ -461,8 +442,8 @@ class NgtsPointsBuffer {
|
|
|
461
442
|
checkUpdate(attributes['size']);
|
|
462
443
|
});
|
|
463
444
|
}
|
|
464
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
465
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
445
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsPointsBuffer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
446
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.4", type: NgtsPointsBuffer, isStandalone: true, selector: "ngts-points-buffer", inputs: { positions: { classPropertyName: "positions", publicName: "positions", isSignal: true, isRequired: true, transformFunction: null }, colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null }, sizes: { classPropertyName: "sizes", publicName: "sizes", isSignal: true, isRequired: false, transformFunction: null }, stride: { classPropertyName: "stride", publicName: "stride", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "pointsRef", first: true, predicate: ["points"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
466
447
|
<ngt-points #points [parameters]="options()">
|
|
467
448
|
<ngt-buffer-geometry>
|
|
468
449
|
<ngt-buffer-attribute
|
|
@@ -495,7 +476,7 @@ class NgtsPointsBuffer {
|
|
|
495
476
|
</ngt-points>
|
|
496
477
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
497
478
|
}
|
|
498
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsPointsBuffer, decorators: [{
|
|
499
480
|
type: Component,
|
|
500
481
|
args: [{
|
|
501
482
|
selector: 'ngts-points-buffer',
|
|
@@ -556,14 +537,11 @@ class NgtsPointsInstances {
|
|
|
556
537
|
this.positionPoints = [];
|
|
557
538
|
this.DynamicDrawUsage = DynamicDrawUsage;
|
|
558
539
|
extend({ Points, BufferAttribute, BufferGeometry });
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
return;
|
|
565
|
-
checkUpdate(points.geometry.attributes['position']);
|
|
566
|
-
});
|
|
540
|
+
effect(() => {
|
|
541
|
+
const points = this.pointsRef()?.nativeElement;
|
|
542
|
+
if (!points)
|
|
543
|
+
return;
|
|
544
|
+
checkUpdate(points.geometry.attributes['position']);
|
|
567
545
|
});
|
|
568
546
|
injectBeforeRender(() => {
|
|
569
547
|
const points = this.pointsRef()?.nativeElement;
|
|
@@ -596,8 +574,8 @@ class NgtsPointsInstances {
|
|
|
596
574
|
this.positionPoints = this.positionPoints.filter((p) => p !== ref);
|
|
597
575
|
};
|
|
598
576
|
}
|
|
599
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
600
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.
|
|
577
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsPointsInstances, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
578
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsPointsInstances, isStandalone: true, selector: "ngts-points-instances", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "pointsRef", first: true, predicate: ["points"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
601
579
|
<ngt-points
|
|
602
580
|
#points
|
|
603
581
|
[userData]="{ instances: positionPoints }"
|
|
@@ -632,7 +610,7 @@ class NgtsPointsInstances {
|
|
|
632
610
|
</ngt-points>
|
|
633
611
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
634
612
|
}
|
|
635
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
613
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsPointsInstances, decorators: [{
|
|
636
614
|
type: Component,
|
|
637
615
|
args: [{
|
|
638
616
|
selector: 'ngts-points-instances',
|
|
@@ -694,19 +672,17 @@ class NgtsSegment {
|
|
|
694
672
|
this.segmentRef = viewChild.required('segment');
|
|
695
673
|
this.segments = inject(NgtsSegments);
|
|
696
674
|
extend({ SegmentObject });
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
return this.segments.subscribe(this.segmentRef());
|
|
701
|
-
});
|
|
675
|
+
effect((onCleanup) => {
|
|
676
|
+
const cleanUp = this.segments.subscribe(this.segmentRef());
|
|
677
|
+
onCleanup(() => cleanUp());
|
|
702
678
|
});
|
|
703
679
|
}
|
|
704
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
705
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.
|
|
680
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsSegment, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
681
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsSegment, isStandalone: true, selector: "ngts-segment", inputs: { start: { classPropertyName: "start", publicName: "start", isSignal: true, isRequired: true, transformFunction: null }, end: { classPropertyName: "end", publicName: "end", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "segmentRef", first: true, predicate: ["segment"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
706
682
|
<ngt-segment-object #segment [color]="color()" [start]="normalizedStart()" [end]="normalizedEnd()" />
|
|
707
683
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
708
684
|
}
|
|
709
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsSegment, decorators: [{
|
|
710
686
|
type: Component,
|
|
711
687
|
args: [{
|
|
712
688
|
selector: 'ngts-segment',
|
|
@@ -778,8 +754,8 @@ class NgtsSegments {
|
|
|
778
754
|
this.segments = this.segments.filter((i) => i !== ref);
|
|
779
755
|
};
|
|
780
756
|
}
|
|
781
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
782
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.
|
|
757
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsSegments, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
758
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsSegments, isStandalone: true, selector: "ngts-segments", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "lineRef", first: true, predicate: ["line"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
783
759
|
<ngt-primitive #line *args="[line]">
|
|
784
760
|
<ngt-primitive *args="[geometry]" attach="geometry" />
|
|
785
761
|
<ngt-primitive *args="[material]" attach="material" [parameters]="materialParameters()" />
|
|
@@ -787,7 +763,7 @@ class NgtsSegments {
|
|
|
787
763
|
</ngt-primitive>
|
|
788
764
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
789
765
|
}
|
|
790
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
766
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsSegments, decorators: [{
|
|
791
767
|
type: Component,
|
|
792
768
|
args: [{
|
|
793
769
|
selector: 'ngts-segments',
|