9e10b8bf75febf20ac387b54b848bc09dd1531f4a61721756936f13f2c40f58d.json 5.4 KB

1
  1. {"ast":null,"code":"/**\n * Stores the list of available parsers in the application.\n */\nconst _BabylonFileParsers = {};\n/**\n * Stores the list of available individual parsers in the application.\n */\nconst _IndividualBabylonFileParsers = {};\n/**\n * Adds a parser in the list of available ones\n * @param name Defines the name of the parser\n * @param parser Defines the parser to add\n */\nexport function AddParser(name, parser) {\n _BabylonFileParsers[name] = parser;\n}\n/**\n * Gets a general parser from the list of available ones\n * @param name Defines the name of the parser\n * @returns the requested parser or null\n */\nexport function GetParser(name) {\n if (_BabylonFileParsers[name]) {\n return _BabylonFileParsers[name];\n }\n return null;\n}\n/**\n * Adds n individual parser in the list of available ones\n * @param name Defines the name of the parser\n * @param parser Defines the parser to add\n */\nexport function AddIndividualParser(name, parser) {\n _IndividualBabylonFileParsers[name] = parser;\n}\n/**\n * Gets an individual parser from the list of available ones\n * @param name Defines the name of the parser\n * @returns the requested parser or null\n */\nexport function GetIndividualParser(name) {\n if (_IndividualBabylonFileParsers[name]) {\n return _IndividualBabylonFileParsers[name];\n }\n return null;\n}\n/**\n * Parser json data and populate both a scene and its associated container object\n * @param jsonData Defines the data to parse\n * @param scene Defines the scene to parse the data for\n * @param container Defines the container attached to the parsing sequence\n * @param rootUrl Defines the root url of the data\n */\nexport function Parse(jsonData, scene, container, rootUrl) {\n for (const parserName in _BabylonFileParsers) {\n if (Object.prototype.hasOwnProperty.call(_BabylonFileParsers, parserName)) {\n _BabylonFileParsers[parserName](jsonData, scene, container, rootUrl);\n }\n }\n}","map":{"version":3,"names":["_BabylonFileParsers","_IndividualBabylonFileParsers","AddParser","name","parser","GetParser","AddIndividualParser","GetIndividualParser","Parse","jsonData","scene","container","rootUrl","parserName","Object","prototype","hasOwnProperty","call"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Loading/Plugins/babylonFileParser.function.js"],"sourcesContent":["/**\n * Stores the list of available parsers in the application.\n */\nconst _BabylonFileParsers = {};\n/**\n * Stores the list of available individual parsers in the application.\n */\nconst _IndividualBabylonFileParsers = {};\n/**\n * Adds a parser in the list of available ones\n * @param name Defines the name of the parser\n * @param parser Defines the parser to add\n */\nexport function AddParser(name, parser) {\n _BabylonFileParsers[name] = parser;\n}\n/**\n * Gets a general parser from the list of available ones\n * @param name Defines the name of the parser\n * @returns the requested parser or null\n */\nexport function GetParser(name) {\n if (_BabylonFileParsers[name]) {\n return _BabylonFileParsers[name];\n }\n return null;\n}\n/**\n * Adds n individual parser in the list of available ones\n * @param name Defines the name of the parser\n * @param parser Defines the parser to add\n */\nexport function AddIndividualParser(name, parser) {\n _IndividualBabylonFileParsers[name] = parser;\n}\n/**\n * Gets an individual parser from the list of available ones\n * @param name Defines the name of the parser\n * @returns the requested parser or null\n */\nexport function GetIndividualParser(name) {\n if (_IndividualBabylonFileParsers[name]) {\n return _IndividualBabylonFileParsers[name];\n }\n return null;\n}\n/**\n * Parser json data and populate both a scene and its associated container object\n * @param jsonData Defines the data to parse\n * @param scene Defines the scene to parse the data for\n * @param container Defines the container attached to the parsing sequence\n * @param rootUrl Defines the root url of the data\n */\nexport function Parse(jsonData, scene, container, rootUrl) {\n for (const parserName in _BabylonFileParsers) {\n if (Object.prototype.hasOwnProperty.call(_BabylonFileParsers, parserName)) {\n _BabylonFileParsers[parserName](jsonData, scene, container, rootUrl);\n }\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,MAAMA,mBAAmB,GAAG,CAAC,CAAC;AAC9B;AACA;AACA;AACA,MAAMC,6BAA6B,GAAG,CAAC,CAAC;AACxC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAACC,IAAI,EAAEC,MAAM,EAAE;EACpCJ,mBAAmB,CAACG,IAAI,CAAC,GAAGC,MAAM;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAACF,IAAI,EAAE;EAC5B,IAAIH,mBAAmB,CAACG,IAAI,CAAC,EAAE;IAC3B,OAAOH,mBAAmB,CAACG,IAAI,CAAC;EACpC;EACA,OAAO,IAAI;AACf;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,mBAAmBA,CAACH,IAAI,EAAEC,MAAM,EAAE;EAC9CH,6BAA6B,CAACE,IAAI,CAAC,GAAGC,MAAM;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,mBAAmBA,CAACJ,IAAI,EAAE;EACtC,IAAIF,6BAA6B,CAACE,IAAI,CAAC,EAAE;IACrC,OAAOF,6BAA6B,CAACE,IAAI,CAAC;EAC9C;EACA,OAAO,IAAI;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,KAAKA,CAACC,QAAQ,EAAEC,KAAK,EAAEC,SAAS,EAAEC,OAAO,EAAE;EACvD,KAAK,MAAMC,UAAU,IAAIb,mBAAmB,EAAE;IAC1C,IAAIc,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACjB,mBAAmB,EAAEa,UAAU,CAAC,EAAE;MACvEb,mBAAmB,CAACa,UAAU,CAAC,CAACJ,QAAQ,EAAEC,KAAK,EAAEC,SAAS,EAAEC,OAAO,CAAC;IACxE;EACJ;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}