Revision: 18318 http://sourceforge.net/p/jmol/code/18318 Author: hansonr Date: 2013-06-11 01:10:19 +0000 (Tue, 11 Jun 2013) Log Message: ----------- WebGL fix
Modified Paths: -------------- trunk/Jmol/src/org/jmol/exportjs/JSExporter.java trunk/Jmol/src/org/jmol/viewer/Viewer.java Modified: trunk/Jmol/src/org/jmol/exportjs/JSExporter.java =================================================================== --- trunk/Jmol/src/org/jmol/exportjs/JSExporter.java 2013-06-10 02:47:10 UTC (rev 18317) +++ trunk/Jmol/src/org/jmol/exportjs/JSExporter.java 2013-06-11 01:10:19 UTC (rev 18318) @@ -113,6 +113,7 @@ * @param pt3 */ void jsTriangle(Object applet, int color, P3 pt1, P3 pt2, P3 pt3) { + // implemented in JavaScript only System.out.println("jsTriangle "); } @@ -165,17 +166,23 @@ } @Override - protected void outputCone(P3 ptBase, P3 ptTip, float radius, - short colix) { - outputCylinder(null, ptBase, ptTip, colix, GData.ENDCAPS_NONE, radius, null, null, false); + protected void outputEllipsoid(P3 center, P3[] points, short colix) { + // TODO Auto-generated method stub + } @Override - protected void outputEllipsoid(P3 center, P3[] points, short colix) { + protected void output(Tuple3f pt) { // TODO Auto-generated method stub } + @Override + protected void outputCone(P3 ptBase, P3 ptTip, float radius, + short colix) { + outputCylinder(null, ptBase, ptTip, colix, GData.ENDCAPS_NONE, radius, null, null, false); + } + private Integer getColor(short colix) { return Integer.valueOf(g3d.getColorArgbOrGray(colix)); } @@ -210,7 +217,7 @@ int[][] indices, int nVertices, int nPolygons, int nFaces, BS bsPolygons, int faceVertexMax, int color, int[] vertexColors, int[] polygonColors) { - System.out.println("jsSurface -- nV=" + nVertices + " nPoly=" + nPolygons + " nFaces=" + nFaces + " faceVertexMax=" + faceVertexMax); + //System.out.println("jsSurface -- nV=" + nVertices + " nPoly=" + nPolygons + " nFaces=" + nFaces + " faceVertexMax=" + faceVertexMax); // JavaScript only } @@ -231,12 +238,6 @@ } @Override - protected void output(Tuple3f pt) { - // TODO Auto-generated method stub - - } - - @Override void plotText(int x, int y, int z, short colix, String text, JmolFont font3d) { // TODO -- not sure how to handle z exactly. // These are screen coordinates. You have to use Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2013-06-10 02:47:10 UTC (rev 18317) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2013-06-11 01:10:19 UTC (rev 18318) @@ -453,7 +453,7 @@ display = info.get("display"); isSingleThreaded = apiPlatform.isSingleThreaded(); noGraphicsAllowed = checkOption2("noGraphics", "-n"); - haveDisplay = (display != null && !noGraphicsAllowed && !isHeadless() && !checkOption2( + haveDisplay = (isWebGL || display != null && !noGraphicsAllowed && !isHeadless() && !checkOption2( "isDataOnly", "\0")); noGraphicsAllowed &= (display == null); if (haveDisplay) { @@ -9587,7 +9587,7 @@ Object exporter = export3D.initializeExporter(type, this, privateKey, gdata, output); if (isJS && exporter != null) - this.jsExporter3D = export3D; + jsExporter3D = export3D; return (exporter == null ? null : export3D); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits