大约有 315 项符合查询结果, 库内数据总量为 30,900 项。 (搜索耗时: 0.0043 秒)
...//新建材质 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
...ball1mat: Laya.BlinnPhongMaterial = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/layabox.png", Laya.Handler.create(null, function(layabox: Laya.Texture2D): void{ ball1mat.albedoTexture = layabox; })); //ball1mat.tilingOffset = new Laya.Vector4(10, 10, 0, 0); ball1.meshRenderer.material...
来源: Laya_社区 发布时间: 20190506
...本地路径,比如示例中引用的就是本地路径, ```json Laya.Texture2D.load("res/layabox.png"); ``` 如果项目的目录中,全部大小加起来不超过5M的话,只要能找到本地的资源,怎么写也没问题。 但是, 百度小游戏的本地包有5M的限制,一旦...
来源: Laya2.0_文档 发布时间: 20210714
...erial(); material.diffuseTexture = Texture2D.load("res/test4.png"); sphere.meshRender.material = material; test4.png是一张1024*512的图,我想提高贴图的清晰度 有人说可以通canvas缩放来实现 具体怎么做? 不用Texture2D.load(...
来源: Laya_社区 发布时间: 20180601
...本地路径,比如示例中引用的就是本地路径, ```json Laya.Texture2D.load("res/layabox.png"); ``` 如果项目的目录中,全部大小加起来不超过4M的话,只要能找到本地的资源,怎么写也没问题。 但是, 微信小游戏的本地包有4M的限制,一旦...
来源: Laya2.0_文档 发布时间: 20210715
...。 (图2) #### 3. 纹理加载 加载单个纹理使用Texture2D.load方法。这里我们创建了一个正方体,并且将加载的纹理设置为他的纹理。这个操作实际上和3D简单示例的操作是相同的。 ```typescript //加载纹理 Texture2D.load("res/thre...
来源: Laya2.0_文档 发布时间: 20210715
...n () { // image.onload = null; // image.onerror = null; // var data = Laya.Texture2D._parse(image); // data._url = "sdfasf" // _this.onLoaded(data); img=HTMLImage.create(image.width,image.height,1); img.loadImageSource(image,true); img._setCreateURL(url); _this.onLoaded(img); }; var url = _this.arra...
来源: Laya_社区 发布时间: 20210809
...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_文档 发布时间: 20240910
...戏正常可用 private static _sp: Laya.Sprite = null; private static tempTexture2D: Laya.Texture2D; private static tempTexture: Laya.Texture; /**截图 */ public static drawScreenshot(width, height, x, y) { if (!SwitchHelper.screenDraw) { return null; } if (!this.tempTexture2D) { this.tempTextur...
来源: Laya_社区 发布时间: 20191016
...尽量高点,反射效果更明显 pbrMat.metallic = 1; //加载纹理 Texture2D.load("res/threeDimen/pbr/jinshu.jpg", Handler.create(null, function(tex:Texture2D):void { //pbrMat.albedoTexture = tex; teapot.meshRenderer.material = pbrMat; })); ``` (图5)
来源: Laya2.0_文档 发布时间: 20210715