three-stdlib 2.23.10 → 2.23.12
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/package.json
CHANGED
@@ -8,7 +8,13 @@ export interface RenderPixelatedPassParameters {
|
|
8
8
|
}
|
9
9
|
|
10
10
|
export class RenderPixelatedPass extends Pass {
|
11
|
-
constructor(
|
11
|
+
constructor(
|
12
|
+
resolution: Vector2,
|
13
|
+
pixelSize: number,
|
14
|
+
scene: Scene,
|
15
|
+
camera: Camera,
|
16
|
+
options?: RenderPixelatedPassParameters,
|
17
|
+
)
|
12
18
|
pixelSize: number
|
13
19
|
resolution: Vector2
|
14
20
|
renderResolution: Vector2
|
@@ -23,6 +29,6 @@ export class RenderPixelatedPass extends Pass {
|
|
23
29
|
normalEdgeStrength: RenderPixelatedPassParameters['normalEdgeStrength']
|
24
30
|
depthEdgeStrength: RenderPixelatedPassParameters['depthEdgeStrength']
|
25
31
|
|
26
|
-
|
32
|
+
rgbRenderTarget: WebGLRenderTarget
|
27
33
|
normalRenderTarget: WebGLRenderTarget
|
28
34
|
}
|
@@ -578,7 +578,7 @@ function toCreasedNormals(geometry, creaseAngle = Math.PI / 3) {
|
|
578
578
|
const z = ~~(v.z * hashMultiplier);
|
579
579
|
return `${x},${y},${z}`;
|
580
580
|
}
|
581
|
-
const resultGeometry = geometry.toNonIndexed();
|
581
|
+
const resultGeometry = geometry.index ? geometry.toNonIndexed() : geometry;
|
582
582
|
const posAttr = resultGeometry.attributes.position;
|
583
583
|
const vertexMap = {};
|
584
584
|
for (let i = 0, l = posAttr.count / 3; i < l; i++) {
|
@@ -45,4 +45,19 @@ export type ComputedMorphedAttribute = {
|
|
45
45
|
morphedNormalAttribute: Float32BufferAttribute;
|
46
46
|
};
|
47
47
|
export declare function computeMorphedAttributes(object: Mesh | Line | Points): ComputedMorphedAttribute | null;
|
48
|
+
/**
|
49
|
+
* Modifies the supplied geometry if it is non-indexed, otherwise creates a new,
|
50
|
+
* non-indexed geometry. Returns the geometry with smooth normals everywhere except
|
51
|
+
* faces that meet at an angle greater than the crease angle.
|
52
|
+
*
|
53
|
+
* Backwards compatible with code such as @react-three/drei's `<RoundedBox>`
|
54
|
+
* which uses this method to operate on the original geometry.
|
55
|
+
*
|
56
|
+
* As of this writing, BufferGeometry.toNonIndexed() warns if the geometry is
|
57
|
+
* non-indexed and returns `this`, i.e. the same geometry on which it was called:
|
58
|
+
* `BufferGeometry is already non-indexed.`
|
59
|
+
*
|
60
|
+
* @param geometry
|
61
|
+
* @param creaseAngle
|
62
|
+
*/
|
48
63
|
export declare function toCreasedNormals(geometry: BufferGeometry, creaseAngle?: number): BufferGeometry;
|
@@ -576,7 +576,7 @@ function toCreasedNormals(geometry, creaseAngle = Math.PI / 3) {
|
|
576
576
|
const z = ~~(v.z * hashMultiplier);
|
577
577
|
return `${x},${y},${z}`;
|
578
578
|
}
|
579
|
-
const resultGeometry = geometry.toNonIndexed();
|
579
|
+
const resultGeometry = geometry.index ? geometry.toNonIndexed() : geometry;
|
580
580
|
const posAttr = resultGeometry.attributes.position;
|
581
581
|
const vertexMap = {};
|
582
582
|
for (let i = 0, l = posAttr.count / 3; i < l; i++) {
|