@react-three/csg
Advanced tools
Comparing version 0.1.1 to 1.0.0
{ | ||
"name": "@react-three/csg", | ||
"version": "0.1.1", | ||
"version": "1.0.0", | ||
"description": "non gratum anus rodentum", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs", |
@@ -23,2 +23,4 @@ <p> | ||
The outmost operation will yield a buffergeometry, so you can use it in a mesh, an instancedMesh, or whatever needs a goemetry to function. | ||
```jsx | ||
@@ -29,14 +31,16 @@ import { Brush, Subtraction, Addition, Difference, Intersection } from '@react-three/csg' | ||
return ( | ||
<Subtraction> | ||
<Subtraction a> | ||
<Brush a scale={1.5} position={[0, -1.04, 0]} geometry={nodes.bunny.geometry} /> | ||
<Brush b position={[0.5, -0.75, 1]}> | ||
<mesh> | ||
<Subtraction> | ||
<Subtraction a> | ||
<Brush a scale={1.5} position={[0, -1.04, 0]} geometry={nodes.bunny.geometry} /> | ||
<Brush b position={[0.5, -0.75, 1]}> | ||
<sphereGeometry /> | ||
</Brush> | ||
</Subtraction> | ||
<Brush b position={[-1, 1, 1]}> | ||
<sphereGeometry /> | ||
</Brush> | ||
</Subtraction> | ||
<Brush b position={[-1, 1, 1]}> | ||
<sphereGeometry /> | ||
</Brush> | ||
<meshNormalMaterial /> | ||
</Subtraction> | ||
</mesh> | ||
) | ||
@@ -58,9 +62,10 @@ } | ||
return ( | ||
<Subtraction castShadow receiveShadow> | ||
<Brush a rotation={[0, Math.PI / 2, 0]} position={[-0.35, 0.4, 0.4]}> | ||
<boxGeometry /> | ||
</Brush> | ||
<Brush b ref={brush} position={[-0.35, 0.4, 0.4]}> | ||
<boxGeometry /> | ||
</Brush> | ||
<mesh> | ||
<Subtraction castShadow receiveShadow> | ||
<Brush a rotation={[0, Math.PI / 2, 0]} position={[-0.35, 0.4, 0.4]}> | ||
<boxGeometry /> | ||
</Brush> | ||
<Brush b ref={brush} position={[-0.35, 0.4, 0.4]}> | ||
<boxGeometry /> | ||
</Brush> | ||
``` |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
216863
5962
1
69