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

大约有 238 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0036 秒)

61. 射线检测-点击行走 [ 76%]

...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 meshCollider = plane.addComponent(Laya.MeshCollider); meshCollider.me...

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

62. texture2D的setPixel纹理rgba数据之后会随着窗口的缩放,渐变成黑色 [ 76%]

texture2D的setPixel纹理rgba数据之后会随着窗口的缩放,渐变成黑色 export class Texture2dTest { private sprite3D:Laya.Sprite3D; private readonly AllPng:string[] = ["pic-001.png","output-06.png"]; private texture:Laya.Texture2D; private box; constructor(){ Laya3D.init(0, 0); Laya.s...

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

63. 分享:Graphics下cmds命令流的使用! [ 76%]

...理 var texture1:Texture=Loader.getRes('apes/monkey0.png') as Texture; var texture2:Texture=Loader.getRes('apes/monkey1.png') as Texture; var texture3:Texture=Loader.getRes('apes/monkey2.png') as Texture; var texture4:Texture=Loader.getRes('apes/monkey3.png') as Texture; //绘制纹理 var box:Sprit...

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

64. 材质-BlinnPhong-高光贴图 [ 76%]

....skinnedMeshRender.materials[i]; //高光贴图 mat.specularTexture = Laya.Texture2D.load(this.specularMapUrl[i]); } Laya.timer.frameLoop(1, this, function () { dude1.transform.rotate(this.rotation); dude2.transform.rotate(this.rotation); }); }class BlinnPhong_SpecularMap { private scene:Laya.Scene;...

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

65. 高级应用-闪光 [ 76%]

...litter.glitterRender.sharedMaterial; glitterMaterial.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/layabox.png"); glitterMaterial.albedo = new Laya.Vector4(1.3, 1.3, 1.3, 1); glitterTemplet.lifeTime = 1.3; glitterTemplet.minSegmentDistance = 0.1; glitterTemplet.minInterpDistance = 0.6; ...

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

66. 材质-BlinnPhong-法线贴图 [ 76%]

...Sprite3D.meshRender.material; //法线贴图 material.normalTexture = Laya.Texture2D.load(this.normalMapUrl[i]); } Laya.timer.frameLoop(1, this, function () { monster1.transform.rotate(this.rotation); monster2.transform.rotate(this.rotation); }); }class BlinnPhong_NormalMap { private scene:Laya.Scen...

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

67. 百度小游戏的5M本地包与动态资源加载(TypeScript-小游戏适配文档-百度小游戏) [ 76%]

...本地路径,比如示例中引用的就是本地路径, ```json Laya.Texture2D.load("res/layabox.png"); ``` 如果项目的目录中,全部大小加起来不超过5M的话,只要能找到本地的资源,怎么写也没问题。 但是, 百度小游戏的本地包有5M的限制,一旦...

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

68. 又又发现惊天大bug [ 75%]

又又发现惊天大bug 使用Texture2D.load这个图片报错https://flock.oss-cn-beijing.aliyuncs.com/avatar/2e9c1503-3c16-354c-7c82-4cd8508a1685?x-oss-process=image/resize,h_432,m_lfit   原因_loadTexture2D方法里面解析不出来地址类型,临时解决方案type给个默认值nativeim...

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

69. 微信小游戏的4M本地包与动态资源加载(TypeScript-小游戏适配文档-微信小游戏) [ 75%]

...本地路径,比如示例中引用的就是本地路径, ```json Laya.Texture2D.load("res/layabox.png"); ``` 如果项目的目录中,全部大小加起来不超过4M的话,只要能找到本地的资源,怎么写也没问题。 但是, 微信小游戏的本地包有4M的限制,一旦...

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

70. 批量销毁释放内存(JavaScript-3D基础(JS)-LayaAir3D的内存管理) [ 75%]

... ​ 在2D中,图片使用的是`Texture`纹理(注意不是3D中的`Texture2D`)。但是实质上Texture就是对Texture2D的再封装,Texture的 `bitmap` 属性就是他所属的Texture2D ,Texture本身是记录了Texture2的uv属性,来实现图集中的单图片显示。 ​ 所以...

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