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

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

221. 画布宽高的问题 [ 76%]

...的宽和高为啥都是0呢,舞台是有内容的啊 trace(Laya.stage.width + "-" + Laya.stage.height); trace(Browser.clientWidth + "--" + Browser.clientHeight); trace(Browser.width + "---" + Browser.height); trace(Browser.canvas.width + "----" + Browser.canvas.height); 以上是输出的代码...

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

222. Sprite optimizeScrollRect = true 似乎有问题 [ 76%]

...问题 this.initMask = function () { this.mask = new Sprite(); this.mask.width = this.width; this.mask.height = this.height; this.mask.scrollRect = new Rectangle(); this.mask.scrollRect.setTo(0, 0, this.width, this.height); this.mask.optimizeScrollRect = true; this.addChild(this.mask); } this.initCo...

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

223. 用LayaAir引擎解析Tiled Map地图(ActionScript-2D进阶篇(AS3)-扩展模块) [ 76%]

...dMap; public function TiledMapDemo() { //初始化舞台 Laya.init(Browser.width, Browser.height, WebGL); //创建TiledMap实例 tMap = new TiledMap(); //创建Rectangle实例,视口区域 var viewRect:Rectangle = new Rectangle(0, 0, Browser.width, Browser.height); //创建TiledMap地图 tMap.crea...

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

224. 微信小游戏截屏分享 [ 76%]

...回复 坚果 赞同来自: 183*****291 、₩ var htmlC = sp.drawToCanvas(width, height, 0, 0); var canvas = htmlC.getCanvas(); canvas.toTempFilePath({ x: 0, y: 0, width: width, height: height, destWidth: width, destHeight: height, success: function (res) { wx.shareAppMessage({ imageUrl: res.tempFi...

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

225. 在2.0里如何调用在编辑模式下创建的对话框 [ 75%]

...下: { "x":0, "type":"Dialog", "selectedBox":1, "selecteID":3, "props":{"width":640,"sceneColor":"#000000","height":480}, "nodeParent":-1, "label":"Dialog", "isOpen":true, "isDirectory":true, "isAniNode":true, "hasChild":true, "compId":1, "child":[ { "x":15, "type":"Image", "props":{"y":0,"x":0,"w...

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

226. ☆☆☆☆☆☆☆☆☆☆☆每增加一个 view 都会增加一个 drawcall 吗 ☆☆☆☆☆☆☆☆☆☆☆ [ 75%]

...ngth = String(price).length; var w = length * 16 + 15 + 40; fish.scoreItem.width = w; fish.scoreItem.x = fish.getBox().x - fish.scoreItem.width/2; fish.scoreItem.y = fish.getBox().y - fish.scoreItem.height; this.scoreBox.addChild(fish.scoreItem); fish.scoreGold = new Laya.Image(); fish.scoreGold.ski...

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

227. 在开启webgl模式下,每次运行texture类的getPixels方法内存都会增加 [ 75%]

...init(){ let rect = this.img.getSelfBounds() this.img.pivot(Math.round(rect.width / 2), Math.round(rect.height / 2)) let bound = this.img.getBounds() this.cacheCanvas = this.img.drawToCanvas(Math.ceil(bound.width), Math.ceil(bound.height), Math.round(bound.width / 2), Math.round(bound.height / 2)) th...

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

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

229. 自定义组件时,设置组件子节点的image的skin时,路径为layaIde的路径而非项目路径 [ 74%]

...ize(); _proMask = new Sprite(); _proMask.graphics.drawRect(0, 0, _progress.width, _progress.height); _proMask.scaleX = 0; _progress.mask = _proMask; _bar.stateNum = 1; } override protected function createChildren():void { super.createChildren(); var index:Number = getChildIndex(_bg); addChildAt(_pro...

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

230. laya.ui.AdvImage [ 74%]

...read-only] 对象的显示高度(以像素为单位)。 Sprite displayWidth : Number[read-only] 对象的显示宽度(以像素为单位)。 Sprite drawCallOptimize : BooleanSprite filters : Array滤镜集合。可以设置多个滤镜组合。Sprite globalRotation : Number[read-only] ...

来源: Laya2.0_api 发布时间: 20190513