add:  if(options.view_3d_projection) config.view_3d_projection = options.view_3d_projection; if(options.view_3d_camera_disposition) config.view_3d_camera_disposition = options.view_3d_camera_disposition; if(options.view_3d_projection_ortogonal_length) config.view_3d_projection_ortogonal_length = options.view_3d_projection_ortogonal_length;  if(config.view_3d_camera_disposition === 'hexagon') { if(config.view_3d_projection === 'perspective')  { vec3.rotateNormalizedRelative(camera3, camera3.rz, camera3.rx, -Math.PI/4); vec3.rotateNormalizedRelative(camera3, camera3.rz, camera3.ry, Math.PI/5); camera3.p[0] = +100; camera3.p[1] = -100; } else if(config.view_3d_projection === 'ortogonal') { vec3.rotateNormalizedRelative(camera3, camera3.rz, camera3.rx, -Math.PI/4); vec3.rotateNormalizedRelative(camera3, camera3.rz, camera3.ry, Math.PI/5); camera3.p[0] =100; camera3.p[1] =-100; } }  config.dim = options.dim; math.mat = global['mat'+(config.dim+1)]; math.mat_cartesian = global['mat'+config.dim];  math.vec = global['vec'+config.dim]; math.vec_homogenous = global['vec'+(config.dim+1)]; 
context:       function init(options) {        //create context        if(!options) options = {};        if(!options.container) options.container = document.body;        if(!options.projection_near) options.projection_near = 1.0;        if(!options.projection_far) options.projection_far = 100.0;        if(!options.projection_angle) options.projection_angle = Math.PI/2;        if(!options.projection_3d_near) options.projection_3d_near = 1.0;        if(!options.projection_3d_far) options.projection_3d_far = 100.0;        if(!options.projection_3d_angle) options.projection_3d_angle = Math.PI/2;        options_init = options;        if(options.container === document.body) {          options.container = document.createElement('canvas',            {alpha: false, premultipliedAlpha: false});          options.container.className = 'NEngine_canvas';          document.body.appendChild(options.container);        }        context = twgl.getWebGLContext(options.container);        //create shader program        twgl.setAttributePrefix('a_');        shader_info = twgl.createProgramInfo(context, ["vs", "fs"]);        context.useProgram(shader_info.program);        //fill uniform pointers        uniforms.uPMVMatrix1 = uPMVMatrix1;        uniforms.uPMVMatrix2 = uPMVMatrix2;        uniforms.uPMVMatrix3D = uPMVMatrix3D;        //adjust canvas size        canvas = context.canvas;        global.addEventListener('resize', resize, false);        resize();      }
meta: 5665	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5665/0f8ba5d109269d49d72be1d776721a5a867dd729/NEngine.js/clean/lib/NEngine.js