diff --git a/obj2html/index.html b/obj2html/index.html
index 6ef88c3..57247fa 100644
--- a/obj2html/index.html
+++ b/obj2html/index.html
@@ -49,7 +49,7 @@
{
const objLoader = new OBJLoader();
const mesh = objLoader.parse(obj_3d['obj']);
- mesh.scale.set(30, 30, 30);
+ mesh.scale.set({{obj_options.scale_x}}, {{obj_options.scale_y}}, {{obj_options.scale_z}});
scene.add(mesh);
}
diff --git a/obj2html/obj2html.py b/obj2html/obj2html.py
index 7f775af..2125931 100644
--- a/obj2html/obj2html.py
+++ b/obj2html/obj2html.py
@@ -42,6 +42,11 @@ def obj2html(
"target_x": -5,
"target_y": 0,
"target_z": 0,
+ },
+ obj_options={
+ "scale_x": 30,
+ "scale_y": 30,
+ "scale_z": 30,
}
):
with open(obj_path, "r") as f:
@@ -55,6 +60,7 @@ def obj2html(
data_dict = {
"obj_3d": js_string,
+ "obj_options": obj_options,
"camera": camera,
"light": light,
}