会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
善未易明
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
···
9
下一页
2018年1月18日
threejs Object的点击(鼠标)事件(获取点击事件的object)
摘要: objects=[]; raycaster = new THREE.Raycaster(); mouse = new THREE.Vector2(); //监听全局点击事件,通过ray检测选中哪一个object document.addEventListener("mousedown", (even
阅读全文
posted @ 2018-01-18 10:54 善未易明
阅读(13862)
评论(0)
推荐(1)
2018年1月17日
THREE.OrbitControls初始化设置位移/旋转/滚轮
摘要: let oldController;//已知的一个controller //初始化旋转(鼠标左键的操作) let position=oldController.object.position; camera.position.set(position.x,position.y,position.z)
阅读全文
posted @ 2018-01-17 16:53 善未易明
阅读(3561)
评论(0)
推荐(0)
2018年1月16日
threejs 画二维圆(圆弧)
摘要: 画圆: var radius = 40, segments = 64, material = new THREE.LineBasicMaterial({ color: 0x0000ff }), geometry = new THREE.CircleGeometry(radius, segments)
阅读全文
posted @ 2018-01-16 18:02 善未易明
阅读(7603)
评论(0)
推荐(0)
2017年12月28日
何时使用padding和margin
摘要: 先看看这张图: 重点其实是background-image CSS边距属性定义元素周围的空间。通过使用单独的属性,可以对上、右、下、左的外边距进行设置。也可以使用简写的外边距属性同时改变所有的外边距。——W3School边界(margin):元素周围生成额外的空白区。“空白区”通常是指其他元素不能出
阅读全文
posted @ 2017-12-28 10:28 善未易明
阅读(1325)
评论(0)
推荐(1)
2017年12月27日
IE中拖放问题
摘要: 1.所有的元素上都能绑定放置目标的事件,但并不保证此元素是有效的放置对象。 默认情况下,IE中只有文本框(<input/>或<textarea/>)是网页上唯一有效的放置目标。 若想让其他元素变成有效的放置目标,则需要阻止dragenter和dragover事件的默认行为,因为这些只适用于IE。 方
阅读全文
posted @ 2017-12-27 16:38 善未易明
阅读(345)
评论(0)
推荐(0)
2017年12月11日
mongodb查询(转载)
摘要: 1. 基本查询: 构造查询数据。 > db.test.findOne() { "_id" : ObjectId("4fd58ecbb9ac507e96276f1a"), "name" : "stephen", "age" : 35, "genda" : "male", "email" : "step
阅读全文
posted @ 2017-12-11 16:43 善未易明
阅读(173)
评论(0)
推荐(0)
2017年12月1日
js helper(hsv/hsb转rgb颜色,uuid,金额小写转大写)
摘要: 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 善未易明
阅读(1086)
评论(0)
推荐(0)
2017年11月29日
随机生成16位颜色
摘要: 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 善未易明
阅读(399)
评论(0)
推荐(0)
2017年11月27日
css 小技巧
摘要: checkbox: .checkbox { display: inline-block; cursor: pointer; input[type="checkbox"] { appearance: none; -webkit-appearance: none; outline: none; disp
阅读全文
posted @ 2017-11-27 17:06 善未易明
阅读(104)
评论(0)
推荐(0)
2017年11月21日
ubuntu 安装nodejs/npm
摘要: 安装发行稳定版 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 善未易明
阅读(2164)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
9
下一页
公告