title: WriteWebGL in R
body: <p>I am trying to export a 3D plot that was made using the plot3d function from the rgl package using the WrtieWebGL function for web viewing. I don't really understand the example in the WriteWebGL documentation because it saves to a temp directory. Could someone please provide an example on how to use this function and/or point out my error(s) with usage? Thank you for your time and help.</p>
  
  <pre><code>   attach(dataset1)       
     plot3d(Days_Prep_Time,ACT_Score,Coffee,size=5,col="blue", type="s")
     writeWebGL(dir = "webGL", filename = file.path(dir, "index.html"), 
     template = system.file(file.path("WebGL", "template.html"), package = "rgl",
     snapshot = TRUE, font = "Arial")
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>   Error in writeWebGL(dir = "webGL", filename = file.path(dir, "index.html"),  : 
     template ‘’ does not contain %WebGL%
     In addition: Warning message:
     In file(con, "r") :
     file("") only supports open = "w+" and open = "w+b": using the former
  </code></pre>