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

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

61. 2.0 怎么样才能将htmlcanvas 的东西 显示在texture上? [ 75%]

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

62. 同一类型光源互斥的问题报告 [ 75%]

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

63. TypeError: Cannot set property 'material' of undefined [ 74%]

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

64. setSubPixels画布擦除不掉 [ 74%]

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

65. laya2.0 截图功能分享,直接截取屏幕上所有对象 [ 74%]

...戏正常可用 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

66. 3D文本内容是否可以清除 重新书写 [ 73%]

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

67. 3D网格添加刚体后设置欧拉角出现位置错误 [ 73%]

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

68. 通过绘制纹理生成的图片,改变scale时会出现图片不绘制的情况 [ 72%]

...绘制的情况 demo项目里Main.ts下的onConfigLoaded方法里,使用Texture2D.setPixels创建了纹理,Sprite通过绘制纹理graphics.drawTexture的方式生成可视化图片,但这个Sprite在改变大小时会出现绘制失败的情况,demo里scale在0.7及更小的情况下就不...

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

69. skydome可以替换贴图吗? [ 72%]

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

70. 修改position与修改localPosition结果不一致(同处于3d场景下的两个节点) [ 72%]

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