http://www.love2d.org/w/api.php?action=feedcontributions&user=Bartbes&feedformat=atom
LOVE - User contributions [en]
2024-03-19T03:50:37Z
User contributions
MediaWiki 1.31.12
http://www.love2d.org/w/index.php?title=MediaWiki:Love.js&diff=29121
MediaWiki:Love.js
2024-03-10T14:58:41Z
<p>Bartbes: Make detection of sections more accurate</p>
<hr />
<div>// Source on github: https://github.com/love2d/love-wiki-version-picker<br />
function versionpicker() {<br />
var picker = document.createElement('select');<br />
<br />
picker.onchange = function () {<br />
applyFilter(this.options[this.selectedIndex].value);<br />
}<br />
<br />
function array (a) {<br />
return [].slice.apply(a || []);<br />
}<br />
<br />
// Some helpers for localStorage, basically resort to doing nothing<br />
// if it isn't available.<br />
function storeValue(name, value) {<br />
try {<br />
localStorage[name] = value;<br />
}<br />
catch (e) {<br />
}<br />
}<br />
<br />
function retrieveValue(name) {<br />
try {<br />
return localStorage[name];<br />
}<br />
catch (e) {<br />
return undefined;<br />
}<br />
}<br />
<br />
var pickerVersions = {};<br />
<br />
function injectPickerOption (version, text) {<br />
if (pickerVersions[version]) {<br />
return;<br />
}<br />
pickerVersions[version] = true;<br />
<br />
var option = document.createElement('option');<br />
<br />
option.value = version;<br />
option.textContent = text;<br />
picker.appendChild(option);<br />
}<br />
<br />
function makeWrapper () {<br />
var wrapper = document.createElement('div');<br />
<br />
wrapper.setAttribute('data-love-filterable', true);<br />
<br />
return wrapper;<br />
}<br />
<br />
function wrapSections () {<br />
var element = document.querySelector('.mw-parser-output > h2');<br />
var wrapper;<br />
<br />
while (element) {<br />
var next = element.nextSibling;<br />
if (element.nodeName == 'H2') {<br />
wrapper = makeWrapper();<br />
element.parentNode.insertBefore(wrapper, element);<br />
}<br />
wrapper.appendChild(element);<br />
element = next;<br />
}<br />
}<br />
<br />
function updateSectionFromNote (section, note) {<br />
if (note.getAttribute('data-newin') !== null) {<br />
var version = note.getAttribute('data-newin');<br />
if (version.startsWith('[[')) {<br />
version = version.substring(2, version.length-2);<br />
}<br />
section.setAttribute('data-love-version-added', version);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.getAttribute('data-oldin') !== null) {<br />
var version = note.getAttribute('data-oldin');<br />
if (version.startsWith('[[')) {<br />
version = version.substring(2, version.length-2);<br />
}<br />
section.setAttribute('data-love-version-removed', version);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.getAttribute('data-deprecatedin') !== null) {<br />
var version = note.getAttribute('data-deprecatedin');<br />
if (version.startsWith('[[')) {<br />
version = version.substring(2, version.length-2);<br />
}<br />
section.setAttribute('data-love-version-deprecated', version);<br />
}<br />
}<br />
<br />
function QueryIterator (query) {<br />
return function (callback) {<br />
return array(document.querySelectorAll(query)).forEach(callback);<br />
}<br />
}<br />
<br />
var withSections = QueryIterator('*[data-love-filterable]');<br />
var withAdded = QueryIterator('*[data-love-version-added]');<br />
var withRemoved = QueryIterator('*[data-love-version-removed]');<br />
var withAddedRemoved = QueryIterator('*[data-love-version-added][data-love-version-removed]');<br />
var withDeprecated = QueryIterator('*[data-love-version-deprecated]');<br />
var withNotes = QueryIterator('*[data-love-version-note]');<br />
<br />
function hideNotes () {<br />
withNotes(function (note) { note.style.display = 'none' });<br />
}<br />
<br />
function showNotes () {<br />
withNotes(function (note) { note.style.display = null });<br />
}<br />
<br />
var needsFilter = false;<br />
<br />
function scanSections () {<br />
withSections(function (section) {<br />
var note = section.querySelector('table');<br />
if (!note) {<br />
return;<br />
}<br />
updateSectionFromNote(section, note);<br />
while (note.nextSibling && note.nextSibling.tagName == 'TABLE') {<br />
note = note.nextSibling;<br />
updateSectionFromNote(section, note);<br />
}<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
function scanTables () {<br />
var added = document.querySelectorAll('.smwtable *[alt="Added since"] + *');<br />
var removed = document.querySelectorAll('.smwtable *[alt="Removed in"] + *');<br />
var deprecated = document.querySelectorAll('.smwtable *[alt="Deprecated in"] + *');<br />
<br />
array(added).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-added', a.title);<br />
needsFilter = true;<br />
});<br />
array(removed).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-removed', a.title);<br />
needsFilter = true;<br />
});<br />
array(deprecated).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-deprecated', a.title);<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
// return true if 'installed' is greater than or equal to 'required'<br />
// http://stackoverflow.com/a/6832670<br />
function compareVersions (installed, required) {<br />
var a = installed.split('.');<br />
var b = required.split('.');<br />
<br />
for (var i = 0; i < a.length; ++i) {<br />
a[i] = Number(a[i]);<br />
}<br />
for (var i = 0; i < b.length; ++i) {<br />
b[i] = Number(b[i]);<br />
}<br />
if (a.length == 2) {<br />
a[2] = 0;<br />
}<br />
if (b.length == 2) {<br />
b[2] = 0;<br />
}<br />
<br />
if (a[0] > b[0]) return true;<br />
if (a[0] < b[0]) return false;<br />
<br />
if (a[1] > b[1]) return true;<br />
if (a[1] < b[1]) return false;<br />
<br />
if (a[2] > b[2]) return true;<br />
if (a[2] < b[2]) return false;<br />
<br />
return true;<br />
}<br />
<br />
function filterVersion (installed) {<br />
filterAll(hideNotes);<br />
withAdded(function (section) {<br />
var required = section.getAttribute('data-love-version-added');<br />
if (!compareVersions(installed, required)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withRemoved(function (section) {<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions (installed, removed)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed) && compareVersions(installed, added)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function filterAll (hideOrShowNotes) {<br />
hideOrShowNotes();<br />
withSections(function (section) { section.style.display = null });<br />
}<br />
<br />
function filterLatest () {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) { section.style.display = 'none' });<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function applyFilter (value) {<br />
storeValue('versionpicker-version', value);<br />
if (value == 'all') {<br />
filterAll(showNotes);<br />
return;<br />
}<br />
if (value == 'latest') {<br />
filterLatest();<br />
return;<br />
}<br />
filterVersion(value);<br />
}<br />
<br />
function injectFilterPicker () {<br />
var target = document.getElementById('ca-nstab-main').parentNode;<br />
<br />
picker.style.position = 'absolute';<br />
picker.style.right = 0;<br />
picker.style.margin = '0.25rem';<br />
picker.style.padding = '0.15rem';<br />
<br />
target.parentNode.insertBefore(picker, target);<br />
}<br />
<br />
function injectVersionTag (number, name) {<br />
injectPickerOption(number, 'Version ' + number + ': ' + name);<br />
}<br />
<br />
function injectVersionTags () {<br />
var versions = [<br />
{"version": "11.5", "codename": "Mysterious Mysteries"},<br />
{"version": "11.4", "codename": "Mysterious Mysteries"},<br />
{"version": "11.3", "codename": "Mysterious Mysteries"},<br />
{"version": "11.2", "codename": "Mysterious Mysteries"},<br />
{"version": "11.1", "codename": "Mysterious Mysteries"},<br />
{"version": "11.0", "codename": "Mysterious Mysteries"},<br />
{"version": "0.10.2", "codename": "Super Toast"},<br />
{"version": "0.10.1", "codename": "Super Toast"},<br />
{"version": "0.10.0", "codename": "Super Toast"},<br />
{"version": "0.9.2", "codename": "Baby Inspector"},<br />
{"version": "0.9.1", "codename": "Baby Inspector"},<br />
{"version": "0.9.0", "codename": "Baby Inspector"},<br />
{"version": "0.8.0", "codename": "Rubber Piggy"},<br />
{"version": "0.7.2", "codename": "Game Slave"},<br />
{"version": "0.7.1", "codename": "Game Slave"},<br />
{"version": "0.7.0", "codename": "Game Slave"},<br />
{"version": "0.6.2", "codename": "Jiggly Juice"},<br />
{"version": "0.6.1", "codename": "Jiggly Juice"},<br />
{"version": "0.6.0", "codename": "Jiggly Juice"},<br />
{"version": "0.5.0", "codename": "Salted Nuts"},<br />
{"version": "0.4.0", "codename": "Taco Beam"},<br />
{"version": "0.3.2", "codename": "Lemony Fresh"},<br />
{"version": "0.3.1", "codename": "Space Meat"},<br />
{"version": "0.3.0", "codename": "Mutant Vermin"},<br />
{"version": "0.2.1", "codename": "Impending Doom"},<br />
{"version": "0.2.0", "codename": "Mini Moose"},<br />
{"version": "0.1.1", "codename": "Santa Power"}<br />
]<br />
<br />
for (var i = 0; i < versions.length; i++) {<br />
injectVersionTag(versions[i].version, versions[i].codename);<br />
}<br />
}<br />
<br />
function setPicker (target) {<br />
for (var i = 0; i < picker.options.length; ++i) {<br />
if (picker.options[i].value === target) {<br />
picker.selectedIndex = i;<br />
picker.onchange();<br />
break;<br />
}<br />
}<br />
}<br />
<br />
function main () {<br />
wrapSections();<br />
scanSections();<br />
scanTables();<br />
injectPickerOption('all', 'All Versions');<br />
injectPickerOption('latest', 'Latest Version');<br />
injectVersionTags();<br />
injectFilterPicker();<br />
var target = retrieveValue('versionpicker-version');<br />
if (target !== undefined) {<br />
setPicker(target);<br />
}<br />
}<br />
<br />
main();<br />
}<br />
<br />
versionpicker();</div>
Bartbes
http://www.love2d.org/w/index.php?title=Template:deprecatedin&diff=29120
Template:deprecatedin
2024-03-10T14:54:22Z
<p>Bartbes: Add data-deprecatedin, for the version picker</p>
<hr />
<div><includeonly>{|bgcolor='#ffc7ac' style='margin-top: 1em; padding: 3px; border-radius:5px; -moz-border-radius:5px;' data-deprecatedin='{{{1}}}'<br />
|'' '''Deprecated in LÖVE {{{1}}}''' ''<br />
|-<br />
| <small>{{#if: {{{text|}}} |{{{text}}}|{{#if: {{{type|}}} |{{#if: {{{plural|}}} |These|This}} {{{type}}} |It}} {{#if: {{{plural|}}}|are|is}} deprecated and will be removed in a future version}}.</small><br />
|}<br />
{{#switch: {{{type}}} | callback | module | enum | function | method | type = {{#if: {{{2|}}}|{{#set:Deprecated={{{2}}}}}}}{{#if: {{{1|}}}|{{#set:PrettyDeprecated={{{1}}}}}}}|}}</includeonly><noinclude><br />
{{documentation}}<br />
[[Category:Templates]]<br />
</noinclude></div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Love.js&diff=29119
MediaWiki:Love.js
2024-03-10T14:31:11Z
<p>Bartbes: Mark deprecated functions with html attribute, but apply no styling yet</p>
<hr />
<div>// Source on github: https://github.com/love2d/love-wiki-version-picker<br />
function versionpicker() {<br />
var picker = document.createElement('select');<br />
<br />
picker.onchange = function () {<br />
applyFilter(this.options[this.selectedIndex].value);<br />
}<br />
<br />
function array (a) {<br />
return [].slice.apply(a || []);<br />
}<br />
<br />
// Some helpers for localStorage, basically resort to doing nothing<br />
// if it isn't available.<br />
function storeValue(name, value) {<br />
try {<br />
localStorage[name] = value;<br />
}<br />
catch (e) {<br />
}<br />
}<br />
<br />
function retrieveValue(name) {<br />
try {<br />
return localStorage[name];<br />
}<br />
catch (e) {<br />
return undefined;<br />
}<br />
}<br />
<br />
var pickerVersions = {};<br />
<br />
function injectPickerOption (version, text) {<br />
if (pickerVersions[version]) {<br />
return;<br />
}<br />
pickerVersions[version] = true;<br />
<br />
var option = document.createElement('option');<br />
<br />
option.value = version;<br />
option.textContent = text;<br />
picker.appendChild(option);<br />
}<br />
<br />
function makeWrapper () {<br />
var wrapper = document.createElement('div');<br />
<br />
wrapper.setAttribute('data-love-filterable', true);<br />
<br />
return wrapper;<br />
}<br />
<br />
function wrapSections () {<br />
var element = document.querySelector('.mw-parser-output > h2');<br />
var wrapper;<br />
<br />
while (element) {<br />
var next = element.nextSibling;<br />
if (element.nodeName == 'H2') {<br />
wrapper = makeWrapper();<br />
element.parentNode.insertBefore(wrapper, element);<br />
}<br />
wrapper.appendChild(element);<br />
element = next;<br />
}<br />
}<br />
<br />
function updateSectionFromNote (section, note) {<br />
if (note.textContent.match(/available since/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-added', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.textContent.match(/removed in/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-removed', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.textContent.match(/deprecated in/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-deprecated', a.title);<br />
}<br />
}<br />
<br />
function QueryIterator (query) {<br />
return function (callback) {<br />
return array(document.querySelectorAll(query)).forEach(callback);<br />
}<br />
}<br />
<br />
var withSections = QueryIterator('*[data-love-filterable]');<br />
var withAdded = QueryIterator('*[data-love-version-added]');<br />
var withRemoved = QueryIterator('*[data-love-version-removed]');<br />
var withAddedRemoved = QueryIterator('*[data-love-version-added][data-love-version-removed]');<br />
var withDeprecated = QueryIterator('*[data-love-version-deprecated]');<br />
var withNotes = QueryIterator('*[data-love-version-note]');<br />
<br />
function hideNotes () {<br />
withNotes(function (note) { note.style.display = 'none' });<br />
}<br />
<br />
function showNotes () {<br />
withNotes(function (note) { note.style.display = null });<br />
}<br />
<br />
var needsFilter = false;<br />
<br />
function scanSections () {<br />
withSections(function (section) {<br />
var note = section.querySelector('table');<br />
if (!note) {<br />
return;<br />
}<br />
updateSectionFromNote(section, note);<br />
while (note.nextSibling && note.nextSibling.tagName == 'TABLE') {<br />
note = note.nextSibling;<br />
updateSectionFromNote(section, note);<br />
}<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
function scanTables () {<br />
var added = document.querySelectorAll('.smwtable *[alt="Added since"] + *');<br />
var removed = document.querySelectorAll('.smwtable *[alt="Removed in"] + *');<br />
var deprecated = document.querySelectorAll('.smwtable *[alt="Deprecated in"] + *');<br />
<br />
array(added).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-added', a.title);<br />
needsFilter = true;<br />
});<br />
array(removed).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-removed', a.title);<br />
needsFilter = true;<br />
});<br />
array(deprecated).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-deprecated', a.title);<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
// return true if 'installed' is greater than or equal to 'required'<br />
// http://stackoverflow.com/a/6832670<br />
function compareVersions (installed, required) {<br />
var a = installed.split('.');<br />
var b = required.split('.');<br />
<br />
for (var i = 0; i < a.length; ++i) {<br />
a[i] = Number(a[i]);<br />
}<br />
for (var i = 0; i < b.length; ++i) {<br />
b[i] = Number(b[i]);<br />
}<br />
if (a.length == 2) {<br />
a[2] = 0;<br />
}<br />
if (b.length == 2) {<br />
b[2] = 0;<br />
}<br />
<br />
if (a[0] > b[0]) return true;<br />
if (a[0] < b[0]) return false;<br />
<br />
if (a[1] > b[1]) return true;<br />
if (a[1] < b[1]) return false;<br />
<br />
if (a[2] > b[2]) return true;<br />
if (a[2] < b[2]) return false;<br />
<br />
return true;<br />
}<br />
<br />
function filterVersion (installed) {<br />
filterAll(hideNotes);<br />
withAdded(function (section) {<br />
var required = section.getAttribute('data-love-version-added');<br />
if (!compareVersions(installed, required)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withRemoved(function (section) {<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions (installed, removed)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed) && compareVersions(installed, added)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function filterAll (hideOrShowNotes) {<br />
hideOrShowNotes();<br />
withSections(function (section) { section.style.display = null });<br />
}<br />
<br />
function filterLatest () {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) { section.style.display = 'none' });<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function applyFilter (value) {<br />
storeValue('versionpicker-version', value);<br />
if (value == 'all') {<br />
filterAll(showNotes);<br />
return;<br />
}<br />
if (value == 'latest') {<br />
filterLatest();<br />
return;<br />
}<br />
filterVersion(value);<br />
}<br />
<br />
function injectFilterPicker () {<br />
var target = document.getElementById('ca-nstab-main').parentNode;<br />
<br />
picker.style.position = 'absolute';<br />
picker.style.right = 0;<br />
picker.style.margin = '0.25rem';<br />
picker.style.padding = '0.15rem';<br />
<br />
target.parentNode.insertBefore(picker, target);<br />
}<br />
<br />
function injectVersionTag (number, name) {<br />
injectPickerOption(number, 'Version ' + number + ': ' + name);<br />
}<br />
<br />
function injectVersionTags () {<br />
var versions = [<br />
{"version": "11.5", "codename": "Mysterious Mysteries"},<br />
{"version": "11.4", "codename": "Mysterious Mysteries"},<br />
{"version": "11.3", "codename": "Mysterious Mysteries"},<br />
{"version": "11.2", "codename": "Mysterious Mysteries"},<br />
{"version": "11.1", "codename": "Mysterious Mysteries"},<br />
{"version": "11.0", "codename": "Mysterious Mysteries"},<br />
{"version": "0.10.2", "codename": "Super Toast"},<br />
{"version": "0.10.1", "codename": "Super Toast"},<br />
{"version": "0.10.0", "codename": "Super Toast"},<br />
{"version": "0.9.2", "codename": "Baby Inspector"},<br />
{"version": "0.9.1", "codename": "Baby Inspector"},<br />
{"version": "0.9.0", "codename": "Baby Inspector"},<br />
{"version": "0.8.0", "codename": "Rubber Piggy"},<br />
{"version": "0.7.2", "codename": "Game Slave"},<br />
{"version": "0.7.1", "codename": "Game Slave"},<br />
{"version": "0.7.0", "codename": "Game Slave"},<br />
{"version": "0.6.2", "codename": "Jiggly Juice"},<br />
{"version": "0.6.1", "codename": "Jiggly Juice"},<br />
{"version": "0.6.0", "codename": "Jiggly Juice"},<br />
{"version": "0.5.0", "codename": "Salted Nuts"},<br />
{"version": "0.4.0", "codename": "Taco Beam"},<br />
{"version": "0.3.2", "codename": "Lemony Fresh"},<br />
{"version": "0.3.1", "codename": "Space Meat"},<br />
{"version": "0.3.0", "codename": "Mutant Vermin"},<br />
{"version": "0.2.1", "codename": "Impending Doom"},<br />
{"version": "0.2.0", "codename": "Mini Moose"},<br />
{"version": "0.1.1", "codename": "Santa Power"}<br />
]<br />
<br />
for (var i = 0; i < versions.length; i++) {<br />
injectVersionTag(versions[i].version, versions[i].codename);<br />
}<br />
}<br />
<br />
function setPicker (target) {<br />
for (var i = 0; i < picker.options.length; ++i) {<br />
if (picker.options[i].value === target) {<br />
picker.selectedIndex = i;<br />
picker.onchange();<br />
break;<br />
}<br />
}<br />
}<br />
<br />
function main () {<br />
wrapSections();<br />
scanSections();<br />
scanTables();<br />
injectPickerOption('all', 'All Versions');<br />
injectPickerOption('latest', 'Latest Version');<br />
injectVersionTags();<br />
injectFilterPicker();<br />
var target = retrieveValue('versionpicker-version');<br />
if (target !== undefined) {<br />
setPicker(target);<br />
}<br />
}<br />
<br />
main();<br />
}<br />
<br />
versionpicker();</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Love.js&diff=29020
MediaWiki:Love.js
2023-12-03T13:04:15Z
<p>Bartbes: Update for 11.5</p>
<hr />
<div>// Source on github: https://github.com/love2d/love-wiki-version-picker<br />
function versionpicker() {<br />
var picker = document.createElement('select');<br />
<br />
picker.onchange = function () {<br />
applyFilter(this.options[this.selectedIndex].value);<br />
}<br />
<br />
function array (a) {<br />
return [].slice.apply(a || []);<br />
}<br />
<br />
// Some helpers for localStorage, basically resort to doing nothing<br />
// if it isn't available.<br />
function storeValue(name, value) {<br />
try {<br />
localStorage[name] = value;<br />
}<br />
catch (e) {<br />
}<br />
}<br />
<br />
function retrieveValue(name) {<br />
try {<br />
return localStorage[name];<br />
}<br />
catch (e) {<br />
return undefined;<br />
}<br />
}<br />
<br />
var pickerVersions = {};<br />
<br />
function injectPickerOption (version, text) {<br />
if (pickerVersions[version]) {<br />
return;<br />
}<br />
pickerVersions[version] = true;<br />
<br />
var option = document.createElement('option');<br />
<br />
option.value = version;<br />
option.textContent = text;<br />
picker.appendChild(option);<br />
}<br />
<br />
function makeWrapper () {<br />
var wrapper = document.createElement('div');<br />
<br />
wrapper.setAttribute('data-love-filterable', true);<br />
<br />
return wrapper;<br />
}<br />
<br />
function wrapSections () {<br />
var element = document.querySelector('.mw-parser-output > h2');<br />
var wrapper;<br />
<br />
while (element) {<br />
var next = element.nextSibling;<br />
if (element.nodeName == 'H2') {<br />
wrapper = makeWrapper();<br />
element.parentNode.insertBefore(wrapper, element);<br />
}<br />
wrapper.appendChild(element);<br />
element = next;<br />
}<br />
}<br />
<br />
function updateSectionFromNote (section, note) {<br />
if (note.textContent.match(/available since/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-added', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.textContent.match(/removed in/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-removed', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
}<br />
<br />
function QueryIterator (query) {<br />
return function (callback) {<br />
return array(document.querySelectorAll(query)).forEach(callback);<br />
}<br />
}<br />
<br />
var withSections = QueryIterator('*[data-love-filterable]');<br />
var withAdded = QueryIterator('*[data-love-version-added]');<br />
var withRemoved = QueryIterator('*[data-love-version-removed]');<br />
var withAddedRemoved = QueryIterator('*[data-love-version-added][data-love-version-removed]');<br />
var withNotes = QueryIterator('*[data-love-version-note]');<br />
<br />
function hideNotes () {<br />
withNotes(function (note) { note.style.display = 'none' });<br />
}<br />
<br />
function showNotes () {<br />
withNotes(function (note) { note.style.display = null });<br />
}<br />
<br />
var needsFilter = false;<br />
<br />
function scanSections () {<br />
withSections(function (section) {<br />
var note = section.querySelector('table');<br />
if (!note) {<br />
return;<br />
}<br />
updateSectionFromNote(section, note);<br />
while (note.nextSibling && note.nextSibling.tagName == 'TABLE') {<br />
note = note.nextSibling;<br />
updateSectionFromNote(section, note);<br />
}<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
function scanTables () {<br />
var added = document.querySelectorAll('.smwtable *[alt="Added since"] + *');<br />
var removed = document.querySelectorAll('.smwtable *[alt="Removed in"] + *');<br />
<br />
array(added).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-added', a.title);<br />
needsFilter = true;<br />
});<br />
array(removed).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-removed', a.title);<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
// return true if 'installed' is greater than or equal to 'required'<br />
// http://stackoverflow.com/a/6832670<br />
function compareVersions (installed, required) {<br />
var a = installed.split('.');<br />
var b = required.split('.');<br />
<br />
for (var i = 0; i < a.length; ++i) {<br />
a[i] = Number(a[i]);<br />
}<br />
for (var i = 0; i < b.length; ++i) {<br />
b[i] = Number(b[i]);<br />
}<br />
if (a.length == 2) {<br />
a[2] = 0;<br />
}<br />
if (b.length == 2) {<br />
b[2] = 0;<br />
}<br />
<br />
if (a[0] > b[0]) return true;<br />
if (a[0] < b[0]) return false;<br />
<br />
if (a[1] > b[1]) return true;<br />
if (a[1] < b[1]) return false;<br />
<br />
if (a[2] > b[2]) return true;<br />
if (a[2] < b[2]) return false;<br />
<br />
return true;<br />
}<br />
<br />
function filterVersion (installed) {<br />
filterAll(hideNotes);<br />
withAdded(function (section) {<br />
var required = section.getAttribute('data-love-version-added');<br />
if (!compareVersions(installed, required)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withRemoved(function (section) {<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions (installed, removed)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed) && compareVersions(installed, added)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function filterAll (hideOrShowNotes) {<br />
hideOrShowNotes();<br />
withSections(function (section) { section.style.display = null });<br />
}<br />
<br />
function filterLatest () {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) { section.style.display = 'none' });<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function applyFilter (value) {<br />
storeValue('versionpicker-version', value);<br />
if (value == 'all') {<br />
filterAll(showNotes);<br />
return;<br />
}<br />
if (value == 'latest') {<br />
filterLatest();<br />
return;<br />
}<br />
filterVersion(value);<br />
}<br />
<br />
function injectFilterPicker () {<br />
var target = document.getElementById('ca-nstab-main').parentNode;<br />
<br />
picker.style.position = 'absolute';<br />
picker.style.right = 0;<br />
picker.style.margin = '0.25rem';<br />
picker.style.padding = '0.15rem';<br />
<br />
target.parentNode.insertBefore(picker, target);<br />
}<br />
<br />
function injectVersionTag (number, name) {<br />
injectPickerOption(number, 'Version ' + number + ': ' + name);<br />
}<br />
<br />
function injectVersionTags () {<br />
var versions = [<br />
{"version": "11.5", "codename": "Mysterious Mysteries"},<br />
{"version": "11.4", "codename": "Mysterious Mysteries"},<br />
{"version": "11.3", "codename": "Mysterious Mysteries"},<br />
{"version": "11.2", "codename": "Mysterious Mysteries"},<br />
{"version": "11.1", "codename": "Mysterious Mysteries"},<br />
{"version": "11.0", "codename": "Mysterious Mysteries"},<br />
{"version": "0.10.2", "codename": "Super Toast"},<br />
{"version": "0.10.1", "codename": "Super Toast"},<br />
{"version": "0.10.0", "codename": "Super Toast"},<br />
{"version": "0.9.2", "codename": "Baby Inspector"},<br />
{"version": "0.9.1", "codename": "Baby Inspector"},<br />
{"version": "0.9.0", "codename": "Baby Inspector"},<br />
{"version": "0.8.0", "codename": "Rubber Piggy"},<br />
{"version": "0.7.2", "codename": "Game Slave"},<br />
{"version": "0.7.1", "codename": "Game Slave"},<br />
{"version": "0.7.0", "codename": "Game Slave"},<br />
{"version": "0.6.2", "codename": "Jiggly Juice"},<br />
{"version": "0.6.1", "codename": "Jiggly Juice"},<br />
{"version": "0.6.0", "codename": "Jiggly Juice"},<br />
{"version": "0.5.0", "codename": "Salted Nuts"},<br />
{"version": "0.4.0", "codename": "Taco Beam"},<br />
{"version": "0.3.2", "codename": "Lemony Fresh"},<br />
{"version": "0.3.1", "codename": "Space Meat"},<br />
{"version": "0.3.0", "codename": "Mutant Vermin"},<br />
{"version": "0.2.1", "codename": "Impending Doom"},<br />
{"version": "0.2.0", "codename": "Mini Moose"},<br />
{"version": "0.1.1", "codename": "Santa Power"}<br />
]<br />
<br />
for (var i = 0; i < versions.length; i++) {<br />
injectVersionTag(versions[i].version, versions[i].codename);<br />
}<br />
}<br />
<br />
function queryVersionTags () {<br />
var url = '/w/index.php?title=Version_History&action=raw';<br />
var xhr = new XMLHttpRequest();<br />
xhr.onload = function () {<br />
var re = /\[\[([\d.]+)\]\][^\n]*\n[^\|]*\|(.*)\n/gm;<br />
var m;<br />
<br />
while (m = re.exec(this.responseText)) {<br />
injectVersionTag(m[1], m[2]);<br />
}<br />
}<br />
xhr.open('get', url, true);<br />
xhr.send();<br />
}<br />
<br />
function setPicker (target) {<br />
for (var i = 0; i < picker.options.length; ++i) {<br />
if (picker.options[i].value === target) {<br />
picker.selectedIndex = i;<br />
picker.onchange();<br />
break;<br />
}<br />
}<br />
}<br />
<br />
function main () {<br />
wrapSections();<br />
scanSections();<br />
scanTables();<br />
injectPickerOption('all', 'All Versions');<br />
injectPickerOption('latest', 'Latest Version');<br />
injectVersionTags();<br />
injectFilterPicker();<br />
var target = retrieveValue('versionpicker-version');<br />
if (target !== undefined) {<br />
setPicker(target);<br />
}<br />
}<br />
<br />
main();<br />
}<br />
<br />
versionpicker();</div>
Bartbes
http://www.love2d.org/w/index.php?title=Template:CURRENTLOVE&diff=29019
Template:CURRENTLOVE
2023-12-03T13:00:27Z
<p>Bartbes: Update for 11.5</p>
<hr />
<div>115</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Love.js&diff=27348
MediaWiki:Love.js
2022-01-04T15:49:31Z
<p>Bartbes: Update for 11.4</p>
<hr />
<div>// Source on github: https://github.com/love2d/love-wiki-version-picker<br />
function versionpicker() {<br />
var picker = document.createElement('select');<br />
<br />
picker.onchange = function () {<br />
applyFilter(this.options[this.selectedIndex].value);<br />
}<br />
<br />
function array (a) {<br />
return [].slice.apply(a || []);<br />
}<br />
<br />
// Some helpers for localStorage, basically resort to doing nothing<br />
// if it isn't available.<br />
function storeValue(name, value) {<br />
try {<br />
localStorage[name] = value;<br />
}<br />
catch (e) {<br />
}<br />
}<br />
<br />
function retrieveValue(name) {<br />
try {<br />
return localStorage[name];<br />
}<br />
catch (e) {<br />
return undefined;<br />
}<br />
}<br />
<br />
var pickerVersions = {};<br />
<br />
function injectPickerOption (version, text) {<br />
if (pickerVersions[version]) {<br />
return;<br />
}<br />
pickerVersions[version] = true;<br />
<br />
var option = document.createElement('option');<br />
<br />
option.value = version;<br />
option.textContent = text;<br />
picker.appendChild(option);<br />
}<br />
<br />
function makeWrapper () {<br />
var wrapper = document.createElement('div');<br />
<br />
wrapper.setAttribute('data-love-filterable', true);<br />
<br />
return wrapper;<br />
}<br />
<br />
function wrapSections () {<br />
var element = document.querySelector('h2');<br />
var wrapper;<br />
<br />
while (element) {<br />
var next = element.nextSibling;<br />
if (element.nodeName == 'H2') {<br />
wrapper = makeWrapper();<br />
element.parentNode.insertBefore(wrapper, element);<br />
}<br />
wrapper.appendChild(element);<br />
element = next;<br />
}<br />
}<br />
<br />
function updateSectionFromNote (section, note) {<br />
if (note.textContent.match(/available since/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-added', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.textContent.match(/removed in/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-removed', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
}<br />
<br />
function QueryIterator (query) {<br />
return function (callback) {<br />
return array(document.querySelectorAll(query)).forEach(callback);<br />
}<br />
}<br />
<br />
var withSections = QueryIterator('*[data-love-filterable]');<br />
var withAdded = QueryIterator('*[data-love-version-added]');<br />
var withRemoved = QueryIterator('*[data-love-version-removed]');<br />
var withAddedRemoved = QueryIterator('*[data-love-version-added][data-love-version-removed]');<br />
var withNotes = QueryIterator('*[data-love-version-note]');<br />
<br />
function hideNotes () {<br />
withNotes(function (note) { note.style.display = 'none' });<br />
}<br />
<br />
function showNotes () {<br />
withNotes(function (note) { note.style.display = null });<br />
}<br />
<br />
var needsFilter = false;<br />
<br />
function scanSections () {<br />
withSections(function (section) {<br />
var note = section.querySelector('table');<br />
if (!note) {<br />
return;<br />
}<br />
updateSectionFromNote(section, note);<br />
while (note.nextSibling && note.nextSibling.tagName == 'TABLE') {<br />
note = note.nextSibling;<br />
updateSectionFromNote(section, note);<br />
}<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
function scanTables () {<br />
var added = document.querySelectorAll('.smwtable *[alt="Added since"] + *');<br />
var removed = document.querySelectorAll('.smwtable *[alt="Removed in"] + *');<br />
<br />
array(added).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-added', a.title);<br />
needsFilter = true;<br />
});<br />
array(removed).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-removed', a.title);<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
// return true if 'installed' is greater than or equal to 'required'<br />
// http://stackoverflow.com/a/6832670<br />
function compareVersions (installed, required) {<br />
var a = installed.split('.');<br />
var b = required.split('.');<br />
<br />
for (var i = 0; i < a.length; ++i) {<br />
a[i] = Number(a[i]);<br />
}<br />
for (var i = 0; i < b.length; ++i) {<br />
b[i] = Number(b[i]);<br />
}<br />
if (a.length == 2) {<br />
a[2] = 0;<br />
}<br />
if (b.length == 2) {<br />
b[2] = 0;<br />
}<br />
<br />
if (a[0] > b[0]) return true;<br />
if (a[0] < b[0]) return false;<br />
<br />
if (a[1] > b[1]) return true;<br />
if (a[1] < b[1]) return false;<br />
<br />
if (a[2] > b[2]) return true;<br />
if (a[2] < b[2]) return false;<br />
<br />
return true;<br />
}<br />
<br />
function filterVersion (installed) {<br />
filterAll(hideNotes);<br />
withAdded(function (section) {<br />
var required = section.getAttribute('data-love-version-added');<br />
if (!compareVersions(installed, required)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withRemoved(function (section) {<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions (installed, removed)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed) && compareVersions(installed, added)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function filterAll (hideOrShowNotes) {<br />
hideOrShowNotes();<br />
withSections(function (section) { section.style.display = null });<br />
}<br />
<br />
function filterLatest () {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) { section.style.display = 'none' });<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function applyFilter (value) {<br />
storeValue('versionpicker-version', value);<br />
if (value == 'all') {<br />
filterAll(showNotes);<br />
return;<br />
}<br />
if (value == 'latest') {<br />
filterLatest();<br />
return;<br />
}<br />
filterVersion(value);<br />
}<br />
<br />
function injectFilterPicker () {<br />
var target = document.getElementById('ca-nstab-main').parentNode;<br />
<br />
picker.style.position = 'absolute';<br />
picker.style.right = 0;<br />
picker.style.margin = '0.25rem';<br />
picker.style.padding = '0.15rem';<br />
<br />
target.parentNode.insertBefore(picker, target);<br />
}<br />
<br />
function injectVersionTag (number, name) {<br />
injectPickerOption(number, 'Version ' + number + ': ' + name);<br />
}<br />
<br />
function injectVersionTags () {<br />
var versions = [<br />
{"version": "11.4", "codename": "Mysterious Mysteries"},<br />
{"version": "11.3", "codename": "Mysterious Mysteries"},<br />
{"version": "11.2", "codename": "Mysterious Mysteries"},<br />
{"version": "11.1", "codename": "Mysterious Mysteries"},<br />
{"version": "11.0", "codename": "Mysterious Mysteries"},<br />
{"version": "0.10.2", "codename": "Super Toast"},<br />
{"version": "0.10.1", "codename": "Super Toast"},<br />
{"version": "0.10.0", "codename": "Super Toast"},<br />
{"version": "0.9.2", "codename": "Baby Inspector"},<br />
{"version": "0.9.1", "codename": "Baby Inspector"},<br />
{"version": "0.9.0", "codename": "Baby Inspector"},<br />
{"version": "0.8.0", "codename": "Rubber Piggy"},<br />
{"version": "0.7.2", "codename": "Game Slave"},<br />
{"version": "0.7.1", "codename": "Game Slave"},<br />
{"version": "0.7.0", "codename": "Game Slave"},<br />
{"version": "0.6.2", "codename": "Jiggly Juice"},<br />
{"version": "0.6.1", "codename": "Jiggly Juice"},<br />
{"version": "0.6.0", "codename": "Jiggly Juice"},<br />
{"version": "0.5.0", "codename": "Salted Nuts"},<br />
{"version": "0.4.0", "codename": "Taco Beam"},<br />
{"version": "0.3.2", "codename": "Lemony Fresh"},<br />
{"version": "0.3.1", "codename": "Space Meat"},<br />
{"version": "0.3.0", "codename": "Mutant Vermin"},<br />
{"version": "0.2.1", "codename": "Impending Doom"},<br />
{"version": "0.2.0", "codename": "Mini Moose"},<br />
{"version": "0.1.1", "codename": "Santa Power"}<br />
]<br />
<br />
for (var i = 0; i < versions.length; i++) {<br />
injectVersionTag(versions[i].version, versions[i].codename);<br />
}<br />
}<br />
<br />
function queryVersionTags () {<br />
var url = '/w/index.php?title=Version_History&action=raw';<br />
var xhr = new XMLHttpRequest();<br />
xhr.onload = function () {<br />
var re = /\[\[([\d.]+)\]\][^\n]*\n[^\|]*\|(.*)\n/gm;<br />
var m;<br />
<br />
while (m = re.exec(this.responseText)) {<br />
injectVersionTag(m[1], m[2]);<br />
}<br />
}<br />
xhr.open('get', url, true);<br />
xhr.send();<br />
}<br />
<br />
function setPicker (target) {<br />
for (var i = 0; i < picker.options.length; ++i) {<br />
if (picker.options[i].value === target) {<br />
picker.selectedIndex = i;<br />
picker.onchange();<br />
break;<br />
}<br />
}<br />
}<br />
<br />
function main () {<br />
wrapSections();<br />
scanSections();<br />
scanTables();<br />
injectPickerOption('all', 'All Versions');<br />
injectPickerOption('latest', 'Latest Version');<br />
injectVersionTags();<br />
injectFilterPicker();<br />
var target = retrieveValue('versionpicker-version');<br />
if (target !== undefined) {<br />
setPicker(target);<br />
}<br />
}<br />
<br />
main();<br />
}<br />
<br />
versionpicker();</div>
Bartbes
http://www.love2d.org/w/index.php?title=Template:CURRENTLOVE&diff=27346
Template:CURRENTLOVE
2022-01-02T14:14:18Z
<p>Bartbes: Update for 11.4</p>
<hr />
<div>114</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Sidebar&diff=25211
MediaWiki:Sidebar
2020-03-11T17:04:42Z
<p>Bartbes: Update issue tracker link</p>
<hr />
<div>* documentation<br />
** love|love<br />
** love.audio|love.audio<br />
** love.data|love.data<br />
** love.event|love.event<br />
** love.filesystem|love.filesystem<br />
** love.font|love.font<br />
** love.graphics|love.graphics<br />
** love.image|love.image<br />
** love.joystick|love.joystick<br />
** love.keyboard|love.keyboard<br />
** love.math|love.math<br />
** love.mouse|love.mouse<br />
** love.physics|love.physics<br />
** love.sound|love.sound<br />
** love.system|love.system<br />
** love.thread|love.thread<br />
** love.timer|love.timer<br />
** love.touch|love.touch<br />
** love.video|love.video<br />
** love.window|love.window<br />
** lua-enet|lua-enet<br />
** socket|luasocket<br />
** utf8|utf8<br />
* navigation<br />
** https://love2d.org/|Home<br />
** https://love2d.org/forums/|Forums<br />
** https://github.com/love2d/love/issues|Issue tracker<br />
* wiki navigation<br />
** mainpage|mainpage-description<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
* SEARCH<br />
* TOOLBOX</div>
Bartbes
http://www.love2d.org/w/index.php?title=Template:CURRENTLOVE&diff=23736
Template:CURRENTLOVE
2019-10-27T15:35:49Z
<p>Bartbes: Update for 11.3</p>
<hr />
<div>113</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Love.js&diff=23735
MediaWiki:Love.js
2019-10-27T15:35:35Z
<p>Bartbes: Update for 11.3</p>
<hr />
<div>// Source on github: https://github.com/airstruck/love-wiki-version-picker<br />
function versionpicker() {<br />
var picker = document.createElement('select');<br />
<br />
picker.onchange = function () {<br />
applyFilter(this.options[this.selectedIndex].value);<br />
}<br />
<br />
function array (a) {<br />
return [].slice.apply(a || []);<br />
}<br />
<br />
// Some helpers for localStorage, basically resort to doing nothing<br />
// if it isn't available.<br />
function storeValue(name, value) {<br />
try {<br />
localStorage[name] = value;<br />
}<br />
catch (e) {<br />
}<br />
}<br />
<br />
function retrieveValue(name) {<br />
try {<br />
return localStorage[name];<br />
}<br />
catch (e) {<br />
return undefined;<br />
}<br />
}<br />
<br />
var pickerVersions = {};<br />
<br />
function injectPickerOption (version, text) {<br />
if (pickerVersions[version]) {<br />
return;<br />
}<br />
pickerVersions[version] = true;<br />
<br />
var option = document.createElement('option');<br />
<br />
option.value = version;<br />
option.textContent = text;<br />
picker.appendChild(option);<br />
}<br />
<br />
function makeWrapper () {<br />
var wrapper = document.createElement('div');<br />
<br />
wrapper.setAttribute('data-love-filterable', true);<br />
<br />
return wrapper;<br />
}<br />
<br />
function wrapSections () {<br />
var element = document.querySelector('h2');<br />
var wrapper;<br />
<br />
while (element) {<br />
var next = element.nextSibling;<br />
if (element.nodeName == 'H2') {<br />
wrapper = makeWrapper();<br />
element.parentNode.insertBefore(wrapper, element);<br />
}<br />
wrapper.appendChild(element);<br />
element = next;<br />
}<br />
}<br />
<br />
function updateSectionFromNote (section, note) {<br />
if (note.textContent.match(/available since/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-added', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.textContent.match(/removed in/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-removed', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
}<br />
<br />
function QueryIterator (query) {<br />
return function (callback) {<br />
return array(document.querySelectorAll(query)).forEach(callback);<br />
}<br />
}<br />
<br />
var withSections = QueryIterator('*[data-love-filterable]');<br />
var withAdded = QueryIterator('*[data-love-version-added]');<br />
var withRemoved = QueryIterator('*[data-love-version-removed]');<br />
var withAddedRemoved = QueryIterator('*[data-love-version-added][data-love-version-removed]');<br />
var withNotes = QueryIterator('*[data-love-version-note]');<br />
<br />
function hideNotes () {<br />
withNotes(function (note) { note.style.display = 'none' });<br />
}<br />
<br />
function showNotes () {<br />
withNotes(function (note) { note.style.display = null });<br />
}<br />
<br />
var needsFilter = false;<br />
<br />
function scanSections () {<br />
withSections(function (section) {<br />
var note = section.querySelector('table');<br />
if (!note) {<br />
return;<br />
}<br />
updateSectionFromNote(section, note);<br />
while (note.nextSibling && note.nextSibling.tagName == 'TABLE') {<br />
note = note.nextSibling;<br />
updateSectionFromNote(section, note);<br />
}<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
function scanTables () {<br />
var added = document.querySelectorAll('.smwtable *[alt="Added since"] + *');<br />
var removed = document.querySelectorAll('.smwtable *[alt="Removed in"] + *');<br />
<br />
array(added).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-added', a.title);<br />
needsFilter = true;<br />
});<br />
array(removed).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-removed', a.title);<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
// return true if 'installed' is greater than or equal to 'required'<br />
// http://stackoverflow.com/a/6832670<br />
function compareVersions (installed, required) {<br />
var a = installed.split('.');<br />
var b = required.split('.');<br />
<br />
for (var i = 0; i < a.length; ++i) {<br />
a[i] = Number(a[i]);<br />
}<br />
for (var i = 0; i < b.length; ++i) {<br />
b[i] = Number(b[i]);<br />
}<br />
if (a.length == 2) {<br />
a[2] = 0;<br />
}<br />
if (b.length == 2) {<br />
b[2] = 0;<br />
}<br />
<br />
if (a[0] > b[0]) return true;<br />
if (a[0] < b[0]) return false;<br />
<br />
if (a[1] > b[1]) return true;<br />
if (a[1] < b[1]) return false;<br />
<br />
if (a[2] > b[2]) return true;<br />
if (a[2] < b[2]) return false;<br />
<br />
return true;<br />
}<br />
<br />
function filterVersion (installed) {<br />
filterAll(hideNotes);<br />
withAdded(function (section) {<br />
var required = section.getAttribute('data-love-version-added');<br />
if (!compareVersions(installed, required)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withRemoved(function (section) {<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions (installed, removed)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed) && compareVersions(installed, added)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function filterAll (hideOrShowNotes) {<br />
hideOrShowNotes();<br />
withSections(function (section) { section.style.display = null });<br />
}<br />
<br />
function filterLatest () {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) { section.style.display = 'none' });<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function applyFilter (value) {<br />
storeValue('versionpicker-version', value);<br />
if (value == 'all') {<br />
filterAll(showNotes);<br />
return;<br />
}<br />
if (value == 'latest') {<br />
filterLatest();<br />
return;<br />
}<br />
filterVersion(value);<br />
}<br />
<br />
function injectFilterPicker () {<br />
var target = document.getElementById('ca-nstab-main').parentNode;<br />
<br />
picker.style.position = 'absolute';<br />
picker.style.right = 0;<br />
picker.style.height = target.parentNode.offsetHeight - 8 + 'px';<br />
picker.style.margin = '4px';<br />
<br />
target.parentNode.insertBefore(picker, target);<br />
}<br />
<br />
function injectVersionTag (number, name) {<br />
injectPickerOption(number, 'Version ' + number + ': ' + name);<br />
}<br />
<br />
function injectVersionTags () {<br />
var versions = [<br />
{"version": "11.3", "codename": "Mysterious Mysteries"},<br />
{"version": "11.2", "codename": "Mysterious Mysteries"},<br />
{"version": "11.1", "codename": "Mysterious Mysteries"},<br />
{"version": "11.0", "codename": "Mysterious Mysteries"},<br />
{"version": "0.10.2", "codename": "Super Toast"},<br />
{"version": "0.10.1", "codename": "Super Toast"},<br />
{"version": "0.10.0", "codename": "Super Toast"},<br />
{"version": "0.9.2", "codename": "Baby Inspector"},<br />
{"version": "0.9.1", "codename": "Baby Inspector"},<br />
{"version": "0.9.0", "codename": "Baby Inspector"},<br />
{"version": "0.8.0", "codename": "Rubber Piggy"},<br />
{"version": "0.7.2", "codename": "Game Slave"},<br />
{"version": "0.7.1", "codename": "Game Slave"},<br />
{"version": "0.7.0", "codename": "Game Slave"},<br />
{"version": "0.6.2", "codename": "Jiggly Juice"},<br />
{"version": "0.6.1", "codename": "Jiggly Juice"},<br />
{"version": "0.6.0", "codename": "Jiggly Juice"},<br />
{"version": "0.5.0", "codename": "Salted Nuts"},<br />
{"version": "0.4.0", "codename": "Taco Beam"},<br />
{"version": "0.3.2", "codename": "Lemony Fresh"},<br />
{"version": "0.3.1", "codename": "Space Meat"},<br />
{"version": "0.3.0", "codename": "Mutant Vermin"},<br />
{"version": "0.2.1", "codename": "Impending Doom"},<br />
{"version": "0.2.0", "codename": "Mini Moose"},<br />
{"version": "0.1.1", "codename": "Santa Power"}<br />
]<br />
<br />
for (var i = 0; i < versions.length; i++) {<br />
injectVersionTag(versions[i].version, versions[i].codename);<br />
}<br />
}<br />
<br />
function queryVersionTags () {<br />
var url = '/w/index.php?title=Version_History&action=raw';<br />
var xhr = new XMLHttpRequest();<br />
xhr.onload = function () {<br />
var re = /\[\[([\d.]+)\]\][^\n]*\n[^\|]*\|(.*)\n/gm;<br />
var m;<br />
<br />
while (m = re.exec(this.responseText)) {<br />
injectVersionTag(m[1], m[2]);<br />
}<br />
}<br />
xhr.open('get', url, true);<br />
xhr.send();<br />
}<br />
<br />
function setPicker (target) {<br />
for (var i = 0; i < picker.options.length; ++i) {<br />
if (picker.options[i].value === target) {<br />
picker.selectedIndex = i;<br />
picker.onchange();<br />
break;<br />
}<br />
}<br />
}<br />
<br />
function main () {<br />
wrapSections();<br />
scanSections();<br />
scanTables();<br />
injectPickerOption('all', 'All Versions');<br />
injectPickerOption('latest', 'Latest Version');<br />
injectVersionTags();<br />
injectFilterPicker();<br />
var target = retrieveValue('versionpicker-version');<br />
if (target !== undefined) {<br />
setPicker(target);<br />
}<br />
}<br />
<br />
main();<br />
}<br />
<br />
versionpicker();</div>
Bartbes
http://www.love2d.org/w/index.php?title=Template:ListingFields/doc&diff=22082
Template:ListingFields/doc
2018-12-21T18:46:55Z
<p>Bartbes: Document general usage and deprecation notices</p>
<hr />
<div>__TOC__<br />
<br />
== General usage ==<br />
<br />
This template is usually used in combination with Semantic Mediawiki queries, like this:<br />
<pre>{{#ask: [[Category:Functions]] [[parent::love.filesystem]] [[Concept:Current]]<br />
| headers=hide<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
| ?PrettyDeprecated<br />
}}</pre><br />
<br />
[[Template:ListingIntro]] and [[Template:ListingOutro]] accompany this template and format the result as a table.<br />
<br />
The 4 fields correspond to the columns of the table, with the notable exception that PrettyDeprecated is shown in the PrettyRemoved field when a type/function/etc hasn't been removed yet.<br />
<br />
The result then looks like this:<br />
{{#ask: [[Category:Functions]] [[parent::love.filesystem]] [[Concept:Current]]<br />
| headers=hide<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
| ?PrettyDeprecated<br />
}}<br />
<br />
== Display names for translated pages ==<br />
<br />
Normally, an automatically generated list looks like this:<br />
<pre>{{#ask: [[Category:Functions]] [[parent::love.audio (Português)]] [[Concept:Current]]<br />
| headers=hide<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
}}</pre><br />
You can see similar ones all over the wiki.<br />
<br />
It works fine for the English wiki, but not so much for the translated ones, because if an English page name is "pagename", the Portuguese one is "pagename (Português). Now imagine that each big page has 20 links, all with (Português) appended to it. It's an annoyance. Now another situation: "number" in Portuguese is "número", but the link to the page is "number (Português). Not a big problem, but it can be better.<br />
<br />
So I added the possibility of having two extra arguments:<br />
<pre>{{#ask: [[Category:Functions]] [[parent::love.audio (Português)]] [[Concept:Current]]<br />
| headers=hide<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
| ?RealLink# -<br />
| ?DisplayName# -<br />
}}</pre><br />
<br />
If it finds a page with RealLink and DisplayName set, it displays the DisplayName instead. Here's an example of how it can be set:<br />
<pre>{{#set:RealLink=number (Português)}}<br />
{{#set:DisplayName=número}}</pre><br />
Just put that anywhere on the page!</div>
Bartbes
http://www.love2d.org/w/index.php?title=Template:ListingFields&diff=22081
Template:ListingFields
2018-12-21T18:37:04Z
<p>Bartbes: Add documentation to template page</p>
<hr />
<div><includeonly><br />
|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{#if: {{{5|}}} |{{#if: {{{6|}}} |[[{{{5}}}|{{{6}}}]] |{{{1}}}}} |{{{1}}}}}||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{{2}}}||{{#if: {{{3|}}}|style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{3|}}}|[[File:Add.png|frameless|link=|alt=Added since]] {{{3}}}}} ||{{#if: {{{4|}}}|style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{4|}}}|[[File:Remove.png|frameless|link=|alt=Removed in]] {{{4}}}|{{#if: {{{5|}}}|[[File:Deprecate.png|frameless|link=|alt=Deprecated in]] {{{5}}}}}}}<br />
|-<br />
</includeonly><noinclude><br />
{{documentation}}<br />
</noinclude></div>
Bartbes
http://www.love2d.org/w/index.php?title=love.filesystem&diff=22080
love.filesystem
2018-12-21T18:32:49Z
<p>Bartbes: Try adding deprecation support</p>
<hr />
<div>Provides an interface to the user's filesystem.<br />
<br />
This module provides access to files in specific places:<br />
<br />
* The root folder of the .love archive (or source directory)<br />
* The root folder of the game's ''save directory''.<br />
* The folder ''containing'' the game's .love archive (or source directory), but only if [[love.filesystem.getSourceBaseDirectory|specific conditions]] are met.<br />
<br />
Each game is granted a single directory on the system where files can be saved through love.filesystem. This is the '''only directory''' where love.filesystem can write files. These directories will typically be found in something like:<br />
<br />
{| border="1" cellpadding="5" cellspacing="1" style="background-color:#E9F5FF; border: 1px solid #83C0F0;"<br />
! OS<br />
! Path<br />
! Alternative<br />
! Notes<br />
|-<br />
|Windows XP<br />
|<code>C:\Documents and Settings\user\Application Data\LOVE\</code><br />
|<code>%appdata%\LOVE\</code><br />
| -<br />
|-<br />
|Windows Vista, 7, 8 and 10<br />
|<code>C:\Users\user\AppData\Roaming\LOVE</code><br />
|<code>%appdata%\LOVE\</code><br />
| -<br />
|-<br />
|Mac<br />
|<code>/Users/user/Library/Application Support/LOVE/</code><br />
| - <br />
| -<br />
|-<br />
|Linux<br />
|<code>$XDG_DATA_HOME/love/</code><br />
|<code>~/.local/share/love/</code><br />
| -<br />
|-<br />
|Android<br />
|<code>/data/user/0/org.love2d.android/files/save/</code><br />
|<code>/data/data/org.love2d.android/files/save/</code><br />
|On Android there are various save locations. If these don't work then you can use <code>love.filesystem.getSaveDirectory()</code> to check.<br />
|}<br />
<br />
Files that are opened for write or append will always be created in the save directory. The same goes for other operations that involve writing to the filesystem, like mkdir.<br />
<br />
Files that are opened for read will be looked for in the save directory, and then in the .love archive (in that order). So if a file with a certain filename (and path) exist in both the .love archive and the save folder, the one in the save directory takes precedence.<br />
<br />
Note: '''All''' paths are relative to the .love archive and save directory. (except for the get*Directory() calls)<br />
<br />
It is recommended to set your game's identity first in your [[Config Files|conf.lua]]. You can set it with [[love.filesystem.setIdentity]] as well.<br />
<br />
{{notice|There's [https://bitbucket.org/MartinFelis/love-android-sdl2/issues/132 bug] in [[0.10.0]], up to [[0.10.2]] where any operation involving the game save directory (i.e. [[love.filesystem.write|writing]]) always fail in Android Marshmallow and later versions. The workaround is to enable [[Config_Files#externalstorage|externalstorage]] configuration.}}<br />
== Types ==<br />
{{#ask: [[Category:Types]] [[parent::love.filesystem]] [[Concept:Current]]<br />
| headers=hide<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
| ?PrettyDeprecated<br />
}}<br />
== Functions ==<br />
{{#ask: [[Category:Functions]] [[parent::love.filesystem]] [[Concept:Current]]<br />
| headers=hide<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
| ?PrettyDeprecated<br />
}}<br />
== Enums ==<br />
{{#ask: [[Category:Enums]] [[parent::love.filesystem]] [[Concept:Current]]<br />
| headers=hide<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
}}<br />
[[Category:Modules]]<br />
{{#set:Description=Provides an interface to the user's filesystem.}}<br />
== See Also ==<br />
* [[parent::love]]<br />
{{#set:Since=000}}<br />
== Other Languages ==<br />
{{i18n|love.filesystem}}</div>
Bartbes
http://www.love2d.org/w/index.php?title=Template:ListingFields&diff=22079
Template:ListingFields
2018-12-21T18:31:42Z
<p>Bartbes: Try adding deprecation support</p>
<hr />
<div><includeonly><br />
|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{#if: {{{5|}}} |{{#if: {{{6|}}} |[[{{{5}}}|{{{6}}}]] |{{{1}}}}} |{{{1}}}}}||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{{2}}}||{{#if: {{{3|}}}|style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{3|}}}|[[File:Add.png|frameless|link=|alt=Added since]] {{{3}}}}} ||{{#if: {{{4|}}}|style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{4|}}}|[[File:Remove.png|frameless|link=|alt=Removed in]] {{{4}}}|{{#if: {{{5|}}}|[[File:Deprecate.png|frameless|link=|alt=Deprecated in]] {{{5}}}}}}}<br />
|-<br />
</includeonly></div>
Bartbes
http://www.love2d.org/w/index.php?title=File:Deprecate.png&diff=22078
File:Deprecate.png
2018-12-21T18:30:14Z
<p>Bartbes: Bartbes uploaded a new version of File:Deprecate.png</p>
<hr />
<div>For deprecation notices</div>
Bartbes
http://www.love2d.org/w/index.php?title=File:Deprecate.png&diff=22077
File:Deprecate.png
2018-12-21T18:29:07Z
<p>Bartbes: For deprecation notices</p>
<hr />
<div>For deprecation notices</div>
Bartbes
http://www.love2d.org/w/index.php?title=User:Bartbes/Template:ListingFields&diff=22076
User:Bartbes/Template:ListingFields
2018-12-21T18:24:25Z
<p>Bartbes: test</p>
<hr />
<div><includeonly><br />
|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{#if: {{{5|}}} |{{#if: {{{6|}}} |[[{{{5}}}|{{{6}}}]] |{{{1}}}}} |{{{1}}}}}||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{{2}}}||{{#if: {{{3|}}}|style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{3|}}}|[[File:Add.png|frameless|link=|alt=Added since]] {{{3}}}}} ||{{#if: {{{4|}}}|style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{4|}}}|[[File:Remove.png|frameless|link=|alt=Removed in]] {{{4}}}|{{#if: {{{5|}}}|[[File:Deprecate.png|frameless|link=|alt=Deprecated in]] {{{5}}}}}}}<br />
|-<br />
</includeonly></div>
Bartbes
http://www.love2d.org/w/index.php?title=User:Bartbes/Template:ListingFields&diff=22075
User:Bartbes/Template:ListingFields
2018-12-21T18:23:44Z
<p>Bartbes: test</p>
<hr />
<div><includeonly><br />
|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{#if: {{{5|}}} |{{#if: {{{6|}}} |[[{{{5}}}|{{{6}}}]] |{{{1}}}}} |{{{1}}}}}||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{{2}}}||{{#if: {{{3|}}}|style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{3|}}}|[[File:Add.png|frameless|link=|alt=Added since]] {{{3}}}}} ||{{#if: {{{4|}}}|style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{4|}}}|[[File:Remove.png|frameless|link=|alt=Removed in]] {{{4}}}|{{#if: {{{5|}}}|Deprecated}}}}<br />
|-<br />
</includeonly></div>
Bartbes
http://www.love2d.org/w/index.php?title=User:Bartbes/Template:ListingFields&diff=22074
User:Bartbes/Template:ListingFields
2018-12-21T18:23:03Z
<p>Bartbes: test</p>
<hr />
<div><includeonly><br />
|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{#if: {{{5|}}} |{{#if: {{{6|}}} |[[{{{5}}}|{{{6}}}]] |{{{1}}}}} |{{{1}}}}}||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{{2}}}||{{#if: {{{3|}}}|style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{3|}}}|[[File:Add.png|frameless|link=|alt=Added since]] {{{3}}}}} ||{{#if: {{{4|}}}|style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{4|}}}|[[File:Remove.png|frameless|link=|alt=Removed in]] {{{4}}}|Not removed}}<br />
|-<br />
</includeonly></div>
Bartbes
http://www.love2d.org/w/index.php?title=User:Bartbes/Template:ListingFields&diff=22073
User:Bartbes/Template:ListingFields
2018-12-21T18:22:11Z
<p>Bartbes: Try using a template in my user namespace</p>
<hr />
<div><includeonly><br />
|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{#if: {{{5|}}} |{{#if: {{{6|}}} |[[{{{5}}}|{{{6}}}]] |{{{1}}}}} |{{{1}}}}}||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{{2}}}||{{#if: {{{3|}}}|style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{3|}}}|[[File:Add.png|frameless|link=|alt=Added since]] {{{3}}}}} ||{{#if: {{{4|}}}|style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{4|}}}|[[File:Remove.png|frameless|link=|alt=Removed in]] {{{4}}}}}<br />
|-<br />
</includeonly></div>
Bartbes
http://www.love2d.org/w/index.php?title=Template:ListingFields&diff=22072
Template:ListingFields
2018-12-21T18:20:26Z
<p>Bartbes: Undo revision 22071 by Bartbes (talk)</p>
<hr />
<div><includeonly><br />
|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{#if: {{{5|}}} |{{#if: {{{6|}}} |[[{{{5}}}|{{{6}}}]] |{{{1}}}}} |{{{1}}}}}||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{{2}}}||{{#if: {{{3|}}}|style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{3|}}}|[[File:Add.png|frameless|link=|alt=Added since]] {{{3}}}}} ||{{#if: {{{4|}}}|style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{4|}}}|[[File:Remove.png|frameless|link=|alt=Removed in]] {{{4}}}}}<br />
|-<br />
</includeonly></div>
Bartbes
http://www.love2d.org/w/index.php?title=Template:ListingFields&diff=22071
Template:ListingFields
2018-12-21T18:15:45Z
<p>Bartbes: Try adding deprecation support</p>
<hr />
<div><includeonly><br />
|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{#if: {{{5|}}} |{{#if: {{{6|}}} |[[{{{5}}}|{{{6}}}]] |{{{1}}}}} |{{{1}}}}}||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|{{{2}}}||{{#if: {{{3|}}}|style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{3|}}}|[[File:Add.png|frameless|link=|alt=Added since]] {{{3}}}}} ||{{#if: {{{4|}}}|style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"}}|{{#if: {{{4|}}}|[[File:Remove.png|frameless|link=|alt=Removed in]] {{{4}}}|{{#if: {{{5|}}}|[[File:Deprecate.png|frameless|link=|alt=Deprecated in]] {{{5}}}}}<br />
|-<br />
</includeonly></div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Love.js&diff=21905
MediaWiki:Love.js
2018-11-25T17:35:30Z
<p>Bartbes: Update version to 11.2</p>
<hr />
<div>// Source on github: https://github.com/airstruck/love-wiki-version-picker<br />
function versionpicker() {<br />
var picker = document.createElement('select');<br />
<br />
picker.onchange = function () {<br />
applyFilter(this.options[this.selectedIndex].value);<br />
}<br />
<br />
function array (a) {<br />
return [].slice.apply(a || []);<br />
}<br />
<br />
// Some helpers for localStorage, basically resort to doing nothing<br />
// if it isn't available.<br />
function storeValue(name, value) {<br />
try {<br />
localStorage[name] = value;<br />
}<br />
catch (e) {<br />
}<br />
}<br />
<br />
function retrieveValue(name) {<br />
try {<br />
return localStorage[name];<br />
}<br />
catch (e) {<br />
return undefined;<br />
}<br />
}<br />
<br />
var pickerVersions = {};<br />
<br />
function injectPickerOption (version, text) {<br />
if (pickerVersions[version]) {<br />
return;<br />
}<br />
pickerVersions[version] = true;<br />
<br />
var option = document.createElement('option');<br />
<br />
option.value = version;<br />
option.textContent = text;<br />
picker.appendChild(option);<br />
}<br />
<br />
function makeWrapper () {<br />
var wrapper = document.createElement('div');<br />
<br />
wrapper.setAttribute('data-love-filterable', true);<br />
<br />
return wrapper;<br />
}<br />
<br />
function wrapSections () {<br />
var element = document.querySelector('h2');<br />
var wrapper;<br />
<br />
while (element) {<br />
var next = element.nextSibling;<br />
if (element.nodeName == 'H2') {<br />
wrapper = makeWrapper();<br />
element.parentNode.insertBefore(wrapper, element);<br />
}<br />
wrapper.appendChild(element);<br />
element = next;<br />
}<br />
}<br />
<br />
function updateSectionFromNote (section, note) {<br />
if (note.textContent.match(/available since/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-added', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.textContent.match(/removed in/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-removed', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
}<br />
<br />
function QueryIterator (query) {<br />
return function (callback) {<br />
return array(document.querySelectorAll(query)).forEach(callback);<br />
}<br />
}<br />
<br />
var withSections = QueryIterator('*[data-love-filterable]');<br />
var withAdded = QueryIterator('*[data-love-version-added]');<br />
var withRemoved = QueryIterator('*[data-love-version-removed]');<br />
var withAddedRemoved = QueryIterator('*[data-love-version-added][data-love-version-removed]');<br />
var withNotes = QueryIterator('*[data-love-version-note]');<br />
<br />
function hideNotes () {<br />
withNotes(function (note) { note.style.display = 'none' });<br />
}<br />
<br />
function showNotes () {<br />
withNotes(function (note) { note.style.display = null });<br />
}<br />
<br />
var needsFilter = false;<br />
<br />
function scanSections () {<br />
withSections(function (section) {<br />
var note = section.querySelector('table');<br />
if (!note) {<br />
return;<br />
}<br />
updateSectionFromNote(section, note);<br />
while (note.nextSibling && note.nextSibling.tagName == 'TABLE') {<br />
note = note.nextSibling;<br />
updateSectionFromNote(section, note);<br />
}<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
function scanTables () {<br />
var added = document.querySelectorAll('.smwtable *[alt="Added since"] + *');<br />
var removed = document.querySelectorAll('.smwtable *[alt="Removed in"] + *');<br />
<br />
array(added).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-added', a.title);<br />
needsFilter = true;<br />
});<br />
array(removed).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-removed', a.title);<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
// return true if 'installed' is greater than or equal to 'required'<br />
// http://stackoverflow.com/a/6832670<br />
function compareVersions (installed, required) {<br />
var a = installed.split('.');<br />
var b = required.split('.');<br />
<br />
for (var i = 0; i < a.length; ++i) {<br />
a[i] = Number(a[i]);<br />
}<br />
for (var i = 0; i < b.length; ++i) {<br />
b[i] = Number(b[i]);<br />
}<br />
if (a.length == 2) {<br />
a[2] = 0;<br />
}<br />
if (b.length == 2) {<br />
b[2] = 0;<br />
}<br />
<br />
if (a[0] > b[0]) return true;<br />
if (a[0] < b[0]) return false;<br />
<br />
if (a[1] > b[1]) return true;<br />
if (a[1] < b[1]) return false;<br />
<br />
if (a[2] > b[2]) return true;<br />
if (a[2] < b[2]) return false;<br />
<br />
return true;<br />
}<br />
<br />
function filterVersion (installed) {<br />
filterAll(hideNotes);<br />
withAdded(function (section) {<br />
var required = section.getAttribute('data-love-version-added');<br />
if (!compareVersions(installed, required)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withRemoved(function (section) {<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions (installed, removed)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed) && compareVersions(installed, added)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function filterAll (hideOrShowNotes) {<br />
hideOrShowNotes();<br />
withSections(function (section) { section.style.display = null });<br />
}<br />
<br />
function filterLatest () {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) { section.style.display = 'none' });<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function applyFilter (value) {<br />
storeValue('versionpicker-version', value);<br />
if (value == 'all') {<br />
filterAll(showNotes);<br />
return;<br />
}<br />
if (value == 'latest') {<br />
filterLatest();<br />
return;<br />
}<br />
filterVersion(value);<br />
}<br />
<br />
function injectFilterPicker () {<br />
var target = document.getElementById('ca-nstab-main').parentNode;<br />
<br />
picker.style.position = 'absolute';<br />
picker.style.right = 0;<br />
picker.style.height = target.parentNode.offsetHeight - 8 + 'px';<br />
picker.style.margin = '4px';<br />
<br />
target.parentNode.insertBefore(picker, target);<br />
}<br />
<br />
function injectVersionTag (number, name) {<br />
injectPickerOption(number, 'Version ' + number + ': ' + name);<br />
}<br />
<br />
function injectVersionTags () {<br />
var versions = [<br />
{"version": "11.2", "codename": "Mysterious Mysteries"},<br />
{"version": "11.1", "codename": "Mysterious Mysteries"},<br />
{"version": "11.0", "codename": "Mysterious Mysteries"},<br />
{"version": "0.10.2", "codename": "Super Toast"},<br />
{"version": "0.10.1", "codename": "Super Toast"},<br />
{"version": "0.10.0", "codename": "Super Toast"},<br />
{"version": "0.9.2", "codename": "Baby Inspector"},<br />
{"version": "0.9.1", "codename": "Baby Inspector"},<br />
{"version": "0.9.0", "codename": "Baby Inspector"},<br />
{"version": "0.8.0", "codename": "Rubber Piggy"},<br />
{"version": "0.7.2", "codename": "Game Slave"},<br />
{"version": "0.7.1", "codename": "Game Slave"},<br />
{"version": "0.7.0", "codename": "Game Slave"},<br />
{"version": "0.6.2", "codename": "Jiggly Juice"},<br />
{"version": "0.6.1", "codename": "Jiggly Juice"},<br />
{"version": "0.6.0", "codename": "Jiggly Juice"},<br />
{"version": "0.5.0", "codename": "Salted Nuts"},<br />
{"version": "0.4.0", "codename": "Taco Beam"},<br />
{"version": "0.3.2", "codename": "Lemony Fresh"},<br />
{"version": "0.3.1", "codename": "Space Meat"},<br />
{"version": "0.3.0", "codename": "Mutant Vermin"},<br />
{"version": "0.2.1", "codename": "Impending Doom"},<br />
{"version": "0.2.0", "codename": "Mini Moose"},<br />
{"version": "0.1.1", "codename": "Santa Power"}<br />
]<br />
<br />
for (var i = 0; i < versions.length; i++) {<br />
injectVersionTag(versions[i].version, versions[i].codename);<br />
}<br />
}<br />
<br />
function queryVersionTags () {<br />
var url = '/w/index.php?title=Version_History&action=raw';<br />
var xhr = new XMLHttpRequest();<br />
xhr.onload = function () {<br />
var re = /\[\[([\d.]+)\]\][^\n]*\n[^\|]*\|(.*)\n/gm;<br />
var m;<br />
<br />
while (m = re.exec(this.responseText)) {<br />
injectVersionTag(m[1], m[2]);<br />
}<br />
}<br />
xhr.open('get', url, true);<br />
xhr.send();<br />
}<br />
<br />
function setPicker (target) {<br />
for (var i = 0; i < picker.options.length; ++i) {<br />
if (picker.options[i].value === target) {<br />
picker.selectedIndex = i;<br />
picker.onchange();<br />
break;<br />
}<br />
}<br />
}<br />
<br />
function main () {<br />
wrapSections();<br />
scanSections();<br />
scanTables();<br />
injectPickerOption('all', 'All Versions');<br />
injectPickerOption('latest', 'Latest Version');<br />
injectVersionTags();<br />
injectFilterPicker();<br />
var target = retrieveValue('versionpicker-version');<br />
if (target !== undefined) {<br />
setPicker(target);<br />
}<br />
}<br />
<br />
main();<br />
}<br />
<br />
versionpicker();</div>
Bartbes
http://www.love2d.org/w/index.php?title=Template:CURRENTLOVE&diff=21904
Template:CURRENTLOVE
2018-11-25T17:34:37Z
<p>Bartbes: Update version to 11.2</p>
<hr />
<div>112</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Love.js&diff=21407
MediaWiki:Love.js
2018-04-15T19:07:17Z
<p>Bartbes: 11.0 released</p>
<hr />
<div>// Source on github: https://github.com/airstruck/love-wiki-version-picker<br />
function versionpicker() {<br />
var picker = document.createElement('select');<br />
<br />
picker.onchange = function () {<br />
applyFilter(this.options[this.selectedIndex].value);<br />
}<br />
<br />
function array (a) {<br />
return [].slice.apply(a || []);<br />
}<br />
<br />
// Some helpers for localStorage, basically resort to doing nothing<br />
// if it isn't available.<br />
function storeValue(name, value) {<br />
try {<br />
localStorage[name] = value;<br />
}<br />
catch (e) {<br />
}<br />
}<br />
<br />
function retrieveValue(name) {<br />
try {<br />
return localStorage[name];<br />
}<br />
catch (e) {<br />
return undefined;<br />
}<br />
}<br />
<br />
var pickerVersions = {};<br />
<br />
function injectPickerOption (version, text) {<br />
if (pickerVersions[version]) {<br />
return;<br />
}<br />
pickerVersions[version] = true;<br />
<br />
var option = document.createElement('option');<br />
<br />
option.value = version;<br />
option.textContent = text;<br />
picker.appendChild(option);<br />
}<br />
<br />
function makeWrapper () {<br />
var wrapper = document.createElement('div');<br />
<br />
wrapper.setAttribute('data-love-filterable', true);<br />
<br />
return wrapper;<br />
}<br />
<br />
function wrapSections () {<br />
var element = document.querySelector('h2');<br />
var wrapper;<br />
<br />
while (element) {<br />
var next = element.nextSibling;<br />
if (element.nodeName == 'H2') {<br />
wrapper = makeWrapper();<br />
element.parentNode.insertBefore(wrapper, element);<br />
}<br />
wrapper.appendChild(element);<br />
element = next;<br />
}<br />
}<br />
<br />
function updateSectionFromNote (section, note) {<br />
if (note.textContent.match(/available since/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-added', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.textContent.match(/removed in/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-removed', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
}<br />
<br />
function QueryIterator (query) {<br />
return function (callback) {<br />
return array(document.querySelectorAll(query)).forEach(callback);<br />
}<br />
}<br />
<br />
var withSections = QueryIterator('*[data-love-filterable]');<br />
var withAdded = QueryIterator('*[data-love-version-added]');<br />
var withRemoved = QueryIterator('*[data-love-version-removed]');<br />
var withAddedRemoved = QueryIterator('*[data-love-version-added][data-love-version-removed]');<br />
var withNotes = QueryIterator('*[data-love-version-note]');<br />
<br />
function hideNotes () {<br />
withNotes(function (note) { note.style.display = 'none' });<br />
}<br />
<br />
function showNotes () {<br />
withNotes(function (note) { note.style.display = null });<br />
}<br />
<br />
var needsFilter = false;<br />
<br />
function scanSections () {<br />
withSections(function (section) {<br />
var note = section.querySelector('table');<br />
if (!note) {<br />
return;<br />
}<br />
updateSectionFromNote(section, note);<br />
while (note.nextSibling && note.nextSibling.tagName == 'TABLE') {<br />
note = note.nextSibling;<br />
updateSectionFromNote(section, note);<br />
}<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
function scanTables () {<br />
var added = document.querySelectorAll('.smwtable *[alt="Added since"] + *');<br />
var removed = document.querySelectorAll('.smwtable *[alt="Removed in"] + *');<br />
<br />
array(added).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-added', a.title);<br />
needsFilter = true;<br />
});<br />
array(removed).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-removed', a.title);<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
// return true if 'installed' is greater than or equal to 'required'<br />
// http://stackoverflow.com/a/6832670<br />
function compareVersions (installed, required) {<br />
var a = installed.split('.');<br />
var b = required.split('.');<br />
<br />
for (var i = 0; i < a.length; ++i) {<br />
a[i] = Number(a[i]);<br />
}<br />
for (var i = 0; i < b.length; ++i) {<br />
b[i] = Number(b[i]);<br />
}<br />
if (a.length == 2) {<br />
a[2] = 0;<br />
}<br />
if (b.length == 2) {<br />
b[2] = 0;<br />
}<br />
<br />
if (a[0] > b[0]) return true;<br />
if (a[0] < b[0]) return false;<br />
<br />
if (a[1] > b[1]) return true;<br />
if (a[1] < b[1]) return false;<br />
<br />
if (a[2] > b[2]) return true;<br />
if (a[2] < b[2]) return false;<br />
<br />
return true;<br />
}<br />
<br />
function filterVersion (installed) {<br />
filterAll(hideNotes);<br />
withAdded(function (section) {<br />
var required = section.getAttribute('data-love-version-added');<br />
if (!compareVersions(installed, required)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withRemoved(function (section) {<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions (installed, removed)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed) && compareVersions(installed, added)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function filterAll (hideOrShowNotes) {<br />
hideOrShowNotes();<br />
withSections(function (section) { section.style.display = null });<br />
}<br />
<br />
function filterLatest () {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) { section.style.display = 'none' });<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function applyFilter (value) {<br />
storeValue('versionpicker-version', value);<br />
if (value == 'all') {<br />
filterAll(showNotes);<br />
return;<br />
}<br />
if (value == 'latest') {<br />
filterLatest();<br />
return;<br />
}<br />
filterVersion(value);<br />
}<br />
<br />
function injectFilterPicker () {<br />
var target = document.getElementById('ca-nstab-main').parentNode;<br />
<br />
picker.style.position = 'absolute';<br />
picker.style.right = 0;<br />
picker.style.height = target.parentNode.offsetHeight - 8 + 'px';<br />
picker.style.margin = '4px';<br />
<br />
target.parentNode.insertBefore(picker, target);<br />
}<br />
<br />
function injectVersionTag (number, name) {<br />
injectPickerOption(number, 'Version ' + number + ': ' + name);<br />
}<br />
<br />
function injectVersionTags () {<br />
var versions = [<br />
{"version": "11.1", "codename": "Mysterious Mysteries"},<br />
{"version": "11.0", "codename": "Mysterious Mysteries"},<br />
{"version": "0.10.2", "codename": "Super Toast"},<br />
{"version": "0.10.1", "codename": "Super Toast"},<br />
{"version": "0.10.0", "codename": "Super Toast"},<br />
{"version": "0.9.2", "codename": "Baby Inspector"},<br />
{"version": "0.9.1", "codename": "Baby Inspector"},<br />
{"version": "0.9.0", "codename": "Baby Inspector"},<br />
{"version": "0.8.0", "codename": "Rubber Piggy"},<br />
{"version": "0.7.2", "codename": "Game Slave"},<br />
{"version": "0.7.1", "codename": "Game Slave"},<br />
{"version": "0.7.0", "codename": "Game Slave"},<br />
{"version": "0.6.2", "codename": "Jiggly Juice"},<br />
{"version": "0.6.1", "codename": "Jiggly Juice"},<br />
{"version": "0.6.0", "codename": "Jiggly Juice"},<br />
{"version": "0.5.0", "codename": "Salted Nuts"},<br />
{"version": "0.4.0", "codename": "Taco Beam"},<br />
{"version": "0.3.2", "codename": "Lemony Fresh"},<br />
{"version": "0.3.1", "codename": "Space Meat"},<br />
{"version": "0.3.0", "codename": "Mutant Vermin"},<br />
{"version": "0.2.1", "codename": "Impending Doom"},<br />
{"version": "0.2.0", "codename": "Mini Moose"},<br />
{"version": "0.1.1", "codename": "Santa Power"}<br />
]<br />
<br />
for (var i = 0; i < versions.length; i++) {<br />
injectVersionTag(versions[i].version, versions[i].codename);<br />
}<br />
}<br />
<br />
function queryVersionTags () {<br />
var url = '/w/index.php?title=Version_History&action=raw';<br />
var xhr = new XMLHttpRequest();<br />
xhr.onload = function () {<br />
var re = /\[\[([\d.]+)\]\][^\n]*\n[^\|]*\|(.*)\n/gm;<br />
var m;<br />
<br />
while (m = re.exec(this.responseText)) {<br />
injectVersionTag(m[1], m[2]);<br />
}<br />
}<br />
xhr.open('get', url, true);<br />
xhr.send();<br />
}<br />
<br />
function setPicker (target) {<br />
for (var i = 0; i < picker.options.length; ++i) {<br />
if (picker.options[i].value === target) {<br />
picker.selectedIndex = i;<br />
picker.onchange();<br />
break;<br />
}<br />
}<br />
}<br />
<br />
function main () {<br />
wrapSections();<br />
scanSections();<br />
scanTables();<br />
injectPickerOption('all', 'All Versions');<br />
injectPickerOption('latest', 'Latest Version');<br />
injectVersionTags();<br />
injectFilterPicker();<br />
var target = retrieveValue('versionpicker-version');<br />
if (target !== undefined) {<br />
setPicker(target);<br />
}<br />
}<br />
<br />
main();<br />
}<br />
<br />
versionpicker();</div>
Bartbes
http://www.love2d.org/w/index.php?title=Template:CURRENTLOVE&diff=21406
Template:CURRENTLOVE
2018-04-15T19:06:54Z
<p>Bartbes: 11.1 released</p>
<hr />
<div>111</div>
Bartbes
http://www.love2d.org/w/index.php?title=Source&diff=21383
Source
2018-04-05T17:58:52Z
<p>Bartbes: Update source controls documentation</p>
<hr />
<div>A Source represents audio you can play back.<br />
You can do interesting things with Sources, like set the volume, pitch, and its position relative to the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources.<br />
<br />
The Source controls (play/pause/stop) act according to the following state table.<br />
{| class="wikitable"<br />
! !! Playing !! Paused<br />
|-<br />
| play() || No change || Play<br />
|-<br />
| stop() || Pause + Rewind || Rewind<br />
|-<br />
| pause() || Pause || No change<br />
|}<br />
And for fans of flowcharts (note: omitted calls have no effect, stopping always rewinds).<br />
<br />
[[File:NewSourceControls.png]]<br />
<br />
== Constructors ==<br />
{{#ask: [[Category:Functions]] [[Constructs::Source]] [[Concept:Current]]<br />
| headers=hide<br />
| default=None.<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
}}<br />
== Functions ==<br />
{{#ask: [[Category:Functions]] [[parent::Source||Object]] [[Concept:Current]]<br />
| headers=hide<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
}}<br />
== Enums ==<br />
{{#ask: [[Category:Enums]] [[parent::Source]] [[Concept:Current]]<br />
| headers=hide<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
}}<br />
== Supertypes ==<br />
* [[parent::Object]]<br />
== See Also ==<br />
* [[parent::love.audio]]<br />
[[Category:Types]]<br />
{{#set:Description=A Source represents audio you can play back.}}<br />
{{#set:Since=000}}<br />
== Other Languages ==<br />
{{i18n|Source}}</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Sidebar&diff=21287
MediaWiki:Sidebar
2018-04-01T21:09:53Z
<p>Bartbes: Add love.data to sidebar</p>
<hr />
<div>* documentation<br />
** love|love<br />
** love.audio|love.audio<br />
** love.data|love.data<br />
** love.event|love.event<br />
** love.filesystem|love.filesystem<br />
** love.font|love.font<br />
** love.graphics|love.graphics<br />
** love.image|love.image<br />
** love.joystick|love.joystick<br />
** love.keyboard|love.keyboard<br />
** love.math|love.math<br />
** love.mouse|love.mouse<br />
** love.physics|love.physics<br />
** love.sound|love.sound<br />
** love.system|love.system<br />
** love.thread|love.thread<br />
** love.timer|love.timer<br />
** love.touch|love.touch<br />
** love.video|love.video<br />
** love.window|love.window<br />
** lua-enet|lua-enet<br />
** socket|luasocket<br />
** utf8|utf8<br />
* navigation<br />
** https://love2d.org/|Home<br />
** https://love2d.org/forums/|Forums<br />
** https://bitbucket.org/rude/love/issues|Issue tracker<br />
* wiki navigation<br />
** mainpage|mainpage-description<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
* SEARCH<br />
* TOOLBOX</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Love.js&diff=21286
MediaWiki:Love.js
2018-04-01T21:09:34Z
<p>Bartbes: 11.0 released</p>
<hr />
<div>// Source on github: https://github.com/airstruck/love-wiki-version-picker<br />
function versionpicker() {<br />
var picker = document.createElement('select');<br />
<br />
picker.onchange = function () {<br />
applyFilter(this.options[this.selectedIndex].value);<br />
}<br />
<br />
function array (a) {<br />
return [].slice.apply(a || []);<br />
}<br />
<br />
// Some helpers for localStorage, basically resort to doing nothing<br />
// if it isn't available.<br />
function storeValue(name, value) {<br />
try {<br />
localStorage[name] = value;<br />
}<br />
catch (e) {<br />
}<br />
}<br />
<br />
function retrieveValue(name) {<br />
try {<br />
return localStorage[name];<br />
}<br />
catch (e) {<br />
return undefined;<br />
}<br />
}<br />
<br />
var pickerVersions = {};<br />
<br />
function injectPickerOption (version, text) {<br />
if (pickerVersions[version]) {<br />
return;<br />
}<br />
pickerVersions[version] = true;<br />
<br />
var option = document.createElement('option');<br />
<br />
option.value = version;<br />
option.textContent = text;<br />
picker.appendChild(option);<br />
}<br />
<br />
function makeWrapper () {<br />
var wrapper = document.createElement('div');<br />
<br />
wrapper.setAttribute('data-love-filterable', true);<br />
<br />
return wrapper;<br />
}<br />
<br />
function wrapSections () {<br />
var element = document.querySelector('h2');<br />
var wrapper;<br />
<br />
while (element) {<br />
var next = element.nextSibling;<br />
if (element.nodeName == 'H2') {<br />
wrapper = makeWrapper();<br />
element.parentNode.insertBefore(wrapper, element);<br />
}<br />
wrapper.appendChild(element);<br />
element = next;<br />
}<br />
}<br />
<br />
function updateSectionFromNote (section, note) {<br />
if (note.textContent.match(/available since/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-added', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.textContent.match(/removed in/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-removed', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
}<br />
<br />
function QueryIterator (query) {<br />
return function (callback) {<br />
return array(document.querySelectorAll(query)).forEach(callback);<br />
}<br />
}<br />
<br />
var withSections = QueryIterator('*[data-love-filterable]');<br />
var withAdded = QueryIterator('*[data-love-version-added]');<br />
var withRemoved = QueryIterator('*[data-love-version-removed]');<br />
var withAddedRemoved = QueryIterator('*[data-love-version-added][data-love-version-removed]');<br />
var withNotes = QueryIterator('*[data-love-version-note]');<br />
<br />
function hideNotes () {<br />
withNotes(function (note) { note.style.display = 'none' });<br />
}<br />
<br />
function showNotes () {<br />
withNotes(function (note) { note.style.display = null });<br />
}<br />
<br />
var needsFilter = false;<br />
<br />
function scanSections () {<br />
withSections(function (section) {<br />
var note = section.querySelector('table');<br />
if (!note) {<br />
return;<br />
}<br />
updateSectionFromNote(section, note);<br />
while (note.nextSibling && note.nextSibling.tagName == 'TABLE') {<br />
note = note.nextSibling;<br />
updateSectionFromNote(section, note);<br />
}<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
function scanTables () {<br />
var added = document.querySelectorAll('.smwtable *[alt="Added since"] + *');<br />
var removed = document.querySelectorAll('.smwtable *[alt="Removed in"] + *');<br />
<br />
array(added).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-added', a.title);<br />
needsFilter = true;<br />
});<br />
array(removed).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-removed', a.title);<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
// return true if 'installed' is greater than or equal to 'required'<br />
// http://stackoverflow.com/a/6832670<br />
function compareVersions (installed, required) {<br />
var a = installed.split('.');<br />
var b = required.split('.');<br />
<br />
for (var i = 0; i < a.length; ++i) {<br />
a[i] = Number(a[i]);<br />
}<br />
for (var i = 0; i < b.length; ++i) {<br />
b[i] = Number(b[i]);<br />
}<br />
if (a.length == 2) {<br />
a[2] = 0;<br />
}<br />
if (b.length == 2) {<br />
b[2] = 0;<br />
}<br />
<br />
if (a[0] > b[0]) return true;<br />
if (a[0] < b[0]) return false;<br />
<br />
if (a[1] > b[1]) return true;<br />
if (a[1] < b[1]) return false;<br />
<br />
if (a[2] > b[2]) return true;<br />
if (a[2] < b[2]) return false;<br />
<br />
return true;<br />
}<br />
<br />
function filterVersion (installed) {<br />
filterAll(hideNotes);<br />
withAdded(function (section) {<br />
var required = section.getAttribute('data-love-version-added');<br />
if (!compareVersions(installed, required)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withRemoved(function (section) {<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions (installed, removed)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed) && compareVersions(installed, added)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function filterAll (hideOrShowNotes) {<br />
hideOrShowNotes();<br />
withSections(function (section) { section.style.display = null });<br />
}<br />
<br />
function filterLatest () {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) { section.style.display = 'none' });<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function applyFilter (value) {<br />
storeValue('versionpicker-version', value);<br />
if (value == 'all') {<br />
filterAll(showNotes);<br />
return;<br />
}<br />
if (value == 'latest') {<br />
filterLatest();<br />
return;<br />
}<br />
filterVersion(value);<br />
}<br />
<br />
function injectFilterPicker () {<br />
var target = document.getElementById('ca-nstab-main').parentNode;<br />
<br />
picker.style.position = 'absolute';<br />
picker.style.right = 0;<br />
picker.style.height = target.parentNode.offsetHeight - 8 + 'px';<br />
picker.style.margin = '4px';<br />
<br />
target.parentNode.insertBefore(picker, target);<br />
}<br />
<br />
function injectVersionTag (number, name) {<br />
injectPickerOption(number, 'Version ' + number + ': ' + name);<br />
}<br />
<br />
function injectVersionTags () {<br />
var versions = [<br />
{"version": "11.0", "codename": "Mysterious Mysteries"},<br />
{"version": "0.10.2", "codename": "Super Toast"},<br />
{"version": "0.10.1", "codename": "Super Toast"},<br />
{"version": "0.10.0", "codename": "Super Toast"},<br />
{"version": "0.9.2", "codename": "Baby Inspector"},<br />
{"version": "0.9.1", "codename": "Baby Inspector"},<br />
{"version": "0.9.0", "codename": "Baby Inspector"},<br />
{"version": "0.8.0", "codename": "Rubber Piggy"},<br />
{"version": "0.7.2", "codename": "Game Slave"},<br />
{"version": "0.7.1", "codename": "Game Slave"},<br />
{"version": "0.7.0", "codename": "Game Slave"},<br />
{"version": "0.6.2", "codename": "Jiggly Juice"},<br />
{"version": "0.6.1", "codename": "Jiggly Juice"},<br />
{"version": "0.6.0", "codename": "Jiggly Juice"},<br />
{"version": "0.5.0", "codename": "Salted Nuts"},<br />
{"version": "0.4.0", "codename": "Taco Beam"},<br />
{"version": "0.3.2", "codename": "Lemony Fresh"},<br />
{"version": "0.3.1", "codename": "Space Meat"},<br />
{"version": "0.3.0", "codename": "Mutant Vermin"},<br />
{"version": "0.2.1", "codename": "Impending Doom"},<br />
{"version": "0.2.0", "codename": "Mini Moose"},<br />
{"version": "0.1.1", "codename": "Santa Power"}<br />
]<br />
<br />
for (var i = 0; i < versions.length; i++) {<br />
injectVersionTag(versions[i].version, versions[i].codename);<br />
}<br />
}<br />
<br />
function queryVersionTags () {<br />
var url = '/w/index.php?title=Version_History&action=raw';<br />
var xhr = new XMLHttpRequest();<br />
xhr.onload = function () {<br />
var re = /\[\[([\d.]+)\]\][^\n]*\n[^\|]*\|(.*)\n/gm;<br />
var m;<br />
<br />
while (m = re.exec(this.responseText)) {<br />
injectVersionTag(m[1], m[2]);<br />
}<br />
}<br />
xhr.open('get', url, true);<br />
xhr.send();<br />
}<br />
<br />
function setPicker (target) {<br />
for (var i = 0; i < picker.options.length; ++i) {<br />
if (picker.options[i].value === target) {<br />
picker.selectedIndex = i;<br />
picker.onchange();<br />
break;<br />
}<br />
}<br />
}<br />
<br />
function main () {<br />
wrapSections();<br />
scanSections();<br />
scanTables();<br />
injectPickerOption('all', 'All Versions');<br />
injectPickerOption('latest', 'Latest Version');<br />
injectVersionTags();<br />
injectFilterPicker();<br />
var target = retrieveValue('versionpicker-version');<br />
if (target !== undefined) {<br />
setPicker(target);<br />
}<br />
}<br />
<br />
main();<br />
}<br />
<br />
versionpicker();</div>
Bartbes
http://www.love2d.org/w/index.php?title=Template:CURRENTLOVE&diff=21285
Template:CURRENTLOVE
2018-04-01T21:06:47Z
<p>Bartbes: 11.0 released</p>
<hr />
<div>110</div>
Bartbes
http://www.love2d.org/w/index.php?title=Version_History&diff=21284
Version History
2018-04-01T21:05:54Z
<p>Bartbes: 11.0 released</p>
<hr />
<div>Click on a version number to view the complete changelog of that version.<br />
<br />
{| border="1" cellpadding="5" cellspacing="1" style="background-color:#E9F5FF; border: 1px solid #83C0F0;"<br />
! Version<br />
! Codename<br />
! Status<br />
|-<br />
|[[11.0]]<br />
|Mysterious Mysteries<br />
|Released: 2018-04-01<br />
|-<br />
|[[0.10.2]]<br />
|Super Toast<br />
|Released: 2016-10-31<br />
|-<br />
|[[0.10.1]]<br />
|Super Toast<br />
|Released: 2016-02-14<br />
|-<br />
|[[0.10.0]]<br />
|Super Toast<br />
|Released: 2015-12-22<br />
|-<br />
|[[0.9.2]]<br />
|Baby Inspector<br />
|Released: 2015-02-14<br />
|-<br />
|[[0.9.1]]<br />
|Baby Inspector<br />
|Released: 2014-04-01<br />
|-<br />
|[[0.9.0]]<br />
|Baby Inspector<br />
|Released: 2013-12-13<br />
|-<br />
|[[0.8.0]]<br />
|Rubber Piggy<br />
|Released: 2012-04-02<br />
|-<br />
|[[0.7.2]]<br />
|Game Slave<br />
|Released: 2011-05-04<br />
|-<br />
|[[0.7.1]]<br />
|Game Slave<br />
|Released: 2011-02-14<br />
|-<br />
|[[0.7.0]]<br />
|Game Slave<br />
|Released: 2010-12-05<br />
|-<br />
|[[0.6.2]]<br />
|Jiggly Juice<br />
|Released: 2010-03-06<br />
|-<br />
|[[0.6.1]]<br />
|Jiggly Juice<br />
|Released: 2010-02-07<br />
|-<br />
|[[0.6.0]]<br />
|Jiggly Juice<br />
|Released: 2009-12-24<br />
|-<br />
|[[0.5.0]]<br />
|Salted Nuts<br />
|Released: 2009-01-02<br />
|-<br />
|[[0.4.0]]<br />
|Taco Beam<br />
|Released: 2008-08-29<br />
|-<br />
|[[0.3.2]]<br />
|Lemony Fresh<br />
|Released: 2008-07-04<br />
|-<br />
|[[0.3.1]]<br />
|Space Meat<br />
|Released: 2008-06-21<br />
|-<br />
|[[0.3.0]]<br />
|Mutant Vermin<br />
|Released: 2008-06-17<br />
|-<br />
|[[0.2.1]]<br />
|Impending Doom<br />
|Released: 2008-03-29<br />
|-<br />
|[[0.2.0]]<br />
|Mini-Moose<br />
|Released: 2008-02-06<br />
|-<br />
|[[0.1.1]] (Initial Release)<br />
|Santa-Power<br />
|Released: 2008-01-13<br />
|}</div>
Bartbes
http://www.love2d.org/w/index.php?title=11.0&diff=21283
11.0
2018-04-01T21:05:30Z
<p>Bartbes: 11.0 released</p>
<hr />
<div>The codename for LÖVE 11.0 is '''Mysterious Mysteries'''. It is currently '''<span style="color:#0000ff;">released</span>'''.<br />
<br />
== Changes from [[0.10.2]] ==<br />
<br />
=== Additions ===<br />
* Added formal deprecation warnings, on by default for non-fused games.<br />
* Added [[love.setDeprecationOutput]] and [[love.hasDeprecationOutput]].<br />
* Added [[Object:release]].<br />
* Added [[Data:clone]].<br />
* Added [[love.audio.newQueueableSource|queueable audio Sources]].<br />
* Added [[RecordingDevice|microphone recording]] support.<br />
* Added low pass, high pass, and band pass [[Source:setFilter|filters]] to love.audio [[Source]]s.<br />
* Added audio [[Source:setEffect|effect]] APIs (reverb, echo, etc.)<br />
* Added variants of [[SoundData:getSample]] and [[SoundData:setSample]] which take a channel index parameter.<br />
* Added variants of [[love.audio.play]], [[love.audio.pause]], and [[love.audio.stop]] which take a list of [[Source]]s.<br />
* Added [[love.system.hasBackgroundMusic]].<br />
* Added variants of all table-with-fields-returning get* functions, the new variants take an existing table to fill in.<br />
* Added a variant to [[World:update]] for controlling the number of internal iterations to perform.<br />
* Added [[Body:isTouching]].<br />
* Added [[RopeJoint:setMaxLength]].<br />
* Added a click count argument to [[love.mousepressed]] and [[love.mousereleased]].<br />
* Added variants of [[love.filesystem.mount]] which accept a [[Data]] or [[FileData]] object containing zipped data.<br />
* Added [[love.filesystem.getInfo]] (replaces [[love.filesystem.exists]] / [[love.filesystem.isFile|isFile]] / [[love.filesystem.isDirectory|isDirectory]] / [[love.filesystem.isSymlink|isSymlink]] / [[love.filesystem.getLastModified|getLastModified]] / [[love.filesystem.getSize|getSize]]).<br />
* Added [[love.filesystem.setCRequirePath]] and [[love.filesystem.getCRequirePath]], and use that to find C libraries for require.<br />
* Added variants of [[(File):read|File:read]] and [[love.filesystem.read]] which take an enum to determine whether they return a [[FileData]] or a string.<br />
* Added [[Channel:hasRead]], which checks if a message has been read. Takes an id, which [[Channel:push]] will now return.<br />
* Added variants of [[Channel:demand]] and [[Channel:supply]] which take a timeout argument.<br />
* Added a default [[love.threaderror]] callback, which raises the error in the main thread.<br />
* Added [[love.data]] module. It includes hex/base64 [[love.data.encode|encoding functions]], MD5 and SHA [[love.data.hash|hashing]], [[love.data.pack|string packing]], [[love.data.compress|compression APIs]], and more.<br />
* Added [[Transform]] objects to [[love.math]].<br />
* Added support for different [[ImageData]] [[PixelFormat]]s, including RGBA8 (the default), RGBA16, RGBA16F, and RGBA32F.<br />
* Added the ability to load Radiance HDR, OpenEXR, and 16 bit PNG images.<br />
* Added [[love.graphics.getImageFormats]] (replaces [[love.graphics.getCompressedImageFormats]]).<br />
* Added the ability to specify a per-object pixel density scale factor when creating [[Image]]s, [[Canvas]]es, [[Font]]s, and [[Video]]s. Affects drawing.<br />
* Added [[Texture:getPixelWidth]], [[Texture:getPixelHeight]], [[love.graphics.getPixelWidth]], and [[love.graphics.getPixelHeight]].<br />
* Added [[Texture:getDPIScale]], [[love.graphics.getDPIScale]], and [[Font:getDPIScale]].<br />
* Added [[Texture:getMipmapCount]], [[Texture:getFormat|getFormat]], [[Texture:getLayerCount|getLayerCount]], [[Texture:getDepth|getDepth]], and [[Texture:getTextureType|getTextureType]].<br />
* Added Array, Cubemap, and Volume [[TextureType]]s and corresponding [[Texture]] APIs.<br />
* Added [[love.graphics.newArrayImage]], [[love.graphics.newVolumeImage|newVolumeImage]], [[love.graphics.newCubeImage|newCubeImage]], and variants to [[love.graphics.newCanvas]] for creating different texture types.<br />
* Added [[love.graphics.getTextureTypes]], which returns a table with fields indicating support for each [[TextureType]].<br />
* Added [[(Image):replacePixels|Image:replacePixels]] (replaces [[(Image):refresh|Image:refresh]]).<br />
* Added [[love.graphics.drawLayer]], [[SpriteBatch:addLayer]], and [[SpriteBatch:setLayer]] for easily drawing layers of [[TextureType|Array Textures]]<br />
* Added variants of [[love.graphics.print]] and [[love.graphics.printf]] which take a [[Font]] argument..<br />
* Added mipmapping support to [[Canvas]]es, including both auto-generated mipmaps and manually rendering to a specific mipmap level.<br />
* Added 'stencil8', 'depth24stencil8', 'depth32fstencil8', 'depth16', 'depth24', and 'depth32f' [[PixelFormat]]s for Canvases.<br />
* Added variant of [[love.graphics.newCanvas]] which accepts a table of settings.<br />
* Added optional 'readable' boolean field to the table passed into [[love.graphics.newCanvas]].<br />
* Added variant of [[love.graphics.getCanvasFormats]] which takes a 'readable' boolean.<br />
* Added optional 'depthstencil' field to the table passed into [[love.graphics.setCanvas]], for using a depth/stencil formatted [[Canvas]] when rendering.<br />
* Added optional 'depth' and 'stencil' boolean fields to the table passed into [[love.graphics.setCanvas]], for enabling internal depth and stencil buffers if 'depthstencil' isn't used.<br />
* Added [[Texture:setDepthSampleMode|shadow sampler]] support for [[Canvas]]es.<br />
* Added [[love.graphics.setDepthMode]] for using the depth buffer for depth testing/writes. Depth values of rendered objects can currently only be set via shaders.<br />
* Added [[love.graphics.setMeshCullMode]], for culling back- or front-facing triangles when drawing a [[Mesh]].<br />
* Added [[love.graphics.setFrontFaceWinding]].<br />
* Added variants of [[love.graphics.clear]] to control how the active depth and stencil buffers are cleared.<br />
* Added [[love.graphics.applyTransform]] and [[love.graphics.replaceTransform]].<br />
* Added [[love.graphics.transformPoint]] and [[love.graphics.inverseTransformPoint]].<br />
* Added [[love.graphics.getStackDepth]].<br />
* Added [[love.graphics.flushBatch]] for manually flushing automatically batched draws.<br />
* Added [[SpriteBatch:setDrawRange]].<br />
* Added [[File]] and [[FileData]] variants of [[love.graphics.newShader]].<br />
* Added per-[[Shader]] opt in support for the GLSL 3.30 and GLSL ES 3.00 shading languages.<br />
* Added 'void effect()' [[love.graphics.newShader|pixel shader entry point]].<br />
* Added [[love.graphics.validateShader]].<br />
* Added [[Shader:hasUniform]] (replaces [[Shader:getExternVariable]]).<br />
* Added support for non-square [[Shader]] uniform matrices on desktop platforms and on mobile GLSL 3.<br />
* Added [[Shader:send]](matrixname, is_column_major, matrix, ...) which specifies how to interpret the matrix table arguments.<br />
* Added [[Shader:send]] variants which accept a [[Data]] object.<br />
* Added 'borderellipse' and 'borderrectangle' [[ParticleSystem]] distributions.<br />
* Added variant of [[ParticleSystem:setEmissionArea]] which accepts an area angle and a flag for whether particle directions are relative to the center of the area.<br />
* Added [[love.graphics.captureScreenshot]] (replaces [[love.graphics.newScreenshot]]).<br />
* Added 'glsl3', 'instancing', 'fullnpot','pixelshaderhighp', and 'shaderderivatives' [[GraphicsFeature]]s.<br />
* Added 'anisotropy' graphics [[GraphicsLimit]].<br />
* Added 'drawcallsbatched' field to [[love.graphics.getStats]].<br />
* Added hardware [[Mesh]] instancing support via [[love.graphics.drawInstanced]] and a new [[Mesh:attachAttribute]] variant.<br />
* Added a [[Mesh:attachAttribute]] variant that takes a different target attribute name.<br />
* Added [[Mesh:detachAttribute]].<br />
* Added a variant of [[Mesh:setVertexMap]] which accepts a [[Data]] object.<br />
* Added the ability to prevent love from creating a stencil buffer for the window in [[love.conf]] and [[love.window.setMode]].<br />
* Added [[love.window.updateMode]].<br />
* Added [[love.window.isMinimized]].<br />
* Added [[love.window.restore]].<br />
* Added support for header-less DEFLATE to [[love.data.compress]]/[[love.data.decompress|decompress]].<br />
<br />
<br />
=== Renamed APIs ===<br />
All renamed APIs in 11.0 are deprecated rather than removed, until the next major release.<br />
* Renamed [[love.window.getPixelScale]] to [[love.window.getDPIScale]].<br />
* Renamed [[love.mouse.hasCursor]] to [[love.mouse.isCursorSupported]].<br />
* Renamed [[ParticleSystem:setAreaSpread]] to [[ParticleSystem:setEmissionArea]].<br />
* Renamed [[love.errhand]] to [[love.errorhandler]]. If love.errhand is defined and love.errorhandler isn't, it will continue to work.<br />
* Renamed [[Source:getChannels|Source]]/[[SoundData:getChannels|SoundData]]/[[Decoder:getChannels]] to [[Source:getChannelCount|Source]]/[[SoundData:getChannelCount|SoundData]]/[[Decoder:getChannelCount]].<br />
* Renamed [[PrismaticJoint:hasLimitsEnabled]] and [[RevoluteJoint:hasLimitsEnabled]] to [[PrismaticJoint:areLimitsEnabled]] and [[RevoluteJoint:areLimitsEnabled]].<br />
* Renamed [[love.audio.getSourceCount]] to [[love.audio.getActiveSourceCount]].<br />
* Renamed all get[Object]List functions to get[Object]s.<br />
<br />
<br />
=== Other Deprecations ===<br />
* Deprecated [[love.filesystem.exists]] / [[love.filesystem.isFile|isFile]] / [[love.filesystem.isDirectory|isDirectory]] / [[love.filesystem.isSymlink|isSymlink]] / [[love.filesystem.getLastModified|getLastModified]] / [[love.filesystem.getSize|getSize]] (use [[love.filesystem.getInfo]] instead).<br />
* Deprecated [[love.math.compress]] / [[love.math.decompress|decompress]] (use [[love.data.compress]] / [[love.data.decompress|decompress]] instead).<br />
<br />
<br />
=== Removals ===<br />
* Removed the default source type for [[love.audio.newSource]].<br />
* Removed [[Source:isStopped]] and [[Source:isPaused]]. Use [[Source:isPlaying]] instead.<br />
* Removed [[Source:rewind]]. Use [[Source:stop]] or [[Source:seek|Source:seek(0)]] instead.<br />
* Removed variant of [[love.filesystem.newFileData]] which takes base64 data, use [[love.data.decode]] instead.<br />
* Removed the no-argument variant of [[Text:set]], use [[Text:clear]] instead.<br />
* Removed [[(Image):getData|Image:getData]] and [[(Image):refresh|Image:refresh]], use [[(Image):replacePixels|Image:replacePixels]] instead.<br />
* Removed [[love.graphics.getCompressedImageFormats]], use [[love.graphics.getImageFormats]] instead.<br />
* Removed the 'void effects(...)' [[love.graphics.newShader|pixel shader entry point]]. Use the new 'void effect()' instead.<br />
* Removed [[Shader:getExternVariable]], use [[Shader:hasUniform]] instead.<br />
* Removed [[love.graphics.newScreenshot]], use [[love.graphics.captureScreenshot]] instead.<br />
* Removed deprecated [[enet]] function host:socket_get_address.<br />
* Removed functions deprecated in LÖVE 0.10.2:<br />
** Removed undocumented Shader:sendInt, Shader:sendBoolean, Shader:sentFloat, Shader:sendMatrix, and Shader:sendTexture methods (use [[Shader:send]] instead).<br />
** Removed [[love.window.isCreated]] (use [[love.window.isOpen]] instead).<br />
<br />
<br />
=== Other changes ===<br />
* Changed all color values to be in the range 0-1, rather than 0-255. This affects the following functions:<br />
** [[love.graphics.setColor]], [[love.graphics.getColor]], [[love.graphics.setBackgroundColor]], and [[love.graphics.getBackgroundColor]].<br />
** [[SpriteBatch:setColor]] and [[SpriteBatch:getColor]].<br />
** [[ParticleSystem:setColors]] and [[ParticleSystem:getColors]].<br />
** [[love.graphics.newMesh]], [[Mesh:setVertex]], and [[Mesh:getVertex]].<br />
** The colored text variants of [[love.graphics.print]], [[love.graphics.printf]], [[love.graphics.newText]], [[Text:set]], [[Text:setf]], [[Text:add]], and [[Text:addf]].<br />
** [[Shader:sendColor]].<br />
** [[love.graphics.points]].<br />
** [[ImageData:setPixel]], [[ImageData:getPixel]], and [[ImageData:mapPixel]].<br />
** [[love.math.gammaToLinear]] and [[love.math.linearToGamma]].<br />
<br />
* Changed high-dpi functionality to require much less code (often none at all) for graphics to appear at the correct sizes and positions.<br />
* Changed [[love.graphics.print]] and friends to ignore carriage returns.<br />
* Changed the 'multiply' [[BlendMode]] to error if not used with the 'premultiplied' [[BlendAlphaMode]], since the formula only works with that anyway.<br />
* Changed some [[love.graphics]], [[love.window]], and [[love.event]] APIs to cause an error if a [[Canvas]] is active.<br />
* Changed stenciling functionality with a [[Canvas]] active to require stencil=true (or a custom stencil-formatted [[Canvas]]) to be set in [[love.graphics.setCanvas]].<br />
* Changed [[Mesh:setDrawRange]] to take 'start' and 'count' parameters instead of 'min' and 'max'.<br />
* Changed the 'vsync' field of [[love.window.setMode]] and t.window in [[love.conf]]. It's now an integer with 0 disabling vsync.<br />
* Changed [[Channel]] and [[love.event.push]] table serialization to accept non-flat tables and detect cycles, cycles now cause an error rather than a stack overflow.<br />
* Changed [[Source]]s to either be playing or not playing, rather than playing, paused, or stopped. [[Source:stop]] now pauses and rewinds the Source.<br />
* Changed [[love.audio.pause|love.audio.pause()]] to return a list of [[Source]]s that have been paused by that call.<br />
* Changed [[Source]] seeking behaviour, all kinds of Sources now behave similarly when seeking past the boundaries.<br />
* Changed [[love.timer.step]] to return the calculated delta time.<br />
* Changed [[love.run]] and [[love.errorhandler]] to return a function for their main loop, which gets called until love quits.<br />
* Changed [[enet]] to no longer set the 'enet' global.<br />
* Changed [[love.keyboard.isDown]] and [[love.keyboard.isScancodeDown]] to error if an invalid enum value is given.<br />
<br />
* Updated and improved command line argument handling.<br />
* Updated the boot sequence to show an error instead of the no-game screen, if a nonexistant folder is passed in as the source game directory.<br />
* Updated 'love.exe --version' on Windows to print to the parent console.<br />
* Updated Android print rerouting and JIT compilation disabling to apply inside threads.<br />
* Updated invalid enum value error messages to show a list of the valid enum values.<br />
* Updated [[Source:seek]] to work if the [[Source]] isn't playing.<br />
* Updated [[love.math.random]] to have improved numeric distribution.<br />
* Updated [[love.graphics]] to support Core Profile OpenGL 3.3+ when available.<br />
* Updated [[Shader]]s to always expose derivative functions (dFdx, dFdy, fwidth) when available in OpenGL ES.<br />
* Updated [[Shader]]s to allow using VERTEX and PIXEL as variable names in shader code.<br />
* Updated [[love.graphics.circle]], [[love.graphics.ellipse]], [[love.graphics.arc]], and [[love.graphics.rectangle]] to take transformation scale into account when determining the number of segments to use.<br />
* Updated the error message when bad values are given to [[love.graphics.line]].<br />
* Updated [[Font]] glyph generation to improve antialiasing.<br />
* Updated [[Canvas:newImageData]] to return an [[ImageData]] with a format that matches the [[Canvas]]' as closely as possible.<br />
* Updated [[love.graphics.newImage]] to treat file names ending with "@2x", "@3x", etc. as a pixel density scale factor if none is explicitly supplied.<br />
* Updated the maximum [[love.graphics]] transformation/state [[love.graphics.push|stack depth]] from 64 to 128.<br />
* Updated the default error handler to allow copying the error to the clipboard when the user decides to do so.<br />
* Updated [[love.filesystem.setRequirePath]] to support multiple template '?' characters in each path.<br />
* Updated [[socket|luasocket]] to version 3.0rc1.<br />
* Updated [[love.joystick.loadGamepadMappings]] so it doesn't error when given an empty string.<br />
* Updated [[love.joystick.setGamepadMapping]] to use the controller's name for the new mapping when possible.<br />
<br />
<br />
=== Performance Improvements ===<br />
* Improved performance when drawing [[Texture]]s, shapes, lines, and points by automatically batching their draw calls together when possible.<br />
* Improved performance of [[Shader:send]] when the Shader is not active.<br />
* Improved performance of [[love.math.randomNormal]] when LuaJIT's JIT compiler is enabled. <br />
* Improved performance of [[love.filesystem.lines]] and [[(File):lines|File:lines]], especially when reading from a file inside a zip/.love.<br />
<br />
<br />
=== Fixes ===<br />
* Fixed an error in the default [[love.errhand|error handler]] when the error message contains non UTF-8 bytes.<br />
* Fixed a memory leak when sending love [[Object]]s to threads which never load that object's module.<br />
* Fixed a memory leak in [[enet]] when peer:send fails.<br />
* Fixed os.execute always returning -1 in Linux.<br />
* Fixed the default reference angle for [[WeldJoint]], [[PrismaticJoint]], and [[RevoluteJoint]].<br />
* Fixed [[Fixture:getShape]] to reuse the existing internal [[Fixture]]-owned [[Shape]].<br />
* Fixed [[MouseJoint:setFrequency]] to error instead of crashing if a frequency of 0 is set.<br />
* Fixed [[love.system.setClipboardText]] and [[love.system.getClipboardText]] to error instead of crashing, when a window hasn't been created.<br />
* Fixed [[Joystick:getGamepadMapping]] to work with xinput controllers.<br />
* Fixed [[love.joystick.setGamepadMapping]]'s replacement code.<br />
* Fixed baseline calculation when rendering text.<br />
* Fixed [[Shader:send]] and [[Shader:sendColor]] ignoring the last argument for an array.<br />
* Fixed [[Shader Variables|VaryingTexCoords]] and [[Shader Variables|love_ScreenSize]] in shaders to be 'highp' in OpenGL ES, when supported.<br />
* Fixed a crash when [[love.graphics.pop]] is called after [[love.window.setMode]] while the transformation stack was not empty.<br />
* Fixed [[ParticleSystem:setParticleLifetime]] to error if a negative value is given.<br />
* Fixed [[love.window.isMaximized]].<br />
* Fixed [[Video]] playback to work with a wider range of Ogg Theora files.<br />
* Fixed [[Video]] seeking to be faster.<br />
* Fixed [[BezierCurve]]s to error instead of hanging in some situations.<br />
* Fixed compilation of [[socket|luasocket]] with newer luajit 2.1.0 beta versions.<br />
<br />
<br />
[[Category:Versions]]</div>
Bartbes
http://www.love2d.org/w/index.php?title=Version_History&diff=21247
Version History
2018-04-01T19:47:25Z
<p>Bartbes: 0.11.0 → 11.0</p>
<hr />
<div>Click on a version number to view the complete changelog of that version.<br />
<br />
{| border="1" cellpadding="5" cellspacing="1" style="background-color:#E9F5FF; border: 1px solid #83C0F0;"<br />
! Version<br />
! Codename<br />
! Status<br />
|-<br />
|[[11.0]]<br />
|Mysterious Mysteries<br />
|In Development<br />
|-<br />
|[[0.10.2]]<br />
|Super Toast<br />
|Released: 2016-10-31<br />
|-<br />
|[[0.10.1]]<br />
|Super Toast<br />
|Released: 2016-02-14<br />
|-<br />
|[[0.10.0]]<br />
|Super Toast<br />
|Released: 2015-12-22<br />
|-<br />
|[[0.9.2]]<br />
|Baby Inspector<br />
|Released: 2015-02-14<br />
|-<br />
|[[0.9.1]]<br />
|Baby Inspector<br />
|Released: 2014-04-01<br />
|-<br />
|[[0.9.0]]<br />
|Baby Inspector<br />
|Released: 2013-12-13<br />
|-<br />
|[[0.8.0]]<br />
|Rubber Piggy<br />
|Released: 2012-04-02<br />
|-<br />
|[[0.7.2]]<br />
|Game Slave<br />
|Released: 2011-05-04<br />
|-<br />
|[[0.7.1]]<br />
|Game Slave<br />
|Released: 2011-02-14<br />
|-<br />
|[[0.7.0]]<br />
|Game Slave<br />
|Released: 2010-12-05<br />
|-<br />
|[[0.6.2]]<br />
|Jiggly Juice<br />
|Released: 2010-03-06<br />
|-<br />
|[[0.6.1]]<br />
|Jiggly Juice<br />
|Released: 2010-02-07<br />
|-<br />
|[[0.6.0]]<br />
|Jiggly Juice<br />
|Released: 2009-12-24<br />
|-<br />
|[[0.5.0]]<br />
|Salted Nuts<br />
|Released: 2009-01-02<br />
|-<br />
|[[0.4.0]]<br />
|Taco Beam<br />
|Released: 2008-08-29<br />
|-<br />
|[[0.3.2]]<br />
|Lemony Fresh<br />
|Released: 2008-07-04<br />
|-<br />
|[[0.3.1]]<br />
|Space Meat<br />
|Released: 2008-06-21<br />
|-<br />
|[[0.3.0]]<br />
|Mutant Vermin<br />
|Released: 2008-06-17<br />
|-<br />
|[[0.2.1]]<br />
|Impending Doom<br />
|Released: 2008-03-29<br />
|-<br />
|[[0.2.0]]<br />
|Mini-Moose<br />
|Released: 2008-02-06<br />
|-<br />
|[[0.1.1]] (Initial Release)<br />
|Santa-Power<br />
|Released: 2008-01-13<br />
|}</div>
Bartbes
http://www.love2d.org/w/index.php?title=11.0&diff=21246
11.0
2018-04-01T19:46:14Z
<p>Bartbes: Update changelog</p>
<hr />
<div>{{notice|The information on this page may not be accurate or up to date due to the information pertaining to a version that is currently in development.}}<br />
<br />
The codename for LÖVE 11.0 is '''Mysterious Mysteries'''. It is currently '''<span style="color:#ff0000;">not released</span>'''.<br />
<br />
== Changes from [[0.10.2]] ==<br />
<br />
=== Additions ===<br />
* Added formal deprecation warnings, on by default for non-fused games.<br />
* Added [[love.setDeprecationOutput]] and [[love.hasDeprecationOutput]].<br />
* Added [[Object:release]].<br />
* Added [[Data:clone]].<br />
* Added [[love.audio.newQueueableSource|queueable audio Sources]].<br />
* Added [[RecordingDevice|microphone recording]] support.<br />
* Added low pass, high pass, and band pass [[Source:setFilter|filters]] to love.audio [[Source]]s.<br />
* Added audio [[Source:setEffect|effect]] APIs (reverb, echo, etc.)<br />
* Added variants of [[SoundData:getSample]] and [[SoundData:setSample]] which take a channel index parameter.<br />
* Added variants of [[love.audio.play]], [[love.audio.pause]], and [[love.audio.stop]] which take a list of [[Source]]s.<br />
* Added [[love.system.hasBackgroundMusic]].<br />
* Added variants of all table-with-fields-returning get* functions, the new variants take an existing table to fill in.<br />
* Added a variant to [[World:update]] for controlling the number of internal iterations to perform.<br />
* Added [[Body:isTouching]].<br />
* Added [[RopeJoint:setMaxLength]].<br />
* Added a click count argument to [[love.mousepressed]] and [[love.mousereleased]].<br />
* Added variants of [[love.filesystem.mount]] which accept a [[Data]] or [[FileData]] object containing zipped data.<br />
* Added [[love.filesystem.getInfo]] (replaces [[love.filesystem.exists]] / [[love.filesystem.isFile|isFile]] / [[love.filesystem.isDirectory|isDirectory]] / [[love.filesystem.isSymlink|isSymlink]] / [[love.filesystem.getLastModified|getLastModified]] / [[love.filesystem.getSize|getSize]]).<br />
* Added [[love.filesystem.setCRequirePath]] and [[love.filesystem.getCRequirePath]], and use that to find C libraries for require.<br />
* Added variants of [[(File):read|File:read]] and [[love.filesystem.read]] which take an enum to determine whether they return a [[FileData]] or a string.<br />
* Added [[Channel:hasRead]], which checks if a message has been read. Takes an id, which [[Channel:push]] will now return.<br />
* Added variants of [[Channel:demand]] and [[Channel:supply]] which take a timeout argument.<br />
* Added a default [[love.threaderror]] callback, which raises the error in the main thread.<br />
* Added [[love.data]] module. It includes hex/base64 [[love.data.encode|encoding functions]], MD5 and SHA [[love.data.hash|hashing]], [[love.data.pack|string packing]], [[love.data.compress|compression APIs]], and more.<br />
* Added [[Transform]] objects to [[love.math]].<br />
* Added support for different [[ImageData]] [[PixelFormat]]s, including RGBA8 (the default), RGBA16, RGBA16F, and RGBA32F.<br />
* Added the ability to load Radiance HDR, OpenEXR, and 16 bit PNG images.<br />
* Added [[love.graphics.getImageFormats]] (replaces [[love.graphics.getCompressedImageFormats]]).<br />
* Added the ability to specify a per-object pixel density scale factor when creating [[Image]]s, [[Canvas]]es, [[Font]]s, and [[Video]]s. Affects drawing.<br />
* Added [[Texture:getPixelWidth]], [[Texture:getPixelHeight]], [[love.graphics.getPixelWidth]], and [[love.graphics.getPixelHeight]].<br />
* Added [[Texture:getDPIScale]], [[love.graphics.getDPIScale]], and [[Font:getDPIScale]].<br />
* Added [[Texture:getMipmapCount]], [[Texture:getFormat|getFormat]], [[Texture:getLayerCount|getLayerCount]], [[Texture:getDepth|getDepth]], and [[Texture:getTextureType|getTextureType]].<br />
* Added Array, Cubemap, and Volume [[TextureType]]s and corresponding [[Texture]] APIs.<br />
* Added [[love.graphics.newArrayImage]], [[love.graphics.newVolumeImage|newVolumeImage]], [[love.graphics.newCubeImage|newCubeImage]], and variants to [[love.graphics.newCanvas]] for creating different texture types.<br />
* Added [[love.graphics.getTextureTypes]], which returns a table with fields indicating support for each [[TextureType]].<br />
* Added [[(Image):replacePixels|Image:replacePixels]] (replaces [[(Image):refresh|Image:refresh]]).<br />
* Added [[love.graphics.drawLayer]], [[SpriteBatch:addLayer]], and [[SpriteBatch:setLayer]] for easily drawing layers of [[TextureType|Array Textures]]<br />
* Added variants of [[love.graphics.print]] and [[love.graphics.printf]] which take a [[Font]] argument..<br />
* Added mipmapping support to [[Canvas]]es, including both auto-generated mipmaps and manually rendering to a specific mipmap level.<br />
* Added 'stencil8', 'depth24stencil8', 'depth32fstencil8', 'depth16', 'depth24', and 'depth32f' [[PixelFormat]]s for Canvases.<br />
* Added variant of [[love.graphics.newCanvas]] which accepts a table of settings.<br />
* Added optional 'readable' boolean field to the table passed into [[love.graphics.newCanvas]].<br />
* Added variant of [[love.graphics.getCanvasFormats]] which takes a 'readable' boolean.<br />
* Added optional 'depthstencil' field to the table passed into [[love.graphics.setCanvas]], for using a depth/stencil formatted [[Canvas]] when rendering.<br />
* Added optional 'depth' and 'stencil' boolean fields to the table passed into [[love.graphics.setCanvas]], for enabling internal depth and stencil buffers if 'depthstencil' isn't used.<br />
* Added [[Texture:setDepthSampleMode|shadow sampler]] support for [[Canvas]]es.<br />
* Added [[love.graphics.setDepthMode]] for using the depth buffer for depth testing/writes. Depth values of rendered objects can currently only be set via shaders.<br />
* Added [[love.graphics.setMeshCullMode]], for culling back- or front-facing triangles when drawing a [[Mesh]].<br />
* Added [[love.graphics.setFrontFaceWinding]].<br />
* Added variants of [[love.graphics.clear]] to control how the active depth and stencil buffers are cleared.<br />
* Added [[love.graphics.applyTransform]] and [[love.graphics.replaceTransform]].<br />
* Added [[love.graphics.transformPoint]] and [[love.graphics.inverseTransformPoint]].<br />
* Added [[love.graphics.getStackDepth]].<br />
* Added [[love.graphics.flushBatch]] for manually flushing automatically batched draws.<br />
* Added [[SpriteBatch:setDrawRange]].<br />
* Added [[File]] and [[FileData]] variants of [[love.graphics.newShader]].<br />
* Added per-[[Shader]] opt in support for the GLSL 3.30 and GLSL ES 3.00 shading languages.<br />
* Added 'void effect()' [[love.graphics.newShader|pixel shader entry point]].<br />
* Added [[love.graphics.validateShader]].<br />
* Added [[Shader:hasUniform]] (replaces [[Shader:getExternVariable]]).<br />
* Added support for non-square [[Shader]] uniform matrices on desktop platforms and on mobile GLSL 3.<br />
* Added [[Shader:send]](matrixname, is_column_major, matrix, ...) which specifies how to interpret the matrix table arguments.<br />
* Added [[Shader:send]] variants which accept a [[Data]] object.<br />
* Added 'borderellipse' and 'borderrectangle' [[ParticleSystem]] distributions.<br />
* Added variant of [[ParticleSystem:setEmissionArea]] which accepts an area angle and a flag for whether particle directions are relative to the center of the area.<br />
* Added [[love.graphics.captureScreenshot]] (replaces [[love.graphics.newScreenshot]]).<br />
* Added 'glsl3', 'instancing', 'fullnpot','pixelshaderhighp', and 'shaderderivatives' [[GraphicsFeature]]s.<br />
* Added 'anisotropy' graphics [[GraphicsLimit]].<br />
* Added 'drawcallsbatched' field to [[love.graphics.getStats]].<br />
* Added hardware [[Mesh]] instancing support via [[love.graphics.drawInstanced]] and a new [[Mesh:attachAttribute]] variant.<br />
* Added a [[Mesh:attachAttribute]] variant that takes a different target attribute name.<br />
* Added [[Mesh:detachAttribute]].<br />
* Added a variant of [[Mesh:setVertexMap]] which accepts a [[Data]] object.<br />
* Added the ability to prevent love from creating a stencil buffer for the window in [[love.conf]] and [[love.window.setMode]].<br />
* Added [[love.window.updateMode]].<br />
* Added [[love.window.isMinimized]].<br />
* Added [[love.window.restore]].<br />
* Added support for header-less DEFLATE to [[love.data.compress]]/[[love.data.decompress|decompress]].<br />
<br />
<br />
=== Renamed APIs ===<br />
All renamed APIs in 0.11.0 are deprecated rather than removed, until the next major release.<br />
* Renamed [[love.window.getPixelScale]] to [[love.window.getDPIScale]].<br />
* Renamed [[love.mouse.hasCursor]] to [[love.mouse.isCursorSupported]].<br />
* Renamed [[ParticleSystem:setAreaSpread]] to [[ParticleSystem:setEmissionArea]].<br />
* Renamed [[love.errhand]] to [[love.errorhandler]]. If love.errhand is defined and love.errorhandler isn't, it will continue to work.<br />
* Renamed [[Source:getChannels|Source]]/[[SoundData:getChannels|SoundData]]/[[Decoder:getChannels]] to [[Source:getChannelCount|Source]]/[[SoundData:getChannelCount|SoundData]]/[[Decoder:getChannelCount]].<br />
* Renamed [[PrismaticJoint:hasLimitsEnabled]] and [[RevoluteJoint:hasLimitsEnabled]] to [[PrismaticJoint:areLimitsEnabled]] and [[RevoluteJoint:areLimitsEnabled]].<br />
* Renamed [[love.audio.getSourceCount]] to [[love.audio.getActiveSourceCount]].<br />
* Renamed all get[Object]List functions to get[Object]s.<br />
<br />
<br />
=== Other Deprecations ===<br />
* Deprecated [[love.filesystem.exists]] / [[love.filesystem.isFile|isFile]] / [[love.filesystem.isDirectory|isDirectory]] / [[love.filesystem.isSymlink|isSymlink]] / [[love.filesystem.getLastModified|getLastModified]] / [[love.filesystem.getSize|getSize]] (use [[love.filesystem.getInfo]] instead).<br />
* Deprecated [[love.math.compress]] / [[love.math.decompress|decompress]] (use [[love.data.compress]] / [[love.data.decompress|decompress]] instead).<br />
<br />
<br />
=== Removals ===<br />
* Removed the default source type for [[love.audio.newSource]].<br />
* Removed [[Source:isStopped]] and [[Source:isPaused]]. Use [[Source:isPlaying]] instead.<br />
* Removed [[Source:rewind]]. Use [[Source:stop]] or [[Source:seek|Source:seek(0)]] instead.<br />
* Removed variant of [[love.filesystem.newFileData]] which takes base64 data, use [[love.data.decode]] instead.<br />
* Removed the no-argument variant of [[Text:set]], use [[Text:clear]] instead.<br />
* Removed [[(Image):getData|Image:getData]] and [[(Image):refresh|Image:refresh]], use [[(Image):replacePixels|Image:replacePixels]] instead.<br />
* Removed [[love.graphics.getCompressedImageFormats]], use [[love.graphics.getImageFormats]] instead.<br />
* Removed the 'void effects(...)' [[love.graphics.newShader|pixel shader entry point]]. Use the new 'void effect()' instead.<br />
* Removed [[Shader:getExternVariable]], use [[Shader:hasUniform]] instead.<br />
* Removed [[love.graphics.newScreenshot]], use [[love.graphics.captureScreenshot]] instead.<br />
* Removed deprecated [[enet]] function host:socket_get_address.<br />
* Removed functions deprecated in LÖVE 0.10.2:<br />
** Removed undocumented Shader:sendInt, Shader:sendBoolean, Shader:sentFloat, Shader:sendMatrix, and Shader:sendTexture methods (use [[Shader:send]] instead).<br />
** Removed [[love.window.isCreated]] (use [[love.window.isOpen]] instead).<br />
<br />
<br />
=== Other changes ===<br />
* Changed all color values to be in the range 0-1, rather than 0-255. This affects the following functions:<br />
** [[love.graphics.setColor]], [[love.graphics.getColor]], [[love.graphics.setBackgroundColor]], and [[love.graphics.getBackgroundColor]].<br />
** [[SpriteBatch:setColor]] and [[SpriteBatch:getColor]].<br />
** [[ParticleSystem:setColors]] and [[ParticleSystem:getColors]].<br />
** [[love.graphics.newMesh]], [[Mesh:setVertex]], and [[Mesh:getVertex]].<br />
** The colored text variants of [[love.graphics.print]], [[love.graphics.printf]], [[love.graphics.newText]], [[Text:set]], [[Text:setf]], [[Text:add]], and [[Text:addf]].<br />
** [[Shader:sendColor]].<br />
** [[love.graphics.points]].<br />
** [[ImageData:setPixel]], [[ImageData:getPixel]], and [[ImageData:mapPixel]].<br />
** [[love.math.gammaToLinear]] and [[love.math.linearToGamma]].<br />
<br />
* Changed high-dpi functionality to require much less code (often none at all) for graphics to appear at the correct sizes and positions.<br />
* Changed [[love.graphics.print]] and friends to ignore carriage returns.<br />
* Changed the 'multiply' [[BlendMode]] to error if not used with the 'premultiplied' [[BlendAlphaMode]], since the formula only works with that anyway.<br />
* Changed some [[love.graphics]], [[love.window]], and [[love.event]] APIs to cause an error if a [[Canvas]] is active.<br />
* Changed stenciling functionality with a [[Canvas]] active to require stencil=true (or a custom stencil-formatted [[Canvas]]) to be set in [[love.graphics.setCanvas]].<br />
* Changed [[Mesh:setDrawRange]] to take 'start' and 'count' parameters instead of 'min' and 'max'.<br />
* Changed the 'vsync' field of [[love.window.setMode]] and t.window in [[love.conf]]. It's now an integer with 0 disabling vsync.<br />
* Changed [[Channel]] and [[love.event.push]] table serialization to accept non-flat tables and detect cycles, cycles now cause an error rather than a stack overflow.<br />
* Changed [[Source]]s to either be playing or not playing, rather than playing, paused, or stopped. [[Source:stop]] now pauses and rewinds the Source.<br />
* Changed [[love.audio.pause|love.audio.pause()]] to return a list of [[Source]]s that have been paused by that call.<br />
* Changed [[Source]] seeking behaviour, all kinds of Sources now behave similarly when seeking past the boundaries.<br />
* Changed [[love.timer.step]] to return the calculated delta time.<br />
* Changed [[love.run]] and [[love.errorhandler]] to return a function for their main loop, which gets called until love quits.<br />
* Changed [[enet]] to no longer set the 'enet' global.<br />
* Changed [[love.keyboard.isDown]] and [[love.keyboard.isScancodeDown]] to error if an invalid enum value is given.<br />
<br />
* Updated and improved command line argument handling.<br />
* Updated the boot sequence to show an error instead of the no-game screen, if a nonexistant folder is passed in as the source game directory.<br />
* Updated 'love.exe --version' on Windows to print to the parent console.<br />
* Updated Android print rerouting and JIT compilation disabling to apply inside threads.<br />
* Updated invalid enum value error messages to show a list of the valid enum values.<br />
* Updated [[Source:seek]] to work if the [[Source]] isn't playing.<br />
* Updated [[love.math.random]] to have improved numeric distribution.<br />
* Updated [[love.graphics]] to support Core Profile OpenGL 3.3+ when available.<br />
* Updated [[Shader]]s to always expose derivative functions (dFdx, dFdy, fwidth) when available in OpenGL ES.<br />
* Updated [[Shader]]s to allow using VERTEX and PIXEL as variable names in shader code.<br />
* Updated [[love.graphics.circle]], [[love.graphics.ellipse]], [[love.graphics.arc]], and [[love.graphics.rectangle]] to take transformation scale into account when determining the number of segments to use.<br />
* Updated the error message when bad values are given to [[love.graphics.line]].<br />
* Updated [[Font]] glyph generation to improve antialiasing.<br />
* Updated [[Canvas:newImageData]] to return an [[ImageData]] with a format that matches the [[Canvas]]' as closely as possible.<br />
* Updated [[love.graphics.newImage]] to treat file names ending with "@2x", "@3x", etc. as a pixel density scale factor if none is explicitly supplied.<br />
* Updated the maximum [[love.graphics]] transformation/state [[love.graphics.push|stack depth]] from 64 to 128.<br />
* Updated the default error handler to allow copying the error to the clipboard when the user decides to do so.<br />
* Updated [[love.filesystem.setRequirePath]] to support multiple template '?' characters in each path.<br />
* Updated [[socket|luasocket]] to version 3.0rc1.<br />
* Updated [[love.joystick.loadGamepadMappings]] so it doesn't error when given an empty string.<br />
* Updated [[love.joystick.setGamepadMapping]] to use the controller's name for the new mapping when possible.<br />
<br />
<br />
=== Performance Improvements ===<br />
* Improved performance when drawing [[Texture]]s, shapes, lines, and points by automatically batching their draw calls together when possible.<br />
* Improved performance of [[Shader:send]] when the Shader is not active.<br />
* Improved performance of [[love.math.randomNormal]] when LuaJIT's JIT compiler is enabled. <br />
* Improved performance of [[love.filesystem.lines]] and [[(File):lines|File:lines]], especially when reading from a file inside a zip/.love.<br />
<br />
<br />
=== Fixes ===<br />
* Fixed an error in the default [[love.errhand|error handler]] when the error message contains non UTF-8 bytes.<br />
* Fixed a memory leak when sending love [[Object]]s to threads which never load that object's module.<br />
* Fixed a memory leak in [[enet]] when peer:send fails.<br />
* Fixed os.execute always returning -1 in Linux.<br />
* Fixed the default reference angle for [[WeldJoint]], [[PrismaticJoint]], and [[RevoluteJoint]].<br />
* Fixed [[Fixture:getShape]] to reuse the existing internal [[Fixture]]-owned [[Shape]].<br />
* Fixed [[MouseJoint:setFrequency]] to error instead of crashing if a frequency of 0 is set.<br />
* Fixed [[love.system.setClipboardText]] and [[love.system.getClipboardText]] to error instead of crashing, when a window hasn't been created.<br />
* Fixed [[Joystick:getGamepadMapping]] to work with xinput controllers.<br />
* Fixed [[love.joystick.setGamepadMapping]]'s replacement code.<br />
* Fixed baseline calculation when rendering text.<br />
* Fixed [[Shader:send]] and [[Shader:sendColor]] ignoring the last argument for an array.<br />
* Fixed [[Shader Variables|VaryingTexCoords]] and [[Shader Variables|love_ScreenSize]] in shaders to be 'highp' in OpenGL ES, when supported.<br />
* Fixed a crash when [[love.graphics.pop]] is called after [[love.window.setMode]] while the transformation stack was not empty.<br />
* Fixed [[ParticleSystem:setParticleLifetime]] to error if a negative value is given.<br />
* Fixed [[love.window.isMaximized]].<br />
* Fixed [[Video]] playback to work with a wider range of Ogg Theora files.<br />
* Fixed [[Video]] seeking to be faster.<br />
* Fixed [[BezierCurve]]s to error instead of hanging in some situations.<br />
* Fixed compilation of [[socket|luasocket]] with newer luajit 2.1.0 beta versions.<br />
<br />
<br />
[[Category:Versions]]</div>
Bartbes
http://www.love2d.org/w/index.php?title=0.11.0&diff=21245
0.11.0
2018-04-01T19:40:58Z
<p>Bartbes: Bartbes moved page 0.11.0 to 11.0: Renumbered</p>
<hr />
<div>#REDIRECT [[11.0]]</div>
Bartbes
http://www.love2d.org/w/index.php?title=11.0&diff=21244
11.0
2018-04-01T19:40:57Z
<p>Bartbes: Bartbes moved page 0.11.0 to 11.0: Renumbered</p>
<hr />
<div>{{notice|The information on this page may not be accurate or up to date due to the information pertaining to a version that is currently in development.}}<br />
<br />
The codename for LÖVE 0.11.0 is '''Mysterious Mysteries'''. It is currently '''<span style="color:#ff0000;">not released</span>'''.<br />
<br />
== Changes from [[0.10.2]] ==<br />
<br />
=== Additions ===<br />
* Added formal deprecation warnings, on by default for non-fused games.<br />
* Added [[love.setDeprecationOutput]] and [[love.hasDeprecationOutput]].<br />
* Added [[Object:release]].<br />
* Added [[Data:clone]].<br />
* Added [[love.audio.newQueueableSource|queueable audio Sources]].<br />
* Added [[RecordingDevice|microphone recording]] support.<br />
* Added low pass, high pass, and band pass [[Source:setFilter|filters]] to love.audio [[Source]]s.<br />
* Added audio [[Source:setEffect|effect]] APIs (reverb, echo, etc.)<br />
* Added variants of [[SoundData:getSample]] and [[SoundData:setSample]] which take a channel index parameter.<br />
* Added variants of [[love.audio.play]], [[love.audio.pause]], and [[love.audio.stop]] which take a list of [[Source]]s.<br />
* Added [[love.system.hasBackgroundMusic]].<br />
* Added variants of all table-with-fields-returning get* functions, the new variants take an existing table to fill in.<br />
* Added a variant to [[World:update]] for controlling the number of internal iterations to perform.<br />
* Added [[Body:isTouching]].<br />
* Added [[RopeJoint:setMaxLength]].<br />
* Added a click count argument to [[love.mousepressed]] and [[love.mousereleased]].<br />
* Added variants of [[love.filesystem.mount]] which accept a [[Data]] or [[FileData]] object containing zipped data.<br />
* Added [[love.filesystem.getInfo]] (replaces [[love.filesystem.exists]] / [[love.filesystem.isFile|isFile]] / [[love.filesystem.isDirectory|isDirectory]] / [[love.filesystem.isSymlink|isSymlink]] / [[love.filesystem.getLastModified|getLastModified]] / [[love.filesystem.getSize|getSize]]).<br />
* Added [[love.filesystem.setCRequirePath]] and [[love.filesystem.getCRequirePath]], and use that to find C libraries for require.<br />
* Added variants of [[(File):read|File:read]] and [[love.filesystem.read]] which take an enum to determine whether they return a [[FileData]] or a string.<br />
* Added [[Channel:hasRead]], which checks if a message has been read. Takes an id, which [[Channel:push]] will now return.<br />
* Added variants of [[Channel:demand]] and [[Channel:supply]] which take a timeout argument.<br />
* Added a default [[love.threaderror]] callback, which raises the error in the main thread.<br />
* Added [[love.data]] module. It includes hex/base64 [[love.data.encode|encoding functions]], MD5 and SHA [[love.data.hash|hashing]], [[love.data.pack|string packing]], [[love.data.compress|compression APIs]], and more.<br />
* Added [[Transform]] objects to [[love.math]].<br />
* Added support for different [[ImageData]] [[PixelFormat]]s, including RGBA8 (the default), RGBA16, RGBA16F, and RGBA32F.<br />
* Added the ability to load Radiance HDR, OpenEXR, and 16 bit PNG images.<br />
* Added [[love.graphics.getImageFormats]] (replaces [[love.graphics.getCompressedImageFormats]]).<br />
* Added the ability to specify a per-object pixel density scale factor when creating [[Image]]s, [[Canvas]]es, [[Font]]s, and [[Video]]s. Affects drawing.<br />
* Added [[Texture:getPixelWidth]], [[Texture:getPixelHeight]], [[love.graphics.getPixelWidth]], and [[love.graphics.getPixelHeight]].<br />
* Added [[Texture:getDPIScale]], [[love.graphics.getDPIScale]], and [[Font:getDPIScale]].<br />
* Added [[Texture:getMipmapCount]], [[Texture:getFormat|getFormat]], [[Texture:getLayerCount|getLayerCount]], [[Texture:getDepth|getDepth]], and [[Texture:getTextureType|getTextureType]].<br />
* Added Array, Cubemap, and Volume [[TextureType]]s and corresponding [[Texture]] APIs.<br />
* Added [[love.graphics.newArrayImage]], [[love.graphics.newVolumeImage|newVolumeImage]], [[love.graphics.newCubeImage|newCubeImage]], and variants to [[love.graphics.newCanvas]] for creating different texture types.<br />
* Added [[love.graphics.getTextureTypes]], which returns a table with fields indicating support for each [[TextureType]].<br />
* Added [[(Image):replacePixels|Image:replacePixels]] (replaces [[(Image):refresh|Image:refresh]]).<br />
* Added [[love.graphics.drawLayer]], [[SpriteBatch:addLayer]], and [[SpriteBatch:setLayer]] for easily drawing layers of [[TextureType|Array Textures]]<br />
* Added variants of [[love.graphics.print]] and [[love.graphics.printf]] which take a [[Font]] argument..<br />
* Added mipmapping support to [[Canvas]]es, including both auto-generated mipmaps and manually rendering to a specific mipmap level.<br />
* Added 'stencil8', 'depth24stencil8', 'depth32fstencil8', 'depth16', 'depth24', and 'depth32f' [[PixelFormat]]s for Canvases.<br />
* Added variant of [[love.graphics.newCanvas]] which accepts a table of settings.<br />
* Added optional 'readable' boolean field to the table passed into [[love.graphics.newCanvas]].<br />
* Added variant of [[love.graphics.getCanvasFormats]] which takes a 'readable' boolean.<br />
* Added optional 'depthstencil' field to the table passed into [[love.graphics.setCanvas]], for using a depth/stencil formatted [[Canvas]] when rendering.<br />
* Added optional 'depth' and 'stencil' boolean fields to the table passed into [[love.graphics.setCanvas]], for enabling internal depth and stencil buffers if 'depthstencil' isn't used.<br />
* Added [[Texture:setDepthSampleMode|shadow sampler]] support for [[Canvas]]es.<br />
* Added [[love.graphics.setDepthMode]] for using the depth buffer for depth testing/writes. Depth values of rendered objects can currently only be set via shaders.<br />
* Added [[love.graphics.setMeshCullMode]], for culling back- or front-facing triangles when drawing a [[Mesh]].<br />
* Added [[love.graphics.setFrontFaceWinding]].<br />
* Added variants of [[love.graphics.clear]] to control how the active depth and stencil buffers are cleared.<br />
* Added [[love.graphics.applyTransform]] and [[love.graphics.replaceTransform]].<br />
* Added [[love.graphics.transformPoint]] and [[love.graphics.inverseTransformPoint]].<br />
* Added [[love.graphics.getStackDepth]].<br />
* Added [[love.graphics.flushBatch]] for manually flushing automatically batched draws.<br />
* Added [[SpriteBatch:setDrawRange]].<br />
* Added [[File]] and [[FileData]] variants of [[love.graphics.newShader]].<br />
* Added per-[[Shader]] opt in support for the GLSL 3.30 and GLSL ES 3.00 shading languages.<br />
* Added 'void effect()' [[love.graphics.newShader|pixel shader entry point]].<br />
* Added [[love.graphics.validateShader]].<br />
* Added [[Shader:hasUniform]] (replaces [[Shader:getExternVariable]]).<br />
* Added support for non-square [[Shader]] uniform matrices on desktop platforms and on mobile GLSL 3.<br />
* Added [[Shader:send]](matrixname, is_column_major, matrix, ...) which specifies how to interpret the matrix table arguments.<br />
* Added [[Shader:send]] variants which accept a [[Data]] object.<br />
* Added 'borderellipse' and 'borderrectangle' [[ParticleSystem]] distributions.<br />
* Added variant of [[ParticleSystem:setEmissionArea]] which accepts an area angle and a flag for whether particle directions are relative to the center of the area.<br />
* Added [[love.graphics.captureScreenshot]] (replaces [[love.graphics.newScreenshot]]).<br />
* Added 'glsl3', 'instancing', 'fullnpot','pixelshaderhighp', and 'shaderderivatives' [[GraphicsFeature]]s.<br />
* Added 'anisotropy' graphics [[GraphicsLimit]].<br />
* Added 'drawcallsbatched' field to [[love.graphics.getStats]].<br />
* Added hardware [[Mesh]] instancing support via [[love.graphics.drawInstanced]] and a new [[Mesh:attachAttribute]] variant.<br />
* Added a [[Mesh:attachAttribute]] variant that takes a different target attribute name.<br />
* Added [[Mesh:detachAttribute]].<br />
* Added a variant of [[Mesh:setVertexMap]] which accepts a [[Data]] object.<br />
* Added the ability to prevent love from creating a stencil buffer for the window in [[love.conf]] and [[love.window.setMode]].<br />
* Added [[love.window.updateMode]].<br />
* Added [[love.window.isMinimized]].<br />
* Added [[love.window.restore]].<br />
<br />
<br />
=== Renamed APIs ===<br />
All renamed APIs in 0.11.0 are deprecated rather than removed, until the next major release.<br />
* Renamed [[love.window.getPixelScale]] to [[love.window.getDPIScale]].<br />
* Renamed [[love.mouse.hasCursor]] to [[love.mouse.isCursorSupported]].<br />
* Renamed [[ParticleSystem:setAreaSpread]] to [[ParticleSystem:setEmissionArea]].<br />
* Renamed [[love.errhand]] to [[love.errorhandler]]. If love.errhand is defined and love.errorhandler isn't, it will continue to work.<br />
* Renamed [[Source:getChannels|Source]]/[[SoundData:getChannels|SoundData]]/[[Decoder:getChannels]] to [[Source:getChannelCount|Source]]/[[SoundData:getChannelCount|SoundData]]/[[Decoder:getChannelCount]].<br />
* Renamed [[PrismaticJoint:hasLimitsEnabled]] and [[RevoluteJoint:hasLimitsEnabled]] to [[PrismaticJoint:areLimitsEnabled]] and [[RevoluteJoint:areLimitsEnabled]].<br />
* Renamed [[love.audio.getSourceCount]] to [[love.audio.getActiveSourceCount]].<br />
* Renamed all get[Object]List functions to get[Object]s.<br />
<br />
<br />
=== Other Deprecations ===<br />
* Deprecated [[love.filesystem.exists]] / [[love.filesystem.isFile|isFile]] / [[love.filesystem.isDirectory|isDirectory]] / [[love.filesystem.isSymlink|isSymlink]] / [[love.filesystem.getLastModified|getLastModified]] / [[love.filesystem.getSize|getSize]] (use [[love.filesystem.getInfo]] instead).<br />
* Deprecated [[love.math.compress]] / [[love.math.decompress|decompress]] (use [[love.data.compress]] / [[love.data.decompress|decompress]] instead).<br />
<br />
<br />
=== Removals ===<br />
* Removed the default source type for [[love.audio.newSource]].<br />
* Removed [[Source:isStopped]] and [[Source:isPaused]]. Use [[Source:isPlaying]] instead.<br />
* Removed [[Source:rewind]]. Use [[Source:stop]] or [[Source:seek|Source:seek(0)]] instead.<br />
* Removed variant of [[love.filesystem.newFileData]] which takes base64 data, use [[love.data.decode]] instead.<br />
* Removed the no-argument variant of [[Text:set]], use [[Text:clear]] instead.<br />
* Removed [[(Image):getData|Image:getData]] and [[(Image):refresh|Image:refresh]], use [[(Image):replacePixels|Image:replacePixels]] instead.<br />
* Removed [[love.graphics.getCompressedImageFormats]], use [[love.graphics.getImageFormats]] instead.<br />
* Removed the 'void effects(...)' [[love.graphics.newShader|pixel shader entry point]]. Use the new 'void effect()' instead.<br />
* Removed [[Shader:getExternVariable]], use [[Shader:hasUniform]] instead.<br />
* Removed [[love.graphics.newScreenshot]], use [[love.graphics.captureScreenshot]] instead.<br />
* Removed deprecated [[enet]] function host:socket_get_address.<br />
* Removed functions deprecated in LÖVE 0.10.2:<br />
** Removed undocumented Shader:sendInt, Shader:sendBoolean, Shader:sentFloat, Shader:sendMatrix, and Shader:sendTexture methods (use [[Shader:send]] instead).<br />
** Removed [[love.window.isCreated]] (use [[love.window.isOpen]] instead).<br />
<br />
<br />
=== Other changes ===<br />
* Changed all color values to be in the range 0-1, rather than 0-255. This affects the following functions:<br />
** [[love.graphics.setColor]], [[love.graphics.getColor]], [[love.graphics.setBackgroundColor]], and [[love.graphics.getBackgroundColor]].<br />
** [[SpriteBatch:setColor]] and [[SpriteBatch:getColor]].<br />
** [[ParticleSystem:setColors]] and [[ParticleSystem:getColors]].<br />
** [[love.graphics.newMesh]], [[Mesh:setVertex]], and [[Mesh:getVertex]].<br />
** The colored text variants of [[love.graphics.print]], [[love.graphics.printf]], [[love.graphics.newText]], [[Text:set]], [[Text:setf]], [[Text:add]], and [[Text:addf]].<br />
** [[Shader:sendColor]].<br />
** [[love.graphics.points]].<br />
** [[ImageData:setPixel]], [[ImageData:getPixel]], and [[ImageData:mapPixel]].<br />
** [[love.math.gammaToLinear]] and [[love.math.linearToGamma]].<br />
<br />
* Changed high-dpi functionality to require much less code (often none at all) for graphics to appear at the correct sizes and positions.<br />
* Changed [[love.graphics.print]] and friends to ignore carriage returns.<br />
* Changed the 'multiply' [[BlendMode]] to error if not used with the 'premultiplied' [[BlendAlphaMode]], since the formula only works with that anyway.<br />
* Changed some [[love.graphics]], [[love.window]], and [[love.event]] APIs to cause an error if a [[Canvas]] is active.<br />
* Changed stenciling functionality with a [[Canvas]] active to require stencil=true (or a custom stencil-formatted [[Canvas]]) to be set in [[love.graphics.setCanvas]].<br />
* Changed [[Mesh:setDrawRange]] to take 'start' and 'count' parameters instead of 'min' and 'max'.<br />
* Changed the 'vsync' field of [[love.window.setMode]] and t.window in [[love.conf]]. It's now an integer with 0 disabling vsync.<br />
* Changed [[Channel]] and [[love.event.push]] table serialization to accept non-flat tables and detect cycles, cycles now cause an error rather than a stack overflow.<br />
* Changed [[Source]]s to either be playing or not playing, rather than playing, paused, or stopped. [[Source:stop]] now pauses and rewinds the Source.<br />
* Changed [[love.audio.pause|love.audio.pause()]] to return a list of [[Source]]s that have been paused by that call.<br />
* Changed [[Source]] seeking behaviour, all kinds of Sources now behave similarly when seeking past the boundaries.<br />
* Changed [[love.timer.step]] to return the calculated delta time.<br />
* Changed [[love.run]] and [[love.errorhandler]] to return a function for their main loop, which gets called until love quits.<br />
* Changed [[enet]] to no longer set the 'enet' global.<br />
* Changed [[love.keyboard.isDown]] and [[love.keyboard.isScancodeDown]] to error if an invalid enum value is given.<br />
<br />
* Updated and improved command line argument handling.<br />
* Updated the boot sequence to show an error instead of the no-game screen, if a nonexistant folder is passed in as the source game directory.<br />
* Updated 'love.exe --version' on Windows to print to the parent console.<br />
* Updated Android print rerouting and JIT compilation disabling to apply inside threads.<br />
* Updated invalid enum value error messages to show a list of the valid enum values.<br />
* Updated [[Source:seek]] to work if the [[Source]] isn't playing.<br />
* Updated [[love.math.random]] to have improved numeric distribution.<br />
* Updated [[love.graphics]] to support Core Profile OpenGL 3.3+ when available.<br />
* Updated [[Shader]]s to always expose derivative functions (dFdx, dFdy, fwidth) when available in OpenGL ES.<br />
* Updated [[Shader]]s to allow using VERTEX and PIXEL as variable names in shader code.<br />
* Updated [[love.graphics.circle]], [[love.graphics.ellipse]], [[love.graphics.arc]], and [[love.graphics.rectangle]] to take transformation scale into account when determining the number of segments to use.<br />
* Updated the error message when bad values are given to [[love.graphics.line]].<br />
* Updated [[Font]] glyph generation to improve antialiasing.<br />
* Updated [[Canvas:newImageData]] to return an [[ImageData]] with a format that matches the [[Canvas]]' as closely as possible.<br />
* Updated [[love.graphics.newImage]] to treat file names ending with "@2x", "@3x", etc. as a pixel density scale factor if none is explicitly supplied.<br />
* Updated the maximum [[love.graphics]] transformation/state [[love.graphics.push|stack depth]] from 64 to 128.<br />
* Updated the default error handler to allow copying the error to the clipboard when the user decides to do so.<br />
* Updated [[love.filesystem.setRequirePath]] to support multiple template '?' characters in each path.<br />
* Updated [[socket|luasocket]] to version 3.0rc1.<br />
<br />
<br />
=== Performance Improvements ===<br />
* Improved performance when drawing [[Texture]]s, shapes, lines, and points by automatically batching their draw calls together when possible.<br />
* Improved performance of [[Shader:send]] when the Shader is not active.<br />
* Improved performance of [[love.math.randomNormal]] when LuaJIT's JIT compiler is enabled. <br />
* Improved performance of [[love.filesystem.lines]] and [[(File):lines|File:lines]], especially when reading from a file inside a zip/.love.<br />
<br />
<br />
=== Fixes ===<br />
* Fixed an error in the default [[love.errhand|error handler]] when the error message contains non UTF-8 bytes.<br />
* Fixed a memory leak when sending love [[Object]]s to threads which never load that object's module.<br />
* Fixed a memory leak in [[enet]] when peer:send fails.<br />
* Fixed os.execute always returning -1 in Linux.<br />
* Fixed the default reference angle for [[WeldJoint]], [[PrismaticJoint]], and [[RevoluteJoint]].<br />
* Fixed [[Fixture:getShape]] to reuse the existing internal [[Fixture]]-owned [[Shape]].<br />
* Fixed [[MouseJoint:setFrequency]] to error instead of crashing if a frequency of 0 is set.<br />
* Fixed [[love.system.setClipboardText]] and [[love.system.getClipboardText]] to error instead of crashing, when a window hasn't been created.<br />
* Fixed [[Joystick:getGamepadMapping]] to work with xinput controllers.<br />
* Fixed [[love.joystick.setGamepadMapping]]'s replacement code.<br />
* Fixed baseline calculation when rendering text.<br />
* Fixed [[Shader:send]] and [[Shader:sendColor]] ignoring the last argument for an array.<br />
* Fixed [[Shader Variables|VaryingTexCoords]] and [[Shader Variables|love_ScreenSize]] in shaders to be 'highp' in OpenGL ES, when supported.<br />
* Fixed a crash when [[love.graphics.pop]] is called after [[love.window.setMode]] while the transformation stack was not empty.<br />
* Fixed [[ParticleSystem:setParticleLifetime]] to error if a negative value is given.<br />
* Fixed [[love.window.isMaximized]].<br />
* Fixed [[Video]] playback to work with a wider range of Ogg Theora files.<br />
* Fixed [[Video]] seeking to be faster.<br />
* Fixed [[BezierCurve]]s to error instead of hanging in some situations.<br />
* Fixed compilation of [[socket|luasocket]] with newer luajit 2.1.0 beta versions.<br />
<br />
<br />
[[Category:Versions]]</div>
Bartbes
http://www.love2d.org/w/index.php?title=Main_Page&diff=21173
Main Page
2018-03-22T19:53:06Z
<p>Bartbes: Update offline docs link</p>
<hr />
<div>== Welcome ==<br />
<br />
As you probably know by now, [http://love2d.org LÖVE] is a framework for making 2D games in the Lua programming language. LÖVE is totally free, and can be used in anything from friendly open-source hobby projects, to evil, closed-source commercial ones. <br />
<br />
Some interesting places to go from here:<br />
<br />
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"><br />
* [[Getting Started]]<br />
* [[Building LÖVE]]<br />
* [[:Category:Tutorials|Tutorials]]<br />
* [[love]] (The module)<br />
* [[Game Distribution]]<br />
* [[Config Files]]<br />
* [[License]] (Free!)<br />
* [[:Category:Games|Games]]<br />
* [[:Category:Libraries|Libraries]]<br />
* [[:Category:Software|Software]]<br />
* [[:Category:Snippets|Snippets]]<br />
* [[Version History]]<br />
</div><br />
<br />
If you want to read this wiki without an internet connection, you can download a weekly generated package for offline viewing [https://love2d.org/wiki.zip here].<br />
<br />
== Lua ==<br />
Never used Lua before? It's a really cool language! This manual won't teach you Lua, but fortunately there are other good resources for that. <br />
* [http://lua.org/pil Programming in Lua (first edition)]<br />
* [http://lua-users.org/wiki/TutorialDirectory Lua-Users Tutorials]<br />
* [http://www.lua.org/manual/5.1/ Lua 5.1 Reference Manual]<br />
<br />
== Hello World ==<br />
This is the full source for 'hello world' in LÖVE. Running this code will cause an 800 by 600 window to appear, and display white text on a black background.<br />
<source lang="lua"><br />
function love.draw()<br />
love.graphics.print('Hello World!', 400, 300)<br />
end<br />
</source><br />
<br />
== Editing the wiki ==<br />
'''Please read the [[Guidelines]] before editing the wiki!'''<br />
<br />
== Other Languages ==<br />
{{i18n|Main_Page}}</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Love.js&diff=21111
MediaWiki:Love.js
2018-03-04T10:22:48Z
<p>Bartbes: Fix re-added functions</p>
<hr />
<div>// Source on github: https://github.com/airstruck/love-wiki-version-picker<br />
function versionpicker() {<br />
var picker = document.createElement('select');<br />
<br />
picker.onchange = function () {<br />
applyFilter(this.options[this.selectedIndex].value);<br />
}<br />
<br />
function array (a) {<br />
return [].slice.apply(a || []);<br />
}<br />
<br />
// Some helpers for localStorage, basically resort to doing nothing<br />
// if it isn't available.<br />
function storeValue(name, value) {<br />
try {<br />
localStorage[name] = value;<br />
}<br />
catch (e) {<br />
}<br />
}<br />
<br />
function retrieveValue(name) {<br />
try {<br />
return localStorage[name];<br />
}<br />
catch (e) {<br />
return undefined;<br />
}<br />
}<br />
<br />
var pickerVersions = {};<br />
<br />
function injectPickerOption (version, text) {<br />
if (pickerVersions[version]) {<br />
return;<br />
}<br />
pickerVersions[version] = true;<br />
<br />
var option = document.createElement('option');<br />
<br />
option.value = version;<br />
option.textContent = text;<br />
picker.appendChild(option);<br />
}<br />
<br />
function makeWrapper () {<br />
var wrapper = document.createElement('div');<br />
<br />
wrapper.setAttribute('data-love-filterable', true);<br />
<br />
return wrapper;<br />
}<br />
<br />
function wrapSections () {<br />
var element = document.querySelector('h2');<br />
var wrapper;<br />
<br />
while (element) {<br />
var next = element.nextSibling;<br />
if (element.nodeName == 'H2') {<br />
wrapper = makeWrapper();<br />
element.parentNode.insertBefore(wrapper, element);<br />
}<br />
wrapper.appendChild(element);<br />
element = next;<br />
}<br />
}<br />
<br />
function updateSectionFromNote (section, note) {<br />
if (note.textContent.match(/available since/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-added', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.textContent.match(/removed in/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-removed', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
}<br />
<br />
function QueryIterator (query) {<br />
return function (callback) {<br />
return array(document.querySelectorAll(query)).forEach(callback);<br />
}<br />
}<br />
<br />
var withSections = QueryIterator('*[data-love-filterable]');<br />
var withAdded = QueryIterator('*[data-love-version-added]');<br />
var withRemoved = QueryIterator('*[data-love-version-removed]');<br />
var withAddedRemoved = QueryIterator('*[data-love-version-added][data-love-version-removed]');<br />
var withNotes = QueryIterator('*[data-love-version-note]');<br />
<br />
function hideNotes () {<br />
withNotes(function (note) { note.style.display = 'none' });<br />
}<br />
<br />
function showNotes () {<br />
withNotes(function (note) { note.style.display = null });<br />
}<br />
<br />
var needsFilter = false;<br />
<br />
function scanSections () {<br />
withSections(function (section) {<br />
var note = section.querySelector('table');<br />
if (!note) {<br />
return;<br />
}<br />
updateSectionFromNote(section, note);<br />
while (note.nextSibling && note.nextSibling.tagName == 'TABLE') {<br />
note = note.nextSibling;<br />
updateSectionFromNote(section, note);<br />
}<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
function scanTables () {<br />
var added = document.querySelectorAll('.smwtable *[alt="Added since"] + *');<br />
var removed = document.querySelectorAll('.smwtable *[alt="Removed in"] + *');<br />
<br />
array(added).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-added', a.title);<br />
needsFilter = true;<br />
});<br />
array(removed).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-removed', a.title);<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
// return true if 'installed' is greater than or equal to 'required'<br />
// http://stackoverflow.com/a/6832670<br />
function compareVersions (installed, required) {<br />
var a = installed.split('.');<br />
var b = required.split('.');<br />
<br />
for (var i = 0; i < a.length; ++i) {<br />
a[i] = Number(a[i]);<br />
}<br />
for (var i = 0; i < b.length; ++i) {<br />
b[i] = Number(b[i]);<br />
}<br />
if (a.length == 2) {<br />
a[2] = 0;<br />
}<br />
<br />
if (a[0] > b[0]) return true;<br />
if (a[0] < b[0]) return false;<br />
<br />
if (a[1] > b[1]) return true;<br />
if (a[1] < b[1]) return false;<br />
<br />
if (a[2] > b[2]) return true;<br />
if (a[2] < b[2]) return false;<br />
<br />
return true;<br />
}<br />
<br />
function filterVersion (installed) {<br />
filterAll(hideNotes);<br />
withAdded(function (section) {<br />
var required = section.getAttribute('data-love-version-added');<br />
if (!compareVersions(installed, required)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withRemoved(function (section) {<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions (installed, removed)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed) && compareVersions(installed, added)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function filterAll (hideOrShowNotes) {<br />
hideOrShowNotes();<br />
withSections(function (section) { section.style.display = null });<br />
}<br />
<br />
function filterLatest () {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) { section.style.display = 'none' });<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function applyFilter (value) {<br />
storeValue('versionpicker-version', value);<br />
if (value == 'all') {<br />
filterAll(showNotes);<br />
return;<br />
}<br />
if (value == 'latest') {<br />
filterLatest();<br />
return;<br />
}<br />
filterVersion(value);<br />
}<br />
<br />
function injectFilterPicker () {<br />
var target = document.getElementById('ca-nstab-main').parentNode;<br />
<br />
picker.style.position = 'absolute';<br />
picker.style.right = 0;<br />
picker.style.height = target.parentNode.offsetHeight - 8 + 'px';<br />
picker.style.margin = '4px';<br />
<br />
target.parentNode.insertBefore(picker, target);<br />
}<br />
<br />
function injectVersionTag (number, name) {<br />
injectPickerOption(number, 'Version ' + number + ': ' + name);<br />
}<br />
<br />
function injectVersionTags () {<br />
var versions = [<br />
{"version": "0.10.2", "codename": "Super Toast"},<br />
{"version": "0.10.1", "codename": "Super Toast"},<br />
{"version": "0.10.0", "codename": "Super Toast"},<br />
{"version": "0.9.2", "codename": "Baby Inspector"},<br />
{"version": "0.9.1", "codename": "Baby Inspector"},<br />
{"version": "0.9.0", "codename": "Baby Inspector"},<br />
{"version": "0.8.0", "codename": "Rubber Piggy"},<br />
{"version": "0.7.2", "codename": "Game Slave"},<br />
{"version": "0.7.1", "codename": "Game Slave"},<br />
{"version": "0.7.0", "codename": "Game Slave"},<br />
{"version": "0.6.2", "codename": "Jiggly Juice"},<br />
{"version": "0.6.1", "codename": "Jiggly Juice"},<br />
{"version": "0.6.0", "codename": "Jiggly Juice"},<br />
{"version": "0.5.0", "codename": "Salted Nuts"},<br />
{"version": "0.4.0", "codename": "Taco Beam"},<br />
{"version": "0.3.2", "codename": "Lemony Fresh"},<br />
{"version": "0.3.1", "codename": "Space Meat"},<br />
{"version": "0.3.0", "codename": "Mutant Vermin"},<br />
{"version": "0.2.1", "codename": "Impending Doom"},<br />
{"version": "0.2.0", "codename": "Mini Moose"},<br />
{"version": "0.1.1", "codename": "Santa Power"}<br />
]<br />
<br />
for (var i = 0; i < versions.length; i++) {<br />
injectVersionTag(versions[i].version, versions[i].codename);<br />
}<br />
}<br />
<br />
function queryVersionTags () {<br />
var url = '/w/index.php?title=Version_History&action=raw';<br />
var xhr = new XMLHttpRequest();<br />
xhr.onload = function () {<br />
var re = /\[\[([\d.]+)\]\][^\n]*\n[^\|]*\|(.*)\n/gm;<br />
var m;<br />
<br />
while (m = re.exec(this.responseText)) {<br />
injectVersionTag(m[1], m[2]);<br />
}<br />
}<br />
xhr.open('get', url, true);<br />
xhr.send();<br />
}<br />
<br />
function setPicker (target) {<br />
for (var i = 0; i < picker.options.length; ++i) {<br />
if (picker.options[i].value === target) {<br />
picker.selectedIndex = i;<br />
picker.onchange();<br />
break;<br />
}<br />
}<br />
}<br />
<br />
function main () {<br />
wrapSections();<br />
scanSections();<br />
scanTables();<br />
injectPickerOption('all', 'All Versions');<br />
injectPickerOption('latest', 'Latest Version');<br />
injectVersionTags();<br />
injectFilterPicker();<br />
var target = retrieveValue('versionpicker-version');<br />
if (target !== undefined) {<br />
setPicker(target);<br />
}<br />
}<br />
<br />
main();<br />
}<br />
<br />
versionpicker();</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Love.js&diff=21110
MediaWiki:Love.js
2018-03-04T10:18:21Z
<p>Bartbes: Try to fix re-added functions (attempt #3)</p>
<hr />
<div>// Source on github: https://github.com/airstruck/love-wiki-version-picker<br />
function versionpicker() {<br />
// Test it on https://love2d.org/wiki/love.thread.newThread<br />
// TODO: dl notes: https://love2d.org/wiki/GraphicsFeature<br />
// TODO: box notes: https://love2d.org/wiki/love.event.push<br />
<br />
var picker = document.createElement('select');<br />
<br />
picker.onchange = function () {<br />
applyFilter(this.options[this.selectedIndex].value);<br />
}<br />
<br />
function array (a) {<br />
return [].slice.apply(a || []);<br />
}<br />
<br />
// Some helpers for localStorage, basically resort to doing nothing<br />
// if it isn't available.<br />
function storeValue(name, value) {<br />
try {<br />
localStorage[name] = value;<br />
}<br />
catch (e) {<br />
}<br />
}<br />
<br />
function retrieveValue(name) {<br />
try {<br />
return localStorage[name];<br />
}<br />
catch (e) {<br />
return undefined;<br />
}<br />
}<br />
<br />
var pickerVersions = {};<br />
<br />
function injectPickerOption (version, text) {<br />
if (pickerVersions[version]) {<br />
return;<br />
}<br />
pickerVersions[version] = true;<br />
<br />
var option = document.createElement('option');<br />
<br />
option.value = version;<br />
option.textContent = text;<br />
picker.appendChild(option);<br />
}<br />
<br />
function makeWrapper () {<br />
var wrapper = document.createElement('div');<br />
<br />
wrapper.setAttribute('data-love-filterable', true);<br />
<br />
return wrapper;<br />
}<br />
<br />
function wrapSections () {<br />
var element = document.querySelector('h2');<br />
var wrapper;<br />
<br />
while (element) {<br />
var next = element.nextSibling;<br />
if (element.nodeName == 'H2') {<br />
wrapper = makeWrapper();<br />
element.parentNode.insertBefore(wrapper, element);<br />
}<br />
wrapper.appendChild(element);<br />
element = next;<br />
}<br />
}<br />
<br />
function updateSectionFromNote (section, note) {<br />
if (note.textContent.match(/available since/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-added', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.textContent.match(/removed in/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-removed', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
}<br />
<br />
function QueryIterator (query) {<br />
return function (callback) {<br />
return array(document.querySelectorAll(query)).forEach(callback);<br />
}<br />
}<br />
<br />
var withSections = QueryIterator('*[data-love-filterable]');<br />
var withAdded = QueryIterator('*[data-love-version-added]');<br />
var withRemoved = QueryIterator('*[data-love-version-removed]');<br />
var withAddedRemoved = QueryIterator('*[data-love-version-added][data-love-version-removed]');<br />
var withNotes = QueryIterator('*[data-love-version-note]');<br />
<br />
function hideNotes () {<br />
withNotes(function (note) { note.style.display = 'none' });<br />
}<br />
<br />
function showNotes () {<br />
withNotes(function (note) { note.style.display = null });<br />
}<br />
<br />
var needsFilter = false;<br />
<br />
function scanSections () {<br />
withSections(function (section) {<br />
var note = section.querySelector('table');<br />
if (!note) {<br />
return;<br />
}<br />
updateSectionFromNote(section, note);<br />
while (note.nextSibling && note.nextSibling.tagName == 'TABLE') {<br />
note = note.nextSibling;<br />
updateSectionFromNote(section, note);<br />
}<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
function scanTables () {<br />
var added = document.querySelectorAll('.smwtable *[alt="Added since"] + *');<br />
var removed = document.querySelectorAll('.smwtable *[alt="Removed in"] + *');<br />
<br />
array(added).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-added', a.title);<br />
needsFilter = true;<br />
});<br />
array(removed).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-removed', a.title);<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
// return true if 'installed' is greater than or equal to 'required'<br />
// http://stackoverflow.com/a/6832670<br />
function compareVersions (installed, required) {<br />
var a = installed.split('.');<br />
var b = required.split('.');<br />
<br />
for (var i = 0; i < a.length; ++i) {<br />
a[i] = Number(a[i]);<br />
}<br />
for (var i = 0; i < b.length; ++i) {<br />
b[i] = Number(b[i]);<br />
}<br />
if (a.length == 2) {<br />
a[2] = 0;<br />
}<br />
<br />
if (a[0] > b[0]) return true;<br />
if (a[0] < b[0]) return false;<br />
<br />
if (a[1] > b[1]) return true;<br />
if (a[1] < b[1]) return false;<br />
<br />
if (a[2] > b[2]) return true;<br />
if (a[2] < b[2]) return false;<br />
<br />
return true;<br />
}<br />
<br />
function filterVersion (installed) {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) {<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions (installed, removed)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAdded(function (section) {<br />
var required = section.getAttribute('data-love-version-added');<br />
if (!compareVersions(installed, required)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed) && compareVersions(installed, added)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function filterAll (hideOrShowNotes) {<br />
hideOrShowNotes();<br />
withSections(function (section) { section.style.display = null });<br />
}<br />
<br />
function filterLatest () {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) { section.style.display = 'none' });<br />
withAddedRemoved(function (section) {<br />
var added = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions(added, removed)) {<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function applyFilter (value) {<br />
storeValue('versionpicker-version', value);<br />
if (value == 'all') {<br />
filterAll(showNotes);<br />
return;<br />
}<br />
if (value == 'latest') {<br />
filterLatest();<br />
return;<br />
}<br />
filterVersion(value);<br />
}<br />
<br />
function injectFilterPicker () {<br />
var target = document.getElementById('ca-nstab-main').parentNode;<br />
<br />
picker.style.position = 'absolute';<br />
picker.style.right = 0;<br />
picker.style.height = target.parentNode.offsetHeight - 8 + 'px';<br />
picker.style.margin = '4px';<br />
<br />
target.parentNode.insertBefore(picker, target);<br />
}<br />
<br />
function injectVersionTag (number, name) {<br />
injectPickerOption(number, 'Version ' + number + ': ' + name);<br />
}<br />
<br />
function injectVersionTags () {<br />
var versions = [<br />
{"version": "0.10.2", "codename": "Super Toast"},<br />
{"version": "0.10.1", "codename": "Super Toast"},<br />
{"version": "0.10.0", "codename": "Super Toast"},<br />
{"version": "0.9.2", "codename": "Baby Inspector"},<br />
{"version": "0.9.1", "codename": "Baby Inspector"},<br />
{"version": "0.9.0", "codename": "Baby Inspector"},<br />
{"version": "0.8.0", "codename": "Rubber Piggy"},<br />
{"version": "0.7.2", "codename": "Game Slave"},<br />
{"version": "0.7.1", "codename": "Game Slave"},<br />
{"version": "0.7.0", "codename": "Game Slave"},<br />
{"version": "0.6.2", "codename": "Jiggly Juice"},<br />
{"version": "0.6.1", "codename": "Jiggly Juice"},<br />
{"version": "0.6.0", "codename": "Jiggly Juice"},<br />
{"version": "0.5.0", "codename": "Salted Nuts"},<br />
{"version": "0.4.0", "codename": "Taco Beam"},<br />
{"version": "0.3.2", "codename": "Lemony Fresh"},<br />
{"version": "0.3.1", "codename": "Space Meat"},<br />
{"version": "0.3.0", "codename": "Mutant Vermin"},<br />
{"version": "0.2.1", "codename": "Impending Doom"},<br />
{"version": "0.2.0", "codename": "Mini Moose"},<br />
{"version": "0.1.1", "codename": "Santa Power"}<br />
]<br />
<br />
for (var i = 0; i < versions.length; i++) {<br />
injectVersionTag(versions[i].version, versions[i].codename);<br />
}<br />
}<br />
<br />
function queryVersionTags () {<br />
var url = '/w/index.php?title=Version_History&action=raw';<br />
var xhr = new XMLHttpRequest();<br />
xhr.onload = function () {<br />
var re = /\[\[([\d.]+)\]\][^\n]*\n[^\|]*\|(.*)\n/gm;<br />
var m;<br />
<br />
while (m = re.exec(this.responseText)) {<br />
injectVersionTag(m[1], m[2]);<br />
}<br />
}<br />
xhr.open('get', url, true);<br />
xhr.send();<br />
}<br />
<br />
function setPicker (target) {<br />
for (var i = 0; i < picker.options.length; ++i) {<br />
if (picker.options[i].value === target) {<br />
picker.selectedIndex = i;<br />
picker.onchange();<br />
break;<br />
}<br />
}<br />
}<br />
<br />
function main () {<br />
wrapSections();<br />
scanSections();<br />
scanTables();<br />
injectPickerOption('all', 'All Versions');<br />
injectPickerOption('latest', 'Latest Version');<br />
injectVersionTags();<br />
injectFilterPicker();<br />
var target = retrieveValue('versionpicker-version');<br />
if (target !== undefined) {<br />
setPicker(target);<br />
}<br />
}<br />
<br />
main();<br />
}<br />
<br />
versionpicker();</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Love.js&diff=21109
MediaWiki:Love.js
2018-03-04T10:12:38Z
<p>Bartbes: Try to fix re-added functions (attempt #2)</p>
<hr />
<div>// Source on github: https://github.com/airstruck/love-wiki-version-picker<br />
function versionpicker() {<br />
// Test it on https://love2d.org/wiki/love.thread.newThread<br />
// TODO: dl notes: https://love2d.org/wiki/GraphicsFeature<br />
// TODO: box notes: https://love2d.org/wiki/love.event.push<br />
<br />
var picker = document.createElement('select');<br />
<br />
picker.onchange = function () {<br />
applyFilter(this.options[this.selectedIndex].value);<br />
}<br />
<br />
function array (a) {<br />
return [].slice.apply(a || []);<br />
}<br />
<br />
// Some helpers for localStorage, basically resort to doing nothing<br />
// if it isn't available.<br />
function storeValue(name, value) {<br />
try {<br />
localStorage[name] = value;<br />
}<br />
catch (e) {<br />
}<br />
}<br />
<br />
function retrieveValue(name) {<br />
try {<br />
return localStorage[name];<br />
}<br />
catch (e) {<br />
return undefined;<br />
}<br />
}<br />
<br />
var pickerVersions = {};<br />
<br />
function injectPickerOption (version, text) {<br />
if (pickerVersions[version]) {<br />
return;<br />
}<br />
pickerVersions[version] = true;<br />
<br />
var option = document.createElement('option');<br />
<br />
option.value = version;<br />
option.textContent = text;<br />
picker.appendChild(option);<br />
}<br />
<br />
function makeWrapper () {<br />
var wrapper = document.createElement('div');<br />
<br />
wrapper.setAttribute('data-love-filterable', true);<br />
<br />
return wrapper;<br />
}<br />
<br />
function wrapSections () {<br />
var element = document.querySelector('h2');<br />
var wrapper;<br />
<br />
while (element) {<br />
var next = element.nextSibling;<br />
if (element.nodeName == 'H2') {<br />
wrapper = makeWrapper();<br />
element.parentNode.insertBefore(wrapper, element);<br />
}<br />
wrapper.appendChild(element);<br />
element = next;<br />
}<br />
}<br />
<br />
function updateSectionFromNote (section, note) {<br />
if (note.textContent.match(/available since/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-added', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.textContent.match(/removed in/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-removed', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
}<br />
<br />
function QueryIterator (query) {<br />
return function (callback) {<br />
return array(document.querySelectorAll(query)).forEach(callback);<br />
}<br />
}<br />
<br />
var withSections = QueryIterator('*[data-love-filterable]');<br />
var withAdded = QueryIterator('*[data-love-version-added]');<br />
var withRemoved = QueryIterator('*[data-love-version-removed]');<br />
var withNotes = QueryIterator('*[data-love-version-note]');<br />
<br />
function hideNotes () {<br />
withNotes(function (note) { note.style.display = 'none' });<br />
}<br />
<br />
function showNotes () {<br />
withNotes(function (note) { note.style.display = null });<br />
}<br />
<br />
var needsFilter = false;<br />
<br />
function scanSections () {<br />
withSections(function (section) {<br />
var note = section.querySelector('table');<br />
if (!note) {<br />
return;<br />
}<br />
updateSectionFromNote(section, note);<br />
while (note.nextSibling && note.nextSibling.tagName == 'TABLE') {<br />
note = note.nextSibling;<br />
updateSectionFromNote(section, note);<br />
}<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
function scanTables () {<br />
var added = document.querySelectorAll('.smwtable *[alt="Added since"] + *');<br />
var removed = document.querySelectorAll('.smwtable *[alt="Removed in"] + *');<br />
<br />
array(added).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-added', a.title);<br />
needsFilter = true;<br />
});<br />
array(removed).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-removed', a.title);<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
// return true if 'installed' is greater than or equal to 'required'<br />
// http://stackoverflow.com/a/6832670<br />
function compareVersions (installed, required) {<br />
var a = installed.split('.');<br />
var b = required.split('.');<br />
<br />
for (var i = 0; i < a.length; ++i) {<br />
a[i] = Number(a[i]);<br />
}<br />
for (var i = 0; i < b.length; ++i) {<br />
b[i] = Number(b[i]);<br />
}<br />
if (a.length == 2) {<br />
a[2] = 0;<br />
}<br />
<br />
if (a[0] > b[0]) return true;<br />
if (a[0] < b[0]) return false;<br />
<br />
if (a[1] > b[1]) return true;<br />
if (a[1] < b[1]) return false;<br />
<br />
if (a[2] > b[2]) return true;<br />
if (a[2] < b[2]) return false;<br />
<br />
return true;<br />
}<br />
<br />
function filterVersion (installed) {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) {<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions (installed, removed)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAdded(function (section) {<br />
var required = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (!compareVersions(installed, required)) {<br />
section.style.display = 'none';<br />
}<br />
if (removed && compareVersions(required, removed) && compareVersions(installed, required))<br />
{<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function filterAll (hideOrShowNotes) {<br />
hideOrShowNotes();<br />
withSections(function (section) { section.style.display = null });<br />
}<br />
<br />
function filterLatest () {<br />
filterAll(hideNotes);<br />
/* TODO: Deal with re-added functions */<br />
withRemoved(function (section) { section.style.display = 'none' });<br />
}<br />
<br />
function applyFilter (value) {<br />
storeValue('versionpicker-version', value);<br />
if (value == 'all') {<br />
filterAll(showNotes);<br />
return;<br />
}<br />
if (value == 'latest') {<br />
filterLatest();<br />
return;<br />
}<br />
filterVersion(value);<br />
}<br />
<br />
function injectFilterPicker () {<br />
var target = document.getElementById('ca-nstab-main').parentNode;<br />
<br />
picker.style.position = 'absolute';<br />
picker.style.right = 0;<br />
picker.style.height = target.parentNode.offsetHeight - 8 + 'px';<br />
picker.style.margin = '4px';<br />
<br />
target.parentNode.insertBefore(picker, target);<br />
}<br />
<br />
function injectVersionTag (number, name) {<br />
injectPickerOption(number, 'Version ' + number + ': ' + name);<br />
}<br />
<br />
function injectVersionTags () {<br />
var versions = [<br />
{"version": "0.10.2", "codename": "Super Toast"},<br />
{"version": "0.10.1", "codename": "Super Toast"},<br />
{"version": "0.10.0", "codename": "Super Toast"},<br />
{"version": "0.9.2", "codename": "Baby Inspector"},<br />
{"version": "0.9.1", "codename": "Baby Inspector"},<br />
{"version": "0.9.0", "codename": "Baby Inspector"},<br />
{"version": "0.8.0", "codename": "Rubber Piggy"},<br />
{"version": "0.7.2", "codename": "Game Slave"},<br />
{"version": "0.7.1", "codename": "Game Slave"},<br />
{"version": "0.7.0", "codename": "Game Slave"},<br />
{"version": "0.6.2", "codename": "Jiggly Juice"},<br />
{"version": "0.6.1", "codename": "Jiggly Juice"},<br />
{"version": "0.6.0", "codename": "Jiggly Juice"},<br />
{"version": "0.5.0", "codename": "Salted Nuts"},<br />
{"version": "0.4.0", "codename": "Taco Beam"},<br />
{"version": "0.3.2", "codename": "Lemony Fresh"},<br />
{"version": "0.3.1", "codename": "Space Meat"},<br />
{"version": "0.3.0", "codename": "Mutant Vermin"},<br />
{"version": "0.2.1", "codename": "Impending Doom"},<br />
{"version": "0.2.0", "codename": "Mini Moose"},<br />
{"version": "0.1.1", "codename": "Santa Power"}<br />
]<br />
<br />
for (var i = 0; i < versions.length; i++) {<br />
injectVersionTag(versions[i].version, versions[i].codename);<br />
}<br />
}<br />
<br />
function queryVersionTags () {<br />
var url = '/w/index.php?title=Version_History&action=raw';<br />
var xhr = new XMLHttpRequest();<br />
xhr.onload = function () {<br />
var re = /\[\[([\d.]+)\]\][^\n]*\n[^\|]*\|(.*)\n/gm;<br />
var m;<br />
<br />
while (m = re.exec(this.responseText)) {<br />
injectVersionTag(m[1], m[2]);<br />
}<br />
}<br />
xhr.open('get', url, true);<br />
xhr.send();<br />
}<br />
<br />
function setPicker (target) {<br />
for (var i = 0; i < picker.options.length; ++i) {<br />
if (picker.options[i].value === target) {<br />
picker.selectedIndex = i;<br />
picker.onchange();<br />
break;<br />
}<br />
}<br />
}<br />
<br />
function main () {<br />
wrapSections();<br />
scanSections();<br />
scanTables();<br />
injectPickerOption('all', 'All Versions');<br />
injectPickerOption('latest', 'Latest Version');<br />
injectVersionTags();<br />
injectFilterPicker();<br />
var target = retrieveValue('versionpicker-version');<br />
if (target !== undefined) {<br />
setPicker(target);<br />
}<br />
}<br />
<br />
main();<br />
}<br />
<br />
versionpicker();</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Love.js&diff=21108
MediaWiki:Love.js
2018-03-04T10:10:31Z
<p>Bartbes: Try to fix re-added functions</p>
<hr />
<div>// Source on github: https://github.com/airstruck/love-wiki-version-picker<br />
function versionpicker() {<br />
// Test it on https://love2d.org/wiki/love.thread.newThread<br />
// TODO: dl notes: https://love2d.org/wiki/GraphicsFeature<br />
// TODO: box notes: https://love2d.org/wiki/love.event.push<br />
<br />
var picker = document.createElement('select');<br />
<br />
picker.onchange = function () {<br />
applyFilter(this.options[this.selectedIndex].value);<br />
}<br />
<br />
function array (a) {<br />
return [].slice.apply(a || []);<br />
}<br />
<br />
// Some helpers for localStorage, basically resort to doing nothing<br />
// if it isn't available.<br />
function storeValue(name, value) {<br />
try {<br />
localStorage[name] = value;<br />
}<br />
catch (e) {<br />
}<br />
}<br />
<br />
function retrieveValue(name) {<br />
try {<br />
return localStorage[name];<br />
}<br />
catch (e) {<br />
return undefined;<br />
}<br />
}<br />
<br />
var pickerVersions = {};<br />
<br />
function injectPickerOption (version, text) {<br />
if (pickerVersions[version]) {<br />
return;<br />
}<br />
pickerVersions[version] = true;<br />
<br />
var option = document.createElement('option');<br />
<br />
option.value = version;<br />
option.textContent = text;<br />
picker.appendChild(option);<br />
}<br />
<br />
function makeWrapper () {<br />
var wrapper = document.createElement('div');<br />
<br />
wrapper.setAttribute('data-love-filterable', true);<br />
<br />
return wrapper;<br />
}<br />
<br />
function wrapSections () {<br />
var element = document.querySelector('h2');<br />
var wrapper;<br />
<br />
while (element) {<br />
var next = element.nextSibling;<br />
if (element.nodeName == 'H2') {<br />
wrapper = makeWrapper();<br />
element.parentNode.insertBefore(wrapper, element);<br />
}<br />
wrapper.appendChild(element);<br />
element = next;<br />
}<br />
}<br />
<br />
function updateSectionFromNote (section, note) {<br />
if (note.textContent.match(/available since/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-added', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
if (note.textContent.match(/removed in/i)) {<br />
var a = note.querySelector('a');<br />
section.setAttribute('data-love-version-removed', a.title);<br />
note.setAttribute('data-love-version-note', true);<br />
}<br />
}<br />
<br />
function QueryIterator (query) {<br />
return function (callback) {<br />
return array(document.querySelectorAll(query)).forEach(callback);<br />
}<br />
}<br />
<br />
var withSections = QueryIterator('*[data-love-filterable]');<br />
var withAdded = QueryIterator('*[data-love-version-added]');<br />
var withRemoved = QueryIterator('*[data-love-version-removed]');<br />
var withNotes = QueryIterator('*[data-love-version-note]');<br />
<br />
function hideNotes () {<br />
withNotes(function (note) { note.style.display = 'none' });<br />
}<br />
<br />
function showNotes () {<br />
withNotes(function (note) { note.style.display = null });<br />
}<br />
<br />
var needsFilter = false;<br />
<br />
function scanSections () {<br />
withSections(function (section) {<br />
var note = section.querySelector('table');<br />
if (!note) {<br />
return;<br />
}<br />
updateSectionFromNote(section, note);<br />
while (note.nextSibling && note.nextSibling.tagName == 'TABLE') {<br />
note = note.nextSibling;<br />
updateSectionFromNote(section, note);<br />
}<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
function scanTables () {<br />
var added = document.querySelectorAll('.smwtable *[alt="Added since"] + *');<br />
var removed = document.querySelectorAll('.smwtable *[alt="Removed in"] + *');<br />
<br />
array(added).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-added', a.title);<br />
needsFilter = true;<br />
});<br />
array(removed).forEach(function (a) {<br />
var e = a.parentNode.parentNode;<br />
e.setAttribute('data-love-filterable', true);<br />
e.setAttribute('data-love-version-removed', a.title);<br />
needsFilter = true;<br />
});<br />
}<br />
<br />
// return true if 'installed' is greater than or equal to 'required'<br />
// http://stackoverflow.com/a/6832670<br />
function compareVersions (installed, required) {<br />
var a = installed.split('.');<br />
var b = required.split('.');<br />
<br />
for (var i = 0; i < a.length; ++i) {<br />
a[i] = Number(a[i]);<br />
}<br />
for (var i = 0; i < b.length; ++i) {<br />
b[i] = Number(b[i]);<br />
}<br />
if (a.length == 2) {<br />
a[2] = 0;<br />
}<br />
<br />
if (a[0] > b[0]) return true;<br />
if (a[0] < b[0]) return false;<br />
<br />
if (a[1] > b[1]) return true;<br />
if (a[1] < b[1]) return false;<br />
<br />
if (a[2] > b[2]) return true;<br />
if (a[2] < b[2]) return false;<br />
<br />
return true;<br />
}<br />
<br />
function filterVersion (installed) {<br />
filterAll(hideNotes);<br />
withRemoved(function (section) {<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (compareVersions (installed, removed)) {<br />
section.style.display = 'none';<br />
}<br />
});<br />
withAdded(function (section) {<br />
var required = section.getAttribute('data-love-version-added');<br />
var removed = section.getAttribute('data-love-version-removed');<br />
if (!compareVersions(installed, required)) {<br />
section.style.display = 'none';<br />
}<br />
if (removed && compareVersions(required, removed))<br />
{<br />
section.style.display = null;<br />
}<br />
});<br />
}<br />
<br />
function filterAll (hideOrShowNotes) {<br />
hideOrShowNotes();<br />
withSections(function (section) { section.style.display = null });<br />
}<br />
<br />
function filterLatest () {<br />
filterAll(hideNotes);<br />
/* TODO: Deal with re-added functions */<br />
withRemoved(function (section) { section.style.display = 'none' });<br />
}<br />
<br />
function applyFilter (value) {<br />
storeValue('versionpicker-version', value);<br />
if (value == 'all') {<br />
filterAll(showNotes);<br />
return;<br />
}<br />
if (value == 'latest') {<br />
filterLatest();<br />
return;<br />
}<br />
filterVersion(value);<br />
}<br />
<br />
function injectFilterPicker () {<br />
var target = document.getElementById('ca-nstab-main').parentNode;<br />
<br />
picker.style.position = 'absolute';<br />
picker.style.right = 0;<br />
picker.style.height = target.parentNode.offsetHeight - 8 + 'px';<br />
picker.style.margin = '4px';<br />
<br />
target.parentNode.insertBefore(picker, target);<br />
}<br />
<br />
function injectVersionTag (number, name) {<br />
injectPickerOption(number, 'Version ' + number + ': ' + name);<br />
}<br />
<br />
function injectVersionTags () {<br />
var versions = [<br />
{"version": "0.10.2", "codename": "Super Toast"},<br />
{"version": "0.10.1", "codename": "Super Toast"},<br />
{"version": "0.10.0", "codename": "Super Toast"},<br />
{"version": "0.9.2", "codename": "Baby Inspector"},<br />
{"version": "0.9.1", "codename": "Baby Inspector"},<br />
{"version": "0.9.0", "codename": "Baby Inspector"},<br />
{"version": "0.8.0", "codename": "Rubber Piggy"},<br />
{"version": "0.7.2", "codename": "Game Slave"},<br />
{"version": "0.7.1", "codename": "Game Slave"},<br />
{"version": "0.7.0", "codename": "Game Slave"},<br />
{"version": "0.6.2", "codename": "Jiggly Juice"},<br />
{"version": "0.6.1", "codename": "Jiggly Juice"},<br />
{"version": "0.6.0", "codename": "Jiggly Juice"},<br />
{"version": "0.5.0", "codename": "Salted Nuts"},<br />
{"version": "0.4.0", "codename": "Taco Beam"},<br />
{"version": "0.3.2", "codename": "Lemony Fresh"},<br />
{"version": "0.3.1", "codename": "Space Meat"},<br />
{"version": "0.3.0", "codename": "Mutant Vermin"},<br />
{"version": "0.2.1", "codename": "Impending Doom"},<br />
{"version": "0.2.0", "codename": "Mini Moose"},<br />
{"version": "0.1.1", "codename": "Santa Power"}<br />
]<br />
<br />
for (var i = 0; i < versions.length; i++) {<br />
injectVersionTag(versions[i].version, versions[i].codename);<br />
}<br />
}<br />
<br />
function queryVersionTags () {<br />
var url = '/w/index.php?title=Version_History&action=raw';<br />
var xhr = new XMLHttpRequest();<br />
xhr.onload = function () {<br />
var re = /\[\[([\d.]+)\]\][^\n]*\n[^\|]*\|(.*)\n/gm;<br />
var m;<br />
<br />
while (m = re.exec(this.responseText)) {<br />
injectVersionTag(m[1], m[2]);<br />
}<br />
}<br />
xhr.open('get', url, true);<br />
xhr.send();<br />
}<br />
<br />
function setPicker (target) {<br />
for (var i = 0; i < picker.options.length; ++i) {<br />
if (picker.options[i].value === target) {<br />
picker.selectedIndex = i;<br />
picker.onchange();<br />
break;<br />
}<br />
}<br />
}<br />
<br />
function main () {<br />
wrapSections();<br />
scanSections();<br />
scanTables();<br />
injectPickerOption('all', 'All Versions');<br />
injectPickerOption('latest', 'Latest Version');<br />
injectVersionTags();<br />
injectFilterPicker();<br />
var target = retrieveValue('versionpicker-version');<br />
if (target !== undefined) {<br />
setPicker(target);<br />
}<br />
}<br />
<br />
main();<br />
}<br />
<br />
versionpicker();</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Sidebar&diff=21068
MediaWiki:Sidebar
2018-02-06T20:34:31Z
<p>Bartbes: Link fix</p>
<hr />
<div>* documentation<br />
** love|love<br />
** love.audio|love.audio<br />
** love.event|love.event<br />
** love.filesystem|love.filesystem<br />
** love.font|love.font<br />
** love.graphics|love.graphics<br />
** love.image|love.image<br />
** love.joystick|love.joystick<br />
** love.keyboard|love.keyboard<br />
** love.math|love.math<br />
** love.mouse|love.mouse<br />
** love.physics|love.physics<br />
** love.sound|love.sound<br />
** love.system|love.system<br />
** love.thread|love.thread<br />
** love.timer|love.timer<br />
** love.touch|love.touch<br />
** love.video|love.video<br />
** love.window|love.window<br />
** lua-enet|lua-enet<br />
** socket|luasocket<br />
** utf8|utf8<br />
* navigation<br />
** https://love2d.org/|Home<br />
** https://love2d.org/forums/|Forums<br />
** https://bitbucket.org/rude/love/issues|Issue tracker<br />
* wiki navigation<br />
** mainpage|mainpage-description<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
* SEARCH<br />
* TOOLBOX</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Sidebar&diff=21067
MediaWiki:Sidebar
2018-02-06T20:34:19Z
<p>Bartbes: Link fix</p>
<hr />
<div>* documentation<br />
** love|love<br />
** love.audio|love.audio<br />
** love.event|love.event<br />
** love.filesystem|love.filesystem<br />
** love.font|love.font<br />
** love.graphics|love.graphics<br />
** love.image|love.image<br />
** love.joystick|love.joystick<br />
** love.keyboard|love.keyboard<br />
** love.math|love.math<br />
** love.mouse|love.mouse<br />
** love.physics|love.physics<br />
** love.sound|love.sound<br />
** love.system|love.system<br />
** love.thread|love.thread<br />
** love.timer|love.timer<br />
** love.touch|love.touch<br />
** love.video|love.video<br />
** love.window|love.window<br />
** lua-enet|lua-enet<br />
** luasocket|socket<br />
** utf8|utf8<br />
* navigation<br />
** https://love2d.org/|Home<br />
** https://love2d.org/forums/|Forums<br />
** https://bitbucket.org/rude/love/issues|Issue tracker<br />
* wiki navigation<br />
** mainpage|mainpage-description<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
* SEARCH<br />
* TOOLBOX</div>
Bartbes
http://www.love2d.org/w/index.php?title=MediaWiki:Sidebar&diff=21066
MediaWiki:Sidebar
2018-02-06T20:30:00Z
<p>Bartbes: Add 3-rd party modules</p>
<hr />
<div>* documentation<br />
** love|love<br />
** love.audio|love.audio<br />
** love.event|love.event<br />
** love.filesystem|love.filesystem<br />
** love.font|love.font<br />
** love.graphics|love.graphics<br />
** love.image|love.image<br />
** love.joystick|love.joystick<br />
** love.keyboard|love.keyboard<br />
** love.math|love.math<br />
** love.mouse|love.mouse<br />
** love.physics|love.physics<br />
** love.sound|love.sound<br />
** love.system|love.system<br />
** love.thread|love.thread<br />
** love.timer|love.timer<br />
** love.touch|love.touch<br />
** love.video|love.video<br />
** love.window|love.window<br />
** lua-enet|lua-enet<br />
** luasocket|luasocket<br />
** utf8|utf8<br />
* navigation<br />
** https://love2d.org/|Home<br />
** https://love2d.org/forums/|Forums<br />
** https://bitbucket.org/rude/love/issues|Issue tracker<br />
* wiki navigation<br />
** mainpage|mainpage-description<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
* SEARCH<br />
* TOOLBOX</div>
Bartbes
http://www.love2d.org/w/index.php?title=love.data.encode&diff=20913
love.data.encode
2018-01-07T15:17:08Z
<p>Bartbes: Created page with "{{newin|0.11.0|110|type=function}} Encode Data or a string to a Data or string in one of the EncodeFormats. == Function == === Synopsis === <source lan..."</p>
<hr />
<div>{{newin|[[0.11.0]]|110|type=function}}<br />
<br />
Encode Data or a string to a Data or string in one of the [[EncodeFormat|EncodeFormats]].<br />
<br />
== Function ==<br />
=== Synopsis ===<br />
<source lang="lua"><br />
encoded = love.data.encode( container, format, sourceString, linelength )<br />
</source><br />
=== Arguments ===<br />
{{param|ContainerType|container|What type to return the encoded data as.}}<br />
{{param|EncodeFormat|format|The format of the output data.}}<br />
{{param|string|sourceString|The raw data to encode.}}<br />
{{param|number|linelength (0)|The maximum line length of the output. Only supported for base64, ignored if 0.}}<br />
=== Returns ===<br />
{{param|value|encoded|[[ByteData]]/[[string]] which contains the encoded version of source.}}<br />
<br />
== Function ==<br />
=== Synopsis ===<br />
<source lang="lua"><br />
encoded = love.data.encode( container, format, sourceData, linelength )<br />
</source><br />
=== Arguments ===<br />
{{param|ContainerType|container|What type to return the encoded data as.}}<br />
{{param|EncodeFormat|format|The format of the output data.}}<br />
{{param|Data|sourceData|The raw data to encode.}}<br />
{{param|number|linelength (0)|The maximum line length of the output. Only supported for base64, ignored if 0.}}<br />
=== Returns ===<br />
{{param|value|encoded|[[ByteData]]/[[string]] which contains the encoded version of source.}}<br />
<br />
== See Also ==<br />
* [[parent::love.data]]<br />
* [[love.data.decode]]<br />
[[Category:Functions]]<br />
{{#set:Description=Encode Data or a string to a Data or string in one of the [[EncodeFormat|EncodeFormats]].}}<br />
== Other Languages ==<br />
{{i18n|love.data.encode}}</div>
Bartbes
http://www.love2d.org/w/index.php?title=love.data.decode&diff=20912
love.data.decode
2018-01-07T15:14:26Z
<p>Bartbes: Fix i18n</p>
<hr />
<div>{{newin|[[0.11.0]]|110|type=function}}<br />
<br />
Decode Data or a string from any of the [[EncodeFormat|EncodeFormats]] to Data or string.<br />
<br />
== Function ==<br />
=== Synopsis ===<br />
<source lang="lua"><br />
decoded = love.data.decode( container, format, sourceString )<br />
</source><br />
=== Arguments ===<br />
{{param|ContainerType|container|What type to return the decoded data as.}}<br />
{{param|EncodeFormat|format|The format of the input data.}}<br />
{{param|string|sourceString|The raw (encoded) data to decode.}}<br />
=== Returns ===<br />
{{param|value|decoded|[[ByteData]]/[[string]] which contains the decoded version of source.}}<br />
<br />
== Function ==<br />
=== Synopsis ===<br />
<source lang="lua"><br />
decoded = love.data.decode( container, format, sourceData )<br />
</source><br />
=== Arguments ===<br />
{{param|ContainerType|container|What type to return the decoded data as.}}<br />
{{param|EncodeFormat|format|The format of the input data.}}<br />
{{param|Data|sourceData|The raw (encoded) data to decode.}}<br />
=== Returns ===<br />
{{param|value|decoded|[[ByteData]]/[[string]] which contains the decoded version of source.}}<br />
<br />
== See Also ==<br />
* [[parent::love.data]]<br />
* [[love.data.encode]]<br />
[[Category:Functions]]<br />
{{#set:Description=Decode Data or a string from any of the [[EncodeFormat|EncodeFormats]] to Data or string.}}<br />
== Other Languages ==<br />
{{i18n|love.data.decode}}</div>
Bartbes
http://www.love2d.org/w/index.php?title=love.data.decode&diff=20911
love.data.decode
2018-01-07T15:12:55Z
<p>Bartbes: Created page with "{{newin|0.11.0|110|type=function}} Decode Data or a string from any of the EncodeFormats to Data or string. == Function == === Synopsis === <source lan..."</p>
<hr />
<div>{{newin|[[0.11.0]]|110|type=function}}<br />
<br />
Decode Data or a string from any of the [[EncodeFormat|EncodeFormats]] to Data or string.<br />
<br />
== Function ==<br />
=== Synopsis ===<br />
<source lang="lua"><br />
decoded = love.data.decode( container, format, sourceString )<br />
</source><br />
=== Arguments ===<br />
{{param|ContainerType|container|What type to return the decoded data as.}}<br />
{{param|EncodeFormat|format|The format of the input data.}}<br />
{{param|string|sourceString|The raw (encoded) data to decode.}}<br />
=== Returns ===<br />
{{param|value|decoded|[[ByteData]]/[[string]] which contains the decoded version of source.}}<br />
<br />
== Function ==<br />
=== Synopsis ===<br />
<source lang="lua"><br />
decoded = love.data.decode( container, format, sourceData )<br />
</source><br />
=== Arguments ===<br />
{{param|ContainerType|container|What type to return the decoded data as.}}<br />
{{param|EncodeFormat|format|The format of the input data.}}<br />
{{param|Data|sourceData|The raw (encoded) data to decode.}}<br />
=== Returns ===<br />
{{param|value|decoded|[[ByteData]]/[[string]] which contains the decoded version of source.}}<br />
<br />
== See Also ==<br />
* [[parent::love.data]]<br />
* [[love.data.encode]]<br />
[[Category:Functions]]<br />
{{#set:Description=Decode Data or a string from any of the [[EncodeFormat|EncodeFormats]] to Data or string.}}<br />
== Other Languages ==<br />
{{i18n|love.data.compress}}</div>
Bartbes
http://www.love2d.org/w/index.php?title=World:update&diff=20910
World:update
2018-01-07T15:02:25Z
<p>Bartbes: Add iterations parameters</p>
<hr />
<div>Update the state of the world.<br />
== Function ==<br />
=== Synopsis ===<br />
<source lang="lua"><br />
World:update( dt, velocityiterations, positioniterations )<br />
</source><br />
=== Arguments ===<br />
{{param|number|dt|The time (in seconds) to advance the physics simulation.}}<br />
{{New feature|0.11.0|<br />
{{param|number|velocityiterations (8)|The maximum number of steps used to determine the new velocities when resolving a collision.}}<br />
{{param|number|positioniterations (3)|The maximum number of steps used to determine the new positions when resolving a collision.}}<br />
|110}}<br />
=== Returns ===<br />
Nothing.<br />
== See Also ==<br />
* [[parent::World]]<br />
[[Category:Functions]]<br />
{{#set:Description=Update the state of the world.}}<br />
{{#set:Since=000}}<br />
== Other Languages ==<br />
{{i18n|World:update}}</div>
Bartbes
http://www.love2d.org/w/index.php?title=Channel:supply&diff=20909
Channel:supply
2018-01-07T14:55:10Z
<p>Bartbes: Add new timeout variant and return value</p>
<hr />
<div>{{newin|[[0.9.0]]|090|type=function}}<br />
Send a message to the thread Channel and wait for a thread to accept it.<br />
<br />
See [[Variant]] for the list of supported types.<br />
== Function ==<br />
=== Synopsis ===<br />
<source lang="lua"><br />
success = Channel:supply( value )<br />
</source><br />
=== Arguments ===<br />
{{param|Variant|value|The contents of the message.}}<br />
=== Returns ===<br />
{{New feature|0.11.0|<br />
{{param|boolean|success|Whether the message was successfully supplied (always <code>true</code>).}}<br />
|110}}<br />
<br />
== Function ==<br />
{{newin|[[0.11.0]]|110|type=variant}}<br />
=== Synopsis ===<br />
<source lang="lua"><br />
success = Channel:supply( value, timeout )<br />
</source><br />
=== Arguments ===<br />
{{param|Variant|value|The contents of the message.}}<br />
{{param|number|timeout|The maximum amount of time to wait.}}<br />
=== Returns ===<br />
{{param|boolean|success|Whether the message was successfully supplied before the timeout expired.}}<br />
== See Also ==<br />
* [[parent::Channel]]<br />
* [[Channel:demand]]<br />
* [[Channel:push]]<br />
[[Category:Functions]]<br />
{{#set:Description=Send a message to a thread Channel and wait for a thread to accept it.}}<br />
== Other Languages ==<br />
{{i18n|Channel:supply}}</div>
Bartbes
http://www.love2d.org/w/index.php?title=Channel:demand&diff=20908
Channel:demand
2018-01-07T14:48:25Z
<p>Bartbes: Add new timeout variant</p>
<hr />
<div>{{newin|[[0.9.0]]|090|type=function}}<br />
Retrieves the value of a Channel message and removes it from the message queue.<br />
<br />
It waits until a message is in the queue then returns the message value.<br />
== Function ==<br />
=== Synopsis ===<br />
<source lang="lua"><br />
value = Channel:demand( )<br />
</source><br />
=== Arguments ===<br />
None.<br />
=== Returns ===<br />
{{param|Variant|value|The contents of the message.}}<br />
<br />
== Function ==<br />
{{newin|[[0.11.0]]|110|type=variant}}<br />
=== Synopsis ===<br />
<source lang="lua"><br />
value = Channel:demand( timeout )<br />
</source><br />
=== Arguments ===<br />
{{param|number|timeout|The maximum amount of time to wait.}}<br />
=== Returns ===<br />
{{param|Variant|value|The contents of the message or nil if the timeout expired.}}<br />
== See Also ==<br />
* [[parent::Channel]]<br />
* [[Channel:supply]]<br />
* [[Channel:pop]]<br />
[[Category:Functions]]<br />
{{#set:Description=Wait for and retrieve the value of a Channel message.}}<br />
== Other Languages ==<br />
{{i18n|Channel:demand}}</div>
Bartbes