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

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

441. timer.loop帧率高于物理帧率移动父级导致子物体本地坐标异常 [ 93%]

...ameRate = Laya.Stage.FRAME_SLOW;         Laya.Stat.show();         this.scene = Laya.stage.addChild(new Laya.Scene3D());                  Laya.timer.loop(1, this, this.loopfun);     }     loopfun(){         this.lastT = Date.now();         let dis = 1;         if(!th...

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

442. 3D模型怎么删除?没回切换页面原来的模型都还在? [ 93%]

...面并继承了各自的ui.xxxUI   2.新建了个场景添加到B页面 this.scene = new Laya.Scene(); this.addChild(this.scene); 3.新建模型,并且添加B页面的3D场景中 var map: Laya.Sprite3D = Laya.Sprite3D.load("cj/cj.lh"); this.scene.addChild(map);   4.切换页面 private playGame():...

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

443. 类似古文显示方式脚本,文字垂直显示,可以控制显示速度出现打字效果等 [ 93%]

...alSpace: number = 5; private sprite: Laya.Sprite; constructor() { super(); this.sprite = new Laya.Sprite(); } drawText(x: number, y: number, w: number, h: number) { console.log(2222); var j = 0;//控制行列 var printNumber = 0;//当前输出字数 var fonts = this.fontSize + "px" + " " +this.font ...

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

444. 模型不同实例,AnimationNode位置只有第一个会更新的问题 [ 93%]

...题 同一模型创建不同Sprite3D实例,Animation在更新的时候 this._curAvatarNodeDatas=clip._getAvatarDataWithCache(this._avatar,this._cachePlayRate,frameIndex); if (!this._curAvatarNodeDatas){ this._curAvatarNodeDatas=[]; this._curAvatarNodeDatas.length=this._avatarNodes.length; clip._ca...

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

445. 使用3D摄像机 · LayaAir3.3 · 引擎文档 · LAYABOX [ 93%]

...* 此方法为虚方法,使用时重写覆盖即可 */ onAwake(): void { this.curpos = new Laya.Vector3(); } /** * 第一次执行update之前执行,只会执行一次 * 此方法为虚方法,使用时重写覆盖即可 */ onStart(): void { this.camera = this.owner as Laya.Camera; if (this.tar...

来源: Laya3.0_文档 发布时间: 20251010

446. 感觉实例之间是关联的,求指教。(已解决) [ 93%]

...面; */ var Panel1 = (function (_super) { function Panel1() { Panel1.super(this); //this.poke_a.x=0; } Laya.class(Panel1, "Panel1", _super); var _proto = Panel1.prototype; //======================================= //将指定的牌显示到桌面上 //======================================= _proto.s...

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

447. 计时器-间隔循环 [ 93%]

...rotateTimeBasedText.x, rotateTimeBasedText.y + vGap); Laya.timer.loop(200, this, animateTimeBased); Laya.timer.frameLoop(2, this, animateFrameRateBased); } function createText(text, x, y) { var t = new Text(); t.text = text; t.fontSize = 30; t.color = "white"; t.bold = true; t.pivot(t.width / 2, t.h...

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

448. 在 tiledmap 插入一个精灵在上面 [ 93%]

...ap; private sp:Laya.Sprite;   constructor(){   console.info("start");   this.init(); } init():void{   Laya.init(800, 700, Laya.WebGL);   Laya.loader.load("res/atlas/images.atlas",Laya.Handler.create(this,this.onLoaded),null,Laya.Loader.ATLAS); }   onLoaded(){   console.info("onLoaded");   th...

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

449. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 93%]

...,可以使用局部变量来保存它: ```typescript foo() { var prop=this.target.prop; //使用prop this.process1(prop); this.process2(prop); this.process3(prop); } ``` ### 二、计时器 LayaAir提供两种计时器循环来执行代码块。 1. `Laya.timer.frameLoop`执行频率依赖于帧...

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

450. UI-Slider [ 93%]

...er.png", "res/ui/vslider$bar.png"); Laya.loader.load(skins, Handler.create(this, this.onLoadComplete)); } onLoadComplete() { this.placeHSlider(); this.placeVSlider(); } placeHSlider() { const HSlider = Laya.HSlider, Handler = Laya.Handler; let hs = new HSlider("res/ui/hslider.png"); Laya.stage.addCh...

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