DecodeFile decodes the given file using a decoder based on the file extension. Returns decoder instance with full decoded state. Supported formats include: .obj = Wavefront OBJ format, including associated materials (.mtl) which must have same name as .obj, or a default material is used.
(fname string)
| 62 | // |
| 63 | // must have same name as .obj, or a default material is used. |
| 64 | func DecodeFile(fname string) (Decoder, error) { |
| 65 | dfs, fnm, err := fsx.DirFS(fname) |
| 66 | if err != nil { |
| 67 | return nil, err |
| 68 | } |
| 69 | return DecodeFileFS(dfs, fnm) |
| 70 | } |
| 71 | |
| 72 | // DecodeFileFS decodes the given file from the given filesystem using a decoder based on the file |
| 73 | // extension. Returns decoder instance with full decoded state. |
nothing calls this directly
no test coverage detected