+
(this.guiContainer = element)} className={containerClass} />
+
(this.viewer = viewer)}>
+ {error && }
+ {showLoading && }
+
+
+ >
);
}
}
diff --git a/ui/component/viewers/threeViewer/internal/scene.js b/ui/component/viewers/threeViewer/internal/scene.js
index 40979f8f3..886217f67 100644
--- a/ui/component/viewers/threeViewer/internal/scene.js
+++ b/ui/component/viewers/threeViewer/internal/scene.js
@@ -21,17 +21,18 @@ const addLights = (scene, color, groundColor) => {
scene.add(shadowLight);
};
-const ViewerScene = ({ backgroundColor, groundColor, showFog }) => {
- // Convert color
- const bgColor = new Color(backgroundColor);
+const ViewerScene = ({ backgroundColor, showFog }) => {
// New scene
+ const bg = new Color(backgroundColor);
const scene = new Scene();
- // Background color
- scene.background = bgColor;
- // Fog effect
- scene.fog = showFog === true ? new Fog(bgColor, 1, 95) : null;
+ // Transparent background
+ scene.background = bg;
+ // Add fog
+ if (showFog) {
+ scene.fog = new Fog(bg, 1, 54);
+ }
// Add basic lights
- addLights(scene, '#FFFFFF', groundColor);
+ addLights(scene, 0xffffff, bg);
// Return new three scene
return scene;
};
diff --git a/ui/constants/file_render_modes.js b/ui/constants/file_render_modes.js
index 6736416bf..fc1f71481 100644
--- a/ui/constants/file_render_modes.js
+++ b/ui/constants/file_render_modes.js
@@ -16,7 +16,10 @@ export const IMAGE = 'image';
export const CAD = 'cad';
export const COMIC = 'comic';
-export const AUTO_RENDER_MODES = [IMAGE, CAD, COMIC].concat(TEXT_MODES); // these types will render (and thus download) automatically (if free)
+// These types can only be render if download completed
+export const NON_STREAM_MODES = [CAD, COMIC];
+
+export const AUTO_RENDER_MODES = [IMAGE].concat(TEXT_MODES);
export const WEB_SHAREABLE_MODES = AUTO_RENDER_MODES.concat(FLOATING_MODES);
export const DOWNLOAD = 'download';
@@ -25,7 +28,7 @@ export const UNSUPPORTED = 'unsupported';
// PDFs disabled on desktop until we update Electron: https://github.com/electron/electron/issues/12337
// Comics disabled because nothing is actually reporting as a comic type
-export const UNSUPPORTED_IN_THIS_APP = IS_WEB ? [CAD, COMIC, APPLICATION] : [CAD, APPLICATION, PDF];
+export const UNSUPPORTED_IN_THIS_APP = IS_WEB ? [CAD, COMIC, APPLICATION] : [APPLICATION, PDF];
export const UNRENDERABLE_MODES = Array.from(
new Set(UNSUPPORTED_IN_THIS_APP.concat([DOWNLOAD, APPLICATION, UNSUPPORTED]))
diff --git a/ui/scss/component/_dat-gui.scss b/ui/scss/component/_dat-gui.scss
index 557a54e99..6ce94a903 100644
--- a/ui/scss/component/_dat-gui.scss
+++ b/ui/scss/component/_dat-gui.scss
@@ -3,101 +3,26 @@
.gui-container {
top: 0;
right: 0;
-
position: absolute;
- z-index: 2;
.dg.main {
margin: 0;
padding: 0;
overflow: inherit;
- }
- // Light theme:
- // https://github.com/liabru/dat-gui-light-theme
-
- &.light {
- .dg.main.taller-than-window .close-button {
- border-top: 1px solid #ddd;
+ li {
+ margin: 0;
}
- .dg.main .close-button {
- &:not(:hover) {
- background-color: #e8e8e8;
- }
-
- &:hover {
- background-color: #ddd;
- }
+ input {
+ height: initial;
}
- .dg {
- color: #555;
- text-shadow: none !important;
-
- &.main {
- &::-webkit-scrollbar {
- background-color: #fafafa;
- }
-
- &::-webkit-scrollbar-thumb {
- background-color: #bbb;
- }
- }
-
- li {
- &:not(.folder) {
- background-color: #fafafa;
- border-bottom: 1px solid #ddd;
- }
-
- &.save-row .button {
- text-shadow: none !important;
- }
-
- &.title {
- background: #e8e8e8
- url('data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==')
- 6px 10px no-repeat;
- }
- }
-
- .cr {
- &.function:hover,
- &.boolean:hover {
- background-color: white;
- }
- }
-
- .c {
- input {
- &[type='text'] {
- &:not(:focus),
- &:not(:hover) {
- background-color: #e9e9e9;
- }
-
- &:focus,
- &:hover {
- background-color: #eee;
- }
-
- &:focus {
- color: #555;
- }
- }
- }
-
- .slider {
- &:not(:hover) {
- background-color: #e9e9e9;
- }
-
- &:hover {
- background-color: #eee;
- }
- }
- }
+ input[type='checkbox'] {
+ height: 12px;
+ width: 12px;
+ padding: 0;
+ margin: 0;
}
}
}
diff --git a/ui/scss/component/_file-render.scss b/ui/scss/component/_file-render.scss
index 1f5894b30..111e781aa 100644
--- a/ui/scss/component/_file-render.scss
+++ b/ui/scss/component/_file-render.scss
@@ -119,6 +119,15 @@
}
}
+.file-render__viewer--three {
+ position: relative;
+ overflow: hidden;
+
+ .three-viewer {
+ height: calc(100vh - var(--header-height) - var(--spacing-medium) * 2);
+ }
+}
+
.file-render__content {
width: 100%;
height: 100%;