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

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

501. native2.0压缩纹理如何使用 [ 56%]

...e();     spr.loadImage("res/1.pkm");     spr.pos(100, 100);     Laya.stage.addChild(spr); }), null, Loader.IMAGE); 附件就是tp转的图片,这个是加载的代码 1.zip 2018-12-20 0 0 分享 微博 QZONE 微信 karin666 赞同来自: 请问1.7.19能使用压缩纹理吗? 2018-12-24 0 0...

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

502. 如何对3D精灵进行鼠标检测(JavaScript-3D基础(JS)-LayaAir3D之鼠标交互) [ 56%]

...g/1.png)(图1) ```typescript { //在舞台上添加鼠标事件监听 Laya.stage.on(Laya.Event.MOUSE_DOWN,this, this.onMouseDown); } //点击触发事件 onMouseDown() { //记录点击到舞台上的点 this.point.x = Laya.MouseManager.instance.mouseX; this.point.y = Laya.MouseManager.instance.mouse...

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

503. 如何对3D精灵进行鼠标检测(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 56%]

...g/1.png)(图1) ```typescript { //在舞台上添加鼠标事件监听 Laya.stage.on(Laya.Event.MOUSE_DOWN,this, this.onMouseDown); } //点击触发事件 onMouseDown() { //记录点击到舞台上的点 this.point.x = Laya.MouseManager.instance.mouseX; this.point.y = Laya.MouseManager.instance.mouse...

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

504. laya.map.TileAniSprite_API3.0 [ 56%]

...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

505. laya.html.dom.HTMLDivElement_API3.0 [ 56%]

...xtWidth customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation globalScaleX globalScaleY graphics height hideFlags hitArea innerHTML is3D mask mouseEnabled mouseX mouseY numChildren parent pivotX pivotY rotation scaleX scaleY scene scrollRect...

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

506. getRes加载场景报错 [ 56%]

...= Laya.loader.getRes("LayaScene_04_laya/04_laya.ls") as Laya.Scene3D; Laya.stage.addChild(that.scene); // 报错如下:   //2.实例化场景 var scene:Laya.Scene3D = Laya.loader.getRes("LayaScene_04_laya/04_laya.ls") as Laya.Scene3D; //同预加载时的url// 报错如下:     附件 : --> H...

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

507. 为什么hitTestPoint始终是false? [ 56%]

...ya.Image("comp/bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } private hitPoint(e:Laya.Event): void { console.log(this.s.hitTestPoint(e.stageX, e.stageY)); } } 很简单的代码,不知道什么hitTestPoint始终得到的是false.我...

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

508. clearRes好像没作用,或许我的用法不对 [ 56%]

...正如下     constructor() {         super();         Laya.stage.on(Laya.Event.KEY_UP, this, this.onKeyUp);     }     onKeyUp(e: Laya.Event) {         if (e.keyCode == 65) {//A             console.log("释放资源false")             Laya.loader.clearRes(...

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

509. 分享:使用 graphics.clipRect 的注意事项 [ 56%]

....drawRect(0,0,400,400,"#ffffff",null,1);   sp.graphics.restore();   Laya.stage.addChild(sp); 2、使用graphics.clipRect之后裁剪区域没有显示、生效?   出现这个问题的话就是顺序错了。必须要先clipRect之后再drawRect。不然就不会显示生效! 2016-08-18 添...

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

510. scrollRect 改变后子对象的鼠标事件失效 [ 56%]

...ollRect 改变后子对象的鼠标事件失效 bg=new Laya.Sprite(); Laya.stage.addChild(bg); bg.size(800,600); bg.loadImage("aa_1.Png",0,0,800,600); poly=new Laya.Sprite(); bg.addChild(poly); poly.size(36,36); poly.pivot(18,18); poly.loadImage("SafeExitL.png",0,0,36,36); poly.pos(400,300); poly.on...

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