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

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

311. setSubPixels画布擦除不掉 [ 95%]

setSubPixels画布擦除不掉 this.btn.label = Math.random().toString(); // console.log(Math.random()); let tex:Laya.Texture = Laya.Loader.getRes(this.bUrl); let x:number = this._testStatus == true ? 0:50;//Math.random()>0.5 ? 50 : 0; this._testStatus = !this._testStatus; // let canvasInfo = th...

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

312. animate 动画播放 怎么把攻击 开火 合起来播放 [ 95%]

...{ //初始化舞台 Laya.init(1334, 750, Laya.WebGL); //创建动画实例 this.roleAni = new Laya.Animation(); //加载动画图集,加载成功后执行回调方法 this.roleAni.loadAtlas("res/atlas/imgs/role/wp116.atlas", Laya.Handler.create(this, this.onLoaded)); } private onLoaded(): void { /...

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

313. Laya.timer.loop只能重复调用不同函数吗,我想通过传参调用这样不行? [ 95%]

...吗,我想通过传参调用这样不行? 比如 Laya.timer.loop(50, this, this.Scroll,[this.textArr[0]]); Laya.timer.loop(50, this, this.Scroll,[this.textArr[1]]); Laya.timer.loop(50, this, this.Scroll,[this.textArr[2]]); Laya.timer.loop(50, this, this.Scroll,[this.textArr[3]]); Laya.timer.loop...

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

314. laya.sprite 不接受click事件 [ 95%]

laya.sprite 不接受click事件 代码如下: this._firstSprite= new Laya.Sprite(); this._firstSprite.pos(100,150); Laya.stage.addChild(this._firstSprite); this._firstSprite.loadImage('../laya/assets/image/0.jpg'); //this._firstSprite.scale(0.3,0.3); this._firstSprite.size(200,200); //this._firs...

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

315. Native1.0.1 无法连接wss [ 95%]

...aitve无法连接wss 示例代码如下: const url = "wss://xxx.com:8888"; this.socket = new Laya.Socket(); this.socket.endian = Laya.Byte.BIG_ENDIAN; this.socket.on(Laya.Event.OPEN, this, this.onConnectSuccess); this.socket.on(Laya.Event.CLOSE, this, this.onDisonnect); this.socket.on(Laya.Event.ERR...

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

316. Laya3.0正式版spine3.8的动画资源不能正常显示 [ 95%]

...res/spineboy-pma.skel", Loader.SPINE).then((templet: SpineTemplet) => { this.skeleton = new SpineSkeleton(); this.skeleton.templet = templet; this.owner.addChild(this.skeleton); this.skeleton.pos( this.pageWidth / 2, this.pageHeight / 2 + 100); this.skeleton.scale(0.4, 0.4); this.skeleton.on(Laya...

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

317. 物理射线检测(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 95%]

...ory=3d&group=Physics3D&name=PhysicsWorld_RayShapeCast)); ```typescript this.hitResult = new Laya.HitResult(); this.hitResults= []; //是否穿透 if (this.castAll) { //进行射线检测,检测所有碰撞的物体 this.scene.physicsSimulation.raycastAllFromTo(this.from, this.to, this.hitResults...

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

318. localToGlobal获取坐标总是错误! [ 95%]

...知道是否是我代码的问题,附件有DEMO工程 let buttonTest = this.getChildByName("buttonTest"); this.sprteCenter = this.getChildByName("sprteCenter"); this.boxSpaw = this.getChildByName("boxSpaw"); //this.spriteSpaw.loadImage("../..") buttonTest.on(Laya.Event.CLICK,this,()=>{ let poin...

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

319. Sprite-遮罩-放大镜 [ 95%]

...olor = "#232628"; Laya.loader.load([bgPath, maskPath], Laya.Handler.create(this, this.setup)); } setup() { const Sprite = Laya.Sprite; let bgRes = Laya.loader.getRes(bgPath), maskRes = Laya.loader.getRes(maskPath); let bg = new Sprite(); Laya.stage.addChild(bg); bg.graphics.drawTexture(bgRes); let b...

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

320. 横竖屏切换,此引擎渲染有BUG [ 95%]

... 横竖屏切换,此引擎渲染有BUG Laya.stage.on(Laya.Event.RESIZE, this, this.OnresizeFn); Laya.stage.alignH = "center";//"left";  Laya.stage.alignV = "middle";//"top";  Laya.stage.screenAdaptationEnabled=true;   oldWith: number = 0; oldheight: number = 0; HengPing(isFirst: boolean): void ...

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