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

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

461. TextureCube. setSixSideImageSources () [ 60%]

...;LayaScene_6/Conventional/Assets/New Folder/qiu2_NegativeX.png", Laya.Handler.create(null, (tex) => { var _textureCube = new Laya.TextureCube(); var img:Laya.Image = new Laya.Image(); img.texture=tex; _textureCube.setSixSideImageSources([ img, img, img, img, img, img ]); var skyM = new Laya....

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

462. 分享:LayaAir下如何获取图集下的小图资源? [ 60%]

...e; import laya.net.Loader; import laya.resource.Texture; import laya.utils.Handler; public class Main { public function Main() { //初始化引擎 Laya.init(600, 800); //加载引擎需要的资源 Laya.loader.load([{url:"res/atlas/atlas_res.json",type:Loader.ATLAS}], Handler.create(this, onLoaded))...

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

463. 如何判断加载资源是否成功? [ 60%]

...加载资源是否成功? Laya.loader.load(["res/book00"+2+".txt"], Laya.Handler.create(this, onLoaded(i))) 2018-04-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_XS 赞同来自: Laya.loader.load配合 ...

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

464. Effect材质详解(JavaScript-3D基础(JS)-模型材质详解) [ 60%]

...地球贴图 Laya.Texture2D.load("res/threeDimen/texture/earth.png", Laya.Handler.create(this, function(texture) { //设置纹理 material.texture = texture; })); earth.meshRenderer.material = material; ``` ![](img/1.gif)(图1)

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

465. 添加组件PhysicsCollider 时报 Cannot read property 'btCollisionObject' of undefined [ 60%]

...后再进行。如下句 : Laya.loader.create( MyResouces.arrResources, Handler.create(this,onLoadComplete) ); 意为加载完MyResouces.arrResources这些资源后调用方法onLoadComplete,添加碰撞盒子需要在onLoadComplete里或者onLoadComplete运行过之后再加。

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

466. 如何获取动画的长度? [ 60%]

...使用加载完回调还是获取不到   tl.loadAnimation("s.ani", Laya.Handler.create(this, () => { var bounds = tl.getGraphicBounds(); console.log(bounds.width) }, [tl]));   还是0 2018-01-24 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录...

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

467. 引擎示例中的新手引导自己写了一次,不知道为什么无法实现点击。 [ 60%]

...dius: 110, tip: "../../res/guide/help3.png", tipx: 900, tipy: 300 } ]; var Handler = Laya.Handler; var Sprite = Laya.Sprite; var HitArea = Laya.HitArea; var step = 0; Laya.init(1285, 727, Laya.WebGL); var stage = Laya.stage; var loader = Laya.loader; stage.bgColor = "#00ffff"; stage.alignH = "center...

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

468. 1.70beta Dialog增加动画后第二次执行popup不显示弹窗 [ 60%]

...utton = Laya.Button; var Dialog = Laya.Dialog; var Image = Laya.Image; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var DIALOG_WIDTH = 220; var DIALOG_HEIGHT = 275; var CLOSE_BTN_WIDTH = 43; var CLOSE_BTN_PADDING = 5; var assets; (function() { // 不支持WebGL时自动切换至Canvas Laya.in...

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

469. 属性无法获取 [ 60%]

... joy.callBackFun = onMyRole.bind(this);   第二个: joy.callBackFun = Handler.create(this,onMyRole); 2017-06-11 1 0 分享 微博 QZONE 微信 170*****650 赞同来自: 已解决 非常感谢 2017-06-12 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先...

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

470. 背景音乐来回切换报错 [ 60%]

...SoundChannel = null         Laya.loader.load("res/dreams.mp3",Laya.Handler.create(this,function(){             dreamsSound = Laya.SoundManager.playMusic("res/dreams.mp3")         }))          let mainSound:Laya.SoundChannel = null;         this.btn_sound....

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