chetto1983 / jsc3d

Automatically exported from code.google.com/p/jsc3d
0 stars 0 forks source link

JSC3D - Examples #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hallo,

I don't know if this is the right place but I don't know where to place my 
problem: 

I just started with JSC3D and want to play a little bit with this tool. So I 
downloaded the JSC3D 0.7.2 compressed code and from this site 
(http://jsc3d.googlecode.com/svn/trunk/jsc3d/demos/tricera.html) the source 
code. I changed the obj by an other obj-file which I have on hard disc, so that 
something can be loaded. But when I start the program I it doesn't work. Canvas 
does not load. 
What do I do wrong? Did I forget something? Can I find somewhere a full example 
which I can just copy and paste and then it works?

Thanks in advance.

Original issue reported on code.google.com by idarim2...@googlemail.com on 30 Jun 2012 at 9:34

GoogleCodeExporter commented 8 years ago
I guess there may be a security error as your obj file was located on local 
disc. Some browsers will deny data requests (using XHR) from local file system 
unless you manually specify to do so.  For example, if you want to run your 
demo in Chrome, you have to launch Chrome with a commond line: 
...(your installation directory)\chrome --allow-file-access-from-files
and then it will work correctly. For other browsers, you can google 
"cross-domain xmlhttp local file" to search for corresponding solutions.

Another possible reason may be a known bug of jsc3d's obj-loader. It recognize 
tokens assuming they are separated by a single space character.  Some modeling 
softwares(3ds Studio Max) break this and may cause error. In this case you can 
import your file into Blender or MeshLab and export it again to assume it in 
correct format.  
This bug will be fixed in next release.

I wish this would be of some help.

Original comment by Humu2...@gmail.com on 1 Jul 2012 at 3:31

GoogleCodeExporter commented 8 years ago
Or is it possible to upload my obj-file or place it somewhere else than on 
local disc?

Original comment by idarim2...@googlemail.com on 1 Jul 2012 at 2:50

GoogleCodeExporter commented 8 years ago
The most recommended way is to setup a web server, deploying your demos on it 
and visit them as usual web pages.
Loading data from local file system is supported especially for debbuging 
purpose thus in most browsers not in default configuration. You have to change 
it manually.

Original comment by Humu2...@gmail.com on 1 Jul 2012 at 3:55

GoogleCodeExporter commented 8 years ago
I still have no idea what is the easiest way to get it run. But it has to run 
anyway because I think this project is also for other objects. 
Is it possible to explain this abstract more detailed? Thanks.

For example, if you want to run your demo in Chrome, you have to launch Chrome 
with a commond line: 
...(your installation directory)\chrome --allow-file-access-from-files

Original comment by idarim2...@googlemail.com on 2 Jul 2012 at 12:22

GoogleCodeExporter commented 8 years ago
Ok, let's take it step by step:
1. Suppose your system is Windows and your Chrome is installed at 
C:\Users\admin\AppData\Local\Google\Chrome\Application.  Open the command line 
tool and enter this: 
"C:\Users\admin\AppData\Local\Google\Chrome\Application\chrome 
--allow-file-access-from-files". This will launch Chrome with 
local-file-accessing enabled.
2. Drag the main page of your demo into Chrome. See if your model displays 
correctly. If it doesn't, there may be some error in your obj file. You have to 
check and repair it.

Original comment by Humu2...@gmail.com on 2 Jul 2012 at 3:26