大约有 240 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)
Laya_社区(92) Laya3.0_api(62) Laya2.0_文档(62) Laya_示例(15) Laya3.0_文档(6) laya_api(1) Laya2.0_api(1) Laya2.0_示例(1)
...。 (图2) #### 3. 纹理加载 加载单个纹理使用Texture2D.load方法。这里我们创建了一个正方体,并且将加载的纹理设置为他的纹理。这个操作实际上和3D简单示例的操作是相同的。 ```typescript //加载纹理 Texture2D.load("res/thre...
来源: Laya2.0_文档 发布时间: 20210715
...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
...//新建材质 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
...er.load(url, { type: Laya.Loader.TEXTURE2D, propertyParams: { premultiplyAlpha: true, // 不预乘alpha filterMode:...
来源: Laya_社区 发布时间: 20250819
...Laya.BlinnPhongMaterial(); //漫反射贴图 material.albedoTexture = Laya.Texture2D.load("../../res/threeDimen/texture/earth.png"); earth2.meshRender.material = material; Laya.timer.frameLoop(1, this, function () { earth1.transform.rotate(this.rotation, false); earth2.transform.rotate(this.rotation...
来源: Laya_示例 发布时间: 20251130
...urls.push({ url: ResourcesManager.inst.brush_test_green, clas: Laya.Loader.TEXTURE2D,constructParams:[100, 100, 1, false, true]}); //开始填充 public fillPlane(){ let brush = Laya.loader.getRes(ResourcesManager.inst.brush_test_green) as Laya.Texture2D; let ...
来源: Laya_社区 发布时间: 20200706
... var material:EffectMaterial = new EffectMaterial(); //加载地球贴图 Texture2D.load("res/threeDimen/texture/earth.png", Handler.create(this, function(texture:Texture2D):void { //设置纹理 material.texture = texture; })); earth.meshRenderer.material = material; ``` (图12)
来源: Laya2.0_文档 发布时间: 20210715
... { .......//前面摄影机,猴子精灵相关操作忽略 var heightMap:Texture2D = Loader.getRes("res/threeDimen/scene/TerrainScene/Assets/HeightMap.png") as Texture2D; //初始化MeshTerrainSprite3D terrainSprite = MeshTerrainSprite3D.createFromMeshAndHeightMap(meshSprite3D.meshFilter.sharedMes...
来源: Laya2.0_文档 发布时间: 20210714
laya 2.6.0 加载image报错 加载IMAGE资源的时候,data为Texture2D类型,前两个判断没走,(data instanceof ArrayBuffer) 和 (!(data instanceof Texture2D))。导致tex为undefined,结果就无法继续加载了。。 LayaAir 2.6.0 的JS版本 ps: 加载的是FairyGu...
来源: Laya_社区 发布时间: 20200429
....material as BlinnPhongMaterial; //获取BlinnPhong材质的纹理 var tex:Texture2D = boxMaterial.albedoTexture as Texture2D; //获取相机渲染目标的像素数据,默认renderTarget的颜色为RGBA var out:Uint8Array = new Uint8Array(2048*2048*4); renderTargetCamera.renderTarget.getData(0, 0, ...
来源: Laya2.0_文档 发布时间: 20210714