@hology/webgpu-renderer 0.1.7 → 0.1.8
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/dist/index.d.ts +12 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as three from 'three';
|
|
2
|
-
import { Color, Vector2, Vector3, Vector4, Matrix3, Matrix4, Material, Texture, MaterialParameters, DirectionalLight, PointLight, SpotLight, Object3D, PerspectiveCamera, OrthographicCamera, Scene } from 'three';
|
|
2
|
+
import { Color, Vector2, Vector3, Vector4, Matrix3, Matrix4, Material, Texture, MaterialParameters, DirectionalLight, PointLight, SpotLight, Object3D, PerspectiveCamera, OrthographicCamera, BufferGeometry, Scene } from 'three';
|
|
3
3
|
export { AmbientLight, BackSide, BatchedMesh, Bone, BoxGeometry, BufferAttribute, BufferGeometry, CanvasTexture, Color, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedArrayTexture as CompressedTextureArray, CubeTexture, Data3DTexture, DataArrayTexture, DataTexture, DepthTexture, DirectionalLight, DoubleSide, FrontSide, Group, HemisphereLight, InstancedMesh, MathUtils, Matrix4, Mesh, Object3D, OrthographicCamera, PerspectiveCamera, PlaneGeometry, PointLight, RepeatWrapping, Scene, Skeleton, SkinnedMesh, SphereGeometry, SpotLight, Texture, Vector2, Vector3, Vector4 } from 'three';
|
|
4
4
|
|
|
5
5
|
interface ComputeKernelDescriptor {
|
|
@@ -380,6 +380,8 @@ interface RendererMaterialPassDescriptor {
|
|
|
380
380
|
readonly drawStage?: "all" | "opaque" | "late";
|
|
381
381
|
/** Preserve existing attachment contents instead of clearing them. */
|
|
382
382
|
readonly loadColor?: boolean;
|
|
383
|
+
/** Color used when clearing the attachments. Defaults to the renderer clear color. */
|
|
384
|
+
readonly clearColor?: readonly [number, number, number, number];
|
|
383
385
|
/** Preserve depth written by an earlier pass. Defaults to clear. */
|
|
384
386
|
readonly loadDepth?: boolean;
|
|
385
387
|
/** Draw only objects accepted by this predicate. Intended for selection/mask passes. */
|
|
@@ -422,6 +424,8 @@ interface RendererCustomPassContext {
|
|
|
422
424
|
view: GPUTextureView;
|
|
423
425
|
sampler: GPUSampler;
|
|
424
426
|
};
|
|
427
|
+
/** Resolves the current renderer-owned vertex buffer for a geometry. */
|
|
428
|
+
getGeometryVertexBuffer(geometry: BufferGeometry, attribute: "position" | "normal"): GPUBuffer;
|
|
425
429
|
getColorFormat(name: string): GPUTextureFormat;
|
|
426
430
|
getShadowMapDebugInfo(): RendererShadowMapDebugInfo;
|
|
427
431
|
/** Shared light uniforms and shadow arrays used by the forward renderer. */
|
|
@@ -527,6 +531,7 @@ interface FrameGraphMaterialPassDescriptor {
|
|
|
527
531
|
readonly outputs?: FrameGraphTextureHandle | readonly FrameGraphTextureHandle[];
|
|
528
532
|
readonly drawStage?: "all" | "opaque" | "late";
|
|
529
533
|
readonly loadColor?: boolean;
|
|
534
|
+
readonly clearColor?: readonly [number, number, number, number];
|
|
530
535
|
readonly loadDepth?: boolean;
|
|
531
536
|
readonly objectFilter?: (object: Object3D | null) => boolean;
|
|
532
537
|
readonly overrideMaterial?: WGSLShaderMaterial | ((source: WGSLShaderMaterial, skinned: boolean) => WGSLShaderMaterial);
|
|
@@ -1126,6 +1131,8 @@ declare class WebGpuRenderer {
|
|
|
1126
1131
|
private clearSpotShadow;
|
|
1127
1132
|
private drawDepthLike;
|
|
1128
1133
|
private getGeometryResource;
|
|
1134
|
+
/** Upload changed standard BufferAttributes without replacing their buffers. */
|
|
1135
|
+
private updateDynamicGeometryAttributes;
|
|
1129
1136
|
private getSkinnedGeometryResource;
|
|
1130
1137
|
private getSkinningPalette;
|
|
1131
1138
|
private refreshSkinningPalette;
|
|
@@ -1617,6 +1624,8 @@ interface OutlineOptions {
|
|
|
1617
1624
|
readonly edgeStrength?: number;
|
|
1618
1625
|
/** Outline radius in physical render pixels. */
|
|
1619
1626
|
readonly edgeThickness?: number;
|
|
1627
|
+
/** Width of the outline's antialiased falloff in physical render pixels. */
|
|
1628
|
+
readonly edgeSoftness?: number;
|
|
1620
1629
|
readonly targetPrefix?: string;
|
|
1621
1630
|
}
|
|
1622
1631
|
interface OutlineInputs {
|
|
@@ -1638,6 +1647,7 @@ declare class OutlineEffect {
|
|
|
1638
1647
|
visibleEdgeColor: [number, number, number];
|
|
1639
1648
|
edgeStrength: number;
|
|
1640
1649
|
edgeThickness: number;
|
|
1650
|
+
edgeSoftness: number;
|
|
1641
1651
|
readonly selectedObjects: Set<Object3D<three.Object3DEventMap>>;
|
|
1642
1652
|
readonly selectedInstances: OutlineInstanceSelection[];
|
|
1643
1653
|
private readonly targetPrefix;
|
|
@@ -1649,6 +1659,7 @@ declare class OutlineEffect {
|
|
|
1649
1659
|
setSelectedObjects(objects: Iterable<Object3D>): void;
|
|
1650
1660
|
setSelectedInstances(selections: Iterable<OutlineInstanceSelection>): void;
|
|
1651
1661
|
addPass(graph: FrameGraphBuilder, source: FrameGraphTextureHandle): FrameGraphTextureHandle;
|
|
1662
|
+
private addCachedPass;
|
|
1652
1663
|
dispose(): void;
|
|
1653
1664
|
}
|
|
1654
1665
|
|