Load this model in memory

Property definitions

gamnit $ Model :: load
	# Load this model in memory
	fun load do end
lib/gamnit/depth/depth_core.nit:105,2--106,16

gamnit $ ModelAsset :: load
	redef fun load
	do
		if loaded then return

		var ext = path.file_extension
		if ext == "obj" then
			load_obj_file
		else
			errors.add new Error("Model at '{path}' failed to load: Extension '{ext or else "null"}' unrecognized")
		end

		if leaves_cache.is_empty then
			# Nothing was loaded, use a cube with the default material
			var leaf = placeholder_model
			leaves_cache.add leaf
		end

		loaded = true
	end
lib/gamnit/depth/more_models.nit:44,2--62,4