Public classes


Scripts/

   Trivision
   TrivisionPrism
   TrivisionRunner


Introduction page

TrivisionRunner
Derived from MonoBehaviour


Class to run trivision board automatically. By default, this script is attached to Trivision prefab and can be get by calling GetRunner() of main Trivision class.


Enums

public enum DelayedRotationsDifferent delays in rotations that can be used for simple effects.
public enum SequencesDifferent sequences how images are changed.
public enum StateList of different possible states of this instance.

Properties

public bool AutoStartSets or gets automatic start value.
public DelayedRotations DelayedRotationSets or gets the setting for delayed rotations.
public float DelayedRotationAmountSets or gets strength of delayed rotations effect.
public float FirstImageShowSecondsSets or gets how long time first image will stay visible before next transition starts.
public TrivisionPrism.RotationStyle RotationStyleSets or gets the rotation style used when single prism rotates.
public float RotationTimeSecondsSets or gets time how long single prism rotation takes.
public bool RunInEditorProperty used only internally by custom inspector editor.
public float SecondImageShowSecondsSets or gets how long time second image will stay visible before next transition starts.
public Sequences SequenceSets or gets the sequence used.
public float ThirdImageShowSecondsSets or gets how long time third image will stay visible before next transition starts.

Methods

public int GetCurrentShowingImage ()Get image that is currently being displayed.
public State GetState ()Get state of this instance.
public void NextTransition ()Manually run next image transition based on set sequence.
public void ResetRunner ()This will set runner to initial, non-running state.
public void StartRunner ()This will start runner, or continue after StopRunner() is called.
public void StopRunner ()This will stop runner.
public void editorUpdate (float deltaTime)Method used only internally by custom inspector editor.

Enums

public enum DelayedRotations

Different delays in rotations that can be used for simple effects.

ItemsNoneNo delays, all the prisms start rotating at the same time.
 WaveTopmost/leftmost prisms start rotating first and all the others follow with delay.
 ReversedWaveBottommost/rightmost prisms start rotating first and all the others follow with delay.
 RandomAll the prisms start rotating with random delay. With long delays this may look chaotic.


public enum Sequences

Different sequences how images are changed.

ItemsNormalNormal sequence: 1, 2, 3, 1...
 PingPongPing-pong sequence: 1, 2, 3, 2, 1... Middle image will appear twice as much as others
 ReversedReversed sequence: 3, 2, 1, 3... Difference compared for just setting images 1 and 3 to different slots is that with this sequence prisms are rotating to other direction
 RandomRandom sequence.


public enum State

List of different possible states of this instance.

ItemsInitInstance is still initializing. This state will change if ResetRunner() or StartRunner() is called, or in next update loop if 'AutoStart' is enabled.
 NotRunningInstance is ready but currently not running, either just created without 'AutoStart' disabled, or StopRunner() have been called.
 ShowingImageRunning normally and currently showing one of the three images.
 InTransitionRunning normally and currently in transition between two images.
 ErrorInternal error have occurred. This should not happen, but if it does, there's error log in console.


Properties

public bool AutoStart

Sets or gets automatic start value.

ValueIf true, this runner will start automatically when application starts and Trivision board is created. If false, StartRunner() method have to be called to start.


public DelayedRotations DelayedRotation

Sets or gets the setting for delayed rotations.

ValueOne of the values from enum DelayedRotations.


public float DelayedRotationAmount

Sets or gets strength of delayed rotations effect. With value 0 everything looks same as if 'DelayedRotations' would have been set to 'None'. With value 1 last prisms start rotating only after first ones have already finished rotating.

ValueDelayed rotation effect percent.


public float FirstImageShowSeconds

Sets or gets how long time first image will stay visible before next transition starts.


public TrivisionPrism.RotationStyle RotationStyle

Sets or gets the rotation style used when single prism rotates.

ValueOne of the values from enum TrivisionPrism.RotationStyle.


public float RotationTimeSeconds

Sets or gets time how long single prism rotation takes.


public bool RunInEditor

Property used only internally by custom inspector editor.


public float SecondImageShowSeconds

Sets or gets how long time second image will stay visible before next transition starts.


public Sequences Sequence

Sets or gets the sequence used.

ValueOne of the values from enum Sequences.


public float ThirdImageShowSeconds

Sets or gets how long time third image will stay visible before next transition starts.


Methods

public int GetCurrentShowingImage ()

Get image that is currently being displayed. This is index between 0 and 2.

ReturnsImage being currently displayed, -1 if runner is not yet initalized or error have occurred.


public State GetState ()

Get state of this instance.

ReturnsOne of the values from enum State.


public void NextTransition ()

Manually run next image transition based on set sequence.


public void ResetRunner ()

This will set runner to initial, non-running state. Trivision board will be set to display first image.


public void StartRunner ()

This will start runner, or continue after StopRunner() is called.


public void StopRunner ()

This will stop runner. Note that if this is called during transition, prisms will still rotate to their new position.


public void editorUpdate (float deltaTime)

Method used only internally by custom inspector editor.