大约有 106 项符合查询结果, 库内数据总量为 30,784 项。 (搜索耗时: 0.0066 秒)
...15:58 @我盼乙卯:先按照文档来吧,material.diffuseTexture = Laya.Texture2D.load("res/layabox.png"); box.meshRender.material = material; Laya.URL.basePath = "https://XXXX.com";//请把XXXX换成自己的真实网址; //在此之下,再使用load加载资源,都会...
来源: Laya_社区 发布时间: 20180531
...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_示例 发布时间: 20241123
...以初始化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
...number, canvasHeight: number, offsetX: number, offsetY: number, rt?: RenderTexture2D | null): Texture | RenderTexture2D Implementation of ISelect.drawToTexture Inherited from Text.drawToTexture Defined in laya/display/Sprite.ts:1259 绘制到一个Texture对象 Parameters canvasWidth: number canvasH...
来源: Laya3.0_api 发布时间: 20231115
...number, canvasHeight: number, offsetX: number, offsetY: number, rt?: RenderTexture2D | null): Texture | RenderTexture2D Implementation of ISelect.drawToTexture Inherited from Text.drawToTexture Defined in laya/display/Sprite.ts:1259 绘制到一个Texture对象 Parameters canvasWidth: number canvasH...
来源: Laya3.0_api 发布时间: 20231115
...number, canvasHeight: number, offsetX: number, offsetY: number, rt?: RenderTexture2D | null): Texture | RenderTexture2D Inherited from Text.drawToTexture Defined in laya/display/Sprite.ts:1259 绘制到一个Texture对象 Parameters canvasWidth: number canvasHeight: number offsetX: number offsetY: n...
来源: Laya3.0_api 发布时间: 20231115