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

大约有 1,489 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0095 秒)

241. 模型的功能介绍(JavaScript-3D基础(JS)-LayaAir3D之模型和网格) [ 80%]

... 监听 changeMeshButton.on(Laya.Event.CLICK, this, function(){ index++; if (index % 5 === 1 ){ //切换mesh sphere.meshFilter.sharedMesh = box; } else if (index % 5 === 2){ //切换mesh sphere.meshFilter.sharedMesh = capsule; } else if(index % 5 === 3){ //切换mesh sphere.meshFilter.sharedMesh = c...

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

242. 模型的功能介绍(TypeScript-3D基础(TS)-LayaAir3D之模型和网格) [ 80%]

... 监听 changeMeshButton.on(Laya.Event.CLICK, this, function(){ index++; if (index % 5 === 1 ){ //切换mesh sphere.meshFilter.sharedMesh = box; } else if (index % 5 === 2){ //切换mesh sphere.meshFilter.sharedMesh = capsule; } else if(index % 5 === 3){ //切换mesh sphere.meshFilter.sharedMesh = c...

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

243. 游戏铺满固定大小容器,火狐和谷歌正常,edge会有滚动条? [ 80%]

...来自: Laya.timer.frameLoop(1,this,()=>{                if(this.lastClientWidth!=Laya.Browser.clientWidth){                     if(Laya.Browser.clientWidth>Laya.Browser.clientHeight){                         console.log("横屏",this.las...

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

244. 一个修复Laya1.8.3中的粒子销毁时报错黑屏问题的思路 [ 80%]

...ion () { $beginFlush.call(this); let attrs = Laya.Buffer._enableAtributes; if (attrs) { attrs.forEach((buffer, index) => { if (buffer && buffer.deleted) { Laya.WebGL.mainContext.disableVertexAttribArray(index); attrs[index] = null; } }); while (attrs.length > 0 && attrs[attrs.l...

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

245. as项目移植layflash问题 [ 80%]

...    m_dataSize = m_minReadable + m_dateHeadLength;             if (msgData.Data != null)             {                 m_dataSize += msgData.Data.length;             }             var sendData:ByteArray = new ByteArray();             sendDa...

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

246. 原生js如何调用laya里的方法? [ 80%]

...的方法都没法使用: (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NO...

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

247. LayaNative中加载自己缓存的资源 [ 80%]

...ion downloadFile(url:String,onComplete:Handler,onError:Handler=null):void{ if(window.conch) { var folder:String=window.conch.getCachePath()+"/download/"; if (!window.fs_exists(folder)) { window.fs_mkdir(folder); } var fileName:String = url.replace("http","").replace(/:/g,"").replace(new RegExp('/','...

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

248. 大神们能不能帮忙解决一下一些问题呀,一个新手搞不定呀 [ 80%]

...内的。 2018-06-15 0 0 分享 微博 QZONE 微信 网林 赞同来自: if(第一关过关了){     document.location.href="第二关.html?数据=需要传的数据"; } 2018-06-15 0 4 分享 微博 QZONE 微信 网林 赞同来自: var 未过的关数 = [1,2,3,4,5,6,7]; if(第一关过关了){ v...

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

249. 鼠标交互-双指缩放(多点触控) [ 80%]

..., this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length == 2) { lastDistance = getDistance(touches); Laya.stage.on(Event.MOUSE_MOVE, this, onMouseMove); } } function onMouseMove(e) { var distance = getDistance(e.touches); //判断当前距离与上次...

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

250. 自定义场景继承导出,会在自定义类中加入Laya.前缀导致layaMaxUI文件报错 [ 80%]

...如果是发布时调用编译功能,增加prevTasks let prevTasks = ""; if (global.publish) {     prevTasks = ["loadConfig","替换Laya前缀"]; }else{     prevTasks = ["替换Laya前缀"] }  const fs = require("fs");  function readFile(path) {     if (fs.existsSync(path)) {    ...

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