大约有 1,451 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0075 秒)
Laya_社区(932) Laya2.0_文档(177) Laya_示例(132) Laya2.0_示例(115) Laya3.0_api(61) Laya3.0_文档(32) laya_api(1) Laya2.0_api(1)
...pt module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class Sprite_DrawShapes { private sp: Sprite; constructor() { Laya.init(500, 300); ...
来源: Laya2.0_文档 发布时间: 20210714
...n.height + 'px'; style.width = Math.floor(screen.height / Laya.stage.height * Laya.stage.width) + 'px'; document.body.appendChild(this.nativeImg) } onEnable() { Laya.timer.once(1000, this, this.delayShowImg); } delayShowImg() { ...
来源: Laya_社区 发布时间: 20230323
...ole = new Role(); this.RoleMap = new Laya.Sprite(); this.RoleMap.size(Laya.stage.width, Laya.stage.height/2); Laya.stage.addChild(this.RoleMap); this.RoleMap.addChild(this.Role); this.Role.pivot(16,24);// 图片32x48 this.Role.pos(100, 200); Role.js基础代码: var Role = ( function ( _super )...
来源: Laya_社区 发布时间: 20181012
...:Laya.Button=new Laya.Button(); btn.label="AAAAAA"; btn.pos(200,200); Laya.stage.addChild(btn); btn.on(Laya.Event.CLICK,this,()=>{console.log("click button");}); 请问 这样监听不到button的点击事件吗?如果我创建一个ui.view a a.on 也监听不到吗 2017-11-28 添加评...
来源: Laya_社区 发布时间: 20171128
...决游戏最小化退到后台后浏览器会强制1秒执行一次ILaya.stage._loop() ILaya.m_worker = new Worker("libs/sleepThread.js"); ILaya.m_worker.onmessage = function () { if (!ILaya.stage.isVisibility) { // console.log("_e...
来源: Laya_社区 发布时间: 20201201
...class demo { private down:Laya.Image; constructor() { // 鼠标事件 Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.onMouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.onMouseUp, [true]); } /** 按钮动画处理 */ private hitT...
来源: Laya_社区 发布时间: 20180731
...,可以带到下面那些东西怎么转成图片呢? var htmlC = Laya.stage.drawToTexture(Laya.stage.width,Laya.stage.height,0,0); this.ctx.graphics.drawTexture(htmlC, 0, 0,this.ctx.width,this.ctx.height); console.log(htmlC) console.log(htmlC.getPixels(0,0,this.ctx.width,this.ctx.height)) 能...
来源: Laya_社区 发布时间: 20191124
...检测本节点。当值为false时,会优先检测子节点,一直到stage上的全部节点都递归检测完毕。 1. Mouse Enabled: 默认为false,如果在脚本代码中监听鼠标事件,则会自动设置本对象及父节点的MouseEnabled属性值都为 true。但若将父节点...
来源: Laya3.0_文档 发布时间: 20251010
... 代码如下:package { import laya.display.Sprite; import laya.display.Stage; import laya.net.Loader; import laya.ui.Image; import laya.ui.List; import laya.utils.Handler; import laya.webgl.WebGL; public class Bootstrapper extends Sprite { protected var _list:List; protected var _items:Array; pro...
来源: Laya_社区 发布时间: 20170323
...rtrait { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.sc...
来源: Laya2.0_示例 发布时间: 20260303