Printdevice & Object Synchronization - Adobe ATMOSPHERE User Manual

Table of Contents

Advertisement

254
APPENDIX E
value
The current value of the slider.
// Init the slider to the current value.
fogNearSlider.value = fog.near;
Methods
add()
Adds the slider or progress bar to the control panel associated with the current world. The slider itself is returned
as a convenience.
fogNearSlider = Slider("Fog Near").add();
remove()
Removes the slider from whatever control panel it is currently in.
fogNearSlider.remove();
Callbacks
onChange(value)
Is called when the slider's value changes (either because the user moves it or if slider.value is changed by the
script).
fogNearSlider.onChange = function(value) { fog.near = value; }
PrintDevice & Object Synchronization
The PrintDevice is an object which is used to direct text strings to a destination, such as the chat window. This
functionality can be used to fi lter text for custom commands and thereby control your Avatar on a remote user
system, and also to fi lter chat input from visitors to your world.
In addition to text fi ltering, the PrintDevice contains functionality for Object Synchronization between worlds. When
two or more visitors enter the same world, an instance (or copy) of each world is actually being run on the local
computer for each user. Atmosphere *automatically handles synchronization for the visitors and thier representantive
Avatars, as well as for synchronized chatting. However, if other objects are present in the world which have dynamic
behavior and/or which can interact with the user, the conditions of the local worlds could easily become signifi cantly
different (objects in different places, different music playing, etc.).
Object synchronization is an attempt to overcome this problem to a limited extent, and enable reasonably similar
conditions for all visitors to a world, including dynamic objects or media. Be aware that since the Internet has
inherent delays in exchanging information, split-second identical conditions for all visitors should not be expected
nor is theoretically possible.
Object synchronization is accomplished by causing the Atmosphere server to create and maintain shared object
names, properties, and values. This information is maintained as long as visitors to a given world are present. Once all
visitors have exited, the shared information is deleted by the server, and the conditions are in a manner "reset".

Advertisement

Table of Contents
loading

Table of Contents