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

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

161. 鼠标交互-鼠标交互 [ 86%]

...Handler; // 不支持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"; Stat.show(); this.setup(); } set...

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

162. 鼠标交互-鼠标交互 [ 85%]

...tion() { // 不支持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"; setup(); })(); function setup() { createIn...

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

163. Uint8Array的像素数据在ios中无法改变图片纹理,安卓正常 [ 85%]

...testSetPixels() { let data = this.test1.texture.getPixels(0, 0, this.test1.width, this.test1.height); let width = this.test1.width; let height = data.length / 4 / width; let tex2d = new Laya.Texture2D(width, height, 1); tex2d.setPixels(data); this.imgAr.texture.setTo(tex2d); } 附件 : --> demo.zip ...

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

164. 在安卓手机上drawToTexture不能正确返回纹理对象,是HTMLCanvas [ 85%]

...exture = Laya.Sprite.drawToTexture(dragCom,Laya.SpriteConst.TEXTURE,bounds.width, bounds.height, -bounds.x + view.x, -bounds.y + view.y); this._agent.graphics.drawTexture(this._agentTexture, (this._agent.width - bounds.width) * 0.5, (this._agent.height - bounds.height) * 0.5);   }   附件 : --> 2...

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

165. 绘制能力 · LayaAir3.4 · 引擎文档 · LAYABOX [ 85%]

...寸的百分比,当不勾选时,矩形的尺寸为像素大小。 Line Width:绘制矩形的边框宽度值。 Line Color:绘制矩形的边框颜色。 Fill Color:矩形填充的颜色。 动图2-2演示了这些属性的操作过程: (动图2-2) 2.2 代码绘制矩形 LayaAir引擎...

来源: Laya3.0_文档 发布时间: 20251010

166. 屏幕适配-缩放-No Scale [ 85%]

...d(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_NOSCALE { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.s...

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

167. 屏幕适配-缩放-No Border [ 85%]

...d(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_NOBORDER { private rect: Sprite; constructor() { Laya.init(550, 400); Laya....

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

168. Error: 代码包大小为 5533 kb,上限为 4096 kb,请删除文件后重试? [ 85%]

...就没有功能。 class Main { constructor() { console.log(Laya.Browser.width, Laya.Browser.height); this.current = { x: 0, y: Laya.Browser.height }; // Laya.stage.bgColor = "#3F51B5"; this.sp = new Laya.Sprite(); Laya.stage.addChild(this.sp); } render() { console.log("render"); var l = [ 0, 0, 0, ...

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

169. 3D中摄像机绕物体旋转该如何实现? [ 85%]

.... /// </summary> public center: Transform3D; /// <summary> /// Width of area. /// </summary> public width: number; /// <summary> /// Length of area. /// </summary> public length: number; /// <summary> /// Constructor. /// </summary> /// <param name="cente...

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

170. 屏幕适配-缩放-Show All [ 85%]

...d(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_SHOW_ALL { private rect: Sprite; constructor() { Laya.init(550, 400); Laya....

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