Friday, July 2, 2010


Concretizing our concept of presences and separating the entities from presences, we have a new reference to system.presences in the Emerson.  At present, we have two addressable arrays:  system.presences and system.addressable .  Presences are the self address of the hosted entity each in different space. IT is just a logical connection. Currently, we just store the spaceID of the space in the presence javascript object which should be sufficient for most purposes.  Addressables lets the script to refer other presences of other entities. However, addressables will contain presences too.

Following this, work needs to be done to unify addressables and presences. The idea is that a presence can do few things synchronously too while addressables will always require the asynchronous messaging. A bit more thought has to go into designing this. Currently addressable does not store the space information of the entity. And this has to be incorporated too.

Next thing would be to add functionalities like system.presences[0].setMesh  and other functionalities similar to this. All these are inbuilt into system currently and assumes the default connection to the space.These have to be made space specific.

1 comment:

  1. Added support for position and velocity in system.presences. So following is a valid script:

    /* This script should test the system.presences */

    p = system.presences[0];


    pos = p.position;

    system.print("Position is " + pos);

    new_pos = {x:pos.x + 5, y:pos.y + 5, z:pos.z};

    system.print("Trying to set the position to " + new_pos);

    p.position = new_pos;

    vel = p.velocity;

    /* End of script */

    I will try to write more meaningful to test this feature and add it to our test repository.