sketch实现城市天际线视觉差异动画效果代码

代码语言:html

所属分类:视觉差异

代码描述:sketch实现城市天际线视觉差异动画效果代码

代码标签: 天际 线 视觉 差异 动画 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<html>
<head>
    <style>
        body {
            overflow: hidden
        }
        canvas {
            background:
            linear-gradient(
            hsl(200, 50%, 80%) 0%,
            hsl(200, 30%, 95%) 75%);
            display: block;
        }

        div {
            height: 100%;
            left: 0;
            position: fixed;
            top: 0;
            width: 100%;
        }
    </style>

</head>
<body style="zoom: 1;">
    <div></div>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/sketch.min.js"></script>
    <script>
        (function() {
            var Building, Skyline, dt, sketch, skylines;

            sketch = Sketch.create();

            sketch.mouse.x = sketch.width / 10;

            sketch.mouse.y = sketch.height;

            skylines = [];

            dt = 1;


            // BUILDINGS

            Building = function(config) {
                return this.reset(config);
            };

            Building.prototype.reset = function(config) {
                this.layer = config.layer;
                this.x = config.x;
                this.y = config.y;
                this.width = config.width;
                this.height = config.height;
                this.color = config.color;
                this.slanted.........完整代码请登录后点击上方下载按钮下载查看

网友评论0