4a42b89e601a833b9eb8c7ae012de9de0d4e5ff33db630a57d97403497fd61af.json 4.3 KB

1
  1. {"ast":null,"code":"import { FlowGraphEventBlock } from \"../../flowGraphEventBlock.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * @experimental\n * Block that triggers on scene tick (before each render).\n */\nexport class FlowGraphSceneTickEventBlock extends FlowGraphEventBlock {\n /**\n * @internal\n */\n _preparePendingTasks(context) {\n if (!context._getExecutionVariable(this, \"sceneBeforeRender\")) {\n const scene = context.configuration.scene;\n const contextObserver = scene.onBeforeRenderObservable.add(() => {\n this._execute(context);\n });\n context._setExecutionVariable(this, \"sceneBeforeRender\", contextObserver);\n }\n }\n /**\n * @internal\n */\n _cancelPendingTasks(context) {\n const contextObserver = context._getExecutionVariable(this, \"sceneBeforeRender\");\n const scene = context.configuration.scene;\n scene.onBeforeRenderObservable.remove(contextObserver);\n context._deleteExecutionVariable(this, \"sceneBeforeRender\");\n }\n /**\n * @returns class name of the block.\n */\n getClassName() {\n return FlowGraphSceneTickEventBlock.ClassName;\n }\n}\n/**\n * the class name of the block.\n */\nFlowGraphSceneTickEventBlock.ClassName = \"FGSceneTickEventBlock\";\nRegisterClass(FlowGraphSceneTickEventBlock.ClassName, FlowGraphSceneTickEventBlock);","map":{"version":3,"names":["FlowGraphEventBlock","RegisterClass","FlowGraphSceneTickEventBlock","_preparePendingTasks","context","_getExecutionVariable","scene","configuration","contextObserver","onBeforeRenderObservable","add","_execute","_setExecutionVariable","_cancelPendingTasks","remove","_deleteExecutionVariable","getClassName","ClassName"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js"],"sourcesContent":["import { FlowGraphEventBlock } from \"../../flowGraphEventBlock.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * @experimental\n * Block that triggers on scene tick (before each render).\n */\nexport class FlowGraphSceneTickEventBlock extends FlowGraphEventBlock {\n /**\n * @internal\n */\n _preparePendingTasks(context) {\n if (!context._getExecutionVariable(this, \"sceneBeforeRender\")) {\n const scene = context.configuration.scene;\n const contextObserver = scene.onBeforeRenderObservable.add(() => {\n this._execute(context);\n });\n context._setExecutionVariable(this, \"sceneBeforeRender\", contextObserver);\n }\n }\n /**\n * @internal\n */\n _cancelPendingTasks(context) {\n const contextObserver = context._getExecutionVariable(this, \"sceneBeforeRender\");\n const scene = context.configuration.scene;\n scene.onBeforeRenderObservable.remove(contextObserver);\n context._deleteExecutionVariable(this, \"sceneBeforeRender\");\n }\n /**\n * @returns class name of the block.\n */\n getClassName() {\n return FlowGraphSceneTickEventBlock.ClassName;\n }\n}\n/**\n * the class name of the block.\n */\nFlowGraphSceneTickEventBlock.ClassName = \"FGSceneTickEventBlock\";\nRegisterClass(FlowGraphSceneTickEventBlock.ClassName, FlowGraphSceneTickEventBlock);\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,8BAA8B;AAClE,SAASC,aAAa,QAAQ,4BAA4B;AAC1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,SAASF,mBAAmB,CAAC;EAClE;AACJ;AACA;EACIG,oBAAoBA,CAACC,OAAO,EAAE;IAC1B,IAAI,CAACA,OAAO,CAACC,qBAAqB,CAAC,IAAI,EAAE,mBAAmB,CAAC,EAAE;MAC3D,MAAMC,KAAK,GAAGF,OAAO,CAACG,aAAa,CAACD,KAAK;MACzC,MAAME,eAAe,GAAGF,KAAK,CAACG,wBAAwB,CAACC,GAAG,CAAC,MAAM;QAC7D,IAAI,CAACC,QAAQ,CAACP,OAAO,CAAC;MAC1B,CAAC,CAAC;MACFA,OAAO,CAACQ,qBAAqB,CAAC,IAAI,EAAE,mBAAmB,EAAEJ,eAAe,CAAC;IAC7E;EACJ;EACA;AACJ;AACA;EACIK,mBAAmBA,CAACT,OAAO,EAAE;IACzB,MAAMI,eAAe,GAAGJ,OAAO,CAACC,qBAAqB,CAAC,IAAI,EAAE,mBAAmB,CAAC;IAChF,MAAMC,KAAK,GAAGF,OAAO,CAACG,aAAa,CAACD,KAAK;IACzCA,KAAK,CAACG,wBAAwB,CAACK,MAAM,CAACN,eAAe,CAAC;IACtDJ,OAAO,CAACW,wBAAwB,CAAC,IAAI,EAAE,mBAAmB,CAAC;EAC/D;EACA;AACJ;AACA;EACIC,YAAYA,CAAA,EAAG;IACX,OAAOd,4BAA4B,CAACe,SAAS;EACjD;AACJ;AACA;AACA;AACA;AACAf,4BAA4B,CAACe,SAAS,GAAG,uBAAuB;AAChEhB,aAAa,CAACC,4BAA4B,CAACe,SAAS,EAAEf,4BAA4B,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}