大约有 7 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0043 秒)
...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
...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
...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
...定添加到哪个大纹理。 //使用示例 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
...if #include "Sprite2DFrag.glsl"; void main() { clip(); vec4 textureColor = texture2D(u_baseRender2DTexture, v_texcoord); // 计算渐变因子 float gradientFactor = dot(v_texcoord, normalize(u_gradientDirection)) * 0.5 + 0.5; // 混合渐变颜色 vec4 gradientColor = mix(u_gradientStartColor, u_gr...
来源: Laya3.0_文档 发布时间: 20251120
...uniformMaps 规则详解5.1 uniformMaps 是数组而不是对象5.2 StorageTexture2D 与 StorageBuffer 规则5.3 未声明资源的自动补齐机制6. 编译流程与底层实现6.1 ComputeShader 创建与缓存6.2 GLSL → SPIR-V → WGSL7. 自动绑定机制与 SSBO 约束7.1 绑定点自动分...
来源: Laya3.0_文档 发布时间: 20260131
...以初始化A*的地图数据 //读取地形图 this.aStarMap = Loader.getTexture2D("res/threeDimen/scene/TerrainScene/Assets/AStarMap.png"); //获得地图数据 var aStarArr = this.createGridFromAStarMap(this.aStarMap); //使用astar初始化地图数据 this.graph = new (window as any).Graph(aSta...
来源: Laya3.0_文档 发布时间: 20230303