大约有 3,117 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0092 秒)
Laya_社区(2757) Laya3.0_api(82) Laya2.0_api(76) Laya2.0_文档(75) laya_api(71) Laya3.0_文档(43) Laya2.0_示例(7) Laya_示例(6)
...。 1. 使用getBounds/ getGraphicBounds。 ```typescript var sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但由于其需要计算边界,不适合频繁调...
来源: Laya2.0_文档 发布时间: 20210714
...isplay.cssClasspublic class TextStyleInheritanceTextStyle laya.display.css.SpriteStyle 文本的样式类 Public Properties PropertyDefined By align : String 表示使用此文本格式的文本段落的水平对齐方式。 TextStyle asPassword : Boolean 指定文本字段是否是密码文...
来源: Laya2.0_api 发布时间: 20190513
...ron 赞同来自: /** * <p>绘制 当前<code>Sprite</code> 到 <code>Canvas</code> 上,并返回一个HtmlCanvas。</p> * <p>绘制的结果可以当作图片源,再次绘制到其他Sprite里面,示例:</p> ...
来源: Laya_社区 发布时间: 20180626
...的链接 提交 2 个回复 yplpf 赞同来自: cuixueying 已经解决,Sprite默认宽高为0,虽然 drawTexture画了一张图片出来, 但是由于宽高都是0, 当坐标X或者Y 为0以后, Laya就当它移到屏幕外面了,所以就不显示了。 同时宽高为0,也不能...
来源: Laya_社区 发布时间: 20170810
... Laya.stage.screenMode = "vertical"; Laya.Stat.show(); var icon = new Laya.Sprite(); icon.loadImage('img/test.png'); Laya.stage.addChild(icon); document.body.addEventListener("click",function(){ var kk = icon.drawToCanvas(431, 428).getContext('2d').canvas; var img = new Image(); img.src = kk.toDataU...
来源: Laya_社区 发布时间: 20161107
...正常的 let tx:Laya.Texture = Laya.loader.getRes(url); let maskMc:Laya.Sprite = new Laya.Sprite(); maskMc.graphics.drawTexture(tx,0,0,tx.width,tx.height); this.bar.displayObject.mask = maskMc; this.bar.visible = true; maskMc 是外部加载的一个纹理,就算是一起放在fairygui里面的还...
来源: Laya_社区 发布时间: 20200108
...Laya.stage.bgColor = "#232628"; Stat.show(); this.init(); } init() { const Sprite = Laya.Sprite, Animation = Laya.Animation, Text = Laya.Text, Event = Laya.Event; // 创建背景 this.spBg = Sprite.fromImage(PathBg); Laya.stage.addChild(this.spBg); // 创建动画 this.aniFly = new Animation(); this...
来源: Laya2.0_示例 发布时间: 20240930
请问object层中添加的sprite怎么添加点击事件 Object层是tiledmap最上面的一层,其中添加了一个sprite对象,但是给这个sprite添加鼠标点击事件不起作用,请大神看看 mallLayer = tiledMap.getLayerByName("Object"); budai = tiledMap.getLayerObject("Object",...
来源: Laya_社区 发布时间: 20180722
...aleMode = 'fixedauto' Laya.stage.screenMode = 'vertical' let bg = new Laya.Sprite(); bg.loadImage("../res/image/interface/intro_bg.png",375,667,1500,1500); bg.pivot(750,750) bg.alpha = 1 bg.rotation = 10图片是正方形的 如上设置过pivot之后 并没有按 正方形中心点旋转 2018-05-19...
来源: Laya_社区 发布时间: 20180519
元素定义显示区域? 一个大的盒子(box或者sprite,在舞台中央,没有顶边),两边有两个元素要从左右两边缓动进入显示,但是开始的时候是看得到的。 要怎么做才能让这个超出这个盒子宽高的其他元素,不可见? 2018-04-13 添...
来源: Laya_社区 发布时间: 20180413