Getting Started With WebGL - Web APIs - W3cubDocs
文章推薦指數: 80 %
WebGL enables web content to use an API based on OpenGL ES 2.0 to perform 2D and 3D rendering in an HTML canvas in browsers that support it without the use ... GettingstartedwithWebGL Next»WebGLenableswebcontenttouseanAPIbasedonOpenGLES2.0toperform2Dand3DrenderinginanHTMLcanvasinbrowsersthatsupportitwithouttheuseofplug-ins.WebGLprogramsconsistofcontrolcodewritteninJavaScriptandshadercode(GLSL)thatisexecutedonacomputer'sGraphicsProcessingUnit(GPU).WebGLelementscanbemixedwithotherHTMLelementsandcompositedwithotherpartsofthepageorpagebackground.ThisarticlewillintroduceyoutothebasicsofusingWebGL.It'sassumedthatyoualreadyhaveanunderstandingofthemathematicsinvolvedin3Dgraphics,andthisarticledoesn'tpretendtotrytoteachyou3Dgraphicsconceptsitself.Thecodeexamplesinthistutorialcanalsobefoundinthewebgl-examplesGitHubrepository.It'sworthnotingherethatthisseriesofarticlesintroducesWebGLitself;however,thereareanumberofframeworksavailablethatencapsulateWebGL'scapabilities,makingiteasiertobuild3Dapplicationsandgames,suchasTHREE.jsandBABYLON.js. Preparingtorenderin3D ThefirstthingyouneedinordertouseWebGLforrenderingisacanvas.TheHTMLfragmentbelowdeclaresacanvasthatoursamplewilldrawinto.
延伸文章資訊
- 1Day 9 : WebGL初探 - iT 邦幫忙
WebGL又是基於OpenGL ES而發展的函式庫,所以可以說只要是OpenGL 2.0版本運行ok的程式碼,應該就 ... WebGL 是JavaScript API, 內容都寫在HTML5 ...
- 2Internet Explorer 11 中WebGL 呈現工具的改良功能
在硬體模式中Windows WebGL 呈現器之7 SP1 的Web 驅動程式更新。 關於WebGL 呈現器. WebGL 是JavaScript API,可讓開發人員為遊戲 ...
- 3Getting Started With WebGL - Web APIs - W3cubDocs
WebGL enables web content to use an API based on OpenGL ES 2.0 to perform 2D and 3D rendering in ...
- 4WebGL API文档 - 郭隆邦技术博客
通过canvas画布对象的方法getContext()可以获得一个webgl的上下文,WebGL API的所有函数都是执行getContext()方法返回对象的方法, Javascript语言可...
- 53D 網站開發入門筆記_WebGL 觀念
WebGL 基於OpenGL ES 2.0,OpenGL ES(OpenGL for Embedded Systems 的縮寫)是OpenGL3D 圖形API 的子集,針對手機、PDA 和遊戲主...