Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Learning Three.js: The JavaScript 3D Library for WebGL - Second Edition
  • Toc
  • feedback
Learning Three.js: The JavaScript 3D Library for WebGL - Second Edition

Learning Three.js: The JavaScript 3D Library for WebGL - Second Edition

By : Jos Dirksen
4.4 (14)
close
Learning Three.js: The JavaScript 3D Library for WebGL - Second Edition

Learning Three.js: The JavaScript 3D Library for WebGL - Second Edition

4.4 (14)
By: Jos Dirksen

Overview of this book

If you know JavaScript and want to start creating 3D graphics that run in any browser, this book is a great choice for you. You don't need to know anything about math or WebGL; all that you need is general knowledge of JavaScript and HTML.
Table of Contents (14 chapters)
close
8
8. Creating and Loading Advanced Meshes and Geometries
13
Index

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 BoxMesh for this together with THREE.BoxGeometry with low height.

Physijs.BoxMesh

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

Physijs.SphereMesh

For sphere shapes, use this geometry. This geometry is a good match for THREE.SphereGeometry.

Physijs.CylinderMesh

With THREE.Cylinder, you can create various cylinder-like shapes. Physijs provides multiple meshes depending on the...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete