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

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

1481. 自定义2D Shader · LayaAir3.3 · 引擎文档 · LAYABOX [ 26%]

...结构与应用2.1 着色器文件2.2 应用范围2.3 文件结构三、uniformMap3.1 uniform常见变量类型3.2 引擎常见内置uniform四、attributeMap五、defines5.1 基本用法5.2 与uniformMap联动六、styles6.1 对于uniformMap6.2 对于defines七、shaderPass7.1 什么是shaderPass7....

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

1482. 绘制能力 · LayaAir3.3 · 引擎文档 · LAYABOX [ 25%]

...ints: any[], lineColor: any, lineWidth: number = 1): DrawLinesCmd | null { if (!points || points.length < 4) return null; return this.addCmd(DrawLinesCmd.create(x, y, points, lineColor, lineWidth)); } 代码示例: let sp = new Laya.Sprite(); //画折线 sp.graphics.drawLines(20, 88, [0, 0, 39,...

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

1483. UI运行时 · LayaAir3.3 · 引擎文档 · LAYABOX [ 25%]

...or (let i = 0; i < ui.numChildren; i++) { let child = ui.getChildAt(i); if (child instanceof Laya.Button) { console.log("发现Button"); this.onButtonScaleEvent(child); } else { //查找子节点 this.searchButton(child); } } } //处理按钮缩放事件 onButtonScaleEvent(target: Laya.Button) { ...

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

1484. 射线检测-选取物体 [ 24%]

...esh(6, 6, 10, 10))); var planeMat = new Laya.StandardMaterial(); planeMat.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/texture/layabox.png"); planeMat.albedo = new Laya.Vector4(0.9, 0.9, 0.9, 1); plane.meshRender.material = planeMat; var boxCollider = plane.addComponent(Laya.BoxCollide...

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

1485. 构建app闪退,测试app扫码可以运行 [ 22%]

...va_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0x7c 2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]     string: 'http://192.168.2.139:8900/bin/libs/layer.js:2: 2019-03-15 08:45:13.438 821...

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

1486. laya.ui.Clip_API3.0 [ 20%]

...trace("clip 的点击事件侦听处理函数。clip.total="+ clip.total); if (clip.isPlaying == true) { clip.stop();//停止动画。 }else { clip.play();//播放动画。 } } } } example Laya.init(640, 800);//设置游戏画布宽高 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色 var...

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

1487. 2D物理-仿生机器人 [ 20%]

...onCollider = leg2.addComponent(PolygonCollider); legCollider2.density = 1; if (s > 0) { legCollider1.points = p1.concat(p2).concat(p3).join(","); legCollider2.points = [0, 0].concat(B2Math.SubVV(p5, p4)).concat(B2Math.SubVV(p6, p4)).join(","); } else { legCollider1.points = p1.concat(p3).concat(p2)....

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

1488. laya.ui.Dialog_API3.0 [ 19%]

...的关闭函数处理器。 } private function onClose(name:String):void { if (name == Dialog.CLOSE) { trace("通过点击 name 为" + name +"的组件,关闭了dialog。"); } } } } import laya.ui.Button; import laya.ui.Dialog; import laya.ui.Image; class Dialog_Instance extends Dialog { function ...

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

1489. 2D物理系统 · LayaAir3.3 · 引擎文档 · LAYABOX [ 17%]

...撞到的碰撞体对象,根据碰撞到的标签处理对应的逻辑 if (other.label === "buttle") { //碰撞到子弹后,增加积分,播放声音特效 //省略若干代码…… } else if (other.label === "ground") { //只要有一个盒子碰到地板,则停止游戏 //省略若干代...

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

1490. 关于截屏的问题 [ 16%]

...?   代码如下: console.log("onCharge-------------------------1"); if( Laya.Browser.window.conch ) { console.log("onCharge-------------------------2"); Laya.Browser.window.conch.captureScreen(function(arrayBuff,width,height){ console.log("onCharge-------------------------3"); //存储文件...

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