Comments (3)
this.$refs.LuckyWheel.stop(Math.random() * 8 >> 0)
这个结束的速度太快了,我想给用户一点刺激的紧迫感,应该如何改源码呢,没找到哎,谢谢亲
源码基于TS编译:lucky-canvas
在 slowDown
方法里使用了张鑫旭大佬的 tween.js
的二次方缓动函数来实现的停止逻辑
from lucky-canvas.
我更建议你使用defaultConfig.decelerationTime
来微调缓慢停止时间,建议范围1000 ~ 5000
用着顺手可以点个 star 支持一下
from lucky-canvas.
我更建议你使用
defaultConfig.decelerationTime
来微调缓慢停止时间,建议范围1000 ~ 5000
用着顺手可以点个 star 支持一下
谢谢大佬,可以了
from lucky-canvas.
Related Issues (20)
- 大转盘点击抽奖后背景图片消失 HOT 3
- react,老虎机用图片没显示
- 建议!可以给 buttons 添加 点击动画吗?
- 项目安装依赖不成功 HOT 1
- range属性用法不太明白 HOT 5
- 作者你好,@lucky-canvas/vue 不支持按需引入吗?
- 运行环境为Taro v3.6.8,报错
- 九宫格uniapp小程序体验版真机报错 HOT 1
- 怎样让 `LuckyWheel` 组件的 prizes 文字径向显示而非换行 HOT 2
- @lucky-canvas/react 版本0.1.13不支持2k和4k屏中背景图片满屏铺吗?
- 希望uni-app 的版本支持下自定义转盘的rpxCalcMaxDeviceWidth HOT 1
- vue升级2.7的时候此组件不能用了,会报@vue/composition-api 2.7警告 HOT 1
- TypeError: Failed to execute 'putImageData' on 'CanvasRenderingContext2D' HOT 4
- 老虎机奖品图片有高度限制
- 在swiper中,effect(切换效果)设置为‘fade’,点击大转盘开始按钮,事件不会触发 HOT 2
- react 18 import error
- 功能提示 HOT 2
- Vue3.X版本 依赖有问题 The requested module 'vue-demi' does not provide an export named 'computed' HOT 2
- 关于原生微信小程序buttons渲染问题 HOT 1
- react 项目引入依赖有报错警告
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lucky-canvas.