大约有 288 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0065 秒)
Laya_社区(134) Laya3.0_api(87) Laya2.0_文档(37) Laya_示例(22) Laya3.0_文档(6) laya_api(1) Laya2.0_api(1)
...0 最新版 接口变了, Texture 的drawto public function setTo(bitmap:Texture2D = null, uv:Array = null, sourceWidth:Number = 0, sourceHeight:Number = 0):void { 变成了Textrue2d了, 像以前1.x版本Textrue 还能用htmlcanvas,现在不能用了。而且直接强传入,会报错。 请...
来源: Laya_社区 发布时间: 20190624
...lbedo = new Laya.Vector4(0.8, 0.8, 0.8, 0); material.diffuseTexture = Laya.Texture2D.load("images/bg03.png"); box.meshRender.material = material; //平面 var plane = sprite3D.addChild(new Laya.MeshSprite3D(new Laya.PlaneMesh(15, 15, 1, 1))); plane.transform.position = new Laya.Vector3(0, 0, 0); var...
来源: Laya_社区 发布时间: 20180103
...erials.lmat") as Laya.UnlitMaterial; var unlitTexture:Laya.Texture2D = Laya.Loader.getRes("Images/BG_PopWindow.png") as Laya.Texture2D; material.albedoTexture = unlitTexture; this.unit3D.meshRenderer.material = material; 附件 : --> 2019-09-07 添加评论 免费帖 --> 分享 微...
来源: Laya_社区 发布时间: 20190907
...= new Uint8Array(_sourceTex.width * _sourceTex.height * 4); let tex2d:Laya.Texture2D = this.aImg.source["_bitmap"]; tex2d.setPixels(ret);//填充像素数据 //该操作在vulkan中会有杂点,directX opengl没有问题 tex2d.setSubPixels(0,0,w,h,dt);// 这里有问题 注释掉 在微信小游戏v...
来源: Laya_社区 发布时间: 20230328
...戏正常可用 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
...llText("-10000", 100, 50, 200);//有填充cxt.font="bold 60px 宋体"; let texture2D = new Laya.Texture2D(256, 256); //=====================这里如果在填充新的文字 会有所有的文字信息 ======================================== cxt.fillText("-200", 100, 50, 200);//有填充cxt.font...
来源: Laya_社区 发布时间: 20191211
...a.BlinnPhongMaterial; //添加漫反射贴图 Laya.Texture2D.load("res/threeDimen/Physics/rocks.jpg", Laya.Handler.create(this, function (tex) { this.mat1.albedoTexture = tex; })); //平面加载 let plane = this.scene.add...
来源: Laya_社区 发布时间: 20201127
...绘制的情况 demo项目里Main.ts下的onConfigLoaded方法里,使用Texture2D.setPixels创建了纹理,Sprite通过绘制纹理graphics.drawTexture的方式生成可视化图片,但这个Sprite在改变大小时会出现绘制失败的情况,demo里scale在0.7及更小的情况下就不...
来源: Laya_社区 发布时间: 20200422
...al: SkyPanoramicMaterial = new SkyPanoramicMaterial(); Texture2D.load("res/jfb.jpg", Handler.create(null, function (tex: Texture2D) { material.panoramicTexture = tex; skymat.material = material; })); 2020-03...
来源: Laya_社区 发布时间: 20200319
...ar material: Laya.BlinnPhongMaterial = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/layabox.png", Laya.Handler.create(null, function (tex: Laya.Texture2D) { material.albedoTexture = tex; })); //测试遮挡剔除 material.cull = 0 box.meshRenderer.material = material; let res1 = Laya.Sp...
来源: Laya_社区 发布时间: 20190717