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

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

131. LayaFlash针对资源的加载是同步还是异步? [ 51%]

...通过预加载方式解决这个问题。 package { import flash.display.Loader; import flash.display.LoaderInfo; import flash.display.Sprite; import fash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import flash.net.URLRequest; public class Main extends Sprit...

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

132. 3d场景下面有张2d的图片,当鼠标焦点不在该网页时,2d图片为啥会闪动 [ 50%]

...      var sprite0:Sprite = new Sprite();             sprite0.loadImage("creatRoom/background_bk.png");             sprite0.pos(0,0 );             sprite0.cacheAsBitmap = true;             Laya.stage.addChildAt(sprite0,0);                       ...

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

133. Texture如何转换成Texture2D有人搞过吗 [ 50%]

...的URL,因为这个URL没有后缀,所以加载时要写上类型 Laya.loader.load([{url:url,type:"image"}], Handler.create(this,function(){ //接下来 }));5.接下来回调,卸载之前的资源 Laya.loader.clearRes(oldUrl);6.加载Texture2D   这样就原图片地址是个Texture2D,生...

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

134. 请问UI之间的场景切换要怎么写 [ 50%]

...ya.stage.scaleMode = "showall"; Laya.stage.screenMode = "horizontal"; Laya.loader.load("res/atlas/sanguo.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS); function onLoaded(){ Laya.sg_sign = new sg_sign(); Laya.stage.addChild(Laya.sg_sign); } function onWxSign1(){ Laya.sg_sign.remove...

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

135. meshRender修改材质问题 [ 49%]

meshRender修改材质问题 warehouse1 = Laya.Sprite3D.load("model/build/warehouse1/warehouse1.lh"); scene.addChild(warehouse1); warehouse1.transform.rotate(new Laya.Vector3(0, 90, 0), false, false); warehouse1.transform.translate(new Laya.Vector3(0,0,0),false); warehouseMeshSprite3D1= warehouse1....

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

136. 设置transform.localRotation之后,就不能再使用transform.rotate了 [ 48%]

...otate,可以看到旋转了。   顺便问一下,要想知道Sprite3D.load加载完成,只能继承并重写onAsynLoaded? -------------------------------------------------------------------------------------ok, 我检查了worldMatrix,确实在设置了localRotation之后就不再变化...

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

137. SCALE_FIXED_WIDTH适配屏幕的问题 [ 47%]

...Laya.View.regComponent("ScaleButton", ScaleButton);             Laya.loader.load("res/atlas/com/loading.atlas", Laya.Handler.create(this, this.loadGame));         }         private loadGame(): void {             var resArray = [                 { url: "res/atlas/lobby/cre...

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

138. 用unity插件导出lh格式文件,再代码中加载使用的问题 [ 47%]

...两杯 赞同来自: var scene : Scene3D;             Scene3D.load("res/laya-test.ls",Handler.create(null,function(sp:Scene3D):void{                 scene = Laya.stage.addChild(sp) as Scene3D;             }));   找到对应的示例代码了,但是编译...

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

139. 修改position与修改localPosition结果不一致(同处于3d场景下的两个节点) [ 46%]

...l: Laya.BlinnPhongMaterial = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/layabox.png", Laya.Handler.create(null, function (tex: Laya.Texture2D) { material.albedoTexture = tex; })); //测试遮挡剔除 material.cull = 0 box.meshRenderer.material = material;  let res1 = Laya.Sprite3D.ins...

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

140. 对游戏中各种控件字体样式使用“白鹭style”样式表 [ 45%]

...void { //每一项加载内容加载完成均可以设置一个回调 Laya.LoaderManager.prototype["_loadAssets"] = function (arr, complete, progress, type, priority, cache, group) { (priority === void 0) && (priority = 1); (cache === void 0) && (cache = true); var itemCount = arr.le...

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