Commit Graph

530 Commits

Author SHA1 Message Date
kovacsv
93358e2cd0 Export only the visible meshes #169 2021-12-26 14:08:58 +01:00
kovacsv
4e7d10b3b7 Use model filter from export dialog. 2021-12-26 01:11:19 +01:00
kovacsv
5eca9dade5 Add model filter to exporter model. 2021-12-26 00:59:57 +01:00
kovacsv
fe8012e657 Use a separate model class for export. 2021-12-26 00:40:06 +01:00
kovacsv
233cc2c2d7 Store instance id in mesh instances. 2021-12-25 10:49:59 +01:00
kovacsv
b4f10e2ca1 Use full file format names in export dialog. 2021-12-25 10:21:23 +01:00
kovacsv
69a97d6bd0 Move viewer geometry objects to a separate file. 2021-12-23 18:47:23 +01:00
kovacsv
759e9e7efe Store grid next to the geometry. 2021-12-23 17:48:40 +01:00
kovacsv
e611e50e2f Minor modifications. 2021-12-23 16:24:17 +01:00
kovacsv
aaf6a242c0 Feature toggle for grid display. 2021-12-23 15:18:47 +01:00
kovacsv
876cfc399b Always orbit around the center point of the camera. 2021-12-23 09:12:03 +01:00
kovacsv
3a2b344bc5 Simplify orbit center handling. 2021-12-22 23:35:59 +01:00
kovacsv
bee095ba74 Remove orbit center modifier code. 2021-12-22 23:05:27 +01:00
kovacsv
7891817b3e Fix crash when material type doesn't match with the preferred shading type. 2021-12-22 22:58:23 +01:00
kovacsv
1a0b473345 Rename axis to grid. 2021-12-22 20:36:48 +01:00
kovacsv
9e4aa58de2 Adjust orbit center after panning #194 2021-12-21 20:47:25 +01:00
kovacsv
27c308e308 Update external libraries. 2021-12-20 23:14:23 +01:00
kovacsv
e9f989ffea Clear previous model before loading the next one. 2021-12-20 22:58:32 +01:00
kovacsv
18e35701be Access the core viewer instance from the embedded viewer. 2021-12-20 16:31:26 +01:00
kovacsv
9c3e6fa3ec Object oriented embedding. 2021-12-20 16:10:45 +01:00
kovacsv
1cf59b750f Remove solidity check from volume calculation. 2021-12-18 10:31:40 +01:00
kovacsv
d5976ec8db Do url transformations in the loading code instead of the dialog #188 2021-12-18 10:09:30 +01:00
kovacsv
aec0d4adc7 Remove unused functions. 2021-12-17 17:03:55 +01:00
kovacsv
b59f52ae77 Add toggle button for edge settings and dark mode. 2021-12-15 18:15:48 +01:00
kovacsv
b42f8a3ec3 Slider for edge threshold. 2021-12-15 15:22:56 +01:00
kovacsv
295ac89a5d Fix error message. 2021-12-13 11:30:22 +01:00
kovacsv
c698117302 Better error message in case of the file is found, but failed to load. 2021-12-13 11:09:33 +01:00
kovacsv
6fd498d4a8 Minor modification. 2021-12-13 08:41:48 +01:00
kovacsv
6e9eea126a Detect single tap on mobile as mouse click. 2021-12-13 00:01:08 +01:00
kovacsv
712b75e208 End event should handled for iOS. 2021-12-12 21:36:41 +01:00
kovacsv
ce57dff028 Handle touchcancel, because touchend doesn't work on android. 2021-12-12 21:24:42 +01:00
kovacsv
bcf0c588fe No need to handle mouse button in click detector. 2021-12-12 21:24:08 +01:00
kovacsv
a003210666 No need to handle end event, because on touchend no relevant information arrives in the event. 2021-12-12 21:10:17 +01:00
kovacsv
a0ef9de5cb Rename functions in navigation. 2021-12-12 20:28:12 +01:00
kovacsv
f722723bca Minor modifications. 2021-12-12 08:43:21 +01:00
kovacsv
d152b64903 Reset measure ui when a new model is loaded. 2021-12-11 12:07:12 +01:00
kovacsv
9b3fc02357 Measure tool experiment. 2021-12-11 11:59:41 +01:00
kovacsv
9371abf56f Add the possibility to add extra model parts to the viewer. 2021-12-11 08:42:38 +01:00
kovacsv
f63c3d074a Fix progress bar after file selector dialog. 2021-12-09 12:50:30 +01:00
kovacsv
abd183cafc Update third-party libraries. 2021-12-09 12:41:20 +01:00
kovacsv
d3d3b720a5 Inherit edges visibility from the mesh. 2021-12-08 18:30:43 +01:00
kovacsv
c3eb21b185 Add edge threshold popup. 2021-12-08 18:26:39 +01:00
kovacsv
bb3bef4134 Add edge color to embedding codes. 2021-12-08 13:13:31 +01:00
kovacsv
619afebd55 Add edge display to settings. 2021-12-08 10:50:08 +01:00
kovacsv
65ab4aa9f5 Create separate material classes for phong and physical materials. 2021-12-04 18:26:58 +01:00
kovacsv
b901a9ab30 Pass preferred shading type to three.js conversion instead of preferred material type. 2021-12-04 16:59:24 +01:00
kovacsv
a689614e52 Remove unused clone functions. 2021-12-04 16:18:26 +01:00
kovacsv
0efcff6d30 Create a new class for model loader user interface handling. 2021-12-03 16:19:44 +01:00
kovacsv
9c5f208297 Minor modification. 2021-12-03 15:31:16 +01:00
kovacsv
fc08a25f69 Replace array with map in gltf exporter. 2021-12-03 15:29:50 +01:00
kovacsv
1ddd43c0b1 Remove svg importer. 2021-12-02 15:11:01 +01:00
kovacsv
c3b18803ac Store the current model in importer. 2021-12-02 15:10:00 +01:00
kovacsv
07fe1d5509 Send only file names to the file selector callback. 2021-11-30 10:29:01 +01:00
kovacsv
db57efeaf1 Select file to import when there are more importable files #176 2021-11-29 19:48:12 +01:00
kovacsv
2ac86e2a65 Support for drag&dropping an entire folder with model files #175 2021-11-29 10:51:48 +01:00
kovacsv
9024b71751 Rename dom functions. 2021-11-27 20:23:22 +01:00
kovacsv
cb25414dd2 Fix panels visibility. 2021-11-27 13:19:50 +01:00
kovacsv
02e1ed850f Lower the jquery dependency of website. 2021-11-27 12:14:04 +01:00
kovacsv
289e7cfff7 Lower the jquery dependency of navigator. 2021-11-27 10:37:02 +01:00
kovacsv
86b86f09e6 Lower the jquery dependency of treeview. 2021-11-27 09:03:07 +01:00
kovacsv
a89681757a Lower the jquery dependency of dialogs. 2021-11-26 23:02:41 +01:00
kovacsv
694aa9d839 Remove jquery usage from the embedding code. 2021-11-26 20:45:38 +01:00
kovacsv
b4b899dd28 Simplify mesh instance counting. 2021-11-26 20:11:28 +01:00
kovacsv
e8e6108dfe Node list instead of hierarchy in o3dv files. 2021-11-22 16:52:45 +01:00
kovacsv
583ab14e34 Create mesh nodes during o3dv import. 2021-11-22 14:25:56 +01:00
kovacsv
31d472aa9a Clean up generator parameters interface. 2021-11-22 14:02:02 +01:00
kovacsv
6efbe02e61 Refactor obj importer. 2021-11-22 11:13:32 +01:00
kovacsv
5f2adffe9e Access files through importer callback so they will appear among missing files. 2021-11-22 08:59:30 +01:00
kovacsv
6c57e785ca Do not use feature set in the viewer. 2021-11-20 17:20:55 +01:00
kovacsv
06a20bffd2 Add grid display experiment. 2021-11-20 17:00:28 +01:00
kovacsv
5e078b2e66 Rename EnumerateTransformedMeshInstances to EnumerateTransformedMeshes. 2021-11-19 08:05:13 +01:00
kovacsv
8fa45a8b95 Rename ImportBuffers to ImporterFileAccessor. 2021-11-19 08:00:32 +01:00
kovacsv
33a8464321 Simplify importer interface. 2021-11-17 12:01:21 +01:00
kovacsv
afc741203a Minor modification. 2021-11-16 18:06:46 +01:00
kovacsv
b50abe77ba Minor modification. 2021-11-16 08:34:52 +01:00
kovacsv
19d49f3832 Use materials in svg importer. 2021-11-15 18:16:05 +01:00
kovacsv
2ccc67fe1a Separate file for svg loader. 2021-11-14 15:02:48 +01:00
kovacsv
d2039f97e6 Fix three.js import when a mesh node has children. 2021-11-14 09:37:43 +01:00
kovacsv
608d6b896d Fix glTF import when a mesh node has children. 2021-11-13 21:29:35 +01:00
kovacsv
ca3fd182b0 Introduce node types. GroupNode is a node that contains child nodes and optionally some meshes. MeshNode is a node that contains only one mesh. MeshNodes are not visible in the tree. 2021-11-13 20:56:35 +01:00
kovacsv
79cd5189dc Revert "Add transformation for mesh objects."
This reverts commit d75ff6464c.
2021-11-13 20:43:54 +01:00
kovacsv
d75ff6464c Add transformation for mesh objects. 2021-11-13 20:06:19 +01:00
kovacsv
60b13a9572 Add svg loader experiment. 2021-11-13 19:45:34 +01:00
kovacsv
c504d74b5d Add solids example as o3dv file. 2021-11-12 16:30:25 +01:00
kovacsv
57c7c216db Remove unused functions. 2021-11-08 17:54:34 +01:00
kovacsv
1fe87962bb Set node name only if it's not empty in the 3ds file. 2021-11-03 18:42:37 +01:00
kovacsv
1fbd4feea0 Hierarchical 3ds import. 2021-11-03 18:08:36 +01:00
kovacsv
b90425e247 Set texture name based on three map name. 2021-11-03 08:19:44 +01:00
kovacsv
16daacadac Minor modification. 2021-11-02 19:07:47 +01:00
kovacsv
a053ea07b4 Hierarchical three.js import. 2021-11-02 18:00:26 +01:00
kovacsv
3423baa2b2 Hierarchical glTF import. 2021-11-02 08:40:27 +01:00
kovacsv
71cfe70c71 Improve conversion speed in case of high number of nodes. 2021-11-02 08:40:06 +01:00
kovacsv
c1e7deb2c4 Make three.js importers inherit from a three.js importer base class. 2021-11-01 07:47:45 +01:00
kovacsv
1b936f21b2 Replace environment map. 2021-10-31 09:30:37 +01:00
kovacsv
00daf22067 Modify physical lighting model. 2021-10-30 09:31:11 +02:00
kovacsv
69430fd8f2 Update three.js to the latest version #160 2021-10-30 08:43:25 +02:00
kovacsv
a1c77ea263 Set material type and shading model based on the most used material type in the model. 2021-10-29 18:33:46 +02:00
kovacsv
494ef4697b Move shading parameters to a separate class. 2021-10-29 18:19:36 +02:00
kovacsv
281d49c750 Move open/close arrow to the left of navigator group items. 2021-10-28 14:08:58 +02:00
kovacsv
94e8f15a24 Check if the model is empty based on the node hierarchy. 2021-10-27 10:04:50 +02:00
kovacsv
fc2dd12aa0 Always return arraybuffer during export. 2021-10-27 09:55:01 +02:00
kovacsv
d78feaceee Remove empty nodes recursively. 2021-10-27 09:54:40 +02:00
kovacsv
7abc6efc93 Import all models as hierarchical model, but put all the meshes under the root node. 2021-10-27 08:25:47 +02:00
kovacsv
e6eff40543 Remove empty nodes during model finalization. 2021-10-26 19:45:26 +02:00
kovacsv
ad132b2eed Calculate geometric values based on mesh instances. 2021-10-26 18:54:51 +02:00
kovacsv
7eac7dee43 Treat models with no node hierarchy as one flat hierarchy under the root node. 2021-10-26 18:40:20 +02:00
kovacsv
c1e3a33107 Mesh instance is not needed in mesh. 2021-10-26 14:47:03 +02:00
kovacsv
6f9801010b Use mesh instance id to identify meshes. 2021-10-26 13:15:56 +02:00
kovacsv
af5a0fef13 Add node to mesh instance instead of transformation. 2021-10-26 08:50:20 +02:00
kovacsv
92eac095e1 Calculate world transformation from node. 2021-10-26 07:53:25 +02:00
kovacsv
034c4079c9 Create quaternion from axis and angle. 2021-10-26 07:37:06 +02:00
kovacsv
504c38848d Automatically remove trailing whitespaces in Visual Studio Code. 2021-10-25 16:30:25 +02:00
kovacsv
44460d0597 Enumerate mesh instances. 2021-10-25 16:22:49 +02:00
kovacsv
0143d29a9d Add multiple instances of the same mesh in tests. 2021-10-25 08:32:11 +02:00
kovacsv
f5cedf6842 Add key generator to mesh instance id. 2021-10-24 21:22:14 +02:00
kovacsv
90539cc15d Move MeshInstanceId to a separate file. 2021-10-24 18:08:50 +02:00
kovacsv
0afce83a49 Fix conversion when a node has multiple meshes. 2021-10-24 17:30:48 +02:00
kovacsv
bd6a66a781 Move mesh instance id to model utils. 2021-10-24 16:48:43 +02:00
kovacsv
4250ab3b58 Add mesh instance object that represents a mesh with transformation. 2021-10-24 16:46:49 +02:00
kovacsv
f045d214c7 Add mesh instance id to identify a mesh in the node hierarchy. 2021-10-24 09:43:24 +02:00
kovacsv
24e53e242a Generate unique id for nodes. 2021-10-23 11:16:32 +02:00
kovacsv
d3c5a1436b Experimental conversion based on node hierarchy. 2021-10-23 10:01:36 +02:00
kovacsv
7875457785 Add is empty function to node. 2021-10-23 09:05:42 +02:00
kovacsv
19ca7a697b Add helper functions for async task running. 2021-10-23 08:36:01 +02:00
kovacsv
654ffd0acc Use one main object in viewer instead of an array of meshes. 2021-10-22 17:25:16 +02:00
kovacsv
67ca415a72 Remove unused variable. 2021-10-22 16:02:53 +02:00
kovacsv
cd2adbeab3 Store transformation in node. 2021-10-22 15:55:38 +02:00
kovacsv
055e817097 Minor modification. 2021-10-22 15:13:51 +02:00
kovacsv
dd7a0ed14f Add node hierarchy to model. 2021-10-22 11:17:36 +02:00
kovacsv
ccfe303f93 Add enumerate function for node. 2021-10-21 12:17:26 +02:00
kovacsv
bb9724578d Add mesh enumeration function to model. 2021-10-17 11:42:58 +02:00
kovacsv
16614d81e1 Enumerate mesh indices recursively. 2021-10-16 16:02:33 +02:00
kovacsv
97312fe080 Enumerate children only. 2021-10-16 11:59:36 +02:00
kovacsv
9dcf49b548 Add node class. 2021-10-16 11:53:19 +02:00
kovacsv
3385816128 Update web-ifc. 2021-10-02 10:41:09 +02:00
kovacsv
fb3cdbe83c Pass original file name and extension to importers. 2021-09-24 08:16:18 +02:00
kovacsv
5bd71dd50c Feature Request - Shift + Mouse left should pan model #141 2021-09-17 13:47:36 +02:00
hey24sheep
39e10560c9 increased zoomRatio to 0.005 2021-09-17 14:07:54 +05:30
kovacsv
f9e8be8ed0 Make ctrl+zoom dependent of mouse movement diff, and clean-up code. 2021-09-17 08:07:26 +02:00
hey24sheep
089f4a0fc9 disable zoom on movement along x-axis 2021-09-16 16:38:53 +05:30
hey24sheep
a2061a7ca6 Merge branch 'dev' into task/ctrl_mouse_zoom 2021-09-16 16:24:14 +05:30
kovacsv
30830e8431 Handle multiple zip files. 2021-09-16 07:45:11 +02:00
hey24sheep
31f58ade96 ctrl zoom feature 2021-09-13 22:17:34 +05:30
kovacsv
b89a3429ba Feature Request- Ability to auto detect and load models from .zip or .rar #136 2021-09-13 16:32:50 +02:00
kovacsv
4e7f5d0445 Move FileList to a separate file. 2021-09-13 11:21:29 +02:00
kovacsv
9c252de657 Minor code formatting. 2021-09-12 15:44:28 +02:00
hey24sheep
d9b80d96de import gltf extra props 2021-09-11 03:13:24 +05:30
kovacsv
419e8775dd Move three importer among other importers. 2021-09-05 08:04:55 +02:00
kovacsv
46a8d580f4 Remove importers from file list object. 2021-09-01 10:27:17 +02:00
kovacsv
ec9766ae81 Access all files as arraybuffer, and convert to text if needed. 2021-08-27 08:11:35 +02:00
kovacsv
9bdd924b2f Remove mesh isolation by ctrl+click. 2021-08-17 19:28:22 +02:00
kovacsv
471a6cd3fa Minor modification. 2021-08-17 19:20:44 +02:00
kovacsv
daa6d34bbc Minor modification. 2021-08-16 19:04:45 +02:00
kovacsv
b65964565f "Invalid header information" when loading a PLY file #118 2021-08-16 19:01:48 +02:00
kovacsv
721a748198 Refactor ply material handling. 2021-08-16 18:48:42 +02:00
kovacsv
fe2836d632 Do not prevent default event for handlers that registered for the whole document, because in this case selection won't work. 2021-08-15 19:13:41 +02:00
kovacsv
8493391517 Change canvas background color #85
Option to set default material for meshes with no material information #45
2021-08-14 11:12:41 +02:00
kovacsv
d3a362dc7f Fix glTF metalness import. 2021-08-12 13:06:51 +02:00
kovacsv
c92d1b7580 Utilize other texture maps. 2021-08-12 08:17:26 +02:00
kovacsv
24ee8635fc Fix rhino library location. 2021-08-10 20:05:05 +02:00
kovacsv
1e6e6b65af Restructure libs. 2021-08-10 19:24:59 +02:00
kovacsv
294ae6a975 Set texture parameters. 2021-08-10 17:28:10 +02:00
kovacsv
759913d698 Add VRML loader. 2021-08-10 17:18:00 +02:00
kovacsv
1b2b899b48 Move tga loader initialization to loaders. 2021-08-10 08:25:39 +02:00
kovacsv
73bdaae0e1 Add collada importer. 2021-08-09 21:18:31 +02:00
kovacsv
47a6138870 Add tga loader. 2021-08-09 19:39:02 +02:00
kovacsv
0727048cc8 Merge branch 'dev' into three_importer
# Conflicts:
#	source/threejs/threeconverter.js
2021-08-09 18:27:18 +02:00
kovacsv
70324a38b7 Hide progress dialog only when all textures are loaded #108 2021-08-09 18:21:18 +02:00
kovacsv
9625bb721e Remove emissive color settings because it breaks some models. 2021-08-08 22:13:37 +02:00
kovacsv
ad66ea839f Load libraries one after other. 2021-08-08 22:06:14 +02:00
kovacsv
b85c199444 Rename variable, add some todos. 2021-08-08 16:27:08 +02:00
kovacsv
dc0fdbbc5d Handle mesh names. 2021-08-08 16:07:44 +02:00
kovacsv
984c900189 Handle textures from embedded data url, embedded blob, and external files. 2021-08-08 15:49:49 +02:00
kovacsv
9686de8817 Material and texture handling. 2021-08-08 15:11:26 +02:00
kovacsv
9432b5b9de Handle external textures. 2021-08-08 13:50:37 +02:00
kovacsv
d244cd458a Use common function in rhino importer. 2021-08-08 13:50:24 +02:00
kovacsv
8062aec93d Minor modification. 2021-08-08 09:16:55 +02:00
kovacsv
c14da66704 Merge branch 'dev' into three_importer 2021-08-07 22:14:58 +02:00
kovacsv
ad7a1f9e89 Support Rhino PBR materials #107 2021-08-07 22:08:16 +02:00
kovacsv
751b09ffda Add material comparator function. 2021-08-07 21:24:44 +02:00
kovacsv
f365fc4fbd Build fix. 2021-08-06 22:34:53 +02:00
kovacsv
c042fa26b6 Merge branch 'dev' into three_importer 2021-08-06 22:33:24 +02:00
kovacsv
53b9218cc5 Dispose three objects after reading. 2021-08-06 22:31:43 +02:00
kovacsv
c60fe3bd1f Build fix. 2021-08-06 22:20:03 +02:00
kovacsv
4d0e4a0bd6 Merge branch 'dev' into three_importer 2021-08-06 22:18:18 +02:00
kovacsv
0f02be43dd Add utility functions for extension detection. 2021-08-06 22:18:02 +02:00
kovacsv
a5561c6f1a Embedded texture handling. 2021-08-06 22:17:33 +02:00
kovacsv
d03c67ce1f Merge branch 'dev' into three_importer 2021-08-06 19:02:01 +02:00
kovacsv
5130717732 Always return file extension in lower case. 2021-08-06 19:01:43 +02:00
kovacsv
2a0b7eadf2 Handle loader errors. 2021-08-06 18:54:52 +02:00
kovacsv
395c3d524a Transform meshes. 2021-08-06 18:31:13 +02:00
kovacsv
a8de237a51 Minor modifications. 2021-08-06 17:38:08 +02:00
kovacsv
0a269785da Add experiment to load models using three.js loaders. 2021-08-06 17:00:29 +02:00
kovacsv
c9125c53b2 Typo fix. 2021-08-06 16:55:56 +02:00
kovacsv
6dad95b310 Add rhino exporter in the exporter constructor. 2021-08-06 15:10:38 +02:00
kovacsv
2a71f7d6b5 PBR materials for o3dv format. 2021-08-05 15:38:07 +02:00
kovacsv
669ab1f8b4 Show Rhino document-level text strings #90 2021-08-05 14:05:36 +02:00
kovacsv
7022255491 Handle logical properties. 2021-08-01 11:58:33 +02:00
kovacsv
0b22e22161 Add solid generators. 2021-08-01 10:51:46 +02:00
kovacsv
55aafe8d88 Texture resizing to power-of-two sides is slow #105 2021-07-28 20:25:55 +02:00