52ac071466dfc12bbcabeee92adcc0a445d33a08464ea4277aba564f066a9981.json 4.2 KB

1
  1. {"ast":null,"code":"import { FlowGraphEventBlock } from \"../../flowGraphEventBlock.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * @experimental\n * Block that triggers when a scene is ready.\n */\nexport class FlowGraphSceneReadyEventBlock extends FlowGraphEventBlock {\n /**\n * @internal\n */\n _preparePendingTasks(context) {\n if (!context._getExecutionVariable(this, \"sceneReadyObserver\")) {\n const scene = context.configuration.scene;\n const contextObserver = scene.onReadyObservable.add(() => {\n this._execute(context);\n });\n context._setExecutionVariable(this, \"sceneReadyObserver\", contextObserver);\n }\n }\n /**\n * @internal\n */\n _cancelPendingTasks(context) {\n const contextObserver = context._getExecutionVariable(this, \"sceneReadyObserver\");\n const scene = context.configuration.scene;\n scene.onReadyObservable.remove(contextObserver);\n context._deleteExecutionVariable(this, \"sceneReadyObserver\");\n }\n /**\n * @returns class name of the block.\n */\n getClassName() {\n return FlowGraphSceneReadyEventBlock.ClassName;\n }\n}\n/**\n * the class name of the block.\n */\nFlowGraphSceneReadyEventBlock.ClassName = \"FGSceneReadyEventBlock\";\nRegisterClass(\"FGSceneReadyEventBlock\", FlowGraphSceneReadyEventBlock);","map":{"version":3,"names":["FlowGraphEventBlock","RegisterClass","FlowGraphSceneReadyEventBlock","_preparePendingTasks","context","_getExecutionVariable","scene","configuration","contextObserver","onReadyObservable","add","_execute","_setExecutionVariable","_cancelPendingTasks","remove","_deleteExecutionVariable","getClassName","ClassName"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js"],"sourcesContent":["import { FlowGraphEventBlock } from \"../../flowGraphEventBlock.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * @experimental\n * Block that triggers when a scene is ready.\n */\nexport class FlowGraphSceneReadyEventBlock extends FlowGraphEventBlock {\n /**\n * @internal\n */\n _preparePendingTasks(context) {\n if (!context._getExecutionVariable(this, \"sceneReadyObserver\")) {\n const scene = context.configuration.scene;\n const contextObserver = scene.onReadyObservable.add(() => {\n this._execute(context);\n });\n context._setExecutionVariable(this, \"sceneReadyObserver\", contextObserver);\n }\n }\n /**\n * @internal\n */\n _cancelPendingTasks(context) {\n const contextObserver = context._getExecutionVariable(this, \"sceneReadyObserver\");\n const scene = context.configuration.scene;\n scene.onReadyObservable.remove(contextObserver);\n context._deleteExecutionVariable(this, \"sceneReadyObserver\");\n }\n /**\n * @returns class name of the block.\n */\n getClassName() {\n return FlowGraphSceneReadyEventBlock.ClassName;\n }\n}\n/**\n * the class name of the block.\n */\nFlowGraphSceneReadyEventBlock.ClassName = \"FGSceneReadyEventBlock\";\nRegisterClass(\"FGSceneReadyEventBlock\", FlowGraphSceneReadyEventBlock);\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,8BAA8B;AAClE,SAASC,aAAa,QAAQ,4BAA4B;AAC1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,6BAA6B,SAASF,mBAAmB,CAAC;EACnE;AACJ;AACA;EACIG,oBAAoBA,CAACC,OAAO,EAAE;IAC1B,IAAI,CAACA,OAAO,CAACC,qBAAqB,CAAC,IAAI,EAAE,oBAAoB,CAAC,EAAE;MAC5D,MAAMC,KAAK,GAAGF,OAAO,CAACG,aAAa,CAACD,KAAK;MACzC,MAAME,eAAe,GAAGF,KAAK,CAACG,iBAAiB,CAACC,GAAG,CAAC,MAAM;QACtD,IAAI,CAACC,QAAQ,CAACP,OAAO,CAAC;MAC1B,CAAC,CAAC;MACFA,OAAO,CAACQ,qBAAqB,CAAC,IAAI,EAAE,oBAAoB,EAAEJ,eAAe,CAAC;IAC9E;EACJ;EACA;AACJ;AACA;EACIK,mBAAmBA,CAACT,OAAO,EAAE;IACzB,MAAMI,eAAe,GAAGJ,OAAO,CAACC,qBAAqB,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACjF,MAAMC,KAAK,GAAGF,OAAO,CAACG,aAAa,CAACD,KAAK;IACzCA,KAAK,CAACG,iBAAiB,CAACK,MAAM,CAACN,eAAe,CAAC;IAC/CJ,OAAO,CAACW,wBAAwB,CAAC,IAAI,EAAE,oBAAoB,CAAC;EAChE;EACA;AACJ;AACA;EACIC,YAAYA,CAAA,EAAG;IACX,OAAOd,6BAA6B,CAACe,SAAS;EAClD;AACJ;AACA;AACA;AACA;AACAf,6BAA6B,CAACe,SAAS,GAAG,wBAAwB;AAClEhB,aAAa,CAAC,wBAAwB,EAAEC,6BAA6B,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}