Showing posts with label Circles pattern with audio. Show all posts
Showing posts with label Circles pattern with audio. Show all posts

Memasang Kode Circles pattern with audio
Login ke akun blog klik tombol blog baru, buat satubuah link baru   
kemudian beri nama sesuai fungsi,  klik Edit HTML pada link baru tersebut, 
hapus semua kode template ganti dengan kode blank template, yang tersedia pada sumber  berikut :  Get Blank Template.   edit background warna sesuai keinginan klik simpan selesai.
Kemudian klik entri halaman baru HTML pada link tersebut.
copy kode dibawah ini, pastekan kedalam halaman baru tersebut dan klik simpan selesai
<style class="Mys2010-styles">
body {);color:red;height:100%;overflow:hidden;}
header {
  -o-transition-duration: 0.3s;
  -moz-transition-duration: 0.3s;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  padding:  0px 0;
  position: fixed;
  top:-4px;
  width: 100%;
text-align: center;
font-size:  6px;
background: -moz-linear-gradient(top, #24006B 0%, rgba(53,02,01,1) 100%);
  border-bottom: 3px solid #dad;  
}
.ap {
position: fixed;
right: 0;
bottom:-19px;
left: 0;
height: 70px;
margin: auto;
font-family: Arial, sans-serif;
font-size: 10px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
text-align: center;
font-size:  11px;
background:  #111;
border-top: 2px solid #f0f;
z-index: 9999;
} 
h2 {
padding:12px; 
background: -webkit-linear-gradient(transparent 10%, goldenrod 50%, transparent 90%); 
background: linear-gradient(transparent 10%, #24006B 50%, transparent 90%); 
} 
#M-2010, #teks, #posisi, #dibawah  {
    position: absolute;
    font-size: 11px;
    margin: 2px
}
#M-2010, #teks div {
    text-decoration: underline;
    cursor: pointer
}
#teks, #posisi {
    text-align: right;
    right:  50px;
}
#teks, #dibawah {
    text-align: left;
    left:  50px;
}
 #dibawah, #posisi {
    bottom:28px;
}
body::before {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
   background: #12127D;
  -webkit-animation: overlay infinite 12s;
          animation: overlay infinite 12s;
  content: '';
}
@-webkit-keyframes transform {
  0%, 16% {
    opacity: 0;
    -webkit-transform: translateY(-50%) rotateX(-90deg);
            transform: translateY(-50%) rotateX(-90deg);
  }
  18% {
    opacity: 1;
  }
  40% {
    opacity: 1;
    -webkit-transform: translateY(-50%) rotateX(0deg);
            transform: translateY(-50%) rotateX(0deg);
  }
}
@keyframes transform {
  0%, 16% {
    opacity: 0;
    -webkit-transform: translateY(-50%) rotateX(-90deg);
            transform: translateY(-50%) rotateX(-90deg);
  }
  18% {
    opacity: 1;
  }
  40% {
    opacity: 1;
    -webkit-transform: translateY(-50%) rotateX(0deg);
            transform: translateY(-50%) rotateX(0deg);
  }
}
@-webkit-keyframes overlay {
  0% {
    opacity: .5;
  }
  18%, 81% {
    opacity: 0;
  }
  92%, 100% {
    opacity: .5;
  }
}
@keyframes overlay {
  0% {
    opacity: .5;
  }
  18%, 81% {
    opacity: 0;
  }
  92%, 100% {
    opacity: .5;
  }
}
@-webkit-keyframes opacity {
  0%, 4% {
    opacity: 0;
  }
  18%, 81% {
    opacity: 1;
  }
  92%, 100% {
    opacity: 0;
  }
}
@keyframes opacity {
  0%, 4% {
    opacity: 0;
  }
  18%, 81% {
    opacity: 1;
  }
  92%, 100% {
    opacity: 0;
  }
} 
img {
  position: absolute;
  top: 167px;
  left:575px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #00248E;
  width: 211px;
  height: 212px;
  z-index: 3;
  opacity: 1;
  animation: photo-ani 24s forwards;
}
/* Keyframes */
@keyframes line-ani {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes photo-ani {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
li{
 position: absolute;
 left: 50%;
 top: 45%;
 display: block;
 background: transparent;
 border: 0px solid #333;
 border-left-color: transparent;
 border-right-color: transparent;
 border-radius: 500px;
 transition: all 0.5s ease;
}
li:last-child {
 position: absolute;
 left: 50%;
 top: 50%;
 z-index: 20;
 width: 200px;
 height: 100px;
 margin-left: -110px;
 margin-top: -110px;
 padding: 70px 0px 30px;
 background-color: rgba(8,8,8,1.0);
 border: 10px solid rgba(8,8,8,1.0);
 border-radius: 200px;
 text-shadow: 2px 2px 0px rgba(0,0,0,1);
 box-shadow: 0px 0px 30px rgba(23,246,251, 0.5);
 animation: pulseShadow 5s infinite linear;
}
li:last-child:after{
 content:'';
 border: 3px dotted rgba(22,42,43,1.0);
 border-radius: 200px;
 width: 200px;
 height: 200px;
 display: block;
 position: absolute;
 top:-3px;
 left:-3px;
 background-color: transparent;
 box-shadow: inset 0px 0px 30px rgba(0,0,0,1.0);
}
li:first-child{
 margin-left: -130px;
 margin-top: -130px;
 z-index: 2;
 width: 240px;
 height: 240px;
 border-width: 10px;
 animation: spinBG 5s infinite linear;
}
li:nth-child(2){
 margin-left: -137px;
 margin-top: -137px;
 z-index: 1;
 width: 270px;
 height: 270px;
 border-width: 2px;
 border-style: dotted;
 box-shadow: 0px 0px 20px rgba(23,246,251, .5);
 animation: spinBG2 2s infinite linear;
}
li:nth-child(3){
 margin-left: -150px;
 margin-top: -150px;
 z-index: 1;
 width: 296px;
 height: 296px;
 border-width: 2px;
 box-shadow: inset 0px 0px 25px rgba(23,246,251, .25);
 animation: spinBG 12s infinite linear;
}
li:nth-child(4){
 margin-left: -170px;
 margin-top: -170px;
 z-index: 1;
 width: 330px;
 height: 330px;
 border-width: 5px;
 border-style: solid;
 box-shadow: inset 0px 0px 25px rgba(23,246,251,1.0);
 animation: spinBG3 8s infinite linear;
}
/*-------------------------------------------
 Animations
-------------------------------------------*/
@keyframes pulseGlow{
 0%  {text-shadow: 0px 0px 20px rgba(23,246,251, 0.75);}
 50% {text-shadow: 0px 0px 40px rgba(23,246,251, 0.5); }
 100%{text-shadow: 0px 0px 20px rgba(23,246,251, 0.75);}  
}
@keyframes pulseShadow{
 0%  {box-shadow: 0px 0px 30px rgba(23,246,251, 0.25);}
 50% {box-shadow: 0px 0px 30px rgba(23,246,251, 0.75);}
 100%{box-shadow: 0px 0px 30px rgba(23,246,251, 0.25);}  
}
@keyframes spinBG{
 0%  {transform: rotate(0deg);}
 100%{transform: rotate(360deg);} 
}
@keyframes spinBG2{
 0%{
  transform: rotate(360deg);
  box-shadow: 0px 0px 1px rgba(23,246,251, 0.5);
 }
 50%{
  transform: rotate(180deg);
  box-shadow: 0px 0px 20px rgba(23,246,251, 0.5);
 }
 100%{
  transform: rotate(0deg);
  box-shadow: 0px 0px 1px rgba(23,246,251, 0.5);
 } 
}
@keyframes spinBG3{
 0%{
  transform: rotate(180deg);
  box-shadow: 0px 0px 1px rgba(23,246,251, 0.1);
 }
 50%{
  transform: rotate(0deg);
 }
 100%{
  transform: rotate(-180deg);
 } 
}
.M2010 {  
  text-shadow: 0 1px 0 #FFFF00,
               0 2px 0 #c9c9c9,
               0 3px 0 #000,
               0 4px 0 #b9b9b9,
               0 5px 0 #000,
               0 6px 1px #ff0,
               0 0 5px rgba(0,0,0,.1),
               0 1px 3px rgba(0,0,0,.3),
               0 3px 5px rgba(0,0,0,.2),
               0 5px 10px rgba(0,0,0,.25),
               0 10px 10px rgba(0,0,0,.2),
               0 20px 20px rgba(0,0,0,.15);}
</style>
<div align="center" style="margin-top:-54px">
 <canvas id="circles"></canvas>
<canvas id="trails"></canvas>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<img src="https://sites.google.com/site/pelajaranku1/fileku/logo-mys2010.png"/>     
<h3 class="M2010">
<div align="center" style="margin-top:440px">
<font size="5" color="rgb(105,105,105)"face="arial">M-2010 CIBEBER CIMAHI</h3>
</div>
</div>
</ul>
<header>
<a href="http://sule-m2010.blogspot.co.id/2016/08/circles-pattern-with-audio.html" target="_blank" title="Mari Belajar">
<h2>
<span style="color:orange; font-size: 10pt">LET'S STUDY</a>  </h2>
</a>  
</div>
</header>
<h3 class="M2010">
<div align="center" style="margin-top:435px">
<font size="5" color="rgb(105,105,105)"face="arial">M-2010 CIBEBER CIMAHI</h3>
</div>
</div>
<div class="ap" id="ap">
<div align="center">
<div id="dibawah">
<span style="font-family: arial ; font-size: 12px; color:#80C8FE;"> EDITED BY. <a href="https://Link download"title="Mari Belajar"><span style="color: #FFFF00; font-size: 14px;">&nbsp; M - 2010 </a>&nbsp; DOWNLOAD </a> 
</div>
<div id="posisi">
<span style="font-family: arial ; font-size: 12px; color:#80C8FE;"> COPYRIGHT <a href="http://codepen.io/Myscript2010" target="_blank" title="Mari Belajar"><span style="color: #FFFF00; font-size: 14px;">&nbsp; &copy; - 2016 </a>&nbsp; CODEPEN </a> 
</div>
<h2>
<audio id="mys2010" src="https://sites.google.com/site/safe50534/lagu/Love-song-M2010s.mp3"controls="controls"></audio></h2>
</a></div>
</div>
<ul class="mys2010-list">
<script src='//assets.codepen.io/assets/common/stopExecutionOnTimeout.js?t=1'>
</script>    
<script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'>
</script>   
<link rel='stylesheet prefetch' href='http://cdn.jsdelivr.net/mediaelement/2.13.1/mediaelementplayer.min.css'>    
<script src='http://cdn.jsdelivr.net/mediaelement/2.13.1/mediaelement-and-player.min.js'>
</script>  
<script src="//assets.codepen.io/assets/common/stopExecutionOnTimeout-f961f59a28ef4fd551736b43f94620b5.js"></script> 
<script>
      $(function () {
$('video,audio').mediaelementplayer({
success: function (mediaElement, domObject) {
var audio_src = $('li.current').attr('data-url');
mediaElement.setSrc(audio_src);
mediaElement.addEventListener('ended', function (e) {
mys2010PlayNext(e.target);
}, false);
},
keyActions: []
});
$('.mys2010-list li').click(function () {
$(this).addClass('current').siblings().removeClass('current');
var audio_src = $(this).attr('data-url');
$('audio#mys2010:first').each(function () {
this.player.pause();
this.player.setSrc(audio_src);
this.player.play();
});
});
});
function mys2010PlayNext(currentPlayer) {
if ($('.mys2010-list li.current').length > 0) {
var current_item = $('.mys2010-list li.current:first');
var audio_src = $(current_item).next().text();
$(current_item).next().addClass('current').siblings().removeClass('current');
console.log('if ' + audio_src);
} else {
var current_item = $('.mys2010-list li:first');
var audio_src = $(current_item).next().text();
$(current_item).next().addClass('current').siblings().removeClass('current');
console.log('elseif ' + audio_src);
}
if ($(current_item).is(':last-child')) {
$(current_item).removeClass('current');
} else {
currentPlayer.setSrc(audio_src);
currentPlayer.play();
}}    
</script>


<script>
(function () {
 'use strict';
 window.requestAnimFrame = (function(){
    return  window.requestAnimationFrame       ||
            window.webkitRequestAnimationFrame ||
            window.mozRequestAnimationFrame    ||
            function( callback ){
              window.setTimeout(callback, 1000 / 60);
            };
  })();    
  var TWO_PI = Math.PI * 2,
      TO_RADIAN = Math.PI / 180,
      TO_DEGREE = 180 * Math.PI,
      COLORS = [
        '#a90000',
        '#a90093',
        '#008ba9',
        '#00a938',
        '#8ba900',
        '#a99300',
      ],
      canvas = document.getElementById('circles'),
      ctx = canvas.getContext('2d'),
      mainRadius = 75,
      friendRadius = 75,
      depth = 0,
      planets = [],
      lastPlanets = [],
      windowW,
      windowH,
      halfW,
      halfH,
      velocityMid;  
  var init = function () {
    planets = [];
    lastPlanets = [];
    windowW = window.innerWidth;
    windowH = window.innerHeight;
    halfW = windowW >> 1;
    halfH = windowH >> 1;
    canvas.width = windowW;
    canvas.height = windowH;    
    var parentStar = {velocity: {x: halfW, y: halfH}};
        var radius = mainRadius >> 1,
        numPlanets = 4,
        angleStep = (360 / numPlanets) * TO_RADIAN,
        planet;    
      while (numPlanets--) {
        var velocity = new Vector(halfW, halfH, 250, angleStep * numPlanets);
        planet = new Planet(velocity, radius, 4, 0.004, parentStar, depth);
        planets.push(planet);
      }    
  };
    var createMid = function () {
    ctx.beginPath();
    ctx.arc(halfW, halfH, mainRadius, 0, TWO_PI, false);
    ctx.lineWidth = 1;
    ctx.strokeStyle = '#f00';
    ctx.stroke();
    ctx.closePath();
  }
    function Planet(velocity, radius, numStars, speed, parentStar, depth) {
    this.velocity = velocity;
    this.radius = radius;
    this.numStars = numStars;
    this.speed = speed;
    this.parentStar = parentStar || null;
    this.depth = depth || 0;
    this.stars = [];      
    if (numStars < 0) {
      return;
    }
    var i = numStars,
        planetRadius = radius * 0.5,
        angleStep = (360 / numStars) * TO_RADIAN,
        angle,
        planet,
        planetVelocity;
    var correction = 0;
    if (this.parentStar !== null) {
      correction -= this.velocity.angle;
    }
    while (i--) {
      angle = angleStep * i;
      if (this.parentStar !== null) {
        angle += this.velocity.angle;
      }
      planetVelocity = new Vector(velocity.x, velocity.y, velocity.length * 0.5, angle);
      planet = new Planet(planetVelocity, planetRadius, numStars-1, speed * 1.5, this, this.depth + 1);
      planets.push(planet);
      this.stars.push(planet);
    }
    if (numStars <= 0) {
      lastPlanets.push(this);
    }
  } 
  Planet.prototype.update = function () {
    var vel = this.velocity;
    if (this.parentStar !== null) {
      vel.setX(this.parentStar.velocity.x);
      vel.setY(this.parentStar.velocity.y);
    }
   vel.setAngle(vel.getAngle() + this.speed);
  }
  Planet.prototype.draw = function () {   
    var vel = this.velocity;
    ctx.beginPath();
    ctx.arc(vel.x, vel.y, this.radius, 0, TWO_PI, false);
    ctx.lineWidth = 0.5;
    ctx.strokeStyle = COLORS[this.depth];
    ctx.stroke();
    if (this.numStars === 0) {
      ctx.fillStyle = '#fff';
      ctx.fill();
    }
    ctx.closePath();
  }  

  function Vector(sX, sY, length, angle) {
    this.startX = sX;
    this.startY = sY;
    this.angle = angle;
    this.setX = function (x) {
      this.startX = x;
    }
    this.setY = function (y) {
      this.startY = y;
    }
    this.setAngle = function (angle) {
      this.angle = angle;
      this.x = this.startX + (Math.cos(this.angle) * this.length);
      this.y = this.startY + (Math.sin(this.angle) * this.length);
    }
    this.getAngle = function () {
      return this.angle;
    }
    this.setLength = function (length) {
      this.length = length;
      this.x = (Math.cos(this.angle) * this.length);
      this.y = (Math.sin(this.angle) * this.length);
    }
    this.getLength = function () {
      return this.length;
    }
    this.getDistanceTo = function (v2) {
      var dx = v2.x - this.x,
          dy = v2.y - this.y;      
      return Math.sqrt(dx * dx + dy * dy);
    }
    this.setLength(length);
    this.setAngle(angle);
  }
  var drawConnector = function (v1, v2, color) {
    color = color || '#f00';
    ctx.beginPath();
    ctx.moveTo(v1.x, v1.y);
    ctx.lineTo(v2.x, v2.y);
    ctx.strokeStyle = color;
    ctx.lineWidth = 0.3;
    ctx.stroke();
    ctx.closePath();
  }
   var loop = function () {
    requestAnimFrame(loop);
    ctx.fillRect(20,20,150,100);
    ctx.fillRect(0,0, windowW, windowH);
    ctx.save();
    createMid();
    // connect nearest
    var q, z,
        planetA, planetB,
        distance;
    for (q = 0; q < lastPlanets.length; q++) {
      planetA = lastPlanets[q];

      for (z = 0; z < lastPlanets.length; z++) {
        planetB = lastPlanets[z];
        distance = planetB.velocity.getDistanceTo(planetA.velocity);

        if (distance < friendRadius && planetA !== planetB) {
          drawConnector(planetA.velocity, planetB.velocity, '#FFB800');
        }
      }
    }
    // draw planets
    var i = planets.length,
        planet,
        star;
    while (i--) {
      planet = planets[i];

      if (planet.stars.length > 0) {
        for (q = 0; q < planet.stars.length; q++) {
          star = planet.stars[q];
          drawConnector(planet.velocity, star.velocity, '#ff0');
        }
      }
      planet.update();
      planet.draw();
    }
   ctx.restore();
  }
  window.addEventListener('resize', init, false);
  init();
  loop();
})();
</script>
Circles pattern by. Pimskie
Audio Code by. Jereme Causing
Design Code is Edited by. Mys2010 on Codepen
If you want to directly copy  and  paste you canDownload Here Circles pattern