技术控

    今日:98| 主题:49390
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] The Guide to HTML5 Canvas JavaScript Libraries

[复制链接]
凉透还能再暖 发表于 2016-10-6 00:28:11
194 5

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
Have you ever wanted to spice up your website with some interactive elements, but didn’t know which library to use or where to start?
   An increasing number oftop websites are leveraging the power of HTML5 Canvas elements to render some pretty cool effects.
   If, like me, you’ve always wanted to create something cool with canvas , keep reading.
  You might be asking these questions:

  
       
  • What is the best way to get started with HTML5 Canvas ?   
  • Should I use a library or the native API ?   
  • PixiJS , Three.js or CreateJS ?   
  • Which one should I learn and why?  
   1. HTML5 Canvas API

   
The Guide to HTML5 Canvas JavaScript Libraries-1 (something,discover,elements,library,reading)

   Before you dive straight into any of theI encourage you to look at the native HTML5 Canvas API .
   In this Mozilla tutorial you will discover how to draw simple shapes, apply styles and colors, work with text, images, compositing, clipping and animations .
   Here, we draw a few rectangles on the canvas. We define the background color for each rectangle fillStyle and position them where we want.
   fillRect(25, 25, 150, 150) renders a 150×150 rectangle, 25
  pixels from the top left corner of our canvas element.
   Follow the whole tutorial to get familiar with the HTML5 Canvas API.
   Knowing what beginPath() , stroke() , fill() and lineTo() commands will give you a good overview of what lies under the hood of the following libraries.
  Now let’s have a look at the most popular libraries when it comes to HTML5 Canvas rendering.
  They have a similar relationship to the native HTML5 Canvas API as jQuery has to JavaScript.
  Write less, do more…in other words they let you write less code and be more creative.
  Or at least that’s what I think about them.
   2. PIXI.JS

The Guide to HTML5 Canvas JavaScript Libraries-2 (something,discover,elements,library,reading)

   The motto of PIXI.js is “ Create beautiful digital content with the fastest, most flexible 2D WebGL renderer ”.
  I think that sums it up pretty nicely.
   Pixi.js by Goodboy Digital has recently (September 2016) been updated to version v4.0.1, this is a good sign of active development !
  The last thing you want is to spend hours or weeks learning something new that won’t be supported anymore.
  Looks like Pixi.js will be around for a while.

   In the above example we draw a circle and line using Pixi.js , check out the JavaScript code to get an idea of how friendly the Pixi.js syntax is.
  PIXI.js Examples

   There are plenty of outstanding PIXI.js projects . Browse the following projects to get an idea of when to use Pixi.js.
   Quechua Lookbook is a powerful combination of Pixi.js and GreenSock . If you never heard about GreenSock, you can learn the basics in 60 minutes here .
友荐云推荐




上一篇:element14 Pi IoT Smarter Spaces Design Challenge
下一篇:盗号近八千的木马长什么样?
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

抱住那大婶 发表于 2016-10-6 01:23:49
小时候我以为自己长大后可以拯救整个世界,等长大后才发现整个世界都拯救不了我……
回复 支持 反对

使用道具 举报

wingore 发表于 2016-10-7 18:36:57
明明可以靠脸吃饭,偏偏要靠才华
回复 支持 反对

使用道具 举报

sgqtbdmg 发表于 2016-10-20 04:31:14
我在外边都用手机上来酷辣虫顶凉透还能再暖!
回复 支持 反对

使用道具 举报

SB金梅(霉) 发表于 2016-10-21 15:54:18
不错,谢谢分享
回复 支持 反对

使用道具 举报

1509csa 发表于 2016-11-2 05:25:32
请你吃包辣条
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表