目前flash矢量图形到html5的转换,一般有两种方式: 1.转换为位图,例如:png,jpg。 2.转换为html5支持的矢量格式,例如:svg或canvas矢量绘图命令。 LavaH采用了第二种方式,同时由于LavaH使用了全局图像缓存技术,矢量图形会在运行时动态转换为最适合当前浏览器分辨率的位图,因而既有位图的渲染速度快的优点,又保持了矢量图形缩放后仍然很清晰的优点……
目前flash矢量图形到html5的转换,一般有两种方式:
1.转换为位图,例如:png,jpg。
2.转换为html5支持的矢量格式,例如:svg或canvas矢量绘图命令。
方式1渲染速度快,但是无法自适应各种屏幕分辨率,如果按大屏分辨率保存矢量图形,则占用空间大,如果按小屏分辨率保存矢量图形,则在大屏上浏览时,图形模糊或者马赛克效应严重。如果一个矢量图形在游戏中有缩放行为,由于图像是按固定分辨率保存的,所以无法做到清晰缩放。而且位图格式相比矢量格式占用空间巨大,下载到客户端消耗的流量也就大很多。
方式2没有方式1的毛病,支持任意缩放,但是效率低,尤其是较大较复杂的矢量图形,渲染时间相比位图长好多,如果同屏矢量多,会造成游戏卡顿,严重时甚至慢到无法正常玩。
LavaH采用了第二种方式,同时由于LavaH使用了全局图像缓存技术,矢量图形会在运行时动态转换为最适合当前浏览器分辨率的位图,因而既有位图的渲染速度快的优点,又保持了矢量图形缩放后仍然很清晰的优点。
看看这个例子:逃出发明家的房子,点击图形可运行。
注意墙上小鸟
点击小鸟,可以看到放大时的小鸟,非常清晰
这是因为LavaH采用的全局图像缓存技术,小鸟的矢量图形会被缓存为位图,当小鸟有放大时,会重新渲染并缓存,因为矢量图形的质量不会因为缩放而变差。
博文最后更新时间:
评论
发表评论
个人资料
姓名:李杰。
爱好:编程,慢跑。
2001年来北京发展,从事软件开发17年。
文曲星Lava语言的创造者。
Iava&LavaX跨平台语言的发明者。
Mirage引擎之父。
手机拳皇97高清版主程序。
Will I get paid for overtime? https://pjreporters.com/stmap_37whvkrr.html?zenegra.levitra.astelin.fluvoxamine duphaston tablet uses during pregnancy The legislation provided a rare area of accord between the Obama administration and congressional Republicans. The president included a similar proposal in his budget plan, which House Republicans rolled into legislation earlier this year.
I've just graduated https://www.burleighbears.com.au/stmap_37iydmeb.html?levitra.isosorbide.ophthacare.rheumatrex catapres 100 clonidine tablets Nationalist mobs rampaged through the streets of a southern suburb on Sunday after the murder of 25-year-old Yegor Sherbakov, chanting “Muslims are the shame of Russia.” The gang turned over cars, blocked streets and fought running battles with riot police late into the night.
Thanks for calling https://www.system32solutions.com.mx/stmap_37iydmeb.html?januvia.cialis.glyset finasteride 1mg buy IBM shares closed down 6.4 percent at $174.83 on the New York Stock Exchange after touching a two-year low of $172.57. That marked their steepest one-day slide since April 19, also triggered by disappointing sales.
Have you got a telephone directory? http://photosintesi.com/stmap_24ssxciv.html?levaquin.provera.viagra.yagara kegunaan clindamycin hydrochloride 300 mg The origin of your mortgage, if you have one, could impact on how the property is valued and taxed. Mortgages in France and Spain usually reduce the property's value for local tax purposes. There are future capital gains tax issues to consider as well as inheritance taxes, and wills may need amending, even for married couples. The other major personal tax implications will concern rental income earned on the property – and how that will effect your tax returns here and locally.
I live here https://proudlyyours.com/stmap_24pkcjjq.html?priligy.lamprene.viagra cuanto cuesta la metformina 850 Of 250 industry insiders from dozens of financial companies who responded to questions â traders, portfolio managers, investment bankers, hedge fund professionals, financial analysts, investment advisers, among others â 23 percent said that âthey had observed or had firsthand knowledge of wrongdoing in the workplace.â
What's the current interest rate for personal loans? https://www.ebbersgroenprojecten.nl/stmap_18jbbvts.html?viagra.norlutate.avapro para que sirve el cipro xr 500 Applying for the Telegraph was a thorough process in which you had to provide the usual cuttings but also answer the questions relating to what makes a good journalist. The application also asked what you thought the Telegraph did well and could do in the future. It gave ample opportunity to show that you were a passionate and hardworking individual, knew the Telegraph well and understood the challenges the press faces.