|
@@ -29,6 +29,9 @@ import { TextureBlock } from './Blocks/Dual/textureBlock';
|
|
import { ReflectionTextureBlock } from './Blocks/Dual/reflectionTextureBlock';
|
|
import { ReflectionTextureBlock } from './Blocks/Dual/reflectionTextureBlock';
|
|
import { EffectFallbacks } from '../effectFallbacks';
|
|
import { EffectFallbacks } from '../effectFallbacks';
|
|
import { WebRequest } from '../../Misc/webRequest';
|
|
import { WebRequest } from '../../Misc/webRequest';
|
|
|
|
+import { Effect } from '../effect';
|
|
|
|
+
|
|
|
|
+const onCreatedEffectParameters = { effect: null as unknown as Effect, subMesh: null as unknown as Nullable<SubMesh> };
|
|
|
|
|
|
// declare NODEEDITOR namespace for compilation issue
|
|
// declare NODEEDITOR namespace for compilation issue
|
|
declare var NODEEDITOR: any;
|
|
declare var NODEEDITOR: any;
|
|
@@ -818,6 +821,12 @@ export class NodeMaterial extends PushMaterial {
|
|
}, engine);
|
|
}, engine);
|
|
|
|
|
|
if (effect) {
|
|
if (effect) {
|
|
|
|
+ if (this._onEffectCreatedObservable) {
|
|
|
|
+ onCreatedEffectParameters.effect = effect;
|
|
|
|
+ onCreatedEffectParameters.subMesh = subMesh;
|
|
|
|
+ this._onEffectCreatedObservable.notifyObservers(onCreatedEffectParameters);
|
|
|
|
+ }
|
|
|
|
+
|
|
// Use previous effect while new one is compiling
|
|
// Use previous effect while new one is compiling
|
|
if (this.allowShaderHotSwapping && previousEffect && !effect.isReady()) {
|
|
if (this.allowShaderHotSwapping && previousEffect && !effect.isReady()) {
|
|
effect = previousEffect;
|
|
effect = previousEffect;
|