Application Programing Interface namespace. Using vxl.api in your programs you will be able to access many of the features offered by Voxelent's Nucleo library. By design, type checking is enforced throughout the functions provided by the public API. The goal is to help novice programmers that will use the API more often than advanced programmers.
Parameters:
Type | Name | Description |
---|---|---|
String |
name
|
name of the actor group |
List |
list
|
list of actors to add to the actor group |
Returns:
{vxlActorGroup} the actor group |
See:
vxlScene#createActorGroupParameters:
Type | Name | Description |
---|---|---|
dimension
|
|
|
spacing
|
|
Parameters:
Type | Name | Description |
---|---|---|
String |
actorNameOrUID
|
actor name or UID |
vxlScene |
scene
|
looks in the specified scene. This parameter is optional. If not specified, the current scene (vxl.c.scene) will be queried |
Parameters:
Type | Name | Description |
---|---|---|
String |
actorName
|
the name of the actor |
vxlScene |
scene
|
looks in the specified scene. This parameter is optional. If not specified, the current scene (vxl.c.scene) will be queried |
Parameters:
Type | Name | Description |
---|---|---|
String |
actorUID
|
the UID of the actor |
vxlScene |
scene
|
looks in the specified scene. This parameter is optional. If not specified, the current scene (vxl.c.scene) will be queried |
Parameters:
Type | Name | Description |
---|---|---|
vxlScene |
scene
|
the scene. This parameter is optional |
Returns a list of actors based on the condition passed as parameter.
The condition is a function with the following signature:
condition(vxlActor): returns boolean
If the condition evaluates true then that actor is included in the results
Parameters:
Type | Name | Description |
---|---|---|
function |
condition
|
the condition to evaluate in the actor list |
vxlScene |
scene
|
(Optional) If this parameter is not set, the current scene will be used |
Returns:
{Array} list of actors |
See:
vxlActorGroupReturns:
{vxlView} the current view |
Parameters:
Type | Name | Description |
---|---|---|
vxlView |
view
|
the view that we want to query. If this parameter is not passed,the current view will be used (vxl.c.view) |
Parameters:
Type | Name | Description |
---|---|---|
programID
|
|
|
uniformID
|
|
Parameters:
Type | Name | Description |
---|---|---|
String|Array |
arguments
|
the name of the asset or the list of models (each element being the file name). |
String |
path
|
the path that will be concatenated to the list of files (optional). |
vxl.def.model.loadingMode |
mode
|
the loading mode |
vxlScene |
scene
|
the scene in case we do not want to load these models in the current one |
See:
Parameters:
Type | Name | Description |
---|---|---|
String |
folder.
|
This parameter is required. It specifies the location from wherethe lookup tables will be loaded. If this parameter is not passed the current folder willbe used. The current folder is determined on running time and it is the folder where voxelent is located. |
Parameters:
Type | Name | Description |
---|---|---|
String |
prefix
|
the shared name by all the files. For instance part in part1, part2, ... |
Number |
start
|
start number in the sequence |
Number |
end
|
end number in the sequence |
String |
path
|
relative path to the webpage where the files are located |
String |
mode
|
a loading mode (See load method) |
String |
scene
|
the scene where the generated actors should be placed |
See:
vxl.def.actor.modeParameters:
Type | Name | Description |
---|---|---|
view
|
|
Parameters:
Type | Name | Description |
---|---|---|
Number |
op
|
opacity value between 0 and 1 (float) |
Parameters:
Type | Name | Description |
---|---|---|
vxlActor|String |
actor
|
it can be a vxlActor or a String with the actor name |
String |
property
|
the property to change |
Object |
value
|
the new value |
Parameters:
Type | Name | Description |
---|---|---|
Number |
a
|
azimuth |
Parameters:
Type | Name | Description |
---|---|---|
Number|Array|vec3 |
r
|
it can be the red component, a 3-dimensional Array or a vec3 (glMatrix) |
Number |
g
|
if r is a number, then this parameter corresponds to the green component |
Number |
b
|
if r is a number, then this parameter corresponds to the blue component |
Parameters:
Type | Name | Description |
---|---|---|
vxlActor|String |
actor
|
This could be an actor object or an actor nameIf the actor name is passed to this method, there must be a current scene. Otherwise an exception will raise. |
Parameters:
Type | Name | Description |
---|---|---|
a |
the
|
vxlView object that we want to make the current one |
Parameters:
Type | Name | Description |
---|---|---|
Number |
e
|
elevation |
Parameters:
Type | Name | Description |
---|---|---|
fov
|
|
Parameters:
Type | Name | Description |
---|---|---|
Number |
f
|
the animation frame index |
Parameters:
Type | Name | Description |
---|---|---|
view
|
|
|
program
|
|
Parameters:
Type | Name | Description |
---|---|---|
Array |
list
|
list of actors (String or vxlActor) |
String |
property
|
the property to change |
Object |
value
|
the new value |
vxlScene |
scene
|
the scene (optional). If this parameter is not passed the current scene is used |
Parameters:
Type | Name | Description |
---|---|---|
String |
property
|
the property to change |
Object |
value
|
the new value |
vxlScene |
scene
|
the scene (optional). If this parameter is not passed the current scene is used |
Parameters:
Type | Name | Description |
---|---|---|
String |
mode
|
one of the modes defined in |
vxlView |
view
|
the view (Optional) If this is not set up then the current view is used |
Parameters:
Type | Name | Description |
---|---|---|
Number |
r
|
the new rendering rate given as a number in milliseconds |
See:
api#setCurrentViewParameters:
Type | Name | Description |
---|---|---|
programID
|
|
|
uniformID
|
|
|
value
|
|
Parameters:
Type | Name | Description |
---|---|---|
String |
canvas_id
|
The canvas' Document Object Model (DOM) id. |
vxlScene |
scene
|
optional, the scene associated to this view |
Boolean |
handleLayout
|
if true or absent, the canvas will be resized dynamically |
Returns:
{vxlView} a new vxlView object |
See:
vxl.def.actor.modeSuscribes the to Voxelent events
The context parameter corresponds to the class that is going to listen for Voxelent events.
Such class needs to implement a method to handle the events that it has subscribed to. This method/function needsto have the following signature:
handleEvent(event, src)
The event parameter corresponds to the event that has been fired by Voxelent. Notice that your class will only be notified of those events that it has been subscribed to.
Parameters:
Type | Name | Description |
---|---|---|
String|Array |
list
|
the event or events that we are going to subscribe to |
Object |
context
|
the object that needs to implement the handleEvent method |
See:
vxl.def.actor.modeSee:
vxl.def.actor.mode