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

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

831. tiledMap问题,getTileProperties获取地图属性不能获取到 [ 59%]

...a.TiledMap(); this.map.createMap(this.MAP_URL, new Laya.Rectangle(0,0,Laya.stage.width, Laya.stage.height), new Laya.Handler(this, this.onMap)) }  private onMap(){ var idx = this.map.getLayerByIndex(0).getTileDataByScreenPos(20,20); var pass = this.map.getTileProperties(0,idx - 1,'pass'); console.l...

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

832. JSON文件加载成功后,怎么解析成Object对象 [ 59%]

...ext(); txt.mouseEnabled = false; txt.overflow = Text.SCROLL; txt.size(Laya.stage.width, Laya.stage.height); txt.pos(10, 10); txt.fontSize = 30; txt.wordWrap = true; txt.color = "#FF9632"; Laya.stage.addChild(txt); var test:Object = JSON.parse('{"id": 0, "name": "Chen"}'); traceMsg(test['id']); trace...

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

833. List组件拖动浏览时item会出现重叠的现象 [ 59%]

...数 list.repeatX = 1; list.repeatY = 4; // list居中显示 list.x = (Laya.stage.width - ListDataSourceItem.WID) / 2; list.y = (Laya.stage.height - ListDataSourceItem.HEI * list.repeatY) / 2; // 使用但隐藏滚动条,滚动条水平滚动 list.vScrollBarSkin = ""; // list.vScrollBarSkin 滚动条...

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

834. Laya.Sprite loadImage 参数问题 [ 59%]

...始化舞台 Laya.init(1334,750,Laya.WebGL); //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; //原始位图 this.createImg(100,50); //红色滤镜 this.creteRedFilter(); //灰色滤镜 this.createGrayFilter(); } /**创建位图**/ private createImg(w:number,h:number):Laya.Sprite{ var Img:Lay...

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

835. texture2D的setPixel纹理rgba数据之后会随着窗口的缩放,渐变成黑色 [ 59%]

...exture:Laya.Texture2D; private box; constructor(){ Laya3D.init(0, 0); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(new Laya.Scene3D()) as Laya.Scene3D; var camera = scene.addChild(new Laya.Camera(0, 0....

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

836. 分享:Graphics下cmds命令流的使用! [ 59%]

...monkey3.png') as Texture; //绘制纹理 var box:Sprite=new Sprite(); Laya.stage.addChild(box); box.graphics.drawTexture(texture1,50,50,0,0,new Matrix(),0.5); box.graphics.drawTexture(texture2,200,50,0,0,new Matrix(),0.5); box.graphics.drawTexture(texture3,350,50,0,0,new Matrix(),0.5); box.graphics....

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

837. 在微信小游戏中,主域中显示开发域的list为什么显示不全? [ 59%]

...rankList.renderHandler = new Laya.Handler(this, updateItem);     Laya.stage.addChild(rankList);     var data = ;     for (var i = 0; i < 10; ++i) {     data.push("https://wx.qlogo.cn/mmopen/vi_ ... 6quot;);     data.push("https://wx.qlogo.cn/mmopen/vi_ ... 6quot;);     dat...

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

838. 2.0的版本在ios下适配横竖屏有问题。 [ 59%]

...ios下第一次打开是OK的,但是一转屏立马出现问题。 Laya.stage.width,Laya.stage.height立马出现问题,不能正确的获取屏幕的宽高,而且显示很奇怪。 至于demo 官方2.0实例里面的demo就能说明问题 ,附上链接 https://layaair.ldc.layabox.com/demo2/...

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

839. 这样的panel请问如何实现比较好? [ 59%]

...入口 class GameMain { constructor() { Laya.init(500, 1000, WebGL); Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_WIDTH; var resPath = ['res/atlas/comp.atlas']; Laya.loader.load(resPath, new Laya.Handler(this, function () { var textUi = new TextUI(); Laya.stage.addChild(textUi); }), null, Laya.Load...

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

840. 界面相对位置适配 [ 59%]

界面相对位置适配 适配模式使用  Laya.Stage.SCALE_FIXED_WIDTH 然后设置 top buttom left right  layoutEnabled 也设置true了,但是界面子对象依旧是编辑器里面的位置没有改变 2019-06-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结...

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