package d2isometric

import (
	
	
	

	
)

// SceneScale maps compiled layout pixels to world-space units.
const SceneScale = .01

func moduleSize( d2target.Shape) Vec3 {
	 := .7
	switch .Type {
	case d2target.ShapeCylinder:
		 = 1.15
	case d2target.ShapeQueue:
		 = .85
	case d2target.ShapePerson:
		 = 1.35
	}
	return Vec3{X: float64(max(1, .Width)) * SceneScale, Y: , Z: float64(max(1, .Height)) * SceneScale}
}

func boardLabelMetrics( Board,  []Node,  map[string]int) (float64, float64) {
	 := 16
	,  := 0, 0
	if ,  := [.SourceID];  && .SourceID != "" {
		 := [].Metadata.Original
		,  = .LabelWidth, .LabelHeight
		if .FontSize > 0 {
			 = .FontSize
		}
	}
	if  <= 0 {
		for ,  := range strings.Split(.Label, "\n") {
			 = max(, int(math.Ceil(float64(utf8.RuneCountInString()*)*.65)))
		}
	}
	if  <= 0 {
		 = int(math.Ceil(float64()*1.3)) * max(1, len(strings.Split(.Label, "\n")))
	}
	return float64() * SceneScale, float64() * SceneScale
}

const surfaceHeight = .08