From 0.89.1 to 0.89.3: new features, fixed bugs, performance improvements
|By dcantor . March 22, 2013 . changelog.|
|By dcantor . March 22, 2013 . changelog.|
The following is a summary of what is new or what is changed since version 0.89.1 to version 0.89.3. There are lots of new features such as:
We have also fixed some bugs, eliminated some useless functions and improved the performance of the platform. Check it out!
1. Some actor operations (property setters) now return the actor instance.
This allows the chain of commands pattern:
var actor = vxl.c.scene.getActorByName('sphere'); actor.setColor(0.4,0.4,0.5).setPosition(3,3,3).setOpacity(0.5);
vxlCamerahas been replaced by the forward axis. This is just a change
_normalhas been replaced by
vxl.def.camera.type.EXPLORINGtype which is now the mode
closeUp(actor)have been fixed!!
Now it is possible to use the Command key in Mac to perform dollying (zoom). It was tricky
to use the control key on mac because in some cases it triggers a pop up depending on the
browser version on Mac.
From this version on, if you have a Mac, you can use Command key + mouse drag to perform dollying.
Actors can be associated and handled as a whole using the new class
vxlActorGroup. To create
an actor group simply request it from the scene
var scene = vxl.c.scene; var actorGroup = scene.createActorGroup("theNameOfTheActorGroup",listOfActors);
then you can do things such as:
actorGroup.setOpacity() actorGroup.setProperty('propertyName', propertyValue)
Just like actor operations, actor group operations are chainable:
setProgram: new option to force it
getProgram: this might be variable if an actor decides to change program it will capture
the current program being used.
setUniform(uniformName, value)— affects the current program
setUniformDefault(programID, uniformName, value)— not necessarily in the current program.-overrides a value if the program has been loaded
this way the programs can be configured from the API whether or not they are in use.
The phong and texture tests reflect these changes (see test-phong.html and test-texture.html)
Enabling flat shading and fast cell picking for high-res models.
Models can be of the type
This type identifies how much information has the model and how it should be treated by voxelent.
vxlRenderEngine will use this type to determine if there are needs for renderable parts (
vxlCell now requires a reference to the
vxlMesh it belongs and an index. This enables
fast updating of the
vxlMesh model (for instance to change the color of a cell)
1. Renderables belong now to the
vxlActor class. The idea behind it is to make sure that
the actor representation on screen is different from the model This way we can have several actors
based on the same model. Each one with different properties. For instance, two actors based on the
same model but each one using a different lookup table. To achieve this, it is necessary that the colors are stored in the material
of the actor (
vxlMaterial) instead of using the
vxlModel colors (which are used initially if they exist)
The vxlRenderable reads the model information from
vxlMesh model if the actor has one
or from the actor model if it is of type big data.
vxlRenderStrategy has been renamed to
1. Now the familiar
vxl.api.load routine support VTK files too!
Before this release, VTK files could only be added through drag and drop.
vxlPickerhas been debugged and optimized
The concept of material has been added to voxelent. (See
vxlMaterial on jsdocs).
Each actor has now a material object that contains elements such as:
You can still change these properties through the respective set* methods in
You can still query these properties through
Additionally you can access the material and set the properties directly, like in:
actor.material.shading = false;
vxlBasicStrategyare now merged into
vxlRenderer.setProgram, the strategy now is optional.
vxlRenderStrategyhas combined both the former lambert and phong strategies.
The actor shininess property has been defined. the default strategy evaluates this property
to decide the proper program to use (lambert vs phong). See
actor.setShininess(100); //the lower the value the bigger the specular reflection actor.setProperty('shininess',200); //also can be set this way
Now object picking is available as promised in 0.89.1. Use:
where callback can be any function that receives two arguments:
function whateverNameCallbackFunction(actor, uid)
vxlCamera.setFieldOfViewhas been added, there is an accessible method on the API
vxlCameraState has been replaced by
The new camera methods are available: