Touchtouchtouch
How do I make an touchtouchtouch?
What is a touchtouchtouch? How do you make a touchtouchtouch? This script and codes were developed by Filipp on 21 August 2022, Sunday.
Touchtouchtouch - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>touchtouchtouch</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='http://cdn.jsdelivr.net/foundation/5.3.3/css/foundation.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="st" align="left">
<object type="image/svg+xml" > <svg id="svg" viewBox="00 00 400 400">
<defs> <circle id="point-handle" r="10" x="0" y="0" stroke-width="4" fill="#fff" fill-opacity="0.4" stroke="#fff"/>
</defs>
<polygon id="star" stroke="#29f" stroke-width="20" stroke-linejoin="round" fill="none" points="260.8676170428898331,219.7770876399966369 297.8074659814675442,334.6204278639912673 200.0000000000000000,264.0000000000000000 102.1925340185324700,334.6204278639912673 139.1323829571101669,219.7770876399966369 41.7441956884864567,148.5795721360087214 162.3817438532817334,148.2229123600033631 200.0000000000000284,33.5999999999999943 237.6182561467182950,148.2229123600033631 358.2558043115135433,148.5795721360087498"/>
</svg> </object>
</div> <script src='http://code.interactjs.io/interact-1.1.2.js'></script> <script src="js/index.js"></script>
</body>
</html>
Touchtouchtouch - Script Codes CSS Codes
.st { width: 30%; background: #E91E63;
}
Touchtouchtouch - Script Codes JS Codes
document.addEventListener('DOMContentLoaded', function () { 'use strict'; var sns="http://www.w3.org/2000/svg", xns="http://www.w3.org/1999/xlink", root = document.getElementById('svg'), star = document.getElementById('star'), rootMatrix, originalPoints = [], transformedPoints = []; for (var i = 0, len = star.points.numberOfItems; i < len; i++) { var handle = document.createElementNS(sns, 'use'), point = star.points.getItem(i), newPoint = root.createSVGPoint(); handle.setAttributeNS(xns, 'href', '#point-handle'); handle.setAttribute('class', 'point-handle'); handle.x.baseVal.value = newPoint.x = point.x; handle.y.baseVal.value = newPoint.y = point.y; handle.setAttribute('data-index', i); originalPoints.push(newPoint); root.appendChild(handle); } function applyTransforms (event) { rootMatrix = root.getScreenCTM(); transformedPoints = originalPoints.map(function(point) { return point.matrixTransform(rootMatrix); }); interact('.point-handle').snap({ anchors: transformedPoints, range: 10 * Math.max(rootMatrix.a, rootMatrix.d) }); } interact(root) .on('mousedown', applyTransforms) .on('touchstart', applyTransforms); interact('.point-handle') .draggable({ onstart: function (event) { root.setAttribute('class', 'dragging'); }, onmove: function (event) { var i = event.target.getAttribute('data-index')|0, point = star.points.getItem(i); point.x += event.dx / rootMatrix.a; point.y += event.dy / rootMatrix.d; event.target.x.baseVal.value = point.x; event.target.y.baseVal.value = point.y; }, onend: function (event) { root.setAttribute('class', ''); }, max: Infinity }) .snap({ mode: 'anchor', anchors: originalPoints, range: 10, elementOrigin: { x: 0.1, y: 0.1 } }) .restrict({ drag: document.rootElement }) .styleCursor(false); interact.maxInteractions(Infinity); document.addEventListener('dragstart', function (event) { event.preventDefault(); });
});
Developer | Filipp |
Username | blossk |
Uploaded | August 21, 2022 |
Rating | 3 |
Size | 2,997 Kb |
Views | 36,432 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Transitions | 4,335 Kb |
Pagepilling.js | 6,554 Kb |
Corners,corners,corners... | 2,934 Kb |
Test | 6,668 Kb |
A Pen by Filipp | 4,390 Kb |
Tuk-tuk foundation based | 9,129 Kb |
Glitch link | 2,936 Kb |
Interactive shedule | 11,101 Kb |
Bootstrap easel and old html | 13,385 Kb |
Easy css-responsive slider | 8,395 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Ionic Infinite outside ion-content with ion-pane | Felquis | 3,117 Kb |
Default Input, Textareas, Submits, and Buttons in iOS | Demersdesigns | 2,334 Kb |
Firefox Breakout Guide | Quincysoeliman | 2,576 Kb |
Parallax-ish Sliding Content | Jdsteinbach | 2,748 Kb |
BSP Dungeon Generation | Xgundam05 | 5,326 Kb |
Blackberry Mock | Zacharyolson | 1,865 Kb |
Background Images | Jooonebug | 2,100 Kb |
Canvas Fireworks | Jackrugile | 6,200 Kb |
Monochrome Form | AlienPiglet | 3,096 Kb |
About Mazano | Kiti | 2,585 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!