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

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

401. laya.display.Sprite_API3.0 [ 74%]

...0;//设置 shape 对象相对于父容器的垂直方向坐标值。 shape.width = 100;//设置 shape 对象的宽度。 shape.height = 100;//设置 shape 对象的高度。 shape.pivotX = 50;//设置 shape 对象的水平方法轴心点坐标。 shape.pivotY = 50;//设置 shape 对象的垂直方...

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

402. 关于微信小游戏的开放数据域,请问如何将开放数据域的canvas绘制到layaair的image上? [ 74%]

...018-05-03 0 0 分享 微博 QZONE 微信 。。 赞同来自: sharedCanvas.width = width*pixelRatio; sharedCanvas.height = height*pixelRatio; sendMessage({ mission: Mission.RESIZE, width:width, height: height });  wx.onTouchStart(onTouchStart); wx.onTouchMove(onTouchMove); wx.onTouchEnd(onTouchEnd)...

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

403. 请问HTMLDivElement怎么加垂直滚动条 [ 74%]

...现滚动条而且还漏了。 var str = "<div style='position:absolute;width:495px;height:329px;overflow-y:scroll;border-width:1px;border-color:Red;border-style:solid;font-size:16px;color:#fff;'><p style='color:#999;right:20px'>2021-01-21 10:25:10</p>bbb>>bbb 加入了聊天...

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

404. 精灵 · LayaAir3.4 · 引擎文档 · LAYABOX [ 74%]

...atlas/comp/image.png"); //纹理:图片路径 this.sprite.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置:屏幕中心 this.sprite.x = Laya.stage.width/2; //x、y分别设置位置 this.sprite.y = Laya.stage.height/2; this.sprite.size(512, 313); //大小 this.sprite.widt...

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

405. 分享一个Shader版的CoolDown实现 [ 74%]

...     vbArray = new Array<number>();                 var texWidth: number = texture.width;                 var texHeight: number = texture.height;                 //定义颜色值,取值范围0~1 浮点。                 const red: number = 1;         ...

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

406. 字体切片组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 74%]

...,此方法只执行一次 onAwake(): void { this.fontclp.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.fontclp.size(500, 60); //大小 this.fontclp.pivot(this.fontclp.width/2, this.fontclp.height/2); //轴心点 this.fontclp.skin = "atlas/comp/fontClip_num.png"; thi...

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

407. LayaAir和原生DOM交互(JavaScript-2D进阶篇(JS)-扩展模块) [ 74%]

...t.createElement("div"); this.qrcode = new Laya.Browser.window.QRCode(div,{ width:100, height:100 }); var url = "http://layabox.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); function clickHandler(){...

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

408. 屏幕适配-自动横屏 [ 74%]

...or = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y = Laya.stage.height - text.height >> 1; Laya.stage.addChild(text); } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import WebGL = Laya.WebGL; export class SmartScale_La...

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

409. 屏幕适配-自动竖屏 [ 74%]

...or = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y = Laya.stage.height - text.height >> 1; Laya.stage.addChild(text); } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import WebGL = Laya.WebGL; export class SmartScale_Po...

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

410. 请教文档中Graphic.drawTextures方法第二个参数的具体参数格式 [ 73%]

...批量绘制同样纹理。 是把 x X 轴偏移量。 y Y 轴偏移量。 width 宽度。 height 高度。 m 矩阵信息。 把这几个参数组成一个json对象,然后再把多个json组成数组传入吗? 像这样吗drawTextures(texture, [{x:0, y:0, width:128, height:64}, {x:128, y:0, wi...

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