大约有 775 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0047 秒)
Laya_社区(431) Laya3.0_api(62) Laya2.0_api(58) Laya2.0_文档(57) laya_api(53) Laya_示例(49) Laya2.0_示例(48) Laya3.0_文档(17)
...veWall { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(700, 500, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage....
来源: Laya2.0_示例 发布时间: 20251130
...raphics.drawImage(interceptT, 0, 0, btn_edit.width, btn_edit.height); Laya.stage.addChild(img); 如图和代码(一个按钮点击后draw图然后加入stage) 只要添加至stage后,随后就会出现这个错误,跟踪查到传入的不是WebGLTexture而是一个canvas,应该是渲...
来源: Laya_社区 发布时间: 20190422
取消监听鼠标移动事件,取消不了 Laya.stage.off(Laya.Event.MOUSE_MOVE,this,null); 第三个参数是函数,不能为null吗?是不是和on绑定时的同一个函数,如果on里面用匿名函数,off第三个参数怎么写? 2018-06-23 添加评论 免费帖 --> 分享 微博...
来源: Laya_社区 发布时间: 20180623
...typescript Laya.timer.frameLoop(1, this, this.animateFrameRateBased); Laya.stage.on("click", this, this.dispose); dispose() { Laya.timer.clear(this, this.animateFrameRateBased); } ``` 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **三、获取显示对象边界的...
来源: Laya2.0_文档 发布时间: 20210714
...如下: ```typescript module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Texture = Laya.Texture; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class Sprite_DisplayImage { constructor() { // 不支持WebGL时自动切换至...
来源: Laya2.0_文档 发布时间: 20210715
...Config.startScene); Main.gameStart = new GameStart(); Laya.stage.addChild(Main.gameStart); } 在官方示例 Main.ts 中,使用Laya.stage.addChild(Main.gameStart); 加载场景后报上面图片的错误 GameStart 类如下: export default class GameStart extends ui.GameStartU...
来源: Laya_社区 发布时间: 20190510
...了一个按钮button。 2,在场景中加入了鼠标点击事件 Laya.stage.on(Event.MOUSE_DOWN,this,sceneClick); private function sceneClick():void { trace("scene clicked"); } 3,在button上添加按钮功能 button.on(Event.CLICK,this,onBtn); private function onBtn(e:Event):void {...
来源: Laya_社区 发布时间: 20180917
...//开放域 this._openZone = new Laya.Sprite(); } this._openZone.size(Laya.stage.width,Laya.stage.height); if(this._openZone.parent) return; console.log("打开开放域",Laya.Browser.onMiniGame) Laya.stage.addChild(this._openZone); this._openZone.x = vx; this._openZone.y = vy; if(Laya.Browser.onMin...
来源: Laya_社区 发布时间: 20200618
...autoStopMusic = true Laya.SoundManager.playSound("sound/bg1.mp3", 0); Laya.stage.on(Laya.Event.FOCUS, null, function(){ console.log("获取焦点") Laya.SoundManager.playSound("sound/bg1.mp3", 0); }) Laya.stage.on(Laya.Event.BLUR, null, function(){ console.log("失去焦点") }) 2018-08-07 添加评...
来源: Laya_社区 发布时间: 20180807
...例的源码。 var Browser = Laya.Browser; var WebGL = Laya.WebGL; var Stage = Laya.Stage; var Event = Laya.Event; var Stat = Laya.Stat; var SpineTemplet = Laya.SpineTemplet; class SpineBinary { constructor() { this.aniPath = "res/powerup-pro.skel"; this.index = -1;...
来源: Laya_社区 发布时间: 20211013