GithubHelp home page GithubHelp logo

canvas-moon's Introduction

预览链接:https://dcbryant.github.io/canvas-moon/index.html

原由:前几天中秋到来,但一直在学校学习,遂用canvas画一幅明月,夜空和流星图,以表相思之情

技术栈:es6 + canvas

具体实现:分别用class分别制作了三个类:Moon Stars Meteor,Moon用了径向渐变,Stars实现了一个blink函数,随机改变每一个星星的半径大小,从而产生闪烁的效果,Meteor中的每个流星由一个半圆和一个三角形组成,类似于一个不倒翁。然后整体倾角45度,并且填充时用上一个径向渐变,就可以相当完美的达到流行尾巴那样渐行渐远渐模糊的样子

canvas-moon's People

Contributors

dcbryant avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.