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

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

51. UI-Input [ 88%]

...ad(skins, Handler.create(this, this.onLoadComplete)); } onLoadComplete() { for (let i = 0, len = skins.length; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMod...

来源: Laya2.0_示例 发布时间: 20251130

52. 为什么会出现报错 ani not found:ufo1_down [ 88%]

...,onLoop); } function onLoop() { // 遍历所有飞机,更改飞机状态 for(var i = Laya.stage.numChildren - 1; i > 0; i--) { // 接收舞台子对象 var role = Laya.stage.getChildAt(i); // 判断是否有飞机,并且是否有速度值 if(role && role.speed){ // 根据飞机速度...

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

53. getimagedata直接调用无法获取有效像素问题 [ 88%]

....getPixels(0,0,400,400)             console.log(x)             for (let i of x) {                 if (i > 0) {                     console.log(i)                 }             }             console.log(' ----- 到这里为止 只有上面的 有 ...

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

54. DOM元素-表单输入 [ 88%]

...nMode = Laya.Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#FFFFFF"; this.form = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10...

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

55. Sprite-缓存为静态图像 [ 88%]

...ew Sprite(); Laya.stage.addChild(textBox); // 随机摆放文本 let text; for (let i = 0; i < 1000; i++) { text = new Text(); textBox.addChild(text); text.fontSize = 20; text.text = (Math.random() * 100).toFixed(0); text.rotation = Math.random() * 360; text.color = "#ccc"; text.x = Math.random() * ...

来源: Laya2.0_示例 发布时间: 20251130

56. Morn下List组件如何给每一条列表添加Click事件,是需要for吗? [ 87%]

Morn下List组件如何给每一条列表添加Click事件,是需要for吗? 2015-12-24 1 条评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自:   在原生flash下,如果要给List组件的...

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

57. 性能测试-虫子(慎入) [ 87%]

...ameLoop(1, this, animate); } function initMaggots() { var maggotContainer; for (var i = 0; i wb.x + wb.width) x -= wb.width; if (y wb.y + wb.height) y -= wb.height; maggot.pos(x, y); } tick += 0.1; } })();module laya { import Sprite = Laya.Sprite; import Browser = Laya.Browser; import Handler = Laya...

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

58. 动画实例在调用含有名字参数的时候获取不到边界 [ 87%]

... this.enemyUnit.push(new Laya.Animation()); this.loadUnit(); } loadUnit(){ for(let i of this.playerUnit ){ i.loadAtlas(&quot;./character/m1.atlas&quot;,Laya.Handler.create(this,this.playerUnitLoaded)); } for(let i of this.enemyUnit){ i.loadAtlas(&quot;./character/m1.atlas&quot;,Laya.Handler.create(t...

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

59. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 87%]

...t; var pixelsInfo = texture.getPixels(); var aStarArr = []; var index = 0; for (var w = 0; w &lt; textureWidth; w++) { var colaStarArr = aStarArr[w] = []; for (var h = 0; h &lt; textureHeight; h++) { var r = pixelsInfo[index++]; var g = pixelsInfo[index++]; var b = pixelsInfo[index++]; var a = pixel...

来源: Laya3.0_文档 发布时间: 20230303

60. LayaAir开发笔记(1)五十音图连连看 [ 87%]

...,简化了下坐标计算。var card = ; var button = ; // 设定卡片 for (var i = 0; i &lt; 8; i++) { for (var j = 0; j &lt; 3; j++) { var index = 8 * j + i card[index] = new Laya.Sprite(); Laya.stage.addChild(card[index]); card[index].name = index; card[index].graphics.drawRect(0, 0, 80, 120, ...

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