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

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

31. laya.display.Sprite [ 75%]

...alogManager, GridSprite, MapLayer, MovieClip, Particle2D, Scene, Skeleton, Stage, Text, TileAniSprite, Video Sprite 是基本的显示图形的显示列表节点。 Sprite 默认没有宽高,默认不接受鼠标事件。通过 graphics 可以绘制图片或者矢量图,支持旋转,缩放,...

来源: laya_api 发布时间: 20170929

32. 飞机大战地图滚动报错,麻烦看下? [ 74%]

... function bg_rolling() {     box = new laya.display.Sprite();     Laya.stage.addChild(box);     bg1 = new laya.display.Sprite();     bg1.loadImage("res/bg1.png");     box.addChild(bg1);     bg2 = new laya.display.Sprite();     bg2.loadImage("res/bg1.png");     bg2.pos(650, 0);     ...

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

33. Cannot read property 'toDefault' of undefined报错是什么原因 [ 74%]

...r.call(state); //从屏幕空间生成射线 this.point.elements[0] = Laya.stage.mouseX; this.point.elements[1] = Laya.stage.mouseY; this.camera.viewportPointToRay(this.point, this.ray); //11111111111111就是下面这句报错 Laya.Physics.rayCast(this.ray, this._outHitInfo, Number.MAX_VALUE, 10); ...

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

34. drawToCanvas内存泄漏 [ 74%]

...webglcanvas 后内存不会增加了    let htmlC: HTMLCanvas = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0);         if (htmlC) {             htmlC.toBase64("image/jpeg", 0.3, (base64) => {                 htmlC.releaseReso...

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

35. 图片加载问题 [ 74%]

...加载问题 var s:Sprite = new Sprite; s.loadImage("res/soil.png"); Laya.stage.addChild(s); chrome报错:Access to Image at 'file:///E:/study/LayaAirStudy/bin/h5/res/soil.png' from origin 'null' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access. 2017...

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

36. laya.ui.Slider [ 73%]

...,设置为true后,会变灰并且禁用鼠标。Component displayedInStage : Boolean[read-only] 表示是否在显示列表中显示。Node displayHeight : Number[read-only] 对象的显示高度(以像素为单位)。 Component displayWidth : Number[read-only] 对象的显示宽度(以...

来源: laya_api 发布时间: 20170929

37. dialog的popup方法不会关闭其他弹窗 [ 73%]

...log = new NormalDialog(context); this.normalDialog.popup(true, true); Laya.stage.addChild(this.normalDialog);  }  }     // 弹窗代码   class NormalDialog extends ui.normalDialogUI { constructor( text: string ) { super(); // 设置label文字 this.context.text = text; this.btn_close.on(Laya.E...

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

38. ToolTip鼠标悬停的使用 [ 73%]

...lic function ToolTipDemo() { Laya.init(Browser.width,Browser.height); Laya.stage.bgColor="#eeffcc"; Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { this._testTip=new TestTipsUI();//务必在Laya.init后去new实例,不可...

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

39. laya core 报错了 [ 72%]

...)     at RenderSprite3D.__proto._transform (laya.webgl.js:5779)     at Stage.__proto.render (laya.core.js:14540)     at Stage.__proto.render (laya.core.js:17340)     at Stage.__proto._loop (laya.core.js:17274)     at loop (laya.core.js:5061) 2017-11-15 0 0 分享 微博 QZONE 微信 Monica...

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

40. Tween的to方法完成缓动后的回调怎么写,Tween.to(beginbox,{x:-Laya.Browser.width},1000,null,aaa,0,false);aaa是一个测试方法 [ 72%]

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