home
usage
settings
editor
Settings
TUBE is fully customizable. Each setting has a default value and can be ignored. Don't be afraid of making mistakes, because all incorrect values are automatically replaced with correct ones. Below is a complete list of settings.
Main settings
TUBE_SIZE
Size of the TUBE. This is essentially the radius of the torus distorted to obtain a complex shape.
Min value is 1. Default value is 220.
TUBE_WIDTH
Width of the TUBE.
Default value is 50.
TUBE_DISTANCE
Imaginary distance between TUBE center and screen surface.
Min value is 0. Default value is 1000.
PERSPECTIVE_DISTORTION
Perspective distortion of the TUBE.
Min value is 0. Default value is 1.
TUBE_TORSION
TUBE torsion ratio.
Default value is 0.3.
TUBE_STRETCH
TUBE stretch ratio.
Default value is 200.
ROTATION_SPEED
TUBE rotation speed at rest (i.e. when mouse does not affect it)
Min value is 0. Default value is 5.
DOT_COLOR
Color of TUBE's dot.
Default value is "black".
DOT_SIZE
Size of TUBE's dot.
Min value is 0. Default value is 2.
DETALIZATION
Dot density on TUBE surface. It affects the total number of dots: the greater value the more dots.
Dots number also depends on MESH_RATIO.
Min value is 1. Default value is 180.
MESH_DISTRIBUTION
A number defining dot distribution on TUBE surface.
Min value is -2. Max value is 2. Default value is 0.
MESH_RATIO
A number defining mesh cell aspect ratio. It affects the total number of dots: the smaller value the more dots.
Dots number also depends on DETALIZATION.
Min value is 0.5. Default value is 14.
OFFSET_X
TUBE displacement along the X axis measured in pixels.
Default value is 0.
OFFSET_Y
TUBE displacement along the Y axis measured in pixels.
Default value is 0.
PERCENTAGE_OFFSET_X
TUBE displacement along the X axis measured as a percentage of the scene width.
Default value is 0.
PERCENTAGE_OFFSET_Y
TUBE displacement along the Y axis measured as a percentage of the scene height.
Default value is 0.
Responsivity settings
AUTO_SCALE
Determines whether TUBE scales automatically. Allowable values: true and false.
Default value is false.
VIEWPORT_WIDTH & VIEWPORT_HEIGHT
These settings determine ideal rectangle region containing TUBE. That is, they determine DIV size at which TUBE doesn't need to autoscale.
Min value is 100 for both settings. Default value is 800 for both settings.
Mouse settings
MOUSE_DISTANCE_MIN
Maximum distance between mouse pointer and TUBE center at which TUBE is most sensitive to mouse movements. Measured in pixels.
Min value is 0. Default value is 20.
MOUSE_DISTANCE_MAX
Minimum distance between mouse pointer and TUBE center at which TUBE is not sensitive to mouse movements. Measured in pixels.
Min value is MOUSE_DISTANCE_MIN. Default value is MOUSE_DISTANCE_MIN + 400.
MOUSE_SENSITIVITY
Sensitivity level to mouse movements.
Min value is 0. Default value is 1.
INERTIAL_TIME
Time between mouse motion and the moment when TUBE rotation speed came to a normal value. Measured in seconds.
Min value is 0. Default value is 2.
Main morphing settings
Main morphing modifies TUBE shape by varying main settings.
USE_MAIN_MORPHING
Determines whether we use main morphing. Allowable values: true and false.
Default value is false.
MAIN_MORPHING_AUTOPLAY
Determines whether we use autoplay based on predefined stage sequence (MAIN_MORPHING_STAGES).
Allowable values: true and false.
Default value is true.
MAIN_MORPHING_DURATION
Main morphing duration. Measured in seconds.
Min value is 0. Default value is 2.
MAIN_MORPHING_DELAY
Time between the end of previous morphing and beginning of the next one. Measured in seconds.
Min value is 0. Default value is 1.
MAIN_MORPHING_TRANSITION_TYPE
Defines the character of main morphing animation.
Allowable values: "linear", "quad", "cubic", "quart", "quint", "circ", "sine", "expo", "elastic", "bounce", "back".
Default value is "cubic".
MAIN_MORPHING_STAGES
Stage sequence used in main morphing. Each stage is a set of main settings. Use our visual editor to generate main settings. If MAIN_MORPHING_AUTOPLAY is true, the sequence will be played back cyclically. If MAIN_MORPHING_AUTOPLAY is false, you can use a method tube.mainMorphTo(N), where N is sequence number of the stage (starting with 0).
Default value is [ ].
Surface distortion settings
SURFACE_INITIAL_DISTORTION
Initial surface distortion is described by a special object. Use our visual editor to generate appropriate code. Distortion is achieved due to three types of waves on TUBE surface. The wave of each type is defined by amplitude, frequency and phase. This explains why shape object has such a syntax.
Default value is
{
  wave1: {amplitude: 0, frequency: 0, phase: 0},
  wave2: {amplitude: 0, frequency: 0, phase: 0},
  wave3: {amplitude: 0, frequency: 0, phase: 0}
}
USE_SURFACE_MORPHING
Determines whether we use surface morphing. Allowable values: true and false.
Default value is false.
USE_SURFACE_MOTION
Determines whether we use surface motion. Allowable values: true and false.
Default value is false.
USE_SURFACE_SWING
Determines whether we use surface swing. Allowable values: true and false.
Default value is false.
Surface morphing settings
Surface morphing modifies TUBE shape by varying surface distortion.
SURFACE_MORPHING_AUTOPLAY
Determines whether we use autoplay based on predefined stage sequence (SURFACE_MORPHING_STAGES).
Allowable values: true and false.
Default value is true.
SURFACE_MORPHING_DURATION
Surface morphing duration. Measured in seconds.
Min value is 0. Default value is 2.
SURFACE_MORPHING_DELAY
Time between the end of previous morphing and beginning of the next one. Measured in seconds.
Min value is 0. Default value is 1.
SURFACE_MORPHING_TRANSITION_TYPE
Defines the character of surface morphing animation.
Allowable values: "linear", "quad", "cubic", "quart", "quint", "circ", "sine", "expo", "elastic", "bounce", "back".
Default value is "cubic".
SURFACE_MORPHING_STAGES
Stage sequence used in surface morphing. Each stage has the same syntax as SURFACE_INITIAL_DISTORTION. Use our visual editor to generate surface distortion settings. If SURFACE_MORPHING_AUTOPLAY is true, the sequence will be played back cyclically. If SURFACE_MORPHING_AUTOPLAY is false, you can use a method tube.surfaceMorphTo(N), where N is sequence number of the stage (starting with 0).
Default value is [ ].
Surface motion settings
Surface distortion is achieved due to three types of waves.
You can set constant motion for these waves specifying their speed.
WAVE_1_MOTION_SPEED
Speed of first type wave.
Default value is 0.
WAVE_2_MOTION_SPEED
Speed of second type wave.
Default value is 0.
WAVE_3_MOTION_SPEED
Speed of third type wave.
Default value is 0.
Surface swing settings
Surface distortion is achieved due to three types of waves.
The wave of each type has three properties: amplitude, frequency and phase. You can set constant oscillatory motion for any of these properties. Any oscillation is also defined by amplitude, frequency and phase. That's why such motion is described by object having the following syntax:
{
  amplitude: {amplitude: 20, frequency: 1, phase: 0, type: "sine"},
  frequency: {amplitude: 0, frequency: 0, phase: 0, type: "linear"},
  phase: {amplitude: 2, frequency: 0.2, phase: 2.1, type: "pulse"}
}

Attribute type defines character of the oscillation. Allowable values: "sine", "pulse" and "linear".
Default value is "sine".
WAVE_1_SWING_SETTINGS
An object describing oscillations for first type wave.
There will be no oscillations by default.
WAVE_2_SWING_SETTINGS
An object describing oscillations for second type wave.
There will be no oscillations by default.
WAVE_3_SWING_SETTINGS
An object describing oscillations for third type wave.
There will be no oscillations by default.