jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.67k stars 516 forks source link

Cannot read property 'setValue' of undefined when loading sample files #328

Closed kevinmamaqi closed 6 years ago

kevinmamaqi commented 6 years ago

Expected Behavior

I am trying to do an experiment with OpenJScad. Everything goes well, except from an error that does not allow me to place the files inside the view-box. I don't know what is the problem, in the docs seems that even if you use file://... without a server should work, but in my case it doesn't even with a server.

Am I missing something?

Actual Behavior

Receive the following error:

Uncaught TypeError: Cannot read property 'setValue' of undefined
    at putSourceInEditor (test.js:87252)
    at onConversionDone (test.js:86919)
    at Worker.worker.onmessage (test.js:85337)

Steps to Reproduce the Problem

  1. Open terminal
  2. mkdir problem_setValue
  3. cd setValue
  4. git clone https://github.com/kevinmamaqi/TfCD_A2_Generative_Jar.git -b help --single-branch
  5. cd TfCD_A2_Generative_Jar
  6. npm install
  7. node generative.js
  8. Visit http://localhost:3000/ and try to load a .jscad file.

Specifications

kevinmamaqi commented 6 years ago

Error comes from Editor. It is not optional but required in default index.js. Replied back here: https://github.com/jscad/OpenJSCAD.org/issues/329