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

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

61. 又又发现惊天大bug [ 76%]

又又发现惊天大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

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

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

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

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

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

64. worker.js 使用问题 [ 74%]

...text': No function was found that matched the signature provided.     at Texture2D.__proto._createWebGlTexture (laya.d3.js:33519)     at Texture2D.__proto.recreateResource (laya.d3.js:33562)     at Texture2D.__proto.activeResource (laya.core.js:13234)     at Texture2D.<anonymous> (laya...

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

65. 物理碰撞器(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 74%]

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

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

66. 物理碰撞器(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 74%]

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

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

67. 通过canvas的缩放来实现清晰度是什么意思呢? [ 73%]

...erial();                     material.diffuseTexture = Texture2D.load("res/test4.png");   sphere.meshRender.material = material;   test4.png是一张1024*512的图,我想提高贴图的清晰度 有人说可以通canvas缩放来实现 具体怎么做? 不用Texture2D.load(...

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

68. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 73%]

...HTMLImageElement Laya.loader.fetch( url,"image" ).then((res)=>{ //创建Texture2D var t2d: Texture2D = new Texture2D(res.width, res.height, TextureFormat.R8G8B8A8, false, false, true); t2d.setImageData(res, true, false); //创建Texture var texture: Texture = new Texture(t2d); let sp2:Sprite = ne...

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

69. 3D开启多线程报错 [ 73%]

...text': No function was found that matched the signature provided.     at Texture2D.__proto._createWebGlTexture (laya.d3.js:37225)     at Texture2D.__proto.recreateResource (laya.d3.js:37271)     at Texture2D.__proto.onAsynLoaded (laya.d3.js:37329)     at ResInfo.onLoaded (laya.core.js:13189)...

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

70. 场景环境反射(ActionScript-3D基础(AS3)-LayaAir3D之场景渲染配置) [ 73%]

...尽量高点,反射效果更明显 pbrMat.metallic = 1; //加载纹理 Texture2D.load("res/threeDimen/pbr/jinshu.jpg", Handler.create(null, function(tex:Texture2D):void { //pbrMat.albedoTexture = tex; teapot.meshRenderer.material = pbrMat; })); ``` ![](img/5.png)(图5)

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