threejs-slice-geometry

Slice three.js geometry with a plane.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
threejs-slice-geometry
0.2.25 years ago5 years agoMinified + gzip package size for threejs-slice-geometry in KB

Readme

Three.js Slice Geometry
Slice three.js geometry with a plane.

Usage

var plane = new THREE.Plane(new THREE.Vector3(0, 0, 1), 0);
var geom = new THREE.BoxGeometry(1, 1, 1);
geom = sliceGeometry(geom, plane);
var material = new THREE.MeshBasicMaterial({ wireframe: true });
var mesh = new THREE.Mesh(geom, material);
scene.add(mesh);

Builds

  • http://tdhooper.github.io/threejs-slice-geometry/build/slice.js
  • http://tdhooper.github.io/threejs-slice-geometry/build/slice.min.js

Examples

https://tdhooper.github.io/threejs-slice-geometry/examples