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

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

101. 设置适配SCALE_FIXED_WIDTH,结果少部分andriod机型不能正确适配屏幕 [ 90%]

设置适配SCALE_FIXED_WIDTH,结果少部分andriod机型不能正确适配屏幕 主要设置屏幕适配的代码是下面,大部分手机是好的,有少部分andriod机器有比较大的概率出现半屏的情况。请问下是引擎不兼容呢,还是代码写的不完善  class Mai...

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

102. 文本-禁止编辑 [ 90%]

...t = Laya.Stat; // 不支持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.createInput(); } createInput() { ...

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

103. laya.d3.math.Viewport_API3.0 [ 90%]

...iewport Index Constructors constructor Properties height maxDepth minDepth width x y _tempViewport Methods cloneTo project set unprojectFromMat unprojectFromWVP Constructors constructor new Viewport(x?: number, y?: number, width?: number, height?: number): Viewport Defined in laya/d3/math/Viewport.t...

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

104. 关于创建Sprite获取大小 [ 90%]

...拿不到真实的大小?    这个建议官方改下接口,理论上width和height用来检测碰撞,那你看到的就应该是碰撞的边缘,按照官方的注释显然不太合理。   谢谢。 2018-05-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果...

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

105. 鼠标交互-修正交互区域 [ 90%]

...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { buildWor...

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

106. 性能测试-卡通人物2 [ 90%]

...ss Character function Character(images) { Character.super(this); Character.WIDTH = 110; Character.HEIGHT = 110; var bloodBar; var animation; var nameLabel; Character.prototype.createAnimation = function(images) { animation = new Animation(); animation.loadImages(images); animation.interval = 70; ani...

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

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

...his._skin); if (!img){ console.log("lose skin",this._skin); return; }; var width=img.sourceWidth; var height=img.sourceHeight / this._stateNum; img.$_GID || (img.$_GID=Utils.getGID()); var key=img.$_GID+"-"+this._stateNum; var clips=AutoBitmap.getCache(key); if (clips)this._sources=clips; else { thi...

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

108. Text.as中parseLines方法里的问题 [ 90%]

...到有错误日志: TypeError: undefined is not an object (evaluating 's.width') at line 3 in https://usr/game.js _parseLines@https://usr/game.js:3:256231 typeset@https://usr/game.js:3:255040 typeset@https://usr/game.js:48:211550 …………   查了下源码, 定位到Text.as中parseLines()...

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

109. 性能测试-卡通人物2 [ 90%]

...s.nameLabel.text = "Default"; this.nameLabel.fontSize = 13; this.nameLabel.width = Character.WIDTH; this.nameLabel.align = "center"; this.addChild(this.nameLabel); } setSpeed(value) { this.speed = value; } setName(value) { this.nameLabel.text = value; } update() { this.x += this.speed; if (this.x >=...

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

110. 关于缓动函数from的一些问题记录 [ 90%]

...r letterText = new Laya.Text(); letterText.text ="hello world"; letterText.width = 400; letterText.height = 200; letterText.fontSize = 36; letterText.align = "center"; letterText.valign = "middle"; var offsetPos={offsetX:100,offsetY:100}; letterText.x = Laya.stage.width - letterText.width>>1 +...

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