We use a custom fork of the three.js repository where we maintain edits to the three.js Editor component useful for materials manipulations. The editor subdirectory includes vendored JS dependencies in a js/libs directory which are not 100% compatible with our use case.
The usage of CodeMirror in the Editor takes advantage of a TernServer for javascript autocomplete. The TernServer code refers to the ternjs module as a global. In order to support CodeMirror functionality in the Editor, we need to resolve the issue about tern being a global in the codemirror source code.
Relevant file in three.js: editor/js/Script.js
Relevant file in wave: src/components/ThreejsEditorModal.jsx
We use a custom fork of the three.js repository where we maintain edits to the three.js Editor component useful for materials manipulations. The editor subdirectory includes vendored JS dependencies in a
js/libsdirectory which are not 100% compatible with our use case.The usage of CodeMirror in the Editor takes advantage of a TernServer for javascript autocomplete. The TernServer code refers to the ternjs module as a global. In order to support CodeMirror functionality in the Editor, we need to resolve the issue about tern being a global in the codemirror source code.
Relevant file in three.js:
editor/js/Script.jsRelevant file in wave:
src/components/ThreejsEditorModal.jsx