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

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

141. HTMLDivElement富文本居右问题 [ 69%]

...TMLDivElement富文本居右问题 const lb: HTMLDivElement = this.lb; lb.width = 100; lb.height = 24; const html1 = '<div style="float:right;"><span>1</span><span>2</span></div>'; const html2 = '<span style="float:right;">1</span>'; const html3 = '&l...

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

142. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 68%]

...() { /** * 背景类 * */ function Background(){ //图片的宽度 this.BG_WIDTH = 1600; //记录当前移动的值 this.moveX = 0; //定义背景1 this.bg1 = null; //定义背景2 this.bg2 = null; //草堆 this.grass = null; Background.__super.call(this); this.init(); } //Background 是一个显示...

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

143. 物理引擎显示旋转问题 [ 68%]

....alignH = Stage.ALIGN_CENTER;         Laya.stage.scaleMode = "fixedwidth";         Laya.stage.bgColor = '#000';         setup();     })();     function setup() {         initMatter();         initWorld();         Laya.stage.on("resize", this, o...

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

144. 怎么实现一个Timer的loop的delay时间越来越短? [ 68%]

...cuixueying 赞同来自: public function LayaAirDemo() { Laya.init(Browser.width,Browser.height); Laya.stage.bgColor="#EEFFCC"; sp=new Sprite(); sp.graphics.drawRect(0,0,200,200,"#FF0000"); Laya.stage.addChild(sp); Laya.timer.loop(delay,this,onLoop); } private function onLoop():void { delay-=50; sp....

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

145. 类似古文显示方式脚本,文字垂直显示,可以控制显示速度出现打字效果等 [ 67%]

...) { sprite.addChild(this.sprite); this.drawText(sprite.x, sprite.y, sprite.width, sprite.height); } onEnable(): void { } onDisable(): void { } } export enum layoutType { /**竖排 */ verticalRight = 0, } 2019-11-03 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀...

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

146. LayaAir能做RPG吗?不要问我能不能,因为我已经在做 - 杀意来袭 [ 65%]

...enderOrder = tJsonData.renderorder;             _mapW = tJsonData.width;             _mapH = tJsonData.height;                          _mapTileW = tJsonData.tilewidth;             _mapTileH = tJsonData.tileheight;                        ...

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

147. drawTexture 画出来的数据会有以前的数据 [ 65%]

...lhjicon_5.png"); img.x = 640; img.y = 320; iconSpr = new Sprite(); iconSpr.width = 1280; iconSpr.height = 640; iconSpr.addChild(img); btn.on(Event.CLICK,this,runGame1); } private function runGame1():void { xNum = Math.random()*7 - 3; yNum = Math.random()*7 - 3; Laya.timer.loop(20,this,onRun); Laya.t...

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

148. 加载.lh文件 运行后黑屏 无法显示 [ 65%]

...显示框位置                 this.text.x = Laya.stage.width / 2 -50 ;                 this.text.text = "触控点归零";                 //显示文本显示框                 this.text = new Laya.Text();              ...

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

149. (实现手指控制模型的缩放旋转)触控可以识别 但是导入的模型没有根据触控反应 [ 65%]

...  //设置文本显示框位置         this.text.x = Laya.stage.width / 2 -50 ;         this.text.text = "触控点归零";         //显示文本显示框                  this.text.name = "ceshi";         this.text.overflow = Laya.Text.HIDDEN;  ...

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

150. 超出文本区域的处理&滚动文本(JavaScript-LayaAir基础篇(JS)-文本) [ 64%]

...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 = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createText(); })(); function cre...

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