Changes between Version 31 and Version 32 of PythonOcc/elbow
- Timestamp:
- Dec 12, 2013, 8:52:25 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PythonOcc/elbow
v31 v32 270 270 viewer.update(); 271 271 } 272 window.onload = window.onresize =function() {onLoad();}272 window.onload = function() {onLoad();} 273 273 </script> 274 274 <canvas id="cv" width="600" height="400" … … 340 340 scene.addChild(myMesh); 341 341 } 342 var viewer = null; 342 343 343 344 function onLoad2(){ … … 345 346 canvas.width = 0.9*window.innerWidth; 346 347 canvas.height = canvas.width/1.6; 347 v ar viewer = new JSC3D.Viewer(canvas);348 viewer = new JSC3D.Viewer(canvas); 348 349 //viewer.setParameter('SceneUrl', '/vaje/raw-attachment/wiki/PythonOcc/elbow/pipe.stl'); 349 350 viewer.setParameter('BackgroundColor1', '#FFFFFF'); … … 397 398 viewer.update(); 398 399 } 399 window.onload = window.onresize = function() {onLoad(); onLoad2();} 400 window.onload = function() {onLoad(); onLoad2();} 401 window.onresize = function() { 402 var canvas = document.getElementById('cv2'); 403 canvas.width = 0.9*window.innerWidth; 404 canvas.height = canvas.width/1.6; 405 viewer.ctx = canvas.getContext('2d'); 406 viewer.canvasData = viewer.ctx.getImageData(0, 0, canvas.width, canvas.height); 407 viewer.frameWidth = canvas.width; 408 viewer.frameHeight = canvas.height; 409 viewer.drawBackground(); 410 viewer.update(); 411 } 400 412 </script> 401 413 <canvas id="cv2" width="600" height="400" … … 408 420 <script src="/vaje/raw-attachment/wiki/PythonOcc/elbow/jsc3d.min.js"></script> 409 421 <script type="text/javascript"> 422 var viewer = null; 410 423 function onLoad2(){ 411 424 var canvas = document.getElementById('cv2'); 412 425 canvas.width = 0.9*window.innerWidth; 413 426 canvas.height = canvas.width/1.6; 414 v ar viewer = new JSC3D.Viewer(canvas);427 viewer = new JSC3D.Viewer(canvas); 415 428 //viewer.setParameter('SceneUrl', '/vaje/raw-attachment/wiki/PythonOcc/elbow/pipe.stl'); 416 429 viewer.setParameter('BackgroundColor1', '#FFFFFF'); … … 479 492 480 493 viewer.update(); 481 } 482 window.onload = window.onresize = function() {onLoad(); onLoad2();} 494 } 495 496 window.onload = function() {onLoad(); onLoad2();} 497 window.onresize = function() { 498 var canvas = document.getElementById('cv2'); 499 canvas.width = 0.9*window.innerWidth; 500 canvas.height = canvas.width/1.6; 501 viewer.ctx = canvas.getContext('2d'); 502 viewer.canvasData = viewer.ctx.getImageData(0, 0, canvas.width, canvas.height); 503 viewer.frameWidth = canvas.width; 504 viewer.frameHeight = canvas.height; 505 viewer.drawBackground(); 506 viewer.update(); 507 } 483 508 </script> 484 509 <canvas id="cv2" width="600" height="400"