上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要: objects=[]; raycaster = new THREE.Raycaster(); mouse = new THREE.Vector2(); //监听全局点击事件,通过ray检测选中哪一个object document.addEventListener("mousedown", (even 阅读全文
posted @ 2018-01-18 10:54 善未易明 阅读(13660) 评论(0) 推荐(1) 编辑
摘要: let oldController;//已知的一个controller //初始化旋转(鼠标左键的操作) let position=oldController.object.position; camera.position.set(position.x,position.y,position.z) 阅读全文
posted @ 2018-01-17 16:53 善未易明 阅读(3507) 评论(0) 推荐(0) 编辑
摘要: 画圆: var radius = 40, segments = 64, material = new THREE.LineBasicMaterial({ color: 0x0000ff }), geometry = new THREE.CircleGeometry(radius, segments) 阅读全文
posted @ 2018-01-16 18:02 善未易明 阅读(7510) 评论(0) 推荐(0) 编辑
摘要: 先看看这张图: 重点其实是background-image CSS边距属性定义元素周围的空间。通过使用单独的属性,可以对上、右、下、左的外边距进行设置。也可以使用简写的外边距属性同时改变所有的外边距。——W3School边界(margin):元素周围生成额外的空白区。“空白区”通常是指其他元素不能出 阅读全文
posted @ 2017-12-28 10:28 善未易明 阅读(1291) 评论(0) 推荐(1) 编辑
摘要: 1.所有的元素上都能绑定放置目标的事件,但并不保证此元素是有效的放置对象。 默认情况下,IE中只有文本框(<input/>或<textarea/>)是网页上唯一有效的放置目标。 若想让其他元素变成有效的放置目标,则需要阻止dragenter和dragover事件的默认行为,因为这些只适用于IE。 方 阅读全文
posted @ 2017-12-27 16:38 善未易明 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 1. 基本查询: 构造查询数据。 > db.test.findOne() { "_id" : ObjectId("4fd58ecbb9ac507e96276f1a"), "name" : "stephen", "age" : 35, "genda" : "male", "email" : "step 阅读全文
posted @ 2017-12-11 16:43 善未易明 阅读(163) 评论(0) 推荐(0) 编辑
摘要: hsv/hsb转rgb颜色 uuid function uuid() { function S4() { return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1) } return (S4() + S4() + "- 阅读全文
posted @ 2017-12-01 16:39 善未易明 阅读(1043) 评论(0) 推荐(0) 编辑
摘要: createRandomColor() { let color = Math.floor((Math.random() * 256 * 256 * 256)).toString(16) while (color.length < 6) {//随机生成的可能只有3-6位字符串 color += Math.floor((Math.random() * 16)).toString(16) ... 阅读全文
posted @ 2017-11-29 11:50 善未易明 阅读(373) 评论(0) 推荐(0) 编辑
摘要: checkbox: .checkbox { display: inline-block; cursor: pointer; input[type="checkbox"] { appearance: none; -webkit-appearance: none; outline: none; disp 阅读全文
posted @ 2017-11-27 17:06 善未易明 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 安装发行稳定版 Ubuntu 默认仓库里带有Node.js,版本较旧,这并不是最新版,但是应该很稳定。执行如下命令: 1 2 sudo apt-getupdate sudo apt-getinstall nodejs 1 2 sudo apt-getupdate sudo apt-getinstal 阅读全文
posted @ 2017-11-21 15:58 善未易明 阅读(2110) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页