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

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

921. Laya.stage.on(Laya.Event.RESIZE,this, this.ChangeSize); [ 53%]

Laya.stage.on(Laya.Event.RESIZE,this, this.ChangeSize); private ChangeSize() {         console.log("---------------")         if(Laya.Browser.window.innerHeight < Laya.Browser.window.innerWidth) {             console.log("横屏")         } else {             console.log(...

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

922. Shader预编译解决方案 [ 53%]

...============================== 方案1:官方接口编译         private $compileShader(model: Laya.Sprite3D) {         if (model instanceof Laya.ShuriKenParticle3D) {             var shuriKenParticle3D: Laya.ShuriKenParticle3D = model as Laya.ShuriKenParti...

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

923. 关于禁止panel的滑动事件 [ 53%]

...geHandler = new Laya.Handler(this, this.onScrollFunc, [hScrollBar.value]); private onScrollFunc (value : number) { this.hScrollBar.value = value; }抬起时设置为null,就可以了 2019-02-20 1 0 分享 微博 QZONE 微信 qian 赞同来自: 禁止panel的滚轮和手动滑动,除了拖动滚...

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

924. 创建laya的视图销毁destroy()清除不了 [ 53%]

...destroy()清除不了。  class Mail2View extends laya.display.Sprite { private display:ui.mail.mail2UI; constructor(){ super(); this.display = new ui.mail.mail2UI(); this.addChild(this.display); } public destroy():void { this.display.destroy(); this.display.removeSelf(); super.destroy(); } }就是...

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

925. 在Canvas模式下 drawTexture出错 [ 53%]

...01-19 09:20 public function Test1View() { Laya.timer.loop(10,this,draw); } private function draw():void { texture = Laya.loader.getRes("comp/lhjicon_5.png"); var temp:Texture = Texture.createFromTexture(texture,0,0,texture.sourceWidth/2,texture.height/2); IconSpr.graphics.drawTexture(temp,...

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

926. 分享:LayaAir下如何加载和使用.JSON文件! [ 53%]

...ader.load("unpack.json",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("unpack.json"); var str:String=JSON.stringify(json); trace(str); } } } 2017-08-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结...

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

927. 为什么list不能滑动,怎么让list滑动 [ 53%]

为什么list不能滑动,怎么让list滑动     private refleshList():void { //设置列表渲染单元格为Item类(注:必须是类,不能是实例化对象,Item需类继承于Box) // this.gradeList.vScrollBarSkin = ""; this.gradeList.itemRender = GradeItem; //列表显示区单...

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

928. Laya.stage.on(Laya.Event.DISPLAY,this,this.ddddd); 无法监听到。 [ 53%]

... public function AAA() { super(); this.on(Event.DISPLAY,this,onDisplay); } private function onDisplay():void { alert("display"); } } } 2017-02-14 0 0 分享 微博 QZONE 微信 hfeiop12 赞同来自: 已经解决! 2017-02-14 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 ...

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

929. image.skin = base64 无效 [ 53%]

...100, "#ff0000"); Laya.stage.addChild(sp); sp.pos(100, 100); drawToc(sp); } private function drawToc(sp:Sprite):void { var canvas:HTMLCanvas= sp.drawToCanvas(100, 100, 0, 0); var ct:*= canvas.getContext("2d").canvas; var bs64:String = ct.toDataURL(); trace(bs64); var img:Image; img = new Image(); img...

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

930. ls文件导入错误 [ 53%]

...loader.create(this.strScene, Laya.Handler.create(this, this.onLoadScene)); private onLoadScene() { var scene: Laya.Scene = Laya.Scene.load(this.strScene); if (scene == null) { return; } this.mScene = scene;   大致的流程如上   错误堆栈:   2018-04-18 0 0 分享 微博 QZONE 微信 Appl...

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