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

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

111. 骨骼动画进阶(TypeScript-2D进阶篇(TS)-动画进阶) [ 97%]

...ructor() { Laya.WebGL.enable(); Laya.init(1000, 900); //创建动画模板 this.templet = new Laya.Templet(); this.templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.templet.on(Laya.Event.ERROR, this, this.onError); this.templet.loadAni("res/spine/goblins/goblins.sk"); } onError() { con...

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

112. 加载TiledMap 不显示 [ 97%]

...OWALL;         Laya.stage.bgColor = "#232628";          this.createMap();          Laya.stage.on("click", thisthis.onStageClick);     }      private createMap(): void {         this.tiledMap = new TiledMap();         this.tiledMap.create...

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

113. 网络请求添加headers后 post数据错误 [ 97%]

...加headers则正常  示例代码  var headers = [ 'C-Sign', sign ]; // this.caller = caller; this.callbackHandler = callback; // this.errcallback = errcallback; //this.http.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); this.http.once(Laya.Event.COMPLETE, this, this.onHttpRequestCom...

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

114. image在相应loaded的时候,无法正确获取高度 [ 97%]

...mic extends Laya.Image { matterBody: Matter.Body; constructor() { super(); this.on('start', this, this.init); } private init():void { console.log("init", this.x, this.y, this.width, this.height, this.scaleX, this.scaleY); var createOption: any = { isStatic: false, }; this.matterBody = Matter.Bodies....

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

115. [LayaAirIDE 2.0]TextInput真机输入时显示蓝色字,求解 [ 97%]

...: string = ""; /** 输入框数组 */ private _arrInput: Laya.TextInput = [this.input_nickname, this.input_mobile, this.input_password, this.input_repassword]; /** 标签数组 */ private _arrLabel: Laya.Label = [this.lb_nickname, this.lb_mobile, this.lb_password, this.lb_repassword]; /** 验证标...

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

116. [LayaAir3]list.selectHandler [ 97%]

...选择的索引:" + index);         let checkBoxItem:Laya.CheckBox = this._list.getChildAt(index).getChildAt(0) as Laya.CheckBox;         if(checkBoxItem!=null){                         switch(checkBoxItem.name.trim()){                 case "0":{                ...

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

117. UI-Clip [ 97%]

...Laya.loader.load([buttonSkin, clipSkin, bgSkin], laya.utils.Handler.create(this, onSkinLoaded)); })(); function onSkinLoaded() { showBg(); createTimerAnimation(); showTotalSeconds(); createController(); } function showBg() { var bg = new Image(bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg...

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

118. 鼠标交互-自定义事件 [ 97%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createSprite(); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; this.sp = new Sprite(); this.sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); this.sp.pivot(100, 100); this.sp....

来源: Laya2.0_示例 发布时间: 20250222

119. 分享:图集资源做位图文本的工具类(知道fontclip组件的可以略过了,之前一直没注意到这个组件) [ 97%]

...tring, width: number, align: string = "left",padding: number=0) { super(); this.width = width; this.resFix = resFix; this._align = align; this._padding = padding; } /** * 字间距 */ public set padding(v: number){ if(v === this._padding){return;} this._padding = v; if(this.text){ this.createFnt(thi...

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

120. 输入设备-地图 [ 97%]

...2628"; // 本地运行,需要在index.html中引用百度地图API文件 this.createDom(); this.initMap(); this.createInfoText(); let successHandler = new Handler(this, this.updatePosition); let errorHandler = new Handler(this, this.onError); // 使用高精度位置 Geolocation.enableHighAccuracy...

来源: Laya2.0_示例 发布时间: 20250222