Standardize how we refer to the other javascript files we include, too.
parent
d16e33ac48
commit
0404cd46ef
|
@ -958,6 +958,8 @@ void SolveSpaceUI::ExportMeshAsThreeJsTo(FILE *f, const Platform::Path &filename
|
||||||
Vector bndl, bndh;
|
Vector bndl, bndh;
|
||||||
|
|
||||||
const std::string THREE_FN("three-r111.min.js");
|
const std::string THREE_FN("three-r111.min.js");
|
||||||
|
const std::string HAMMER_FN("hammer-2.0.8.js");
|
||||||
|
const std::string CONTROLS_FN("SolveSpaceControls.js");
|
||||||
|
|
||||||
const char htmlbegin[] = R"(
|
const char htmlbegin[] = R"(
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
@ -966,8 +968,8 @@ void SolveSpaceUI::ExportMeshAsThreeJsTo(FILE *f, const Platform::Path &filename
|
||||||
<meta charset="utf-8"></meta>
|
<meta charset="utf-8"></meta>
|
||||||
<title>Three.js Solvespace Mesh</title>
|
<title>Three.js Solvespace Mesh</title>
|
||||||
<script id="%s">%s</script>
|
<script id="%s">%s</script>
|
||||||
<script id="hammer-2.0.8.js">%s</script>
|
<script id="%s">%s</script>
|
||||||
<script id="SolveSpaceControls.js">%s</script>
|
<script id="%s">%s</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body { margin: 0; overflow: hidden; }
|
body { margin: 0; overflow: hidden; }
|
||||||
</style>
|
</style>
|
||||||
|
@ -1019,7 +1021,10 @@ void SolveSpaceUI::ExportMeshAsThreeJsTo(FILE *f, const Platform::Path &filename
|
||||||
fprintf(f, htmlbegin,
|
fprintf(f, htmlbegin,
|
||||||
THREE_FN.c_str(),
|
THREE_FN.c_str(),
|
||||||
LoadStringFromGzip("threejs/" + THREE_FN + ".gz").c_str(),
|
LoadStringFromGzip("threejs/" + THREE_FN + ".gz").c_str(),
|
||||||
LoadString("threejs/SolveSpaceControls.js").c_str());
|
HAMMER_FN.c_str(),
|
||||||
|
LoadStringFromGzip("threejs/" + HAMMER_FN + ".gz").c_str(),
|
||||||
|
CONTROLS_FN.c_str(),
|
||||||
|
LoadString("threejs/" + CONTROLS_FN).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(f, "var solvespace_model_%s = {\n"
|
fprintf(f, "var solvespace_model_%s = {\n"
|
||||||
|
|
Loading…
Reference in New Issue