![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@react-three/csg
Advanced tools
yarn add @react-three/csg
A small, abstraction around https://github.com/gkjohnson/three-bvh-csg. It is not feature complete!
You have 4 operations:
Each can take a <Brush>
, which is like a THREE.Mesh, it needs a geometry. A brush must be either slot a
or b
(first & second operand), which you need to define as a prop.
If you nest operations, the operation itself becomes a brush and must also define a slot.
import { Brush, Subtraction, Addition, Difference, Intersection } from '@react-three/csg'
function Model() {
return (
<Subtraction>
<Subtraction a>
<Brush a scale={1.5} position={[0, -1.04, 0]} geometry={nodes.bunny.geometry} />
<Brush b ref={mesh} position={[0.5, -0.75, 1]}>
<sphereGeometry />
</Brush>
</Subtraction>
<Brush b position={[-1, 1, 1]}>
<sphereGeometry />
</Brush>
<meshNormalMaterial />
</Subtraction>
)
}
If you update a brush, or an operation, set needsUpdate
on it, it will bubble up to its base operation. Keep in mind that although the base CSG implementation is fast, this is something you may want to avoid doing often or runtime, depending on the complexity of your geometry.
function Shape() {
const brush = useRef()
useFrame((state, delta) => {
brush.current.rotation.x += 0.025
brush.current.needsUpdate = true
})
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>
FAQs
Constructive solid geometry for React
The npm package @react-three/csg receives a total of 0 weekly downloads. As such, @react-three/csg popularity was classified as not popular.
We found that @react-three/csg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.