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

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

1531. HTMLDivElement中image标签多次赋值报错 [ 49%]

...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() { createParagraph(); // 代码...

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

1532. AS3与JS混合编码(ActionScript-2D进阶篇(AS3)-扩展模块) [ 49%]

...JSDemo { public function JSDemo() { //初始化引擎 Laya.init(0, 0); var Height:int = Browser.window.innerHeight; var width:int = Browser.window.innerWidth; Browser.window.console.log("Console Log:浏览器高:"+ Height + " 浏览器宽:" + width); } } } ``` **方式二:** ```java package ...

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

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

...g = 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下面部分都被截断了。     附件 : --> 2019-06...

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

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

...load=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(); image.source = t...

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

1535. 屏幕适配API概述(ActionScript-2D基础篇(AS3)-屏幕适配) [ 49%]

...   设备像素分辨率:Laya.Browser.clientWidth,Laya.Browser.clientHeight;   设备物理分辨率:Laya.Browser.width,Laya.Browser.height;   像素比:Laya.Browser.pixelRatio;    默认从浏览器获得的clientWidth不是像素分辨率,而是经过缩放过的分辨率...

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

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

...h)*(stageWidth/4)             var bl:Number=texture.width/texture.height             ape.graphics.drawTexture(texture,0,0,stageWidth/4,stageWidth/4/bl);             apesCtn.addChild(ape);         } 2016-10-23 添加评论 免费帖 --> 分享 微博 QZONE 微信 没...

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

1537. laya.d3.resource.Texture2D [ 49%]

...资源。 BaseTexture format : int[read-only] 纹理格式 BaseTexture height : int[read-only] 获取高度。 BaseTexture magFifter : int 放大过滤器 BaseTexture minFifter : int 缩小过滤器 BaseTexture mipmap : Boolean 是否使用mipLevel BaseTexture repeat : Boolean 是否使用重...

来源: laya_api 发布时间: 20170929

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

...YOffset = 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

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

...戏参数: 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"; } window.screenOrientation = "por...

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

1540. 同一个Graphics里面绘制超过20000个矢量rect的情况下,Uncaught Error: IBQuadrangle count(之前发起的问题不知道为什么找不到) [ 49%]

...+) { if(count == 10000) { var htmlCanvas:HTMLCanvas = a.drawToCanvas(width,height,0,0); var texture:Texture = new Texture(htmlCanvas); var b:Sprite = new Sprite(); b.graphics.drawTexture(texture); a.graphics.clear(true); a.destroy(); a = b; } a.graphics.drawRect(10*i, 10*j, 10, 10, "#ff0000"); count...

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