本文介绍了精灵动画Javascript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有支持像苹果 Mac OS X Dock 这样的精灵"动画效果的 jQuery 插件或 javascript 库?

Is there a jQuery plugin or javascript library that supports a "genie" animation effect like the apple Mac OS X dock?

奖励:Actionscript 库?C/C++?.网?目标C?

Bonus: Actionscript library? C/C++? .NET? Objective C?

推荐答案

我不知道.精灵"效果是 CSS 无法实现的扭曲:CSS 转换(包括 IE 的矩阵过滤器)使您可以在两个轴、旋转和剪切上调整大小.WebKit 还为您提供线性视角.使用这些工具无法再现像精灵这样的弯曲变形.

Not that I know of. The ‘genie’ effect is a distortion that cannot be achieved with CSS: CSS transformations (including IE's matrix filter) give you resizing on both axes, rotation and shear. WebKit additionally gives you linear perspectives. Curvy distortions like genie can't be reproduced with those tools.

要在 JavaScript 中执行此操作,您必须将图像(或其他元素,如果您确实雄心勃勃)拆分为每像素一行,然后使用 CSS 转换水平压缩.渲染效率极低,而且可能看起来生涩、闪烁以及令人不快的混叠.

To do it in JavaScript you'd have to split the image (or other element if you are really ambitious) into one line per pixel and squash horizontally using a CSS transformation. It would be horribly inefficient to render and would probably look jerky and flickery as well as unpleasantly aliased.

这篇关于精灵动画Javascript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 17:10