Coder Social home page Coder Social logo

wongest / canvas-learning Goto Github PK

View Code? Open in Web Editor NEW

This project forked from array-huang/canvas-learning

0.0 0.0 0.0 1.03 MB

examples for canvas learning

Home Page: https://array-huang.github.io/canvas-learning/

License: MIT License

JavaScript 36.53% CSS 4.67% HTML 58.79%

canvas-learning's Introduction

canvas-learning:分享一些本人学习canvas时用来练习的案例

案例1: 井字游戏

  • 简单应用了canvas的一些基础API,如绘制基本图形以及路径。
  • 练习使用Path2D配合translate来复用路径。
  • 练一下批量有规律地输出图形,灵感来自前公司楼下的地砖。
  • 主要是练习canvas图片相关的API。

案例4:进度条

  • 练习canvas文字相关的API。
  • 练习canvas动画。

案例5:做自由落体运动的球

  • 练习自由落体运动的动画。
  • 练习在动画里同时处理多个图形。
  • 用户可以通过拖动球来改变其位置,若新位置不在画布底部,则开始做自由落体运动。
  • 练习canvas用户交互。
  • 此案例来自于我过往的一个项目,当时是用css3来做的,现在改成用canvas来实现。
  • 练习触控手势:pressmove / pinch / rotate。
  • 练习canvas的变形相关API:translate / scale / rotate。

思维导图 - canvas常用api

思维导图 - canvas常用api

canvas-learning's People

Contributors

array-huang 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.