小程序API(1.5)利用scale() 、translate()和rotate()函数实现对图形的缩放、平移和旋转
摘要:<!--pages/index.wxml--> <view class='box'> <view class='title'>变形</view> <view class='style01'> <canvas canvas-id='myCanvas'></canvas> </view> <view c
阅读全文
小程序API(1.4)利用draw()函数实现参数化绘图
摘要:<!--pages/index.wxml--> <view class='box'> <view class='title'>参数绘图</view> <view class='style01'> <canvas canvas-id='myCanvas'></canvas> </view> <view
阅读全文
小程序API(1.3)创建绘图上下文,并利用绘图上下文绘制图形和设置图形样式
摘要:<!--pages/index.wxml--> <view class="box"> <view class='title'>基本绘图</view> <view> <canvas canvas-id="myCanvas" ></canvas> </view> <view class='btnLayo
阅读全文
小程序API(1.2)利用for循环计算阶乘的方法
摘要:<!--pages/index.wxml--> <view class="box"> <view class='title'>阶乘计算器</view> <input type='number' bindinput='getInput' placeholder='请输入要求阶乘的数'></input>
阅读全文
小程序API(1.1)监听移动设备加速度变化的事件函数wx.onAccelerometerChange的使用
摘要:摇晃手机事件 点击或者摇晃手机,变脸 <!--pages/index.wxml--> <view class='box'> <view class='title'>变脸游戏</view> <view> <image src="{{imgArr[index]}}" bindtap="changeFac
阅读全文