Two other common properties of three.js objects are the children and parent properties. 3D scenes are structured in a hierarchical manner where there is a parent/child relationship in between objects much like how it is in between HTML elements. The scene object happens to be the parent for all the objects as everything else get's added to the scene object using its add method. Just like how you are adding objects inside the scene object we could add objects inside other objects as well. This establishes a parent-child relationship between objects. So if you were to move the parent object then the children would move with it as well. There are two other methods that you will learn about here, which are the getObjectByName() and the traverse() methods.
- [Instructor] Two other common properties…of three.JS objects…are the children and parent properties.…3D scenes are structured in a hierarchical manner,…where there's a parent child relationship…in between objects,…much like how it is in between HTML, LMS.…The scene object happens to be the parent…for all the objects,…as everything else gets added to the scene object…using its "add" method.…You can simply think of the three.JS scene…as a container for every other object…that you will be rendering.…
It's pretty much like the body tag in HTML,…where every other element that we want to be visible…gets added to.…Just like how we are adding objects inside…the scene object,…we could add objects inside other objects as well.…This helps us to establish a parent child relationship…between different objects.…There are numerous reasons why we might want to do that.…Sometimes, you might want to do this…when it provides a logical grouping of objects.…Another reason is that objects that are added…to other objects…will share the transformation of the parent object.…
- Building a simple scene
- Creating three.js 3D objects
- Adding light and shadows
- Animating with Tween.js
- Working with materials and textures
- Editing and importing geometries
- Creating a particle system
- Post-processing with effects and shaders
Skill Level Intermediate
Flash Professional: HTML5 Canvas and WebGLwith Joseph Labrecque1h 36m Intermediate
HTML5: Graphics and Animation with Canvaswith Joe Marini3h 7m Intermediate
1. Building a Simple Scene
2. Three.js Scene Object
5. Materials and Textures
Next steps1m 53s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.