Comments (2)
自己解决了:
不能将wxCanvas
放在data
里,直接作为类属性即可(如下),data
下的变量会被脏检查(此时会遇到问题)
import wepy from 'wepy'
import { wxDraw as WxDraw, Shape } from '../plugins/wxdraw'
export default class Index extends wepy.page {
wxCanvas = null
onLoad() {
const context = wx.createCanvasContext('effectCanvas')
this.wxCanvas = new WxDraw(context, 0, 0, 400, 500)
}
}
from wxdraw.
在wepy中,试用了画一个rect并加动画,正常;
改为画一个图片,无显示,没有报错,不知道原因;
在同一个canvas画两个rect, 其中一个设了动画,只显示了设动画的那个,且动画不进行,另一个则不显示,原因未明;
第一次使用wxDraw,求助 @bobiscool @Blueria
from wxdraw.
Related Issues (20)
- 用wxdraw开发小程序游戏遇到了问题,望解答
- disable-scroll=true 导致无法加载 HOT 2
- 图形的destroy方法,在setimeout中且计时大于1000时无效
- 栈溢出 HOT 1
- 图案无法拖拽
- 矩形边框怎么实现匀速蚂蚁线效果
- example导入微信开发者工具后报错是什么原因
- 动画不能第二次调用的 HOT 1
- requestAnimationFrame 支持了吗 HOT 1
- mpvue 框架里 引用 new wxDraw 报错 HOT 2
- 在mix混合绘制下,我想给绘制的图片加一个边框,怎么利用updateOption加不上去
- 文字粗细,字体不能设置么? HOT 1
- H5中可以使用吗? HOT 1
- jsEnginScriptError Converting circular structure to JSON TypeError: Converting circular structure to JSON HOT 5
- updateOption更新线条颜色跟线条段落(增加或者减少线条) HOT 1
- 可以用这个做一个热力图吗
- 项目没有更新了吗?
- 按照说明引入了mxdraw.min.js初始化后提示这些 HOT 3
- 官网进不去?还是需要科学上网? HOT 4
- 如何画一个圆行的图片 HOT 1
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 wxdraw.