Welcome User
Login
Register
digital watch
Saurav Chauhan
HTML
CSS
JS
Preview
Digital Watch Agyan adda
#body { background: #FF512F; /* fallback for old browsers */background: -webkit-linear-gradient(to right, #F09819, #FF512F); background: linear-gradient(to right, #F09819, #FF512F); color: white; } #div1 { transform: translateY(33%); } #timee { font-family:initial; font-size: 18vw; text-align: center; text-shadow: 0px 0px 20px; } #datee { text-align: center; text-shadow: 0px 0px 20px #4e291d; font-size: 10vmin; font-family: cursive; }
window.setInterval(ut, 1000); function ut() { var d = new Date(); document.getElementById("timee").innerHTML = d.toLocaleTimeString(); document.getElementById("datee").innerHTML = d.toLocaleDateString(); } window.addEventListener('DOMContentLoaded', init); class Sph{ constructor( radius, widthseg, heightseg,rotx,roty,rotz) { function getColor(){ return "#" + Math.floor(Math.random() * 16777215).toString(16); } this.geometry = new THREE.SphereGeometry(radius, widthseg,heightseg); this.material = new THREE.MeshBasicMaterial( { color: getColor(), wireframe: true , blending: THREE.AdditiveBlending, transparent: true} ); this.mesh = new THREE.Mesh(this.geometry, this.material); this.rotx=rotx; this.roty=roty; this.rotz=rotz; } getMesh(){ return this.mesh; } next(){ this.mesh.rotation.x += this.rotx; this.mesh.rotation.y += this.roty; this.mesh.rotation.z += this.rotz; } } function init() { let width; let height; let array=[]; const renderer = new THREE.WebGLRenderer({ canvas: document.querySelector('#canvas'), antialias: true }); const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(45, 1.0); camera.position.set(0, 0, +1000); for(let i=1;i<=3;i++){ const p=(function(v){let r=0;(v>=0.5)? r=1: r=-1;return r;})(Math.random()); const q=(function(v){let r=0;(v>=0.5)? r=1: r=-1;return r;})(Math.random()); const r=(function(v){let r=0;(v>=0.5)? r=1: r=-1;return r;})(Math.random()); const sp=new Sph(i*100,30,30,0.03*p,0.03*q,0.03*r); scene.add(sp.getMesh()); array.push(sp); } tick(); function tick() { for(let i=0;i
View Another Modules
swing image
swing image
Syntax highlighter code
Syntax highlighter code
Bar Chart
Bar Chart
Enquery Form
Enquery Form
Disable outside Modal
Disable outside Modal
Nested Dropdown Menu
Nested Dropdown Menu