- 注册时间
- 2016-3-25
- 最后登录
- 2017-4-13
- 阅读权限
- 20
- 积分
- 106
- 精华
- 0
- 帖子
- 21
|
本帖最后由 wpfcsbh 于 2016-8-6 10:23 编辑
有些小疑问,博客上次有人提问都是13年了,所以就把疑问发在这里- Rect.prototype.draw = function(layer){
- this.graphics.clear();
- this.graphics.drawVertices(1,"#000000",[this.getPoint(this.pointA),this.getPoint(this.pointB),this.getPoint(this.pointC),this.getPoint(this.pointD)],true,this.color);
- };
复制代码 关于这个draw方法,drawVertices()方法传入的坐标可以是3D的吗,平常我使用都是传入[x,y],但是这里用到的时候是[x,y,z]
顺便这个例子只是做出了正方体,,只有8个顶点
如果我想做球体或者圆锥之类的要怎么办呢,毕竟球体的面上每个点都可以算顶点了 |
|