Get started with pts CDN
Apache-2.0 licensed
PTS library ensures smooth, accurate scrolling and positioning of off-screen elements.
Tags:- visualization
- coding
- creative
Stable version
Copied!
How to start using pts CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with pts CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/pts/0.12.2/pts.min.js"></script>
</head>
<body>
<button id="start">Start</button>
<button id="stop">Stop</button>
<div id="timer"></div>
<script>
const startButton = document.querySelector('#start');
const stopButton = document.querySelector('#stop');
const timer = document.querySelector('#timer');
let pts;
startButton.addEventListener('click', () => {
pts = new PTS();
pts.start();
startButton.disabled = true;
});
stopButton.addEventListener('click', () => {
pts.stop();
startButton.disabled = false;
timer.textContent = `Elapsed: ${pts.elapsed()}`;
});
pts.on('tick', (time) => {
timer.textContent = `Current: ${time}`;
});
</script>
</body>
</html>
Copied!
Copied!
All versions
0.0.1
0.0.2
0.0.3
0.1.0
0.1.1
0.1.2
0.1.3
0.1.4
0.1.5
0.1.6
0.10.0
0.10.1
0.10.10
0.10.11
0.10.12
0.10.2
0.10.3
0.10.4
0.10.5
0.10.6
0.10.7
0.10.8
0.10.9
0.11.0
0.11.1
0.11.2
0.11.3
0.11.4
0.11.5
0.11.6
0.12.0
0.12.1
0.12.2
0.12.3
0.12.4
0.12.5
0.12.6
0.12.7
0.12.8
*** 0.12.9
0.2.0
0.2.1
0.2.2
0.2.3
0.2.4
0.3.0
0.3.1
0.4.0
0.4.2
0.4.3
0.5.0
0.5.1
0.5.2
0.6.0
0.6.1
0.6.2
0.6.3
0.6.4
0.6.6
0.6.7
0.7.0
0.8.0
0.8.1
0.8.10
0.8.11
0.8.2
0.8.3
0.8.4
0.8.5
0.8.6
0.8.7
0.8.8
0.8.9
0.9.0
0.9.1
0.9.2
0.9.3
0.9.4
0.9.5
0.9.6