
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
three-js-csg
Advanced tools
three-js-csg is a wrapper for NPM around chandlerprall's Constructive Solid Geometry port to three.js. This package provides support for use with ES2015/AMD/CommonJS style modularity and composability.
npm i --save three-js-csg
import THREE from 'three';
const ThreeBSP = require('../../index.js')(THREE);
export const meshFactory = () => {
const box = new THREE.Mesh(new THREE.BoxGeometry(500, 100, 100));
const sphere = new THREE.Mesh(new THREE.SphereGeometry(100, 50, 50));
const sBSP = new ThreeBSP(sphere);
const bBSP = new ThreeBSP(box);
const sub = bBSP.subtract(sBSP);
const newMesh = sub.toMesh();
newMesh.material = new THREE.MeshPhongMaterial({ color: 0xdddddd, specular: 0x1a1a1a, shininess: 30, shading: THREE.FlatShading });
return Object.assign({}, { csg: newMesh });
};
When instantiating the NPM module, it takes an instance of three.js therefore doesn't need to sit globally on the window object. In a currying-esque manner, the NPM module returns a function with which you can pass in three.js geometry like usual.
See a full demo in this demo at ./demo. First clone the repo, run npm install and then npm run watch. Open ./demo/index.html in browser to see the demo in action.
FAQs
An NPM module for ThreeJS's CSG (Constructive Solid Geometry) port
The npm package three-js-csg receives a total of 283 weekly downloads. As such, three-js-csg popularity was classified as not popular.
We found that three-js-csg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.