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

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

321. 基础文本 · LayaAir3.3 · 引擎文档 · LAYABOX [ 94%]

... Laya.Text }) txt: Laya.Text; constructor() { super(); } onAwake(): void { this.txt.text = "第{n=1}页"; //显示文本的初始化内容 } onStart(): void { let page: number = 1; Laya.timer.frameLoop(10, this, () => { page += 1; //在定时器中让变量page每次自增1 this.txt.setVar("n", p...

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

322. 音频-播放演示 [ 94%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; var gap = 10; //创建一个Sprite充当音效播放按钮 let soundButton = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + g...

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

323. H5页面的骨骼动画不能显示完整,兼容性问题? [ 94%]

...整,兼容性问题? // 加载动画 loadAni(): void { var aniPath = this.ANIS[this.fishIndex]; this.mFactory = new Laya.Templet(); this.mFactory.on(Laya.Event.COMPLETE, this, this.parseComplete); this.mFactory.loadAni(aniPath); } // 动画解析完成,添加到舞台,并且开始swim parseCom...

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

324. this.btClose1.on(Laya.Event.CLICK,null,this.close);报错 [ 94%]

this.btClose1.on(Laya.Event.CLICK,null,this.close);报错 this.btClose1.on(Laya.Event.CLICK,null,this.close); 这句代码报错  附件 : --> 2017-06-19 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueyin...

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

325. 摄像机捕捉目标(TypeScript-3D基础(TS)-LayaAir3D之Camera) [ 94%]

... private _up = new Laya.Vector3(0, 1, 0); ``` ```typescript //点击事件 this.changeActionButton.on(Laya.Event.CLICK, this, function(){ this.index++; if (this.index % 3 === 1 ){ //摄像机捕捉模型目标 this.camera.transform.lookAt(this.box.transform.position, this._up); } else if (this.index...

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

326. 圆环不跟随 sprite 一起缩放? [ 94%]

...GameMain{ constructor() { Laya.init(Browser.width, Browser.height, WebGL); this.CreateCircle(); // this.CreateRectangle(); } private firstSp: Laya.Sprite; private _adaptSp: Laya.Sprite; private _pointList : Point[]; private _rootSp : Laya.Sprite;  public CreateCircle() { this._rootSp = new Laya.Spr...

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

327. 其他引擎的Demo-Example_05 [ 94%]

....SCALE_FULL; setup(); })(); function setup() { Laya.stage.on(Event.RESIZE, this, onResize); makeObject(0); for (var i = 0; i objs) { current = 0; } makeObject(current); } function makeObject(t) { var xd; var i; switch (t) { case 0: for (i = 0; i tpoint1[i]) { tpoint1[i] = tpoint1[i] + 1; } if (point...

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

328. 其他引擎的Demo-Example_05 [ 94%]

....SCALE_FULL; setup(); })(); function setup() { Laya.stage.on(Event.RESIZE, this, onResize); makeObject(0); for (var i = 0; i objs) { current = 0; } makeObject(current); } function makeObject(t) { var xd; var i; switch (t) { case 0: for (i = 0; i tpoint1[i]) { tpoint1[i] = tpoint1[i] + 1; } if (point...

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

329. [0]Spine3.8.75报错:Error: Unsupported skeleton data, please export with a newer version of Spine. [ 94%]

...= Laya.SpineTemplet; class SpineBinary {     constructor() {         this.aniPath = "res/powerup-pro.skel";         this.index = -1;         // Laya.init(Browser.width, Browser.height, WebGL);         // Laya.stage.scaleMode = Stage.SCALE_NOSCALE;         // Laya.stage.bgColor ...

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

330. Camera.viewportToRay中origin与direction相等问题 [ 94%]

...法: 主要目的就是做射线碰撞检测. onStageMouseDown(): void { this._rayPt.x = Laya.MouseManager.instance.mouseX; this._rayPt.y = Laya.MouseManager.instance.mouseY; GameManager.instance.mainCamera.viewportPointToRay(this._rayPt, this._ray); let scene = this.owner.scene as Laya.Scene3D; sce...

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