• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 473 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0061 秒)

461. 一篇上手LayaAir的3D物理引擎(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 33%]

... */ private addCone(): void { //生成随机值半径和高 let raidius = Math.random() * 0.2 + 0.2; let height = Math.random() * 0.5 + 0.8; //创建圆锥形3D模型节点对象 let cone = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createCone(raidius, height)); //把圆锥形3D节点对象添加到3D...

来源: Laya2.0_文档 发布时间: 20210715

462. 实体组件系统 · LayaAir3.0文档 · LAYABOX [ 33%]

...会被保存到场景文件中 get degree() { return this._radian * (180 / Math.PI);//由于自己没有序列化保存,需要把_radian存下来的弧度反算回角度,用于IDE属性面板显示 } set degree(value: number) { this._radian = value * (Math.PI / 180);//把输入的角度值,转...

来源: Laya3.0_文档 发布时间: 20240528

463. 3D变换 · LayaAir3.0文档 · LAYABOX [ 32%]

... Vector3; if (isRadian) { rot = rotation; } else { Vector3.scale(rotation, Math.PI / 180.0, Transform3D._tempVector30); rot = Transform3D._tempVector30; } Quaternion.createFromYawPitchRoll(rot.y, rot.x, rot.z, Transform3D._tempQuaternion0); if (isLocal) { Quaternion.multiply(this._localRotation, Tra...

来源: Laya3.0_文档 发布时间: 20230821

464. Layabox web 复制一段文字到剪贴板 [ 31%]

...ndex = "1"; this.newMask.style.width = "100%"; this.newMask.style.height = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) + 100 + "px"; this.newMask.style.top = "0px"; this.newMask.style.left = "0px"; this.newMask.style.background = "gray"; this.newMask.style.filter = "a...

来源: Laya_社区 发布时间: 20181214

465. 自定义shader-地形shader [ 31%]

...re.scene.Scene; import laya.d3.graphics.VertexElementUsage; import laya.d3.math.Vector2; import laya.d3.math.Vector3; import laya.d3.math.Vector4; import laya.d3.resource.Texture2D; import laya.d3.resource.models.CapsuleMesh; import laya.d3.resource.models.Mesh; import laya.d3.resource.models.Sphere...

来源: Laya_示例 发布时间: 20240930

466. 项目设置详解 · LayaAir3.0文档 · LAYABOX [ 28%]

...;z值会决定Cluster受区域光(点光、聚光)影响的数量,Math.floor(2048 / lightClusterCount.z - 1) * 4 为每个Cluster的最大平均接受区域光数量,如果每个Cluster所接受光源影响的平均数量大于该值,则较远的Cluster会忽略其中多余的光照影响...

来源: Laya3.0_文档 发布时间: 20230808

467. 缓动动画(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 27%]

...象 */ private function updateColor(txt:Text):void { var c:int = parseInt(Math.random()*3); switch(c) { case 0: { txt.color="#EEE000"; break; } case 1: { txt.color="#FFFFFF"; break; } case 2: { txt.color="#FF0000"; break; } default: { txt.color="#EEE000"; break; } } } /** * 缓动完成后的回调...

来源: Laya2.0_文档 发布时间: 20210715

468. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 26%]

...s.onLoop) } _proto.onLoop = function(){ //移动 this.x -= 5; this.moveX = Math.abs(this.x); //当背景1向左移动出游戏的显示区域 1600,则将背景1的x轴坐标,向右移动 1600*2. if (this.moveX - this.bg1.x >= this.BG_WIDTH) { this.bg1.x += this.BG_WIDTH * 2; } //当背景2向...

来源: Laya_社区 发布时间: 20160722

469. 缓存工具-layadcc · LayaAir3.0文档 · LAYABOX [ 25%]

...ile(url, localfile, (total, now, speed) => { console.log(`downloading:${Math.floor((now / total) * 100)}`) return false;0 }, (curlret, httpret) => { if (curlret != 0 || httpret < 200 || httpret >= 300) { resolve(null); } else { resolve(localfile); } }, 10, 100000000); } ); } let zipfile ...

来源: Laya3.0_文档 发布时间: 20240726

470. 使用3D精灵 · LayaAir3.0文档 · LAYABOX [ 25%]

...r() { super(); } /** * @private */ protected _updateRotation(): void { if (Math.abs(this.yawPitchRoll.y) < 1.50) { Laya.Quaternion.createFromYawPitchRoll(this.yawPitchRoll.x, this.yawPitchRoll.y, this.yawPitchRoll.z, this.tempRotationZ); this.tempRotationZ.cloneTo(this.camera.transform.localRotat...

来源: Laya3.0_文档 发布时间: 20240624