摘要: 效果图: let center = this.cube.position.clone(), size = this.cube.geometry.boundingBox.getSize(), scale = this.cube.scale; let heightStr = "长度:" + (size. 阅读全文
posted @ 2018-03-28 10:54 善未易明 阅读(2600) 评论(0) 推荐(0) 编辑
摘要: 例:获取cube方向上的面的中点坐标(该cube默认方向为(0,1,0)) (中心点向cube quaternion 方向上发射射线,与正前方的面相交的点即为目标点; 由于ray只支持box和face,所以需要先生成与cube相同的box) let center = cube.position.cl 阅读全文
posted @ 2018-03-28 10:47 善未易明 阅读(1070) 评论(0) 推荐(0) 编辑
摘要: interface LogEntry { data: any time: Date } export class PersistantLog { //最大条数 maxEntries = 3000; isEnabled = false; name = "default_log"; localStora 阅读全文
posted @ 2018-03-28 10:24 善未易明 阅读(370) 评论(0) 推荐(0) 编辑
摘要: function objectEquals(object1: Object, object2: Object): boolean { for (let propName in object1) { if (object1.hasOwnProperty(propName) != object2.hasOwnProperty(propName)) { return false... 阅读全文
posted @ 2018-03-28 10:18 善未易明 阅读(795) 评论(0) 推荐(0) 编辑
摘要: let positions = new Float32Array(points.length * 3); let colors = new Float32Array(points.length * 3); */ 处理positions和colors /* let bufferGeometry=new 阅读全文
posted @ 2018-03-28 10:12 善未易明 阅读(11016) 评论(1) 推荐(0) 编辑
摘要: 以后端传送threejs中的点阵数组为例: 后端: let buffer = Buffer.alloc((points.length + 4) * 4) //points.length + 4:预留前四个数字为其他信息(比如两个数字为一组,或者三个数字为一组) //预留位置 buffer.write 阅读全文
posted @ 2018-03-28 10:00 善未易明 阅读(6953) 评论(0) 推荐(0) 编辑
摘要: 1.用ssh登录远程ubuntu主机 (主机ip为:1.2.3.4;用户名:username) ssh username@1.2.3.4 2.从远程ubuntu主机copy文件/文件夹到本地(scp) (远程文件夹位置:/home/username/test.txt;本地保存目录为: .(当前目录) 阅读全文
posted @ 2018-03-28 09:45 善未易明 阅读(4388) 评论(0) 推荐(0) 编辑