大约有 15 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0082 秒)
...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
...url2 = "xxxxx.png"; var type1 = Laya.Loader.IMAGE; var type2 = Laya.Loader.TEXTURE2D; Laya.loader.load([url1, url2]).then((res:Array<any>)=> { //加载多个,不带类型 }); Laya.loader.load([url1, url2], type).then((res:Array<any>)=> { //加载多个,统一设置类型 }); La...
来源: Laya3.0_文档 发布时间: 20251010
...edoColor: { type: Color, default: [1, 1, 1, 1] }, u_AlbedoTexture: { type: Texture2D, options: { define: "ALBEDOTEXTURE" } }, u_NormalTexture: { type: Texture2D, options: { define: "NORMALTEXTURE" } }, u_NormalScale: { type: Float, default: 1.0, range: [0.0, 2.0] }, u_Metallic: { type: Float, defaul...
来源: Laya3.0_文档 发布时间: 20251010
...求也是存在的。 目前,LayaAir可以实现自定义2D纹理渲染(Texture2D)和基础图元渲染(Primitive)。 本篇文档属于进阶性文档,在阅读前需要具备Shader的基础知识,可以参考3D着色器文档中的一些概念介绍。 二、结构与应用 2.1 着色器文...
来源: Laya3.0_文档 发布时间: 20251010
...H MESH Mesh资源 Laya.Loader.MATERIAL MATERIAL Material资源 Laya.Loader.TEXTURE2D TEXTURE2D Texture2D资源 Laya.Loader.TEXTURECUBE TEXTURE2D TextureCube资源 Laya.Loader.SPINE SPINE Spine资源 二、加载多个资源 有很多时候,我们需要把大量的资源在Loading界面进行预加...
来源: Laya3.0_文档 发布时间: 20251010
...Texture Memory(M_AllTexture)6.2 All Texture Count(C_AllTexture)6.3 Texture2D Memory(M_Texture2D)6.4 Texture2D Count(C_Texture2D)6.5 TextureCube Memory(M_TextureCube)6.6 TextureCube Count(C_TextureCube)6.7 Texture3D Memory(M_Texture3D)6.8 Texture3D Count(C_Texture3D)6....
来源: Laya3.0_文档 发布时间: 20260128
...定添加到哪个大纹理。 //使用示例 const textures = [texture1, texture2, texture3]; const successCount = atlasManager.addTextures(textures); console.log(`成功添加 ${successCount} 个纹理`); const urls = [ "resources/ui/button.png", "resources/ui/panel.png", "resources/ui/icon.png" ]...
来源: Laya3.0_文档 发布时间: 20260131
...5.3 数学类5.4 纹理类5.5 颜色类6.常见的Params类型6.1 Float6.2 Texture2D6.3 Vector2/3/46.4 Color6.5 Define7.自定义函数8.进阶示例8.1 顶点着色器片段8.2 片段着色器片段拓展:快捷操作Shader蓝图 1.蓝图概述 1.1 创建蓝图 在Assert窗口右键Create菜单...
来源: Laya3.0_文档 发布时间: 20251010
...D场景添加渲染物2.3 设置摄像机的目标纹理2.4 设置Sprite的Texture2.5 修改渲染纹理属性三、代码中混合使用3D混合使用3D 一、概述 在2D项目开发过程中,开发者往往需要在UI界面显示3D场景或者3D物体,比如游戏开发中,3D人物在2D背...
来源: Laya3.0_文档 发布时间: 20251010
...form变量。 3.1 Uniform常见变量类型 Uniform变量的常见类型:Texture2D,Color,Vector2,Vector3,Vector4,Bool,Float,Matrix4x4,TextureCube Texture2D用于2D纹理采样的图片类型,图片本地支持格式:JPG,PNG Color 颜色类型,为四个Float类型组成的...
来源: Laya3.0_文档 发布时间: 20251010