PageSourceSearch

https://matsumoto.ed.jp/wp-content/themes/insp_para/framework/js/p….pixelentity.utils.ticker.js?ver=1561346633

js matsumoto.ed.jp collected 2026-10-05 09:39:33 UTC 2,132 bytes, 107 lines download raw bytes

1(function ($) {
2	/*jslint undef: false, browser: true, devel: false, eqeqeq: false, bitwise: false, white: false, plusplus: false, regexp: false */ 
3	/*global jQuery,setTimeout,setInterval,clearInterval */
4
5	$.pixelentity = $.pixelentity || {version: '1.0.0'};
6	
7	if ($.pixelentity.ticker) {
8		return;
9	}
10
11	var queue = [];
12	var active = 0;
13	
14	function now() {
15		return (new Date()).getTime();
16	}
17		
18	var tim1,tim2,tim3;
19	
20	var loop = window.requestAnimationFrame || 
21		 window.webkitRequestAnimationFrame || 
22		 window.mozRequestAnimationFrame || 
23		 window.oRequestAnimationFrame || 
24		 window.msRequestAnimationFrame ||
25		 false;
26	
27	
28	function tick() {
29		
30		var n,entry;
31		if (active > 0) {
32			n= now();
33		
34			for (var i in queue) {
35				entry = queue[i];
36				if (entry.paused) {
37					continue;
38				}
39				if (n-entry.last >= entry.each) {
40					entry.callback(entry.last,n);
41					entry.last = n;
42				}
43			}
44			
45			if (loop) {
46				loop(tick);
47			}
48			
49		}
50	}
51		
52	var ticker = $.pixelentity.ticker = {
53			register: function (callback,fps) {
54				active++;
55				
56				fps = (typeof fps == "undefined") ? 33 : fps;
57			
58				if (fps > 0) {
59					fps = parseInt(1000/fps,10);
60				} else if ($.browser.mozilla) {
61					fps = parseInt(1000/50,10);
62				}
63			
64			
65				//alert(fps);
66			
67				queue.push({"callback":callback,"last":now(),"each": fps,"delay":0});
68				if (active == 1) {
69					if (loop) {
70						loop(tick);
71					} else {
72						tim1 = setInterval(tick, 16);
73						tim2 = setInterval(tick, 20);
74						tim3 = setInterval(tick, 30);
75					}
76				}
77			},
78			pause: function(callback) {
79				for (var i in queue) {
80					if (queue[i].callback == callback) {
81						queue[i].paused = true;
82					}
83				}
84			},
85			resume: function(callback) {
86				for (var i in queue) {
87					if (queue[i].callback == callback) {
88						queue[i].paused = false;
89					}
90				}
91			},
92			unregister: function (callback) {
93				for (var i in queue) {
94					if (queue[i].callback == callback) {
95						delete queue[i];
96						active--;
97					}
98				}
99				if (active <= 0) {
100					clearInterval(tim1);
101					clearInterval(tim2);
102					clearInterval(tim3);
103				}
104			}
105		};
106		
107}(jQuery));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.