scene_object
The scene object is used to interact with the 3D models in the scene. Move them, rotate them, etc.
resize(scale_x, scale_y, scale_z) | Resizes the object by modifying its scaling matrix |
---|---|
set_size(scale_x, scale_y, scale_z) | Resizes the object by modifying its scaling matrix |
reposition(x, y, z) | Changes the position of the object |
set_position(x, y, z) | Changes the position of the object |
set_rotation(...) | changes the objects rotation with either euler angles or a quaternions |
remove() | removes the geometry from the scene |
set_frag_shader(shader) | sets the fragment shader for this geometry |
set_vertex_shader(shader) | sets the vertex shader for this geometry |
set_geometry_shader(shader) | sets the geometry shader for this geometry |
clone() | creates an instantiated copy of this object and returns it |
fields |
- resize(scale_x, scale_y, scale_z)Source
Resizes the object by modifying its scaling matrix
Parameters
- scale_x number the
x
axis scale factor - scale_y number the
y
axis scale factor - scale_z number the
z
axis scale factor
Returns
- scene_object the scene object this was used on. used for chaining methods
- scale_x number the
- set_size(scale_x, scale_y, scale_z)Source
Resizes the object by modifying its scaling matrix
Parameters
- scale_x number the
x
axis scale factor - scale_y number the
y
axis scale factor - scale_z number the
z
axis scale factor
Returns
- scene_object the scene object this was used on. used for chaining methods
- scale_x number the
- reposition(x, y, z)Source
Changes the position of the object
Parameters
- x number the
x
position to set the object to - y number the
y
position to set the object to - z number the
z
position to set the object to
Returns
- scene_object the scene object this was used on. used for chaining methods
- x number the
- set_position(x, y, z)Source
Changes the position of the object
Parameters
- x number the
x
position to set the object to - y number the
y
position to set the object to - z number the
z
position to set the object to
Returns
- scene_object the scene object this was used on. used for chaining methods
- x number the
- set_rotation(...)Source
changes the objects rotation with either euler angles or a quaternions
Parameters
- euler_x number the rotation around the x axis in degrees
- euler_y number the rotation around the y axis in degrees
- euler_z number the rotation around the z axis in degrees
Or
- quat_x number the x position of the rotation direction vector
- quat_y number the y position of the rotation direction vector
- quat_z number the z position of the rotation direction vector
- vec_rot number the rotation around the direction vector in degrees
Returns
- scene_object the scene object this was used on. used for chaining methods
- remove()Source
removes the geometry from the scene
Returns
- scene_object the scene object this was used on. used for chaining methods
- set_frag_shader(shader)Source
sets the fragment shader for this geometry
Parameters
- shader function the shader function to be set
Returns
- scene_object the scene object this was used on. used for chaining methods
- set_vertex_shader(shader)Source
sets the vertex shader for this geometry
Parameters
- shader function the shader function to be set
Returns
- scene_object the scene object this was used on. used for chaining methods
- set_geometry_shader(shader)Source
sets the geometry shader for this geometry
Parameters
- shader function the shader function to be set
Returns
- scene_object the scene object this was used on. used for chaining methods
- clone()Source
creates an instantiated copy of this object and returns it
Returns
- scene_object the instantiated scene object
- fieldsSource
ID the ID of this object in the internal data BUS effects a list that stores the applied shaders to this scene object properties stores properties of the scene object, like color.