Skip to Content
Learn Three.js - Third Edition
book

Learn Three.js - Third Edition

by Jos Dirksen
August 2018
Intermediate to advanced
528 pages
10h 58m
English
Packt Publishing
Content preview from Learn Three.js - Third Edition

Physi.js material properties

Let's begin with an explanation of the example. When you open the 02-material-properties.html example, you'll see an empty box somewhat similar to the previous example. This box is rotating up and down around its x axis. In the menu, in the top-right corner, you have several sliders that can be used to change some of the material properties of Physijs. These properties apply to the cubes and spheres you can add with the addCubes and addSpheres buttons. When you press the addSpheres button, five spheres will be added to the scene, and when you press the addCubes button, five cubes will be added. The following screenshot is an example demonstrating friction and restitution:

This example allows you to play around ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-on Three.js 3D Web Visualisations

Hands-on Three.js 3D Web Visualisations

Nik Lever

Publisher Resources

ISBN: 9781788833288Supplemental Content