
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
axis3d-geometry
Advanced tools
Common geometry for Axis3D. All
the geometry in this module extends the Geometry class exposing
positions, normals, uvs, and cells as properties on the
instance effectively creating a
simplicial-complex.
$ npm install axis3d-geometry
Ensure axis3d is already installed as a peer dependency.
const {
PerspectiveCamera,
FlatMaterial,
Context,
Frame,
Mesh
} = require('axis3d')
const { BoxGeometry } = require('axis3d-geometry')
const box = new Mesh(ctx, {geometry: new BoxGeometry()})
frame(({time}) => {
camera({position: [0, 0, 10]}, () => {
material({}, () => {
box({wireframe: true})
})
})
})
const box = new BoxGeometry(opts)
where opts contains:
segments - defaults tox - Size along the x-axis. (default: 1)y - Size along the y-axis. (default: 1)z - Size along the z-axis. (default: 1)and are passed directly to primitive-cube.
const triangle = new TriangleGeometry()
const cylinder = new CylinderGeometry(opts)
where opts contains:
height - Size along the y-axis. (default: 5)radiusTop - Radius of the top cross-section, or circle. (default: 1)radiusBottom - Radius of the bottom cross-section, or circle. (default: 1)radialSegments - Number of radial segments in the complex. (default: 50)heightSegments - Number of height segments in the complex. (default: 50)and are passed directly to primitive-cylinder.
const sphere = new SphereGeometry(opts)
where opts contains:
segments - Number of segments in the complex. (default: 32)radius - Spherical radius. (default: 1)and are passed directly to primitive-sphere.
const plane = new PlaneGeometry(opts)
where opts contains:
segments - Number of segments along the xy-axis. (default: {x: 5, y: 5})
segments.x - Number of segments along the x-axis. (default: 5)segments.y - Number of segments along the y-axis. (default: 5)size - Size of complex along the xy-axis. (default: {x: 1, y: 1})
size.x - Size of complex along the x-axis. (default: 1)size.y - Size of complex along the y-axis. (default: 1)quads - Indication to generate quads instead of triangles. (default: false)and are passed directly to primitive-plane.
const torus = new TorusGeometry(opts)
where opts contains:
majorSegments - The number of segments for the major ring. (default: 32)minorSegments - The number of segments for the minor rigg. (default: 64)majorRadius - The radius of the major ring. (default: 1)minorRadius - The radius of the minor ring. (default: 0.5)arc - The torus arc path. (default: 2*Math.PI)and are passed directly to primitive-torus.
const capsule = new CapsuleGeometry(opts)
where opts contains:
radius - The radius of the inner circle cross-section. (default: 0.5)height - The size along the y-axix. (default: 1)segments - The number of segments in complex. (default: 12)and are passed directly to primitive-capsule.
MIT
FAQs
Common geometry for Axis3D
We found that axis3d-geometry 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
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.