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

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

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

502. 设置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

503. 区块地图-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_示例 发布时间: 20251209

504. 分享一个自己做的游戏公告功能,跑马灯效果 [ 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

505. 引擎示例中的新手引导自己写了一次,不知道为什么无法实现点击。 [ 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

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

507. 动画-新版骨骼动画 [ 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_示例 发布时间: 20251209

508. 屏幕适配-缩放-No Border [ 78%]

....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_示例 发布时间: 20251209

509. 屏幕适配-缩放-No Scale [ 78%]

....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_示例 发布时间: 20251209

510. 关于屏幕适配的问题(急) [ 78%]

...是通过宽度来缩放, Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_WIDTH;那就是我只要动态设计panel的宽高即可,但是直接把当前屏幕 Laya.Browser.height赋值给panel的高是不行的,还得*1336/Laya.Browser.width才能做到,想知道这是为什么,我发现Laya...

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