Tracks and manages voxels.
Access properties with .nameand .name = value.
C3D.Canvas3DReference to the canvas to which this controller belongs
Call methods with.name(),.name(arguments)or just .name arguments .
a, b, c)
-> C3D.models.Voxel#Adds a voxel at the passed lattice position
Number
Number
Number
C3D.models.Voxel
fun)
-> C3D.models.Voxel#Adds voxels according to an arbitrary predicate function
FunctionPredicate to apply to each position in the lattice.
C3D.models.Voxel
[options])
-> undefined# Backbone.Model Removes all attributes from the model, including the id attribute. Fires a
"change" event unless silent is passed as an option.
Object
(Optional)Backbone.Model# Backbone.Model Returns a copy of the model.
Backbone.Modelcopy of the model
iterator, i, j, k, voxel)
-> undefined#Applies an iterator to each voxel in the canvas
FunctionFunction to be called on each voxel
Number
Number
Number
C3D.models.Voxel
a, b, c)
-> C3D.models.Voxel#Finds a voxel at the passed lattice position
Number
Number
Number
C3D.models.Voxel
attribute)
-> Mixed# Backbone.Model Get the current value of an attribute from the model. For example: note.get("title")
StringAttribute to get
Mixedvalue of the attribute
Number[][]#Determines the bounding box (extents) of the current set of voxels, that is, the minimum and maximum value on each axis
Number[][]extents:
[ [xmin, xmax], [ymin, ymax], [zmin, zmax] ]
attribute)
-> Boolean# Backbone.Model Returns true if the attribute is set to a non-null or non-undefined value.
if (note.has("title")) {
...
}
String
Booleantrue if the attribute is non-null or non-undefined, else false
a, b, c)
-> C3D.models.Voxel#Deletes a voxel at the passed lattice position
Number
Number
Number
C3D.models.Voxel
select, transform)
-> undefined#Select voxels according to an arbitrary predicate, then transform them using an arbitrary transformation function.
FunctionSelection predicate function
FunctionTransformation function
attribute, [options])
-> undefined# Backbone.Model Set a hash of attributes (one or many) on the model. If any of the attributes
change the model's state, a change event will be triggered on the model.
Change events for specific attributes are also triggered, and you can bind to
those as well, for example: change:title, and change:content. You may also
pass individual keys and values.
note.set({title: "March 20", content: "In his eyes she eclipses..."});
book.set("title", "A Scandal in Bohemia");
String/Object(s)
Object
(Optional)attribute, [options])
-> undefined# Backbone.Model Remove an attribute by deleting it from the internal attributes hash. Fires a
"change" event unless silent is passed as an option.
String
Object
(Optional)