HTML Canvas 上的缩放用户界面

发布于 2024-12-01 12:30:42 字数 354 浏览 6 评论 0原文

碰巧我面临着在 HTML Canvas 上创建 ZUI(缩放用户界面)的任务。此类界面的例子有 Deep Zoom 和微软的 Seadragon。

我正在尝试找到一些库,让我可以创建 ZUI,而无需自己从头开始编写(尽管我已经为 Mac 和 iOS 完成了)。


该库应具有的主要功能:

  1. 将某种“视图”作为基本元素,并分层排列它们
  2. 在视图中绘制矢量图形、文本和图像(可选)
  3. 缩放至 200 倍
  4. 由视图处理的鼠标事件(向上/向下,移动,滚动)

任何建议(即使它们不符合上述条件)都将非常受欢迎,因为我在画布上没有找到任何关于 ZUI 的信息。

It happened that I have faced a task to create a ZUI (zooming user interface) on HTML Canvas. The examples of such interfaces are Deep Zoom and Microsoft's Seadragon.

I'm trying to find some libraries that will allow me to create ZUI without writing it by myself from scratch (though I have already done it for Mac and iOS).


The key features that library should have:

  1. Have some kind of 'views' as basic elements and arrange them hierarchically
  2. Draw vector graphics, text and images(optional) in views
  3. Zooming up to 200x times
  4. Mouse events that are handled by views (up/down, move, scroll)

Any suggestions (even if they don't fit the above conditions) will be very welcomed, as I have found nothing about ZUI on canvas.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦太阳 2024-12-08 12:30:42

这可能会帮助您开始:https://github.com/florianguenther/zui53

ZUI53 是一个 JavaScript 库,用于创建强大的基于 Web 的 Zoomable
采用 HTML5 和 CSS3 等新技术的用户界面 (ZUI)。

还有OpenSeadragon,但我不确定它是否使用Canvas。

This might get you started: https://github.com/florianguenther/zui53

ZUI53 is a JavaScript Library to create powerful web-based Zoomable
User Interfaces (ZUIs) with new technologies like HTML5 and CSS3.

There is also OpenSeadragon, but I'm not sure if it uses Canvas.

零時差 2024-12-08 12:30:42

你看过 Zoomooz 吗?

Zoomooz 是一个用于使网页元素缩放的 jQuery 插件。它可用于制作类似幻灯片的 Prezi 以及缩放图像或其他细节。

http://janne.aukia.com/zoomooz

您可以使用它来缩放到任何 DOM 元素。不过,使用 SVG 比使用 Canvas 效果更好,因为放大时 Canvas 会显示像素化。

Have you had a look at Zoomooz?

Zoomooz is a jQuery plugin for making web page elements zoom. It can be used for making Prezi like slideshows and for zooming to images or other details.

http://janne.aukia.com/zoomooz

You can use it to zoom to any DOM element. Works better with SVG than with Canvas though, since Canvas would show pixelated when zoomed in.

天煞孤星 2024-12-08 12:30:42

你看过Piccolo2d似乎可以满足你的大部分要求。观看 Geneaquilts 的视频,了解他们如何将其用于界面。

Have you looked at Piccolo2d seems to meet most of your requirements. Have a look at the video from Geneaquilts that shows how they used it for there interface.

爱要勇敢去追 2024-12-08 12:30:42

还有 Taaspace.js 使用 HTML 和 CSS3,但不使用 Canvas。 Taaspace 试图抽象出所有不同的输入方法,使其与触摸屏设备等兼容。您可以查看此示例应用程序。

There is also Taaspace.js that uses HTML and CSS3 but not Canvas. Taaspace tries to abstract out all the different input methods, making it compatible with for example touch screen devices. You could check out this example application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文