Skip to content

Commit

Permalink
Document format
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrimpyCat committed Aug 18, 2020
1 parent 4a4de19 commit 087f486
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/vox/format.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
defmodule Vox.Format do
@moduledoc """
Behaviour for representing different voxel formats.
"""

@doc """
Implement the behaviour creating interfaceable voxel data from an
underlying voxel format.
Return the interfaceable voxel data.
"""
@callback new(any) :: Vox.Data.t

@doc """
Implement the behaviour for determining whether the data is in the
format by this behaviour.
If the data is in the format of this behaviour then return `true`,
otherwise return `false`.
"""
@callback format?(any) :: boolean
end

0 comments on commit 087f486

Please sign in to comment.