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

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

801. tiledMap 45度地图在移动地图时出现没及时渲染的黑块 [ 79%]

...参数设置下就好了,我设置如下 var viewRect:Laya.Rectangle = new Laya.Rectangle(); var viewRectPadding:Laya.Rectangle=new Laya.Rectangle(256,256,256,256); this.tiledMap.createMap(path, new Laya.Rectangle(), new Handler(this, this.completeHandler),viewRectPadding); 2018-05-04 0 0 分享 ...

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

802. Laya.loader.load 教程代码出错 [ 79%]

...aya.init(600, 300);                          img = new Sprite();             var arr:Array = [];             for (index=0;index <=31;index++)             {                 var url:String = "../Res/Images/Role1/00011208_"+...

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

803. Native(android)下创建二维码并显示在页面上 [ 79%]

...64OfQrCode.length>0) {             let img:Laya.Image = new Laya.Image();             img.skin = "data:image/png;base64,"+base64OfQrCode;             img.pos(100, 300);             Laya.stage.addChild(img);         }     }      // android...

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

804. 使用Pool的时候创建的对象怎么传递参数 [ 79%]

...建的对象怎么传递参数 我之前是这样写的this.movingBlock = new MovingBlock(this.direction, movingBlockY), 但是这样每次都是new对象,太耗性能了,所以我用了这个,但是不知道怎么传递参数: this.movingBlock = Laya.Pool.getItemByClass( "movingBlock", Mo...

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

805. Clip属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 79%]

...nds(); this.createController(); } private showBg(): void { var bg: Image = new Image(this.bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg.width >> 1, Laya.stage.height - bg.height >> 1); Laya.stage.addChild(bg); } private createTimerAnimation(): void { this.counter = new Clip(this.clipSkin,...

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

806. HBox宽度计算问题 [ 79%]

...个label以及space的宽度之和才正常。代码如下 var hbox:HBox = new HBox(); hbox.align = Stage.ALIGN_MIDDLE; hbox.space = 50; // hbox.autoSize = true; var label:Label = new Label(); label.text = "https://ldc2.layabox.com/layadownload/"; label.fontSize = 30; label.mouseEnabled = false; hbo...

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

807. 背景加载不进来 [ 79%]

...度很小,可看成一个平面 var plane:MeshSprite3D = scene.addChild(new MeshSprite3D(new BoxMesh(4,4,0.001))) as MeshSprite3D; var material:StandardMaterial = new StandardMaterial(); material.diffuseTexture = Texture2D.load("res/threeDimen/layabox.png"); plane.meshRender.material = material; 2...

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

808. 删除节点的时候是用remove还是用destroy或者clear那种比较好号 [ 79%]

...无法得到子节点对象 服务端用什么语言开发比较好一些? new Laya.Sprite();绘制图形以后,怎么删除释放资源? layabox能不能由xml生成节点 3D 场景中 如何做出一道3D光束,像手电筒那种,有没有官方的demo? 怎么删除元素 删除场景中...

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

809. Sprite-旋转缩放 [ 79%]

...stage.bgColor = "#232628"; createApe(); })(); function createApe() { ape = new Sprite(); ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.x = Laya.stage.width / 2; ape.y = Laya.stage.height / 2; Laya.timer.frameLoop(1, this, animate); } function animate(e...

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

810. 鼠标交互-滑动 [ 79%]

...wTrack(); } function createSprtie() { const w = 50; const h = 30; button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) button.size(w, h); button.x = (Laya.stage.width - ...

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