David Catuhe 6 years ago
parent
commit
144945e4d7
3 changed files with 9 additions and 2 deletions
  1. 2 0
      nodeEditor/src/main.scss
  2. 5 2
      nodeEditor/src/previewManager.ts
  3. 2 0
      src/Engines/engine.ts

+ 2 - 0
nodeEditor/src/main.scss

@@ -55,10 +55,12 @@
         grid-column: 1;
         width: 100%;
         display: grid;
+        outline: 0 !important;
         
         #preview-canvas {
             width: 100%;
             height: 100%;
+            outline: 0 !important;
         }
     }
 }

+ 5 - 2
nodeEditor/src/previewManager.ts

@@ -40,7 +40,10 @@ export class PreviewManager {
 
         this._engine.runRenderLoop(() => {
             this._scene.render();
-        })
+        });
+
+        let serializationObject = this._nodeMaterial.serialize();
+            this._updatePreview(serializationObject);
     }
 
     private _updatePreview(serializationObject: any) {
@@ -50,7 +53,7 @@ export class PreviewManager {
 
         this._material = NodeMaterial.Parse(serializationObject, this._scene);
 
-        this._material.build();
+        this._material.build(true);
 
         this._dummySphere.material = this._material;
     }

+ 2 - 0
src/Engines/engine.ts

@@ -1699,6 +1699,7 @@ export class Engine {
 
     /**
      * Gets host window
+     * @returns the host window object
      */
     public getHostWindow(): Window {
         if (this._renderingCanvas && this._renderingCanvas.ownerDocument && this._renderingCanvas.ownerDocument.defaultView) {
@@ -1710,6 +1711,7 @@ export class Engine {
 
     /**
      * Gets host document
+     * @returns the host document object
      */
     public getHostDocument(): Document {
         if (this._renderingCanvas && this._renderingCanvas.ownerDocument) {