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

大约有 4,034 项符合查询结果, 库内数据总量为 30,906 项。 (搜索耗时: 0.0079 秒)

661. List组件拖动浏览时item会出现重叠的现象 [ 91%]

...可做的操作 list.selectEnable = true; list.selectHandler = new Handler(this, this.onSelect); // 滚动条的橡皮筋操作:回弹时间及弹性距离 list.scrollBar.elasticBackTime = 200; list.scrollBar.elasticDistance = 5; Laya.stage.addChild(list); // 设置数据项为对应图片的路...

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

662. DialogManager怎么添加遮罩层 [ 91%]

...大礼包通用素材/通用素材/背景黑色蒙版.png",0,0,1600,1080); this.scTipsPg= new ScTpisUI(); console.log(this.scTipsPg.manager); this.scTipsPg.manager=dialogManager; this.scTipsPg.manager.maskLayer=sprite1; this.scTipsPg.popupCenter=false; this.scTipsPg.top=60; this.scTipsPg.right=-510;...

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

663. graphics透明度设置详细步骤 [ 91%]

... save;alpha;draw;restore;  比如://画一个半透明屎黄色区域 this.graphics.save(); this.graphics.alpha(0.5); this.graphics.drawRect(-40, -110, 80, 110, "#ffcc00"); this.graphics.restore(); //再画一个红色小半透明区域 this.graphics.save(); this.graphics.alpha(0.7); this.graphi...

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

664. HttpRequest感觉没有发成功 [ 91%]

...; xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); xhr.send("https://www.baidu.com","","get","text"); function processHandler(data){ console.log(data); console.log("pro...

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

665. 关于protobuf读取的问题,js的lists.toArrayBuffer() 该如何读取? [ 91%]

...,js的lists.toArrayBuffer() 该如何读取? 根据官方的例子: this.byte.writeByte(1);//写入一个字节 this.byte.writeInt16(20);//写入一个int16的数据 然后依次读取 var a:int = this.byte.getByte(); var b:int = this.byte.getInt16(); 那么如果我这样: this.byte.writeIn...

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

666. drawToTexture截大图有问题,会丢失 [ 91%]

...题,会丢失 private nsp:Laya.Sprite;     init(): void {         this.nsp=new Laya.Sprite();         this.nsp.graphics.drawRect(0,0,1600,1600,"#ff0000");         this.nsp.mouseThrough=true;         Laya.stage.addChild(this.nsp);         this.nsp.on(Laya.Event.CLICK,this,this...

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

667. 动画无法添加到舞台问题 [ 91%]

...ero_fly1.png", "fj/hero_fly2.png"], "hero_fly");//创建飞机飞行缓存 this.LeadBody = new Laya.Animation(); this.LeadBody.play("hero_fly");//播放动画 this.bound = this.LeadBody.getBounds(); this.LeadBody.pos(-this.bound.width/2,-this.bound.height/2);//设置动画位置 Laya.stage.addChild(...

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

668. UI-ComboBox [ 91%]

...ALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(skin, Handler.create(this, onLoadComplete)); })(); function onLoadComplete() { var cb = createComboBox(skin); cb.autoSize = true; cb.pos((Laya.stage.width - cb.width) / 2, 100); cb.autoSize = false; } function createComboBox(skin) { var comboBox ...

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

669. 物体每帧y方向移动,超出屏幕高度消失,可还没有超出屏幕高度就提前消失了! [ 91%]

...的代码在两个不同的页面------------- _proto.run = function () { this.speed = 1; Laya.timer.frameLoop(1, this, () => { console.log(this.obstacle0.y, Laya.Browser.height); //this.obstacle0是一个精灵对象 this.obstacle0.y += this.speed; if (this.obstacle0.y > Laya.Browser.height) ...

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

670. UI-Input [ 91%]

...t (3).png", "res/ui/input (4).png"] Laya.loader.load(skins, Handler.create(this, this.onLoadComplete)); } onLoadComplete() { for (let i = 0, len = skins.length; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stag...

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