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

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

61. 微信小游戏默认项目代码添加unity导出.lh文件,微信开发工具提示错误 [ 62%]

...dardMaterial = new Laya.StandardMaterial(); material.diffuseTexture = Laya.Texture2D.load("res/layabox.png"); box.meshRender.material = material; //加载3D资源 Laya.loader.create(["res/LayaScene_girl/girl.lh"],Laya.Handler.create(this,this.on3DComplete)); } /*加载3D资源完成回调*/ private ...

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

62. 物理碰撞器(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 61%]

..., 10))); //新建材质 var planeMat = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/threeDimen/Physics/grass.png", Laya.Handler.create(this, function(tex) { planeMat.albedoTexture = tex; })); //设置纹理平铺和偏移 planeMat.tilingOffset = new Laya.Vector4(10, 10, 0, 0); //设置材...

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

63. 使用高度图时候 Cannot read property 'width' of undefined [ 61%]

...o/?D3Base_ResourceLoadAndDispose。 用Create加载,获取时候,用Texture2D.load   2017-06-01 1 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 sfsmmc 相关问题 Layabox 2.0 bate5 运行编译之后 bundle.js 文件里面没有...

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

64. 自定义shader-简单shader [ 60%]

...a.d3.math.Quaternion; import laya.d3.math.Vector3; import laya.d3.resource.Texture2D; import laya.d3.resource.models.CapsuleMesh; import laya.d3.resource.models.Mesh; import laya.d3.resource.models.SphereMesh; import laya.d3.shader.Shader3D; import laya.d3.shader.ShaderCompile3D; import laya.display...

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

65. 为什么说没有​ playByFrame方法 [ 60%]

...er方式能不能加载ani文件? 分享:Sprite 转换成3D贴图(Texture2D)方法,如果有更好方法,请告诉我。 有没有Unity3dVector3.Angle(计算两个三维向量之间角度)这样方法?或求3D抛物线移动方法或算法。 LayaAir 2D有没...

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

66. 3D模式下使用Tween使模型移动如何写法 [ 59%]

...a.StandardMaterial(); //漫反射贴图 fishmaterial.diffuseTexture = Laya.Texture2D.load("fish/denglongyu/denglongyu1.jpg"); fish.meshRender.material = fishmaterial; fish.transform.localScale = new Laya.Vector3(0.001,0.001,0.001); fish.transform.localPosition = new Laya.Vector3(0,1,0); fish.transfo...

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

67. 如何加载使用从服务器下载图片 [ 58%]

...后使用URL.basePath方法。 例如:   material.diffuseTexture = Laya.Texture2D.load("res/layabox.png");box.meshRender.material = material;Laya.URL.basePath = "https://XXXX.com";//请把XXXX换成自己真实网址;//在此之下,再使用load加载资源,都会自动加入URL网址。...

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

68. 射线检测-碰撞器混合 [ 58%]

...laya.d3.math.Vector3; import laya.d3.math.Vector4; import laya.d3.resource.Texture2D; import laya.d3.resource.models.BoxMesh; import laya.d3.resource.models.CapsuleMesh; import laya.d3.resource.models.CylinderMesh; import laya.d3.resource.models.Mesh; import laya.d3.resource.models.PlaneMesh; import...

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

69. 角色模型材质列表切换后,不播放动作了 [ 57%]

...;\n" + "uniform sampler2D u_texture;\n" + "void main(){\n" + "gl_FragColor=texture2D(u_texture, v_Texcoord);}\n";自定义材质class CustomMaterial extends Laya.BaseMaterial { static DIFFUSETEXTURE_ID: number = 1; constructor() { super(); this.setShaderName("CustomShader"); } public getDiffuseTextu...

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

70. 描边Shader,使用了两个Pass [ 57%]

...vec2 v_Texcoord; uniform sampler2D u_Texture; void main() { gl_FragColor = texture2D(u_Texture, v_Texcoord); }` outlineShader.addShaderPass(outline_vs, outline_ps) outlineShader.addShaderPass(base_vs, base_ps) this.setShaderName("OutlineShader") this.getRenderState(0).cull = 1 } set diffuseTexture (...

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