123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- "use strict";
- define( [ "module" ], function( module ) {
- return {
-
-
-
-
-
-
-
- uniqueName: function( base ) {
- if ( uniqueNameSequence === undefined ) {
- uniqueNameSequence = 0;
- }
- return base + "-" + ++uniqueNameSequence;
- },
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- runFutureAssertions: function( tocked, assertions, cleanup ) {
-
-
- if ( typeof tocked != "function" && ! ( tocked instanceof Function ) ) {
- cleanup = assertions;
- assertions = tocked;
- tocked = undefined;
- }
-
- window.vwf_view.tocked = function( time ) {
- if ( next < assertions.length ) {
-
-
- tocked && tocked( time );
-
- while ( next < assertions.length && ready( assertions[next], time ) ) {
- assertions[next++].assertion();
- }
- } else {
-
-
- window.vwf_view.tocked = undefined;
- cleanup && cleanup();
- start();
- }
- }
- var reference = vwf.time();
- var next = 0;
-
- function ready( assertion, time ) {
- return assertion.absolute !== undefined && time > assertion.absolute ||
- assertion.relative !== undefined && time > reference + assertions[next].relative;
- }
-
- },
-
- dataURIFromDescriptor: function( descriptor ) {
- return "data:application/json;base64," + btoa( JSON.stringify( descriptor ) );
- },
-
- dataURIFromScriptText: function( scriptText ) {
- return "data:application/javascript;base64," + btoa( scriptText );
- },
- };
-
- var uniqueNameSequence;
- } );
|