Scripts - Set 3 - Advanced - Adobe ATMOSPHERE User Manual

Table of Contents

Advertisement

234
APPENDIX C
pointToPointConstraint
swapTexture
windController

Scripts - Set 3 - Advanced

Name
booleanSquareWave
signalRamp
signalRampContinuous
This script sets up a point to point constraint between the target object and the reference object.
The script will create a physical model for the target object, so make sure you don't use the target
object with another script that wants to do so. The script also needs the reference object to have
a physical model, however it won't make one for it. Make sure the reference object has one by
checking the 'Fixed Physical Model' checkbox in the object inspector window in the builder.
This script allows you to swap one or all of the textures on a primitive object with another texture.
The guide above tells you how to set up the script to swap all textures on the target object. This
is the default behavior when you leave the 'baseTexture' property empty. You can also set the
'baseTexture' property to the fi lename of one of the textures you put on the primitive. In that case
the script will only swap that texture with the swap texture, and leave all other textures alone.
You can swap between the base textures and the swap texture with the 'swap' action. If you want
to make sure that the base textures are on, use the 'useBaseTexture' action. Similarly, if you want to
make sure that the swap texture is on, use the 'useSwapTexture' action.
This script allows you to affect an object with wind. You defi ne the direction the wind blows in by
placing the anchor linked to the windOriginAnchor property. The wind blows from that anchor
towards the script. The strength of the wind is set with the windStrength property, where 0 is no
wind at all and 100 is a storm.
Description
When you publish the world and it is viewed in the Player, the signal oscillate between the
startValue (true or false) and the opposite of the startValue (false or true). The duty cycle
determines the fraction of the time spent at the startValue, and should be between 0.0 and 1.0.
The output should be fed to script inputs that required a boolean value.
When you publish the world and it is viewed in the Player, the signal will ramp from the start value
to the end value over a length of time equal to the transition time. This is useful for fading lights,
adjusting angles or rotation, or volumes. This is one of a wide variety of possible signal generating
scripts. You should feel free to experiment writing other ones!
When you publish the world and it is viewed in the Player, the signal will ramp from the start value
increasing continuously with time by "rampRate" per second. This may be used to continuously
increase any number such as azimuth on a light. Note that the ramp rate my be changed
dynamically by another script allowing it to change over time.

Advertisement

Table of Contents
loading

Table of Contents