x3dom / apps-modeling

Publicly Available Applications
Other
3 stars 3 forks source link

[PlantEditor] Loading mesh code #119

Open tpaviot opened 10 years ago

tpaviot commented 10 years ago

@mlimper I try to run your code for loading x3d meshes but I dont' know how to proceed. Is there a shortcut menu for it?

yjung commented 10 years ago

Max is currently at Pacific Graphics 2013, but have you tried 'Fetch...' from the menu?

mlimper commented 10 years ago

Dear thomas, the test indeed runs after pressing "Fetch" in the plant editor. Regards, Max

tpaviot commented 10 years ago

There's an issue clicking fetch. `[12:25:33,021] TypeError: storageManager.loadScene is not a function @ http://192.168.43.69:8080/plant_editor:1``

tpaviot commented 10 years ago

Ok, I got it, it is because I load the StorageManager.js file for the component_editor.

Actually both component_editor and plant_editor are served by only one web server, files with the same name are perhaps not the best way to proceed. Would it be possible to refactor the folders/file names so that everything is consitent, without any redundancy in the different files. Also, move main.js to main_component_editor.js and main_plant_editor.js.

mlimper commented 10 years ago

Yes, this is indeed a problem. I'm aware of that, I think I already mentioned it in a mail before.

I guess there is still some refactoring to be done on our side, you're totally right. Nevertheless, it would also be helpful if the server would allow us to use js files with identical file names in different paths.

mlimper commented 10 years ago

Just a quick question, which is the default "root" folder of the 3D server?

tpaviot commented 10 years ago

root folder: ./server-3d. Click "run_3d_server.bat"

Then: /test Be sure everything is ok.

then /component_editor?idFonct=... or /plant_editor

mlimper commented 10 years ago

The tests work fine.

Actually I meant the root folder which the 3D server is using for serving the webpages. If I try with XAMPP, for example, and I choose the DocumentRoot to be "editor", everything works fine, there is no ambiguity among the js files' path names. Could you configure the server to behave like that?

tpaviot commented 10 years ago

You can do it on your own. In src/3d_server.py, just modify the line 325: 'tools.staticdir.dir': COMPONENT_DIR,

to 'tools.staticdir.dir': os.path.join(apps_modeling_path,'editor')

mlimper commented 10 years ago

I'm sorry, it doesn't help. Now, both of them are not working :-P Does the server need to know which directoy is which?

The XAMPP server, for example, works perfectly if I just make "editor" the DocumentRoot.

mlimper commented 10 years ago

Basically, the behaviour should just be that all files are getting served relative to the folder of the corresponding index.html