O'Reilly logo

Learning Three.js: The JavaScript 3D Library for WebGL by Jos Dirksen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Basic supported shapes

Physijs provides a number of shapes you can use to wrap your geometries. In this section we'll walk you through all the available Physijs meshes and demonstrate these meshes through an example. Remember that all you have to do to use these meshes is replace the THREE.Mesh constructor with one of these meshes.

The following table provides an overview of the meshes that are available in Physijs:

Name

Description

Physijs.PlaneMesh

This mesh can be used to create a zero-thickness plane. You could also use a BoxMesh object for this along with a THREE.CubeGeometry property with a low height.

Physijs.BoxMesh

If you have geometries that look like a cube, use this mesh. For instance, this is a good match for the THREE.CubeGeometry ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required