Changes between Version 36 and Version 37 of PythonOcc/elbow


Ignore:
Timestamp:
Dec 17, 2013, 12:53:12 AM (6 years ago)
Author:
Leon Kos
Comment:

Pokaži travo

Legend:

Unmodified
Added
Removed
Modified
  • PythonOcc/elbow

    v36 v37  
    362362  viewer.setParameter('InitRotationY', 30);
    363363  viewer.setParameter('InitRotationZ', 30);
    364   viewer.setParameter('RenderMode', 'smooth');
     364  viewer.setParameter('RenderMode', 'texture');
    365365  viewer.setParameter('CreaseAngle', 15);
    366366  viewer.init();
     
    407407  elbow_loader.loadFromUrl('/vaje/raw-attachment/wiki/PythonOcc/elbow/elbow.stl');
    408408
     409  pod = new JSC3D.Mesh();
     410  pod.isDoubleSided = false; w = 1000; h = -50;
     411  pod.vertexBuffer = [-w, -w, h, w, -w, h, w, w, h, -w, w, h];
     412  pod.indexBuffer = [0, 1, 2, 3, -1];
     413  pod.texCoordBuffer = [0, 0, 1, 0, 1, 1,  0, 1];
     414  pod.texCoordIndexBuffer = [0,1,2,3,-1];
     415  pod.init();
     416  var tex = new JSC3D.Texture;
     417  tex.onready = function() {
     418      pod.setTexture(this);
     419      viewer.update();
     420  };
     421 tex.createFromUrl('/vaje/raw-attachment/wiki/PythonOcc/elbow/Grass_by_jaqx_textures.jpg');                                 
     422 theScene.addChild(pod);
    409423  viewer.update();
    410424}