{
  "code": "export class NodeUtil {\r\n    static GetChild(node, cond) {\r\n        let queue = [];\r\n        for (let i = 0; i < node.numChildren; i++) {\r\n            queue.push(node.getChildAt(i));\r\n        }\r\n        while (queue.length > 0) {\r\n            let first = queue.shift();\r\n            if (cond(first)) {\r\n                return first;\r\n            }\r\n            else {\r\n                for (let i = 0; i < first.numChildren; i++) {\r\n                    queue.push(first.getChildAt(i));\r\n                }\r\n            }\r\n        }\r\n        return null;\r\n    }\r\n    static GetChildByName(node, name) {\r\n        return NodeUtil.GetChild(node, s => s.name == name);\r\n    }\r\n    static getChildren(node, cond) {\r\n        let finded = [];\r\n        let queue = [];\r\n        for (let i = 0; i < node.numChildren; i++) {\r\n            queue.push(node.getChildAt(i));\r\n        }\r\n        while (queue.length > 0) {\r\n            let first = queue.shift();\r\n            if (cond(first)) {\r\n                finded.push(first);\r\n            }\r\n            for (let i = 0; i < first.numChildren; i++) {\r\n                queue.push(first.getChildAt(i));\r\n            }\r\n        }\r\n        return finded;\r\n    }\r\n    static SetColliderInactive(sp) {\r\n        let colliders = NodeUtil.getChildren(sp, s => s.getComponent(Laya.PhysicsCollider));\r\n        colliders.forEach(s => {\r\n            let collider = s.getComponent(Laya.PhysicsCollider);\r\n            if (collider) {\r\n                collider.enabled = false;\r\n            }\r\n        }, this);\r\n    }\r\n    static SetColliderGroup(sp, _group) {\r\n        let colliders = NodeUtil.getChildren(sp, s => s.getComponent(Laya.PhysicsCollider));\r\n        colliders.forEach(s => {\r\n            let collisionGroup = _group;\r\n            let collider = s.getComponent(Laya.PhysicsCollider);\r\n            collider.collisionGroup = collisionGroup;\r\n        }, this);\r\n    }\r\n}\r\nNodeUtil.All = Laya.Physics3DUtils.COLLISIONFILTERGROUP_ALLFILTER;\r\nNodeUtil.Body = Laya.Physics3DUtils.COLLISIONFILTERGROUP_CUSTOMFILTER1;\r\nNodeUtil.Head = Laya.Physics3DUtils.COLLISIONFILTERGROUP_CUSTOMFILTER2;\r\nNodeUtil.Citizen = Laya.Physics3DUtils.COLLISIONFILTERGROUP_CUSTOMFILTER3;\r\nexport class Transform3DHelper {\r\n    static getForward(transform) {\r\n        let forward = new Laya.Vector3();\r\n        transform.getForward(forward);\r\n        Laya.Vector3.scale(forward, -1, forward);\r\n        Laya.Vector3.normalize(forward, forward);\r\n        return forward;\r\n    }\r\n}\r\n//# sourceMappingURL=NodeUtil.js.map",
  "references": [],
  "map": "{\"version\":3,\"file\":\"NodeUtil.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/GameUtils/NodeUtil.ts\"],\"names\":[],\"mappings\":\"AACI,MAAM,OAAO,QAAQ;IAMd,MAAM,CAAC,QAAQ,CAAC,IAAe,EAAE,IAAc;QAClD,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE;YACvC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;SAClC;QACD,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YACrB,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;YAC1B,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,KAAK,CAAC;aAChB;iBAAM;gBACH,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE;oBACxC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;iBACnC;aACJ;SACJ;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,MAAM,CAAC,cAAc,CAAC,IAAe,EAAE,IAAY;QACtD,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;IACxD,CAAC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