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

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

391. [LayaAir3]sprite.drawToTexture( ) 无法绘制容器内容 [ 74%]

...drawToTexture,例如     onEnable(): void {         const { x, y, width, height } = this.box         Laya.loader.load('comp/image.png').then(v=>{             const texture = this.box.drawToTexture(width, height, x, y) as Laya.Texture             this.snapshot.texture = tex...

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

392. runTime使用(JavaScript-IDE篇(JS)-组件化开发相关) [ 74%]

...据IDE设置初始化引擎 if (window["Laya3D"]) Laya3D.init(GameConfig.width, GameConfig.height); else Laya.init(GameConfig.width, GameConfig.height, Laya["WebGL"]); Laya["Physics"] && Laya["Physics"].enable(); Laya["DebugPanel"] && Laya["DebugPanel"].enable(); Laya.stage.scaleMode = GameConfig.sc...

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

393. ComboBox属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 74%]

...x = this.createComboBox(this.skin); cb.autoSize = true; cb.pos((Laya.stage.width - cb.width) / 2, 100); cb.autoSize = false; } private createComboBox(skin: String): ComboBox { var comboBox: ComboBox = new ComboBox(this.skin, "item0,item1,item2,item3,item4,item5"); comboBox.labelSize = 30; comboBox.i...

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

394. 设置遮罩(TypeScript-LayaAir基础篇(TS)-位图) [ 74%]

...据IDE设置初始化引擎 if (window["Laya3D"]) Laya3D.init(GameConfig.width, GameConfig.height); else Laya.init(GameConfig.width, GameConfig.height, Laya["WebGL"]); Laya["Physics"] && Laya["Physics"].enable(); Laya["DebugPanel"] && Laya["Physics"].enable(); Laya.stage.scaleMode = GameConfig.scale...

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

395. 克隆sprite [ 74%]

...面的“   tempSpr2.graphics.drawTexture(tempSpr.texture, 0, 0, tempSpr.width, tempSpr.height);”中 tempSpr.texture 是空的 if (data && data.items != []) {             let tempSpr: Sprite = new Sprite();             let tempImg: Laya.Image;             let arr: Arr...

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

396. 设置viewport后显示区域变黑色 [ 74%]

...       //          this.viewport = new Rectangle(0, 0, Laya.stage.width, Laya.stage.height);             this.scrollRect = new Rectangle(0, 0, Laya.stage.width, Laya.stage.height); 2017-04-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: ...

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

397. 帮忙看看Texture类getPixels内存泄漏的问题。 [ 74%]

...(_colorTex); _colorSpr.cacheAs = "bitmap"; _colorSpr.pos((1024 - _colorTex.width) >> 1, (768 - _colorTex.height) >> 1); _colorSpr.size(_colorTex.width, _colorTex.height); Laya.stage.addChild(_colorSpr); _initPixelCount = getPixel(_colorTex); addEvent(); } private function addEvent():void...

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

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

...p-pro.skel";         this.index = -1;         // Laya.init(Browser.width, Browser.height, WebGL);         // Laya.stage.scaleMode = Stage.SCALE_NOSCALE;         // Laya.stage.bgColor = "#232628";         // Stat.show();         this.startFun();     }     startFun() {   ...

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

399. list里面可以加入多个view吗? [ 74%]

...{ private var list:List; public function LayaAirDemo() { Laya.init(Browser.width,Browser.height); Laya.stage.bgColor="#EEFFCC"; Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { list=new List(); Laya.stage.addChild(list); li...

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

400. 为何对sp的监听事件没有反应呢? [ 74%]

...ffffff"); xxx.size(100, 100); xxx.mouseEnabled = true; xxx.x = (Laya.stage.width - xxx.width) / 2; xxx.y = (Laya.stage.height - xxx.height) / 2; Laya.stage.addChild(xxx); xxx.on(Laya.Event.CLICK, this, this.onXXX); private onXXX() {    console.debug("Hello"); } 2017-06-06 添加评论 免费帖 --...

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