Scene structure
Cocos Creator 3D adds a 3D scene structure to Creator’s EC (entity component) framework. The 3D scene is represented by RenderScene. The corresponding Component in the EC structure references the Model, Camera, and Light are maintained in RenderScene
. Other elements are also linked together through Node, including the Transformations in RenderScene
is also manipulated through the Node API.
Note: the differences between Scene in EC structure and RenderScene in a 3D scene structure. Scene in EC structure is the logical organization structure of the Node hierarchy. RenderScene in 3D is the organization structure of scene rendering elements. Elements in EC scene's contain references to the correspond rendering objects in
RenderScene
.
The relationship between EC structure and 3D scene structure is shown in the following figure:
The entire 3D scene structure is encapsulated under Component, and the organizational relationship is established through Node. This is completely transparent relationship between EC structure and a 3D scene.
Continue to the Node documentation.