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

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

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

...{ htmlvideo:Laya.HtmlVideo; constructor() { Laya.stage.on(Laya.Event.CLICK,this,this.onClick); } onClick(){ this.initVideo(); } initVideo() { this.htmlvideo = new Laya.HtmlVideo(); this.htmlvideo.setSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.addEventListener("loadedmet...

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

642. 论坛的简单跑酷地板间距疑问 [ 91%]

...给予指导 关于增加地板,新地板产生条件是前一个旧地板(this.x + this.width) < this.maxRight,this.x初始都是852,是正数,this.width是旧地板宽度也是正数,所以只有当前一个旧地板的this.x等于负值时等式才会成立,也就是前一个旧地...

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

643. laya.spine.js问题以及spine.core.js问题 [ 91%]

...Ani会报错,导致ERROR事件也抛不出去。   private loop() { if (this.assetManager.isLoadingComplete()) { this.parseSpineAni(); return; } if (this.assetManager.hasErrors()) { this.event(Event.ERROR, "load failed:" + this.assetManager.getErrors()); return; } Laya.timer.frameOnce(1, this, th...

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

644. laya微信打包问题很多呀,就是加了一些绘图api,就报错 [ 91%]

..._CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; this.drawSomething(); } private drawSomething(): void { this.sp = new Sprite(); Laya.stage.addChild(this.sp); //画线 this.sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 this.sp.graphics.drawLines(176...

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

645. SpotLight介绍(JavaScript-3D基础(JS)-LayaAir3D之灯光) [ 91%]

...,同时光照区域边缘也有衰减现象。 ```typescript //聚光灯 this.spotLight = this.scene.addChild(new Laya.SpotLight()); //设置聚光灯颜色 this.spotLight.color = new Laya.Vector3(1, 1, 0); //设置聚光灯位置 this.spotLight.transform.position = new Laya.Vector3(0.0, 1.2, 0.0)...

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

646. Text的中划线(删除线) [ 91%]

...,但是不支持中划线,underline = true; 可以修改 laya.core.js this.underline && this.drawUnderline(textAlgin,x,y,i); __proto.drawUnderline=function(align,x,y,lineIndex){             var lineWidth=this._lineWidths[lineIndex];             switch (align){  ...

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

647. 网络和格式-Socket [ 91%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.connect(); } connect() { const Socket = Laya.Socket, Event = Laya.Event; socket = new Socket(); //socket.connect("echo.websocket.org", 80); socket.connectByUrl("ws://echo.websocket.org:80"); output = socket.output; socke...

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

648. Resources already exist,is repeated loading 加载特效报重复加载 [ 91%]

...);                      //创建场景         this.scene = new Laya.Scene3D();         Laya.stage.addChild(this.scene);                     //添加相机         var camera = new Laya.Camera(0, 0.1, 100);         this.scene.add...

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

649. spine 推荐使用方式 [ 91%]

...     */     __proto.destroyTexture=function(){         if(this._mainTexture!=null){             this._mainTexture.disposeBitmap();         }         this._needRecoverTexture = true;     }     /**      * 恢复纹理      */     __proto....

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

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

...all"; Laya.stage.bgColor = "#232628"; showApe(); // Laya.timer.frameLoop(1,this,myLoop) })(); function showApe() { // 方法1:使用loadImage加载背景1 var bg1 = new Sprite(); bg1.loadImage("war/bc.png"); Laya.stage.addChild(bg1);   //加载背景2 var bg2 = new Sprite(); bg2.loadImage("war/bc...

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