大约有 1,102 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0142 秒)
...ight = scene.addChild(new Laya.DirectionLight()) as Laya.DirectionLight; //设置平行光的方向 var mat = directionLight.transform.worldMatrix as Laya.Matrix4x4; mat.setForward(new Laya.Vector3(-1.0, -1.0, -1.0)); directionLight.transform.worldMatrix=mat; this.sprite3D = scene.addChild(new Laya....
来源: Laya_社区 发布时间: 20220815
...Boolean = false):void { Loader.clearRes清理你把里面的第二个参数设置成false试试 如果还是不行的话你就把资源清理方法改用一下这个方法!还有如果你的图片小于512的话是销毁不了的 https://ldc.layabox.com/doc/?nav=zh-as-3-2-7 2018-04-24 0 0 分享 ...
来源: Laya_社区 发布时间: 20180424
...这行代码的效果应该是离物体越来越近了,根据您代码里设置的范围来看是正常的,我这里改成"-="后坐标位置也显示正常。 第二个bug我们还在定位问题,有最新的消息会及时回复您。 2021-09-06 0 5 分享 微博 QZONE 微信 shiyang 赞同...
来源: Laya_社区 发布时间: 20210904
...s MethodDefined By Graphics()Graphics alpha(alpha:Number):AlphaCmd 设置透明度。 Graphics clear(recoverCmds:Boolean = true):void 清空绘制命令。 Graphics clipRect(x:Number, y:Number, width:Number, height:Number):ClipRectCmd 设置剪裁区域,超出剪裁区域的坐标不...
来源: Laya2.0_api 发布时间: 20190513
...板 var canvas = Laya.Browser.createElement('canvas'); //设置大小 canvas.width = Laya.stage.width; canvas.height = Laya.stage.height; var ctx = canvas.getContext('2d'); Laya.stage.graphics.clear(false); var textture = new Laya.Texture(canva...
来源: Laya_社区 发布时间: 20180905
...载 正常显示,第二次getRes() 获取不到场景了,是哪里没设置好么? 求指教 2022-02-11 0 4 分享 微博 QZONE 微信 竹心 赞同来自: 2D项目不能用么? 2022-02-15 0 1 分享 微博 QZONE 微信 fftidus 赞同来自: 真的能比直接加载还快?按理说不...
来源: Laya_社区 发布时间: 20211227
... = [3,2,1]; // 敌机半径 this.radius = [15,30,70]; // 初始化引擎,设置舞台大小 Laya.init(400,852); // 创建循环滚动的悲剧 this.bg = new BackGround(); // 把背景添加到舞台 Laya.stage.addChild(this.bg); // 加载图集资源 Laya.loader.load("res/atlas/war.json",Laya.Hand...
来源: Laya_社区 发布时间: 20170525
...ll, uv:Array = null, sourceWidth:Number = 0, sourceHeight:Number = 0):void 设置此对象的位图资源、UV数据信息。 TextureEvents Event Summary Defined By ready资源加载完成后调度。TextureProperty Detailbitmappropertybitmap:Texture2D 获取位图。 Implementation publ...
来源: Laya2.0_api 发布时间: 20190513
....show();//舞台左上角显示帧频信息 Laya.stage.bgColor='#EEFFCC';//设置舞台背景色 Laya.stage.alignH='center';//水平居中对齐 Laya.stage.alignV='middle';//垂直居中对齐 Laya.stage.scaleMode='showall';//缩放模式 Laya.stage.screenMode='horizontal';//竖屏显示 templete=ne...
来源: Laya_社区 发布时间: 20170324
...; //stage竖直对齐方式 Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; //设置适配模式 Laya.stage.scaleMode = "showall"; //添加Sprite var sp = new Laya.Sprite(); Laya.stage.addChild(sp); //将sp移动到横坐标400,纵坐标300的位置 sp.pos(400,300); //绘制两条在sp的原点交叉...
来源: Laya_社区 发布时间: 20180524