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

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

51. Text的中划线(删除线) [ 94%]

...,但是不支持中划线,underline = true; 可以修改 laya.core.js this.underline && this.drawUnderline(textAlgin,x,y,i); __proto.drawUnderline=function(align,x,y,lineIndex){             var lineWidth=this._lineWidths[lineIndex];             switch (align){  ...

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

52. Socket连接不上(已解决) [ 93%]

...et连接不上(已解决) socket = new Socket(); socket.on(Event.OPEN, this, onSocketOpen); socket.connect("127.0.0.1", 8080); 照着官方例子,服务器显示连接上了,但onSocketOpen没调用到,而且socket的connected为false。 能帮忙看是什么原因么?   具体代码:...

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

53. 鼠标交互-修正交互区域 [ 93%]

...舞台 Laya.stage.name = "暗灰色舞台" Laya.stage.on(Event.MOUSE_DOWN, this, onDown); } function createCoralRect() { var coralRect = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器"; coralRect.s...

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

54. 输入设备-指南针 [ 93%]

...stage.bgColor = "#232628"; Laya.loader.load(compassImgPath, Handler.create(this, this.init)); } init() { const Gyroscope = Laya.Gyroscope, Event = Laya.Event; // 创建罗盘 this.createCompass(); // 创建方位指示器 this.createDirectionIndicator(); // // 画出其他UI this.drawUI(); // // 创...

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

55. 输入设备-指南针 [ 93%]

...ignV = Stage.ALIGN_MIDDLE; Laya.loader.load(compassImgPath, Handler.create(this, init)); })(); function init() { // 创建罗盘 createCompass(); // 创建方位指示器 createDirectionIndicator(); // 画出其他UI drawUI(); // 创建显示角度的文本 createDegreesText(); Gyroscope.instance.on...

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

56. 为什么laya的Button渲染逻辑顺序是先渲染,再获取素材切片? [ 93%]

.../** *@private *改变对象的状态。 */ __proto.changeState=function(){ this._stateChanged=false; this.runCallLater(this.changeClips); var index=this._state < this._stateNum ? this._state :this._stateNum-1; this._sources && (this._bitmap.source=this._sources[index]); if (this.label){ t...

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

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

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

58. 多点触控的使用(JavaScript-3D基础(JS)-LayaAir3D之鼠标交互) [ 93%]

...ypescript //重写脚本中的onUpdate方法 onUpdate() { var touchCount = this._scene.input.touchCount(); if (1 === touchCount){ //判断是否为两指触控,撤去一根手指后引发的touchCount===1 if (this.isTwoTouch){ return; } this._text.text = "触控点为1"; //获取当前的触控点...

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

59. 多点触控的使用(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 93%]

...ypescript //重写脚本中的onUpdate方法 onUpdate() { var touchCount = this._scene.input.touchCount(); if (1 === touchCount){ //判断是否为两指触控,撤去一根手指后引发的touchCount===1 if (this.isTwoTouch){ return; } this._text.text = "触控点为1"; //获取当前的触控点...

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

60. Laya引擎bug [ 93%]

...roto.parseLines=function(text){         var needWordWrapOrTruncate=this.wordWrap || this.overflow==Text.HIDDEN;         if (needWordWrapOrTruncate){             var wordWrapWidth=this.getWordWrapWidth();         }         if (this._currBitmapFont){    ...

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