angular-three-soba 4.2.1 → 4.2.2
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-soba-abstractions.mjs +98 -98
- package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
- package/fesm2022/angular-three-soba-cameras.mjs +26 -26
- package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
- package/fesm2022/angular-three-soba-controls.mjs +32 -32
- package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
- package/fesm2022/angular-three-soba-gizmos.mjs +119 -119
- package/fesm2022/angular-three-soba-gizmos.mjs.map +1 -1
- package/fesm2022/angular-three-soba-loaders.mjs +6 -6
- package/fesm2022/angular-three-soba-loaders.mjs.map +1 -1
- package/fesm2022/angular-three-soba-materials.mjs +75 -75
- package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
- package/fesm2022/angular-three-soba-misc.mjs +70 -70
- package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
- package/fesm2022/angular-three-soba-performances.mjs +67 -67
- package/fesm2022/angular-three-soba-performances.mjs.map +1 -1
- package/fesm2022/angular-three-soba-staging.mjs +257 -257
- package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
- package/fesm2022/angular-three-soba-stats.mjs +5 -5
- package/fesm2022/angular-three-soba-stats.mjs.map +1 -1
- package/package.json +3 -2
- package/types/angular-three-soba-misc.d.ts +6 -1
- package/types/angular-three-soba-staging.d.ts +1 -1
|
@@ -48,7 +48,7 @@ function animations(animationsFactory, object, { injector } = {}) {
|
|
|
48
48
|
const actions = {};
|
|
49
49
|
const clips = [];
|
|
50
50
|
const names = [];
|
|
51
|
-
const actualObject = computed(() => isSignal(object) || typeof object === 'function' ? resolveRef(object()) : resolveRef(object), ...(ngDevMode ? [{ debugName: "actualObject" }] : []));
|
|
51
|
+
const actualObject = computed(() => isSignal(object) || typeof object === 'function' ? resolveRef(object()) : resolveRef(object), ...(ngDevMode ? [{ debugName: "actualObject" }] : /* istanbul ignore next */ []));
|
|
52
52
|
const isReady = computed(() => {
|
|
53
53
|
const obj = actualObject();
|
|
54
54
|
if (!obj)
|
|
@@ -77,7 +77,7 @@ function animations(animationsFactory, object, { injector } = {}) {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
return true;
|
|
80
|
-
}, ...(ngDevMode ? [{ debugName: "isReady" }] : []));
|
|
80
|
+
}, ...(ngDevMode ? [{ debugName: "isReady" }] : /* istanbul ignore next */ []));
|
|
81
81
|
inject(DestroyRef).onDestroy(() => {
|
|
82
82
|
const obj = actualObject();
|
|
83
83
|
// clear cached
|
|
@@ -136,10 +136,10 @@ class NgtsBakeShadows {
|
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
140
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
139
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsBakeShadows, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
140
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: NgtsBakeShadows, isStandalone: true, selector: "ngts-bake-shadows", ngImport: i0 }); }
|
|
141
141
|
}
|
|
142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsBakeShadows, decorators: [{
|
|
143
143
|
type: Directive,
|
|
144
144
|
args: [{ selector: 'ngts-bake-shadows' }]
|
|
145
145
|
}], ctorParameters: () => [] });
|
|
@@ -179,17 +179,17 @@ class NgtsComputedAttribute {
|
|
|
179
179
|
* Function that computes the BufferAttribute from the parent geometry.
|
|
180
180
|
* Called whenever the geometry or compute function changes.
|
|
181
181
|
*/
|
|
182
|
-
this.compute = input.required(...(ngDevMode ? [{ debugName: "compute" }] : []));
|
|
182
|
+
this.compute = input.required(...(ngDevMode ? [{ debugName: "compute" }] : /* istanbul ignore next */ []));
|
|
183
183
|
/**
|
|
184
184
|
* The attribute name to attach to the geometry (e.g., 'uv2', 'customData').
|
|
185
185
|
*/
|
|
186
|
-
this.name = input.required(...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
186
|
+
this.name = input.required(...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
187
187
|
/**
|
|
188
188
|
* Additional options to pass to the underlying buffer attribute.
|
|
189
189
|
*/
|
|
190
|
-
this.options = input({}, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
190
|
+
this.options = input({}, ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
191
191
|
this.bufferAttribute = new THREE.BufferAttribute(new Float32Array(0), 1);
|
|
192
|
-
this.attributeRef = viewChild('attribute', ...(ngDevMode ? [{ debugName: "attributeRef" }] : []));
|
|
192
|
+
this.attributeRef = viewChild('attribute', ...(ngDevMode ? [{ debugName: "attributeRef" }] : /* istanbul ignore next */ []));
|
|
193
193
|
effect(() => {
|
|
194
194
|
const bufferAttribute = this.attributeRef()?.nativeElement;
|
|
195
195
|
if (!bufferAttribute)
|
|
@@ -202,14 +202,14 @@ class NgtsComputedAttribute {
|
|
|
202
202
|
bufferAttribute.copy(attribute);
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
206
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
205
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsComputedAttribute, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
206
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: NgtsComputedAttribute, isStandalone: true, selector: "ngts-computed-attribute", inputs: { compute: { classPropertyName: "compute", publicName: "compute", isSignal: true, isRequired: true, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "attributeRef", first: true, predicate: ["attribute"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
207
207
|
<ngt-primitive #attribute *args="[bufferAttribute]" [attach]="['attributes', name()]" [parameters]="options()">
|
|
208
208
|
<ng-content />
|
|
209
209
|
</ngt-primitive>
|
|
210
210
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
211
211
|
}
|
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsComputedAttribute, decorators: [{
|
|
213
213
|
type: Component,
|
|
214
214
|
args: [{
|
|
215
215
|
selector: 'ngts-computed-attribute',
|
|
@@ -281,11 +281,11 @@ class NgtsDecal {
|
|
|
281
281
|
* Optional external mesh to project the decal onto.
|
|
282
282
|
* If not provided, uses the parent mesh in the scene graph.
|
|
283
283
|
*/
|
|
284
|
-
this.mesh = input(...(ngDevMode ? [undefined, { debugName: "mesh" }] : []));
|
|
284
|
+
this.mesh = input(...(ngDevMode ? [undefined, { debugName: "mesh" }] : /* istanbul ignore next */ []));
|
|
285
285
|
/**
|
|
286
286
|
* Decal configuration options including position, scale, rotation, and material properties.
|
|
287
287
|
*/
|
|
288
|
-
this.options = input(defaultOptions$2, { ...(ngDevMode ? { debugName: "options" } : {}), transform: mergeInputs(defaultOptions$2) });
|
|
288
|
+
this.options = input(defaultOptions$2, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), transform: mergeInputs(defaultOptions$2) });
|
|
289
289
|
this.parameters = omit(this.options, [
|
|
290
290
|
'debug',
|
|
291
291
|
'map',
|
|
@@ -296,7 +296,7 @@ class NgtsDecal {
|
|
|
296
296
|
'rotation',
|
|
297
297
|
]);
|
|
298
298
|
this.meshRef = viewChild.required('mesh');
|
|
299
|
-
this.helperRef = viewChild('helper', ...(ngDevMode ? [{ debugName: "helperRef" }] : []));
|
|
299
|
+
this.helperRef = viewChild('helper', ...(ngDevMode ? [{ debugName: "helperRef" }] : /* istanbul ignore next */ []));
|
|
300
300
|
this.map = pick(this.options, 'map');
|
|
301
301
|
this.depthTest = pick(this.options, 'depthTest');
|
|
302
302
|
this.polygonOffsetFactor = pick(this.options, 'polygonOffsetFactor');
|
|
@@ -393,8 +393,8 @@ class NgtsDecal {
|
|
|
393
393
|
});
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
397
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
396
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsDecal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
397
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: NgtsDecal, isStandalone: true, selector: "ngts-decal", inputs: { mesh: { classPropertyName: "mesh", publicName: "mesh", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "meshRef", first: true, predicate: ["mesh"], descendants: true, isSignal: true }, { propertyName: "helperRef", first: true, predicate: ["helper"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
398
398
|
<ngt-mesh #mesh [parameters]="parameters()">
|
|
399
399
|
<ngt-value [rawValue]="true" attach="material.transparent" />
|
|
400
400
|
<ngt-value [rawValue]="true" attach="material.polygonOffset" />
|
|
@@ -416,7 +416,7 @@ class NgtsDecal {
|
|
|
416
416
|
</ngt-mesh>
|
|
417
417
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
418
418
|
}
|
|
419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsDecal, decorators: [{
|
|
420
420
|
type: Component,
|
|
421
421
|
args: [{
|
|
422
422
|
selector: 'ngts-decal',
|
|
@@ -515,11 +515,11 @@ function fbo(params = () => ({}), { injector } = {}) {
|
|
|
515
515
|
const width = computed(() => {
|
|
516
516
|
const { width } = params();
|
|
517
517
|
return typeof width === 'number' ? width : store.size.width() * store.viewport.dpr();
|
|
518
|
-
}, ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
518
|
+
}, ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
519
519
|
const height = computed(() => {
|
|
520
520
|
const { height } = params();
|
|
521
521
|
return typeof height === 'number' ? height : store.size.height() * store.viewport.dpr();
|
|
522
|
-
}, ...(ngDevMode ? [{ debugName: "height" }] : []));
|
|
522
|
+
}, ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
523
523
|
const settings = computed(() => {
|
|
524
524
|
const { width, settings } = params();
|
|
525
525
|
const _settings = (typeof width === 'number' ? settings : width) || {};
|
|
@@ -527,7 +527,7 @@ function fbo(params = () => ({}), { injector } = {}) {
|
|
|
527
527
|
_settings.samples = 0;
|
|
528
528
|
}
|
|
529
529
|
return _settings;
|
|
530
|
-
}, ...(ngDevMode ? [{ debugName: "settings" }] : []));
|
|
530
|
+
}, ...(ngDevMode ? [{ debugName: "settings" }] : /* istanbul ignore next */ []));
|
|
531
531
|
const target = (() => {
|
|
532
532
|
const [{ samples = 0, depth, ...targetSettings }, _width, _height] = [
|
|
533
533
|
untracked(settings),
|
|
@@ -583,7 +583,7 @@ class NgtsFBO {
|
|
|
583
583
|
/**
|
|
584
584
|
* FBO configuration including width, height, and RenderTargetOptions.
|
|
585
585
|
*/
|
|
586
|
-
this.fbo = input({}, ...(ngDevMode ? [{ debugName: "fbo" }] : []));
|
|
586
|
+
this.fbo = input({}, ...(ngDevMode ? [{ debugName: "fbo" }] : /* istanbul ignore next */ []));
|
|
587
587
|
this.template = inject(TemplateRef);
|
|
588
588
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
589
589
|
const fboTarget = fbo(() => {
|
|
@@ -603,10 +603,10 @@ class NgtsFBO {
|
|
|
603
603
|
static ngTemplateContextGuard(_, ctx) {
|
|
604
604
|
return true;
|
|
605
605
|
}
|
|
606
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
607
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
606
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsFBO, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
607
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtsFBO, isStandalone: true, selector: "ng-template[fbo]", inputs: { fbo: { classPropertyName: "fbo", publicName: "fbo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
608
608
|
}
|
|
609
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
609
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsFBO, decorators: [{
|
|
610
610
|
type: Directive,
|
|
611
611
|
args: [{ selector: 'ng-template[fbo]' }]
|
|
612
612
|
}], ctorParameters: () => [], propDecorators: { fbo: [{ type: i0.Input, args: [{ isSignal: true, alias: "fbo", required: false }] }] } });
|
|
@@ -637,17 +637,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
637
637
|
*/
|
|
638
638
|
function depthBuffer(params = () => ({}), { injector } = {}) {
|
|
639
639
|
return assertInjector(depthBuffer, injector, () => {
|
|
640
|
-
const size = computed(() => params().size || 256, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
641
|
-
const frames = computed(() => params().frames || Infinity, ...(ngDevMode ? [{ debugName: "frames" }] : []));
|
|
640
|
+
const size = computed(() => params().size || 256, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
641
|
+
const frames = computed(() => params().frames || Infinity, ...(ngDevMode ? [{ debugName: "frames" }] : /* istanbul ignore next */ []));
|
|
642
642
|
const store = injectStore();
|
|
643
|
-
const w = computed(() => size() || store.size.width() * store.viewport.dpr(), ...(ngDevMode ? [{ debugName: "w" }] : []));
|
|
644
|
-
const h = computed(() => size() || store.size.height() * store.viewport.dpr(), ...(ngDevMode ? [{ debugName: "h" }] : []));
|
|
643
|
+
const w = computed(() => size() || store.size.width() * store.viewport.dpr(), ...(ngDevMode ? [{ debugName: "w" }] : /* istanbul ignore next */ []));
|
|
644
|
+
const h = computed(() => size() || store.size.height() * store.viewport.dpr(), ...(ngDevMode ? [{ debugName: "h" }] : /* istanbul ignore next */ []));
|
|
645
645
|
const depthConfig = computed(() => {
|
|
646
646
|
const depthTexture = new THREE.DepthTexture(w(), h());
|
|
647
647
|
depthTexture.format = THREE.DepthFormat;
|
|
648
648
|
depthTexture.type = THREE.UnsignedShortType;
|
|
649
649
|
return { depthTexture };
|
|
650
|
-
}, ...(ngDevMode ? [{ debugName: "depthConfig" }] : []));
|
|
650
|
+
}, ...(ngDevMode ? [{ debugName: "depthConfig" }] : /* istanbul ignore next */ []));
|
|
651
651
|
const depthFBO = fbo(() => ({ width: w(), height: h(), settings: depthConfig() }));
|
|
652
652
|
let count = 0;
|
|
653
653
|
beforeRender(({ gl, scene, camera }) => {
|
|
@@ -895,7 +895,7 @@ class NgtsHTMLContent extends NgtHTML {
|
|
|
895
895
|
* Content positioning and behavior options.
|
|
896
896
|
* Aliased as `htmlContent` for use with the `[htmlContent]` attribute selector.
|
|
897
897
|
*/
|
|
898
|
-
this.options = input(defaultHtmlContentOptions, { ...(ngDevMode ? { debugName: "options" } : {}), transform: mergeInputs(defaultHtmlContentOptions),
|
|
898
|
+
this.options = input(defaultHtmlContentOptions, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), transform: mergeInputs(defaultHtmlContentOptions),
|
|
899
899
|
alias: 'htmlContent' });
|
|
900
900
|
/**
|
|
901
901
|
* Emits when occlusion state changes.
|
|
@@ -907,11 +907,11 @@ class NgtsHTMLContent extends NgtHTML {
|
|
|
907
907
|
*/
|
|
908
908
|
this.occluded = output();
|
|
909
909
|
/** Reference to outer transform container (transform mode only) */
|
|
910
|
-
this.transformOuterRef = viewChild('transformOuter', ...(ngDevMode ? [{ debugName: "transformOuterRef" }] : []));
|
|
910
|
+
this.transformOuterRef = viewChild('transformOuter', ...(ngDevMode ? [{ debugName: "transformOuterRef" }] : /* istanbul ignore next */ []));
|
|
911
911
|
/** Reference to inner transform container (transform mode only) */
|
|
912
|
-
this.transformInnerRef = viewChild('transformInner', ...(ngDevMode ? [{ debugName: "transformInnerRef" }] : []));
|
|
912
|
+
this.transformInnerRef = viewChild('transformInner', ...(ngDevMode ? [{ debugName: "transformInnerRef" }] : /* istanbul ignore next */ []));
|
|
913
913
|
/** Reference to the content container div */
|
|
914
|
-
this.containerRef = viewChild('container', ...(ngDevMode ? [{ debugName: "containerRef" }] : []));
|
|
914
|
+
this.containerRef = viewChild('container', ...(ngDevMode ? [{ debugName: "containerRef" }] : /* istanbul ignore next */ []));
|
|
915
915
|
this.html = inject(NgtsHTMLImpl);
|
|
916
916
|
this.host = inject(ElementRef);
|
|
917
917
|
this.store = injectStore();
|
|
@@ -930,7 +930,7 @@ class NgtsHTMLContent extends NgtHTML {
|
|
|
930
930
|
if (parent)
|
|
931
931
|
return parent;
|
|
932
932
|
return (this.store.events.connected?.() || this.store.gl.domElement.parentNode());
|
|
933
|
-
}, ...(ngDevMode ? [{ debugName: "target" }] : []));
|
|
933
|
+
}, ...(ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []));
|
|
934
934
|
const renderer = inject(Renderer2);
|
|
935
935
|
let isMeshSizeSet = false;
|
|
936
936
|
effect(() => {
|
|
@@ -1145,8 +1145,8 @@ class NgtsHTMLContent extends NgtHTML {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1149
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
1148
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsHTMLContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1149
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: NgtsHTMLContent, isStandalone: true, selector: "div[htmlContent]", inputs: { options: { classPropertyName: "options", publicName: "htmlContent", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { occluded: "occluded" }, host: { attributes: { "data-ngts-html-content": "" } }, viewQueries: [{ propertyName: "transformOuterRef", first: true, predicate: ["transformOuter"], descendants: true, isSignal: true }, { propertyName: "transformInnerRef", first: true, predicate: ["transformInner"], descendants: true, isSignal: true }, { propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
1150
1150
|
@if (html.transform()) {
|
|
1151
1151
|
<div
|
|
1152
1152
|
#transformOuter
|
|
@@ -1181,7 +1181,7 @@ class NgtsHTMLContent extends NgtHTML {
|
|
|
1181
1181
|
</ng-template>
|
|
1182
1182
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1183
1183
|
}
|
|
1184
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsHTMLContent, decorators: [{
|
|
1185
1185
|
type: Component,
|
|
1186
1186
|
args: [{
|
|
1187
1187
|
selector: 'div[htmlContent]',
|
|
@@ -1261,14 +1261,14 @@ class NgtsHTMLImpl {
|
|
|
1261
1261
|
/**
|
|
1262
1262
|
* HTML anchor configuration including position, occlusion, and transform settings.
|
|
1263
1263
|
*/
|
|
1264
|
-
this.options = input(defaultHtmlOptions, { ...(ngDevMode ? { debugName: "options" } : {}), transform: mergeInputs(defaultHtmlOptions) });
|
|
1264
|
+
this.options = input(defaultHtmlOptions, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), transform: mergeInputs(defaultHtmlOptions) });
|
|
1265
1265
|
this.parameters = omit(this.options, ['occlude', 'castShadow', 'receiveShadow', 'transform']);
|
|
1266
1266
|
/** Reference to the THREE.Group that serves as the 3D anchor point */
|
|
1267
1267
|
this.groupRef = viewChild.required('group');
|
|
1268
1268
|
/** Reference to the occlusion mesh (when using blending occlusion mode) */
|
|
1269
|
-
this.occlusionMeshRef = viewChild('occlusionMesh', ...(ngDevMode ? [{ debugName: "occlusionMeshRef" }] : []));
|
|
1269
|
+
this.occlusionMeshRef = viewChild('occlusionMesh', ...(ngDevMode ? [{ debugName: "occlusionMeshRef" }] : /* istanbul ignore next */ []));
|
|
1270
1270
|
/** Reference to the occlusion geometry */
|
|
1271
|
-
this.occlusionGeometryRef = viewChild('occlusionGeometry', ...(ngDevMode ? [{ debugName: "occlusionGeometryRef" }] : []));
|
|
1271
|
+
this.occlusionGeometryRef = viewChild('occlusionGeometry', ...(ngDevMode ? [{ debugName: "occlusionGeometryRef" }] : /* istanbul ignore next */ []));
|
|
1272
1272
|
this.castShadow = pick(this.options, 'castShadow');
|
|
1273
1273
|
this.receiveShadow = pick(this.options, 'receiveShadow');
|
|
1274
1274
|
/** Current occlusion mode setting */
|
|
@@ -1278,7 +1278,7 @@ class NgtsHTMLImpl {
|
|
|
1278
1278
|
this.isRaycastOcclusion = computed(() => {
|
|
1279
1279
|
const occlude = this.occlude();
|
|
1280
1280
|
return (occlude && occlude !== 'blending') || (Array.isArray(occlude) && occlude.length && is.ref(occlude[0]));
|
|
1281
|
-
}, ...(ngDevMode ? [{ debugName: "isRaycastOcclusion" }] : []));
|
|
1281
|
+
}, ...(ngDevMode ? [{ debugName: "isRaycastOcclusion" }] : /* istanbul ignore next */ []));
|
|
1282
1282
|
this.shaders = computed(() => {
|
|
1283
1283
|
const transform = this.transform();
|
|
1284
1284
|
const vertexShader = !transform
|
|
@@ -1323,14 +1323,14 @@ class NgtsHTMLImpl {
|
|
|
1323
1323
|
}
|
|
1324
1324
|
`;
|
|
1325
1325
|
return { vertexShader, fragmentShader };
|
|
1326
|
-
}, ...(ngDevMode ? [{ debugName: "shaders" }] : []));
|
|
1326
|
+
}, ...(ngDevMode ? [{ debugName: "shaders" }] : /* istanbul ignore next */ []));
|
|
1327
1327
|
this.vertexShader = pick(this.shaders, 'vertexShader');
|
|
1328
1328
|
this.fragmentShader = pick(this.shaders, 'fragmentShader');
|
|
1329
1329
|
this.DoubleSide = THREE.DoubleSide;
|
|
1330
1330
|
extend({ Group, Mesh, PlaneGeometry, ShaderMaterial });
|
|
1331
1331
|
}
|
|
1332
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1333
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
1332
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsHTMLImpl, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1333
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: NgtsHTMLImpl, isStandalone: true, selector: "ngts-html", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "occlusionMeshRef", first: true, predicate: ["occlusionMesh"], descendants: true, isSignal: true }, { propertyName: "occlusionGeometryRef", first: true, predicate: ["occlusionGeometry"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1334
1334
|
<ngt-group #group [parameters]="parameters()">
|
|
1335
1335
|
@if (occlude() && !isRaycastOcclusion()) {
|
|
1336
1336
|
<ngt-mesh #occlusionMesh [castShadow]="castShadow()" [receiveShadow]="receiveShadow()">
|
|
@@ -1351,7 +1351,7 @@ class NgtsHTMLImpl {
|
|
|
1351
1351
|
<ng-content />
|
|
1352
1352
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1353
1353
|
}
|
|
1354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsHTMLImpl, decorators: [{
|
|
1355
1355
|
type: Component,
|
|
1356
1356
|
args: [{
|
|
1357
1357
|
selector: 'ngts-html',
|
|
@@ -1484,14 +1484,14 @@ class NgtsIntersect {
|
|
|
1484
1484
|
* Two-way bound signal indicating frustum intersection state.
|
|
1485
1485
|
* `true` when object is visible, `false` when outside frustum.
|
|
1486
1486
|
*/
|
|
1487
|
-
this.intersect = model(false, ...(ngDevMode ? [{ debugName: "intersect" }] : []));
|
|
1487
|
+
this.intersect = model(false, ...(ngDevMode ? [{ debugName: "intersect" }] : /* istanbul ignore next */ []));
|
|
1488
1488
|
const host = inject(ElementRef);
|
|
1489
1489
|
intersect(() => host, { source: this.intersect });
|
|
1490
1490
|
}
|
|
1491
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1492
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1491
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsIntersect, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1492
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtsIntersect, isStandalone: true, selector: "[intersect]", inputs: { intersect: { classPropertyName: "intersect", publicName: "intersect", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { intersect: "intersectChange" }, ngImport: i0 }); }
|
|
1493
1493
|
}
|
|
1494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1494
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsIntersect, decorators: [{
|
|
1495
1495
|
type: Directive,
|
|
1496
1496
|
args: [{ selector: '[intersect]' }]
|
|
1497
1497
|
}], ctorParameters: () => [], propDecorators: { intersect: [{ type: i0.Input, args: [{ isSignal: true, alias: "intersect", required: false }] }, { type: i0.Output, args: ["intersectChange"] }] } });
|
|
@@ -1518,28 +1518,28 @@ class NgtsPreload {
|
|
|
1518
1518
|
* When `true`, temporarily makes all invisible objects visible
|
|
1519
1519
|
* during compilation to ensure everything is preloaded.
|
|
1520
1520
|
*/
|
|
1521
|
-
this.all = model(...(ngDevMode ? [undefined, { debugName: "all" }] : []));
|
|
1521
|
+
this.all = model(...(ngDevMode ? [undefined, { debugName: "all" }] : /* istanbul ignore next */ []));
|
|
1522
1522
|
/**
|
|
1523
1523
|
* Custom scene to preload. Defaults to the store's scene.
|
|
1524
1524
|
*/
|
|
1525
|
-
this.scene = model(...(ngDevMode ? [undefined, { debugName: "scene" }] : []));
|
|
1525
|
+
this.scene = model(...(ngDevMode ? [undefined, { debugName: "scene" }] : /* istanbul ignore next */ []));
|
|
1526
1526
|
/**
|
|
1527
1527
|
* Custom camera to use for compilation. Defaults to the store's camera.
|
|
1528
1528
|
*/
|
|
1529
|
-
this.camera = model(...(ngDevMode ? [undefined, { debugName: "camera" }] : []));
|
|
1529
|
+
this.camera = model(...(ngDevMode ? [undefined, { debugName: "camera" }] : /* istanbul ignore next */ []));
|
|
1530
1530
|
this.store = injectStore();
|
|
1531
1531
|
this.trueScene = computed(() => {
|
|
1532
1532
|
const scene = this.scene();
|
|
1533
1533
|
if (scene)
|
|
1534
1534
|
return resolveRef(scene);
|
|
1535
1535
|
return this.store.scene();
|
|
1536
|
-
}, ...(ngDevMode ? [{ debugName: "trueScene" }] : []));
|
|
1536
|
+
}, ...(ngDevMode ? [{ debugName: "trueScene" }] : /* istanbul ignore next */ []));
|
|
1537
1537
|
this.trueCamera = computed(() => {
|
|
1538
1538
|
const camera = this.camera();
|
|
1539
1539
|
if (camera)
|
|
1540
1540
|
return resolveRef(camera);
|
|
1541
1541
|
return this.store.camera();
|
|
1542
|
-
}, ...(ngDevMode ? [{ debugName: "trueCamera" }] : []));
|
|
1542
|
+
}, ...(ngDevMode ? [{ debugName: "trueCamera" }] : /* istanbul ignore next */ []));
|
|
1543
1543
|
effect(() => {
|
|
1544
1544
|
const invisible = [];
|
|
1545
1545
|
const [all, scene, camera, gl] = [this.all(), this.trueScene(), this.trueCamera(), this.store.gl()];
|
|
@@ -1565,10 +1565,10 @@ class NgtsPreload {
|
|
|
1565
1565
|
invisible.forEach((object) => (object.visible = false));
|
|
1566
1566
|
});
|
|
1567
1567
|
}
|
|
1568
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1569
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1568
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsPreload, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1569
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtsPreload, isStandalone: true, selector: "ngts-preload", inputs: { all: { classPropertyName: "all", publicName: "all", 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 } }, outputs: { all: "allChange", scene: "sceneChange", camera: "cameraChange" }, ngImport: i0 }); }
|
|
1570
1570
|
}
|
|
1571
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1571
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsPreload, decorators: [{
|
|
1572
1572
|
type: Directive,
|
|
1573
1573
|
args: [{ selector: 'ngts-preload' }]
|
|
1574
1574
|
}], ctorParameters: () => [], propDecorators: { all: [{ type: i0.Input, args: [{ isSignal: true, alias: "all", required: false }] }, { type: i0.Output, args: ["allChange"] }], scene: [{ type: i0.Input, args: [{ isSignal: true, alias: "scene", required: false }] }, { type: i0.Output, args: ["sceneChange"] }], camera: [{ type: i0.Input, args: [{ isSignal: true, alias: "camera", required: false }] }, { type: i0.Output, args: ["cameraChange"] }] } });
|
|
@@ -1698,16 +1698,16 @@ class NgtsSampler {
|
|
|
1698
1698
|
* The mesh to sample points from.
|
|
1699
1699
|
* If not provided, uses the first Mesh child of this component.
|
|
1700
1700
|
*/
|
|
1701
|
-
this.mesh = input(null, ...(ngDevMode ? [{ debugName: "mesh" }] : []));
|
|
1701
|
+
this.mesh = input(null, ...(ngDevMode ? [{ debugName: "mesh" }] : /* istanbul ignore next */ []));
|
|
1702
1702
|
/**
|
|
1703
1703
|
* The InstancedMesh to update with sampled transforms.
|
|
1704
1704
|
* If not provided, uses the first InstancedMesh child of this component.
|
|
1705
1705
|
*/
|
|
1706
|
-
this.instances = input(null, ...(ngDevMode ? [{ debugName: "instances" }] : []));
|
|
1706
|
+
this.instances = input(null, ...(ngDevMode ? [{ debugName: "instances" }] : /* istanbul ignore next */ []));
|
|
1707
1707
|
/**
|
|
1708
1708
|
* Sampler configuration including count, weight attribute, and transform function.
|
|
1709
1709
|
*/
|
|
1710
|
-
this.options = input(defaultOptions$1, { ...(ngDevMode ? { debugName: "options" } : {}), transform: mergeInputs(defaultOptions$1) });
|
|
1710
|
+
this.options = input(defaultOptions$1, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), transform: mergeInputs(defaultOptions$1) });
|
|
1711
1711
|
this.parameters = omit(this.options, ['weight', 'transform', 'count']);
|
|
1712
1712
|
this.groupRef = viewChild.required('group');
|
|
1713
1713
|
this.count = pick(this.options, 'count');
|
|
@@ -1724,7 +1724,7 @@ class NgtsSampler {
|
|
|
1724
1724
|
return mesh;
|
|
1725
1725
|
const objects = instanceState.objects();
|
|
1726
1726
|
return objects.find((c) => is.three(c, 'isMesh'));
|
|
1727
|
-
}, ...(ngDevMode ? [{ debugName: "meshToSample" }] : []));
|
|
1727
|
+
}, ...(ngDevMode ? [{ debugName: "meshToSample" }] : /* istanbul ignore next */ []));
|
|
1728
1728
|
const instancedMeshToSample = computed(() => {
|
|
1729
1729
|
const group = this.groupRef().nativeElement;
|
|
1730
1730
|
const instanceState = getInstanceState(group);
|
|
@@ -1735,7 +1735,7 @@ class NgtsSampler {
|
|
|
1735
1735
|
return instances;
|
|
1736
1736
|
const objects = instanceState.objects();
|
|
1737
1737
|
return objects.find((c) => !!Object.getOwnPropertyDescriptor(c, 'instanceMatrix'));
|
|
1738
|
-
}, ...(ngDevMode ? [{ debugName: "instancedMeshToSample" }] : []));
|
|
1738
|
+
}, ...(ngDevMode ? [{ debugName: "instancedMeshToSample" }] : /* istanbul ignore next */ []));
|
|
1739
1739
|
// NOTE: because surfaceSampler returns a computed, we need to consume
|
|
1740
1740
|
// this computed in a Reactive Context (an effect) to ensure the inner logic of
|
|
1741
1741
|
// surfaceSampler is run properly.
|
|
@@ -1747,14 +1747,14 @@ class NgtsSampler {
|
|
|
1747
1747
|
});
|
|
1748
1748
|
effect(sampler);
|
|
1749
1749
|
}
|
|
1750
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1751
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
1750
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsSampler, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1751
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: NgtsSampler, isStandalone: true, selector: "ngts-sampler", inputs: { mesh: { classPropertyName: "mesh", publicName: "mesh", isSignal: true, isRequired: false, transformFunction: null }, instances: { classPropertyName: "instances", publicName: "instances", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1752
1752
|
<ngt-group #group [parameters]="parameters()">
|
|
1753
1753
|
<ng-content />
|
|
1754
1754
|
</ngt-group>
|
|
1755
1755
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1756
1756
|
}
|
|
1757
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1757
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsSampler, decorators: [{
|
|
1758
1758
|
type: Component,
|
|
1759
1759
|
args: [{
|
|
1760
1760
|
selector: 'ngts-sampler',
|
|
@@ -2080,7 +2080,7 @@ function reset(gl, scene, camera) {
|
|
|
2080
2080
|
*/
|
|
2081
2081
|
class NgtsSoftShadows {
|
|
2082
2082
|
constructor() {
|
|
2083
|
-
this.options = input(defaultOptions, { ...(ngDevMode ? { debugName: "options" } : {}), transform: mergeInputs(defaultOptions) });
|
|
2083
|
+
this.options = input(defaultOptions, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), transform: mergeInputs(defaultOptions) });
|
|
2084
2084
|
const store = injectStore();
|
|
2085
2085
|
effect((onCleanup) => {
|
|
2086
2086
|
const { gl, scene, camera } = store.snapshot;
|
|
@@ -2131,10 +2131,10 @@ class NgtsSoftShadows {
|
|
|
2131
2131
|
});
|
|
2132
2132
|
});
|
|
2133
2133
|
}
|
|
2134
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2135
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
2134
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsSoftShadows, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2135
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtsSoftShadows, isStandalone: true, selector: "ngts-soft-shadows", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
2136
2136
|
}
|
|
2137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtsSoftShadows, decorators: [{
|
|
2138
2138
|
type: Directive,
|
|
2139
2139
|
args: [{ selector: 'ngts-soft-shadows' }]
|
|
2140
2140
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
|