代码
const stats = new Stats()
document.body.appendChild(stats.domElement)
function render() {
stats.update()
mesh.rotateY(0.01); //周...
yekong
2年前 (2023-01-15)
喜欢
threejs渲染输出的结果就是一个Cavnas画布,canvas画布也是HTML的元素之一,这意味着three.js渲染结果的布局和普通web前端习惯是一样的。
通过renderer.domElement属性可以访问threejs的渲染结果,也就是HTML的元素 canvas
...
yekong
2年前 (2023-01-15)
喜欢
threejs可以借助HTML5的API请求动画帧window.requestAnimationFrame实现动画渲染。
// requestAnimationFrame实现周期性循环执行
// requestAnimationFrame默认每秒钟执行60次,但不一定能做到,要看...
yekong
2年前 (2023-01-15)
喜欢
js创建div并添加绑定点击事件
var button = document.createElement("div"); //创建一个div
//给这个div添加样式
button.style.cssText = "width:100%...
yekong
2年前 (2023-01-11)
喜欢
常见的3D建模软件有3damx、blender、maya
blender(轻量开源)
...
yekong
2年前 (2023-01-10)
喜欢
document.addEventListener('click', (event) => {
// do something
})
鼠标类
click 点击
mousedown 按下
mouseup 松开
mouseenter 划进
mouseleave 划出
mo...
yekong
2年前 (2023-01-06)
喜欢
最近在找一些threejs效果实例学习看到一个站点的效果感觉做的很漂亮,收藏记录一下。
效果地址
效果地址
github
github
...
yekong
2年前 (2023-01-06)
喜欢
问题
从github拉下来的threejs实例项目,使用的cnpm安装依赖,运行时总报invalid array length Allocation failed - JavaScript heap out of memory然后停止运行
解决办法
不使用cnpm,删除依赖包,使...
yekong
2年前 (2023-01-05)
喜欢
在学习复选框之前,先了解一下CompoundButton。在Android体系中,CompoundButton类是抽象的复合按钮,因为是抽象类,所以 它不能直接使用。实际开发中用的是CompoundButton的几个派生类,主要有复选框CheckBox、单选按钮RadioButt...
yekong
2年前 (2023-01-04)
喜欢
Button按钮的背景在正常情况下是凸起的,在按下时是凹陷的,从按下到弹起的过程,用户便能知道点击了这个按钮。
创建selector btn_nine_selector
<?xml version="1.0" encoding="utf-8&...
yekong
2年前 (2023-01-04)
喜欢