大约有 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)
...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
分享:Sprite 转换成3D贴图(Texture2D)的方法,如果有更好的方法,请告诉我。 因为要用到的贴图并不是固定的,所以有这样的需求,之前问过,不过暂时没有结果:https://ask.layabox.com/question/5622 看不太懂官方的源码,所以用...
来源: Laya_社区 发布时间: 20170718
... 在2D中,图片使用的是`Texture`纹理(注意不是3D中的`Texture2D`)。但是实质上Texture就是对Texture2D的再封装,Texture的 `bitmap` 属性就是他所属的Texture2D ,Texture本身是记录了Texture2的uv属性,来实现图集中的单图片显示。 所以...
来源: Laya2.0_文档 发布时间: 20210715
...只是不知道怎么把绘制出来的新纹理变成3D模型能识别的texture2d的贴图? 2018-06-05 0 0 分享 微博 QZONE 微信 伐木工人 赞同来自: 没必要用laya2d来做,可以直接用原生canvas-2d来叠加图层产生新图片,然后转base64字符串,然后转HTMLImage...
来源: Laya_社区 发布时间: 20180605
Texture2D.setPixels会导致图片质量变差了,获取原生的pixels没有进行改动。怎么回事呢? 代码如下: var url = "res/textures/marry_frame_005.png"; url= Laya.URL.formatURL(url); var imageSource=new Laya.Browser.window.Image(); var thisObj = this; var onload=function (){ v...
来源: Laya_社区 发布时间: 20190923
...Sprite3D.meshRender.material; //法线贴图 material.normalTexture = Laya.Texture2D.load(this.normalMapUrl[i]); } Laya.timer.frameLoop(1, this, function () { monster1.transform.rotate(this.rotation); monster2.transform.rotate(this.rotation); }); }class BlinnPhong_NormalMap { private scene:Laya.Scen...
来源: Laya_示例 发布时间: 20251130
... 1 个回复 Laya_Fred 赞同来自: 您好,是Texture的bitmap类型为texture2D,引用一次Texture2D资源,image设置texture之后,如果需要销毁资源,可以试下使用image的dispose方法,我们销毁一个image时候,如果直接将引用的texture2D也销毁掉,其他...
来源: Laya_社区 发布时间: 20231124
...本地路径,比如示例中引用的就是本地路径, ```json Laya.Texture2D.load("res/layabox.png"); ``` 如果项目的目录中,全部大小加起来不超过5M的话,只要能找到本地的资源,怎么写也没问题。 但是, 百度小游戏的本地包有5M的限制,一旦...
来源: Laya2.0_文档 发布时间: 20210714
... } tex = new Texture2D(0, 0, format, false, false); tex.wrapModeU = exports.WarpMode.Clamp; tex.wrapModeV = exports.WarpMode.Clamp; ...
来源: Laya_社区 发布时间: 20201130
...var planeMat = new Laya.StandardMaterial(); planeMat.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/texture/layabox.png"); planeMat.albedo = new Laya.Vector4(0.9, 0.9, 0.9, 1); plane.meshRender.material = planeMat; var meshCollider = plane.addComponent(Laya.MeshCollider); meshCollider.me...
来源: Laya_示例 发布时间: 20251130