大约有 109 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0052 秒)
...laya.d3.math.Vector3; import laya.d3.math.Vector4; import laya.d3.resource.Texture2D; import laya.d3.resource.TextureCube; import laya.d3.resource.models.BaseMesh; import laya.d3.resource.models.Mesh; import laya.display.Stage; import laya.events.Event; import laya.resource.Texture; import laya.util...
来源: Laya_示例 发布时间: 20251130
...15:58 @我盼乙卯:先按照文档来吧,material.diffuseTexture = Laya.Texture2D.load("res/layabox.png"); box.meshRender.material = material; Laya.URL.basePath = "https://XXXX.com";//请把XXXX换成自己的真实网址; //在此之下,再使用load加载资源,都会...
来源: Laya_社区 发布时间: 20180531
...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
...ar material: Laya.BlinnPhongMaterial = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load( "res/layabox.png", Laya.Handler.create(null, function (tex: Laya.Texture2D) { material.albedoTexture = tex; }) ); box.meshRenderer.material = material; //设置文本显示框位置 this.text.x = Laya.stage.wi...
来源: Laya_社区 发布时间: 20200917
...rm sampler2D u_MainTex; varying vec2 v_textcoord; void main() { vec4 col = texture2D(u_MainTex, v_textcoord); gl_FragColor = col; } `; var shader: Laya.Shader3D = Laya.Shader3D.add("CustomCurveShader"); var subShader: Laya.SubShader = new Laya.SubShader(attributeMap, uniformMap); shader.addSubShader...
来源: Laya_社区 发布时间: 20201009
...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
...Laya.TrailTextureMode.Stretch; //设置纹理 this._trail2D.texture = Laya.Texture2D.whiteTexture; // Laya.loader.load("此处填写纹理的路径").then((res) => { // this._trail2D.texture = res; // }); //设置线段颜色 this._trail2D.color = new Laya.Color(1, 1, 1, 1); } //控制物体向...
来源: Laya3.0_文档 发布时间: 20251010
...以初始化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
... fa = clamp(fa, 0.0, 1.0);\ vec4 t_color = texture2D(texture, v_texcoord); \ gl_FragColor = t_color.rgba * v_color.rgba * vec4(1,1,1,fa); \ }\ "; /* var ps: string = " \ ...
来源: Laya_社区 发布时间: 20170606
...aterial = mat; })); ``` ##### 纹理Texture加载 单个纹理加载使用`Texture2D.load()`方法,示例代码如下: ```typescript //加载纹理,省略若干代码,仅为加载示例 Laya.Texture2D.load("xx/xx.png", Laya.Handler.create(null, function(Texture) { //使用纹理 var earth1 = sce...
来源: Laya2.0_文档 发布时间: 20210714