简体   繁体   English

HTML5中的旋转轮图像(例如轮盘赌轮)?

[英]Spin wheel image in HTML5 (e.g., roulette wheel)?

What's the best way to emulate a spinning roulette wheel in HTML5? 在HTML5中模拟旋转轮盘的最佳方法是什么?

The wheel spinning should be controllable by some input (ie, speed of spinning based on some user input). 车轮旋转应该可以通过一些输入来控制(即,基于一些用户输入的旋转速度)。 The wheel labels should blur as the wheel spins fast, but as the spinning slows, the labels on the wheel become more and more readable. 当车轮快速旋转时,车轮标签应该模糊,但随着旋转速度减慢,车轮上的标签变得越来越可读。

Are there HTML5 libraries that support this, or do the animations need to be programmed by hand? 是否有HTML5库支持这一点,或者动画是否需要手动编程?

This also needs to be supported on iOS devices. 这也需要在iOS设备上支持。

It can be done in a few lines of CSS. 它可以在几行CSS中完成。

Blurring is an optical effect, it doesn't need to be simulated. 模糊是一种光学效应,它不需要模拟。

If anyone is interested in doing this using Javascript and HTML5 canvas, see http://www.dougtesting.net/winwheel/index.html for an example. 如果有人对使用Javascript和HTML5画布这样做感兴趣,请参阅http://www.dougtesting.net/winwheel/index.html以获取示例。 Cool thing is the code is available for download too. 很酷的是代码也可以下载。

You can use jfortune, it is a jquery plugin. 你可以使用jfortune,它是一个jquery插件。 https://github.com/tehsis/jfortune https://github.com/tehsis/jfortune

And I know that this could be a bit different from a round/wheel roulette perspective... but fancy-jqyery-plugin looks very interesting and customizable. 而且我知道这可能与轮/轮盘轮视角略有不同......但是fancy-jqyery-plugin看起来非常有趣且可定制。

http://www.jqueryscript.net/animation/Fancy-jQuery-Plugin-For-Roulette-Image-roulette-js.html http://www.jqueryscript.net/animation/Fancy-jQuery-Plugin-For-Roulette-Image-roulette-js.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM