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

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

371. 动画实例在调用含有名字参数的时候获取不到边界 [ 76%]

...t[i].getGraphicBounds(); this.playerUnit[i].pivot(bounds.width / 2, bounds.height / 2); this.playerUnit[i].scaleX=300/bounds.width; this.playerUnit[i].scaleY = 300/bounds.height; this.playerUnit[i].pos(200,400); Laya.stage.addChild(this.playerUnit[i]); } this.playerUnitReady+=1; } enemyUnitLoaded(){...

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

372. matter中layasprite怎么改变图片大小? [ 76%]

...以通过getbounds获取显示对象图像的实际高度。</p> */ height: number; 2018-09-04 1 1 分享 微博 QZONE 微信 阿耀 赞同来自: srr5220 role对象有个layaSprite属性,这个layaSprite就是一个普通的sprite对象,改变这个对象的大小即可。 不过要注意...

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

373. 设置cacheAs = bitmap时, drawCanvas 的一个bug [ 76%]

...个bug drawCanvas(canvas: HTMLCanvas, x: number, y: number, width: number, height: number): void { if (!canvas) return; var src: Context = canvas.context as Context; var submit: ISubmit; if (src._targets) { //生成渲染结果到src._targets上 /* this._submits[this._submits._length++] = SubmitCanv...

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

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

...tmap"; _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 { _colorSpr.on(Event.MOUSE_MOVE, th...

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

375. 文本-滚动文本 [ 76%]

...WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createText(); } createText() { const Text = Laya...

来源: Laya2.0_示例 发布时间: 20251209

376. TiledMap 45度地图块渲染顺序问题 [ 76%]

...1 0 2 分享 微博 QZONE 微信 cheneboy 赞同来自: 附上JSON跟图{ "height":10,  "infinite":false,  "layers":[         {          "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

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

377. Laya3D [ 76%]

...celLoadByUrl(url:String):void[static] private Laya3D  init(width:Number, height:Number, config:Config3D = null, compolete:Handler = null):void[static] 初始化Laya3D相关设置。 Laya3DPublic Constants ConstantDefined By  ANIMATIONCLIP : String = ANIMATIONCLIP[static] AnimationClip资源。L...

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

378. 为什么HMLDivElement会在这个地方换行? [ 76%]

... = 450; style.wordWrap = true; cell.divChat.innerHTML = data.message; cell.height = cell.divChat.contextHeight;   这是设置参数  文本内容是 "<img src = 'common/img_chat_5.png' style = 'width:53px;height:27px'></img><span style = 'color:#ff8135;font:22px;valign:top'>[魏...

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

379. 性能测试-卡通人物 [ 75%]

...// 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.bgColor = "#232628"; Stat.show(); Laya.loader.load("../../res/cartoonCharacters/cartoonCharactors.json", Handler.create(this, createCharacters), null, Loader.ATLAS); })(); function createCharacters(...

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

380. Text.as中parseLines方法里的问题 [ 75%]

...rrBitmapFont) { _charSize.width = _currBitmapFont.getMaxWidth(); _charSize.height = _currBitmapFont.getMaxHeight(); } else { var measureResult:* = Browser.context.measureText(_testWord); _charSize.width = measureResult.width; _charSize.height = (measureResult.height || fontSize); } var lines:Array =...

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