浏览代码

Box debug rendering

trethaller 7 年之前
父节点
当前提交
7a5c5a7004
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      hide/prefab/Box.hx

+ 4 - 1
hide/prefab/Box.hx

@@ -21,13 +21,16 @@ class Box extends Object3D {
 		var prim = h3d.prim.Cube.defaultUnitCube();
 		var mesh = new h3d.scene.Mesh(prim, obj);
 		mesh.setPosition(-0.5, -0.5, -0.5);
+
+		#if editor
 		setDebugColor(0x60ff00ff, mesh.material);
 
 		var wire = new h3d.scene.Box(obj);
 		wire.color = 0;
 		wire.ignoreCollide = true;
 		wire.material.shadows = false;
-
+		#end
+		
 		ctx.local3d = obj;
 		ctx.local3d.name = name;
 		applyPos(ctx.local3d);