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

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

191. 鼠标交互-拖动 [ 76%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); })(); function setup() { createApe(); showDragRegion(); } function createApe() { ape = new Sprite(); ape.loadImage(ApePath); Laya.stage.addChild(ape); var texture = Laya.load...

来源: Laya_示例 发布时间: 20240930

192. 滤镜-模糊滤镜 [ 76%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(apePath, Handler.create(this, createApe)); })(); function createApe() { var ape = new Sprite(); ape.loadImage(apePath); ape.x = (Laya.stage.width - ape.width) / 2; ape.y = (Laya.stage.height - ape.height) / 2; Lay...

来源: Laya_示例 发布时间: 20240930

193. 设置遮罩(JavaScript-LayaAir基础篇(JS)-位图) [ 75%]

...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); })(); function graphicsImg() { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.sta...

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

194. l微信开放域无法显示,但是可以正常传数据 [ 75%]

...main.ts: if(Laya.Browser.onMiniGame){ //加载一个json和图集 Laya.loader.load(["res/atlas/test.atlas"],Laya.Handler.create(null,function(){ //加载完成 //使用接口将图集透传到子域 Laya.MiniAdpter.sendAtlasToOpenDataContext("res/atlas/test.atlas"); }));子域main.ts: import GameC...

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

195. laya2版本 加载ls失败 [ 75%]

... 2 个回复 兜里有糖。 赞同来自: Codee 加载的时候用 laya.loader.create 不用loader.load 试一下 2018-09-21 1 2 分享 微博 QZONE 微信 hj 赞同来自: 你发一下demo过来吧 2018-09-21 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前...

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

196. 分享:LayaAir下Loading进度条的制作(ActionScript 3.0) [ 75%]

...总个数去模拟加载进度,示例如下:package { import laya.net.Loader; import laya.ui.ProgressBar; import laya.utils.Handler; public class LoadingDemo { private var progressBar:ProgressBar; public function LoadingDemo() { Laya.init(550,400); //预加载loading条资源 var pro1:Object={ur...

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

197. JSON文件加载成功后,怎么解析成Object对象 [ 75%]

...-----------------------package { import laya.display.Text; import laya.net.Loader; import laya.utils.Handler; /** * ... * @author OttoChen */ public class TestMain { private var txt:Text = null; public function TestMain() { Laya.init(800, 800); txt = new Text(); txt.mouseEnabled = false; txt.overflo...

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

198. 3d模型资源,加载后AddChild会报错,请教一下什么原因。 [ 75%]

...型资源,加载后AddChild会报错,请教一下什么原因。 Laya.loader.create("laya_assert/LayaScene_role/role.lh", Handler.create(_instance, OnCreateComplete1)); private static function OnCreateComplete1():void{ trace("complete load role"); var sprite3D:Sprite3D = Laya.loader.getRes("laya...

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

199. 鼠标交互-拖动 [ 75%]

...e = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); Laya.loader.load(ApePath, Handler.create(this, this.setup)); } setup() { this.createApe(); this.showDragRegion(); } createApe() { const Sprite = Laya.Sprite, Event = Laya.Event; this.ape = new Sprite(); this.ape.loadImage(ApePath)...

来源: Laya2.0_示例 发布时间: 20240930

200. 添加fairygui使用fairygui.UIPackage.addPackage ( "res/Bag" )后可以正常跑,发布到微信小游戏出错 [ 75%]

...       //加载引擎需要的资源             //Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, onLoaded));              Laya.loader.load             (                 [                     { url: "res/a...

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