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:

  • camera landmarks: save and retrieve a camera configuration by name
  • texture filtering: the ability to specify the magnification and minification filters programmatically.
  • cell and object picking: click on an object and do something about it
  • actor groups: group actors and perform operations as a whole.

We have also fixed some bugs, eliminated some useless functions and improved the performance of the platform. Check it out!


VERSION 0.89.3 – COMPLEX RENDERING: Renderables

Actor updates

1. Some actor operations (property setters) now return the actor instance.
This allows the chain of commands pattern:

for example:

var actor = vxl.c.scene.getActorByName('sphere');
actor.setColor(0.4,0.4,0.5).setPosition(3,3,3).setOpacity(0.5);

Camera updates

  1. The normal axis of the vxlCamera has been replaced by the forward axis. This is just a change
    in syntax not in behaviour. This means that the internal property ._normal has been replaced by
    the internal property ._forward.
  2. Previous to this version, the camera object could not pass an elevation of 90 or -90 but instead
    the movement was restricted to avoid ‘oscliations’ due to the inability to determine the up direction
    this problem has been fixed by changing the code of the rotate method. The rotation now occurs
    with respect to the current camera coordinates and every time the camera axes are recalculated.This mode of operation is captured by the vxl.def.camera.type.EXPLORING type which is now the mode
    by default.
  3. The methods lookAt(actor) and closeUp(actor) have been fixed!!
  4. The paning and translating methods have been fixed. They were not using the correct “up” vector
    after a 90 degree rotation.
  5. Translation tracking is fixed!

Tracker interactor updates

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.

Picking

  1. The cell picker has been improved and the bug that it had has been corrected. (it was selecting
    wrong cells in some cases).
  2. Cell painting is much faster now (from 1.74 s down to 177ms). vxlCell.setColor()

Actor Groups

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:

actorGroup.setOpacity(0.4).setColor(0.3,0.4,0.2);

API updates

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.

New methods:

  • 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
  • getUniformList()

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)

High resolution models

Enabling flat shading and fast cell picking for high-res models.

Model types

Models can be of the type vxl.def.model.type:SIMPLE, MESH or BIG_DATA
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 (vxlRenderable).

Mesh updates

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)

Renderables

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.

Engine

vxlRenderStrategy has been renamed to vxlRenderEngine

Loading VTK files using AJAX

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.

Performance Updates

  1. Many for loops have been replaced by while loops counting down to zero. Classes updated:vxlRenderEngine, vxlScene
  2. Color matching in vxlPicker has been debugged and optimized

VERSION 0.89.2 – UPDATES

API updates

New methods:

  • vxl.api.loadSequence('part',1,40,'/the/path');
  • vxl.api.solidWireframeON(true|false);
  • vxl.api.setFieldOfView(number [0-360]);

Removed methods:

vxl.api.setCameraDistance

Materials

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:

  • opacity
  • shininess
  • diffuse color
  • specular color
  • ambient color
  • texture
  • shading

You can still change these properties through the respective set* methods in
vxlActor,

You can still query these properties through vxlActor.getProperty

Additionally you can access the material and set the properties directly, like in:

actor.material.shading = false;

Merging Lambert and Phong strategies

  1. vxlLambertStrategy, vxlPhongStrategy, vxlRenderStrategy and vxlBasicStrategy are now merged into vxlRenderStrategy
  2. In both vxl.api.setProgram and vxlRenderer.setProgram, the strategy now is optional.
  3. By default, the new class vxlRenderStrategy has combined both the former lambert and phong strategies.
  4. The vxl.def.glsl.phong and vxl.def.glsl.lambert are still current. You can use them with vxlRenderer.setProgram()

Actor shininess

The actor shininess property has been defined. the default strategy evaluates this property
to decide the proper program to use (lambert vs phong). See vxlDefaultStrategy

actor.setShininess(100); //the lower the value the bigger the specular reflection
actor.setProperty('shininess',200); //also can be set this way

vxlTexture updated

  1. The new methods setMagFilter and setMinFilter are availabl
  2. vxlTexture controls the case where the texture can’t be load (see vxlTexture._onError)

Object picking

Now object picking is available as promised in 0.89.1. Use:

actor.setPicker(vxl.def.actor.picking.OBJECT, callback)

where callback can be any function that receives two arguments:

function whateverNameCallbackFunction(actor, uid)

Camera updates

  1. The method vxlCamera.setFieldOfView has been added, there is an accessible method on the API
    (see vxl.api.setFieldOfView)
  2. Landmarks

    The old vxlCameraState has been replaced by vxlLandmark
    The new camera methods are available:

    • setLandmark
    • goTo
    • getLandmarks