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

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

541. TimeLineUI不存在的问题 [ 79%]

...画。//初始化引擎 Laya.init(600, 400); //设置舞台背景色 Laya.stage.bgColor = "rgba(0,0,0,0.1)"; //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/apes.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { //创建一个UI实例 var plan = new...

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

542. 为何发生此类报错Uncaught TypeError: Cannot read property '_tf' of null [ 79%]

...关的链接 提交 6 个回复 melody0529 赞同来自: (function(){ var Stage=Laya.Stage; var WebGL=Laya.WebGL; var config=Config; (function(){ console.log("运行程序。"); Laya.init(1280,720,WebGL); //设置适配模式 Laya.stage.alignH=Stage.ALIGN_CENTER; Laya.stage.alignV=Stage.ALIGN_MIDDLE...

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

543. 使用官方文档中qrcode生成二维码的代码,打包APP后无效 [ 79%]

...eight: 100 }); var url: string = this.URL; this.qrcode.makeCode(url); Laya.stage.once("click", this, this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); } private clickHandler(): void { var url: string = this.qrcode._oDrawing._elImage.src;//获取,注意这...

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

544. 程序当中更改适配模式后,没有生效成相对应的适配模式效果是为什么? [ 79%]

...模式效果是为什么? 游戏内容当中,检测横竖屏: Laya.stage.on(Laya.Event.RESIZE, this, this.onResize); /** 更改适配*/ public onResize() { var stageWidth = Laya.Browser.clientWidth; var stageHeight = Laya.Browser.clientHeight; if (stageWidth < stageHeight) { console.log...

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

545. 画了一个封闭的曲线,获取鼠标点击处的像素,为何坐标对不上导致拿不到正确位置的Texture? [ 79%]

...置的Texture? package { import laya.display.Sprite; import laya.display.Stage; import laya.events.Event; import laya.resource.HTMLCanvas; import laya.resource.Texture; import rain.core.StageReferance; public class Main { private var _view:Sprite; public function Main() { Config.isAntialias = true...

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

546. mac下用FB打包发布测试页面,chrome浏览器看不到预期显示文字 [ 79%]

...variable is not defined. /LayaAirTest/src/LayaAirTest.as (20):warning:Laya.stage.bgColor This variable is not defined. /LayaAirTest/src/LayaAirTest.as (22):warning:Laya.stage.addChild This variable is not defined.   代码如下: package {     import laya.display.Text;     public class Laya...

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

547. 内存优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 79%]

... ```javascript package { import laya.display.Sprite; import laya.display.Stage; import laya.ui.Image; import laya.utils.Pool; import laya.webgl.WebGL; public class PoolTest { //创建新对象的时间 private var createTime:int=0; public function PoolTest() { //初始化引擎 Laya.init(1136, 640,W...

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

548. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 79%]

...发起获得最短路径的调用: //设置鼠标弹起事件响应 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

549. 显示与切换图片(ActionScript-LayaAir基础篇(AS3)-位图) [ 79%]

...in() { //初始化舞台 Laya.init(1334,750); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" var img:Sprite = new Sprite(); //加载显示图片,坐标位于100,50 img.loadImage("res/img/monkey1.png"); //添加到舞台 Laya.stage.addChild(img); } } } ``` 在示例代码里,“`100,50`...

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

550. 新手!谁懂得把下面两个文件转成layaair可以运行的代码 [ 79%]

...          }               this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStageHandler);           }           private function onAddedToStageHandler(evt:Event):void         {             this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStageHandler);   ...

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