大约有 318 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0071 秒)
...sp.loadImage("comp/hug.png"); //读取大分辨率图片 无法显示 Laya.stage.addChild(sp); } } new GameMain();//问题描述 客户要求使用LAYA引擎打开一张图片 可以随意拖动缩放, 由于图太大, 选择使用WebGL模式打开图片 以上代码当图片分辨率不太大时 ...
来源: Laya_社区 发布时间: 20180314
...Distance = Vector3.distance(this.transform.position, this.AroundPos); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouse...
来源: Laya_社区 发布时间: 20190224
...() { Laya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 onInit(); } private function onInit():void { sprite = new Sprite();//创建一个 Sprite 类的实例对象 sprite 。 sprite.loadImage("resource/ui/bg.png");//加载...
来源: Laya3.0_api 发布时间: 20231115
...为没有一系列的加载回调,所以这一行一定会执行。 Laya.stage.on(Laya.Event.RESIZE, this, Laya.Utils.fitDOMElementInArea, [videoElement, reference, 0, 0, reference.width, reference.height]); 3) 而你的代码里并不会执行这一行,你完全拷贝示例代码,会发现是...
来源: Laya_社区 发布时间: 20200703
... `window` ,需要使用 `$global.window`。 5.淘宝创意互动 `Laya.stage.alignV`(@default : **top** ) 与 `Laya.stage.alignH`(@default : **left**) 都只支持默认值。 6.暂不支持实验版 TS 项目。 7.不支持横屏模式。 ### 五.关于全局变量 淘宝创意互动项...
来源: Laya2.0_文档 发布时间: 20210714
...机预览显示异常 官网示例摇一摇报错,就解决方案 修改stage的scale后,会发生异常情况 怎么讲layaAir里的显示对象添加到matter.js里的物理引擎世界里 官方新手游戏引导示例中关于hit和unHit的使用疑问 LayaAir2D示例 Mac 2.0.0beta3 Chrome...
来源: Laya_社区 发布时间: 20180309
...gamebox.x = Laya.Browser.width; gamebox.visible = true; Laya.stage.addChild(gamebox); // Tween.to(beginbox,{x:-Laya.Browser.width},1000,null,); Tween.to(beginbox,{x:-Laya.Browser.width},1000,null,Handler.create(this,onTweeed)) Tween.to(gamebox,{x:0},1000); c...
来源: Laya_社区 发布时间: 20170104
...div.innerHTML="<img src='res/atlas/test.png'/>" Laya.stage.addChild(div); } TypeError: Illegal constructor laya.core.js:11687 at Function.getInstance (file:///D:/work/test2/bin/libs/laya.core.js:11687:24) at Function.getInstance (file:///D:/work/test2/bin/li...
来源: Laya_社区 发布时间: 20190926
...ponents customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation globalScaleX globalScaleY graphics height hideFlags hitArea is3D mask mouseEnabled mouseX mouseY numChildren parent pivotX pivotY rotation scaleX scaleY scene scrollRect skewX ske...
来源: Laya3.0_api 发布时间: 20231115
...init() { // 设置背景色为场景高度 this.box_color_bg.height = Laya.stage.height; } onEnable() { this.init(); // 判定是注册还是忘记密码 if (GameData.I.isReg) { this._regMode(); } else { this._forgetMode(); } // 添加取消事件 this.lb_cancel.on(Laya.Event.CLICK, this, () => {...
来源: Laya_社区 发布时间: 20200410