times Library Method
Signature: sc.times ()
Class: taccglShaderConfig Class
Makes the vertex shader pass additional timing information to the fragment shader.
Normally only uTime is available in the fragment shader i.e. the time in seconds since the whole
animation started. Additional information is
basetime is the starting time of the current transition.
duration is the duration of the current transition.
rt is (uTime-basetime)/duration i.e. the time passed since the current
transition started scaled by the duration. ct is rt clamped to 0.0...1.0.
Examples
var s=taccgl.ssc('ShaderSample'); s.times(); var b=taccgl.actor("testimg").sc(s).dur(6).start(); var c=b.a("LeftcolumnDown").paint().sc(s).dur(6).start(); var d=c.a("pgMiddleColumnTable").paint().sc(s).dur(6).start(); | RUN |
<script id="ShaderSample" type="x-gsgl/x-shader"> :color col.r *= abs(sin(ct*6.28)); col.gb *= abs(cos(ct*3.14)); </script> |
|
WebGL™ is a trademark of the Khronos Group Inc.
|