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

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

811. 请问graphics.drawTexture(texture)中如何增加一个matrix,只显示图中的一个圆形区域 [ 79%]

...的一个圆形区域 我可以另外建一个圆形比如 var mapMask = new Laya.Sprite(); mapMask.size(100,100); mapMask.pos(50,50); mapMask.graphics.drawCircle(0, 0, 50, "#000000") 我这么获得mapMask的matrix,然后放进graphics.drawTexture中呢? 不要说直接用mask,因为微信小...

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

812. 使用百度地图 · LayaAir3.4 · 引擎文档 · LAYABOX [ 79%]

...age.on(Laya.Event.RESIZE, this, this.refit); // 初始化地图 this.map = new this.BMap.Map(this.mapDiv); // 禁用部分交互 //this.map.disableDragging(); this.map.disableKeyboard(); this.map.disableScrollWheelZoom(); this.map.disableDoubleClickZoom(); this.map.disablePinchToZoom(); // 初始地...

来源: Laya3.0_文档 发布时间: 20251010

813. 用Transform和直接设置xy坐标的效果不一致 [ 79%]

...正确。在LayaAir1.x两个效果都是一致的。 let txt: Laya.Text = new Laya.Text(); txt.text = "HELLO"; txt.color = "#ffffff"; txt.x = 1136 / 2, txt.y = 320; Laya.stage.addChild(txt);          txt = new Laya.Text(); txt.text = "HELLO"; txt.color = "#ffffff"; let mat = new Laya.Matrix(...

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

814. 写消消乐游戏, 如何在tiledMap格子中添加精灵? [ 79%]

...在tiledMap格子中添加精灵? // TiledMap 5X5格子地图 this.tMap = new Laya.TiledMap(); var viewRect = new Laya.Rectangle(-50,-50,Laya.Browser.width,Laya.Browser.height); this.tMap.createMap("res/map/map.json",viewRect);  // 精灵 var sp = new Laya.Sprite(); sp.graphics.drawRect(0, 0, 100, ...

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

815. Laya3D,支持的IOS版本最低是多少? [ 79%]

...de = Stage.SCREEN_NONE; Stat.show(); var scene:Scene = Laya.stage.addChild(new Scene()) as Scene; var camera:Camera = scene.addChild(new Camera(0, 0.1, 100)) as Camera; camera.transform.translate(new Vector3(0, 0.5, 1)); camera.transform.rotate(new Vector3( -15, 0, 0), true, false); var mc:Sprite3D ...

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

816. 关于切换图片的问题 [ 79%]

...ate flag: boolean = false; constructor() { Laya.init(1000,800); this.img = new Laya.Sprite; this.img.loadImage(this.plane1); Laya.stage.addChild(this.img); this.img.graphics.clear(); this.img.loadImage(this.plane2); Laya.stage.addChild(this.img) } } new Main(); 出来的结果是两张图合并到...

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

817. SkyProceduralMaterial材质详解(TypeScript-3D基础(TS)-天空材质详解) [ 79%]

...rer.mesh = Laya.SkyDome.instance; //使用程序化天空盒 var pro_sky = new Laya.SkyProceduralMaterial(); //设置太阳大小 pro_sky.sunSize = 0.5; //设置太阳状态为高质量状态 pro_sky.sunDisk = Laya.SkyProceduralMaterial.SUN_HIGH_QUALITY; //设置天空颜色 pro_sky.skyTint = new La...

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

818. SkyProceduralMaterial材质详解(JavaScript-3D基础(JS)-天空材质详解) [ 79%]

...rer.mesh = Laya.SkyDome.instance; //使用程序化天空盒 var pro_sky = new Laya.SkyProceduralMaterial(); //设置太阳大小 pro_sky.sunSize = 0.5; //设置太阳状态为高质量状态 pro_sky.sunDisk = Laya.SkyProceduralMaterial.SUN_HIGH_QUALITY; //设置天空颜色 pro_sky.skyTint = new La...

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

819. 在开启webgl模式下,每次运行texture类的getPixels方法内存都会增加 [ 79%]

...#ffffff" Laya.Stat.show() //资源路径 this.Res = "test.png"; this.img = new Laya.Image(); this.img.pos(200, 200) //获取图片资源,绘制到画布 this.img.skin = this.Res //添加到舞台 Laya.stage.addChild(this.img); } private cacheCanvas: Laya.HTMLCanvas private cacheTexture: Laya.Textu...

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

820. 动态创建img 或 sprite [ 79%]

LayaAir引擎 动态创建img 或 sprite let dd = new Laya.Sprite(); dd.graphics.drawTexture(this.img.texture, 0, 0, 750, 1334); dd.x = 50; dd.y = 50; this.addChild(dd);   this.img 绝对不为空,我想用一个sprite来画它,请问什么画(不是拷贝)?   2018-01-24 添加评论 ...

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