javascript - github three.js editor: make a java file from html file in node -
when want make java file html file in node got errors
main html file: https://github.com/mrdoob/three.js/blob/dev/editor/index.html
with line numbers:
1 <!doctype html> 2 <html lang="en"> 3 <head> 4 <title>three.js / editor</title> 5 <meta charset="utf-8"> 6 <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> 7 </head> 8 <body ontouchstart=""> 9 <link href="css/main.css" rel="stylesheet" /> 10 <link id="theme" href="css/light.css" rel="stylesheet" /> 11 12 <script src="../build/three.js"></script> 13 <script src="../examples/js/libs/system.min.js"></script> 14 15 <script src="../examples/js/controls/editorcontrols.js"></script> 16 <script src="../examples/js/controls/transformcontrols.js"></script> 17 18 <script src="../examples/js/libs/jszip.min.js"></script> 19 <script src="../examples/js/loaders/amfloader.js"></script> 20 <script src="../examples/js/loaders/awdloader.js"></script>
and edited javascript file using require:
require('../build/three.js') require('../examples/js/libs/system.min.js') require('../examples/js/controls/editorcontrols.js') require('../examples/js/controls/transformcontrols.js') require('../examples/js/libs/jszip.min.js') require('../examples/js/loaders/amfloader.js') require('../examples/js/loaders/awdloader.js') require('../examples/js/loaders/babylonloader.js') require('../examples/js/loaders/colladaloader2.js') require('../examples/js/loaders/fbxloader2.js') require('../examples/js/loaders/gltfloader.js') require('../examples/js/loaders/kmzloader.js') require('../examples/js/loaders/md2loader.js') require('../examples/js/loaders/objloader.js') require('../examples/js/loaders/playcanvasloader.js') require('../examples/js/loaders/plyloader.js') require('../examples/js/loaders/stlloader.js') require('../examples/js/loaders/tgaloader.js') require('../examples/js/loaders/utf8loader.js') require('../examples/js/loaders/vrmlloader.js') require('../examples/js/loaders/vtkloader.js') require('../examples/js/loaders/ctm/lzma.js') require('../examples/js/loaders/ctm/ctm.js') require('../examples/js/loaders/ctm/ctmloader.js') require('../examples/js/exporters/objexporter.js') require('../examples/js/exporters/stlexporter.js')
and use @ node:
browserify indexjavatest.js | indexhtmlify > indexjavatest.html
i got error:
error: cannot find module '../examples/js/loaders/deprecated/sceneloader.js' 'c:\three.js\editor' @ c:\users\admin\appdata\roaming\npm\node_modules\browserify\node_modules\browser-resolve\node_modules\resolve\lib\async.js:55:21 @ load (c:\users\admin\appdata\roaming\npm\node_modules\browserify\node_modules\browser-resolve\node_modules\resolve\lib\async.js:69:43) @ onex (c:\users\admin\appdata\roaming\npm\node_modules\browserify\node_modules\browser-resolve\node_modules\resolve\lib\async.js:92:31) @ c:\users\admin\appdata\roaming\npm\node_modules\browserify\node_modules\browser-resolve\node_modules\resolve\lib\async.js:22:47 @ fsreqwrap.oncomplete (fs.js:114:15)
what should solve problem?
Comments
Post a Comment