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

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

91. 射线检测-点击行走 [ 73%]

...rnion; //从屏幕空间生成射线 point.elements[0] = Laya.MouseManager.instance.mouseX; point.elements[1] = Laya.MouseManager.instance.mouseY; camera.viewportPointToRay(point, ray); //射线检测获取所有检测碰撞到的物体 Laya.Physics.rayCast(ray, _outHitInfo, 30, 0); } (function load...

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

92. Native IOS下获取陀螺仪数据为0 [ 73%]

...备决定的任意坐标系。 //设置陀螺仪的处理 Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, this.onOrientationChange);   private onOrientationChange(absolute:Boolean, info: Laya.RotationInfo):void         {             if (info.alpha === null)         ...

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

93. Ts简单对象池 [ 72%]

...则使用时会出问题 */   export default class PoolManager { static _instance:any; public m_ObjectPoolDic:{[key:number]:QueueT<Laya.MeshSprite3D>}={} constructor() { } static getInstance() { return this._instance || (this._instance = new PoolManager()) }  //初始化 //加载到内存中...

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

94. 在Test中有个按钮点击,那么我如何发信号,使得这个点击能给控制Sample中的对象,如何调用函数 [ 72%]

...s EventDispatcher { public function Mod() { super(); } private static var _instance:Mod; public static function get index():Mod { return _instance ||= new Mod(); } public function init():void { Mod.event("aaaa"); } } }监听:Mod.on("aaa",this,onFunciton) 2016-12-19 0 0 分享 微博 QZONE 微信 ...

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

95. 自定义Shader · LayaAir3.0文档 · LAYABOX [ 72%]

...Shader4.1 什么是SubShader4.2 什么是Pass5.Shader文件结构详述5.1 Instancing5.2 ReflectionProbe5.3 attributeMap5.4 defines5.5 styles6.GLSL语法简述6.1 常见的变量类型6.2 常见的向量类型6.3 常见的矩阵类型6.4 varying7.ShaderPass8.GLSL Block9.开始编写一个LayaAir Sha...

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

96. physicsSimulation.rayCast在新版本里选取不准确 [ 71%]

... new Laya.Vector2();         screenPoint.x = Laya.MouseManager.instance.mouseX;         screenPoint.y = Laya.MouseManager.instance.mouseY;  //      console.log(screenPoint);          let touchRay:Laya.Ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new La...

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

97. 开关页面导致内存一直增长 [ 71%]

...如这个页面的关闭  Close(): void {         IconManager.Instance().clearTexture(this.leftverticaldrawing.skin);//清理某个动态贴图的资源(clearRes方法清理png)         IconManager.Instance().clearTexture(this.rightverticaldrawing.skin);         ResMgr...

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

98. Dialog:屏蔽点击Dialog之外的区域关闭弹框 [ 71%]

...么设置 2017-12-21 0 4 分享 微博 QZONE 微信 庆乐 赞同来自: instance代表创建的弹窗实例   instance.close = function(type = null) { if (!type) return // 这儿加一层限制,所有未知原因的关闭弹窗都不生效 this.closeType = type; Laya.Dialog.manager.close(this); ...

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

99. Ray 在不同stage缩放下,表现不同,计算有会非常大的误差 [ 71%]

...幕空间生成射线             point.elements[0] = MouseManager.instance.mouseX;             point.elements[1] = MouseManager.instance.mouseY; 或者你直接就这样写,这种写法,可以适配各种模式。 2017-07-21 1 0 分享 微博 QZONE 微信 moketao 赞同来自: 下...

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

100. as怎么用protobytebuf传输数据到服务端 [ 71%]

... = MSG_TYPE.USERLOGIN; userLogin.msgSize = MSG_SIZE; userLogin.uid = Login.instance.g_userInfo.uid; userLogin.token = Login.instance.g_userInfo.token; var msgByteArray:WritingBuffer = new WritingBuffer(); msgInfo.writeTo(msgByteArray); onSendBytesToServer(msgByteArray); msgInfo(这是protobu的de) /...

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