Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PlantEditor] Loading mesh code #119

Open
tpaviot opened this issue Oct 8, 2013 · 11 comments
Open

[PlantEditor] Loading mesh code #119

tpaviot opened this issue Oct 8, 2013 · 11 comments

Comments

@tpaviot
Copy link
Contributor

tpaviot commented Oct 8, 2013

@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
Copy link

yjung commented Oct 8, 2013

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

@mlimper
Copy link
Contributor

mlimper commented Oct 9, 2013

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

@tpaviot
Copy link
Contributor Author

tpaviot commented Oct 9, 2013

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
Copy link
Contributor Author

tpaviot commented Oct 9, 2013

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
Copy link
Contributor

mlimper commented Oct 11, 2013

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
Copy link
Contributor

mlimper commented Oct 11, 2013

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

@tpaviot
Copy link
Contributor Author

tpaviot commented Oct 11, 2013

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

Then:
/test
Be sure everything is ok.

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

@mlimper
Copy link
Contributor

mlimper commented Oct 11, 2013

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
Copy link
Contributor Author

tpaviot commented Oct 11, 2013

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
Copy link
Contributor

mlimper commented Oct 11, 2013

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
Copy link
Contributor

mlimper commented Oct 11, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants