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

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

381. UI-Tree [ 55%]

...t三种开发语言、LayaAirIDE让项目开发更高效。class UI_Tree { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.A...

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

382. Laya2D碰撞问题 [ 54%]

...寸不对。 for (let i = 0; i < Laya.RigidBody['objs'].length; i++) { const element = Laya.RigidBody['objs'][i]; if(element) if(element.owner){ if(element.owner.getComponent(Laya.CircleCollider)){return} if(element.owner.getComponent(Laya.BoxCollider)){ element['_sysPosToPhysic'](); element.owne...

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

383. laya.d3.component.Animator [ 54%]

...ll Classes | Index | Frames No Frames AnimatorProperties | Methods | Constants Packagelaya.d3.componentClasspublic class AnimatorInheritanceAnimator Component Object Animator 类用于创建动画组件。 Public Properties Hide Inherited Public Properties Show Inherited Public Properties Pr...

来源: Laya2.0_api 发布时间: 20190513

384. 移动端h5项目如何获取多点触摸的坐标 [ 54%]

...stage.on(Event.MOUSE_DOWN, this, this.onMouseDown);     onMouseDown(e) { const Event = Laya.Event;   // 手机上才有 touches 属性 let touches = e.touches;   if (touches && touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touch...

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

385. 获取位置信息 · LayaAir3.3 · 引擎文档 · LAYABOX [ 54%]

...本,添加如下代码,实现鼠标点击后,获取地理位置。 const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { constructor() { super(); } onMouseClick(evt: Laya.Event): void { // 尝试获取当前位置 Laya.Geolocation.getCurrentPosition( Lay...

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

386. Laya在OPEN事件触发连接成功后无法抛出event事件 [ 54%]

...aya在OPEN事件触发连接成功后无法抛出event事件 public static const CONNECT:String = "connect"; 这是我一个自定义的CONNECT事件,我在连接成功后,在一个EventDispatcher类这样抛出:this.event(CONNECT);  然后报错说this._$1_event不是一个方法 这是什么...

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

387. vmLaya: MVVM for LayaAir [ 54%]

... 组件的可重用性。 https://github.com/yingDev/vmLaya 基本应用:const TEST_PAGE = 'TestPage.json'; //我们的 ViewModel class HelloViewModel { //每隔 500ms 自增的一个数字序列   hello$ = $.timer(0, 500); } //一个 View @createView(TEST_PAGE) class HelloView extends VmViewBase...

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

388. laya.maths.Point [ 54%]

... All Classes | Index | Frames No Frames PointProperties | Methods | Constants Packagelaya.mathsClasspublic class PointInheritancePoint Object Point 对象表示二维坐标系统中的某个位置,其中 x 表示水平轴,y 表示垂直轴。 Public Properties PropertyDefined By  x : ...

来源: laya_api 发布时间: 20170929

389. 关于web端,canvas被删除了以后.无法重新初始化 [ 54%]

...前的容器元素,清屏就可以继续使用 if (ls.Browser.container) { const container = document.getElementById('b-layabox') container.parentNode.replaceChild(ls.Browser.container, container) } else { ls.Browser.container = document.getElementById('b-layabox') }     Laya.stage.destroyCh...

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

390. iphone的Safari上运行横屏出现白边 [ 54%]

...变型,stage的宽高等于屏幕宽高。*/         public static const SCALE_FULL:String = "full"; 这个出现白边是正常的 1、你的游戏宽高比浏览器宽高小的时候,hui会出现白边 2、浏览器出现地址栏的时候可能会出现白边 如果你想去掉白边的...

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