大约有 417 项符合查询结果, 库内数据总量为 30,784 项。 (搜索耗时: 0.0046 秒)
Laya_社区(291) Laya2.0_示例(32) Laya_示例(27) Laya2.0_文档(23) laya_api(14) Laya2.0_api(13) Laya3.0_文档(13) Laya3.0_api(4)
... Stat.show(); this.setup(); } setup() { this.createSprite(); Laya.stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; let w = 200, h = 300; this.sp = new Sprite(); Laya.stage.addChild...
来源: Laya2.0_示例 发布时间: 20241123
...效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Event = Laya.Event; var Browser = Laya.Browser; var WebGL = Laya.WebGL; var sp; var preRadian = 0; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage...
来源: Laya_示例 发布时间: 20241123
...ya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; this.createSprite(); Laya.stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; let w = 30...
来源: Laya2.0_示例 发布时间: 20241123
...效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Event = Laya.Event; var Browser = Laya.Browser; var WebGL = Laya.WebGL; //上次记录的两个触模点之间距离 var lastDistance = 0; var sp; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clien...
来源: Laya_示例 发布时间: 20241123
...高效。(function() { var Stage = Laya.Stage; var Text = Laya.Text; var Event = Laya.Event; var Browser = Laya.Browser; var WebGL = Laya.WebGL; var logger, keyDownList; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.al...
来源: Laya_示例 发布时间: 20241123
...定位在左上角,导致点击事件偏移问题首先,请找到代码initevent initEvent(e, nativeEvent = null) { var _this = this; _this._event._stoped = false; _this._event.nativeEvent = nativeEvent || e; _this._target = null; var docElem = document.documentElement var win = document.defaultView...
来源: Laya_社区 发布时间: 20191227
...mer.frameLoop(1, this, this.keyboardInspector); } listenKeyboard() { const Event = Laya.Event; // 用Set实现更好一些 keyDownList = []; // 添加键盘按下事件,一直按着某按键则会不断触发 Laya.stage.on(Event.KEY_DOWN, this, this.onKeyDown); // 添加键盘抬起事件 Laya.stage...
来源: Laya2.0_示例 发布时间: 20241123
...ar Sprite = Laya.Sprite; var Stage = Laya.Stage; var Text = Laya.Text; var Event = Laya.Event; var Image = Laya.Image; var WebGL = Laya.WebGL; //所有适配模式 var modes = ["noscale", "exactfit", "showall", "noborder", "full", "fixedwidth", "fixedheight"]; //当前适配模式索引 var index = ...
来源: Laya_示例 发布时间: 20241123
...-08-23 0 0 分享 微博 QZONE 微信 asdf131 赞同来自: { this.on(laya.events.Event.MOUSE_DOWN ,this, this.onMouseDown); this.on(laya.events.Event.MOUSE_UP ,this, this.onMouseUp); } private onMouseDownX : number; private onMouseDownY : number; ...
来源: Laya_社区 发布时间: 20160823
...Sprite(); this.drawTrack(); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; const w = 50; const h = 30; this.button = new Sprite(); this.button.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否...
来源: Laya2.0_示例 发布时间: 20241123