• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 240 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)

71. 资源加载(ActionScript-3D基础(AS3)-LayaAir3D之资源加载) [ 76%]

...。 ![](img/2.png)(图2) #### 3. 纹理加载 ​ 加载单个纹理使用Texture2D.load方法。这里我们创建了一个正方体,并且将加载的纹理设置为他的纹理。这个操作实际上和3D简单示例的操作是相同的。 ```typescript //加载纹理 Texture2D.load("res/thre...

来源: Laya2.0_文档 发布时间: 20210715

72. 物理碰撞器(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 74%]

...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

73. 物理碰撞器(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 74%]

...//新建材质 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

74. [LayaAir3]Laya.loader 加载png图片失真 [ 73%]

...er.load(url, {                             type: Laya.Loader.TEXTURE2D,                             propertyParams: {                                 premultiplyAlpha: true,    // 不预乘alpha                                 filterMode:...

来源: Laya_社区 发布时间: 20250819

75. 材质-BlinnPhong-漫反射贴图 [ 73%]

...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

76. 使用setsubpixel函数对图片进行纹理像素填充,安卓端微信不正常 [ 73%]

...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

77. Effect材质详解(ActionScript-3D基础(AS3)-模型材质详解) [ 73%]

... 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; ``` ![](img/1.gif)(图12)

来源: Laya2.0_文档 发布时间: 20210715

78. 寻路系统(ActionScript-3D基础(AS3)-LayaAir3D之高级应用) [ 72%]

... { .......//前面摄影机,猴子精灵相关操作忽略 var heightMap:Texture2D = Loader.getRes("res/threeDimen/scene/TerrainScene/Assets/HeightMap.png") as Texture2D; //初始化MeshTerrainSprite3D terrainSprite = MeshTerrainSprite3D.createFromMeshAndHeightMap(meshSprite3D.meshFilter.sharedMes...

来源: Laya2.0_文档 发布时间: 20210714

79. laya 2.6.0 加载image报错 [ 71%]

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

80. RenderTexture的像素读取(ActionScript-3D基础(AS3)-LayaAir3D之纹理) [ 71%]

....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