You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<script type= "text/javascript" src="js/Detector.js"></script>
<script type= "text/javascript"src="js/jsc3d.js"></script>
<script type= "text/javascript"src="js/jsc3d.touch.js"></script>
<script type= "text/javascript" src="js/jsc3d.webgl.js"></script>
<script type="text/javascript" id="virg">
var canvas= document.getElementById('virgin');
var viewer= new JSC3D.Viewer (canvas);
viewer.setParameter('SceneUrl', 'virg.obj');
viewer.setParameter('InitRotationX', 0);
viewer.setParameter('InitRotationY', 0);
viewer.setParameter('InitRotationZ', 0);
viewer.setParameter('BackgroundColor', '#FFFFF');
viewer.setParameter('RenderMode', 'texturesmooth');
viewer.setParameter('SphereMapUrl', 'images/black.png');
viewer.setParameter( 'Renderer', 'webgl');
viewer.init();
viewer.update();
var ctx = canvas.getContext('2d');
function changeDefinition(definition) {
if(definition == 'high' && viewer.isWebGLEnabled() && JSC3D.PlatformInfo.browser == 'chrome')
definition = 'standard';
viewer.setDefinition(definition);
viewer.update();
}
</script>
What is the expected output? What do you see instead?
I expect to have my obj loaded. in my console it says
Uncaught TypeError: Cannot read property 'width' of null
jsc3d.js:95
and anonymous function in my index referring to the .viewer
What version of the product are you using? On what operating system?
jscd 1.6.5
Original issue reported on code.google.com by [email protected] on 27 Feb 2015 at 11:01
The text was updated successfully, but these errors were encountered:
I am wondering what can i do to remedy the situation. It says the issue is in
the jsc3d.js line 95 that sets the parameters for this.frameWidth =
canvas.width;
Not sure. It sounds like incorrect reference binding. How did you use the
viewer instance? Have you checked whether the canvas object you passed to the
viewer refered to a valid canvas element?
Original issue reported on code.google.com by
[email protected]
on 27 Feb 2015 at 11:01The text was updated successfully, but these errors were encountered: