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

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

51. 多点触控的使用(JavaScript-3D基础(JS)-LayaAir3D之鼠标交互) [ 98%]

...ypescript //重写脚本中的onUpdate方法 onUpdate() { var touchCount = this._scene.input.touchCount(); if (1 === touchCount){ //判断是否为两指触控,撤去一根手指后引发的touchCount===1 if (this.isTwoTouch){ return; } this._text.text = "触控点为1"; //获取当前的触控点...

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

52. 多点触控的使用(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 98%]

...ypescript //重写脚本中的onUpdate方法 onUpdate() { var touchCount = this._scene.input.touchCount(); if (1 === touchCount){ //判断是否为两指触控,撤去一根手指后引发的touchCount===1 if (this.isTwoTouch){ return; } this._text.text = "触控点为1"; //获取当前的触控点...

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

53. (实现手指控制模型的缩放旋转)触控可以识别 但是导入的模型没有根据触控反应 [ 98%]

...or3(0, 1, 0); constructor(){         Laya.alertGlobalError = true; this._upVector3 = new Laya.Vector3(0, 1, 0); //初始化引擎         Laya3D.init(0, 0);         Laya.stage.scaleMode = Laya.Stage.SCALE_FULL;         Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; ...

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

54. 骨骼动画-Spine事件 [ 98%]

...spineRes6/alien.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, this, onError); mFactory.loadAni(mAniPath); } function onError() { trace("error"); } function parseComplete() { //创建模式为1,可以启用换装 mArmature = mFactory.build...

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

55. 输入设备-贪吃蛇(重力感应) [ 98%]

...ode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; // 初始化蛇 this.initSnake(); // 监视加速器状态 Accelerator.instance.on(Event.CHANGE, this, this.monitorAccelerator); // 游戏循环 Laya.timer.frameLoop(1, this, this.animate); // 食物生产 Laya.timer.loop(3000, this, this.pr...

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

56. 请大家帮助优化一下这个抛物线的代码 [ 98%]

... cached:boolean = false; private body:Laya.Sprite; constructor(){ super(); this.init(); } public init():void{ if(!Ball.cached){ Ball.cached = true; this.body = new Laya.Sprite(); this.body.loadImage("war/ball.png"); this.body.pivot(12,12); } this.addChild(this.body); Laya.timer.frameLoop(1,this,this...

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

57. 射线检测-碰撞器混合 [ 97%]

...发语言、LayaAirIDE让项目开发更高效。Laya3D.init(0, 0, true); this._tempUnitX1 = new Laya.Vector3(0, 0, -0.1); this._tempUnitX2 = new Laya.Vector3(0, 0, 0.1); this._tempUnitX3 = new Laya.Vector3(-0.1, 0, 0); this._tempUnitX4 = new Laya.Vector3(0.1, 0, 0); this.debug = true; Laya.stage.sc...

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

58. 位图切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 97%]

...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.clip.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); // 位置 this.clip.skin = "atlas/comp/clip_num.png"; // 皮肤 this.clip.interval = 1000; // 切片动画的播放时间间隔1000毫秒 this.clip.clipX...

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

59. 为什么laya的Button渲染逻辑顺序是先渲染,再获取素材切片? [ 97%]

.../** *@private *改变对象的状态。 */ __proto.changeState=function(){ this._stateChanged=false; this.runCallLater(this.changeClips); var index=this._state < this._stateNum ? this._state :this._stateNum-1; this._sources && (this._bitmap.source=this._sources[index]); if (this.label){ t...

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

60. 同步龙骨插槽动画方案 [ 97%]

...ring, handler: Laya.Handler, aniMode: number = 0) {         this._handler = handler;         this.mFactory = new Laya.Templet();         this.mFactory.on(Laya.Event.COMPLETE, thisthis.parseComplete, [aniMode]);         this.mFactory.loadAni(url);   ...

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