xxv / jsc3d

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

Not able to go inside my 3d model #155

Open arunkkarepu opened 8 years ago

arunkkarepu commented 8 years ago

Hi I am using latest jsc3d version. I am able to load my .obj file but i am not able to look inside the model but the same obj file, if opened in other softwares i am able to see what's inside. Is it possible to see inside the model. If possible, how? If not what i have to do to achieve this?

vasiledirla commented 8 years ago

this happens because the polygons are not rendered double sided (for performance reasons)

for details see here:

https://jsc3d.googlecode.com/svn-history/r315/trunk/jsc3d/docs/symbols/JSC3D.Mesh.html

arunkkarepu commented 8 years ago

Hi thanks for the reply, I changed isDoubleSided to true onloadingcomplete and below is my code but i am still facing the same problem. I am attaching a photo which was taken from other 3d renderer(windows app) and in that 3d renderer i can go inside the model to view. Model Used: Western_Bank.obj

var canvas = document.getElementById('cv'); var viewer = new JSC3D.Viewer(canvas); viewer.setParameter('SceneUrl', 'bank/Western_Bank.obj'); viewer.init(); viewer.update(); viewer.onloadingcomplete = function() { var scene = viewer.getScene(); if (scene) { scene.forEachChild( function(mesh) { mesh.isDoubleSided = true; }); } viewer.update(); };

bank2