
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
three-2-csg
Advanced tools
This is a converter which enables conversion of ThreeJS objects into CSG and back (it works both ways).
CSG objects created by this converter can then be manipulated via @jscad/csg.
This solution is based on ThreeCSG.js converter by Chandler Prall.
npm i three-2-csg
The following example is based on a Stack overflow example by 4m1r:
import { toCSG, fromCSG } from 'three-2-csg';
//sphere
var sphere = new THREE.SphereGeometry(2,20,20);
var sphereMesh = new THREE.Mesh( sphere, material );
var sphereCSG = toCSG( sphereMesh ); // converting ThreeJS object to CSG
// cyl
var cylinder = new THREE.CylinderGeometry(0.5, 0.5, 5, 32 );
var cylinderMesh = new THREE.Mesh( cylinder, material );
var cylinderCSG = toCSG( cylinderMesh ); // converting ThreeJS object to CSG
//result
var subtractCSG = sphereCSG.subtract( cylinderCSG );
var result = fromCSG(subtractCSG); // converting CSG back into ThreeJS object
result.geometry.computeVertexNormals();
scene.add( result );
CSG_solid
Converts a ThreeJS 3D object into a CSG solid
THREE_Geometry
Converts a CSG solid (3d object) into regular ThreeJS geometry
CSG_solid
Converts a ThreeJS 3D object into a CSG solid
Kind: global function
Param | Type | Description |
---|---|---|
three_model | ThreeJS_Mesh | ThreeJS Mesh (or Geometry) which needs to be converted |
THREE_Geometry
Converts a CSG solid (3d object) into regular ThreeJS geometry
Kind: global function
Param | Type | Description |
---|---|---|
csg_model | CSG_solid | = CSG solid to be converted |
MIT License, http://www.opensource.org/licenses/MIT
FAQs
converts ThreeJS object into CSG and back
The npm package three-2-csg receives a total of 21 weekly downloads. As such, three-2-csg popularity was classified as not popular.
We found that three-2-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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.