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

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

491. 源码List的一次代码错误 [ 70%]

...X, numY) { var box = this._content; var cell = this._getOneCell(); var cellWidth = cell.width + this._spaceX; var cellHeight = cell.height + this._spaceY; if (this.cacheContent) { var cacheBox = new Box(); cacheBox.cacheAsBitmap = true; cacheBox.pos((this._isVertical ? 0 : startY) * cellWidth, (this...

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

492. tiledMap类createMap()创建地图 如何理解这个viewRect视口区 [ 70%]

...知道出来的是什么宽高)         console.log(tiledMap.gridWidth,tiledMap.gridHeight);         //地图宽高         console.log(tiledMap.width,tiledMap.height);         //         console.log(tiledMap.numColumnsGrid,tiledMap.numRowsGrid );       ...

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

493. spine动画放大后,遮罩显示不正常 [ 70%]

...parent.addChild(mArmature);         mArmature.pos(parent.x+parent.width/2, parent.y+parent.height/2);         mArmature.scale(3, 3);         mArmature.on(Laya.Event.STOPPED, this, this.completeHandler);         mArmature.play(1, true);     }      completeHand...

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

494. 3d文字在浏览器能正常运行,打包后使用时会报错 [ 70%]

...s.cav);报错   this.cav = Laya.Browser.createElement("canvas"); this.cav.width = 256; this.cav.height = 256;  var cxt = this.cav.getContext("2d"); cxt.fillStyle = 'rgb(' + '220' + ',' + '5' + ',5)'; cxt.font = "bold 50px 宋体"; cxt.textAlign = "center";//文本的对齐方式 cxt.textBaseline =...

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

495. tiledMap问题,getTileProperties获取地图属性不能获取到 [ 70%]

...dMap(); this.map.createMap(this.MAP_URL, new Laya.Rectangle(0,0,Laya.stage.width, Laya.stage.height), new Laya.Handler(this, this.onMap)) }  private onMap(){ var idx = this.map.getLayerByIndex(0).getTileDataByScreenPos(20,20); var pass = this.map.getTileProperties(0,idx - 1,'pass'); console.log('...

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

496. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 70%]

...ser.document.createElement("div"); qrcode= new Browser.window.QRCode(div,{ width : 100, height : 100 }); var url:String ="http://layabox.com/"; qrcode.makeCode(url); Laya.stage.once("click",this,clickHandler); qrcodeSp = new Sprite(); Laya.stage.addChild(qrcodeSp); } private function clickHandler():...

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

497. 多重遮罩显示异常 [ 70%]

...500, '#aaa'); this.addChild(bg); this.panel = new Laya.Panel(); this.panel.width = 500; this.panel.height = 500; this.panel.vScrollBarSkin = ''; this.panel.hScrollBarSkin = ''; this.addChild(this.panel); let line = new Laya.Sprite(); line.size(1000, 20); line.pos(200, 200); line.graphics.drawRect(0,...

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

498. 文本-复杂的文本样式 [ 70%]

...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createText(); })(); function createText() ...

来源: Laya_示例 发布时间: 20260303

499. sprite添加texture后,sprite无法触发点击事件? [ 70%]

... 2017-08-26 17:23 利用getBounds获取的时候发现sprite是有height和width的,为什么还要设置size呢?

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

500. drawTexture 画出来的数据会有以前的数据 [ 70%]

...lhjicon_5.png"); img.x = 640; img.y = 320; iconSpr = new Sprite(); iconSpr.width = 1280; iconSpr.height = 640; iconSpr.addChild(img); btn.on(Event.CLICK,this,runGame1); } private function runGame1():void { xNum = Math.random()*7 - 3; yNum = Math.random()*7 - 3; Laya.timer.loop(20,this,onRun); Laya.t...

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