chrome浏览器美化插件:让您的浏览器页面冒水泡, 游小鱼儿

  下载插件和效果图

  这是一个让你的浏览器冒泡泡的插件, 浏览网页的时候仿佛置身于海底世界;

  插件下载地址:https://files.cnblogs.com/files/diligenceday/chromeExtension.crx.zip

  效果图:

 

  在线预览页面

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>

    <style>
        body, html{
            margin:0;
            width:100%;
            height:100%;
            background:#eee;
        }
    </style>
</head>
<body>
    <script>
    var imgBase64 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH8AAAByCAYAAAB6Iw7NAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAC4jAAAuIwF4pT92AAAtbElEQVR42u2dd5hc2Vnmf+dWrq7QOeegVs5pNHk8eRxIxhiMMIvBsLMLgtn1AyzBhmVJazC7Jnpt8JgwRNsw2BOt0YxmlHMYtVqtzjl35XTP/nFudVd1VeegGaP3efRIqrr31r33PV883/mO4C7+Q+Dw4cMABcAHgDeBAfOdvqm7WFsYpANUA48B54FBAHGnb+4u1g4G8QLYCDwCvA1cBHj++efvkv/dCoN4DdgBNAPHgZ7nn39++pi7av+7EAbxeUATIIF/AwKzj7sr+d9FMEi3A/cCdSjH7hagp0p8EnfJf58jxaFzAfuAjwGjwJeB26DsezbcJf99ihRnLh94APhhYDfwAvB5YGwu0pO4S/77DAbpDpQH/yjwfcAWYBL4deDvgNBCxMNd8t/zSJFwB1CCCtmeQKn4WuOwC8BngO8wh33PhrvkvweRYsedKAnfAzwE7AeqAJvxvQS+DfwScBnmtu/ZcJf89wBSyLYDZShP/SDwICpGLwcss04LA18DfgvoXArpSdwl/w4gRZVbAS+wGdiFSsjsARpQA2EufiaAPwD+EPAvh3i4m+RZF6SQ7UFJcS3KSduHIr4UyGVxfPQAvwE8D0RWcl93JX+VYR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qAFjNf7WWFhbSJToxlHSFhREY04uVdhEm8VOG1a6sNCHmTFmGjCv+eu7ATwC9K8F+e9Re5odSYcRtZdsf4p2MKM0gAOlDUpRS5uKUYOhkJkccZ7x2ThqoaTaJUltZjAFjEis3YV8LVYgnn9eEN0jiDGzf866kJ7E26jcyJrgfUX+bBiDQaJaisZQKeZRVNFJBozBYjWeOwIksu08JTtqAWkB7U1gz/psNp6BEEab1LX6gfeV2l9PGHPoHwT+GlXGlg06azcyjgI/BAytVSXP+y13ut44Dpyb47sQcIplTNQvAlOotutrRjzcJX9OGC99ArV6OZvqDaGaKlyb5zIRlt6jPQ48j5ohXVPcJX9hfAM1PT0bAlXH8HuAL8v3EtXd+tgSf++bwG+Tsq/OWuEu+QtjBNVlPFupmgD+Hvg8WWoXUAsoP4PqsrGQBvCjVP1zQN96PNhd8udBiuQdRa2ima3+NVSU8UeobVBm7ydjQvkMP2oc0wNEmdk0MI6a9XwdtWHSLwCdorZ9UYs0V/x86/1C348wPH8PatOjT6Hemw94HKOdCioL+QuodGyy7u6vUPvZSdTSqWZUd43kWno/SjtcROUd5HqQnsRd8hcJYwBUAL+DqlpOoLaZ+ZKobU9+70SVsH0GlW08iWqcsKZe+3JxV+0vDb0oYv8MJc1PAE7ZUZdU00FUd5NPoxZbbAIegLWrvV8J7kr+EpHSF+cTqB2vPk/KdqfG9wI11/DzqATRLwLd7zXpv0v+MpBC8GZUQ6RjQCzLXrdOVJYwhgr74u+lAfD/AROzktWJ7mMJAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE0LTAzLTE1VDE4OjQ2OjAzKzA4OjAw9uZfnwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNC0wMy0xNVQxODo0NjowMyswODowMIe75yMAAAAASUVORK5CYII="
    class Bubble {
        constructor(_x, _y) {
            this.x = _x;
            this.y = _y;
            this.speedy = common.getBetween(1,4);
            this.w = common.getBetween(2, 16);
            this.smallB = Math.random()>0.7 ? true : false;
        }
        move() {
            this.x += common.getBetween(0,5)-2;
            this.y = this.y-this.speedy;
        }
    }
    class Panel {
        constructor() {
            this.bubbles = new Array();
        }
        create(x, y) {
            if(Math.random()>0.8) {
                this.bubbles.push( new Bubble(x, y) );
            }
        }
        calc() {
            for(var b in this.bubbles) {
                if(this.bubbles[b].y<0) {
                    this.bubbles.splice(b,1);
                }else{
                    this.bubbles[b].move();
                }
            };
        }
        draw(eCanvas, context) {
            context.clearRect(0,0,eCanvas.width,eCanvas.height);
            for(var b in this.bubbles) {
                // context.fillStyle = ["rgba(255,255,255,0.5)", "rgba(52,152,219,0.5)"][Math.floor(Math.random()*2)];
                context.fillStyle = "rgba(255,255,255,0.5)";
                context.beginPath();
                context.arc(this.bubbles[b].x, this.bubbles[b].y, this.bubbles[b].w, 0, Math.PI*2,false);
                context.fill();
                this.bubbles[b].smallB && this.drawEllipse(context, this.bubbles[b].x, this.bubbles[b].y, this.bubbles[b].w/4, this.bubbles[b].w/3);
            }
        }
        drawEllipse(context, x, y, a, b) {    
            context.save();
            var r = (a > b) ? a : b;
            var ratioX = a / r;
            var ratioY = b / r;
            var pos = [a,b,3][common.getBetween(0,2)] + 1;
            context.fillStyle = "rgba(255,255,255,0.6)";
            context.scale(ratioX, ratioY);
            context.beginPath();
            context.arc(x / ratioX - pos , y / ratioY - pos , r, 0, 2 * Math.PI, false);
            context.closePath();
            context.fill();
            context.restore();
        }
    }
    class BubblePanel {
        constructor() {
            this.createCanvas();
            this.events();
        }
        createCanvas() {
            var eCan = this.eCan = document.createElement("canvas");
            document.body.appendChild(eCan);
            eCan.style.top = "0";
            eCan.style.left = "0";
            eCan.style.position = "fixed";
            eCan.style.zIndex = 100;
            eCan.style.pointerEvents = "none";
            this.context = eCan.getContext("2d");
            this.events();

            this.clientX = 0;
            this.clientY = 0;

            //插件canvas画图面板
            this.panel = new Panel();

            this.requestAni();
        }
        events() {
            var _this = this;
            function resize() {
                _this.eCan.width = document.body.offsetWidth;
                _this.eCan.height = document.body.offsetHeight;
            }
            window.addEventListener('resize', resize);
            resize();

            document.body.addEventListener("mousemove", function(ev) {
                _this.clientX = ev.clientX;
                _this.clientY = ev.clientY;
            });
        }
        //生成泡泡 ==》 计算 ==》》 重新绘图
        requestAni() {
            this.panel.create(this.clientX, this.clientY);
            this.panel.calc();
            this.panel.draw(this.eCan, this.context);
            requestAnimationFrame(this.requestAni.bind(this));

        }
    }
    const common = {
        getBetween : function(start , end) {
            return Math.floor(Math.random()*(end-start))+start;
        }
    }


        /**
        * 鱼的类
        */
        class Fish {
            constructor() {
                //小鱼的地址
                this.src= imgBase64;
                //小鱼的宽度和高度
                this.imageW = 40;
                this.imageH = 40;
                //小鱼目前的位置
                this.nowX = 0;
                this.nowY = 0;
                //小鱼要到的地方
                this.destX = 0;
                this.destY = 0;
                this.init();
            }
            init() {
                this.img = new Image();
                this.img.src = this.src;
            }
        }

        /**
        * 创建canvas, 并插入到DOM中
        */
        class Can {
            constructor(el) {
                var eCan = document.createElement("canvas");
                el.appendChild(eCan);
                eCan.style.top = "0";
                eCan.style.left = "0";
                eCan.style.position = "fixed";
                eCan.style.zIndex = 100;
                eCan.style.pointerEvents = "none";
                return eCan;
            }
        }

        /**
        * 整体逻辑
        */
        class Fly {
            constructor(bd, window, fish, can) {
                this.body = bd;
                this.win = window;
                this.fish = fish;
                this.can = can;
                this.context = this.can.getContext("2d");
                this.events();
                this.requestAni();
            }
            //绑定window的事件
            events() {
                var _this = this;
                function move(ev) {
                    _this.fish.destX = ev.clientX;
                    _this.fish.destY = ev.clientY;
                }
                function resize() {
                    _this.can.width = _this.body.offsetWidth;
                    _this.can.height = _this.body.offsetHeight;
                }
                this.win.addEventListener("mousemove", move);
                this.win.addEventListener('resize', resize);

                resize();
            }
            /**
            * return position X, Y;
            */
            lerp(a, b, n) {
                return (1 - n) * a + n * b;
            }
            //重复刷新, 更新canvas画图
            requestAni() {
                var _this = this;
                //计算🐟游到的位置
                this.fish.nowX = this.lerp( this.fish.nowX, this.fish.destX,.1);
                this.fish.nowY = this.lerp( this.fish.nowY, this.fish.destY-this.fish.imageH/2,.1);
                //更新到画布
                this.context.clearRect(0, 0 ,this.can.width, this.can.height);
                this.context.save();
                if(this.fish.destX<this.fish.nowX) {
                    this.context.drawImage(this.fish.img, this.fish.nowX , this.fish.nowY , this.fish.imageW,  this.fish.imageW);
                }else{
                    this.context.scale(-1, 1);
                    this.context.drawImage(this.fish.img, -this.fish.nowX  , this.fish.nowY , this.fish.imageW,  _this.fish.imageW);
                }
                this.context.restore();
                window.requestAnimationFrame(function() {
                    _this.requestAni();
                });
            }
        }



        var fish = new Fish();

        var can = new Can(document.body);

        var fly = new Fly(document.body, window, fish, can);

        new BubblePanel();

    </script>
</body>
</html>
View Code

  如何安装:

  1:下载插件并解压出 chromeExtension.crx

  2:打开浏览器的设置, 更多工具 -> 扩展程序, 或者直接打开 chrome://extensions/,这个地址:

  3:选中插件, 左键拖拽插件到第二步中打开的界面, 界面会出现“拖放以安装”的提示, 然后松手, 并再确认安装;

  原理

  整体的内容分为 泡泡的构造函数和 鱼的构造函数;

  泡泡的生成是利用canvasAPI, context.arc()  画圆 ;

  鱼的生成也是利用canvasAPI, context.drawImage() 画鱼🐟 

  根据鼠标移动的位置, 利用运动效果把鱼拉过去, 根据鼠标的位置画泡泡;

  github

  发布到git:https://github.com/sqqihao/chromeBubbleExtension

  插件下载地址

  插件下载地址:https://files.cnblogs.com/files/diligenceday/chromeExtension.crx.zip

作者: NONO
出处:http://www.cnblogs.com/diligenceday/
企业网站:http://www.idrwl.com/
开源博客:http://www.github.com/sqqihao
QQ:287101329
微信:18101055830 

厦门点燃未来网络科技有限公司, 是厦门最好的微信应用, 小程序, 微信网站, 公众号开发公司

posted @ 2017-03-02 00:12  方方和圆圆  阅读(4987)  评论(9编辑  收藏  举报

再过一百年, 我会在哪里?