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

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

91. ☆☆☆☆☆☆☆☆☆☆☆每增加一个 view 都会增加一个 drawcall 吗 ☆☆☆☆☆☆☆☆☆☆☆ [ 86%]

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

92. Slider控件的标签不居中 [ 86%]

....height) * 0.5 + _bar._y; } else { label.y = _bar._y - 20; label.x = (_bar.width - label.width) * 0.5 + _bar._x; } } }在Slider类里面显示改变标签使用的是label.textField.changeText,导致label不会重新计算尺寸,后面的坐标计算使用的label.width不能反映label的真实...

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

93. 【简单跑酷--JS版】---Lv.6 终篇 [ 86%]

...lay.Sprite); var _proto = Hp.prototype; _proto.init = function(type){ this.width = 180; this.height = 21; var texture1 = Laya.loader.getRes("res/hp_bg.png"); var texture2; switch (type) { case Hp.HP_TYPE_ENERGY: texture2 = Laya.loader.getRes("res/en_bar.png"); break; case Hp.HP_TYPE_SPEED: texture2 ...

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

94. DOM元素-表单输入 [ 86%]

...rm = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10; var rowHeightDelta = this.rowSpacing + this.rowHeight; // 显示左侧标...

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

95. 设置滤镜(ActionScript-LayaAir基础篇(AS3)-位图) [ 85%]

...Main() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(t...

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

96. laya的drawToTexture太坑 [ 85%]

...ounds = view.getSelfBounds(); let texture = view.drawToTexture(bounds.width, bounds.height, -bounds.x + view.x, -bounds.y + view.y) as laya.resource.Texture; shadow.graphics.drawTexture(texture, bounds.x, bounds.y, bounds.width, bounds.height, null, 0.3); shadow.pos(view.x, view.y);...

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

97. 分享个用美术资源做位图文本的方法。。。 [ 85%]

...ER: string = "center"; constructor(jsonData: any,textureData: Laya.Texture,width: number,posType:string = "left"){ super(); this.width = width; this._posType = posType; this._jsonData = jsonData; this._imageData = textureData; } public set padding(v: number){ this._padding = v; this.setCharsPos(); }...

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

98. 求问sprite放大后,graphics绘制的图像位置偏移 [ 85%]

...getRes(this.skin_img1); sprite.graphics.drawTexture(texture, 0, 0, texture.width, texture.height); sprite.size(texture.width, texture.height); let x: number = 300; let y: number = 100; let scaleRatio: number = 1.3; sprite.pos(x, y); // sprite.graphics.drawCircle(texture.width/2, texture.height/2, 10...

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

99. laya.display.cmd.DrawTrianglesCmd_API3.0 [ 85%]

...lesCmd.ts:13 Methods getBoundPoints getBoundPoints(sp?: { height?: number; width: number }): number[] Defined in laya/display/cmd/DrawTrianglesCmd.ts:96 Parameters Optional sp: { height?: number; width: number } Optional height?: number width: number Returns number[] recover recover(): void Defined ...

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

100. DOM元素-表单输入 [ 85%]

...rm = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10; let rowHeightDelta = this.rowSpacing + this.rowHeight; // 显示左侧标...

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