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

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

411. sprite点击事件 位置便宜 [ 68%]

... "#D2691E"); rect.size(200, 200); rect.pivot(100,100); rect.x = Laya.stage.width /2; rect.y = Laya.stage.height / 2; // let hitArea = new Laya.Rectangle(rect.x-100,rect.y-100,200,200); // rect.hitArea = hitArea; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHan...

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

412. laya.display.Animation [ 68%]

...read-only] 对象的显示高度(以像素单位)。 Sprite displayWidth : Number[read-only] 对象的显示宽度(以像素单位)。 Sprite drawCallOptimize : BooleanSprite filters : Array滤镜集合。可以设置多个滤镜组合。Sprite  frames : Array 当前动画的帧...

来源: Laya2.0_api 发布时间: 20190513

413. 骨骼动画-Spine事件 [ 68%]

...Index = 0; var mFactory2; var mLabelSprite; (function(){ Laya.init(Browser.width, Browser.height,WebGL); Laya.stage.bgColor = "#ffffff"; Stat.show(); mLabelSprite = new Sprite(); startFun(); })(); function startFun() { mAniPath = "../../res/spine/spineRes6/alien.sk"; mFactory = new Templet(); mFacto...

来源: Laya_示例 发布时间: 20260303

414. 请问更新遮罩的最优方式 [ 68%]

...,需要遮罩宽度随着进度变化而变化   _mask.size(_barImage.width * _percent, _barImage.height); _mask.graphics.clear(); _mask.graphics.drawRect(0, 0, _mask.width, _mask.height, "#FF0000");                      _barImage.mask = null; _barImage.mask = _mask;   试过需...

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

415. 十几秒以后动画渲染时间变长,帧率变慢,是怎么回事? [ 68%]

...area.w; this._doll_area.h = doll_area.h; }  // 设置容器的宽高 this.width = Math.max( this._blood_area.w, this._demon_area.w, this._doll_area.w );  this.height = this._blood_area.h + this._demon_area.h + this._doll_area.h;  this.graphics.drawRect( 0, 0, this.width, this.height, null, "#ff00...

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

416. laya.display.Input [ 68%]

...mouseThrough属性。 影响对象鼠标事件响应区域的属性width、height、hitArea,优先级顺序:hitArea(type:HitArea)>hitArea(type:Rectangle)>width/height。 Sprite mouseX : Number[read-only] 返回鼠标在此对象坐标系上的 X 轴坐标信息。 Sprite mouseY ...

来源: laya_api 发布时间: 20170929

417. 如何根据内容计算 Label的高度 [ 68%]

... cuixueying 赞同来自: 问题1、   label的宽高可以直接通过.width和.height获取,尺寸会跟随字符的多少变化而变化,是自动调整的,无需开发者去计算 问题2、   htmlDivElement的文本宽高,默认的宽高200,,200,如果已经设置过htmlDivElem...

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

418. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 68%]

...t.createElement("div"); this.qrcode = new Laya.Browser.window.QRCode(div,{ width:100, height:100 }); var url:string = "http://layabox.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); } private cl...

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

419. laya.map.TiledMap_API3.0 [ 68%]

..._LEFTUP RENDERORDER_RIGHTDOWN RENDERORDER_RIGHTUP Accessors gridHeight gridWidth height numColumnsGrid numColumnsTile numRowsGrid numRowsTile orientation renderOrder scale tileHeight tileWidth width x y Methods changeViewPort changeViewPortBySize createMap destroy getLayerByIndex getLayerByName getL...

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

420. ProgressBar属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 67%]

...gressBar("../../../../res/ui/progressBar.png"); //设置宽度 progressBar.width = 400; //设置显示位置,在舞台居中 progressBar.x = (Laya.stage.width - progressBar.width ) / 2; progressBar.y = Laya.stage.height / 2; //设置九宫格边距,以防变形 progressBar.sizeGrid = "5,5,5,5"; ...

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