minify 3d code