kamikmz is a JavaScript library capable of displaying .kmz files without the need to extract them first. It was built to display self hosted SketchUp (.skp) files which are converted to .kmz files by a companion service kamikmz-service.
kamikmz depends on the following libraries:
To use the library just call the kamikmz function like in the example below (as used by this page):
<doctype !html>
<html>
<head>
</head>
<body>
<div id="kamikmz-viewer"></div>
<script src="lib/jszip.min.js"></script>
<script src="lib/jszip-utils.min.js"></script>
<script src="lib/three.min.js"></script>
<script src="lib/ColladaLoader.js"></script>
<script src="lib/OrbitControls.js"></script>
<script src="lib/kamikmz.js"></script>
<script>
(function()
{
kamikmz
(
"assets/zero.kmz",
document.querySelector("#kamikmz-viewer"),
function()
{
// do something once the model is loaded and ready
}
);
})();
</script>
</body>
</html>
Right now the library works, but needs some improvements as listed in issues. The two main improvements are adding web worker support to unzip and load the models and textures in the background, and adding support for .kmz files with multiple models.