diff --git a/assets/icons/arrow_down.svg b/assets/icons/arrow_down.svg
new file mode 100644
index 0000000..9ac4ccc
--- /dev/null
+++ b/assets/icons/arrow_down.svg
@@ -0,0 +1,38 @@
+
+
diff --git a/assets/icons/arrow_right.svg b/assets/icons/arrow_right.svg
new file mode 100644
index 0000000..b6f3f63
--- /dev/null
+++ b/assets/icons/arrow_right.svg
@@ -0,0 +1,33 @@
+
+
diff --git a/assets/icons/arrow_up.svg b/assets/icons/arrow_up.svg
new file mode 100644
index 0000000..2b8714a
--- /dev/null
+++ b/assets/icons/arrow_up.svg
@@ -0,0 +1,38 @@
+
+
diff --git a/assets/icons/close.svg b/assets/icons/close.svg
new file mode 100644
index 0000000..bac75c9
--- /dev/null
+++ b/assets/icons/close.svg
@@ -0,0 +1,38 @@
+
+
diff --git a/website/assets/images/context/deisolate.svg b/assets/icons/deisolate.svg
similarity index 100%
rename from website/assets/images/context/deisolate.svg
rename to assets/icons/deisolate.svg
diff --git a/website/assets/images/toolbar/details.svg b/assets/icons/details.svg
similarity index 100%
rename from website/assets/images/toolbar/details.svg
rename to assets/icons/details.svg
diff --git a/website/assets/images/header/donate.svg b/assets/icons/donate.svg
similarity index 100%
rename from website/assets/images/header/donate.svg
rename to assets/icons/donate.svg
diff --git a/website/assets/images/toolbar/export.svg b/assets/icons/export.svg
similarity index 100%
rename from website/assets/images/toolbar/export.svg
rename to assets/icons/export.svg
diff --git a/website/assets/images/header/feedback.svg b/assets/icons/feedback.svg
similarity index 100%
rename from website/assets/images/header/feedback.svg
rename to assets/icons/feedback.svg
diff --git a/assets/icons/file_download.svg b/assets/icons/file_download.svg
new file mode 100644
index 0000000..46c32e1
--- /dev/null
+++ b/assets/icons/file_download.svg
@@ -0,0 +1,38 @@
+
+
diff --git a/website/assets/images/navigator/files.svg b/assets/icons/files.svg
similarity index 100%
rename from website/assets/images/navigator/files.svg
rename to assets/icons/files.svg
diff --git a/website/assets/images/context/fit.svg b/assets/icons/fit.svg
similarity index 100%
rename from website/assets/images/context/fit.svg
rename to assets/icons/fit.svg
diff --git a/website/assets/images/toolbar/fix_up_off.svg b/assets/icons/fix_up_off.svg
similarity index 100%
rename from website/assets/images/toolbar/fix_up_off.svg
rename to assets/icons/fix_up_off.svg
diff --git a/website/assets/images/toolbar/fix_up_on.svg b/assets/icons/fix_up_on.svg
similarity index 100%
rename from website/assets/images/toolbar/fix_up_on.svg
rename to assets/icons/fix_up_on.svg
diff --git a/website/assets/images/toolbar/flip.svg b/assets/icons/flip.svg
similarity index 100%
rename from website/assets/images/toolbar/flip.svg
rename to assets/icons/flip.svg
diff --git a/website/assets/images/header/github.svg b/assets/icons/github.svg
similarity index 100%
rename from website/assets/images/header/github.svg
rename to assets/icons/github.svg
diff --git a/assets/icons/hidden.svg b/assets/icons/hidden.svg
new file mode 100644
index 0000000..cd4e814
--- /dev/null
+++ b/assets/icons/hidden.svg
@@ -0,0 +1,38 @@
+
+
diff --git a/website/assets/images/header/info.svg b/assets/icons/info.svg
similarity index 100%
rename from website/assets/images/header/info.svg
rename to assets/icons/info.svg
diff --git a/website/assets/images/context/isolate.svg b/assets/icons/isolate.svg
similarity index 100%
rename from website/assets/images/context/isolate.svg
rename to assets/icons/isolate.svg
diff --git a/website/assets/images/navigator/materials.svg b/assets/icons/materials.svg
similarity index 100%
rename from website/assets/images/navigator/materials.svg
rename to assets/icons/materials.svg
diff --git a/website/assets/images/navigator/meshes.svg b/assets/icons/meshes.svg
similarity index 100%
rename from website/assets/images/navigator/meshes.svg
rename to assets/icons/meshes.svg
diff --git a/website/assets/images/navigator/missing_files.svg b/assets/icons/missing_files.svg
similarity index 100%
rename from website/assets/images/navigator/missing_files.svg
rename to assets/icons/missing_files.svg
diff --git a/website/assets/images/navigator/model.svg b/assets/icons/model.svg
similarity index 100%
rename from website/assets/images/navigator/model.svg
rename to assets/icons/model.svg
diff --git a/website/assets/images/toolbar/open.svg b/assets/icons/open.svg
similarity index 100%
rename from website/assets/images/toolbar/open.svg
rename to assets/icons/open.svg
diff --git a/website/assets/images/toolbar/open_url.svg b/assets/icons/open_url.svg
similarity index 100%
rename from website/assets/images/toolbar/open_url.svg
rename to assets/icons/open_url.svg
diff --git a/website/assets/images/toolbar/settings.svg b/assets/icons/settings.svg
similarity index 100%
rename from website/assets/images/toolbar/settings.svg
rename to assets/icons/settings.svg
diff --git a/website/assets/images/toolbar/share.svg b/assets/icons/share.svg
similarity index 100%
rename from website/assets/images/toolbar/share.svg
rename to assets/icons/share.svg
diff --git a/website/assets/images/toolbar/up_y.svg b/assets/icons/up_y.svg
similarity index 100%
rename from website/assets/images/toolbar/up_y.svg
rename to assets/icons/up_y.svg
diff --git a/website/assets/images/toolbar/up_z.svg b/assets/icons/up_z.svg
similarity index 100%
rename from website/assets/images/toolbar/up_z.svg
rename to assets/icons/up_z.svg
diff --git a/assets/icons/visible.svg b/assets/icons/visible.svg
new file mode 100644
index 0000000..737a2de
--- /dev/null
+++ b/assets/icons/visible.svg
@@ -0,0 +1,48 @@
+
+
diff --git a/assets/icons/warning.svg b/assets/icons/warning.svg
new file mode 100644
index 0000000..0aa8ca2
--- /dev/null
+++ b/assets/icons/warning.svg
@@ -0,0 +1,49 @@
+
+
diff --git a/package.json b/package.json
index 6f9ae6d..49fd5c0 100644
--- a/package.json
+++ b/package.json
@@ -7,9 +7,11 @@
"devDependencies": {
"clean-css-cli": "^5.3.3",
"eslint": "^7.30.0",
+ "fantasticon": "^1.2.2",
"google-closure-compiler": "^20210302.0.0",
"http-server": "^0.12.3",
"mocha": "^8.3.2",
+ "oslllo-svg-fixer": "^1.4.0",
"rewire": "^5.0.0",
"svgo": "^2.3.1"
},
diff --git a/tools/build.py b/tools/build.py
index 9ebad0e..5481db2 100644
--- a/tools/build.py
+++ b/tools/build.py
@@ -61,6 +61,7 @@ def CreateDestinationDir (config, rootDir, websiteDir, version, testBuild):
shutil.copytree (os.path.join (rootDir, 'libs'), os.path.join (websiteDir, 'libs'))
shutil.copytree (os.path.join (rootDir, 'website', 'assets'), os.path.join (websiteDir, 'assets'))
shutil.copytree (os.path.join (rootDir, 'website', 'o3dv', 'css', 'Quicksand'), os.path.join (websiteDir, 'o3dv', 'Quicksand'))
+ shutil.copytree (os.path.join (rootDir, 'website', 'o3dv', 'css', 'O3DVIcons'), os.path.join (websiteDir, 'o3dv', 'O3DVIcons'))
shutil.copytree (os.path.join (rootDir, 'website', 'info'), os.path.join (websiteDir, 'info'))
libFiles = config['lib_files']
diff --git a/tools/config.json b/tools/config.json
index 70c223c..32f5cf1 100644
--- a/tools/config.json
+++ b/tools/config.json
@@ -90,6 +90,7 @@
"website/o3dv/js/embed.js"
],
"website_files_css" : [
+ "website/o3dv/css/icons.css",
"website/o3dv/css/core.css",
"website/o3dv/css/controls.css",
"website/o3dv/css/dialogs.css",
diff --git a/tools/lib/tools_lib.py b/tools/lib/tools_lib.py
index a45c223..b7eab2d 100644
--- a/tools/lib/tools_lib.py
+++ b/tools/lib/tools_lib.py
@@ -92,6 +92,11 @@ def ReplaceInFile (filePath, begToken, endToken, newContent):
content = content.replace (content[begPosition : endPosition + len (endToken)], newContent)
WriteContentToFile (filePath, content)
+def ReplaceStringInFile (filePath, oldString, newString):
+ content = GetFileContent (filePath)
+ content = content.replace (oldString, newString)
+ WriteContentToFile (filePath, content)
+
def CreateFileLinks (fileUrls, linePrefix, eolChar):
result = ''
for fileUrl in fileUrls:
diff --git a/tools/svg.py b/tools/svg.py
index 8f4bc0d..8980eb5 100644
--- a/tools/svg.py
+++ b/tools/svg.py
@@ -1,5 +1,6 @@
import os
import sys
+import shutil
from lib import tools_lib as Tools
@@ -7,8 +8,44 @@ def Main (argv):
toolsDir = os.path.dirname (os.path.abspath (__file__))
rootDir = os.path.dirname (toolsDir)
os.chdir (rootDir)
+
+ iconsDir = os.path.join (rootDir, 'assets', 'icons')
+ tempDir = os.path.join ('build', 'temp')
+ if os.path.exists (tempDir):
+ shutil.rmtree (tempDir)
+ fixedIconsDir = os.path.join (tempDir, 'icons')
+ if not os.path.exists (fixedIconsDir):
+ os.makedirs (fixedIconsDir)
+
+ iconFontDir = os.path.join (tempDir, 'iconfont')
+ if not os.path.exists (iconFontDir):
+ os.makedirs (iconFontDir)
+
+ Tools.RunCommand ('oslllo-svg-fixer', [
+ '-s', iconsDir,
+ '-d', fixedIconsDir
+ ])
imagesPath = os.path.abspath (os.path.join ('website', 'assets', 'images'))
- Tools.RunCommand ('svgo', ['-r', imagesPath])
+ Tools.RunCommand ('svgo', [fixedIconsDir])
+ Tools.RunCommand ('fantasticon', [
+ fixedIconsDir,
+ '-o', iconFontDir,
+ '-t', 'woff',
+ '-n', 'O3DVIcons'
+ ])
+
+ websiteCssDir = os.path.join (rootDir, 'website', 'o3dv', 'css')
+ websiteIconFontDir = os.path.join (websiteCssDir, 'O3DVIcons')
+ if not os.path.exists (websiteIconFontDir):
+ os.makedirs (websiteIconFontDir)
+ shutil.copy (os.path.join (iconFontDir, 'O3DVIcons.woff'), websiteIconFontDir)
+
+ websiteIconsCssPath = os.path.join (websiteCssDir, 'icons.css')
+ shutil.copy (os.path.join (iconFontDir, 'O3DVIcons.css'), websiteIconsCssPath)
+ Tools.ReplaceStringInFile (websiteIconsCssPath, './O3DVIcons.woff', 'O3DVIcons/O3DVIcons.woff')
+
+ shutil.rmtree (tempDir)
+
return 0
sys.exit (Main (sys.argv))
diff --git a/website/assets/images/context/hide.svg b/website/assets/images/context/hide.svg
deleted file mode 100644
index d537c03..0000000
--- a/website/assets/images/context/hide.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/context/show.svg b/website/assets/images/context/show.svg
deleted file mode 100644
index 11f761d..0000000
--- a/website/assets/images/context/show.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/dialog/arrow_down.svg b/website/assets/images/dialog/arrow_down.svg
deleted file mode 100644
index bd5d33d..0000000
--- a/website/assets/images/dialog/arrow_down.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/dialog/file_download.svg b/website/assets/images/dialog/file_download.svg
deleted file mode 100644
index 858b06c..0000000
--- a/website/assets/images/dialog/file_download.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/header/donate_hover.svg b/website/assets/images/header/donate_hover.svg
deleted file mode 100644
index 919a877..0000000
--- a/website/assets/images/header/donate_hover.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/header/feedback_hover.svg b/website/assets/images/header/feedback_hover.svg
deleted file mode 100644
index 1b9f231..0000000
--- a/website/assets/images/header/feedback_hover.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/header/github_hover.svg b/website/assets/images/header/github_hover.svg
deleted file mode 100644
index 8b93c2e..0000000
--- a/website/assets/images/header/github_hover.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/header/info_hover.svg b/website/assets/images/header/info_hover.svg
deleted file mode 100644
index 1df80d7..0000000
--- a/website/assets/images/header/info_hover.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/navigator/arrow_down.svg b/website/assets/images/navigator/arrow_down.svg
deleted file mode 100644
index bd5d33d..0000000
--- a/website/assets/images/navigator/arrow_down.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/navigator/arrow_right.svg b/website/assets/images/navigator/arrow_right.svg
deleted file mode 100644
index f10314c..0000000
--- a/website/assets/images/navigator/arrow_right.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/navigator/arrow_up.svg b/website/assets/images/navigator/arrow_up.svg
deleted file mode 100644
index 91fa0b8..0000000
--- a/website/assets/images/navigator/arrow_up.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/navigator/fit_navigator.svg b/website/assets/images/navigator/fit_navigator.svg
deleted file mode 100644
index 90c6300..0000000
--- a/website/assets/images/navigator/fit_navigator.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/navigator/hidden.svg b/website/assets/images/navigator/hidden.svg
deleted file mode 100644
index 7df38b3..0000000
--- a/website/assets/images/navigator/hidden.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/navigator/open.svg b/website/assets/images/navigator/open.svg
deleted file mode 100644
index dbccf3e..0000000
--- a/website/assets/images/navigator/open.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/navigator/visible.svg b/website/assets/images/navigator/visible.svg
deleted file mode 100644
index e84fe2a..0000000
--- a/website/assets/images/navigator/visible.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/sidebar/close.svg b/website/assets/images/sidebar/close.svg
deleted file mode 100644
index abc131e..0000000
--- a/website/assets/images/sidebar/close.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/sidebar/warning.svg b/website/assets/images/sidebar/warning.svg
deleted file mode 100644
index f63e430..0000000
--- a/website/assets/images/sidebar/warning.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/toolbar/details_active.svg b/website/assets/images/toolbar/details_active.svg
deleted file mode 100644
index 4b76fbf..0000000
--- a/website/assets/images/toolbar/details_active.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/toolbar/fit.svg b/website/assets/images/toolbar/fit.svg
deleted file mode 100644
index 08e471b..0000000
--- a/website/assets/images/toolbar/fit.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/assets/images/toolbar/settings_active.svg b/website/assets/images/toolbar/settings_active.svg
deleted file mode 100644
index 8379c71..0000000
--- a/website/assets/images/toolbar/settings_active.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/website/embed.html b/website/embed.html
index 99abcb4..170e286 100644
--- a/website/embed.html
+++ b/website/embed.html
@@ -80,6 +80,7 @@
+
diff --git a/website/index.html b/website/index.html
index ece1811..71e9d3a 100644
--- a/website/index.html
+++ b/website/index.html
@@ -80,6 +80,7 @@
+
diff --git a/website/info/index.html b/website/info/index.html
index f92329e..d6b6e42 100644
--- a/website/info/index.html
+++ b/website/info/index.html
@@ -166,8 +166,7 @@
There are two ways to load models from your computer:
- Use the open button on the toolbar (). Here you can select all the
- relevant files.
+ Use the open button on the toolbar. Here you can select all the relevant files.
Drag and drop all the relevant files into the browser window.
@@ -175,7 +174,7 @@
Loading models hosted on a web server
- You can load models by url with the open url button on the toolbar ().
+ You can load models by url with the open url button on the toolbar.
Here you can list all of the model files. You should place every file in a separate line.
@@ -189,7 +188,7 @@
Commit models to GitHub with all the required files.
-
Go to 3dviewer.net, and click on the open url button in the toolbar ().
+
Go to 3dviewer.net, and click on the open url button in the toolbar.
Open the files on GitHub, copy the link of the file from the address bar, and paste it in the dialog. See the example below.
@@ -208,7 +207,7 @@
Upload models to DropBox with all the required files.
-
Go to 3dviewer.net, and click on the open url button in the toolbar ().
+
Go to 3dviewer.net, and click on the open url button in the toolbar.
Get the sharing link from DropBox for all of the files, and paste it in the dialog. See the example below.
@@ -222,7 +221,7 @@
Missing files
- Sometimes you see missing files in the tree (). It means that your model
+ Sometimes you see missing files in the tree. It means that your model
refers to another files, but they are not selected to import. To solve the issue you have to import the model again together with the referenced
files, or just import the missing files on their own.
@@ -230,12 +229,12 @@
Sharing and embedding models
If your models are hosted on a web server, you can share the link with others, or you can generate embedding code to integrate the viewer in your website.
- To get the sharing link or the embedding code, click on the share model button () in the toolbar.
+ To get the sharing link or the embedding code, click on the share model button in the toolbar.
Model and visualization settings
- You can access model and visualization settings by clicking on the settings icon () on the toolbar.
+ You can access model and visualization settings by clicking on the settings icon on the toolbar.
@@ -246,7 +245,7 @@
Exporting models
- You can export your model in several file formats. To achieve this, click on the export button in the toolbar ().
+ You can export your model in several file formats. To achieve this, click on the export button in the toolbar.
After that select the format you would like to export to, and download the resulting files one by one.