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

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

191. DOM元素-表单输入 [ 82%]

...screenMode = Laya.Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#FFFFFF"; this.form = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing...

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

192. Spine 间隔一段时间卡顿5000毫秒左右,期间GPU占用极高, Demo已上传 [ 82%]

...); Laya.init(Browser.width, Browser.height); Stat.show();  //棋子动画 this.genSpine("res/spine/ludo_qizidongzuo.skel", Laya.Handler.create(this, (templet: Laya.SpineTemplet) => {  //模版复用 let y = 400; let unitWidth = Laya.stage.width / 16; for (let i = 0; i < 16; i++) { let person...

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

193. 动画-新版骨骼动画 [ 82%]

...kinModel/Zombie/new/Zombie.lh")); zombie.once(Laya.Event.HIERARCHY_LOADED, this, function () { //获取Animator动画组件 zombieAnimator = zombie.getChildAt(0).getComponentByType(Laya.Animator); loadUI(); }); function loadUI() { var clipName = ["walk","attack","left_fall","right_fall","back_fall"]...

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

194. 子容器的事件问题 [ 82%]

....load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); let vhvt: ViewHeadViewTest = new ViewHeadViewTest(); //testUI.addChildAt(vhvt, 0); testUI.add...

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

195. DOM元素-表单输入 [ 82%]

...; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#fff"; this.form = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing...

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

196. 陀螺仪和加速计使用问题 [ 81%]

...仪和加速计使用问题 Laya.Gyroscope.instance.on(Laya.Event.CHANGE,this,this.onDeviceorientation);  Laya.Accelerator.instance.on(Laya.Event.CHANGE,this,this.onMotoin); 官网陀螺仪和加速计例子中的上面两句运行时都报 Cannot read property 'instance' of undefined 的错误 附...

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

197. 骨骼动画进阶(JavaScript-2D进阶篇(JS)-动画进阶) [ 81%]

...建动画模板 templet=new Laya.Templet(); templet.on(Laya.Event.COMPLETE,this,parseComplete); templet.on(Laya.Event.ERROR,this,onError); //加载动画文件 templet.loadAni("res/spine/goblins/goblins.sk"); function onError() { console.log("parse error"); } function parseComplete() { //创建第...

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

198. sprite 添加点击事件没反应,对sprite设置了size也没用 [ 81%]

...邀请: 与内容相关的链接 提交 4 个回复 jiehao 赞同来自: this.btn.graphics.drawTexture(window.music.btn_on) ; this.btn.pivot(75/2 , 75/2) ; this.btn.x = window.client_width - 25 ; this.btn.y = 25 ; this.btn.scaleX = 25 / 75 ; this.btn.scaleY = 25 / 75 ; Laya.stage.addChild(this.btn) ...

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

199. 使用对象池重复使用skeleton报错,请问有解决方案吗?谢谢 [ 81%]

...pineRes1/dragon.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() { Laya.stage.on(Event.CLICK, this, () => {     mArmature ...

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

200. 3D中摄像机绕物体旋转该如何实现? [ 81%]

... = laya.d3.math.Quaternion; /* 用法: //初始化照相机 var camera = this.newScene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera; camera.transform.rotationEuler = new Laya.Vector3(-32, -75, 0); camera.transform.position =new Laya.Vector3(-8.2, 5.3, 2.2); var modelViewer = camera.addCom...

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