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

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

301. 我想移动容器来实现前进的动画,但是移动不了。这里的y有问题 但是又不知道改成什么 [ 50%]

...ebGL;   (function() { // 不支持WebGL时自动切换至Canvas Laya.init(400,852); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; showApe(); // Laya.timer.frameLoop(1,this,myLoop) })(); function show...

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

302. 更新到1.7.6beta之后,HBox有bug [ 50%]

...7-06-07 0 0 分享 微博 QZONE 微信 lusky 赞同来自: Laya.init(1200, 400); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { var hbox: laya.ui.HBox = new laya.ui.HBox(); for (var i: number = 0; i < 10; i+...

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

303. 最新版本IDE,如何获取http返回的json数据 [ 50%]

...adyState == 4 && (xhr.status >= 200 && xhr.status <= 400)) {                 if(JSON.parse(xhr.responseText).status===1){                     console.log ('登录成功')                     cc.director.loadScene("main")                 }else...

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

304. 使用mask后,只要调用 Laya.Resource.destroyUnusedResources() 就会引起报错 [ 50%]

...royUnusedResources() 就会引起报错 重现demo如下: Laya.init(600, 400, WebGL); let bgSprite = new Laya.Sprite(); bgSprite.graphics.drawRect(0, 0, 200, 200, "#0xFFFF00"); bgSprite.pos(300, 300); Laya.stage.addChild(bgSprite); let mask = new Laya.Sprite(); bgSprite.mask = mask; mask.graphics....

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

305. ProgressBar属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 50%]

...sBar = new ProgressBar("res/ui/progressBar.png"); this.progressBar.width = 400; this.progressBar.x = (Laya.stage.width - this.progressBar.width) / 2; this.progressBar.y = Laya.stage.height / 2; this.progressBar.sizeGrid = "5,5,5,5"; this.progressBar.changeHandler = new Handler(this, this.onChange); ...

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

306. list 加载动画为什么实现的效果会错乱掉? [ 50%]

...st 加载动画为什么实现的效果会错乱掉? var WID = 80, HEI = 400; function Item1() { Item1.__super.call(this); this.size(WID, HEI); this.setImg = function(src) { var ani = new Animation(); ani.loadAtlas(src); // 加载图集动画 ani.interval = 100; // 设置播放间隔(单位:...

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

307. Timer.clear 方法有问题 [ 50%]

...来自: Laya.Timer.once(100, this, this.fun, null, false); Laya.Timer.once(400, this, this.fun, null, false); Laya.Timer.once(900, this, this.fun, null, false); 在另一处: Laya.Timer.clear(this, this.fun);  这样的写法应该很常见吧 2018-07-23 0 3 分享 微博 QZONE 微信 为什么...

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

308. 【字节小游戏】游戏中播放视频 [ 49%]

...ya.stage.addChild(reference); reference.pos(100, 100); reference.size(600, 400); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#CCCCCC"); // 每次舞台尺寸变更时,都会调用Utils.fitDOMElementInArea设置Video的位置,对齐的位置和refence重合 Laya.stage.on...

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

309. 圆形的头像怎么实现? [ 49%]

...y、半径是图片的一半 var tx = new Sprite(); tx.x = 640-150; tx.y = 400-150; // tx.scale(0.4,0.4); tx.loadImage('123.jpg'); Laya.stage.addChild(tx); tx.mask = point; </script> </body> </html> 目前自己弄,只想到这个方法。。。感觉还行~ Moeb • 2017-09-29 1...

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

310. 分享:避免鼠标快速移动,mouseout和mouseover触发顺序不一致的问题! [ 49%]

...状态的显示对象 public function MouseOver_mouseOut() { Laya.init(600,400); Laya.stage.bgColor='#EEFFCC'; arr=; var sp1:Sprite=new Sprite(); sp1.autoSize=true; sp1.name='sp1'; sp1.graphics.drawRect(0,0,100,100,"#FF0000"); var sp2:Sprite=new Sprite(); sp2.autoSize=true; sp2.name='sp2'; sp2.graph...

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