微信小程序转盘抽奖
简介
用微信小程序开发的Canvas绘制可配置的转盘抽奖。
使用https://github.com/givebest/GB-canvas-turntable代码移植过而来。
其它
微信小程序感觉是个半成品,代码移植过程比较繁琐麻烦。canvas
API 部分都被重写了。。。
canvas
z-index
不生效,永远在最上层,不支持rotate
动画。
用微信小程序开发的Canvas绘制可配置的转盘抽奖。
Home Page: https://blog.givebest.cn/GB-canvas-turntable.html
License: MIT License
用微信小程序开发的Canvas绘制可配置的转盘抽奖。
使用https://github.com/givebest/GB-canvas-turntable代码移植过而来。
微信小程序感觉是个半成品,代码移植过程比较繁琐麻烦。canvas
API 部分都被重写了。。。
canvas
z-index
不生效,永远在最上层,不支持rotate
动画。
纯CSS实现起来还是比较麻烦的。
可以使用canvas描绘好的图,生成一张临时图片。
canvas标签用定位移除可视范围。
还有你用的canvas API有一些准备移除了。
以下这些小程序准备移除
wx.createContext
wx.drawCanvas
getLottery: function () {
var that = this
var awardIndex = Math.random() * awardLength >>> 0;
// 获取奖品配置
var awardsConfig = app.awardsConfig,
runNum = awardLength+2
if (awardIndex < 2) awardsConfig.chance = false
console.log(awardIndex)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.