|
|
Line 1: |
Line 1: |
− | =Properties=
| + | This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/saudioreactivetransform |
− | | + | |
− | {{ScriptFunction|bool|Enabled|[get, set]|Whether the Audio Reactive Transform component is enabled or not.|5=<pre>Space.Host.ExecutingObject.AudioReactiveTransform.Enabled= false</pre>|6=<pre>--clicking this object will Enable/Disable it's Audio Reactive Transform component
| + | |
− | thisGameObject = Space.Host.ExecutingObject
| + | |
− | component = thisGameObject.AudioReactiveTransform
| + | |
− | | + | |
− | | + | |
− | OnClick = function()
| + | |
− | component.Enabled = not component.Enabled
| + | |
− | end
| + | |
− | | + | |
− | | + | |
− | thisGameObject.AddClickable()
| + | |
− | thisGameObject.Clickable.OnClick(OnClick)</pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|SGameObject|Target|[get, set]|The target GameObject which will be affected by the Audio Reactive Transform.|5=<pre>target = Space.Host.ExecutingObject.AudioReactiveTransform.Target</pre>|6=<pre>--clicking this object will toggle between two different Audio Reactive Transform targets
| + | |
− | thisObject = Space.Host.ExecutingObject
| + | |
− | target1 = Space.Host.GetReference("theTarget1") --add this reference to Scripting Runtime component
| + | |
− | target2 = Space.Host.GetReference("theTarget2") --add this reference to Scripting Runtime component
| + | |
− | | + | |
− | function OnClickFunction()
| + | |
− | if thisObject.AudioReactiveTransform.Target == target1 then
| + | |
− | thisObject.AudioReactiveTransform.Target = target2
| + | |
− | else
| + | |
− | thisObject.AudioReactiveTransform.Target = target1
| + | |
− | end
| + | |
− | end
| + | |
− | | + | |
− | thisObject.AddClickable()
| + | |
− | thisObject.Clickable.OnClick(OnClickFunction)</pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|bool|Position|[get, set]|Whether or not the target's position will be affected by the Audio Reactive Transform.|5=<pre>Space.Host.ExecutingObject.AudioReactiveTransform.Position = true</pre>|6=<pre>--clicking this object will toggle it's Audio Reactive Transform Position property
| + | |
− | thisObject = Space.Host.ExecutingObject
| + | |
− | | + | |
− | function OnClickFunction()
| + | |
− | thisObject.AudioReactiveTransform.Position = not thisObject.AudioReactiveTransform.Position
| + | |
− | end
| + | |
− | | + | |
− | thisObject.AddClickable()
| + | |
− | thisObject.Clickable.OnClick(OnClickFunction)</pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|SVector|MinPosition|[get, set]|Returns MinPosition value of the Audio Reactive Transform.|5=local Object = Space.Scene.Find("Audio Source")<br>
| + | |
− | local Vectordata = Object.AudioReactiveTransform.Position<br>
| + | |
− | Space.Log(Vectordata)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|SVector|MaxPosition|[get, set]|Returns MaxPosition value of the Audio Reactive Transform.|5=local Object = Space.Scene.Find("Audio Source")<br>
| + | |
− | local Vectordata = Object.AudioReactiveTransform.MaxPosition<br>
| + | |
− | Space.Log(Vectordata)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|SVector|MinRotation|[get, set]|Returns MinRotation value of the Audio Reactive Transform.|5=local Object = Space.Scene.Find("Audio Source")<br>
| + | |
− | local Vectordata = Object.AudioReactiveTransform.MinRotation<br>
| + | |
− | Space.Log(Vectordata)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|SVector|MaxRotation|[get, set]|Returns MaxRotation value of the Audio Reactive Transform.|5=local Object = Space.Scene.Find("Audio Source")<br>
| + | |
− | local Vectordata = Object.AudioReactiveTransform.MaxRotation<br>
| + | |
− | Space.Log(Vectordata)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|SVector|MinScale|[get, set]|Returns MinScale value of the Audio Reactive Transform.|5=local Object = Space.Scene.Find("Audio Source")<br>
| + | |
− | local Vectordata = Object.AudioReactiveTransform.MinScale<br>
| + | |
− | Space.Log(Vectordata)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|SVector|MaxScale|[get, set]|Returns MaxScale value of the Audio Reactive Transform.|5=local Object = Space.Scene.Find("Audio Source")<br>
| + | |
− | local Vectordata = Object.AudioReactiveTransform.MaxScale<br>
| + | |
− | Space.Log(Vectordata)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|bool|Rotation|[get, set]|Whether or not the target's rotation will be affected by the Audio Reactive Transform.|5=<pre>Space.Host.ExecutingObject.AudioReactiveTransform.Rotation= true</pre>|6=<pre>--clicking this object will toggle it's Audio Reactive Transform Rotation property
| + | |
− | thisObject = Space.Host.ExecutingObject
| + | |
− | | + | |
− | function OnClickFunction()
| + | |
− | thisObject.AudioReactiveTransform.Rotation= not thisObject.AudioReactiveTransform.Rotation
| + | |
− | end
| + | |
− | | + | |
− | thisObject.AddClickable()
| + | |
− | thisObject.Clickable.OnClick(OnClickFunction)</pre>
| + | |
− | }}
| + | |
− | | + | |
− | | + | |
− | {{ScriptFunction|bool|Scale|[get, set]|Whether or not the target's scale will be affected by the Audio Reactive Transform.|5=<pre>Space.Host.ExecutingObject.AudioReactiveTransform.Scale= true</pre>|6=<pre>--clicking this object will toggle it's Audio Reactive Transform Scale property
| + | |
− | thisObject = Space.Host.ExecutingObject
| + | |
− | | + | |
− | function OnClickFunction()
| + | |
− | thisObject.AudioReactiveTransform.Scale= not thisObject.AudioReactiveTransform.Scale
| + | |
− | end
| + | |
− | | + | |
− | thisObject.AddClickable()
| + | |
− | thisObject.Clickable.OnClick(OnClickFunction)</pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{Scripting Navbox}}
| + | |