flash转html5工具LavaH特性介绍(一)矢量图形高效率无损缩放

小李的飞刀

李杰的个人网站,手机游戏,手机页游

flash转html5工具LavaH特性介绍(一)矢量图形高效率无损缩放

目前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采用的全局图像缓存技术,小鸟的矢量图形会被缓存为位图,当小鸟有放大时,会重新渲染并缓存,因为矢量图形的质量不会因为缩放而变差。

博文最后更新时间:


评论

  • Landon

    Have you got any experience? https://4dretailtech.com/stmap_62vpkwfl.html?tadarise.symmetrel.karela.viagra aygestin birth control reviews Whether you love them or hate them, the peplum is a trend that will never die. They are reliable, versatile, super feminine and always a good fall back if you're having a wardrobe crisis. What's more, with the likes of Miranda Kerr, Kim Kardashian and Jennifer Aniston all championing the look, there's certainly no shortage of wearable inspiration.

  • Jaden

    Very funny pictures https://orpheogroup.com/stmap_94gyirtx.html?viagra.simvastatin.verapamil lansoprazole (prevacid 24hr) and omeprazole (prilosec otc zegerid otc) "I know that as soon as the negotiations start, they will be complex and not easy," Tzipi Livni, the Israeli Cabinet minister in charge of the diplomatic drive, wrote on Facebook. "But I am convinced with all my heart that it is the right thing to do for our future, our security, our economy and the values of Israel."

  • Dwain

    I work for a publishers https://www.qnez.net/stmap_21wizxfu.html?vibramycin.viagra.tentex cefixime research brand in pakistan For Krishna Kumar Yadav, an award-winning telegraphist at the CTO, who retires in 2015, the day of January 25, 2002 still brings memories of "learning the importance of his job" and "finding his own strength".

  • Brant

    I'm a partner in https://www.enlightenedtraining.com/stmap_94gyirtx.html?metoclopramide.bactroban.levitra carbidopa levodopa cost without insurance With Slack, the goal is to eliminate the need for email entirely. That may seem like an idealistic dream land for many people, but Butterfield has been able to accomplish it internally at his companies Slack and at Tiny Speck. â€Within 10 years everyone will use a centralized system for internal communication because email does so poor of a job,” Butterfield says.

  • Brandon

    Free medical insurance https://45so.org/stmap_62kqmdaq.html?tofranil.zoloft.indinavir.cialis how much is wellbutrin sr without insurance Republican Representative Tim Murphy, chairman of a House and Energy Committee panel that will hold a hearing on the problems on Thursday, said the government had "frittered away" more than $300 million in payments to contractors for a website that does not work.

  • Brendon

    I'd like , please https://www.qnez.net/stmap_62vpkwfl.html?viagra.mircette.terramycin.clotrimazole omeprazole 40 mg side effects itching The brothers, Olympic rowers who earned MBA degrees fromOxford University, told regulators in July that they plan to initially sell $20 million worth of shares, with each shareworth a fraction of a Bitcoin. They said they could not speak ingreater detail about their own fund right now.

发表评论

个人资料

姓名:李杰。
爱好:编程,慢跑。
2001年来北京发展,从事软件开发17年。
文曲星Lava语言的创造者。
Iava&LavaX跨平台语言的发明者。
Mirage引擎之父。
手机拳皇97高清版主程序。

联系我

我以前的博客

Email: 39065627@qq.com

博客统计

访问量:19642778

博文总数:14 评论总数:529552

原创14 转载0 翻译0