add scale options
This commit is contained in:
		@@ -49,7 +49,7 @@
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
            const objLoader = new OBJLoader();
 | 
					            const objLoader = new OBJLoader();
 | 
				
			||||||
            const mesh = objLoader.parse(obj_3d['obj']);
 | 
					            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);
 | 
					            scene.add(mesh);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,6 +42,11 @@ def obj2html(
 | 
				
			|||||||
      "target_x": -5,
 | 
					      "target_x": -5,
 | 
				
			||||||
      "target_y": 0,
 | 
					      "target_y": 0,
 | 
				
			||||||
      "target_z": 0,
 | 
					      "target_z": 0,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    obj_options={
 | 
				
			||||||
 | 
					      "scale_x": 30,
 | 
				
			||||||
 | 
					      "scale_y": 30,
 | 
				
			||||||
 | 
					      "scale_z": 30,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ):
 | 
					  ):
 | 
				
			||||||
  with  open(obj_path, "r") as f:
 | 
					  with  open(obj_path, "r") as f:
 | 
				
			||||||
@@ -55,6 +60,7 @@ def obj2html(
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  data_dict = {
 | 
					  data_dict = {
 | 
				
			||||||
    "obj_3d": js_string,
 | 
					    "obj_3d": js_string,
 | 
				
			||||||
 | 
					    "obj_options": obj_options,
 | 
				
			||||||
    "camera": camera,
 | 
					    "camera": camera,
 | 
				
			||||||
    "light": light,
 | 
					    "light": light,
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user