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

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

1571. LayaNative端使用.ttf字体 [ 50%]

...哈哈哈哈哈哈哈哈哈哈哈哈哈!"; Laya.stage.addChild(text); text.width=100; text.height=100; } } } 2016-12-19 0 6 分享 微博 QZONE 微信 皮 赞同来自: Browser.window.conch这个是未定义的,不会执行Browser.window.conch.setFontFaceFromBuffer("hu",arr);这句话。怎么回...

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

1572. 新手!谁懂得把下面两个文件转成layaair可以运行的代码 [ 50%]

... debug_txt.autoSize = TextFieldAutoSize.LEFT;             debug_txt.width = 1000;             debug_txt.y = 20;             var tf:TextFormat = new TextFormat(null,12,0xFFFFFF);             debug_txt.defaultTextFormat = tf;             debug_txt.text = "start...";    ...

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

1573. HTMLDivElement中image标签多次赋值报错 [ 50%]

...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() { createPa...

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

1574. HtmlDivElement 描边和下划线不能同时使用 [ 50%]

... layabox 赞同来自: 刚刚实测没问题,   代码:<div style='width:300px;height:100px;color:#ff0000;font-size:25px;font-family:SimSun;vertical-align:bottom;line-height:20px;'> <p><span style='font-weight:bold;stroke:3px; font:24px Arial' color='red' href='https://ask.layabo...

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

1575. 2.0字体比较小的时候,某些字显示不全 [ 50%]

...rosoft YaHei"; txt.color = "#ff0000"; txt.leading = 5; txt.x = (Laya.stage.width - txt.textWidth) / 2; txt.y = (Laya.stage.height - txt.textHeight) / 2; Laya.stage.addChild(txt); } } }上面是我的简单测试代码: 图片是2.0版本和1.8版本的字体显示对比。 2.0版本的ggg下面部...

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

1576. layaAir如何实现for循环加载多张图片,并且通过事件按比例缩小 [ 50%]

...te = new Sprite;             ape.x=(apesCtn._childs.length)*(stageWidth/4)             var bl:Number=texture.width/texture.height             ape.graphics.drawTexture(texture,0,0,stageWidth/4,stageWidth/4/bl);             apesCtn.addChild(ape);         } 201...

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

1577. Texture2D.setPixels会导致图片质量变差了,获取原生的pixels没有进行改动。怎么回事呢? [ 50%]

...Obj = this; var onload=function (){ var tex=new Laya.Texture2D(imageSource.width,imageSource.height,1,false,true); tex.wrapModeU=1; tex.wrapModeV=1; tex.loadImageSource(imageSource,true); tex._setCreateURL(url); var tex2=new Laya.Texture(tex); tex2.url=url;   var image:Laya.Image = new Laya.Image()...

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

1578. 位图字体的制作与使用(TypeScript-LayaAir基础篇(TS)-文本) [ 50%]

...,可以设定为`White text with alpha`,即白色字透明底。 | | Width | 导出的位图宽度 | | Height | 导出的位图高度 | | Font descriptor | 字体描述文件,必须要选择 xml | | Textures | 纹理图片格式,必须要选择 png | #### 第六步:导出位图字体 完...

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

1579. matter.js mouseconstraint在微信小游戏中无效 [ 50%]

...   var pageYOffset = exports.pageYOffset = 0; 2、module4里修改clientWidth和clientHeight属性: {      key: 'clientWidth',      get: function get() {      var ret = parseInt(this.style.fontSize, 10) * this.innerHTML.length;      return Number.isNaN(ret) ? this.width : ret; ...

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

1580. (有demo)2d和3d结合,正交相机下,ui节点显示错位,与预期不符,且舞台不刷新 [ 50%]

...点显示也会恢复正常。 游戏参数: GameConfig{     static width:number=750;     static height:number=1334;     static scaleMode:string="showall";     static screenMode:string="vertical";     static alignV:string="middle";     static alignH:string="center"; }...

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