大约有 715 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0046 秒)
Laya_社区(314) Laya3.0_api(93) Laya2.0_api(74) laya_api(62) Laya_示例(55) Laya2.0_示例(55) Laya2.0_文档(42) Laya3.0_文档(20)
如何动态获取image的宽高? var thisp:Point=new Point((this.width*this.scaleX)/2,(this.height*this.scaleY)/2); //thisp=this.globalToLocal(this.localToGlobal(thisp)); //trace(thisp.x,thisp.y,"dddddddd") var tf:Matrix=new Matrix(); tf.translate(-thisp.x,-thisp.y); __jd+=jd; tf.rotate(__jd); t...
来源: Laya_社区 发布时间: 20161124
...unds() 获取动画所在的矩阵,然后设置skeleton的 hitArea为(-width, -height, width, height). 但是只有点击动画的右下角才能拖拽。期望: 龙骨动画的任意位置都可以拖拽。 附件一是 设置点击区域的部分代码; 附件二是 渲染出来的效...
来源: Laya_社区 发布时间: 20171114
...Graphics(); g.drawRect(this.closeBtn.x-10,this.closeBtn.y-10,this.closeBtn.width+20,this.closeBtn.height+20,"#FF0000"); let hitA:Laya.HitArea = new Laya.HitArea(); hitA.hit = g; this.closeBtn.hitArea = hitA; // 写法二 this.closeBtn.graphics.drawRect(this.closeBtn.x-10,this.closeBtn.y-10,this.clos...
来源: Laya_社区 发布时间: 20170920
...的速度和移动比背景快一点 this.x -= 5 * 1.2; if((this.x + this.width) < 0){ //判断整个floor是否不在屏幕里面了 如果不在了 移除当前floor Laya.timer.clear(this, this.onLoop); this.visible = false; this.removeSelf(); } } })(); 地板有了 我们打开MapFloor.js 来...
来源: Laya_社区 发布时间: 20160728
...ndler = Laya.Handler; var WebGL = Laya.WebGL; var SPACING = 100; var INPUT_WIDTH = 300; var INPUT_HEIGHT = 50; var Y_OFFSET = 50; var skins; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CEN...
来源: Laya_示例 发布时间: 20251130
...progressBar.png"); Laya.stage.addChild(this.progressBar); this.progressBar.width = 400; this.progressBar.x = (Laya.stage.width - this.progressBar.width ) / 2; this.progressBar.y = Laya.stage.height / 2; this.progressBar.sizeGrid = "5,5,5,5"; this.progressBar.changeHandler = new Handler(this, this.on...
来源: Laya2.0_示例 发布时间: 20251130
...发语言、LayaAirIDE让项目开发更高效。let SPACING = 100, INPUT_WIDTH = 300, INPUT_HEIGHT = 50, Y_OFFSET = 50, skins; class UI_Input { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动...
来源: Laya2.0_示例 发布时间: 20251130
... = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createMovieClip(); } createMovieC...
来源: Laya2.0_示例 发布时间: 20251130
...awCanvas 的一个bug drawCanvas(canvas: HTMLCanvas, x: number, y: number, width: number, height: number): void { if (!canvas) return; var src: Context = canvas.context as Context; var submit: ISubmit; if (src._targets) { //生成渲染结果到src._targets上 /* this._submits[this._submits._length+...
来源: Laya_社区 发布时间: 20210527
...ow = Text.VISIBLE; autoSizeText.y = 50; // 该文本被限制了宽度 var widthLimitText = createSampleText(); widthLimitText.width = 100; widthLimitText.y = 180; //该文本被限制了高度 var heightLimitText = createSampleText(); heightLimitText.height = 20; heightLimitText.y = 320; } function...
来源: Laya_示例 发布时间: 20251130