Quellcode durchsuchen

Merge pull request #6134 from sebavan/master

Try migrating, wait for the build
sebavan vor 6 Jahren
Ursprung
Commit
12ec727ebe

+ 0 - 3
Tools/Gulp/package.json

@@ -12,8 +12,5 @@
         "install": "cd ../../ && npm install && cd Playground/ && npm install && cd ../Viewer && npm install && cd ../Tools/Gulp/",
         "build": "gulp --max-old-space-size=8192 --tsLintFix",
         "start": "gulp run --max-old-space-size=8192"
-    },
-    "dependencies": {
-        "typescript": "^3.3.3333"
     }
 }

+ 2 - 2
gui/src/2D/controls/inputText.ts

@@ -758,7 +758,7 @@ export class InputText extends Control implements IFocusableControl {
         this._isTextHighlightOn = false;
         //when write permission to clipbaord data is denied
         try {
-            ev.clipboardData.setData("text/plain", this._highlightedText);
+            ev.clipboardData && ev.clipboardData.setData("text/plain", this._highlightedText);
         }
         catch { } //pass
         this._host.clipboardData = this._highlightedText;
@@ -773,7 +773,7 @@ export class InputText extends Control implements IFocusableControl {
         this._cursorOffset = this.text.length - this._startHighlightIndex;
         //when write permission to clipbaord data is denied
         try {
-            ev.clipboardData.setData("text/plain", this._highlightedText);
+            ev.clipboardData && ev.clipboardData.setData("text/plain", this._highlightedText);
         }
         catch { } //pass
 

+ 2 - 2
inspector/src/components/actionTabs/lines/color3LineComponent.tsx

@@ -112,8 +112,8 @@ export class Color3LineComponent extends React.Component<IColor3LineComponentPro
         if (window.getSelection) {
             var range = document.createRange();
             range.selectNode(element);
-            window.getSelection().removeAllRanges();
-            window.getSelection().addRange(range);
+            window.getSelection()!.removeAllRanges();
+            window.getSelection()!.addRange(range);
         }
 
         document.execCommand('copy');

+ 1 - 1
package.json

@@ -98,7 +98,7 @@
         "tslib": "^1.9.3",
         "tslint": "^5.11.0",
         "typedoc": "^0.12.0",
-        "typescript": "^3.3.3",
+        "typescript": "~3.4.1",
         "webpack": "^4.29.3",
         "webpack-cli": "^3.1.2",
         "webpack-dev-server": "^3.1.14",

+ 6 - 1
src/Layers/effectLayerSceneComponent.ts

@@ -189,10 +189,12 @@ export class EffectLayerSceneComponent implements ISceneSerializableComponent {
         return true;
     }
 
-    private _renderMainTexture(camera: Camera): void {
+    private _renderMainTexture(camera: Camera): boolean {
         this._renderEffects = false;
         this._needStencil = false;
 
+        let needRebind = false;
+
         let layers = this.scene.effectLayers;
         if (layers && layers.length > 0) {
             this._previousStencilState = this._engine.getStencilBuffer();
@@ -209,12 +211,15 @@ export class EffectLayerSceneComponent implements ISceneSerializableComponent {
                     if (renderTarget._shouldRender()) {
                         this.scene.incrementRenderId();
                         renderTarget.render(false, false);
+                        needRebind = true;
                     }
                 }
             }
 
             this.scene.incrementRenderId();
         }
+
+        return needRebind;
     }
 
     private _setStencil() {

+ 3 - 3
src/scene.ts

@@ -35,7 +35,7 @@ import { PostProcess } from "./PostProcesses/postProcess";
 import { PostProcessManager } from "./PostProcesses/postProcessManager";
 import { IOfflineProvider } from "./Offline/IOfflineProvider";
 import { RenderingGroupInfo, RenderingManager, IRenderingManagerAutoClearSetup } from "./Rendering/renderingManager";
-import { ISceneComponent, ISceneSerializableComponent, Stage, SimpleStageAction, RenderTargetsStageAction, RenderTargetStageAction, MeshStageAction, EvaluateSubMeshStageAction, ActiveMeshStageAction, CameraStageAction, RenderingGroupStageAction, RenderingMeshStageAction, PointerMoveStageAction, PointerUpDownStageAction } from "./sceneComponent";
+import { ISceneComponent, ISceneSerializableComponent, Stage, SimpleStageAction, RenderTargetsStageAction, RenderTargetStageAction, MeshStageAction, EvaluateSubMeshStageAction, ActiveMeshStageAction, CameraStageAction, RenderingGroupStageAction, RenderingMeshStageAction, PointerMoveStageAction, PointerUpDownStageAction, CameraStageFrameBufferAction } from "./sceneComponent";
 import { Engine } from "./Engines/engine";
 import { Node } from "./node";
 import { MorphTarget } from "./Morph/morphTarget";
@@ -1256,7 +1256,7 @@ export class Scene extends AbstractScene implements IAnimatable {
      * @hidden
      * Defines the actions happening during the per camera render target step.
      */
-    public _cameraDrawRenderTargetStage = Stage.Create<CameraStageAction>();
+    public _cameraDrawRenderTargetStage = Stage.Create<CameraStageFrameBufferAction>();
     /**
      * @hidden
      * Defines the actions happening just before the active camera is drawing.
@@ -4126,7 +4126,7 @@ export class Scene extends AbstractScene implements IAnimatable {
             }
 
             for (let step of this._cameraDrawRenderTargetStage) {
-                step.action(this.activeCamera);
+                needRebind = needRebind || step.action(this.activeCamera);
             }
 
             this._intermediateRendering = false;

+ 5 - 0
src/sceneComponent.ts

@@ -161,6 +161,11 @@ export type ActiveMeshStageAction = (sourceMesh: AbstractMesh, mesh: AbstractMes
 export type CameraStageAction = (camera: Camera) => void;
 
 /**
+ * Strong typing of a Camera Frame buffer related stage step action
+ */
+export type CameraStageFrameBufferAction = (camera: Camera) => boolean;
+
+/**
  * Strong typing of a Render Target related stage step action
  */
 export type RenderTargetStageAction = (renderTarget: RenderTargetTexture) => void;