mouse-pointer
Version:
Small utility to personalize the cursor of the mouse.
9 lines • 1.81 kB
JavaScript
/**
* mouse-pointer
* Small utility to personalize the cursor of the mouse.
* @version v0.0.1 - 2017-10-19
* @link https://github.com/ajsoriar/div-lines
* @author Andres J. Soria R. <ajsoriar@gmail.com>
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
!function(){window.ptr={"max-z-index":2147483647,x:null,y:null,init:function(){window[addEventListener?"addEventListener":"attachEvent"](addEventListener?"load":"onload",this.load)},load:function(){},osCursorShow:function(){},osCursorHide:function(){},show:function(){},hide:function(event){}},ptr.init=function(el){return window.PointerEvent,this},ptr.line=function(x1,y1,x2,y2,thickness,color){},ptr.linex=function(idString,x1,y1,x2,y2,weight,color,opacity,roundBorder,longSombra,colSombra){},ptr.rndLine=function(){var u=this.utils;return this.line(u.rndX(),u.rndY(),u.rndX(),u.rndY(),u.rndColor()),this.el.lastElementChild},ptr.draw=function(html){this.el.innerHTML=this.el.innerHTML+html},ptr.utils={},ptr.utils.getDistance=function(x1,y1,x2,y2){return Math.sqrt(Math.pow(x2-x1,2)+Math.pow(y2-y1,2))},ptr.rm=function(lineID){},ptr.update=function(id,propsArr){},ptr.trace=function(arr){},ptr.createContext=function(){},ptr.utils.getRandomNum=function(min,max){return Math.floor(Math.random()*(max-min+1))+min},ptr.utils.rndColor=function(){var r=this.getRandomNum(0,255),g=this.getRandomNum(0,255),b=this.getRandomNum(0,255),a=1;return"rgba("+r+","+g+","+b+","+a+")"},ptr.utils.rndX=function(){return this.getRandomNum(1,window.innerWidth)},ptr.utils.rndY=function(){return this.getRandomNum(1,window.innerHeight)},ptr.getLineString=function(idString,x1,y1,x2,y2,weight,color,opacity,roundBorder,longSombra,colSombra){},ptr.CONST_180_BY_PI=180/Math.PI,ptr.getFastLineString=function(x1,y1,x2,y2,weight,color){},ptr.init()}();