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

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

431. 为啥 增加 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

432. laya.display.cmd.DrawLineCmd_API3.0 [ 79%]

...条曲线 Hierarchy DrawLineCmd Index Properties fromX fromY lineColor lineWidth percent toX toY ID Methods getBoundPoints recover Properties fromX fromX: number Defined in laya/display/cmd/DrawLineCmd.ts:14 X轴开始位置。 fromY fromY: number Defined in laya/display/cmd/DrawLineCmd.ts:18 Y轴...

来源: Laya3.0_api 发布时间: 20231115

433. drawTexture时,Matrix对象,a=-1,无法实现水平翻转 [ 79%]

...,a=-1,无法实现水平翻转 g.drawTexture(texture,100, 100, texture.width, texture.height, new laya.maths.Matrix(-1)); 为何无法实现水平翻转? 绘制的图片直接看不见了,如果不设置matrix.a = -1就不会出现。 2017-02-21 添加评论 免费帖 --> 分享 微博 QZONE ...

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

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

435. laya.display.cmd.DrawCircleCmd_API3.0 [ 79%]

...制圆形 Hierarchy DrawCircleCmd Index Properties fillColor lineColor lineWidth percent radius x y ID Methods getBoundPoints recover Properties fillColor fillColor: any Defined in laya/display/cmd/DrawCircleCmd.ts:27 填充颜色,或者填充绘图的渐变对象。 lineColor lineColor: any Defin...

来源: Laya3.0_api 发布时间: 20231115

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

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

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

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

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