Overview
These types define the core data structures for scene objects in G3Engine, including geometry, transforms, materials, and lighting.SceneObject
Represents a complete 3D object in the scene with all its properties.Properties
Unique identifier for the object (UUID v4)
Display name of the object in the scene hierarchy
Type of 3D object or light. See ObjectType
Material properties defining the object’s appearance. See MaterialProps
Whether the object is visible in the scene
Light intensity for light objects only. Range typically 0-10
Light color for light objects only (hex format, e.g., “#ffffff”)
ObjectType
Defines the available geometry and light types.Geometry Types
box- Cube/box meshsphere- Spherical meshcylinder- Cylindrical meshplane- Flat plane meshcone- Cone meshtorus- Torus/donut mesh
Light Types
pointLight- Point light (emits in all directions)directionalLight- Directional light (parallel rays)ambientLight- Ambient light (uniform lighting)
Camera
camera- Camera object for viewpoint control
Vec3
Three-component vector used for position, rotation, and scale.Properties
X-axis component
Y-axis component
Z-axis component
Usage Examples
MaterialProps
Defines the visual appearance of an object using PBR (Physically Based Rendering) properties.Properties
Base color of the material in hex format (e.g., “#6366f1”)
Surface roughness from 0 (smooth/reflective) to 1 (rough/diffuse)
Metallic property from 0 (dielectric) to 1 (metallic)
Emissive (glow) color in hex format (e.g., “#ffffff”)
Intensity of the emissive glow. Range typically 0-10
Opacity level from 0 (fully transparent) to 1 (fully opaque). Requires
transparent: trueWhether the material supports transparency
Usage Examples
TransformMode
Defines the active transform manipulation mode in the editor.translate- Move objects in 3D spacerotate- Rotate objects around their axesscale- Resize objects along their axes