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

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

171. 区块地图-PerspectiveWall [ 76%]

...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

172. parameter 2 is not of type 'WebGLTexture' [ 76%]

...raphics.drawImage(interceptT, 0, 0, btn_edit.width, btn_edit.height); Laya.stage.addChild(img);     如图和代码(一个按钮点击后draw图然后加入stage) 只要添加至stage后,随后就会出现这个错误,跟踪查到传入的不是WebGLTexture而是一个canvas,应该是渲...

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

173. 取消监听鼠标移动事件,取消不了 [ 76%]

取消监听鼠标移动事件,取消不了 Laya.stage.off(Laya.Event.MOUSE_MOVE,this,null); 第三个参数是函数,不能为null吗?是不是和on绑定时的同一个函数,如果on里面用匿名函数,off第三个参数怎么写? 2018-06-23 添加评论 免费帖 --> 分享 微博...

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

174. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 76%]

...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

175. 显示与切换图片(TypeScript-LayaAir基础篇(TS)-位图) [ 76%]

...如下: ```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

176. 使用 addChild 加载界面后,绑定事件报错 [ 76%]

...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

177. 关于3d场景上Button点击事件顺序问题 [ 76%]

...了一个按钮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

178. this.bitmap.activeResource is not a function [ 76%]

...//开放域 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

179. QQ里扫一扫打开网页,不响应Laya.Event.FOCUS事件,导致失去焦点后,声音异常 [ 76%]

...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

180. [0]Spine3.8.75报错:Error: Unsupported skeleton data, please export with a newer version of Spine. [ 76%]

...例的源码。   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