上一页 1 2 3 4 5 6 7 8 9 ··· 25 下一页
摘要: 1.使用绝对定位元素自身属性进行居中设置 position: absolute; bottom: 16px;//放置在底部 //设置居中的关键属性 right: 0; left: 0; margin: 0 auto; 该方法主要使用left:0和right:0对dom元素进行拉扯,因此会导致属性值为 阅读全文
posted @ 2023-08-16 09:50 SimoonJia 阅读(98) 评论(0) 推荐(0) 编辑
摘要: [] 中括号可以用来取对象 例如: obj[name]取的是obj对象中的name值 [pointData]取的是当前作用域内的pointData对象 例子: const pointHandelChange = (e) => { console.log(e.target); const { name 阅读全文
posted @ 2023-08-15 11:28 SimoonJia 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 数组对象: 对于获取数组的最后一个元素,可能平常见得多的就是arr[arr.length - 1],我们其实可以使用at()方法进行获取 接收一个整数值并返回该索引对应的元素: const arr = [5, 12, 8, 130, 44]; let index1 = 2; strt1 = `索引号 阅读全文
posted @ 2023-07-14 17:02 SimoonJia 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 注意:需提前把文本active设为false 要实现在Unity中点击模型弹出该模型的信息弹窗,可以按照以下步骤进行操作: 1. 创建一个空的UI画布(Canvas)和一个按钮(Button),用于触发弹出信息窗口的事件。 2. 创建一个信息窗口的UI面板(Panel),在该面板上显示模型的信息。可 阅读全文
posted @ 2023-07-12 02:24 SimoonJia 阅读(1985) 评论(0) 推荐(0) 编辑
摘要: 小结: 1.该脚本绑定在一个空对象上, 2.需对空对象上的脚本绑定目标对象(模型) 3.将按钮的onclick事件目标绑定为该空对象,并且方法使用空对象中的ChangeColor方法,运行后点击按钮即可改变模型颜色 1. 创建一个按钮:在Unity中,可以通过在Hierarchy面板上右键点击,并选 阅读全文
posted @ 2023-07-12 02:20 SimoonJia 阅读(1649) 评论(0) 推荐(0) 编辑
摘要: ‘ init(); animate(); function init() { var output = document.createElement( 'div' ); output.style.cssText = 'position: absolute; left: 50px; top: 300p 阅读全文
posted @ 2023-06-16 17:47 SimoonJia 阅读(83) 评论(0) 推荐(0) 编辑
摘要: document.addEventListener('mouseup', (e)=>{mouseupFunc(e)}, false); 阅读全文
posted @ 2023-06-15 20:07 SimoonJia 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 设置一下射线的相机就ok了: this._raycaster.camera = this._camera; 阅读全文
posted @ 2023-05-05 10:07 SimoonJia 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 1、cmd打开控制台,切换到相关项目地址; 2、查看当前分支及git仓库地址: 1. git remote 2. git remote -v 3、移除当前仓库地址 git remote rm origin 4、移除后可以用git remote -v 命令查看是否移除成功,移除成功后添加目标仓库地址 阅读全文
posted @ 2023-04-25 11:02 SimoonJia 阅读(30) 评论(0) 推荐(0) 编辑
摘要: let str = "Hello world"; str.endsWith("world") // 返回 true str.endsWith("World") // 返回 false endsWith() 方法用来判断当前字符串是否是以指定的子字符串结尾的(区分大小写)。 如果传入的子字符串在搜索字 阅读全文
posted @ 2023-02-23 11:21 SimoonJia 阅读(201) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 25 下一页