Canvas Library

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.


var s=taccgl.ssc('ShaderSample'); s.times();
var c=b.a("LeftcolumnDown").paint().sc(s).dur(6).start();
var d=c.a("pgMiddleColumnTable").paint().sc(s).dur(6).start();
<script id="ShaderSample" type="x-gsgl/x-shader">
col.r *= abs(sin(ct*6.28)); *= abs(cos(ct*3.14));

WebGL™ is a trademark of the Khronos Group Inc.