問題描述
我目前正在研究在新的 HTML 5 應(yīng)用程序中使用畫布的選項(xiàng),并且想知道 HTML 畫布 JavaScript 庫和框架的當(dāng)前最新狀態(tài)是什么?
I am currently investigating options for working with the canvas in a new HTML 5 application, and was wondering what is the current state of the art in HTML canvas JavaScript libraries and frameworks?
具體來說,是否有框架支持游戲開發(fā)所需的東西——復(fù)雜動畫、管理場景圖、處理事件和用戶交互?
In particular, are there frameworks that support the kind of things needed for game development - complex animation, managing scene graphs, handling events and user interactions?
也愿意同時(shí)考慮商業(yè)和開源產(chǎn)品.
Also willing to consider both commercial and open source products.
推薦答案
我一直在研究 fabric.js - 一個(gè)畫布庫來幫助解決這個(gè)問題 - 通過處理事件和用戶交互來操作畫布上的對象.它還沒有發(fā)布,但是看一個(gè)簡單的預(yù)覽演示.
I've been working on fabric.js — a canvas library to help with exactly that — manipulating objects on canvas, by handling events and user interactions. It's not released yet, but take a look at a simple preview demo.
您還可以在 這個(gè)設(shè)計(jì)編輯器中看到它的實(shí)際效果,它最初是為它創(chuàng)建的.
You can also see it in action in this design editor, which it was originally created for.
該項(xiàng)目現(xiàn)在在 github 上可用(打開-根據(jù) MIT 許可證獲取)
The project is now available on github (open-sourced under MIT License)
要開始使用,請查看:
- 演示(簡單和復(fù)雜,用代碼展示它們是如何完成的)
- Fabric.js 在 FalsyValues 上的演示(和 另一位在 BK.js)
- github上的Wiki(包括常見問題解答)
- 文檔
- Google 群組(在此提問)
- Twitter 上的Fabric.js(或通過 twitter 提出簡短問題)
- Fabric.js 簡介:第 1 部分(關(guān)于 ScriptJunkie 的文章)
- Fabric.js 簡介:第 2 部分(關(guān)于 ScriptJunkie 的文章)
- Demos (simple & complex, with code to show how they're done)
- Fabric.js presentation at FalsyValues (and another one at BK.js)
- Wiki on github (including FAQ)
- Documentation
- Google Group (ask any question there)
- Fabric.js on twitter (or short questions via twitter)
- Introduction to Fabric.js: Part 1 (article on ScriptJunkie)
- Introduction to Fabric.js: Part 2 (article on ScriptJunkie)
Fabric 與其他 Javascript 畫布庫相比如何?這是比較表.
How does Fabric compare to other Javascript canvas libraries? Here's a comparison table.
這篇關(guān)于HTML canvas JavaScript 庫和框架的最新技術(shù)是什么?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!