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

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

1791. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 61%]

...发起获得最短路径的调用: //设置鼠标弹起事件响应 Laya.stage.on(Event.MOUSE_UP, this, function (): void { //起始和目标点 var start = this.graph.grid[this.startPoint.x][this.startPoint.y]; var end = this.graph.grid[this.endPoint.x][this.endPoint.y]; //调用A* serach方法...

来源: Laya3.0_文档 发布时间: 20230303

1792. LayaAir DebugPanel 调试工具(ActionScript-2D进阶篇(AS3)-调试相关) [ 61%]

...bugPanel调试面板 Laya.enableDebugPanel(); //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; var Img:Sprite = new Sprite(); //添加到舞台 Laya.stage.addChild(Img); Img.loadImage("res/img/monkey1.png",200); } } } ``` 运行效果如图1所示 ![图1](img/1.png) (图1) ### 2、刷新显...

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

1793. laya.utils.Utils [ 61%]

...t — DOM元素引用  coordinateSpace:Sprite — 坐标空间,不能是Stage引用  x:Number — 相对于coordinateSpace的x坐标  y:Number — 相对于coordinateSpace的y坐标  width:Number — 宽度  height:Number — 高度 getGID()method  public static function getGID():int获取...

来源: Laya2.0_api 发布时间: 20190513

1794. tiledMap 官方示例都运行不了 [ 60%]

...      tiledMap.createMap("../res/dt.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), null);   调用后报错TypeError: Cannot read property 'split' of undefined     at TiledMap.__proto.mergePath (file:///C:/Users/Administrator/Documents/myLaya/Hello/bin/libs/laya.tiledmap.j...

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

1795. laya.utils.Stat [ 60%]

...内存,以字节为单位。Stat  loopCount : int = 0[static] 主舞台 Stage 渲染次数计数。 Stat  octreeNodeCulling : int = 0[static] 八叉树节点剔除次数。Stat  onclick : Function[static] [write-only] 点击性能统计显示区域的处理函数。 Stat  renderBatches : int...

来源: Laya2.0_api 发布时间: 20190513

1796. [LayaAirIDE 2.0]TextInput真机输入时显示蓝色字,求解 [ 60%]

...init() { // 设置背景色为场景高度 this.box_color_bg.height = Laya.stage.height; } onEnable() { this.init(); // 判定是注册还是忘记密码 if (GameData.I.isReg) { this._regMode(); } else { this._forgetMode(); } // 添加取消事件 this.lb_cancel.on(Laya.Event.CLICK, this, () => {...

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

1797. [LayaAir2]在使用videoDom创建视频元素后iPad跟iPhone中位置不一样 [ 60%]

...rt default class VideoDom { htmlvideo:Laya.HtmlVideo; constructor() { Laya.stage.on(Laya.Event.CLICK,this,this.onClick); } onClick(){ this.initVideo(); } initVideo() { this.htmlvideo = new Laya.HtmlVideo(); this.htmlvideo.setSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.a...

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

1798. 动效模板(JavaScript-LayaAir基础篇(JS)-动画基础) [ 60%]

...script //初始化引擎 Laya.init(1334,750); //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; //加载图集资源,加载成功后将UI界面添加到舞台上 Laya.loader.load("./res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //实例化导出的UI类 var ...

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

1799. 动效模板(TypeScript-LayaAir基础篇(TS)-动画基础) [ 59%]

...or() { //初始化舞台 Laya.init(1334,750); //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; //加载图集资源,加载成功后将UI界面添加到舞台上 Laya.loader.load("./res/atlas/ui.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //实例化导出的U...

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

1800. 龙骨动画-拖拽-点击区域HitArea设置问题 [ 59%]

...ton.pos(400,600); skeleton.on(Laya.Event.MOUSE_DOWN, this, dragFunc); Laya.stage.addChild(skeleton); skeleton.play(0,true); rectangle = skeleton.getBounds(); var hitArea = new Laya.HitArea(); var graphic = new Laya.Graphics(); graphic.drawRect(-rectangle.x, -rectangle.y, rectangle.width, rectangle.h...

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