Wiki proposal: merge constructor variants differing only by filepath/File/FileData argument
Posted: Thu Jul 27, 2017 11:09 am
So as far as I can tell, all these constructors which use a loaded-into-memory file accept a file path, or a File object, or a FileData object.
love.audio.newSource (static)
love.graphics.newFont
love.graphics.newImage
love.graphics.newImageFont
love.image.newCompressedData
love.image.newImageData
love.sound.newSoundData
love.thread.newThread
And all the constructors which use a streamed-off-disk file accept a file path or a File object.
love.audio.newSource (stream)
love.graphics.newVideo
love.sound.newDecoder
love.video.newVideoStream
Currently, the wiki has separate variants for each of these file argument types (or it's incomplete and doesn't) which are identical except for the file argument, and I think this is duplicated noisy madness and would be more fun to read and write if it was deduplicated.
So, I propose we combine them. (I am happy to make the edits if we agree that this is sensible!)
I think it would be good if it looked like this, with "string", "File" and "FileData" linking to their wiki pages (this might require modifying a template):
string/File/FileData file
(And string/File file for the streaming files.)
What do you think?
love.audio.newSource (static)
love.graphics.newFont
love.graphics.newImage
love.graphics.newImageFont
love.image.newCompressedData
love.image.newImageData
love.sound.newSoundData
love.thread.newThread
And all the constructors which use a streamed-off-disk file accept a file path or a File object.
love.audio.newSource (stream)
love.graphics.newVideo
love.sound.newDecoder
love.video.newVideoStream
Currently, the wiki has separate variants for each of these file argument types (or it's incomplete and doesn't) which are identical except for the file argument, and I think this is duplicated noisy madness and would be more fun to read and write if it was deduplicated.
So, I propose we combine them. (I am happy to make the edits if we agree that this is sensible!)
I think it would be good if it looked like this, with "string", "File" and "FileData" linking to their wiki pages (this might require modifying a template):
string/File/FileData file
(And string/File file for the streaming files.)
What do you think?