Changes between Version 25 and Version 26 of PythonOcc/elbow
- Timestamp:
- Dec 10, 2013, 3:10:13 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PythonOcc/elbow
v25 v26 266 266 var viewer = new JSC3D.Viewer(canvas); 267 267 viewer.setParameter('SceneUrl', '/vaje/raw-attachment/wiki/PythonOcc/elbow/elbow.stl'); 268 viewer.setParameter('RenderMode', 'smooth');269 //viewer.setParameter('CreaseAngle', 120);270 268 viewer.init(); 271 269 viewer.update(); … … 298 296 [http://code.google.com/p/jsc3d/wiki/GettingStarted osnovnem primeru] jsc3d. 299 297 300 == Sestavljanje, m eteriali, transformacije ==298 == Sestavljanje, materiali, transformacije == 301 299 {{{ 302 300 #!html 303 301 <script src="/vaje/raw-attachment/wiki/PythonOcc/elbow/jsc3d.min.js"></script> 304 <script src="/vaje/raw-attachment/wiki/PythonOcc/elbow/jsc3d.touch.js"></script>305 302 <script type="text/javascript"> 306 303 function onLoad2(){ 307 304 var canvas = document.getElementById('cv2'); 305 canvas.width = 0.9*window.innerWidth; 306 canvas.height = canvas.width/1.6; 308 307 var viewer = new JSC3D.Viewer(canvas); 309 308 //viewer.setParameter('SceneUrl', '/vaje/raw-attachment/wiki/PythonOcc/elbow/pipe.stl'); … … 313 312 viewer.setParameter('InitRotationY', 30); 314 313 viewer.setParameter('InitRotationZ', 30); 315 316 314 viewer.init(); 317 315 … … 319 317 var totalParts = 2; 320 318 var numOfLoaded = 0; 319 321 320 var onPipeLoaded = function(scene) { 322 321 var meshes = scene.getChildren(); … … 335 334 for (var i=0; i<meshes.length; i++) { 336 335 material = new JSC3D.Material(); 337 material.diffuseColor = 0x caa618;338 material.transparency = 0 ;336 material.diffuseColor = 0x0ab610; 337 material.transparency = 0.4; 339 338 meshes[i].setMaterial(material); 340 339 theScene.addChild(meshes[i]); … … 377 376 </script> 378 377 <canvas id="cv2" width="600" height="400" 379 style="background:lightgrey; border: 1px solid; float:right;" ></canvas> 380 }}} 378 style="background:lightgrey; border: 1px solid; float:center;" ></canvas> 379 }}} 380 {{{ 381 #!javascript 382 383 }}}