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

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

1671. 微信小游戏截屏分享 [ 72%]

...相关的链接 提交 1 个回复 坚果 赞同来自: 183*****291 、₩ var htmlC = sp.drawToCanvas(width, height, 0, 0); var canvas = htmlC.getCanvas(); canvas.toTempFilePath({ x: 0, y: 0, width: width, height: height, destWidth: width, destHeight: height, success: function (res) { wx.shareAppMe...

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

1672. laya.ui.Tree_API3.0 [ 72%]

....create(this, onLoadComplete)); } private function onLoadComplete():void { var xmlString:String;//创建一个xml字符串,用于存储树结构数据。 xmlString = "<root><item label='box1'><abc label='child1'/><abc label='child2'/><...

来源: Laya3.0_api 发布时间: 20231115

1673. laya接入fairyGUI的时候资源加载方式? [ 72%]

... } pkg = fgui.UIPackage.addPackage(resKey, descData); } let allatlas = {}; var loadData = []; //var会声明提前 for (let key in pkg._sprites) { if (pkg._sprites.hasOwnProperty(key)) { let element = pkg._sprites[key]; if (!allatlas[element.atlas.file] && !Laya.loader.getRes(element.atlas.f...

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

1674. Cannot read property 'un' of undefined [ 72%]

...小游戏的时候,在code.jsh中包含 (function(window,document,Laya){ var __un=Laya.un } 在小程序的ide中就会报错 Cannot read property 'un' of undefined 2018-07-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 ...

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

1675. 代码里能控制图片的锚点吗? [ 72%]

代码里能控制图片的锚点吗? var heroidstr = "role/herohead"+Hero.getHeadID()+".png"; m_herohead = new Image(); var texture = Laya.loader.getRes(heroidstr); m_herohead.graphics.drawTexture(texture); m_herohead.anchorX = 0.5; m_herohead.anchorY = 1; m_herohead.pos(m_heroPosX,m_heroPosY); ...

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

1676. 写消消乐游戏, 如何在tiledMap格子中添加精灵? [ 72%]

...加精灵?   // TiledMap 5X5格子地图 this.tMap = new Laya.TiledMap(); var viewRect = new Laya.Rectangle(-50,-50,Laya.Browser.width,Laya.Browser.height); this.tMap.createMap("res/map/map.json",viewRect); // 精灵 var sp = new Laya.Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#FF0000", "#0000...

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

1677. 分享一个虚拟摇杆,比较粗糙,没做优化 [ 72%]

...eX = e.stageX; this.moveY = e.stageY; this.isMode = "run"; // 获取半径 var r = Math.sqrt(Math.pow((this.starX - this.moveX), 2) + Math.pow((this.starY - this.moveY), 2)); //当移动半径大于大圆的半径时,半径等于大圆的0.5的宽度(也就是半径) if (r >= this.moveMax.w...

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

1678. 图文混排聊天室之WebSocket服务器的疑问 [ 72%]

...ron 赞同来自: 在编译出来的js 最前面加上下面这两行    var window = window || global; var document = document || (window.document = {}); 2018-07-15 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起...

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

1679. 使用localToGlobal方法获取list单元格错误不准确 [ 72%]

...的box单元格是同一个 localToGlobal: function (ele, flag) {      var point = new laya.maths.Point(ele.pivotX, ele.pivotY);     // flag = flag ? true : false;     return ele.localToGlobal(point, flag);  }   console.log(box); var targetXY = Utils.localToGlobal(box, false);  console.l...

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

1680. Texture内存回收(ActionScript-2D进阶篇(AS3)-性能优化) [ 72%]

....Stat; import laya.webgl.WebGL; public class ClearTextureResTest { private var sp:Sprite; public function ClearTextureResTest() { WebGL.enable(); Laya.init(1000, 800); //显示一个图片 sp = Sprite.fromImage("res/bg.jpg"); Laya.stage.addChild(sp); //显示一个动画 var ani:Animation = new Anim...

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