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

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

11. SVG渐变精灵的扩展脚本继承了多个精灵, 在safari环境下重叠了渲染 [ 89%]

...9/xlink" version="1.1" ';             data += 'viewBox="0 0 ' + this.width + ' ' + this.height + '" ';             // set svg width and height             data += 'width="' + this.width + '" height="' + this.height + '">';             data += '<defs>';          ...

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

12. Sprite-屏幕截图 [ 89%]

...换至Canvas Config.preserveDrawingBuffer =true; Laya.init(Browser.clientWidth, Browser.clientHeight); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_FIXED_AUTO; Laya.stage.bgColor = "#232628"; Laya.loader.load(this.btnArr.concat("r...

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

13. UI-Clip [ 88%]

...howBg() { var bg = new Image(bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg.width >> 1, Laya.stage.height - bg.height >> 1); Laya.stage.addChild(bg); } function createTimerAnimation() { counter = new Clip(clipSkin, 10, 1); counter.autoPlay = true; counter.interval = 1000; counter.x = (Laya...

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

14. UI-Clip [ 88%]

...ya.Image; let bg = new Image(bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg.width >> 1, Laya.stage.height - bg.height >> 1); Laya.stage.addChild(bg); } createTimerAnimation() { const Clip = Laya.Clip; this.counter = new Clip(clipSkin, 10, 1); Laya.stage.addChild(this.counter); this.counter...

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

15. normalizedViewport修改问题 [ 88%]

...ce){ var vp=this._viewport; var size=this.renderTargetSize; var sizeW=size.width; var sizeH=size.height; this._normalizedViewport.x=vp.x / sizeW; this._normalizedViewport.y=vp.y / sizeH; this._normalizedViewport.width=vp.width / sizeW; this._normalizedViewport.height=vp.height / sizeH; } return this...

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

16. Maximum call stack size exceeded [ 88%]

...reg("script/GameMain.js",GameMain);         }     }     GameConfig.width = 640;     GameConfig.height = 1136;     GameConfig.scaleMode ="fixedwidth";     GameConfig.screenMode = "none";     GameConfig.alignV = "top";     GameConfig.alignH = "left";     GameConfig.startScene = "ma...

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

17. Error: asBitmap no size! [ 88%]

...2 个回复 kylin 赞同来自: 果粒儿 怀疑是传参的时候canvas的width或height没设置,或者canvas的宽高为0 可以在这个方向上排查一下   或者提供一个简单可复现的demo,我们看一下 2020-07-31 1 1 分享 微博 QZONE 微信 明森 赞同来自: 原因是, ...

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

18. 输入设备-贪吃蛇(重力感应) [ 87%]

...wser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; function Segment(width, height) { Segment.super(this); Segment.prototype.init = function() { this.graphics.drawRect(-height / 2, -height / 2, width + height, height, "#FF7F50"); } // 获取关节另一头位置 Segment.prototype.getPinPositio...

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

19. 为什么自定义shader大图正常,小图就被缩小了 [ 87%]

... ib顶点索引数组 */ myShaderSprite.prototype.init = function(texture,width_Size,height_Size,vb,ib){ this.vBuffer = Laya.VertexBuffer2D.create(); this.iBuffer = Laya.IndexBuffer2D.create(); this.ibData = new Uint16Array(); if(vb) { vbArray = vb; } else{ vbArray = []; var texWidth = texture.width...

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

20. 输入设备-贪吃蛇(重力感应) [ 87%]

...a.Accelerator; // 不支持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.initSnake(); // ...

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