随笔分类 - WebGL技能
收集工作用到的WebGL技术点
摘要:1,threejs 加载glb模型 import * as THREE from 'three'; import type { MapViewer } from '@/utils/map3d/mapViewer'; import { STATIC_URL } from '@/config'; imp
阅读全文
摘要:1, 这篇说说欧拉角和四元数,欧拉角和四元数的优缺点是老生常谈的话题了,使用条件我就不多说了,我只说一下使用方法。 1. 欧拉角(Euler) 欧拉角描述一个旋转变换,通过指定轴顺序和其各个轴向上的指定旋转角度来旋转一个物体。下面我们开看看它的方法 1. set( x: number, y: num
阅读全文
摘要:1, MeterialUv.prototype.upAdoEssLoop = function(e, a, b, s) { if (e) { upAdoEssLoop.upAdoEssFlag ? (e.emissiveIntensity += s) : (e.emissiveIntensity -
阅读全文
摘要:1, CameraColorShift.prototype.OnColorShift = function(a) { switch (a) { case 0: targetColor = this.colorTable_1; break; case 1: targetColor = this.col
阅读全文
摘要:1, $.get("https://xxx/gjbz_share.json", function(e) { t._path = e[t.name] })
阅读全文
摘要:1, css样式 /* 导航主按钮 模板2 */ .iconElement { width: 50%; /* 高度等于 这个元素的宽度 * li元素的宽度 */ height: 2vw; text-align: center; display: inline-block; position: abs
阅读全文
摘要:1,写在一个CSS中 /* 竖屏模式 */ @media screen and (orientation: portrait){ /* 主按钮 */ .PageBut1N { width: 10%; height: 8%; top: 90%; left: 38%; } } /* 横屏模式 */ @m
阅读全文
摘要:1, var ii = this.app.graphicsDevice.canvas.parentElement; var ee = this.app.camera; var nn = ee ? ee.script.orbitCamera : null; var a = window.innerWi
阅读全文
摘要:1, <! 调试代码 start > <script src="http://cdn.jsdelivr.net/npm/eruda"></script> <script> eruda.init(); </script> <! 调试代码 end > 2,
阅读全文
摘要:1, var gt, vt = S.a.register("OrientationManager")(dt = function() { function t(t) { var e = this; ! function(t, e, n) { e in t ? Object.definePropert
阅读全文
摘要:// 6 9 0 10 8 // this.body2.model.model.meshInstances[22].material.emissive = new pc.Color(255, 0, 0); // 替换材质 mod.body.model.model.meshInstances[6].m
阅读全文
摘要:在材质中: "blendType": 2,
阅读全文
摘要:1,查找字符串,中间是变化的 files/assets/.*?/1/ .*? 表示中间是人一个字符
阅读全文
摘要:playcanvas 配置文件路径https://s3-eu-west-1.amazonaws.com/apps.playcanvas.com/wmSPTNhb/config.jsonsence 地址在config中 其中 wmSPTNhb 为发布地临时地址
阅读全文
摘要:1,事件 重置分辩率事件 window.addEventListener("resize", a, !1) 横竖屏切换事件 window.addEventListener("orientationchange", a, !1) 最后一个参数,指定事件捕获或冒泡
阅读全文