CMT3 - Opdracht 02 - OBEY
How do I make an cmt3 - opdracht 02 - obey?
What is a cmt3 - opdracht 02 - obey? How do you make a cmt3 - opdracht 02 - obey? This script and codes were developed by Samuel on 10 November 2022, Thursday.
CMT3 - Opdracht 02 - OBEY - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CMT3 - Opdracht 02 - OBEY</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='https://s3-us-west-2.amazonaws.com/s.cdpn.io/194554/vex.css'>
<link rel='stylesheet prefetch' href='https://s3-us-west-2.amazonaws.com/s.cdpn.io/194554/vex-theme-os.css'>
<link rel='stylesheet prefetch' href='https://s3-us-west-2.amazonaws.com/s.cdpn.io/194554/vex-theme-wireframe.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <!-- This pen uses experimental CSS. Enable "experimental web platform features" in order to view this pen correctly. -->
<canvas id="c"></canvas>
<div id="wrapper"> <header> <h1><span>Obey</span></h1> <nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Shop</a></li> <li><a href="#">Contact</a></li> </ul> </nav> </header> <main> <div class="box"> <article> <img src="http://www.graffitiprints.com/wp-content/uploads/2013/04/IMG_0020.jpg" alt="Obey" /> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p> </article> </div> <div class="box"> <article> <img src="https://medias.expertissim.com/media/cache/media_zoom/uploads/object/2014/07/23/12163982/_44A4417.jpg" alt="Obey" /> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </article> </div> <div class="box"> <article> <img src="http://www.graffitiprints.com/wp-content/uploads/2014/01/IMG_7211.jpg" alt="Obey" /> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p> </article> </div> </main> <footer> <p>© Crafted by Samuel Van de Perre</p> <p class="mention">Anime.js and Vex.js were used in this pen</p> </footer>
</div> <script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/194554/vex.combined.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/animejs/1.0.0/anime.js'></script> <script src="js/index.js"></script>
</body>
</html>
CMT3 - Opdracht 02 - OBEY - Script Codes CSS Codes
/* html & body */
html, body { height: 100%;
}
body { color: #000; font-family: 'helvetica neue', sans-serif; font-weight: 200; font-size: 62.5%;
}
#wrapper { position: absolute; z-index: 200;
}
canvas { display: block; height: 100%; position: fixed; width: 100%; z-index: 100;
}
/* header & nav */
header { margin: 50px 0 0 0;
}
h1 { background: url('https://worldvectorlogo.com/logos/obey.svg') no-repeat center top; background-size: contain; height: 125px; margin: 0 auto; width: 30%;
}
h1 span { display: none;
}
nav ul { border-bottom: 1px #eee dotted; font-size: 1.4em; margin: 30px auto 0 auto; padding: 0 0 30px 0; text-align: center; width: 72.5%;
}
nav ul li { display: inline; margin: 0 12.5px;
}
nav ul li a { color: #000; text-decoration: none;
}
/* main */
main { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; margin: 50px auto; width: 75%;
}
.box { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; min-width: 200px; padding: 0 15px;
}
img { max-width: 100%;
}
p { font-size: 1.4em; letter-spacing: 0.025em; line-height: 1.4em; margin: 25px 0; text-align: justify;
}
/* footer */
footer { border-top: 1px #eee dotted; margin: 0 auto; letter-spacing: 0.025em; text-align: center; width: 72.5%;
}
footer p { float: left;
}
.mention { float: right;
}
/* Vex.js */
.vex { font-size: 1.4em;
}
/* media query */
@media screen and (max-width: 1005px) { .box { min-width: 500px; }
}
@media screen and (max-width: 750px) { h1 { height: 75px; } .box { min-width: 250px; }
}
@media screen and (max-width: 900px) { footer p { font-size: 1.2em; }
}
CMT3 - Opdracht 02 - OBEY - Script Codes JS Codes
//Credits to Alex Zaworski for the script below
//Anime.js
var c = document.getElementById("c");
var ctx = c.getContext("2d");
var cH;
var cW;
var bgColor = "#FFFFFF";
var animations = [];
var circles = [];
var anchors = document.getElementsByTagName("a");
var footer = document.getElementsByTagName("footer")[0];
var heading = document.getElementsByTagName("h1")[0];
var list = document.getElementsByTagName("ul")[0];
var paragraphs = document.getElementsByTagName("p");
var colorPicker = (function() {
var colors = ["#FFFFFF", "#C42D35", "#1A1F21"];
var index = 0;
function next() { index = index++ < colors.length-1 ? index : 0; return colors[index];
}
function current() { return colors[index]
} return { next: next, current: current }
})();
function removeAnimation(animation) { var index = animations.indexOf(animation); if (index > -1) animations.splice(index, 1);
}
function calcPageFillRadius(x, y) { var l = Math.max(x - 0, cW - x); var h = Math.max(y - 0, cH - y); return Math.sqrt(Math.pow(l, 2) + Math.pow(h, 2));
}
function addClickListeners() { document.addEventListener("touchstart", handleEvent); document.addEventListener("mousedown", handleEvent);
};
function handleEvent(e) { if (e.touches) { e.preventDefault(); e = e.touches[0]; } var currentColor = colorPicker.current(); var nextColor = colorPicker.next(); var targetR = calcPageFillRadius(e.pageX, e.pageY); var rippleSize = Math.min(200, (cW * .4)); var minCoverDuration = 750; if (nextColor === "#1A1F21") { for (var i = 0; i < paragraphs.length; i++) { paragraphs[i].style.color = "#fff"; } for (var i = 0; i < anchors.length; i++) { anchors[i].style.color = "#fff"; } list.style.borderColor = "#eee"; heading.style.backgroundImage = "url('https://s14.postimg.org/dlvfaampd/obey.png')"; footer.style.borderColor = "#eee"; } else if (nextColor === "#C42D35") { list.style.borderColor = "#000"; footer.style.borderColor = "#000"; } else { for (var i = 0; i < paragraphs.length; i++) { paragraphs[i].style.color = "#000"; } for (var i = 0; i < anchors.length; i++) { anchors[i].style.color = "#000"; } heading.style.backgroundImage = "url('https://worldvectorlogo.com/logos/obey.svg')"; } var pageFill = new Circle({ x: e.pageX, y: e.pageY, r: 0, fill: nextColor }); var fillAnimation = anime({ targets: pageFill, r: targetR, duration: Math.max(targetR / 2 , minCoverDuration ), easing: "easeOutQuart", complete: function(){ bgColor = pageFill.fill; removeAnimation(fillAnimation); } }); var ripple = new Circle({ x: e.pageX, y: e.pageY, r: 0, fill: currentColor, stroke: { width: 3, color: currentColor }, opacity: 1 }); var rippleAnimation = anime({ targets: ripple, r: rippleSize, opacity: 0, easing: "easeOutExpo", duration: 900, complete: removeAnimation }); var particles = []; for (var i=0; i<32; i++) { var particle = new Circle({ x: e.pageX, y: e.pageY, fill: currentColor, r: anime.random(24, 48) }) particles.push(particle); } var particlesAnimation = anime({ targets: particles, x: function(particle){ return particle.x + anime.random(rippleSize, -rippleSize); }, y: function(particle){ return particle.y + anime.random(rippleSize * 1.15, -rippleSize * 1.15); }, r: 0, easing: "easeOutExpo", duration: anime.random(1000,1300), complete: removeAnimation }); animations.push(fillAnimation, rippleAnimation, particlesAnimation);
}
function extend(a, b){ for(var key in b) { if(b.hasOwnProperty(key)) { a[key] = b[key]; } } return a;
}
var Circle = function(opts) { extend(this, opts);
}
Circle.prototype.draw = function() { ctx.globalAlpha = this.opacity || 1; ctx.beginPath(); ctx.arc(this.x, this.y, this.r, 0, 2 * Math.PI, false); if (this.stroke) { ctx.strokeStyle = this.stroke.color; ctx.lineWidth = this.stroke.width; ctx.stroke(); } if (this.fill) { ctx.fillStyle = this.fill; ctx.fill(); } ctx.closePath(); ctx.globalAlpha = 1;
} var animate = anime({ duration: Infinity, update: function() { ctx.fillStyle = bgColor; ctx.fillRect(0, 0, cW, cH); animations.forEach(function(anim) { anim.animatables.forEach(function(animatable) { animatable.target.draw(); }); }); } });
var resizeCanvas = function() { cW = window.innerWidth; cH = window.innerHeight; c.width = cW * devicePixelRatio; c.height = cH * devicePixelRatio; ctx.scale(devicePixelRatio, devicePixelRatio);
};
(function init() { resizeCanvas(); if (window.CP) { window.CP.PenTimer.MAX_TIME_IN_LOOP_WO_EXIT = 6000; } window.addEventListener("resize", resizeCanvas); addClickListeners(); if (!!window.location.pathname.match(/fullcpgrid/)) { startFauxClicking(); } handleInactiveUser();
})();
function handleInactiveUser() { var inactive = setTimeout(function(){ fauxClick(cW/2, cH/2); }, 2000); function clearInactiveTimeout() { clearTimeout(inactive); document.removeEventListener("mousedown", clearInactiveTimeout); document.removeEventListener("touchstart", clearInactiveTimeout); } document.addEventListener("mousedown", clearInactiveTimeout); document.addEventListener("touchstart", clearInactiveTimeout);
}
function startFauxClicking() { setTimeout(function(){ fauxClick(anime.random( cW * .2, cW * .8), anime.random(cH * .2, cH * .8)); startFauxClicking(); }, anime.random(200, 900));
}
function fauxClick(x, y) { var fauxClick = new Event("mousedown"); fauxClick.pageX = x; fauxClick.pageY = y; document.dispatchEvent(fauxClick);
}
//Vex.js
heading.onclick = function() { vex.dialog.alert({ message: 'Are you ready to OBEY your master?', })
}
vex.defaultOptions.className = 'vex-theme-os'
Developer | Samuel |
Username | SamuelVDP |
Uploaded | November 10, 2022 |
Rating | 3 |
Size | 5,499 Kb |
Views | 20,240 |
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 |
CMT3 - Herhalingsoefening 02 | 2,246 Kb |
CMT3 - Herhalingsoefening 03 | 2,197 Kb |
IT3 - Opdracht 09 - RellaxJS | 4,331 Kb |
CMT3 - Opdracht 06 - Isotope | 3,686 Kb |
IT3 - Opdracht 04 - Responsive Weekplanner | 3,898 Kb |
CMT3 - Herhalingsoefening 01 | 2,366 Kb |
IT3 - Opdracht 01 - Drop The Needle | 6,566 Kb |
IT3 - Opdracht 03 - FreshCotton | 2,754 Kb |
IT3 - Opdracht 05 - Battery API | 3,894 Kb |
IT3 - Opdracht 06 - PureCSS | 5,220 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 |
Roman Numerical Converter | Vhall_io | 2,102 Kb |
Simple star rating using js and data-uri | TheEnd | 5,795 Kb |
SVG Hover Animations | Kjbrum | 10,557 Kb |
JS Beispiel getElementsByClassName 3 | HSZG-Frontend-Kurs | 1,988 Kb |
Use the Twitchtv JSON API | Roksanaop | 3,561 Kb |
CSSOff 2013 Submission | Codewunder | 14,766 Kb |
Fun animations with CSS3 | Minimalmonkey | 2,360 Kb |
Boom | Mhrjnsa1 | 1,794 Kb |
Css3 only dropdown menu | Riogrande | 2,519 Kb |
A Pen by Patrick Cox | Pcridesagain | 2,899 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!