@babylonjs/core 7.19.0 → 7.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -177,6 +177,7 @@ export declare class NodeMaterial extends PushMaterial {
|
|
|
177
177
|
private _cachedWorldViewProjectionMatrix;
|
|
178
178
|
private _optimizers;
|
|
179
179
|
private _animationFrame;
|
|
180
|
+
private _buildIsInProgress;
|
|
180
181
|
/** Define the Url to load node editor script */
|
|
181
182
|
static EditorURL: string;
|
|
182
183
|
/** Define the Url to load snippets */
|
|
@@ -252,6 +252,7 @@ export class NodeMaterial extends PushMaterial {
|
|
|
252
252
|
this._cachedWorldViewProjectionMatrix = new Matrix();
|
|
253
253
|
this._optimizers = new Array();
|
|
254
254
|
this._animationFrame = -1;
|
|
255
|
+
this._buildIsInProgress = false;
|
|
255
256
|
this.BJSNODEMATERIALEDITOR = this._getGlobalNodeMaterialEditor();
|
|
256
257
|
/**
|
|
257
258
|
* Gets or sets data used by visual editor
|
|
@@ -593,6 +594,11 @@ export class NodeMaterial extends PushMaterial {
|
|
|
593
594
|
* @param autoConfigure defines if the autoConfigure method should be called when initializing blocks (default is false)
|
|
594
595
|
*/
|
|
595
596
|
build(verbose = false, updateBuildId = true, autoConfigure = false) {
|
|
597
|
+
if (this._buildIsInProgress) {
|
|
598
|
+
Logger.Warn("Build is already in progress, You can use NodeMaterial.onBuildObservable to determine when the build is completed.");
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
this._buildIsInProgress = true;
|
|
596
602
|
// First time?
|
|
597
603
|
if (!this._vertexCompilationState && !autoConfigure) {
|
|
598
604
|
autoConfigure = true;
|
|
@@ -687,6 +693,7 @@ export class NodeMaterial extends PushMaterial {
|
|
|
687
693
|
Logger.Log("Fragment shader:");
|
|
688
694
|
Logger.Log(this._fragmentCompilationState.compilationString);
|
|
689
695
|
}
|
|
696
|
+
this._buildIsInProgress = false;
|
|
690
697
|
this._buildWasSuccessful = true;
|
|
691
698
|
this.onBuildObservable.notifyObservers(this);
|
|
692
699
|
// Wipe defines
|