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

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

821. 如何用代码控制panel的vscroll滚动幅度 [ 67%]

...in='comp/vscroll.png'; panel.hScrollBarSkin='comp/hscroll.png'; Laya.stage.addChild(panel); //panel的子对象,,切忌要设置宽高,且宽高大于panel宽高 var bg:Sprite=new Sprite(); bg.loadImage("bg2.png",0,0,0,0,Handler.create(this,onLoadedImage,[panel])); bg.size(600,800); panel.addC...

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

822. 滤镜-颜色滤镜 [ 67%]

...pe = new Sprite(); ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); return ape; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import ColorFilter = Laya.ColorFilter; import Texture = Laya.Texture; import Browser = Laya.Browser; import Handler = Lay...

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

823. [LayaAir3]创建自由光源,形状是否有错误? [ 67%]

...      freelightLayer.y = startY + gap * 2;             this.owner.addChild(freelightLayer);              let freeStartX = 0;//startX + gap * 2;             let freeStartY = 0;//startY + gap * 2;             let freeformLight2D = freelightLayer.addComponent(Laya.FreeformLi...

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

824. 在UI类里调用启动类的静态函数失败了 [ 67%]

...= 99;//置最顶,这句话不写图层看不见 // info.init(); Laya.stage.addChild(info); } private onLoading(): void { var bj = new BeiJing(); Laya.stage.addChild(bj); } } new GameMain();   这个是我的UI类,我在这个类里调用GameMain.aaa();提示TypeError: GameMain.aaa is not a functi...

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

825. IOs使用手动删除本地资源再次进去加载问题 [ 67%]

...r.create(null, onLoaded2));      }  function onLoaded2() { Laya.stage.addChild(new TestUI()); }当用这种方式分步加载资源的时候 就会出现我说的情况  ios下会 安卓是正常, 第一步的资源会加载成功,第二部分的资源就加载失败 2018-07-31 0 0 分享 ...

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

826. 鼠标交互-双指缩放(多点触控) [ 67%]

...2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length == 2) { lastDistance = getDistance(touches); Laya.stage.on(Event.MOUSE_MOVE, this, o...

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

827. 粒子编辑器黑屏 [ 67%]

...把此信息截图给研发商 Uncaught TypeError: Cannot read property 'addChild' of null TypeError: Cannot read property 'addChild' of null     at Function.ViewRenderManager.show (file:///E:/LayaAirIDE_1.7.10_beta/resources/app/out/vs/layaEditor/h5/layabuilder.max.js:15196:27)     at Particl...

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

828. 缓动-时间线 [ 67%]

...Ape() { const Sprite = Laya.Sprite; this.target = new Sprite(); Laya.stage.addChild(this.target); this.target.loadImage("res/apes/monkey2.png"); this.target.pivot(55, 72); this.target.pos(100,100); } createTimerLine() { const TimeLine = Laya.TimeLine, Event = Laya.Event; this.timeLine = new TimeLine...

来源: Laya2.0_示例 发布时间: 20260303

829. putimagedata 不起作用 [ 67%]

...howApe() { // 方法1:使用loadImage var ape = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); // 方法2:使用drawTexture Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function() { var t = Laya.loader.getRes("../../res/apes/monkey2.pn...

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

830. 滤镜-颜色滤镜 [ 67%]

...eateApe() { const Sprite = Laya.Sprite; let ape = new Sprite(); Laya.stage.addChild(ape); apeTexture = Laya.loader.getRes(apePath); ape.graphics.drawTexture(apeTexture); return ape; } } new Filters_Color();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import ColorFilter = Lay...

来源: Laya2.0_示例 发布时间: 20260303