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

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

501. 为啥 增加 Text ,drawcall 暴增 ?????????????? [ 79%]

...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_社区 发布时间: 20180517

502. laya.d3.resource.BaseTexture [ 79%]

... BaseTexture  source : *[read-only] 获取纹理资源。 BaseTexture  width : int[read-only] 获取宽度。 BaseTexturePublic Methods  MethodDefined By  BaseTexture() 创建一个 BaseTexture 实例。 BaseTextureProperty DetaildefaulteTexturepropertydefaulteTexture:BaseTexture  [read-onl...

来源: laya_api 发布时间: 20170929

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

...awCanvas 的一个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+...

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

504. 区块地图-PerspectiveWall [ 79%]

...../../res/tiledMap/perspective_walls.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), null); } })();module laya { import Stage = Laya.Stage; import TiledMap = Laya.TiledMap; import Rectangle = Laya.Rectangle; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Tile...

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

505. 分享一个自己做的游戏公告功能,跑马灯效果 [ 79%]

...               </span>" constructor() { super() this.width = 1200 this.height = 55 this.visible = false this.pos(565,150) this._createHorn() this._createBg() this._createView() this.on(Laya.Event.UNDISPLAY,this,this.stop) this.on(Laya.Event.DISPLAY,this,this.play) } /** 创建...

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

506. 引擎示例中的新手引导自己写了一次,不知道为什么无法实现点击。 [ 79%]

...e/crazy_snowball.png", Handler.create(this, init)); function init(e) { var width = stage.width; var height = stage.height; var bg = new Sprite(); stage.addChild(bg); bg.texture = e; bg.on("click", this, onClick); var guideContainer = new Sprite(); stage.addChild(guideContainer); guideContainer.mouse...

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

507. typescipt在一定范围内加载图片按照等比排列 [ 79%]

...min是右边的效果             let ratio = Math.max(source.width, source.height) / 100;             img.width = source.width / ratio;             img.height = source.height / ratio;         }     }     reset();     img.on(Laya.Event.LOADED, ...

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

508. 动画-新版骨骼动画 [ 79%]

...er.pixelRatio, Laya.Browser.pixelRatio); changeActionButton.pos(Laya.stage.width / 2 - changeActionButton.width * Laya.Browser.pixelRatio / 2, Laya.stage.height - 100 * Laya.Browser.pixelRatio); changeActionButton.on(Laya.Event.CLICK, this, function () { //根据名称播放动画 zombieAnimator.pla...

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

509. 屏幕适配-缩放-No Border [ 79%]

....rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_NOBORDER();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_NOBORDER { private rect: Sprite; construc...

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

510. 屏幕适配-缩放-No Scale [ 79%]

....rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_NOSCALE();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_NOSCALE { private rect: Sprite; constructo...

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