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

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

861. 按钮点击的位置发生偏移 [ 52%]

按钮点击的位置发生偏移 <div style="padding: 50px 0px;height:100vh"> <div style="position: relative"> <div id="mylayaCanvas" ></div> </div> </div>如代码所示 指定layacanvas外包两层div 样式如代码这样设置后发生点击的范围跟实...

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

862. Sprite.loadImage()中设置的y的值为Browser.ClientHight时不准确是为什么? [ 52%]

...? var dirBgLeft=cameraBgRight=20,dirBgBottom=20,dirBgSize=Browser.clientHeight*0.5,dirSpace=dirBgSize*0.2; var directionBg = new Sprite(); directionBg.loadImage("../bin/res/img/btn_direction$bg.png",dirBgLeft,Browser.clientHeight,dirBgSize,dirBgSize); Laya.stage.addChild(directionBg); Sprite.loadI...

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

863. [LayaAir2]在使用videoDom创建视频元素后iPad跟iPhone中位置不一样 [ 52%]

...= new Laya.Texture2D(videoTexture.video.videoWidth,videoTexture.video.videoHeight); var texture:Laya.Texture = new Laya.Texture(texture2D); var image:Laya.Image = new Laya.Image(); image.texture = texture; image.width = videoTexture.video.videoWidth; image.height = videoTexture.video.videoHeight; im...

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

864. vbox动态添加子项目问题 [ 52%]

... vbox:HBox = new HBox(); Laya.stage.addChild(vbox); vbox.width = 500; vbox.height = 300; var image:Image = new Image(); image.skin = "rank/132.jpg"; vbox.addChild(image); image.size(100,100); var image2:Image = new Image(); image2.skin = "rank/132.jpg"; vbox.addChild(image2); image2.size(100,100); 2...

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

865. 2.0)js按照官方遮罩写的程序,无法正常执行, 请问怎么回事,代码见内。 [ 51%]

..._img, Laya.Handler.create(head_img, function () {              this.height = this.width = 77;        var cMask = new Laya.Sprite();//创建遮罩对象        var r = 38.5; //遮罩圆形半径              cMask.graphics.drawCircle(0, 0, r, "#ff0000");//画一个圆形的遮...

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

866. Button属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 51%]

... Laya.stage.addChild(btn); //设置Button相关属性 btn.width = 100; btn.height = 50; btn.pos(100,100); btn.label = "按钮"; } ``` 上述代码运行效果如动图2所示: ![动图2](img/2.gif) (动图2) **Tips:** Button 组件的属性接口介绍请参考 [Button API](https://layaair2.ldc2.l...

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

867. 使用IDE制作的动画在pc模拟器播放OK在手机端不显示 [ 51%]

...nterval = 1000 / 60; // this.tl.play(); apesCtn.addChild(this.tl); apesCtn.height = 1500; apesCtn.width = 3248; this.tl.pivot(-1624,-750); }, 2019-01-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron ...

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

868. spine 播放错乱 [ 51%]

...ild(this.skeleton); this.skeleton.pos(Laya.Browser.width / 2, Laya.Browser.height / 2 + 100); //this.skeleton.scale(0.5, 0.5); this.skeleton.on(Laya.Event.STOPPED, this, this.play); this.play(); } private onError() { console.error("load spine error"); } private play(): void { console.log("1111111111...

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

869. 文字显示模糊 [ 51%]

...true;             _txt.width=300;             _txt.height=_txt.textHeight+10;             _txt.y=60;             Laya.stage.addChild(_txt); 用的字体是外加载的隶书字体 然后在电脑上显示就非常模糊,但是在pad上比较清晰,...

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

870. Sprite用graphics绘制图形后,mouse_over触发scale显示有问题 [ 51%]

...0000"); this._body.width = this._objectInfo.templateInfo.width; this._body.height = this._objectInfo.templateInfo.height; this.addChild(this._body); this.on(Event.MOUSE_OVER, this, this.__onMouseOverHole); this.on(Event.MOUSE_OUT, this, this.__onMouseOutHole); } this.pos(this._objectInfo.templateInf...

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