mirror of
https://github.com/visgl/luma.gl.git
synced 2025-12-08 17:36:19 +00:00
* Add separate functions for highlightColor, filterColor in Picking module. * Fix Picking example * Fix Model object creation in examples and update docs.
938 B
938 B
Object3d
The Model class enables you to create 3D models which are compatible with the Group class. All primitives (Sphere, etc) inherit from Model.
Usage
Object3d is a base class, normally used through Model or Group
Properties
A Model instance has a number of public properties that can be accessed/modified:
position(object) - AVector3indicating the position of the Model.rotation(object) - AVector3indicating the rotation of the Model.scale(object) - AVecto3indicating the scaling of the Model.matrix(object) - AMatrix4containing information about position, rotation and scale.
This matrix gets updated each time the method update is called on a Model instance.
Methods
constructor
var model = new Model(gl, options);
update
Update the model matrix. Useful to update changes to the position, rotation or scale properties.
model.update();