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

大约有 712 项符合查询结果, 库内数据总量为 30,935 项。 (搜索耗时: 0.0054 秒)

161. 龙骨动画-拖拽-点击区域HitArea设置问题 [ 81%]

...unds() 获取动画所在的矩阵,然后设置skeleton的 hitArea为(-width, -height, width, height). 但是只有点击动画的右下角才能拖拽。期望:   龙骨动画的任意位置都可以拖拽。 附件一是 设置点击区域的部分代码; 附件二是 渲染出来的效...

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

162. hitArea用法问题 [ 81%]

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

163. 【简单跑酷--JS版】---Lv.3 添加地板 [ 81%]

...的速度和移动比背景快一点 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

164. UI-Input [ 81%]

...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_示例 发布时间: 20250312

165. UI-ProgressBar [ 81%]

...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_示例 发布时间: 20250312

166. 动画-SWF动画 [ 81%]

... = 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_示例 发布时间: 20250312

167. UI-Input [ 80%]

...发语言、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_示例 发布时间: 20250312

168. 设置cacheAs = bitmap时, drawCanvas 的一个bug [ 80%]

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

169. 文本-自动调整文本尺寸 [ 80%]

...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_示例 发布时间: 20250312

170. laya.html.dom.HTMLIframeElement_API3.0 [ 80%]

... activeInHierarchy alpha blendMode cacheAs components contextHeight contextWidth customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation globalScaleX globalScaleY graphics height hideFlags hitArea href innerHTML is3D mask mouseEnabled mouseX m...

来源: Laya3.0_api 发布时间: 20231102