webgl学习路线_WebGL:WebAssembly和功能路线图

Google、Microsoft和Mozilla正合作开发WebAssembly,这是一种能显著减小Unity WebGL代码大小、提高下载速度和解析效率的技术,从而改善大型JavaScript代码库的启动时间和内存需求。Unity计划在浏览器支持时切换到WebAssembly字节码,预期将带来显著的性能优化。
摘要由CSDN通过智能技术生成

webgl学习路线

Yesterday, engineers from Google, Microsoft and Mozilla (makers of Chrome, Edge and Firefox) announced that they are working on a new cross-browser technology called WebAssembly. This is very exciting news, as this will greatly help improve the Unity WebGL experience.

昨天,来自GoogleMicrosoftMozilla (Chrome,Edge和Firefox的制造商)的工程师宣布,他们正在开发一种称为WebAssembly的跨浏览器新技术。 这是非常令人振奋的消息,因为这将极大地改善Unity WebGL的体验。

Although it is technically defined as a new, independent standard, from our perspective, WebAssembly is essentially a bytecode format for the asm.js JavaScript subset (asm.js is used to deploy Unity code to WebGL). Compared to the currently used text-based representation, the bytecode format is significantly reducing the size footprint of code compiled to asm.js. This leads to faster downloads of code, and, more importantly, to being able to parse and compile the code much faster and using much less memory. This will improve the startup times of large compiled JavaScript codebases, and reduce their memory requirements — both of which are currently some of the more common issues developers face when targeting the WebGL platform.

尽管从技术上讲,WebAssembly在技术上被定义为一个新的独立标准,但从本质上讲,它是asm.js JavaScript子集的字节码格式(asm.js用于将Unity代码部署到WebGL)。 与当前使用的基于文本的表示形式相比,字节码格式显着减少了编译为asm.js的代码的大小。 这样可以更快地下载代码,更重要的是,可以更快地解析和编译代码并使用更少的内存。 这将缩短大型已编译JavaScript代码库的启动时间,并减少它们的内存需求-这都是开发人员在针对WebGL平台时面临的一些较常见问题。

We plan to switch Unity WebGL to output WebAssembly bytecode once the feature becomes available in browser releases. On browsers which don’t natively support the feature, the bytecode can very efficiently be translated to text-based asm.js code using JavaScript – which in most cases still results in faster content load times due to the download time improvements.

一旦该功能在浏览器版本中可用,我们计划将Unity WebGL切换为输出WebAssembly字节码。 在本机上不支持该功能的浏览器上,可以使用JavaScript将字节码非常有效地转换为基于文本的asm.js代码-在大多数情况下,由于下载时间有所缩短,因此仍然可以缩短内容加载时间。

Experimenting with a prototype WebAssembly format on a build of our AngryBots demo, we saw the size of the generated JavaScript code go from 19.0 MB of asm.js code (gzip-compressed to 4.1 MB) down to 6.3 MB of WebAssembly code (gzip-compressed to 3.0 MB). This means that the amount of data the browser needs to process gets reduced by 3.0x, and the compressed download size gets reduced by 1.4x. Actual results may change based on the project used, but we expect to see very relevant improvements to anyone caring about WebGL deployment in Unity.

在我们的AngryBots演示的构建中尝试使用原型WebAssembly格式,我们看到生成JavaScript代码的大小从19.0 MB的asm.js代码(从gzip压缩到4.1 MB)下降到6.3 MB的WebAssembly代码(gzip-压缩到3.0 MB)。 这意味着浏览器需要处理的数据量减少了3.0倍,压缩下载大小减少了1.4倍。 实际结果可能会根据所使用的项目而有所不同,但我们希望对关心Unity中的WebGL部署的任何人都能看到非常相关的改进。

For more information on WebAssembly, see the FAQ here.

有关WebAssembly的更多信息,请参见FAQ

In light of this announcement, we would like to give further updates on the current status of our WebGL efforts, and on ecosystem changes we expect to happen over the next year — and on things we plan to be working on, which includes further build size improvements, SIMD.js, Shared Array Buffers (which bring threading support to JavaScript) and WebGL 2.0. So, I’d like to invite you to check out and discuss our WebGL Roadmap forum post, which has a lot of additional information.

根据此公告,我们希望进一步了解WebGL工作的当前状态以及我们预计明年将发生的生态系统变化以及我们计划进行的工作,其中包括进一步的构建规模改进,SIMD.js,共享数组缓冲区(为JavaScript带来线程支持)和WebGL 2.0。 因此,我想邀请您签出并讨论我们的WebGL Roadmap论坛帖子 ,其中包含许多其他信息。

If you are at Unite Europe in Amsterdam next week, check out my WebGL talk on Wednesday, or visit me at the hands-on labs to ask questions.

如果您下周在阿姆斯特丹的Unite Europe ,请查看我在周三进行的WebGL演讲,或者在动手实验室中访问我提出问题。

翻译自: https://blogs.unity3d.com/2015/06/18/webgl-webassembly-and-feature-roadmap/

webgl学习路线

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值