angular-three-soba 4.0.0-next.8 → 4.0.0-next.81
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/README.md +1 -1
- package/abstractions/lib/catmull-rom-line.d.ts +20 -19
- package/abstractions/lib/edges.d.ts +20 -18
- package/abstractions/lib/line.d.ts +1 -1
- package/abstractions/lib/prism-geometry.d.ts +4 -4
- package/abstractions/lib/rounded-box.d.ts +1 -1
- package/abstractions/lib/text-3d.d.ts +9 -9
- package/abstractions/lib/text.d.ts +4 -1
- package/cameras/lib/camera-content.d.ts +1 -2
- package/cameras/lib/cube-camera.d.ts +3 -3
- package/cameras/lib/orthographic-camera.d.ts +6 -5
- package/cameras/lib/perspective-camera.d.ts +2 -5
- package/controls/README.md +28 -28
- package/controls/index.d.ts +1 -0
- package/controls/lib/camera-controls.d.ts +1 -1
- package/controls/lib/orbit-controls.d.ts +11 -6
- package/controls/lib/trackball-controls.d.ts +27 -0
- package/fesm2022/angular-three-soba-abstractions.mjs +88 -52
- package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
- package/fesm2022/angular-three-soba-cameras.mjs +49 -37
- package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
- package/fesm2022/angular-three-soba-controls.mjs +128 -36
- package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
- package/fesm2022/angular-three-soba-gizmos.mjs +125 -86
- 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 +82 -86
- package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
- package/fesm2022/angular-three-soba-misc.mjs +55 -48
- package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
- package/fesm2022/angular-three-soba-performances.mjs +152 -35
- 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 +183 -144
- package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
- package/fesm2022/angular-three-soba-stats.mjs +3 -3
- package/gizmos/lib/gizmo-helper/gizmo-helper.d.ts +4 -3
- 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/loaders/README.md +39 -39
- 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 +5 -5
- package/misc/README.md +16 -16
- package/misc/lib/decal.d.ts +1 -1
- package/misc/lib/deprecated.d.ts +0 -6
- package/misc/lib/depth-buffer.d.ts +1 -1
- package/misc/lib/fbo.d.ts +1 -3
- package/misc/lib/html/html-content.d.ts +2 -2
- package/misc/lib/html/html.d.ts +5 -5
- package/package.json +17 -17
- package/performances/index.d.ts +1 -0
- package/performances/lib/adaptive-dpr.d.ts +1 -1
- package/performances/lib/bvh.d.ts +49 -0
- 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/shaders/lib/mesh-refraction-material.d.ts +2 -2
- package/staging/lib/caustics.d.ts +4 -4
- package/staging/lib/center.d.ts +2 -2
- package/staging/lib/contact-shadows.d.ts +1 -1
- package/staging/lib/environment/inject-environment.d.ts +1 -2
- package/staging/lib/lightformer.d.ts +1 -1
- package/staging/lib/mask.d.ts +1 -1
- package/staging/lib/render-texture.d.ts +6 -5
- package/staging/lib/sky.d.ts +1 -1
- package/staging/lib/spot-light.d.ts +2 -2
- package/staging/lib/stage.d.ts +15 -14
|
@@ -44,10 +44,10 @@ class NgtsStats {
|
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
|
48
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: NgtsStats, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
48
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.6", type: NgtsStats, isStandalone: true, selector: "ngt-canvas[stats]", inputs: { options: { classPropertyName: "options", publicName: "stats", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: NgtsStats, decorators: [{
|
|
51
51
|
type: Directive,
|
|
52
52
|
args: [{ selector: 'ngt-canvas[stats]' }]
|
|
53
53
|
}], ctorParameters: () => [] });
|
|
@@ -15,7 +15,7 @@ export interface NgtsGizmoHelperOptions {
|
|
|
15
15
|
renderPriority: number;
|
|
16
16
|
autoClear?: boolean;
|
|
17
17
|
}
|
|
18
|
-
export declare class
|
|
18
|
+
export declare class NgtsGizmoHelperImpl {
|
|
19
19
|
options: import("@angular/core").InputSignalWithTransform<NgtsGizmoHelperOptions, "" | Partial<NgtsGizmoHelperOptions>>;
|
|
20
20
|
update: import("@angular/core").OutputEmitterRef<void>;
|
|
21
21
|
protected renderPriority: import("@angular/core").Signal<number>;
|
|
@@ -37,6 +37,7 @@ export declare class NgtsGizmoHelper {
|
|
|
37
37
|
private updateDefaultUpEffect;
|
|
38
38
|
private isOrbitControls;
|
|
39
39
|
private isCameraControls;
|
|
40
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsGizmoHelperImpl, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsGizmoHelperImpl, "ngts-gizmo-helper", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, { "update": "update"; }, ["content"], never, true, never>;
|
|
42
42
|
}
|
|
43
|
+
export declare const NgtsGizmoHelper: readonly [typeof NgtsGizmoHelperImpl, typeof NgtsGizmoHelperContent];
|
|
@@ -45,7 +45,7 @@ export interface NgtsGizmoViewportOptions extends Partial<NgtThreeElements['ngt-
|
|
|
45
45
|
export declare class NgtsGizmoViewport {
|
|
46
46
|
protected readonly Math: Math;
|
|
47
47
|
options: import("@angular/core").InputSignalWithTransform<NgtsGizmoViewportOptions, "" | Partial<NgtsGizmoViewportOptions>>;
|
|
48
|
-
protected parameters: import("@angular/core").Signal<Omit<NgtsGizmoViewportOptions, "axisColors" | "axisScale" | "labels" | "axisHeadScale" | "labelColor" | "hideNegativeAxes" | "hideAxisHeads" | "disabled"
|
|
48
|
+
protected parameters: import("@angular/core").Signal<Omit<NgtsGizmoViewportOptions, "font" | "axisColors" | "axisScale" | "labels" | "axisHeadScale" | "labelColor" | "hideNegativeAxes" | "hideAxisHeads" | "disabled">>;
|
|
49
49
|
click: import("@angular/core").OutputEmitterRef<NgtThreeEvent<MouseEvent>>;
|
|
50
50
|
protected axisColors: import("@angular/core").Signal<[string, string, string]>;
|
|
51
51
|
protected axisScale: import("@angular/core").Signal<[number, number, number] | undefined>;
|
|
@@ -60,7 +60,7 @@ export interface NgtsPivotControlsOptions {
|
|
|
60
60
|
}
|
|
61
61
|
export declare class NgtsPivotControls {
|
|
62
62
|
options: import("@angular/core").InputSignalWithTransform<NgtsPivotControlsOptions, "" | Partial<NgtsPivotControlsOptions>>;
|
|
63
|
-
protected parameters: import("@angular/core").Signal<Omit<NgtsPivotControlsOptions, "
|
|
63
|
+
protected parameters: import("@angular/core").Signal<Omit<NgtsPivotControlsOptions, "rotation" | "scale" | "matrix" | "visible" | "userData" | "opacity" | "anchor" | "fixed" | "axisColors" | "hoveredColor" | "enabled" | "lineWidth" | "offset" | "autoTransform" | "activeAxes" | "disableAxes" | "disableSliders" | "disableRotations" | "disableScaling" | "translationLimits" | "rotationLimits" | "scaleLimits" | "annotations" | "annotationsClass" | "depthTest">>;
|
|
64
64
|
dragStarted: import("@angular/core").OutputEmitterRef<OnDragStartParameters>;
|
|
65
65
|
dragEnded: import("@angular/core").OutputEmitterRef<void>;
|
|
66
66
|
dragged: import("@angular/core").OutputEmitterRef<OnDragParameters>;
|
|
@@ -23,8 +23,8 @@ export type NgtsTransformControlsOptions = Partial<NgtsTransformControlsObject>
|
|
|
23
23
|
export declare class NgtsTransformControls {
|
|
24
24
|
object: import("@angular/core").InputSignal<THREE.Object3D<THREE.Object3DEventMap> | ElementRef<THREE.Object3D<THREE.Object3DEventMap>> | null | undefined>;
|
|
25
25
|
options: import("@angular/core").InputSignal<Partial<NgtsTransformControlsOptions>>;
|
|
26
|
-
protected parameters: import("@angular/core").Signal<Omit<Partial<NgtsTransformControlsOptions>, "
|
|
27
|
-
protected controlsOptions: import("@angular/core").Signal<Pick<Partial<NgtsTransformControlsOptions>, "enabled" | "axis" | "mode" | "translationSnap" | "rotationSnap" | "scaleSnap" | "space" | "
|
|
26
|
+
protected parameters: import("@angular/core").Signal<Omit<Partial<NgtsTransformControlsOptions>, "camera" | "size" | "domElement" | "enabled" | "axis" | "mode" | "translationSnap" | "rotationSnap" | "scaleSnap" | "space" | "showX" | "showY" | "showZ" | "makeDefault">>;
|
|
27
|
+
protected controlsOptions: import("@angular/core").Signal<Pick<Partial<NgtsTransformControlsOptions>, "size" | "enabled" | "axis" | "mode" | "translationSnap" | "rotationSnap" | "scaleSnap" | "space" | "showX" | "showY" | "showZ">>;
|
|
28
28
|
private camera;
|
|
29
29
|
private domElement;
|
|
30
30
|
private makeDefault;
|
package/loaders/README.md
CHANGED
|
@@ -35,34 +35,34 @@ The function also has static methods for preloading and setting the decoder path
|
|
|
35
35
|
|
|
36
36
|
```ts
|
|
37
37
|
@Component({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
selector: 'app-suzi',
|
|
39
|
+
template: `
|
|
40
|
+
<ngt-primitive *args="[scene()]" [rotation]="[-0.63, 0, 0]" [scale]="2" [position]="[0, -1.175, 0]" />
|
|
41
|
+
`,
|
|
42
|
+
imports: [NgtArgs],
|
|
43
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
44
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
45
45
|
})
|
|
46
46
|
class Suzi {
|
|
47
|
-
|
|
47
|
+
gltf = injectGLTF(() => './suzanne-high-poly.gltf');
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
scene = computed(() => {
|
|
50
|
+
const gltf = this.gltf();
|
|
51
|
+
if (!gltf) return null;
|
|
52
|
+
const { scene, materials } = gltf;
|
|
53
|
+
scene.traverse((obj) => (obj as any).isMesh && (obj.receiveShadow = obj.castShadow = true));
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
const material = materials['default'] as MeshStandardMaterial;
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
material.color.set('orange');
|
|
58
|
+
material.roughness = 0;
|
|
59
|
+
material.normalMap = new CanvasTexture(new FlakesTexture(), UVMapping, RepeatWrapping, RepeatWrapping);
|
|
60
|
+
material.normalMap.flipY = false;
|
|
61
|
+
material.normalMap.repeat.set(40, 40);
|
|
62
|
+
material.normalScale.set(0.05, 0.05);
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
return scene;
|
|
65
|
+
});
|
|
66
66
|
}
|
|
67
67
|
```
|
|
68
68
|
|
|
@@ -76,19 +76,19 @@ The function also has a static method for preloading textures:
|
|
|
76
76
|
|
|
77
77
|
```ts
|
|
78
78
|
@Component({
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
template: `
|
|
80
|
+
<ngt-mesh>
|
|
81
|
+
<ngt-mesh-physical-material [normalMap]="normalMap()" [roughnessMap]="roughnessMap()" />
|
|
82
|
+
</ngt-mesh>
|
|
83
|
+
`,
|
|
84
84
|
})
|
|
85
85
|
export class MyCmp {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
private textures = injectTexture(() => ({
|
|
87
|
+
roughnessMap: 'roughness_floor.jpeg',
|
|
88
|
+
normalMap: 'NORM.jpg',
|
|
89
|
+
}));
|
|
90
|
+
roughnessMap = computed(() => this.textures()?.roughnessMap || null);
|
|
91
|
+
normalMap = computed(() => this.textures()?.normalMap || null);
|
|
92
92
|
}
|
|
93
93
|
```
|
|
94
94
|
|
|
@@ -96,12 +96,12 @@ export class MyCmp {
|
|
|
96
96
|
|
|
97
97
|
```ts
|
|
98
98
|
function injectProgress(injector?: Injector): Signal<{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
errors: string[];
|
|
100
|
+
active: boolean;
|
|
101
|
+
progress: number;
|
|
102
|
+
item: string;
|
|
103
|
+
loaded: number;
|
|
104
|
+
total: number;
|
|
105
105
|
}>;
|
|
106
106
|
```
|
|
107
107
|
|
|
@@ -4,10 +4,10 @@ import * as THREE from 'three';
|
|
|
4
4
|
import CustomShaderMaterial from 'three-custom-shader-material/vanilla';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class NgtsCustomShaderMaterial {
|
|
7
|
-
baseMaterial: import("@angular/core").InputSignal<
|
|
7
|
+
baseMaterial: import("@angular/core").InputSignal<THREE.Material | typeof THREE.Material | ElementRef<THREE.Material>>;
|
|
8
8
|
attach: import("@angular/core").InputSignal<NgtAttachable>;
|
|
9
9
|
options: import("@angular/core").InputSignal<Omit<any, "baseMaterial">>;
|
|
10
|
-
parameters: import("@angular/core").Signal<Omit<Omit<any, "baseMaterial">, "
|
|
10
|
+
parameters: import("@angular/core").Signal<Omit<Omit<any, "baseMaterial">, "fragmentShader" | "vertexShader" | "uniforms" | "cacheKey">>;
|
|
11
11
|
private base;
|
|
12
12
|
private fragmentShader;
|
|
13
13
|
private vertexShader;
|
|
@@ -36,7 +36,7 @@ export interface NgtsMeshPortalMaterialOptions extends Partial<NgtThreeElements[
|
|
|
36
36
|
export declare class NgtsMeshPortalMaterial {
|
|
37
37
|
attach: import("@angular/core").InputSignal<NgtAttachable>;
|
|
38
38
|
options: import("@angular/core").InputSignalWithTransform<NgtsMeshPortalMaterialOptions, "" | Partial<NgtsMeshPortalMaterialOptions>>;
|
|
39
|
-
protected parameters: import("@angular/core").Signal<Omit<NgtsMeshPortalMaterialOptions, "resolution" | "
|
|
39
|
+
protected parameters: import("@angular/core").Signal<Omit<NgtsMeshPortalMaterialOptions, "resolution" | "blur" | "events" | "worldUnits" | "eventPriority" | "renderPriority">>;
|
|
40
40
|
protected blur: import("@angular/core").Signal<number>;
|
|
41
41
|
protected eventPriority: import("@angular/core").Signal<number>;
|
|
42
42
|
protected renderPriority: import("@angular/core").Signal<number>;
|
|
@@ -20,7 +20,7 @@ export declare class NgtsMeshRefractionMaterial {
|
|
|
20
20
|
envMap: import("@angular/core").InputSignal<THREE.Texture | THREE.CubeTexture>;
|
|
21
21
|
attach: import("@angular/core").InputSignal<NgtAttachable>;
|
|
22
22
|
options: import("@angular/core").InputSignalWithTransform<NgtsMeshRefractionMaterialOptions, "" | Partial<NgtsMeshRefractionMaterialOptions>>;
|
|
23
|
-
protected parameters: import("@angular/core").Signal<Omit<NgtsMeshRefractionMaterialOptions, "
|
|
23
|
+
protected parameters: import("@angular/core").Signal<Omit<NgtsMeshRefractionMaterialOptions, "aberrationStrength" | "fastChroma">>;
|
|
24
24
|
private fastChroma;
|
|
25
25
|
protected aberrationStrength: import("@angular/core").Signal<number>;
|
|
26
26
|
materialRef: import("@angular/core").Signal<ElementRef<THREE.ShaderMaterial & {
|
|
@@ -3,7 +3,7 @@ import { NgtAttachable, NgtThreeElements } from 'angular-three';
|
|
|
3
3
|
import { MeshTransmissionMaterial } from 'angular-three-soba/vanilla-exports';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export type MeshTransmissionMaterialOptions = ConstructorParameters<typeof MeshTransmissionMaterial>[0]
|
|
6
|
+
export type MeshTransmissionMaterialOptions = Exclude<ConstructorParameters<typeof MeshTransmissionMaterial>[0], undefined>;
|
|
7
7
|
export type NgtsMeshTransmissionMaterialOptions = Partial<NgtThreeElements['ngt-mesh-physical-material']> & Omit<MeshTransmissionMaterialOptions, 'buffer' | 'anisotropicBlur' | 'samples' | 'transmissionSampler'> & {
|
|
8
8
|
anisotropicBlur?: number;
|
|
9
9
|
buffer?: THREE.Texture;
|
|
@@ -24,12 +24,12 @@ export type NgtsMeshTransmissionMaterialOptions = Partial<NgtThreeElements['ngt-
|
|
|
24
24
|
/** Refraction samples, default: 6 */
|
|
25
25
|
samples: number;
|
|
26
26
|
/** Buffer scene background (can be a texture, a cubetexture or a color), default: null */
|
|
27
|
-
background?: THREE.Texture | THREE.Color;
|
|
27
|
+
background?: THREE.Texture | THREE.Color | null;
|
|
28
28
|
};
|
|
29
29
|
export declare class NgtsMeshTransmissionMaterial {
|
|
30
30
|
attach: import("@angular/core").InputSignal<NgtAttachable>;
|
|
31
31
|
options: import("@angular/core").InputSignalWithTransform<NgtsMeshTransmissionMaterialOptions, "" | Partial<NgtsMeshTransmissionMaterialOptions>>;
|
|
32
|
-
protected parameters: import("@angular/core").Signal<Omit<NgtsMeshTransmissionMaterialOptions, "thickness" | "anisotropy" | "transmission" | "side" | "
|
|
32
|
+
protected parameters: import("@angular/core").Signal<Omit<NgtsMeshTransmissionMaterialOptions, "thickness" | "anisotropy" | "transmission" | "side" | "resolution" | "background" | "buffer" | "anisotropicBlur" | "samples" | "transmissionSampler" | "backside" | "backsideThickness" | "backsideEnvMapIntensity" | "backsideResolution">>;
|
|
33
33
|
private resolution;
|
|
34
34
|
private backsideResolution;
|
|
35
35
|
private samples;
|
|
@@ -41,8 +41,8 @@ export declare class NgtsMeshTransmissionMaterial {
|
|
|
41
41
|
private backsideThickness;
|
|
42
42
|
private backsideEnvMapIntensity;
|
|
43
43
|
protected transmissionSampler: import("@angular/core").Signal<boolean>;
|
|
44
|
-
protected transmission: import("@angular/core").Signal<
|
|
45
|
-
protected thickness: import("@angular/core").Signal<
|
|
44
|
+
protected transmission: import("@angular/core").Signal<number | undefined>;
|
|
45
|
+
protected thickness: import("@angular/core").Signal<number | undefined>;
|
|
46
46
|
protected side: import("@angular/core").Signal<0 | 1 | 2 | undefined>;
|
|
47
47
|
materialRef: import("@angular/core").Signal<ElementRef<MeshTransmissionMaterial & {
|
|
48
48
|
samples?: number | undefined;
|
package/misc/README.md
CHANGED
|
@@ -48,21 +48,21 @@ The `params` object includes the following properties:
|
|
|
48
48
|
- `width`: The width of the FBO in pixels. Or it can also be the `settings` object.
|
|
49
49
|
- `height`: The height of the FBO in pixels.
|
|
50
50
|
- `settings`: An object containing the settings for the FBO.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
- `samples`: The number of samples for multisample anti-aliasing (MSAA). Set to 0 to disable MSAA.
|
|
52
|
+
- `depth`: If set, the scene depth will be rendered into buffer.depthTexture. (Default: false)
|
|
53
|
+
- `wrapS`: The wrapping mode for the s-coordinate of the FBO texture.
|
|
54
|
+
- `wrapT`: The wrapping mode for the t-coordinate of the FBO texture.
|
|
55
|
+
- `magFilter`: The magnification filter for the FBO texture.
|
|
56
|
+
- `minFilter`: The minification filter for the FBO texture.
|
|
57
|
+
- `format`: The internal format of the color buffer.
|
|
58
|
+
- `type`: The data type of the color buffer.
|
|
59
|
+
- `anisotropy`: The level of anisotropic filtering for the FBO texture.
|
|
60
|
+
- `depthBuffer`: Whether to include a depth buffer. (Default: true)
|
|
61
|
+
- `stencilBuffer`: Whether to include a stencil buffer. (Default: false)
|
|
62
|
+
- `generateMipmaps`: Whether to generate mipmaps for the FBO texture. (Default: true)
|
|
63
|
+
- `depthTexture`: A DepthTexture instance to use for the depth buffer.
|
|
64
|
+
- `encoding`: The encoding of the FBO texture.
|
|
65
|
+
- `colorSpace`: The color space of the FBO texture.
|
|
66
66
|
|
|
67
67
|
### NgtsFBO
|
|
68
68
|
|
|
@@ -78,7 +78,7 @@ A directive that allows you to render a part of your scene into an FBO using an
|
|
|
78
78
|
|
|
79
79
|
<ngt-mesh>
|
|
80
80
|
<ngt-box-geometry *args="[3, 3, 3]" />
|
|
81
|
-
<ngt-mesh-standard-material [map]="target
|
|
81
|
+
<ngt-mesh-standard-material [map]="target.texture" />
|
|
82
82
|
</ngt-mesh>
|
|
83
83
|
</ng-template>
|
|
84
84
|
```
|
package/misc/lib/decal.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface NgtsDecalOptions extends Partial<NgtThreeElements['ngt-mesh']>
|
|
|
11
11
|
export declare class NgtsDecal {
|
|
12
12
|
mesh: import("@angular/core").InputSignal<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | ElementRef<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>> | null | undefined>;
|
|
13
13
|
options: import("@angular/core").InputSignalWithTransform<NgtsDecalOptions, "" | Partial<NgtsDecalOptions>>;
|
|
14
|
-
protected parameters: import("@angular/core").Signal<Omit<NgtsDecalOptions, "
|
|
14
|
+
protected parameters: import("@angular/core").Signal<Omit<NgtsDecalOptions, "debug" | "scale" | "map" | "position" | "rotation" | "depthTest" | "polygonOffsetFactor">>;
|
|
15
15
|
meshRef: import("@angular/core").Signal<ElementRef<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>>;
|
|
16
16
|
private helperRef;
|
|
17
17
|
protected map: import("@angular/core").Signal<THREE.Texture | null | undefined>;
|
package/misc/lib/deprecated.d.ts
CHANGED
|
@@ -6,9 +6,3 @@ export declare const setUpdateRange: (attribute: THREE.BufferAttribute, updateRa
|
|
|
6
6
|
offset: number;
|
|
7
7
|
count: number;
|
|
8
8
|
}) => void;
|
|
9
|
-
export declare const LinearEncoding = 3000;
|
|
10
|
-
export declare const sRGBEncoding = 3001;
|
|
11
|
-
/**
|
|
12
|
-
* NOTE: TextureEncoding was deprecated in r152, and removed in r162.
|
|
13
|
-
*/
|
|
14
|
-
export type TextureEncoding = typeof LinearEncoding | typeof sRGBEncoding;
|
package/misc/lib/fbo.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
2
|
import * as THREE from 'three';
|
|
3
|
-
import { TextureEncoding } from './deprecated';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
interface FBOSettings {
|
|
6
5
|
/** Defines the count of MSAA samples. Can only be used with WebGL 2. Default: 0 */
|
|
@@ -18,7 +17,6 @@ interface FBOSettings {
|
|
|
18
17
|
stencilBuffer?: boolean | undefined;
|
|
19
18
|
generateMipmaps?: boolean | undefined;
|
|
20
19
|
depthTexture?: THREE.DepthTexture | undefined;
|
|
21
|
-
encoding?: TextureEncoding | undefined;
|
|
22
20
|
colorSpace?: THREE.ColorSpace | undefined;
|
|
23
21
|
}
|
|
24
22
|
export interface NgtsFBOParams {
|
|
@@ -28,7 +26,7 @@ export interface NgtsFBOParams {
|
|
|
28
26
|
}
|
|
29
27
|
export declare function injectFBO(params?: () => NgtsFBOParams, { injector }?: {
|
|
30
28
|
injector?: Injector;
|
|
31
|
-
}):
|
|
29
|
+
}): THREE.WebGLRenderTarget<THREE.Texture>;
|
|
32
30
|
export declare class NgtsFBO {
|
|
33
31
|
fbo: import("@angular/core").InputSignal<{
|
|
34
32
|
width: NgtsFBOParams["width"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { NgtHTML } from 'angular-three';
|
|
3
|
-
import {
|
|
3
|
+
import { NgtsHTMLImpl } from './html';
|
|
4
4
|
import { CalculatePosition } from './utils';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
type PointerEventsProperties = 'auto' | 'none' | 'visiblePainted' | 'visibleFill' | 'visibleStroke' | 'visible' | 'painted' | 'fill' | 'stroke' | 'all' | 'inherit';
|
|
@@ -24,7 +24,7 @@ export declare class NgtsHTMLContent extends NgtHTML {
|
|
|
24
24
|
transformOuterRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
25
25
|
transformInnerRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
26
26
|
containerRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
27
|
-
protected html:
|
|
27
|
+
protected html: NgtsHTMLImpl;
|
|
28
28
|
private host;
|
|
29
29
|
private store;
|
|
30
30
|
protected size: import("angular-three").DeepSignal<import("angular-three").NgtSize>;
|
package/misc/lib/html/html.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface NgtsHTMLOptions extends Partial<NgtThreeElements['ngt-group']>
|
|
|
9
9
|
castShadow: boolean;
|
|
10
10
|
receiveShadow: boolean;
|
|
11
11
|
}
|
|
12
|
-
export declare class
|
|
12
|
+
export declare class NgtsHTMLImpl {
|
|
13
13
|
options: import("@angular/core").InputSignalWithTransform<NgtsHTMLOptions, "" | Partial<NgtsHTMLOptions>>;
|
|
14
14
|
protected parameters: import("@angular/core").Signal<Omit<NgtsHTMLOptions, "castShadow" | "receiveShadow" | "transform" | "occlude">>;
|
|
15
15
|
groupRef: import("@angular/core").Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
|
|
@@ -17,7 +17,7 @@ export declare class NgtsHTML {
|
|
|
17
17
|
occlusionGeometryRef: import("@angular/core").Signal<ElementRef<THREE.PlaneGeometry> | undefined>;
|
|
18
18
|
protected castShadow: import("@angular/core").Signal<boolean>;
|
|
19
19
|
protected receiveShadow: import("@angular/core").Signal<boolean>;
|
|
20
|
-
occlude: import("@angular/core").Signal<boolean | "raycast" | THREE.Object3D<THREE.Object3DEventMap>[] | ElementRef<THREE.Object3D<THREE.Object3DEventMap>>[]
|
|
20
|
+
occlude: import("@angular/core").Signal<boolean | "raycast" | THREE.Object3D<THREE.Object3DEventMap>[] | "blending" | ElementRef<THREE.Object3D<THREE.Object3DEventMap>>[]>;
|
|
21
21
|
transform: import("@angular/core").Signal<boolean>;
|
|
22
22
|
isRaycastOcclusion: import("@angular/core").Signal<boolean | 0>;
|
|
23
23
|
private shaders;
|
|
@@ -25,7 +25,7 @@ export declare class NgtsHTML {
|
|
|
25
25
|
protected fragmentShader: import("@angular/core").Signal<string>;
|
|
26
26
|
constructor();
|
|
27
27
|
protected readonly DoubleSide: 2;
|
|
28
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsHTMLImpl, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsHTMLImpl, "ngts-html", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["[data-occlusion-geometry]", "[data-occlusion-material]", "*"], true, never>;
|
|
30
30
|
}
|
|
31
|
-
export declare const
|
|
31
|
+
export declare const NgtsHTML: readonly [typeof NgtsHTMLImpl, typeof NgtsHTMLContent];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-three-soba",
|
|
3
|
-
"version": "4.0.0-next.
|
|
3
|
+
"version": "4.0.0-next.81",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,30 +35,30 @@
|
|
|
35
35
|
"types": "./abstractions/index.d.ts",
|
|
36
36
|
"default": "./fesm2022/angular-three-soba-abstractions.mjs"
|
|
37
37
|
},
|
|
38
|
-
"./
|
|
39
|
-
"types": "./
|
|
40
|
-
"default": "./fesm2022/angular-three-soba-
|
|
38
|
+
"./cameras": {
|
|
39
|
+
"types": "./cameras/index.d.ts",
|
|
40
|
+
"default": "./fesm2022/angular-three-soba-cameras.mjs"
|
|
41
41
|
},
|
|
42
42
|
"./gizmos": {
|
|
43
43
|
"types": "./gizmos/index.d.ts",
|
|
44
44
|
"default": "./fesm2022/angular-three-soba-gizmos.mjs"
|
|
45
45
|
},
|
|
46
|
+
"./controls": {
|
|
47
|
+
"types": "./controls/index.d.ts",
|
|
48
|
+
"default": "./fesm2022/angular-three-soba-controls.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./misc": {
|
|
51
|
+
"types": "./misc/index.d.ts",
|
|
52
|
+
"default": "./fesm2022/angular-three-soba-misc.mjs"
|
|
53
|
+
},
|
|
46
54
|
"./loaders": {
|
|
47
55
|
"types": "./loaders/index.d.ts",
|
|
48
56
|
"default": "./fesm2022/angular-three-soba-loaders.mjs"
|
|
49
57
|
},
|
|
50
|
-
"./cameras": {
|
|
51
|
-
"types": "./cameras/index.d.ts",
|
|
52
|
-
"default": "./fesm2022/angular-three-soba-cameras.mjs"
|
|
53
|
-
},
|
|
54
58
|
"./materials": {
|
|
55
59
|
"types": "./materials/index.d.ts",
|
|
56
60
|
"default": "./fesm2022/angular-three-soba-materials.mjs"
|
|
57
61
|
},
|
|
58
|
-
"./misc": {
|
|
59
|
-
"types": "./misc/index.d.ts",
|
|
60
|
-
"default": "./fesm2022/angular-three-soba-misc.mjs"
|
|
61
|
-
},
|
|
62
62
|
"./performances": {
|
|
63
63
|
"types": "./performances/index.d.ts",
|
|
64
64
|
"default": "./fesm2022/angular-three-soba-performances.mjs"
|
|
@@ -67,14 +67,14 @@
|
|
|
67
67
|
"types": "./shaders/index.d.ts",
|
|
68
68
|
"default": "./fesm2022/angular-three-soba-shaders.mjs"
|
|
69
69
|
},
|
|
70
|
-
"./stats": {
|
|
71
|
-
"types": "./stats/index.d.ts",
|
|
72
|
-
"default": "./fesm2022/angular-three-soba-stats.mjs"
|
|
73
|
-
},
|
|
74
70
|
"./staging": {
|
|
75
71
|
"types": "./staging/index.d.ts",
|
|
76
72
|
"default": "./fesm2022/angular-three-soba-staging.mjs"
|
|
77
73
|
},
|
|
74
|
+
"./stats": {
|
|
75
|
+
"types": "./stats/index.d.ts",
|
|
76
|
+
"default": "./fesm2022/angular-three-soba-stats.mjs"
|
|
77
|
+
},
|
|
78
78
|
"./vanilla-exports": {
|
|
79
79
|
"types": "./vanilla-exports/index.d.ts",
|
|
80
80
|
"default": "./fesm2022/angular-three-soba-vanilla-exports.mjs"
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"maath": ">=0.10.0 <0.11.0",
|
|
91
91
|
"meshline": "^3.1.0",
|
|
92
92
|
"stats-gl": ">=2.0.0",
|
|
93
|
-
"three": ">=0.
|
|
93
|
+
"three": ">=0.156.0 <0.175.0",
|
|
94
94
|
"three-custom-shader-material": ">=5.5.0 <6.4.0",
|
|
95
95
|
"three-mesh-bvh": ">=0.5.0 <0.10.0",
|
|
96
96
|
"three-stdlib": "^2.0.0",
|
package/performances/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class NgtsAdaptiveDpr {
|
|
3
|
-
pixelated: import("@angular/core").
|
|
3
|
+
pixelated: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
4
4
|
constructor();
|
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsAdaptiveDpr, never>;
|
|
6
6
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsAdaptiveDpr, "ngts-adaptive-dpr", never, { "pixelated": { "alias": "pixelated"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { NgtThreeElements } from 'angular-three';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
import { SplitStrategy } from 'three-mesh-bvh';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export type NgtsBVHOptions = Partial<NgtThreeElements['ngt-group']> & {
|
|
7
|
+
/**Enabled, default: true */
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
/** Use .raycastFirst to retrieve hits which is generally faster, default: false */
|
|
10
|
+
firstHitOnly: boolean;
|
|
11
|
+
/** Split strategy, default: SAH (slowest to construct, fastest runtime, least memory) */
|
|
12
|
+
strategy: SplitStrategy;
|
|
13
|
+
/** Print out warnings encountered during tree construction, default: false */
|
|
14
|
+
verbose: boolean;
|
|
15
|
+
/** If true then the bounding box for the geometry is set once the BVH has been constructed, default: true */
|
|
16
|
+
setBoundingBox: boolean;
|
|
17
|
+
/** The maximum depth to allow the tree to build to, default: 40 */
|
|
18
|
+
maxDepth: number;
|
|
19
|
+
/** The number of triangles to aim for in a leaf node, default: 10 */
|
|
20
|
+
maxLeafTris: number;
|
|
21
|
+
/** If false then an index buffer is created if it does not exist and is rearranged */
|
|
22
|
+
/** to hold the bvh structure. If false then a separate buffer is created to store the */
|
|
23
|
+
/** structure and the index buffer (or lack thereof) is retained. This can be used */
|
|
24
|
+
/** when the existing index layout is important or groups are being used so a */
|
|
25
|
+
/** single BVH hierarchy can be created to improve performance. */
|
|
26
|
+
/** default: false */
|
|
27
|
+
/** Note: This setting is experimental */
|
|
28
|
+
indirect?: boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare class NgtsBVH {
|
|
31
|
+
options: import("@angular/core").InputSignalWithTransform<NgtsBVHOptions, "" | Partial<NgtsBVHOptions>>;
|
|
32
|
+
protected parameters: import("@angular/core").Signal<Omit<NgtsBVHOptions, "enabled" | "firstHitOnly" | "strategy" | "verbose" | "setBoundingBox" | "maxDepth" | "maxLeafTris" | "indirect">>;
|
|
33
|
+
groupRef: import("@angular/core").Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
|
|
34
|
+
private store;
|
|
35
|
+
private enabled;
|
|
36
|
+
private firstHitOnly;
|
|
37
|
+
private strategy;
|
|
38
|
+
private verbose;
|
|
39
|
+
private setBoundingBox;
|
|
40
|
+
private maxDepth;
|
|
41
|
+
private maxLeafTris;
|
|
42
|
+
private indirect;
|
|
43
|
+
private reset;
|
|
44
|
+
private retryMap;
|
|
45
|
+
private MAX_RETRIES;
|
|
46
|
+
constructor();
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsBVH, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsBVH, "ngts-bvh", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
49
|
+
}
|
|
@@ -19,7 +19,7 @@ export interface NgtsInstancesOptions extends Partial<NgtThreeElements['ngt-inst
|
|
|
19
19
|
export declare class NgtsInstances {
|
|
20
20
|
protected readonly DynamicDrawUsage: 35048;
|
|
21
21
|
options: import("@angular/core").InputSignalWithTransform<NgtsInstancesOptions, "" | Partial<NgtsInstancesOptions>>;
|
|
22
|
-
protected parameters: import("@angular/core").Signal<Omit<NgtsInstancesOptions, "
|
|
22
|
+
protected parameters: import("@angular/core").Signal<Omit<NgtsInstancesOptions, "range" | "limit" | "frames">>;
|
|
23
23
|
instancedMeshRef: import("@angular/core").Signal<ElementRef<THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.InstancedMeshEventMap>>>;
|
|
24
24
|
private limit;
|
|
25
25
|
protected buffers: import("@angular/core").Signal<{
|
|
@@ -29,7 +29,7 @@ export interface NgtsPointsInstancesOptions extends Partial<NgtThreeElements['ng
|
|
|
29
29
|
}
|
|
30
30
|
export declare class NgtsPointsInstances {
|
|
31
31
|
options: import("@angular/core").InputSignalWithTransform<NgtsPointsInstancesOptions, "" | Partial<NgtsPointsInstancesOptions>>;
|
|
32
|
-
parameters: import("@angular/core").Signal<Omit<NgtsPointsInstancesOptions, "
|
|
32
|
+
parameters: import("@angular/core").Signal<Omit<NgtsPointsInstancesOptions, "range" | "limit">>;
|
|
33
33
|
pointsRef: import("@angular/core").Signal<ElementRef<THREE.Points<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>>;
|
|
34
34
|
private limit;
|
|
35
35
|
buffers: import("@angular/core").Signal<{
|