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

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

1511. 鼠标交互-键盘交互 [ 43%]

...oardInspector() { let numKeyDown = keyDownList.length; let newText = '[ '; console.log(numKeyDown); for (let i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = S...

来源: Laya2.0_示例 发布时间: 20260303

1512. 如何获取animation的node节点? [ 42%]

...killAniArray[i]; // 将渲染后的小切片追加到动画中 }catch(e) { console.log('warning: animation in loading'); // 过于频繁加载动画时给予警告 } }) } ani.interval = Math.round(1000/aniProps.mc[options.srcName].frameRate); // 设置动画的帧率 ani.autoPlay = options.autoPlay;...

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

1513. 骨骼动画-换装 [ 42%]

...onError); this.mFactory.loadAni(this.mAniPath); } private onError():void { console.log("error"); } private parseComplete():void { //创建模式为1,可以启用换装 this.mArmature = this.mFactory.buildArmature(1); this.mArmature.x = this.mStartX; this.mArmature.y = this.mStartY; Laya.stage.addC...

来源: Laya2.0_示例 发布时间: 20260303

1514. Laya2.0导入protobufjs第三方库,报错找不到文件 [ 42%]

....d.ts", "node_modules/@types/node/cluster.d.ts", "node_modules/@types/node/console.d.ts", "node_modules/@types/node/constants.d.ts", "node_modules/@types/node/crypto.d.ts", "node_modules/@types/node/dgram.d.ts", "node_modules/@types/node/dns.d.ts", "node_modules/@types/node/domain.d.ts", "node_modul...

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

1515. 为什么自定义shader大图正常,小图就被缩小了 [ 42%]

...ray = []; var texWidth = texture.width; var texHeight = texture.height; // console.log("liuyi",texWidth); //定义颜色值,取值范围0~1浮点 var red = 1; var greed = 1; var blue = 1; var alpha = 1; //在顶点数组中放入4个顶点 //每个顶点的数据:(坐标x,坐标y...

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

1516. 微信小游戏报错 the .lh file root type must be Scene [ 42%]

...ring = "res/layaScene/xiangsuqiche.ls"; public LoadScene3D(): Laya.Scene { console.log("screen#DPath = " + this.screen3DPath); let scene: Laya.Scene = Laya.Scene.load(this.screen3DPath); Laya.stage.addChildAt(scene, 0); this.InitCamera(scene); return scene; } 微信小游戏报错 Scene: the .lh fil...

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

1517. stage.clientScaleX/Y这个值有什么用呢? [ 42%]

...ge.scaleMode无论怎么设, 这两个值都是1.....   我在源码里面console发现计算了两次屏幕的缩放比.... 第二次就有我想要的值了....  这是为什么呢?? 附件 : --> 2017-08-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请:...

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

1518. 两个对象new了一个相同的对象,调用第一个的一个方法,走进了第二方法里 [ 42%]

....aa.shuchu();//输出这个组件num,结果为2,是LayaSample.bb的num console.info(s); }, 1000); } } class Child{ private _num:string; public num(n:string){ this._num = n; } public shuchu(){ return this._num; } } new LayaSample(); 2018-08-05 3 0 分享 微博 QZONE 微信 手撕腊鸭 赞同来...

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

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

.../layaMaxUI.ts"     let fileContent = readFile(layaMaxUI_Path);     console.log("读取文件",fileContent)     if (fileContent ) {             fileContent = fileContent.replace(/Laya\.UICodeView/g,"UICodeView");             fs.writeFileSync(layaMaxUI_Path, fileCon...

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

1520. List中放TextInput,当list滚动的时候,复用会有问题,input中的内容会乱,尤其有输入框focus的情况下 [ 42%]

...ource.value; // cell.setImg(cell.dataSource); } function onSelect(index) { console.log("当前选择的索引:" + index); } })();这段代码直接复制到官网的例子里面执行就能看到了,最新版本引擎中,在renderHandler中强制设置TextInput的值,不会出现数据乱的...

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