angular-three-soba 4.0.0-next.96 → 4.0.0-next.98
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/helper.d.ts +6 -1
- package/abstractions/lib/text-3d.d.ts +1 -1
- package/cameras/lib/cube-camera.d.ts +7 -2
- package/cameras/lib/orthographic-camera.d.ts +1 -1
- package/cameras/lib/perspective-camera.d.ts +1 -1
- package/fesm2022/angular-three-soba-abstractions.mjs +18 -17
- package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
- package/fesm2022/angular-three-soba-cameras.mjs +24 -19
- package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
- package/fesm2022/angular-three-soba-controls.mjs +7 -7
- package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
- package/fesm2022/angular-three-soba-gizmos.mjs +89 -119
- package/fesm2022/angular-three-soba-gizmos.mjs.map +1 -1
- package/fesm2022/angular-three-soba-loaders.mjs +186 -49
- package/fesm2022/angular-three-soba-loaders.mjs.map +1 -1
- package/fesm2022/angular-three-soba-materials.mjs +14 -14
- package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
- package/fesm2022/angular-three-soba-misc.mjs +40 -22
- package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
- package/fesm2022/angular-three-soba-performances.mjs +6 -6
- package/fesm2022/angular-three-soba-performances.mjs.map +1 -1
- package/fesm2022/angular-three-soba-staging.mjs +186 -92
- package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
- package/gizmos/lib/gizmo-helper/gizmo-viewcube.d.ts +4 -2
- package/gizmos/lib/gizmo-helper/gizmo-viewport.d.ts +4 -3
- package/gizmos/lib/pivot-controls/axis-arrow.d.ts +1 -0
- package/gizmos/lib/pivot-controls/plane-slider.d.ts +1 -0
- package/gizmos/lib/pivot-controls/scaling-sphere.d.ts +1 -0
- package/loaders/index.d.ts +4 -0
- package/loaders/lib/fbx-loader.d.ts +9 -1
- package/loaders/lib/fbx-resource.d.ts +7 -0
- package/loaders/lib/font-loader.d.ts +6 -20
- package/loaders/lib/font-resource.d.ts +28 -0
- package/loaders/lib/gltf-loader.d.ts +8 -0
- package/loaders/lib/gltf-resource.d.ts +32 -0
- package/loaders/lib/loader.d.ts +2 -2
- package/loaders/lib/progress.d.ts +6 -1
- package/loaders/lib/texture-loader.d.ts +8 -0
- package/loaders/lib/texture-resource.d.ts +10 -0
- package/materials/lib/custom-shader-material.d.ts +2 -2
- package/materials/lib/mesh-portal-material.d.ts +1 -1
- package/materials/lib/mesh-refraction-material.d.ts +1 -1
- package/materials/lib/mesh-transmission-material.d.ts +1 -1
- package/misc/lib/animations.d.ts +6 -1
- package/misc/lib/depth-buffer.d.ts +6 -1
- package/misc/lib/fbo.d.ts +7 -2
- package/misc/lib/intersect.d.ts +6 -1
- package/package.json +5 -5
- package/performances/lib/bvh.d.ts +1 -1
- package/performances/lib/instances/instances.d.ts +1 -1
- package/performances/lib/points/points.d.ts +1 -1
- package/performances/lib/segments/segments.d.ts +23 -23
- package/staging/index.d.ts +1 -0
- package/staging/lib/accumulative-shadows.d.ts +2 -2
- package/staging/lib/caustics.d.ts +1 -1
- package/staging/lib/center.d.ts +2 -2
- package/staging/lib/contact-shadows.d.ts +1 -1
- package/staging/lib/environment/environment-resource.d.ts +35 -0
- package/staging/lib/environment/environment.d.ts +3 -3
- package/staging/lib/environment/inject-environment.d.ts +8 -24
- package/staging/lib/lightformer.d.ts +1 -1
- package/staging/lib/mask.d.ts +1 -1
- package/staging/lib/matcap-texture.d.ts +17 -4
- package/staging/lib/normal-texture.d.ts +20 -7
- package/staging/lib/render-texture.d.ts +1 -1
- package/staging/lib/sky.d.ts +1 -1
- package/staging/lib/spot-light.d.ts +4 -4
- package/staging/lib/stage.d.ts +6 -6
|
@@ -2,13 +2,18 @@ import { ElementRef, Injector } from '@angular/core';
|
|
|
2
2
|
import * as THREE from 'three';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
type HelperArgs<T> = T extends [infer _, ...infer R] ? R : never;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function helper<TConstructor extends new (...args: any[]) => THREE.Object3D, THelperInstance extends InstanceType<TConstructor> & {
|
|
6
6
|
update: () => void;
|
|
7
7
|
dispose: () => void;
|
|
8
8
|
}>(object: () => ElementRef<THREE.Object3D> | THREE.Object3D | undefined | null, helperConstructor: () => TConstructor, { injector, args, }?: {
|
|
9
9
|
injector?: Injector;
|
|
10
10
|
args?: () => HelperArgs<ConstructorParameters<TConstructor>>;
|
|
11
11
|
}): import("@angular/core").Signal<THelperInstance | null>;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated use helper instead. Will be removed in v5.0.0
|
|
14
|
+
* @since v4.0.0
|
|
15
|
+
*/
|
|
16
|
+
export declare const injectHelper: typeof helper;
|
|
12
17
|
export declare class NgtsHelper<TConstructor extends new (...args: any[]) => THREE.Object3D> {
|
|
13
18
|
type: import("@angular/core").InputSignal<TConstructor>;
|
|
14
19
|
options: import("@angular/core").InputSignal<HelperArgs<ConstructorParameters<TConstructor>>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { NgtThreeElement } from 'angular-three';
|
|
3
|
-
import { NgtsFontInput } from 'angular-three-soba/loaders';
|
|
3
|
+
import { type NgtsFontInput } from 'angular-three-soba/loaders';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { TextGeometry, TextGeometryParameters } from 'three-stdlib';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -14,19 +14,24 @@ export interface CubeCameraOptions {
|
|
|
14
14
|
/** Custom fog that is temporarily set as the scenes fog */
|
|
15
15
|
fog?: THREE.Fog | THREE.FogExp2;
|
|
16
16
|
}
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function cubeCamera(options: () => CubeCameraOptions, { injector }?: {
|
|
18
18
|
injector?: Injector;
|
|
19
19
|
}): {
|
|
20
20
|
fbo: import("@angular/core").Signal<THREE.WebGLCubeRenderTarget>;
|
|
21
21
|
camera: import("@angular/core").Signal<THREE.CubeCamera>;
|
|
22
22
|
update: () => void;
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use cubeCamera instead. Will be removed in v5.0.0
|
|
26
|
+
* @since v4.0.0
|
|
27
|
+
*/
|
|
28
|
+
export declare const injectCubeCamera: typeof cubeCamera;
|
|
24
29
|
export type NgtsCubeCameraOptions = Partial<NgtThreeElements['ngt-group']> & CubeCameraOptions & {
|
|
25
30
|
frames: number;
|
|
26
31
|
};
|
|
27
32
|
export declare class NgtsCubeCamera {
|
|
28
33
|
options: import("@angular/core").InputSignalWithTransform<NgtsCubeCameraOptions, "" | Partial<NgtsCubeCameraOptions>>;
|
|
29
|
-
protected parameters: import("@angular/core").Signal<Omit<NgtsCubeCameraOptions, "
|
|
34
|
+
protected parameters: import("@angular/core").Signal<Omit<NgtsCubeCameraOptions, "resolution" | "near" | "far" | "envMap" | "fog" | "frames">>;
|
|
30
35
|
private cubeCamera;
|
|
31
36
|
protected camera: import("@angular/core").Signal<THREE.CubeCamera>;
|
|
32
37
|
protected texture: import("@angular/core").Signal<THREE.CubeTexture>;
|
|
@@ -16,7 +16,7 @@ export interface NgtsOrthographicCameraOptions extends Partial<NgtThreeElements[
|
|
|
16
16
|
}
|
|
17
17
|
export declare class NgtsOrthographicCamera {
|
|
18
18
|
options: import("@angular/core").InputSignalWithTransform<NgtsOrthographicCameraOptions, "" | Partial<NgtsOrthographicCameraOptions>>;
|
|
19
|
-
protected parameters: import("@angular/core").Signal<Omit<NgtsOrthographicCameraOptions, "
|
|
19
|
+
protected parameters: import("@angular/core").Signal<Omit<NgtsOrthographicCameraOptions, "resolution" | "envMap" | "frames" | "left" | "right" | "top" | "bottom" | "makeDefault">>;
|
|
20
20
|
protected content: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
21
21
|
protected cameraContent: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
22
22
|
cameraRef: import("@angular/core").Signal<ElementRef<THREE.OrthographicCamera>>;
|
|
@@ -16,7 +16,7 @@ export interface NgtsPerspectiveCameraOptions extends Partial<NgtThreeElements['
|
|
|
16
16
|
}
|
|
17
17
|
export declare class NgtsPerspectiveCamera {
|
|
18
18
|
options: import("@angular/core").InputSignalWithTransform<NgtsPerspectiveCameraOptions, "" | Partial<NgtsPerspectiveCameraOptions>>;
|
|
19
|
-
protected parameters: import("@angular/core").Signal<Omit<NgtsPerspectiveCameraOptions, "
|
|
19
|
+
protected parameters: import("@angular/core").Signal<Omit<NgtsPerspectiveCameraOptions, "resolution" | "envMap" | "frames" | "makeDefault">>;
|
|
20
20
|
protected content: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
21
21
|
protected cameraContent: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
22
22
|
cameraRef: import("@angular/core").Signal<ElementRef<THREE.PerspectiveCamera>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, viewChild, Component, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, computed, effect, untracked, inject, output, DestroyRef } from '@angular/core';
|
|
3
3
|
import * as i1 from 'angular-three';
|
|
4
|
-
import { omit, extend,
|
|
4
|
+
import { omit, extend, beforeRender, injectStore, pick, is, checkNeedsUpdate, NgtArgs, getInstanceState, resolveRef, NgtObjectEvents } from 'angular-three';
|
|
5
5
|
import { mergeInputs } from 'ngxtension/inject-inputs';
|
|
6
6
|
import * as THREE from 'three';
|
|
7
7
|
import { Group, CanvasTexture, Mesh, PlaneGeometry, Object3D, ExtrudeGeometry } from 'three';
|
|
@@ -10,7 +10,7 @@ import { DOCUMENT } from '@angular/common';
|
|
|
10
10
|
import { GridMaterial } from 'angular-three-soba/shaders';
|
|
11
11
|
import { assertInjector } from 'ngxtension/assert-injector';
|
|
12
12
|
import { Text, preloadFont } from 'troika-three-text';
|
|
13
|
-
import {
|
|
13
|
+
import { fontResource } from 'angular-three-soba/loaders';
|
|
14
14
|
|
|
15
15
|
const defaultOptions$b = {
|
|
16
16
|
follow: true,
|
|
@@ -26,7 +26,7 @@ class NgtsBillboard {
|
|
|
26
26
|
this.innerRef = viewChild.required('inner');
|
|
27
27
|
extend({ Group });
|
|
28
28
|
const q = new THREE.Quaternion();
|
|
29
|
-
|
|
29
|
+
beforeRender(({ camera }) => {
|
|
30
30
|
const [{ follow, lockX, lockY, lockZ }, group, inner] = [
|
|
31
31
|
this.options(),
|
|
32
32
|
this.groupRef().nativeElement,
|
|
@@ -541,7 +541,7 @@ class NgtsGrid {
|
|
|
541
541
|
};
|
|
542
542
|
});
|
|
543
543
|
extend({ Mesh, PlaneGeometry, GridMaterial });
|
|
544
|
-
|
|
544
|
+
beforeRender(({ camera }) => {
|
|
545
545
|
const mesh = this.meshRef().nativeElement;
|
|
546
546
|
this.plane.setFromNormalAndCoplanarPoint(this.upVector, this.zeroVector).applyMatrix4(mesh.matrixWorld);
|
|
547
547
|
const gridMaterial = mesh.material;
|
|
@@ -555,9 +555,7 @@ class NgtsGrid {
|
|
|
555
555
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.1", type: NgtsGrid, isStandalone: true, selector: "ngts-grid", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "meshRef", first: true, predicate: ["mesh"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
556
556
|
<ngt-mesh #mesh [frustumCulled]="false" [parameters]="parameters()">
|
|
557
557
|
<ngt-plane-geometry *args="planeArgs()" />
|
|
558
|
-
<ngt-grid-material transparent [side]="side()" [parameters]="uniforms()"
|
|
559
|
-
<ngt-value attach="extensions.derivatives" [rawValue]="true" />
|
|
560
|
-
</ngt-grid-material>
|
|
558
|
+
<ngt-grid-material transparent [side]="side()" [parameters]="uniforms()" extensions.derivatives />
|
|
561
559
|
<ng-content />
|
|
562
560
|
</ngt-mesh>
|
|
563
561
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -569,9 +567,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
569
567
|
template: `
|
|
570
568
|
<ngt-mesh #mesh [frustumCulled]="false" [parameters]="parameters()">
|
|
571
569
|
<ngt-plane-geometry *args="planeArgs()" />
|
|
572
|
-
<ngt-grid-material transparent [side]="side()" [parameters]="uniforms()"
|
|
573
|
-
<ngt-value attach="extensions.derivatives" [rawValue]="true" />
|
|
574
|
-
</ngt-grid-material>
|
|
570
|
+
<ngt-grid-material transparent [side]="side()" [parameters]="uniforms()" extensions.derivatives />
|
|
575
571
|
<ng-content />
|
|
576
572
|
</ngt-mesh>
|
|
577
573
|
`,
|
|
@@ -581,8 +577,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
581
577
|
}]
|
|
582
578
|
}], ctorParameters: () => [] });
|
|
583
579
|
|
|
584
|
-
function
|
|
585
|
-
return assertInjector(
|
|
580
|
+
function helper(object, helperConstructor, { injector, args = () => [], } = {}) {
|
|
581
|
+
return assertInjector(helper, injector, () => {
|
|
586
582
|
const store = injectStore();
|
|
587
583
|
const helper = computed(() => {
|
|
588
584
|
const maybeObject3D = object();
|
|
@@ -606,7 +602,7 @@ function injectHelper(object, helperConstructor, { injector, args = () => [], }
|
|
|
606
602
|
currentHelper.dispose?.();
|
|
607
603
|
});
|
|
608
604
|
});
|
|
609
|
-
|
|
605
|
+
beforeRender(() => {
|
|
610
606
|
const currentHelper = helper();
|
|
611
607
|
if (currentHelper)
|
|
612
608
|
currentHelper.update();
|
|
@@ -614,6 +610,11 @@ function injectHelper(object, helperConstructor, { injector, args = () => [], }
|
|
|
614
610
|
return helper;
|
|
615
611
|
});
|
|
616
612
|
}
|
|
613
|
+
/**
|
|
614
|
+
* @deprecated use helper instead. Will be removed in v5.0.0
|
|
615
|
+
* @since v4.0.0
|
|
616
|
+
*/
|
|
617
|
+
const injectHelper = helper;
|
|
617
618
|
class NgtsHelper {
|
|
618
619
|
constructor() {
|
|
619
620
|
this.type = input.required();
|
|
@@ -628,7 +629,7 @@ class NgtsHelper {
|
|
|
628
629
|
return;
|
|
629
630
|
return instanceState.parent();
|
|
630
631
|
});
|
|
631
|
-
this.helper =
|
|
632
|
+
this.helper = helper(this.parent, this.type, { args: this.options });
|
|
632
633
|
extend({ Object3D });
|
|
633
634
|
}
|
|
634
635
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: NgtsHelper, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -1011,7 +1012,7 @@ class NgtsText3D {
|
|
|
1011
1012
|
]);
|
|
1012
1013
|
this.meshRef = viewChild.required('mesh');
|
|
1013
1014
|
this.textGeometryRef = viewChild('textGeometry');
|
|
1014
|
-
this.loadedFont =
|
|
1015
|
+
this.loadedFont = fontResource(this.font);
|
|
1015
1016
|
this.smooth = pick(this.options, 'smooth');
|
|
1016
1017
|
this.textOptions = pick(this.options, [
|
|
1017
1018
|
'letterSpacing',
|
|
@@ -1026,7 +1027,7 @@ class NgtsText3D {
|
|
|
1026
1027
|
'curveSegments',
|
|
1027
1028
|
]);
|
|
1028
1029
|
this.textArgs = computed(() => {
|
|
1029
|
-
const font = this.loadedFont();
|
|
1030
|
+
const font = this.loadedFont.value();
|
|
1030
1031
|
if (!font)
|
|
1031
1032
|
return null;
|
|
1032
1033
|
const [text, textOptions] = [this.text(), this.textOptions()];
|
|
@@ -1076,5 +1077,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
1076
1077
|
* Generated bundle index. Do not edit.
|
|
1077
1078
|
*/
|
|
1078
1079
|
|
|
1079
|
-
export { NgtsBillboard, NgtsCatmullRomLine, NgtsCubicBezierLine, NgtsEdges, NgtsGradientTexture, NgtsGrid, NgtsHelper, NgtsLine, NgtsPrismGeometry, NgtsQuadraticBezierLine, NgtsRoundedBox, NgtsText, NgtsText3D, injectHelper };
|
|
1080
|
+
export { NgtsBillboard, NgtsCatmullRomLine, NgtsCubicBezierLine, NgtsEdges, NgtsGradientTexture, NgtsGrid, NgtsHelper, NgtsLine, NgtsPrismGeometry, NgtsQuadraticBezierLine, NgtsRoundedBox, NgtsText, NgtsText3D, helper, injectHelper };
|
|
1080
1081
|
//# sourceMappingURL=angular-three-soba-abstractions.mjs.map
|