大约有 153 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0042 秒)
...通过预加载方式解决这个问题。 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
... 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
...的URL,因为这个URL没有后缀,所以加载时要写上类型 Laya.loader.load([{url:url,type:"image"}], Handler.create(this,function(){ //接下来 }));5.接下来回调,卸载之前的资源 Laya.loader.clearRes(oldUrl);6.加载Texture2D 这样就原图片地址是个Texture2D,生...
来源: Laya_社区 发布时间: 20181221
...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
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
...otate,可以看到旋转了。 顺便问一下,要想知道Sprite3D.load加载完成,只能继承并重写onAsynLoaded? -------------------------------------------------------------------------------------ok, 我检查了worldMatrix,确实在设置了localRotation之后就不再变化...
来源: Laya_社区 发布时间: 20170323
...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
...两杯 赞同来自: 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
...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
...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