ITKeyword,专注技术干货聚合推荐

注册 | 登录

解决ajax - HTML5 canvas with Processing vs. Pure Javascript

itPublisher 分享于

2021腾讯云限时秒杀,爆款1核2G云服务器298元/3年!(领取2860元代金券),
地址https://cloud.tencent.com/act/cps/redirect?redirect=1062

2021阿里云最低价产品入口+领取代金券(老用户3折起),
入口地址https://www.aliyun.com/minisite/goods

推荐:Guacamole - an HTML5 + JavaScript (AJAX) viewer for VNC

http://guacamole.sourceforge.net/   What is Guacamole   Guacamole 0.1.5, served by an Amazon EC2 instance.   Guacamole is an HTML5 + JavaScript (AJAX

I have some data visualization animations I want to do in a webapp I have and am considering different alternatives I have. It will basically just be moving around text strings in a pretty way.

I am using the Mootools framework and the Mootools FX library basically have the stuff i want, but I want to manipulate around 100 text strings, which means each string would need a separate FX object (I think).

The alternative to doing this is coding the entire thing in Processing and use Processing.js to render it to an HTML5 canvas.

Which of these things go easiest on the browser (I don't want the site to be client-side heavy)? Are there any other ways that might be even better?

javascript ajax html5 mootools processing
|
  this question
asked Aug 20 '09 at 20:44 Fredrik 2,731 8 20 28 1   Processing.js is easiest on the browser as per my experience. Nice question,BTW. –  Mahesh Sep 20 '09 at 15:19

 | 

4 Answers
4

解决方法

Or use client-side SVG. It should have no problems displaying and manipulating 100 text strings, and is supported in much the same browsers as Canvas is (and IE supports VML, which provides similar functionality).

@austin, Apache Batik is a server-side SVG renderer.


|
  this answer
answered Aug 21 '09 at 7:36 Laurens Holst 1   I have found a great JS library to render client-side SVG, so I will end up using that :) Link: raphaeljs.com –  Fredrik Sep 22 '09 at 18:43

 | 

I would not adopt for support of the canvas element at this time since only the newest version of most browsers support it. I would wait until support is common, which could take a little while. Keep in mind HTML5 is not a standard yet, and is still subject to change.

推荐:HTML5 Canvas简单动画:圆周运动

一个简单的动画:两个点在两个圆上运动。页面中有两个canvas,有一个背景设置为透明。 欢迎访问博主的网站: http://www.108js.com/link.html 效果图: <!DOCTYPE

You might want to research SVG and see if there is a server side SVG parser where the output could be converted to PNG.


|
  this answer
answered Aug 20 '09 at 23:11 austin cheney 1   Older versions of most browsers (excluding IE) support canvas. –  Eli Grey Aug 21 '09 at 1:58      The page in question would be on the Admin side of the app, so I can in that way guarantee that all admins will run the latest Safari och FF build. –  Fredrik Aug 21 '09 at 7:51

 | 

Processing is just Java, by the way, so you should be able to just write it in that and display it in an applet.


|
  this answer
answered Aug 20 '09 at 23:17 Noon Silk 41.1k 4 74 95 1   He's talking about Processing.js, which is Processing rewritten in JavaScript (if he really wanted to use a plugin, I'd argue that Flash might be a better choice). –  Kim Sullivan Sep 2 '09 at 20:03 1   bonks @Noon with processingjs.org - just reached v1.00 last week! –  ina Nov 21 '10 at 21:52

 | 

Why not actionscript 3, at this point there is a wider penetration of the flash player than support for html 5.


|
  this answer
answered Aug 20 '09 at 23:57 WillyCornbread 627 10 21 1   This is true, but Flash seems to be quite crash prone and have always (maybe because I code bad actionscript) consumed a lot of memory and CPU. The page will be displayed continuously for several hours. –  Fredrik Aug 21 '09 at 7:53      yes you code bad actionscript;) –  eco_bach Apr 25 '12 at 18:01

 | 

推荐:HTML5 Canvas动画模板

   创建HTML5的画布动画,我们可以使用requestAnimFrame()方法使浏览器以确定最佳的FPS为我们更新动画。对于每一个动画帧,我们可以更新在画布上的元素, 清除画


相关阅读排行


相关内容推荐

最新文章

×

×

请激活账号

为了能正常使用评论、编辑功能及以后陆续为用户提供的其他产品,请激活账号。

您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱

如果您没有收到激活邮件,请注意检查垃圾箱。