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

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

451. 微信小游戏分包实战(JavaScript-小游戏适配文档-微信小游戏) [ 51%]

...按钮btnA的点击事件,触发后处理 UI.btnA.on(Laya.Event.CLICK, this, showB); } ``` 代码分出后,我们不要忘了在主包内调用微信小游戏官方提供的分包加载与回调通知方法。在示例项目中,我们直接在图集加载的回调里,加载分包。然后在...

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

452. Laya2.0版本linkSprite3DToAvatarNode无法正常使用了,因为新插件导出的动画没有avatar文件了,导致挂载不上 [ 51%]

...priteToAnimationNode=function(sprite,nodeName,isLink){         if (this._avatar){ 这一步必须要有 avatar 文件,但是用新的2.0插件导出的角色不带avatar文件导致无法挂载,可在GameUI.ts 41行下断点调试进入查看。   var actor = Laya.Loader.getRes("res/Lay...

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

453. 3D场景里面怎么画线条 [ 51%]

...     console.log("线段数量:", wayList.length);         this.mainScene.addChild(pl);         for (let i = 1; i < wayList.length; i++) {             pl.addLine(wayList[i - 1], wayList[i], Laya.Color.RED, Laya.Color.RED);         } 2019-1...

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

454. 当使用代码创建打开场景时,onOpened触发了,但场景active和activeInHierarchy还是处于false,请问纯代码怎么实现场景创建激活,谢谢 [ 51%]

...('scene', scene.active, scene.activeInHierarchy); Laya.timer.frameOnce(10, this, () => {   console.log('scene 2', scene.active, scene.activeInHierarchy); });   日志:   附件 : --> demo.zip 2019-04-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请:...

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

455. 如何在场景中获得node的位置信息? [ 50%]

如何在场景中获得node的位置信息? let target3 = this.scene.getChildByName("Target3"); 现在我需要知道target3这个node的位置信息。有什么办法吗? 2017-11-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...

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

456. 插件开发说明 · LayaAir3.0文档 · LAYABOX [ 50%]

...必须的 @IEditorEnv.regClass() export class TestSceneScript { //注意:this是当前的IEditorEnv.IGameScene对象,如果不需要,也可以省略这个声明 static test(this: IEditorEnv.IGameScene, msg: string) { console.log(msg); //hello return "ok"; } } //下面是UI进程的代码 let r...

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

457. 微信关系链:LayaAir引擎针对微信小游戏好友关系链实现方案 [ 50%]

...stage.bgColor = "#ffffff"; if (Browser.onMiniGame) { Laya.timer.once(1000, this, function():void{ //设置共享画布大小 __JS__('sharedCanvas').width = Laya.stage.width; __JS__('sharedCanvas').height = Laya.stage.height; //主域往子域透传消息 __JS__('wx').postMessage({type:"resizeShared"...

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

458. 加载SPINE骨骼动画资源无法为png指定版本号 [ 50%]

...码如下 var templet:Templet= new Templet(); templet.on(Event.COMPLETE, this, loadPlaneSkComplete); templet.loadAni("a.sk?v=1"); 出现的问题: 加载a.sk?v=1这个文件后,底层自动加载a.png 在chrome的开发者工具中看到,这个a.png是没有版本号的   2018-04-04 0 0 分...

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

459. 我用matter.js渲染一个篮球, 但是不会自动旋转.. 这个怎么设置呢? [ 50%]

...ketball.png"); ball_skin.pivot(ball_skin.width / 2, ball_skin.height / 2); this.ball = Matter.Bodies.circle(0, -100, 34, {     layaSprite: ball_skin, // 绑定一个laya的Sprite, 不能用render.sprite     density: 1, // 密度     restitution: 0.85 // 弹性 });   2017-07-04 添加评论 ...

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

460. layacmd安装失败 [ 49%]

...s 1 5907 error Failed at the electron@1.7.9 postinstall script. 5907 error This is probably not a problem with npm. There is likely additional logging output above. 5908 verbose exit [ 1, true ] 附件 : --> 2017-12-06T10_02_53_392Z-debug.zip 2017-12-06 添加评论 免费帖 --> 分享 微博 QZONE...

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