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

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

191. 如何自定义Shader(ActionScript-3D基础(AS3)-LayaAir3D之shader) [ 52%]

...化shader ```typescript //初始化我们的自定义shader public static function initShader() { //所有的attributeMap属性 var attributeMap = { 'a_Position': Laya.VertexMesh.MESH_POSITION0, 'a_Normal': Laya.VertexMesh.MESH_NORMAL0 }; //所有的uniform属性 var uniformMap = { 'u_MvpMatrix': La...

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

192. timer无法执行 [ 51%]

...ial();   Laya.Texture2D.load("res/layabox.png", Laya.Handler.create(null, function(layabox: Laya.Texture2D): void{ ball1mat.albedoTexture = layabox; })); //ball1mat.tilingOffset = new Laya.Vector4(10, 10, 0, 0); ball1.meshRenderer.material = ball1mat; //添加刚体 ball1.addComponent(Laya.PhysicsC...

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

193. 3D场景中背景无法透明,版本2.7.1 [ 51%]

...terial(); Laya.Texture2D.load("res/layabox.png", Laya.Handler.create(null, function(tex) { material.albedoTexture = tex; })); box.meshRenderer.material = material; } } 附件 : --> laya1.rar 2020-10-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...

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

194. 2.3.0beta 各种bug [ 51%]

...{     prevTasks = ["替换Laya前缀"] }  const fs = require("fs");  function readFile(path) {     if (fs.existsSync(path)) {         return fs.readFileSync(path, "utf-8");     }     return null; } gulp.task('替换Laya前缀', function(){          var layaMaxUI_Pat...

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

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

...Handler.create(null, beginLoad), Laya.ResourceVersion.FILENAME_VERSION);  function beginLoad(){     Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(null, onLoaded)); }*/  function updateItem(cell, index) { cell.setImg(cell.dataSource); }  function onLoaded(): void {      var...

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

196. 背景音乐播放内存问题 [ 50%]

...的WebAudioSound类的dispose方法改了,改成了这样:   public function dispose():void { delete _dataCache[url]; delete __loadingSound[url]; this.audioBuffer = null; this.data = null; this.__toPlays = []; super.dispose(); }   如果不添加最后4行代码的话,每次切换回来内...

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

197. 关于要自定shader的同学 [ 50%]

...键行 sprite.shaderValue.textureHost = new_texture sprite.customRender = function (context, x, y) { _this.setShaderValue(sprite) context.ctx.setIBVB(x, y, this.iBuffer, this.vBuffer, this.iNum, null, this.customeShader, this.shaderValue, 0, 0) }经常有人问,特此标注 2018-05-31 添加评论...

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

198. 写了个边缘光的自定义shader,有很多问题,帮忙看一下 [ 50%]

...自: ebaww 这个官方示例的写法有误。修改下CustomMaterial.js function CustomMaterial() { CustomMaterial.__super.call(this); this.setShaderName("CustomShader"); } Laya.class(CustomMaterial, "CustomMaterial", Laya.BaseMaterial); CustomMaterial.DIFFUSETEXTURE = 1; CustomMaterial.prototype....

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

199. UI-Tree [ 50%]

...t laya.utils.Utils; import laya.webgl.WebGL; public class UI_Tree { public function UI_Tree() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage...

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

200. 两个物体 ,如果在update里修改其中一个物体的rotationEuler,会触发另一个物体的onTriggerEnter回调 [ 49%]

...f = this; Util3d.loadRes( [ this.sMapRes, this.sBullRes, this.sEnemyRes ], function (bIsFinish) { if (bIsFinish) { self.onResFinish(); } } ) } onResFinish() { let pNewScene = <Laya.Scene3D>Util3d.getRes(this.sMapRes, false) Laya.stage.addChild(pNewScene); Util3d.getChildByPath(pNewScene, "Main...

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