From b0114c71f7a0d4079711812d5548f292204aed81 Mon Sep 17 00:00:00 2001 From: vlev Date: Sat, 7 Sep 2024 21:11:21 -0400 Subject: [PATCH] docs build --- docs/assets/download.js | 1 + docs/assets/image.js | 1 + docs/assets/index.js | 2 +- docs/assets/menu.js | 1 + docs/assets/search.js | 1 + docs/assets/style.css | 2 +- docs/index.html | 4 ++-- docs/v0.1.7/camera/index.html | 4 ++-- docs/v0.1.7/camera/methods.json | 1 + docs/v0.1.7/classes/index.html | 4 ++-- docs/v0.1.7/classes/methods.json | 1 + docs/v0.1.7/image/index.html | 6 +++--- docs/v0.1.7/image/methods.json | 1 + docs/v0.1.7/index.html | 2 +- docs/v0.1.7/io/index.html | 8 ++++---- docs/v0.1.7/io/methods.json | 1 + docs/v0.1.7/keyboard/index.html | 10 +++++----- docs/v0.1.7/keyboard/methods.json | 1 + docs/v0.1.7/math/index.html | 16 ++++++++-------- docs/v0.1.7/math/methods.json | 1 + docs/v0.1.7/models/index.html | 4 ++-- docs/v0.1.7/models/methods.json | 1 + docs/v0.1.7/modules.json | 1 + docs/v0.1.7/mouse/index.html | 12 ++++++------ docs/v0.1.7/mouse/methods.json | 1 + docs/v0.1.7/setting/index.html | 12 ++++++------ docs/v0.1.7/setting/methods.json | 1 + docs/v0.1.7/shapes/index.html | 22 +++++++++++----------- docs/v0.1.7/shapes/methods.json | 1 + docs/v0.1.7/shapes3D/index.html | 8 ++++---- docs/v0.1.7/shapes3D/methods.json | 1 + docs/v0.1.7/transform/index.html | 2 +- docs/v0.1.7/transform/methods.json | 1 + docs/v0.1.7/typography/index.html | 10 +++++----- docs/v0.1.7/typography/methods.json | 1 + docs/v0.1.7/vector/index.html | 24 ++++++++++++------------ docs/v0.1.7/vector/methods.json | 1 + docs/v0.1.7/window/index.html | 14 +++++++------- docs/v0.1.7/window/methods.json | 1 + 39 files changed, 103 insertions(+), 83 deletions(-) create mode 100644 docs/assets/download.js create mode 100644 docs/assets/image.js create mode 100644 docs/assets/menu.js create mode 100644 docs/assets/search.js create mode 100644 docs/v0.1.7/camera/methods.json create mode 100644 docs/v0.1.7/classes/methods.json create mode 100644 docs/v0.1.7/image/methods.json create mode 100644 docs/v0.1.7/io/methods.json create mode 100644 docs/v0.1.7/keyboard/methods.json create mode 100644 docs/v0.1.7/math/methods.json create mode 100644 docs/v0.1.7/models/methods.json create mode 100644 docs/v0.1.7/modules.json create mode 100644 docs/v0.1.7/mouse/methods.json create mode 100644 docs/v0.1.7/setting/methods.json create mode 100644 docs/v0.1.7/shapes/methods.json create mode 100644 docs/v0.1.7/shapes3D/methods.json create mode 100644 docs/v0.1.7/transform/methods.json create mode 100644 docs/v0.1.7/typography/methods.json create mode 100644 docs/v0.1.7/vector/methods.json create mode 100644 docs/v0.1.7/window/methods.json diff --git a/docs/assets/download.js b/docs/assets/download.js new file mode 100644 index 00000000..dc7d6f01 --- /dev/null +++ b/docs/assets/download.js @@ -0,0 +1 @@ + function set_download_frontend(){function get_os(){const userAgent=window.navigator.userAgent,platform=window.navigator?.userAgentData?.platform || window.navigator.platform,macosPlatforms=['macOS','Macintosh','MacIntel','MacPPC','Mac68K'],windowsPlatforms=['Win32','Win64','Windows','WinCE'],iosPlatforms=['iPhone','iPad','iPod'];let os=null;if (macosPlatforms.indexOf(platform) !==-1){os='Mac';}else if (iosPlatforms.indexOf(platform) !==-1){os=null;}else if (windowsPlatforms.indexOf(platform) !==-1){os='Windows';}else if (/Android/.test(userAgent)){os=null;}else if (/Linux/.test(platform)){os='Linux';}return os;}let platform=get_os();if (platform !=null){let downloadElem=document.getElementById(`download-${platform}`);if (downloadElem) downloadElem.id=`-download-${platform}`;}else{let downloadElem=document.getElementById(`download-fallback`);if (downloadElem) downloadElem.id='-download-fallback';}} \ No newline at end of file diff --git a/docs/assets/image.js b/docs/assets/image.js new file mode 100644 index 00000000..2b05ed46 --- /dev/null +++ b/docs/assets/image.js @@ -0,0 +1 @@ +function set_image_size(){function resize_images(){if (innerWidth < 600){let demoImages=document.querySelectorAll('.demo');demoImages.forEach(img=>{img.height=img.originalHeight / 1.5;});}else{let demoImages=document.querySelectorAll('.demo');demoImages.forEach(img=>{if (img.originalHeight) img.height=img.originalHeight;});}}window.onresize=resize_images;let demoImages=document.querySelectorAll('.demo');demoImages.forEach(img=>{img.originalHeight=img.height;});resize_images();} \ No newline at end of file diff --git a/docs/assets/index.js b/docs/assets/index.js index 44094c38..fbf864fc 100644 --- a/docs/assets/index.js +++ b/docs/assets/index.js @@ -1 +1 @@ -const reactives=[];function get_os(){const userAgent=window.navigator.userAgent,platform=window.navigator?.userAgentData?.platform || window.navigator.platform,macosPlatforms=['macOS','Macintosh','MacIntel','MacPPC','Mac68K'],windowsPlatforms=['Win32','Win64','Windows','WinCE'],iosPlatforms=['iPhone','iPad','iPod'];let os=null;if (macosPlatforms.indexOf(platform) !==-1){os='Mac';}else if (iosPlatforms.indexOf(platform) !==-1){os=null;}else if (windowsPlatforms.indexOf(platform) !==-1){os='Windows';}else if (/Android/.test(userAgent)){os=null;}else if (/Linux/.test(platform)){os='Linux';}return os;}function closeMenu(e){e.classList.remove(['open']);}function openMenu(e){e.classList.add(['open']);}function isOpen(e){return e.classList.contains('open');}function toggleMenu(){if (!window.menu){return;}if (isOpen(window.menu)){reactives.forEach(closeMenu);closeMenu(window.menu);}else{console.log(reactives);reactives.forEach(openMenu);openMenu(window.menu);}}function resize_images(){if (innerWidth < 600){let demoImages=document.querySelectorAll('.demo');demoImages.forEach(img=>{img.height=img.originalHeight / 1.5;});}else{let demoImages=document.querySelectorAll('.demo');demoImages.forEach(img=>{if (img.originalHeight) img.height=img.originalHeight;});}}window.onresize=resize_images;function main(){let platform=get_os();if (platform !=null){let downloadElem=document.getElementById(`download-${platform}`);if (downloadElem) downloadElem.id=`-download-${platform}`;}else{let downloadElem=document.getElementById(`download-fallback`);if (downloadElem) downloadElem.id='-download-fallback';}let demoImages=document.querySelectorAll('.demo');demoImages.forEach(img=>{img.originalHeight=img.height;});resize_images();window.menu=document.getElementById('menu');if (window.innerWidth > 900){reactives.forEach(openMenu);openMenu(window.menu);setTimeout(()=> window.menu.style.transition='0.25s');}else{window.menu.style.transition='0.25s'}document.addEventListener('click',function (e){if (isOpen(window.menu) && !e.target.matches('.nav,.nav *,.menuItem,.menuItem *,.menuBtn,.menuBtn *')){reactives.forEach(closeMenu);closeMenu(window.menu);}});document.querySelectorAll('#reactive').forEach(elem=>{reactives.push(elem);});document.addEventListener('scroll',function (){setTimeout(()=>{reactives.forEach(closeMenu);closeMenu(window.menu);},150);})} \ No newline at end of file +const reactives=[];function get_os(){const userAgent=window.navigator.userAgent,platform=window.navigator?.userAgentData?.platform || window.navigator.platform,macosPlatforms=['macOS','Macintosh','MacIntel','MacPPC','Mac68K'],windowsPlatforms=['Win32','Win64','Windows','WinCE'],iosPlatforms=['iPhone','iPad','iPod'];let os=null;if (macosPlatforms.indexOf(platform) !==-1){os='Mac';}else if (iosPlatforms.indexOf(platform) !==-1){os=null;}else if (windowsPlatforms.indexOf(platform) !==-1){os='Windows';}else if (/Android/.test(userAgent)){os=null;}else if (/Linux/.test(platform)){os='Linux';}return os;}function closeMenu(e){e.classList.remove(['open']);}function openMenu(e){e.classList.add(['open']);}function isOpen(e){return e.classList.contains('open');}function toggleMenu(){if (!window.menu){return;}if (isOpen(window.menu)){reactives.forEach(closeMenu);closeMenu(window.menu);}else{console.log(reactives);reactives.forEach(openMenu);openMenu(window.menu);}}function resize_images(){if (innerWidth < 600){let demoImages=document.querySelectorAll('.demo');demoImages.forEach(img=>{img.height=img.originalHeight / 1.5;});}else{let demoImages=document.querySelectorAll('.demo');demoImages.forEach(img=>{if (img.originalHeight) img.height=img.originalHeight;});}}window.onresize=resize_images;function main(){let platform=get_os();if (platform !=null){let downloadElem=document.getElementById(`download-${platform}`);if (downloadElem) downloadElem.id=`-download-${platform}`;}else{let downloadElem=document.getElementById(`download-fallback`);if (downloadElem) downloadElem.id='-download-fallback';}let demoImages=document.querySelectorAll('.demo');demoImages.forEach(img=>{img.originalHeight=img.height;});resize_images();window.menu=document.getElementById('menu');if (window.innerWidth > 900){reactives.forEach(openMenu);openMenu(window.menu);setTimeout(()=> window.menu.style.transition='0.25s');}else{window.menu.style.transition='0.25s'}document.addEventListener('click',function (e){if (isOpen(window.menu) && !e.target.matches('.nav,.nav *,.menuItem,.menuItem *,.menuBtn,.menuBtn *')){reactives.forEach(closeMenu);closeMenu(window.menu);}});document.querySelectorAll('#reactive').forEach(elem=>{reactives.push(elem);});document.addEventListener('scroll',function (){setTimeout(()=>{reactives.forEach(closeMenu);closeMenu(window.menu);},150);});} \ No newline at end of file diff --git a/docs/assets/menu.js b/docs/assets/menu.js new file mode 100644 index 00000000..bfe16f7c --- /dev/null +++ b/docs/assets/menu.js @@ -0,0 +1 @@ +const reactives=[];function closeMenu(e){e.classList.remove(['open']);}function openMenu(e){e.classList.add(['open']);}function isOpen(e){return e.classList.contains('open');}function toggleMenu(){if (!window.menu){return;}if (isOpen(window.menu)){reactives.forEach(closeMenu);closeMenu(window.menu);}else{console.log(reactives);reactives.forEach(openMenu);openMenu(window.menu);}}function set_nav_menu(){window.menu=document.getElementById('menu');if (window.innerWidth > 900){reactives.forEach(openMenu);openMenu(window.menu);setTimeout(()=> window.menu.style.transition='0.25s');}else{window.menu.style.transition='0.25s'}document.addEventListener('click',function (e){if (isOpen(window.menu) && !e.target.matches('.nav,.nav *,.menuItem,.menuItem *,.menuBtn,.menuBtn *')){reactives.forEach(closeMenu);closeMenu(window.menu);}});document.querySelectorAll('#reactive').forEach(elem=>{reactives.push(elem);});document.addEventListener('scroll',function (){setTimeout(()=>{reactives.forEach(closeMenu);closeMenu(window.menu);},150);});} \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js new file mode 100644 index 00000000..fca6353a --- /dev/null +++ b/docs/assets/search.js @@ -0,0 +1 @@ + function set_search(root){let search_section=document.querySelector('.search-section');search_section.style.display='flex';let search=document.getElementById('search');let search_box=document.querySelector('.search-box');search_box.style.display='none';const MAX_ELEMENTS=8;let cursor=0;let is_focused=false;let ordered_symbols=[];function sortByClosestMatch(items,property,input,maxThreshold=8){if (!property || !input){return [];}const getRelevancyScore=(str,query)=>{if (str.startsWith(query)) return 1;if (str.includes(query)) return 0.5;return 0;};const getCloseness=(str,query)=>{return str.indexOf(query) !==-1 ? str.indexOf(query) : Number.MAX_SAFE_INTEGER;};const scoredItems=items.map(item=>{return{item,score: getRelevancyScore(item[property],input),closeness: getCloseness(item[property],input)};});scoredItems.sort((a,b)=>{if (a.score===b.score){return a.closeness - b.closeness;}return b.score - a.score;});let lastScore=scoredItems[0]?.score;let reducedThreshold=1;for (let i=1;i < scoredItems.length;i++){if (scoredItems[i].score===lastScore){reducedThreshold++;}else{break;}}const threshold=Math.min(maxThreshold,reducedThreshold);return scoredItems.slice(0,threshold).map(entry=> entry.item);}function clear_search_box(){while (search_box.firstChild){search_box.removeChild(search_box.lastChild);}}function update_search_box(){clear_search_box();if (ordered_symbols.length==0){search_box.style['padding-top']='0rem';search_box.style['padding-bottom']='0rem';}else{search_box.style['padding-top']='0.75rem';search_box.style['padding-bottom']='0.75rem';}ordered_symbols.forEach((symbol,i)=>{let p=document.createElement('p');p.innerHTML=symbol.name;if (cursor==i) p.id="cursor";search_box.appendChild(p);});}function showSearchBox(){search_box.style.display='inline-block';search_box.style.position='absolute';}function hideSearchBox(){search_box.style.display='none';}function createCursorCallback(ordered){if (!is_focused) return function(_){};return function (e){switch (e.key){case "ArrowUp": cursor=Math.max(cursor - 1,0);break;case "ArrowDown": cursor=Math.min(cursor + 1,ordered.length);break;case "Enter": let symbol=ordered_symbols[cursor];let link=`${root}${symbol.module}/#${symbol.name}`;let a=document.createElement('a');a.href=link;a.style.display='none';a.click();a.remove();break;}update_search_box();}};fetch(root + 'modules.json') .then(r=> r.json()) .then(({symbols})=>{search.addEventListener('focus',function (e){showSearchBox();is_focused=true;});search.addEventListener('blur',function (e){hideSearchBox();is_focused=false;});search.addEventListener('input',function (e){cursor=0;ordered_symbols=sortByClosestMatch(symbols,'name',e.target.value,MAX_ELEMENTS);window.onkeydown=createCursorCallback(ordered_symbols);update_search_box();});})} \ No newline at end of file diff --git a/docs/assets/style.css b/docs/assets/style.css index 654a3af5..db9373f9 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -1 +1 @@ -:root{--dark:#461164;--primary:#AA36EF;--lighter:#d49af7;--white:#efefef;--grey:#4f4f4f;--black:#181021}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background:rgba(0,0,0,0)}::-webkit-scrollbar-thumb{background:var(--primary)}::-webkit-scrollbar-thumb:hover{background:var(--dark)}code.inline{border-radius:4px;background-color:#dfd4ff;padding:0.1em}html,body{width:100%;height:100%;margin:0px;background-color:var(--white)}.smaller{font-size:0.7rem}.small{font-size:0.85rem}.dark{color:var(--dark)}.lighter{color:var(--lighter)}.flex{display:flex}.items-center{align-items:center}.flex-col{display:flex;flex-direction:column}.space-between{justify-content:space-between}.justify-start{justify-content:flex-start}.justify-between{justify-content:space-between}.underline{text-decoration:underline}.flex-grow{flex-grow:1}button{background-color:var(--primary);color:var(--white);cursor:pointer;border:none;border-radius:0.5rem;font-weight:bold;scale:1}button:hover{background-color:var(--dark);transition:0.2s;scale:1.05}button:active{background-color:var(--primary);transition:0.2s;scale:0.975}button.download{padding:0.95rem;margin:0 1rem;display:flex;gap:0.5rem;align-items:center}.gap-1{gap:0.25rem}.gap-2{gap:0.5rem}.gap-3{gap:0.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.gap-8{gap:2rem}.gap-9{gap:2.25rem}.gap-10{gap:2.5rem}.gap-11{gap:2.75rem}.gap-12{gap:3rem}footer{margin-top:3rem;padding:2rem 4rem;min-height:6rem;background-color:var(--primary)}body{min-height:100%;height:fit-content;display:flex;flex-direction:column}a,p,span.text,span.small,span.smaller,span.decorator,h1,h2,h3,h4,h5,h6{font-family:"Trebuchet MS",Tahoma,sans-serif}h1,h2,h3,h4,h5,h6{color:var(--black)}.light > h1,.light > h2,.light > h3,.light > h4,.light > h5,.light > h6{color:var(--white) !important}.decorator{font-size:12pt;border-radius:6px;color:var(--white);font-weight:bold;background-color:var(--primary);margin:auto 1.5rem;padding:0.2em 0.35em}ul{list-style-type:none;margin:0px;padding:0px}li:not(:last-child){padding-bottom:12px}.method{padding-top:2rem}.btn{padding-left:0.5rem}.light{color:var(--white)}.btn.light > a > h4{color:var(--white)}.btn:hover > a > h4,.btn:active > a > h4{color:var(--dark);transition:0.1s}code,pre{font-family:inconsolata,lucida console,monospace}header{width:100%;display:flex;flex-direction:row;align-items:baseline;gap:0.9rem;flex-wrap:wrap}.modules{display:flex;flex-wrap:wrap;gap:3.5rem}.container{width:80%;margin:0 auto}.flex{display:flex}.flex-col{flex-direction:column}a{text-decoration:none}a:visited{text-decoration:none}.underline{text-decoration:underline}.method > p > a{text-decoration:underline;text-underline-offset:0.2rem}.version{color:var(--dark);position:relative;top:-0.25em;left:-0.25em}main{padding:1.8em;height:fit-content;width:100%;display:flex;flex-direction:column;gap:0rem}.summary{min-width:8em}h1.module{position:relative;top:-0.25em;color:var(--primary);font-weight:bold;font-size:26pt}pre code.hljs{padding:1em;max-width:100%;font-size:10pt}.modules{margin-right:auto;margin-left:auto}.modules.open{margin-right:10.2rem;margin-left:2em}.builds{display:flex;flex-direction:column}.tags{display:none}.home-section{display:flex;justify-content:space-between;flex-direction:column-reverse;gap:2rem}.mosaic{display:flex;flex-wrap:wrap;gap:1rem;max-width:420px;align-content:flex-start}img.demo{width:auto}@media (min-width:900px){.tags{display:block}.modules{margin-right:auto;margin-left:auto}.modules.open{margin-right:auto;margin-left:auto}main > .method{padding-left:10%}h1.module{font-size:32pt}pre code.hljs{padding:1em 6em 1em 1em;max-width:38em;width:fit-content;font-size:13pt}.builds{display:flex;flex-direction:row;align-items:flex-end}.home-section{display:flex;justify-content:space-between;flex-direction:row}}.param{display:flex;gap:1rem;margin:0.2rem;vertical-align:middle;align-items:flex-start}.method{max-width:87.5%;margin-bottom:3rem}.method > div.methodDeclaration > code{font-size:16pt}.menuBtn{position:fixed;top:45dvh;right:-3.5em;width:7em;border-radius:49%;height:7em;border:none;outline:none;background-color:var(--primary)}.menuBtn > img{position:relative;left:-1.5em}.nav{background-color:var(--primary);position:fixed;min-width:10em;min-height:100%;position:fixed;padding:1.6rem;display:flex;flex-direction:column;right:calc(-100%);z-index:10}.nav.open{right:0px}#download-Windows,#download-Linux,#download-Mac,#download-fallback{display:none} \ No newline at end of file +:root{--dark:#461164;--primary:#AA36EF;--lighter:#d49af7;--white:#efefef;--grey:#4f4f4f;--black:#181021}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background:rgba(0,0,0,0)}::-webkit-scrollbar-thumb{background:var(--primary)}::-webkit-scrollbar-thumb:hover{background:var(--dark)}code.inline{border-radius:4px;background-color:#dfd4ff;padding:0.1em}html,body{width:100%;height:100%;margin:0px;background-color:var(--white)}.smaller{font-size:0.7rem}.small{font-size:0.85rem}.dark{color:var(--dark)}.lighter{color:var(--lighter)}.flex{display:flex}.items-center{align-items:center}.flex-col{display:flex;flex-direction:column}.space-between{justify-content:space-between}.justify-start{justify-content:flex-start}.justify-between{justify-content:space-between}.underline{text-decoration:underline}.flex-grow{flex-grow:1}button{background-color:var(--primary);color:var(--white);cursor:pointer;border:none;border-radius:0.5rem;font-weight:bold;scale:1}button:hover{background-color:var(--dark);transition:0.2s;scale:1.05}button:active{background-color:var(--primary);transition:0.2s;scale:0.975}button.download{padding:0.95rem;margin:0 1rem;display:flex;gap:0.5rem;align-items:center}.gap-1{gap:0.25rem}.gap-2{gap:0.5rem}.gap-3{gap:0.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.gap-8{gap:2rem}.gap-9{gap:2.25rem}.gap-10{gap:2.5rem}.gap-11{gap:2.75rem}.gap-12{gap:3rem}footer{margin-top:3rem;padding:2rem 4rem;min-height:6rem;background-color:var(--primary)}body{min-height:100%;height:fit-content;display:flex;flex-direction:column}a,p,span.text,span.small,span.smaller,span.decorator,h1,h2,h3,h4,h5,h6{font-family:"Trebuchet MS",Tahoma,sans-serif}h1,h2,h3,h4,h5,h6{color:var(--black)}.light > h1,.light > h2,.light > h3,.light > h4,.light > h5,.light > h6{color:var(--white) !important}.decorator{font-size:12pt;border-radius:6px;color:var(--white);font-weight:bold;background-color:var(--primary);margin:auto 1.5rem;padding:0.2em 0.35em}ul{list-style-type:none;margin:0px;padding:0px}li:not(:last-child){padding-bottom:12px}.method{padding-top:2rem}.btn{padding-left:0.5rem}.light{color:var(--white)}.btn.light > a > h4{color:var(--white)}.btn:hover > a > h4,.btn:active > a > h4{color:var(--dark);transition:0.1s}code,pre{font-family:inconsolata,lucida console,monospace}header{display:flex;justify-content:space-between;align-items:baseline;width:100%}header > .wrap{width:100%;display:flex;flex-direction:row;align-items:baseline;gap:0.9rem;flex-wrap:wrap}.modules{display:flex;flex-wrap:wrap;gap:3.5rem}.container{width:80%;margin:0 auto}.flex{display:flex}.flex-col{flex-direction:column}a{text-decoration:none}a:visited{text-decoration:none}.underline{text-decoration:underline}.method > p > a{text-decoration:underline;text-underline-offset:0.2rem}.version{color:var(--dark);position:relative;top:-0.25em;left:-0.25em}main{padding:1.8em;height:fit-content;width:100%;display:flex;flex-direction:column;gap:0rem}.summary{min-width:8em}h1.module{position:relative;top:-0.25em;color:var(--primary);font-weight:bold;font-size:26pt}pre code.hljs{padding:1em;max-width:100%;font-size:10pt}.modules{margin-right:auto;margin-left:auto}.modules.open{margin-right:10.2rem;margin-left:2em}.builds{display:flex;flex-direction:column}.tags{display:none}.home-section{display:flex;justify-content:space-between;flex-direction:column-reverse;gap:2rem}.mosaic{display:flex;flex-wrap:wrap;gap:1rem;max-width:420px;align-content:flex-start}img.demo{width:auto}.search-section{margin-bottom:1rem;margin-right:2rem;color:var(--lighter)}@media (min-width:900px){.search-section{margin-bottom:1rem;margin-right:18%;color:var(--lighter)}.tags{display:block}.modules{margin-right:auto;margin-left:auto}.modules.open{margin-right:auto;margin-left:auto}main > .method{padding-left:10%}h1.module{font-size:32pt}pre code.hljs{padding:1em 6em 1em 1em;max-width:38em;width:fit-content;font-size:13pt}.builds{display:flex;flex-direction:row;align-items:flex-end}.home-section{display:flex;justify-content:space-between;flex-direction:row}}input{padding:0.5rem;border:none;border-radius:0.5rem;background-color:var(--lighter);color:var(--dark);outline:none}.search-wrap{min-width:20rem;max-width:32rem}.search-box{background-color:var(--lighter);color:var(--dark);width:100%;top:2rem;border-radius:0.5rem}.search-box > p#cursor{margin:0rem 0.5rem;padding:0.25rem 0.5rem;background-color:var(--dark);color:var(--lighter);border-radius:0.5rem}.search-box > p{margin:0.25rem 1rem}.param{display:flex;gap:1rem;margin:0.2rem;vertical-align:middle;align-items:flex-start}.method{max-width:87.5%;margin-bottom:3rem}.method > div.methodDeclaration > code{font-size:16pt}.menuBtn{position:fixed;top:45dvh;right:-3.5em;width:7em;border-radius:49%;height:7em;border:none;outline:none;background-color:var(--primary)}.menuBtn > img{position:relative;left:-1.5em}.nav{background-color:var(--primary);position:fixed;min-width:10em;min-height:100%;position:fixed;padding:1.6rem;display:flex;flex-direction:column;right:calc(-100%);z-index:10}.nav.open{right:0px}#download-Windows,#download-Linux,#download-Mac,#download-fallback{display:none} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index eb8ac5a7..e24bcc37 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ -lu5 | Interpreter for Creative Coding

Interpreter for Creative Coding

Lu5 is a free and open-source Lua interpreter for Creative Coding.

Download

On arch based systems, you can install lu5 from the AUR.
yay -S lu5

For any other linux distribution, you can build from source
git clone https://github.com/matiasvlevi/lu5 --branch v0.1.6
+lu5 | Interpreter for Creative Coding

Interpreter for Creative Coding

Lu5 is a free and open-source Lua interpreter for Creative Coding.

Download

On arch based systems, you can install lu5 from the AUR.
yay -S lu5

For any other linux distribution, you can build from source
git clone https://github.com/matiasvlevi/lu5 --branch v0.1.6
 cd lu5
 make
-
lu5 is not available on Mac OS :(
lu5 is not available on mobile devices :(

This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +
lu5 is not available on Mac OS :(
lu5 is not available on mobile devices :(

\ No newline at end of file diff --git a/docs/v0.1.7/camera/index.html b/docs/v0.1.7/camera/index.html index e919536f..89d9dbc0 100644 --- a/docs/v0.1.7/camera/index.html +++ b/docs/v0.1.7/camera/index.html @@ -1,4 +1,4 @@ -lu5 | camera

camera

v0.1.7
orbitControl();

Helpful utility for controlling the camera around the origin.
Enables quick camera controls without much of an implementation.

function setup()
+lu5 | camera

camera

v0.1.7
orbitControl();

Helpful utility for controlling the camera around the origin.
Enables quick camera controls without much of an implementation.

function setup()
     createWindow(800, 800, GL3D);
 end
 
@@ -13,4 +13,4 @@
     strokeWeight(4);
 
     box(60);
-end
See orbitControl in camera.h
This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +end
See orbitControl in camera.h
\ No newline at end of file diff --git a/docs/v0.1.7/camera/methods.json b/docs/v0.1.7/camera/methods.json new file mode 100644 index 00000000..3f83927a --- /dev/null +++ b/docs/v0.1.7/camera/methods.json @@ -0,0 +1 @@ +{"name":"camera","methods":[{"doc":{"name":"orbitControl","_type":"method","examples":["function setup()\n createWindow(800, 800, GL3D);\nend\n\nfunction draw() \n background(51);\n\n -- Allows us to control the camera\n orbitControl();\n\n noFill();\n stroke(80, 255, 50);\n strokeWeight(4);\n\n box(60);\nend"],"bottom_description":"","calls":[{"arguments":{}}],"description":"Helpful utility for controlling the camera around the origin.
Enables quick camera controls without much of an implementation."},"source":{"start_line":22,"end_line":46,"header":"camera.h"}}],"source":"camera"} \ No newline at end of file diff --git a/docs/v0.1.7/classes/index.html b/docs/v0.1.7/classes/index.html index fe900a3e..5176639a 100644 --- a/docs/v0.1.7/classes/index.html +++ b/docs/v0.1.7/classes/index.html @@ -1,4 +1,4 @@ -lu5 | classes

classes

v0.1.7
class(name);

Create a class.
if a class implements a print method, it can be used in the print function

Arguments

nameThe class name

local Player = class('Player');
+lu5 | classes

classes

v0.1.7
class(name);

Create a class.
if a class implements a print method, it can be used in the print function

Arguments

nameThe class name

local Player = class('Player');
 
 function Player:init(x, y)
   self.x = x;
@@ -24,4 +24,4 @@
 
   p1:draw();
   p2:draw();
-end
See class in classes.h
This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +end
See class in classes.h
\ No newline at end of file diff --git a/docs/v0.1.7/classes/methods.json b/docs/v0.1.7/classes/methods.json new file mode 100644 index 00000000..edb6f0bb --- /dev/null +++ b/docs/v0.1.7/classes/methods.json @@ -0,0 +1 @@ +{"name":"classes","methods":[{"doc":{"name":"class","_type":"method","examples":["local Player = class('Player');\n\nfunction Player:init(x, y)\n self.x = x;\n self.y = y;\n return self;\nend\n\nfunction Player:draw()\n circle(self.x, self.y, 16);\nend\n\n\n-- Create 2 players and draw them\nlocal p1 = Player:new(100, 200);\nlocal p2 = Player:new(300, 200);\n\nfunction setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n p1:draw();\n p2:draw();\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The class name","name":"name"}]}],"description":"Create a class.
if a class implements a print method, it can be used in the print function"},"source":{"start_line":4,"end_line":40,"header":"classes.h"}}],"source":"classes"} \ No newline at end of file diff --git a/docs/v0.1.7/image/index.html b/docs/v0.1.7/image/index.html index d64afc67..6a88d5b5 100644 --- a/docs/v0.1.7/image/index.html +++ b/docs/v0.1.7/image/index.html @@ -1,4 +1,4 @@ -lu5 | image

image

v0.1.7
loadImage(path);

Load a png or jpeg image

Arguments

pathThe local image path

Returns

ImageThe image instance

function setup()
+lu5 | image

image

v0.1.7
loadImage(path);

Load a png or jpeg image

Arguments

pathThe local image path

Returns

ImageThe image instance

function setup()
   createWindow(600, 600);
   img = loadImage('/path/to/mypic.png');
 end
@@ -7,7 +7,7 @@
   background(51);
 
   image(img, 0, 0);
-end   
See loadImage in image.h
image(img, x, y, [w], [h]);

Draw an image to the screen

Arguments

imgThe Image instance
xThe x position of the image
yThe y position of the image
[w]The width of the image, if not specified, using source width
[h]The height of the image, if not specified, using source height

See image in image.h
Image.crop(x, y, w, h);

Crop an Image into an other Image

Arguments

xThe x position of the image
yThe y position of the image
wThe width of the new cropped image
hThe height of the new cropped image

Returns

Imagethe cropped image

function setup()
+end   
See loadImage in image.h
image(img, x, y, [w], [h]);

Draw an image to the screen

Arguments

imgThe Image instance
xThe x position of the image
yThe y position of the image
[w]The width of the image, if not specified, using source width
[h]The height of the image, if not specified, using source height

See image in image.h
Image.crop(x, y, w, h);

Crop an Image into an other Image

Arguments

xThe x position of the image
yThe y position of the image
wThe width of the new cropped image
hThe height of the new cropped image

Returns

Imagethe cropped image

function setup()
     createWindow(400, 400);
 
     img = loadImage('examples/images/cat.jpg');
@@ -23,4 +23,4 @@
     image(img, 0, 0);
     image(cropped, x, y);
 
-end
See Image.crop in image.h
This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +end
See Image.crop in image.h
\ No newline at end of file diff --git a/docs/v0.1.7/image/methods.json b/docs/v0.1.7/image/methods.json new file mode 100644 index 00000000..f3a02d93 --- /dev/null +++ b/docs/v0.1.7/image/methods.json @@ -0,0 +1 @@ +{"name":"image","methods":[{"doc":{"name":"loadImage","_type":"method","_return":{"description":"The image instance","var":"Image"},"examples":["function setup()\n createWindow(600, 600);\n img = loadImage('/path/to/mypic.png');\nend\n\nfunction draw()\n background(51);\n\n image(img, 0, 0);\nend "],"bottom_description":"","calls":[{"arguments":[{"description":"The local image path","name":"path"}]}],"description":"Load a png or jpeg image "},"source":{"start_line":6,"end_line":26,"header":"image.h"}},{"doc":{"name":"image","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The Image instance","name":"img"},{"description":"The x position of the image","name":"x"},{"description":"The y position of the image","name":"y"},{"description":"The width of the image, if not specified, using source width","name":"[w]"},{"description":"The height of the image, if not specified, using source height","name":"[h]"}]}],"description":"Draw an image to the screen"},"source":{"start_line":28,"end_line":37,"header":"image.h"}},{"doc":{"name":"Image.crop","_type":"method","_return":{"description":"the cropped image","var":"Image"},"examples":["function setup()\n createWindow(400, 400);\n\n img = loadImage('examples/images/cat.jpg');\n\n cropped = img:crop(150, 150, 125, 200);\n -- -- or\n -- cropped = Image.crop(img, 150, 150, 125, 200);\nend\n\nfunction draw() \n background(51);\n\n image(img, 0, 0);\n image(cropped, x, y);\n\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The x position of the image","name":"x"},{"description":"The y position of the image","name":"y"},{"description":"The width of the new cropped image","name":"w"},{"description":"The height of the new cropped image","name":"h"}]}],"description":"Crop an Image into an other Image"},"source":{"start_line":39,"end_line":71,"header":"image.h"}}],"source":"image"} \ No newline at end of file diff --git a/docs/v0.1.7/index.html b/docs/v0.1.7/index.html index 0f47dcef..7417093f 100644 --- a/docs/v0.1.7/index.html +++ b/docs/v0.1.7/index.html @@ -1 +1 @@ -lu5 | Reference

Reference

v0.1.7
\ No newline at end of file +lu5 | Reference

Reference

v0.1.7
\ No newline at end of file diff --git a/docs/v0.1.7/io/index.html b/docs/v0.1.7/io/index.html index 261a48c2..000297e4 100644 --- a/docs/v0.1.7/io/index.html +++ b/docs/v0.1.7/io/index.html @@ -1,9 +1,9 @@ -lu5 | io

io

v0.1.7
print(value);

Printing utility, can take any lua type.

Arguments

valueThe value to print to stdout

print(42);
+lu5 | io

io

v0.1.7
print(value);

Printing utility, can take any lua type.

Arguments

valueThe value to print to stdout

print(42);
 
 print(1, 2, 3);
 
 print('Hello world');
 
-print({ 3, 8, 1 });
See print in io.h
loadText(file_path);

Read a file as a string

Arguments

file_pathThe path of the file

file = loadText("./your-file.txt");
-print(file)
See loadText in io.h
loadStrings(file_path);

Read a file as an array of strings split by line

Arguments

file_pathThe path of the file

file = loadStrings("./your-file.txt");
-print(file)
See loadStrings in io.h
This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +print({ 3, 8, 1 });
See print in io.h
loadText(file_path);

Read a file as a string

Arguments

file_pathThe path of the file

file = loadText("./your-file.txt");
+print(file)
See loadText in io.h
loadStrings(file_path);

Read a file as an array of strings split by line

Arguments

file_pathThe path of the file

file = loadStrings("./your-file.txt");
+print(file)
See loadStrings in io.h
\ No newline at end of file diff --git a/docs/v0.1.7/io/methods.json b/docs/v0.1.7/io/methods.json new file mode 100644 index 00000000..9359e550 --- /dev/null +++ b/docs/v0.1.7/io/methods.json @@ -0,0 +1 @@ +{"name":"io","methods":[{"doc":{"name":"print","_type":"method","examples":["print(42);\n\nprint(1, 2, 3);\n\nprint('Hello world');\n\nprint({ 3, 8, 1 });"],"bottom_description":"","calls":[{"arguments":[{"description":"The value to print to stdout","name":"value"}]}],"description":"Printing utility, can take any lua type."},"source":{"start_line":6,"end_line":21,"header":"io.h"}},{"doc":{"name":"loadText","_type":"method","examples":["file = loadText(\"./your-file.txt\");\nprint(file)"],"bottom_description":"","calls":[{"arguments":[{"description":"The path of the file","name":"file_path"}]}],"description":"Read a file as a string"},"source":{"start_line":25,"end_line":35,"header":"io.h"}},{"doc":{"name":"loadStrings","_type":"method","examples":["file = loadStrings(\"./your-file.txt\");\nprint(file)"],"bottom_description":"","calls":[{"arguments":[{"description":"The path of the file","name":"file_path"}]}],"description":"Read a file as an array of strings split by line"},"source":{"start_line":37,"end_line":47,"header":"io.h"}}],"source":"io"} \ No newline at end of file diff --git a/docs/v0.1.7/keyboard/index.html b/docs/v0.1.7/keyboard/index.html index 72aaa671..4b61329a 100644 --- a/docs/v0.1.7/keyboard/index.html +++ b/docs/v0.1.7/keyboard/index.html @@ -1,4 +1,4 @@ -lu5 | keyboard

keyboard

v0.1.7
keyIsDown(k);

Check if a keyboard key is pressed, returns true if key is down and returns false if it's not

Arguments

kThe keyboard key to check as a key global, or a string

Returns

booleanWhether or not the key is down

-- Use a string 
+lu5 | keyboard

keyboard

v0.1.7
keyIsDown(k);

Check if a keyboard key is pressed, returns true if key is down and returns false if it's not

Arguments

kThe keyboard key to check as a key global, or a string

Returns

booleanWhether or not the key is down

-- Use a string 
 if (keyIsDown('a')) then
   -- key 'a' is down
 end
@@ -6,7 +6,7 @@
 -- use a global
 if (keyIsDown(LEFT_ARROW)) then
   -- left arrow is down
-end
See keyIsDown in keyboard.h
keyPressed(key, keyCode);Event

Called whenever a key is pressed.

Arguments

keyThe pressed key as a string, is nil if glfw cannot find a name for the key
keyCodeThe pressed key as a key code

function setup()
+end
See keyIsDown in keyboard.h
keyPressed(key, keyCode);Event

Called whenever a key is pressed.

Arguments

keyThe pressed key as a string, is nil if glfw cannot find a name for the key
keyCodeThe pressed key as a key code

function setup()
    createWindow(600, 600);
 end
 
@@ -16,7 +16,7 @@
 
 function keyPressed(key, keyCode)
    print(key, keyCode)
-end
See keyPressed in keyboard.h
keyReleased(key, keyCode);Event

Called whenever a key is released.

Arguments

keyThe released key as a string, is nil if glfw cannot find a name for the key
keyCodeThe released key as a key code

function setup()
+end
See keyPressed in keyboard.h
keyReleased(key, keyCode);Event

Called whenever a key is released.

Arguments

keyThe released key as a string, is nil if glfw cannot find a name for the key
keyCodeThe released key as a key code

function setup()
    createWindow(600, 600);
 end
 
@@ -26,7 +26,7 @@
 
 function keyReleased(key, keyCode)
    print(key, keyCode)
-end
See keyReleased in keyboard.h
keyHeld(key, keyCode);Event

Called whenever a key is held down.

Arguments

keyThe held key as a string, is nil if glfw cannot find a name for the key
keyCodeThe held key as a key code

function setup()
+end
See keyReleased in keyboard.h
keyHeld(key, keyCode);Event

Called whenever a key is held down.

Arguments

keyThe held key as a string, is nil if glfw cannot find a name for the key
keyCodeThe held key as a key code

function setup()
    createWindow(600, 600);
 end
 
@@ -36,4 +36,4 @@
 
 function keyHeld(key, keyCode)
    print(key, keyCode)
-end
See keyHeld in keyboard.h
UP_ARROWConstant

No description

See UP_ARROW in keyboard.h
DOWN_ARROWConstant

No description

See DOWN_ARROW in keyboard.h
LEFT_ARROWConstant

No description

See LEFT_ARROW in keyboard.h
RIGHT_ARROWConstant

No description

See RIGHT_ARROW in keyboard.h
KEY_ENTERConstant

No description

See KEY_ENTER in keyboard.h
KEY_BACKSPACEConstant

No description

See KEY_BACKSPACE in keyboard.h
KEY_AConstant

No description

See KEY_A in keyboard.h
KEY_BConstant

No description

See KEY_B in keyboard.h
KEY_CConstant

No description

See KEY_C in keyboard.h
KEY_DConstant

No description

See KEY_D in keyboard.h
KEY_EConstant

No description

See KEY_E in keyboard.h
KEY_FConstant

No description

See KEY_F in keyboard.h
KEY_GConstant

No description

See KEY_G in keyboard.h
KEY_HConstant

No description

See KEY_H in keyboard.h
KEY_IConstant

No description

See KEY_I in keyboard.h
KEY_JConstant

No description

See KEY_J in keyboard.h
KEY_KConstant

No description

See KEY_K in keyboard.h
KEY_LConstant

No description

See KEY_L in keyboard.h
KEY_MConstant

No description

See KEY_M in keyboard.h
KEY_NConstant

No description

See KEY_N in keyboard.h
KEY_OConstant

No description

See KEY_O in keyboard.h
KEY_PConstant

No description

See KEY_P in keyboard.h
KEY_QConstant

No description

See KEY_Q in keyboard.h
KEY_RConstant

No description

See KEY_R in keyboard.h
KEY_SConstant

No description

See KEY_S in keyboard.h
KEY_TConstant

No description

See KEY_T in keyboard.h
KEY_UConstant

No description

See KEY_U in keyboard.h
KEY_VConstant

No description

See KEY_V in keyboard.h
KEY_WConstant

No description

See KEY_W in keyboard.h
KEY_XConstant

No description

See KEY_X in keyboard.h
KEY_YConstant

No description

See KEY_Y in keyboard.h
KEY_ZConstant

No description

See KEY_Z in keyboard.h
This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +end
See keyHeld in keyboard.h
UP_ARROWConstant

No description

See UP_ARROW in keyboard.h
DOWN_ARROWConstant

No description

See DOWN_ARROW in keyboard.h
LEFT_ARROWConstant

No description

See LEFT_ARROW in keyboard.h
RIGHT_ARROWConstant

No description

See RIGHT_ARROW in keyboard.h
KEY_ENTERConstant

No description

See KEY_ENTER in keyboard.h
KEY_BACKSPACEConstant

No description

See KEY_BACKSPACE in keyboard.h
KEY_AConstant

No description

See KEY_A in keyboard.h
KEY_BConstant

No description

See KEY_B in keyboard.h
KEY_CConstant

No description

See KEY_C in keyboard.h
KEY_DConstant

No description

See KEY_D in keyboard.h
KEY_EConstant

No description

See KEY_E in keyboard.h
KEY_FConstant

No description

See KEY_F in keyboard.h
KEY_GConstant

No description

See KEY_G in keyboard.h
KEY_HConstant

No description

See KEY_H in keyboard.h
KEY_IConstant

No description

See KEY_I in keyboard.h
KEY_JConstant

No description

See KEY_J in keyboard.h
KEY_KConstant

No description

See KEY_K in keyboard.h
KEY_LConstant

No description

See KEY_L in keyboard.h
KEY_MConstant

No description

See KEY_M in keyboard.h
KEY_NConstant

No description

See KEY_N in keyboard.h
KEY_OConstant

No description

See KEY_O in keyboard.h
KEY_PConstant

No description

See KEY_P in keyboard.h
KEY_QConstant

No description

See KEY_Q in keyboard.h
KEY_RConstant

No description

See KEY_R in keyboard.h
KEY_SConstant

No description

See KEY_S in keyboard.h
KEY_TConstant

No description

See KEY_T in keyboard.h
KEY_UConstant

No description

See KEY_U in keyboard.h
KEY_VConstant

No description

See KEY_V in keyboard.h
KEY_WConstant

No description

See KEY_W in keyboard.h
KEY_XConstant

No description

See KEY_X in keyboard.h
KEY_YConstant

No description

See KEY_Y in keyboard.h
KEY_ZConstant

No description

See KEY_Z in keyboard.h
\ No newline at end of file diff --git a/docs/v0.1.7/keyboard/methods.json b/docs/v0.1.7/keyboard/methods.json new file mode 100644 index 00000000..48e7a7c8 --- /dev/null +++ b/docs/v0.1.7/keyboard/methods.json @@ -0,0 +1 @@ +{"name":"keyboard","methods":[{"doc":{"name":"keyIsDown","_type":"method","_return":{"description":"Whether or not the key is down","var":"boolean"},"examples":["-- Use a string \nif (keyIsDown('a')) then\n -- key 'a' is down\nend\n\n-- use a global\nif (keyIsDown(LEFT_ARROW)) then\n -- left arrow is down\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The keyboard key to check as a key global, or a string","name":"k"}]}],"description":"Check if a keyboard key is pressed, returns true if key is down and returns false if it's not"},"source":{"start_line":6,"end_line":25,"header":"keyboard.h"}},{"doc":{"name":"keyPressed","_type":"event","examples":["function setup()\n createWindow(600, 600);\nend\n\nfunction draw()\n background(51);\nend\n\nfunction keyPressed(key, keyCode)\n print(key, keyCode)\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The pressed key as a string, is nil if glfw cannot find a name for the key","name":"key"},{"description":"The pressed key as a key code","name":"keyCode"}]}],"description":"Called whenever a key is pressed."},"source":{"start_line":27,"end_line":49,"header":"keyboard.h"}},{"doc":{"name":"keyReleased","_type":"event","examples":["function setup()\n createWindow(600, 600);\nend\n\nfunction draw()\n background(51);\nend\n\nfunction keyReleased(key, keyCode)\n print(key, keyCode)\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The released key as a string, is nil if glfw cannot find a name for the key","name":"key"},{"description":"The released key as a key code","name":"keyCode"}]}],"description":"Called whenever a key is released."},"source":{"start_line":52,"end_line":73,"header":"keyboard.h"}},{"doc":{"name":"keyHeld","_type":"event","examples":["function setup()\n createWindow(600, 600);\nend\n\nfunction draw()\n background(51);\nend\n\nfunction keyHeld(key, keyCode)\n print(key, keyCode)\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The held key as a string, is nil if glfw cannot find a name for the key","name":"key"},{"description":"The held key as a key code","name":"keyCode"}]}],"description":"Called whenever a key is held down."},"source":{"start_line":76,"end_line":97,"header":"keyboard.h"}},{"doc":{"name":"UP_ARROW","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":100,"end_line":104,"header":"keyboard.h"}},{"doc":{"name":"DOWN_ARROW","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":107,"end_line":111,"header":"keyboard.h"}},{"doc":{"name":"LEFT_ARROW","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":114,"end_line":117,"header":"keyboard.h"}},{"doc":{"name":"RIGHT_ARROW","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":120,"end_line":123,"header":"keyboard.h"}},{"doc":{"name":"KEY_ENTER","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":126,"end_line":129,"header":"keyboard.h"}},{"doc":{"name":"KEY_BACKSPACE","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":132,"end_line":135,"header":"keyboard.h"}},{"doc":{"name":"KEY_A","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":138,"end_line":141,"header":"keyboard.h"}},{"doc":{"name":"KEY_B","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":142,"end_line":145,"header":"keyboard.h"}},{"doc":{"name":"KEY_C","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":146,"end_line":149,"header":"keyboard.h"}},{"doc":{"name":"KEY_D","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":150,"end_line":153,"header":"keyboard.h"}},{"doc":{"name":"KEY_E","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":154,"end_line":157,"header":"keyboard.h"}},{"doc":{"name":"KEY_F","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":158,"end_line":161,"header":"keyboard.h"}},{"doc":{"name":"KEY_G","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":162,"end_line":165,"header":"keyboard.h"}},{"doc":{"name":"KEY_H","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":166,"end_line":169,"header":"keyboard.h"}},{"doc":{"name":"KEY_I","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":170,"end_line":173,"header":"keyboard.h"}},{"doc":{"name":"KEY_J","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":174,"end_line":177,"header":"keyboard.h"}},{"doc":{"name":"KEY_K","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":178,"end_line":181,"header":"keyboard.h"}},{"doc":{"name":"KEY_L","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":182,"end_line":185,"header":"keyboard.h"}},{"doc":{"name":"KEY_M","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":186,"end_line":189,"header":"keyboard.h"}},{"doc":{"name":"KEY_N","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":190,"end_line":193,"header":"keyboard.h"}},{"doc":{"name":"KEY_O","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":194,"end_line":197,"header":"keyboard.h"}},{"doc":{"name":"KEY_P","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":198,"end_line":201,"header":"keyboard.h"}},{"doc":{"name":"KEY_Q","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":202,"end_line":205,"header":"keyboard.h"}},{"doc":{"name":"KEY_R","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":206,"end_line":209,"header":"keyboard.h"}},{"doc":{"name":"KEY_S","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":210,"end_line":213,"header":"keyboard.h"}},{"doc":{"name":"KEY_T","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":214,"end_line":217,"header":"keyboard.h"}},{"doc":{"name":"KEY_U","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":218,"end_line":221,"header":"keyboard.h"}},{"doc":{"name":"KEY_V","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":222,"end_line":225,"header":"keyboard.h"}},{"doc":{"name":"KEY_W","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":226,"end_line":229,"header":"keyboard.h"}},{"doc":{"name":"KEY_X","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":230,"end_line":233,"header":"keyboard.h"}},{"doc":{"name":"KEY_Y","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":234,"end_line":237,"header":"keyboard.h"}},{"doc":{"name":"KEY_Z","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":238,"end_line":241,"header":"keyboard.h"}}],"source":"keyboard"} \ No newline at end of file diff --git a/docs/v0.1.7/math/index.html b/docs/v0.1.7/math/index.html index 7e0c1bef..4c55e54f 100644 --- a/docs/v0.1.7/math/index.html +++ b/docs/v0.1.7/math/index.html @@ -1,17 +1,17 @@ -lu5 | math

math

v0.1.7
randomSeed(seed);

Set a random seed

Arguments

seedThe seed value

Returns

numberThe random value

See randomSeed in lu5_math.h
random

Get a random number

random(max);

Arguments

maxThe maximum of the range
random()      -- random number between 0 and 1
-random(3)     -- random number between 0 and 3
random(min, max);

Arguments

minThe minimum of the range
maxThe maximum of the range
random(3, 12) -- random number between 3 and 12
random(arr);

Arguments

arrThe array to randomly select an item from
random({ 'A', 'B', 'C' }) -- random element in table

Returns

numberThe random value

See random in lu5_math.h
round(x);

Round a number to the nearest integer

Arguments

xThe value to round

Returns

intThe rounded value

See round in lu5_math.h
floor(x);

floor is a function that takes in a number, and returns the greatest integer less or equal to x
see here

Arguments

xThe value to floor

Returns

intgreatest integer less than or equals to x

See floor in lu5_math.h
ceil(x);

ceil is a function that takes in a number, and returns the smallest integer greater or equal to x
see here

Arguments

xThe value to floor

Returns

intThe floored value

See ceil in lu5_math.h
min(a, b);

Return the smallest value.
Can also take any number of arguments, or a table.

Arguments

aThe first value
bThe second value

Returns

numberThe smallest value

min(6, 7); -- returns 6
+lu5 | math

math

v0.1.7
randomSeed(seed);

Set a random seed

Arguments

seedThe seed value

Returns

numberThe random value

See randomSeed in lu5_math.h
random

Get a random number

Arguments

maxThe maximum of the range
random()      -- random number between 0 and 1
+random(3)     -- random number between 0 and 3

Arguments

minThe minimum of the range
maxThe maximum of the range
random(3, 12) -- random number between 3 and 12

Arguments

arrThe array to randomly select an item from
random({ 'A', 'B', 'C' }) -- random element in table

Returns

numberThe random value

See random in lu5_math.h
round(x);

Round a number to the nearest integer

Arguments

xThe value to round

Returns

intThe rounded value

See round in lu5_math.h
floor(x);

floor is a function that takes in a number, and returns the greatest integer less or equal to x
see here

Arguments

xThe value to floor

Returns

intgreatest integer less than or equals to x

See floor in lu5_math.h
ceil(x);

ceil is a function that takes in a number, and returns the smallest integer greater or equal to x
see here

Arguments

xThe value to floor

Returns

intThe floored value

See ceil in lu5_math.h
min(a, b);

Return the smallest value.
Can also take any number of arguments, or a table.

Arguments

aThe first value
bThe second value

Returns

numberThe smallest value

min(6, 7); -- returns 6
 
 min(6, 7, 4); -- returns 4
 
-min({ 6, 7, 4 }); -- returns 4
See min in lu5_math.h
max(a, b);

Return the largest value.
Can also take any number of arguments, or a table.

Arguments

aThe first value
bThe second value

Returns

numberThe largest value

max(2, 5); -- returns 5
+min({ 6, 7, 4 }); -- returns 4
See min in lu5_math.h
max(a, b);

Return the largest value.
Can also take any number of arguments, or a table.

Arguments

aThe first value
bThe second value

Returns

numberThe largest value

max(2, 5); -- returns 5
 
 max(2, 5, 7); -- returns 7
 
-max({ 2, 5, 7 }); -- returns 7
See max in lu5_math.h
abs(x);

Returns the absolute value of x
see here

Arguments

xThe input value

Returns

numberThe absolote value of the input

See abs in lu5_math.h
map(value, start, end, target_start, target_end);

Maps x from an original range to a target range

Arguments

valueThe value to map
startThe start of the initial range
endThe end of the initial range
target_startThe start of the target range
target_endThe end of the target range

Returns

numberThe mapped value

local mouseX_mapped = map(mouseX, 0, width, 0, 100);
--- mapped mouseX between 0 and 100
See map in lu5_math.h
dist

Calculates the distance between 2 points in 2D or 3D space

dist(x1, y1, x2, y2);

Arguments

x1The x coordinate of the first point
y1The y coordinate of the first point
x2The x coordinate of the second point
y2The y coordinate of the second point
local d = dist(0, 0, 3, 4);
-print(d) -- 5
dist(x1, y1, z1, x2, y2, z2);

Arguments

x1The x coordinate of the first point
y1The y coordinate of the first point
z1The z coordinate of the first point
x2The x coordinate of the second point
y2The y coordinate of the second point
z2The z coordinate of the second point
local d = dist(0, 0, 0, 2, 3, 6);
-print(d) -- 7
dist(v1, v2);

Arguments

v1The first vector
v2The second vector
local a = createVector(-1, -1);
+max({ 2, 5, 7 }); -- returns 7
See max in lu5_math.h
abs(x);

Returns the absolute value of x
see here

Arguments

xThe input value

Returns

numberThe absolote value of the input

See abs in lu5_math.h
map(value, start, end, target_start, target_end);

Maps x from an original range to a target range

Arguments

valueThe value to map
startThe start of the initial range
endThe end of the initial range
target_startThe start of the target range
target_endThe end of the target range

Returns

numberThe mapped value

local mouseX_mapped = map(mouseX, 0, width, 0, 100);
+-- mapped mouseX between 0 and 100
See map in lu5_math.h
dist

Calculates the distance between 2 points in 2D or 3D space

Arguments

x1The x coordinate of the first point
y1The y coordinate of the first point
x2The x coordinate of the second point
y2The y coordinate of the second point
local d = dist(0, 0, 3, 4);
+print(d) -- 5

Arguments

x1The x coordinate of the first point
y1The y coordinate of the first point
z1The z coordinate of the first point
x2The x coordinate of the second point
y2The y coordinate of the second point
z2The z coordinate of the second point
local d = dist(0, 0, 0, 2, 3, 6);
+print(d) -- 7

Arguments

v1The first vector
v2The second vector
local a = createVector(-1, -1);
 local b = createVector( 2,  3);
 
 local d = dist(a, b);
-print(d) -- 5

Returns

numberThe distance between the points

See dist in lu5_math.h
constrain(x, min, max);

Limits x to a minimum and maximum value

Arguments

xThe input value
minThe minimum value
maxThe maximum value

Returns

numberThe constrained value

See constrain in lu5_math.h
sin(x);

Sine function (Trigonometry)

Arguments

xThe input value

Returns

numberThe output value

See sin in lu5_math.h
cos(x);

Cosine function (Trigonometry)

Arguments

xThe input value

Returns

numberThe output value

See cos in lu5_math.h
tan(x);

Tangent function (Trigonometry)

Arguments

xThe input value

Returns

numberThe output value

See tan in lu5_math.h
PIConstant

No description

See PI in lu5_math.h
TWO_PIConstant

No description

See TWO_PI in lu5_math.h
HALF_PIConstant

No description

See HALF_PI in lu5_math.h
QUARTER_PIConstant

No description

See QUARTER_PI in lu5_math.h
This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +print(d) -- 5

Returns

numberThe distance between the points

See dist in lu5_math.h
constrain(x, min, max);

Limits x to a minimum and maximum value

Arguments

xThe input value
minThe minimum value
maxThe maximum value

Returns

numberThe constrained value

See constrain in lu5_math.h
sin(x);

Sine function (Trigonometry)

Arguments

xThe input value

Returns

numberThe output value

See sin in lu5_math.h
cos(x);

Cosine function (Trigonometry)

Arguments

xThe input value

Returns

numberThe output value

See cos in lu5_math.h
tan(x);

Tangent function (Trigonometry)

Arguments

xThe input value

Returns

numberThe output value

See tan in lu5_math.h
PIConstant

No description

See PI in lu5_math.h
TWO_PIConstant

No description

See TWO_PI in lu5_math.h
HALF_PIConstant

No description

See HALF_PI in lu5_math.h
QUARTER_PIConstant

No description

See QUARTER_PI in lu5_math.h
\ No newline at end of file diff --git a/docs/v0.1.7/math/methods.json b/docs/v0.1.7/math/methods.json new file mode 100644 index 00000000..5073c9f0 --- /dev/null +++ b/docs/v0.1.7/math/methods.json @@ -0,0 +1 @@ +{"name":"math","methods":[{"doc":{"name":"randomSeed","_type":"method","_return":{"description":"The random value","var":"number"},"examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The seed value","name":"seed"}]}],"description":"Set a random seed"},"source":{"start_line":7,"end_line":16,"header":"lu5_math.h"}},{"doc":{"name":"random","_type":"method","_return":{"description":"The random value","var":"number"},"examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The maximum of the range","name":"max"}],"example":"random() -- random number between 0 and 1\nrandom(3) -- random number between 0 and 3"},{"arguments":[{"description":"The minimum of the range","name":"min"},{"description":"The maximum of the range","name":"max"}],"example":"random(3, 12) -- random number between 3 and 12"},{"arguments":[{"description":"The array to randomly select an item from","name":"arr"}],"example":"random({ 'A', 'B', 'C' }) -- random element in table"}],"description":"Get a random number"},"source":{"start_line":18,"end_line":45,"header":"lu5_math.h"}},{"doc":{"name":"round","_type":"method","_return":{"description":"The rounded value","var":"int"},"examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The value to round","name":"x"}]}],"description":"Round a number to the nearest integer"},"source":{"start_line":47,"end_line":55,"header":"lu5_math.h"}},{"doc":{"name":"floor","_type":"method","_return":{"description":"greatest integer less than or equals to x","var":"int"},"examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The value to floor","name":"x"}]}],"description":"floor is a function that takes in a number, and returns the greatest integer less or equal to x
see here "},"source":{"start_line":57,"end_line":65,"header":"lu5_math.h"}},{"doc":{"name":"ceil","_type":"method","_return":{"description":"The floored value","var":"int"},"examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The value to floor","name":"x"}]}],"description":"ceil is a function that takes in a number, and returns the smallest integer greater or equal to x
see here "},"source":{"start_line":67,"end_line":75,"header":"lu5_math.h"}},{"doc":{"name":"min","_type":"method","_return":{"description":"The smallest value","var":"number"},"examples":["min(6, 7); -- returns 6\n\nmin(6, 7, 4); -- returns 4\n\nmin({ 6, 7, 4 }); -- returns 4"],"bottom_description":"","calls":[{"arguments":[{"description":"The first value","name":"a"},{"description":"The second value","name":"b"}]}],"description":"Return the smallest value.
Can also take any number of arguments, or a table."},"source":{"start_line":77,"end_line":94,"header":"lu5_math.h"}},{"doc":{"name":"max","_type":"method","_return":{"description":"The largest value","var":"number"},"examples":["max(2, 5); -- returns 5\n\nmax(2, 5, 7); -- returns 7\n\nmax({ 2, 5, 7 }); -- returns 7"],"bottom_description":"","calls":[{"arguments":[{"description":"The first value","name":"a"},{"description":"The second value","name":"b"}]}],"description":"Return the largest value.
Can also take any number of arguments, or a table."},"source":{"start_line":96,"end_line":113,"header":"lu5_math.h"}},{"doc":{"name":"abs","_type":"method","_return":{"description":"The absolote value of the input","var":"number"},"examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The input value","name":"x"}]}],"description":"Returns the absolute value of x
see here "},"source":{"start_line":115,"end_line":123,"header":"lu5_math.h"}},{"doc":{"name":"map","_type":"method","_return":{"description":"The mapped value","var":"number"},"examples":["local mouseX_mapped = map(mouseX, 0, width, 0, 100);\n-- mapped mouseX between 0 and 100"],"bottom_description":"","calls":[{"arguments":[{"description":"The value to map","name":"value"},{"description":"The start of the initial range","name":"start"},{"description":"The end of the initial range","name":"end"},{"description":"The start of the target range","name":"target_start"},{"description":"The end of the target range","name":"target_end"}]}],"description":"Maps x from an original range to a target range"},"source":{"start_line":125,"end_line":141,"header":"lu5_math.h"}},{"doc":{"name":"dist","_type":"method","_return":{"description":"The distance between the points","var":"number"},"examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The x coordinate of the first point","name":"x1"},{"description":"The y coordinate of the first point","name":"y1"},{"description":"The x coordinate of the second point","name":"x2"},{"description":"The y coordinate of the second point","name":"y2"}],"example":"local d = dist(0, 0, 3, 4);\nprint(d) -- 5"},{"arguments":[{"description":"The x coordinate of the first point","name":"x1"},{"description":"The y coordinate of the first point","name":"y1"},{"description":"The z coordinate of the first point","name":"z1"},{"description":"The x coordinate of the second point","name":"x2"},{"description":"The y coordinate of the second point","name":"y2"},{"description":"The z coordinate of the second point","name":"z2"}],"example":"local d = dist(0, 0, 0, 2, 3, 6);\nprint(d) -- 7"},{"arguments":[{"description":"The first vector","name":"v1"},{"description":"The second vector","name":"v2"}],"example":"local a = createVector(-1, -1);\nlocal b = createVector( 2, 3);\n\nlocal d = dist(a, b);\nprint(d) -- 5"}],"description":"Calculates the distance between 2 points in 2D or 3D space"},"source":{"start_line":144,"end_line":184,"header":"lu5_math.h"}},{"doc":{"name":"constrain","_type":"method","_return":{"description":"The constrained value","var":"number"},"examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The input value","name":"x"},{"description":"The minimum value","name":"min"},{"description":"The maximum value","name":"max"}]}],"description":"Limits x to a minimum and maximum value"},"source":{"start_line":186,"end_line":195,"header":"lu5_math.h"}},{"doc":{"name":"sin","_type":"method","_return":{"description":"The output value","var":"number"},"examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The input value","name":"x"}]}],"description":"Sine function (Trigonometry) "},"source":{"start_line":197,"end_line":204,"header":"lu5_math.h"}},{"doc":{"name":"cos","_type":"method","_return":{"description":"The output value","var":"number"},"examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The input value","name":"x"}]}],"description":"Cosine function (Trigonometry) "},"source":{"start_line":206,"end_line":213,"header":"lu5_math.h"}},{"doc":{"name":"tan","_type":"method","_return":{"description":"The output value","var":"number"},"examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The input value","name":"x"}]}],"description":"Tangent function (Trigonometry) "},"source":{"start_line":215,"end_line":222,"header":"lu5_math.h"}},{"doc":{"name":"PI","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":224,"end_line":227,"header":"lu5_math.h"}},{"doc":{"name":"TWO_PI","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":230,"end_line":233,"header":"lu5_math.h"}},{"doc":{"name":"HALF_PI","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":236,"end_line":239,"header":"lu5_math.h"}},{"doc":{"name":"QUARTER_PI","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":242,"end_line":246,"header":"lu5_math.h"}}],"source":"math"} \ No newline at end of file diff --git a/docs/v0.1.7/models/index.html b/docs/v0.1.7/models/index.html index 1b380359..d86c7f9c 100644 --- a/docs/v0.1.7/models/index.html +++ b/docs/v0.1.7/models/index.html @@ -1,4 +1,4 @@ -lu5 | models

models

v0.1.7
loadModel(model);

Load a 3D model

Arguments

modelThe 3D model


+lu5 | models

models

v0.1.7
loadModel(model);

Load a 3D model

Arguments

modelThe 3D model


 function setup()
   createWindow(600, 600, GL3D);
   
@@ -9,4 +9,4 @@
   background(51);
 
   model(ship);
-end
See loadModel in models.h
model(model);

Render a 3D model

Arguments

modelThe 3D model

See model in models.h
This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +end
See loadModel in models.h
model(model);

Render a 3D model

Arguments

modelThe 3D model

See model in models.h
\ No newline at end of file diff --git a/docs/v0.1.7/models/methods.json b/docs/v0.1.7/models/methods.json new file mode 100644 index 00000000..764277b3 --- /dev/null +++ b/docs/v0.1.7/models/methods.json @@ -0,0 +1 @@ +{"name":"models","methods":[{"doc":{"name":"loadModel","_type":"method","examples":["\nfunction setup()\n createWindow(600, 600, GL3D);\n \n ship = loadModel('path/to/your/ship.obj');\nend\n\nfunction draw()\n background(51);\n\n model(ship);\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The 3D model","name":"model"}]}],"description":"Load a 3D model"},"source":{"start_line":6,"end_line":26,"header":"models.h"}},{"doc":{"name":"model","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The 3D model","name":"model"}]}],"description":"Render a 3D model"},"source":{"start_line":28,"end_line":34,"header":"models.h"}}],"source":"models"} \ No newline at end of file diff --git a/docs/v0.1.7/modules.json b/docs/v0.1.7/modules.json new file mode 100644 index 00000000..65f66b29 --- /dev/null +++ b/docs/v0.1.7/modules.json @@ -0,0 +1 @@ +{"symbols":[{"module":"window","name":"createWindow"},{"module":"window","name":"frameRate"},{"module":"window","name":"noLoop"},{"module":"window","name":"loop"},{"module":"window","name":"deltaTime"},{"module":"window","name":"width"},{"module":"window","name":"height"},{"module":"window","name":"windowResized"},{"module":"typography","name":"loadFont"},{"module":"typography","name":"textSize"},{"module":"typography","name":"textAlign"},{"module":"typography","name":"textFont"},{"module":"typography","name":"text"},{"module":"typography","name":"CENTER"},{"module":"typography","name":"RIGHT"},{"module":"typography","name":"LEFT"},{"module":"transform","name":"rotateX"},{"module":"transform","name":"rotateY"},{"module":"transform","name":"rotateZ"},{"module":"transform","name":"rotate"},{"module":"transform","name":"scale"},{"module":"transform","name":"translate"},{"module":"shapes3D","name":"plane"},{"module":"shapes3D","name":"box"},{"module":"shapes3D","name":"sphere"},{"module":"shapes","name":"ellipse"},{"module":"shapes","name":"circle"},{"module":"shapes","name":"rect"},{"module":"shapes","name":"square"},{"module":"shapes","name":"line"},{"module":"shapes","name":"arc"},{"module":"shapes","name":"point"},{"module":"shapes","name":"quad"},{"module":"shapes","name":"triangle"},{"module":"shapes","name":"beginShape"},{"module":"shapes","name":"vertex"},{"module":"shapes","name":"endShape"},{"module":"setting","name":"background"},{"module":"setting","name":"fill"},{"module":"setting","name":"strokeWeight"},{"module":"setting","name":"noFill"},{"module":"setting","name":"stroke"},{"module":"setting","name":"noStroke"},{"module":"setting","name":"push"},{"module":"setting","name":"pop"},{"module":"setting","name":"rectMode"},{"module":"setting","name":"debugMode"},{"module":"setting","name":"CENTER"},{"module":"setting","name":"CORNER"},{"module":"setting","name":"RADIUS"},{"module":"mouse","name":"mouseY"},{"module":"mouse","name":"mouseX"},{"module":"mouse","name":"pmouseY"},{"module":"mouse","name":"pmouseX"},{"module":"mouse","name":"mouseIsPressed"},{"module":"mouse","name":"mousePressed"},{"module":"mouse","name":"mouseReleased"},{"module":"mouse","name":"mouseWheel"},{"module":"models","name":"loadModel"},{"module":"models","name":"model"},{"module":"vector","name":"createVector"},{"module":"vector","name":"Vector.print"},{"module":"vector","name":"Vector.dist"},{"module":"vector","name":"Vector.dot"},{"module":"vector","name":"Vector.add"},{"module":"vector","name":"Vector.sub"},{"module":"vector","name":"Vector.mult"},{"module":"vector","name":"Vector.div"},{"module":"vector","name":"Vector.idiv"},{"module":"vector","name":"Vector.copy"},{"module":"vector","name":"Vector"},{"module":"math","name":"randomSeed"},{"module":"math","name":"random"},{"module":"math","name":"round"},{"module":"math","name":"floor"},{"module":"math","name":"ceil"},{"module":"math","name":"min"},{"module":"math","name":"max"},{"module":"math","name":"abs"},{"module":"math","name":"map"},{"module":"math","name":"dist"},{"module":"math","name":"constrain"},{"module":"math","name":"sin"},{"module":"math","name":"cos"},{"module":"math","name":"tan"},{"module":"math","name":"PI"},{"module":"math","name":"TWO_PI"},{"module":"math","name":"HALF_PI"},{"module":"math","name":"QUARTER_PI"},{"module":"keyboard","name":"keyIsDown"},{"module":"keyboard","name":"keyPressed"},{"module":"keyboard","name":"keyReleased"},{"module":"keyboard","name":"keyHeld"},{"module":"keyboard","name":"UP_ARROW"},{"module":"keyboard","name":"DOWN_ARROW"},{"module":"keyboard","name":"LEFT_ARROW"},{"module":"keyboard","name":"RIGHT_ARROW"},{"module":"keyboard","name":"KEY_ENTER"},{"module":"keyboard","name":"KEY_BACKSPACE"},{"module":"keyboard","name":"KEY_A"},{"module":"keyboard","name":"KEY_B"},{"module":"keyboard","name":"KEY_C"},{"module":"keyboard","name":"KEY_D"},{"module":"keyboard","name":"KEY_E"},{"module":"keyboard","name":"KEY_F"},{"module":"keyboard","name":"KEY_G"},{"module":"keyboard","name":"KEY_H"},{"module":"keyboard","name":"KEY_I"},{"module":"keyboard","name":"KEY_J"},{"module":"keyboard","name":"KEY_K"},{"module":"keyboard","name":"KEY_L"},{"module":"keyboard","name":"KEY_M"},{"module":"keyboard","name":"KEY_N"},{"module":"keyboard","name":"KEY_O"},{"module":"keyboard","name":"KEY_P"},{"module":"keyboard","name":"KEY_Q"},{"module":"keyboard","name":"KEY_R"},{"module":"keyboard","name":"KEY_S"},{"module":"keyboard","name":"KEY_T"},{"module":"keyboard","name":"KEY_U"},{"module":"keyboard","name":"KEY_V"},{"module":"keyboard","name":"KEY_W"},{"module":"keyboard","name":"KEY_X"},{"module":"keyboard","name":"KEY_Y"},{"module":"keyboard","name":"KEY_Z"},{"module":"io","name":"print"},{"module":"io","name":"loadText"},{"module":"io","name":"loadStrings"},{"module":"image","name":"loadImage"},{"module":"image","name":"image"},{"module":"image","name":"Image.crop"},{"module":"classes","name":"class"},{"module":"camera","name":"orbitControl"}]} \ No newline at end of file diff --git a/docs/v0.1.7/mouse/index.html b/docs/v0.1.7/mouse/index.html index 0eaee027..662e8266 100644 --- a/docs/v0.1.7/mouse/index.html +++ b/docs/v0.1.7/mouse/index.html @@ -1,16 +1,16 @@ -lu5 | mouse

mouse

v0.1.7
mouseYGlobal

The y mouse coordinate

createWindow(400, 400);
+lu5 | mouse

mouse

v0.1.7
mouseYGlobal

The y mouse coordinate

createWindow(400, 400);
 
 function draw()
   background(51);
   
   line(0, mouseY, width, mouseY);
-end
See mouseY in mouse.h
mouseXGlobal

The x mouse coordinate

createWindow(400, 400);
+end
See mouseY in mouse.h
mouseXGlobal

The x mouse coordinate

createWindow(400, 400);
 
 function draw()
   background(51);
   
   line(mouseX, 0, mouseX, height);
-end
See mouseX in mouse.h
pmouseYGlobal

The y mouse coordinate from the previous draw call

See pmouseY in mouse.h
pmouseXGlobal

The x mouse coordinate from the previous draw call

See pmouseX in mouse.h
mouseIsPressedGlobal

Is true when the mouse is pressed, is false when it's not

See mouseIsPressed in mouse.h
mousePressed(button);Event

Called when a mouse button is pressed.

Arguments

buttonThe pressed mouse button


+end

See mouseX in mouse.h
pmouseYGlobal

The y mouse coordinate from the previous draw call

See pmouseY in mouse.h
pmouseXGlobal

The x mouse coordinate from the previous draw call

See pmouseX in mouse.h
mouseIsPressedGlobal

Is true when the mouse is pressed, is false when it's not

See mouseIsPressed in mouse.h
mousePressed(button);Event

Called when a mouse button is pressed.

Arguments

buttonThe pressed mouse button


In the following example, the circle's size increases when the user clicks the mouse.

size = 0;
 
 function setup()
@@ -26,7 +26,7 @@
 -- Increase circle size when mouse pressed
 function mousePressed()
   size = size + 1;
-end
See mousePressed in mouse.h
mouseReleased(button);Event

Called when a mouse button is released.

Arguments

buttonThe released mouse button


+endSee mousePressed in mouse.h

mouseReleased(button);Event

Called when a mouse button is released.

Arguments

buttonThe released mouse button


In the following example, the circle's size increases when the user clicks the mouse.

size = 32;
 
 function setup()
@@ -47,7 +47,7 @@
 -- Reset size
 function mouseReleased()
   size = 64;
-end
See mouseReleased in mouse.h
mouseWheel(button);Event

Called when a mouse wheel is used

Arguments

buttonThe pressed mouse button


+endSee mouseReleased in mouse.h

mouseWheel(button);Event

Called when a mouse wheel is used

Arguments

buttonThe pressed mouse button


In the following example, the circle's size changes when the user scrolls

size = 0;
 
 function setup()
@@ -63,4 +63,4 @@
 -- Change circle size when mouse is scrolled
 function mouseWheel(delta)
   size = size + delta;
-end
See mouseWheel in mouse.h
\ No newline at end of file +endSee mouseWheel in mouse.h \ No newline at end of file diff --git a/docs/v0.1.7/mouse/methods.json b/docs/v0.1.7/mouse/methods.json new file mode 100644 index 00000000..7ebb40e5 --- /dev/null +++ b/docs/v0.1.7/mouse/methods.json @@ -0,0 +1 @@ +{"name":"mouse","methods":[{"doc":{"name":"mouseY","_type":"global","examples":["createWindow(400, 400);\n\nfunction draw()\n background(51);\n \n line(0, mouseY, width, mouseY);\nend"],"bottom_description":"","calls":[{"arguments":{}}],"description":"The y mouse coordinate"},"source":{"start_line":4,"end_line":19,"header":"mouse.h"}},{"doc":{"name":"mouseX","_type":"global","examples":["createWindow(400, 400);\n\nfunction draw()\n background(51);\n \n line(mouseX, 0, mouseX, height);\nend"],"bottom_description":"","calls":[{"arguments":{}}],"description":"The x mouse coordinate"},"source":{"start_line":22,"end_line":37,"header":"mouse.h"}},{"doc":{"name":"pmouseY","_type":"global","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"The y mouse coordinate from the previous draw call"},"source":{"start_line":40,"end_line":45,"header":"mouse.h"}},{"doc":{"name":"pmouseX","_type":"global","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"The x mouse coordinate from the previous draw call"},"source":{"start_line":48,"end_line":53,"header":"mouse.h"}},{"doc":{"name":"mouseIsPressed","_type":"global","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"Is true when the mouse is pressed, is false when it's not"},"source":{"start_line":57,"end_line":62,"header":"mouse.h"}},{"doc":{"name":"mousePressed","_type":"event","examples":["size = 0;\n\nfunction setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n circle(mouseX, mouseY, size);\nend\n\n-- Increase circle size when mouse pressed\nfunction mousePressed()\n size = size + 1;\nend"],"bottom_description":"
\nIn the following example, the circle's size increases when the user clicks the mouse.","calls":[{"arguments":[{"description":"The pressed mouse button","name":"button"}]}],"description":"Called when a mouse button is pressed."},"source":{"start_line":65,"end_line":93,"header":"mouse.h"}},{"doc":{"name":"mouseReleased","_type":"event","examples":["size = 32;\n\nfunction setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n circle(mouseX, mouseY, size);\nend\n\n-- Increment circle size\nfunction mousePressed()\n size = size + 6;\nend\n\n-- Reset size\nfunction mouseReleased()\n size = 64;\nend"],"bottom_description":"
\nIn the following example, the circle's size increases when the user clicks the mouse.","calls":[{"arguments":[{"description":"The released mouse button","name":"button"}]}],"description":"Called when a mouse button is released."},"source":{"start_line":96,"end_line":129,"header":"mouse.h"}},{"doc":{"name":"mouseWheel","_type":"event","examples":["size = 0;\n\nfunction setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n circle(mouseX, mouseY, size);\nend\n\n-- Change circle size when mouse is scrolled\nfunction mouseWheel(delta)\n size = size + delta;\nend"],"bottom_description":"
\nIn the following example, the circle's size changes when the user scrolls","calls":[{"arguments":[{"description":"The pressed mouse button","name":"button"}]}],"description":"Called when a mouse wheel is used"},"source":{"start_line":132,"end_line":160,"header":"mouse.h"}}],"source":"mouse"} \ No newline at end of file diff --git a/docs/v0.1.7/setting/index.html b/docs/v0.1.7/setting/index.html index 4638df32..a37aca2a 100644 --- a/docs/v0.1.7/setting/index.html +++ b/docs/v0.1.7/setting/index.html @@ -1,6 +1,6 @@ -lu5 | setting

setting

v0.1.7
background

Clear a background with a color

background(r, g, b);

Arguments

rThe red byte
gThe green byte
bThe blue byte
 background(100, 255, 100);
background(r, g, b, a);

Arguments

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte
 background(100, 255, 100, 150);
background(v);

Arguments

vThe grayscale value
 background(100);
background(color_name);

Arguments

color_nameThe color name
 background('yellow');
background(hex);

Arguments

hexThe hex color string
 background('#88EE66');

See background in setting.h
fill

Set the fill color for shapes

fill(r, g, b);

Arguments

rThe red byte
gThe green byte
bThe blue byte
 fill(100, 255, 100);
fill(r, g, b, a);

Arguments

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte
 fill(100, 255, 100, 150);
fill(v);

Arguments

vThe grayscale value
 fill(100);
fill(color_name);

Arguments

color_nameThe color name
 fill('yellow');
fill(hex);

Arguments

hexThe hex color string
 fill('#88EE66');

See fill in setting.h
strokeWeight(weight);

Set the line width

Arguments

weightThe line width in pixels

strokeWeight(8);
-line(200, 200, mouseX, mouseY);
See strokeWeight in setting.h
noFill();

Disable fill

noFill();
-circle(200, 200, 32);
See noFill in setting.h
stroke

Set the stroke color for shapes

stroke(r, g, b);

Arguments

rThe red byte
gThe green byte
bThe blue byte
 stroke(255, 255, 100);
stroke(r, g, b, a);

Arguments

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte
 stroke(255, 255, 100, 150);
stroke(v);

Arguments

vThe grayscale value
 stroke(255);
stroke(color_name);

Arguments

color_nameThe color name
 stroke('red');

See stroke in setting.h
noStroke();

Disable stroke

See noStroke in setting.h
push();

Save the style and transformation settings.

Pushes the lu5 style settings off the stack
Pushes the OpenGL transformation matrix off the stack

function setup()
+lu5 | setting

setting

v0.1.7
background

Clear a background with a color

Arguments

rThe red byte
gThe green byte
bThe blue byte
 background(100, 255, 100);

Arguments

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte
 background(100, 255, 100, 150);

Arguments

vThe grayscale value
 background(100);

Arguments

color_nameThe color name
 background('yellow');

Arguments

hexThe hex color string
 background('#88EE66');

See background in setting.h
fill

Set the fill color for shapes

Arguments

rThe red byte
gThe green byte
bThe blue byte
 fill(100, 255, 100);

Arguments

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte
 fill(100, 255, 100, 150);

Arguments

vThe grayscale value
 fill(100);

Arguments

color_nameThe color name
 fill('yellow');

Arguments

hexThe hex color string
 fill('#88EE66');

See fill in setting.h
strokeWeight(weight);

Set the line width

Arguments

weightThe line width in pixels

strokeWeight(8);
+line(200, 200, mouseX, mouseY);
See strokeWeight in setting.h
noFill();

Disable fill

noFill();
+circle(200, 200, 32);
See noFill in setting.h
stroke

Set the stroke color for shapes

Arguments

rThe red byte
gThe green byte
bThe blue byte
 stroke(255, 255, 100);

Arguments

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte
 stroke(255, 255, 100, 150);

Arguments

vThe grayscale value
 stroke(255);

Arguments

color_nameThe color name
 stroke('red');

See stroke in setting.h
noStroke();

Disable stroke

See noStroke in setting.h
push();

Save the style and transformation settings.

Pushes the lu5 style settings off the stack
Pushes the OpenGL transformation matrix off the stack

function setup()
     createWindow(400, 400);
 end
 
@@ -34,7 +34,7 @@
 
     -- Not Affected by transformation
     circle(0, 0, 32);
-end
See push in setting.h
pop();

Restore the style and transformation settings.

Pops the lu5 style settings off the stack
Pops the OpenGL transformation matrix off the stack

See pop in setting.h
rectMode(mode);

Set rectangle alignment mode

Arguments

modeeither CENTER, CORNER, RADIUS

function setup()
+end
See push in setting.h
pop();

Restore the style and transformation settings.

Pops the lu5 style settings off the stack
Pops the OpenGL transformation matrix off the stack

See pop in setting.h
rectMode(mode);

Set rectangle alignment mode

Arguments

modeeither CENTER, CORNER, RADIUS

function setup()
   createWindow(800, 800, GL3D);
 
   rectMode(CENTER);
@@ -44,7 +44,7 @@
   background(51);
   
   rect(width/2, height/2, 100, 50);
-end
See rectMode in setting.h
debugMode([enable]);

Toggle a helpful mode with 3D Graphics

Arguments

[enable]Whether or not to enable the debug mode, if not provided, it defaults to true

function setup()
+end
See rectMode in setting.h
debugMode([enable]);

Toggle a helpful mode with 3D Graphics

Arguments

[enable]Whether or not to enable the debug mode, if not provided, it defaults to true

function setup()
   createWindow(800, 800, GL3D);
 
   debugMode();
@@ -69,4 +69,4 @@
   end
 
   box(100);
-end
See debugMode in setting.h
CENTERConstant

Alignment mode for rectMode

See CENTER in setting.h
CORNERConstant

Alignment mode for rectMode

See CORNER in setting.h
RADIUSConstant

Alignment mode for rectMode

See RADIUS in setting.h
This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +end
See debugMode in setting.h
CENTERConstant

Alignment mode for rectMode

See CENTER in setting.h
CORNERConstant

Alignment mode for rectMode

See CORNER in setting.h
RADIUSConstant

Alignment mode for rectMode

See RADIUS in setting.h
\ No newline at end of file diff --git a/docs/v0.1.7/setting/methods.json b/docs/v0.1.7/setting/methods.json new file mode 100644 index 00000000..4be7d093 --- /dev/null +++ b/docs/v0.1.7/setting/methods.json @@ -0,0 +1 @@ +{"name":"setting","methods":[{"doc":{"name":"background","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The red byte","name":"r"},{"description":"The green byte","name":"g"},{"description":"The blue byte","name":"b"}],"example":" background(100, 255, 100);"},{"arguments":[{"description":"The red byte","name":"r"},{"description":"The green byte","name":"g"},{"description":"The blue byte","name":"b"},{"description":"The alpha byte","name":"a"}],"example":" background(100, 255, 100, 150);"},{"arguments":[{"description":"The grayscale value","name":"v"}],"example":" background(100);"},{"arguments":[{"description":"The color name","name":"color_name"}],"example":" background('yellow');"},{"arguments":[{"description":"The hex color string","name":"hex"}],"example":" background('#88EE66');"}],"description":"Clear a background with a color"},"source":{"start_line":6,"end_line":48,"header":"setting.h"}},{"doc":{"name":"fill","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The red byte","name":"r"},{"description":"The green byte","name":"g"},{"description":"The blue byte","name":"b"}],"example":" fill(100, 255, 100);"},{"arguments":[{"description":"The red byte","name":"r"},{"description":"The green byte","name":"g"},{"description":"The blue byte","name":"b"},{"description":"The alpha byte","name":"a"}],"example":" fill(100, 255, 100, 150);"},{"arguments":[{"description":"The grayscale value","name":"v"}],"example":" fill(100);"},{"arguments":[{"description":"The color name","name":"color_name"}],"example":" fill('yellow');"},{"arguments":[{"description":"The hex color string","name":"hex"}],"example":" fill('#88EE66');"}],"description":"Set the fill color for shapes"},"source":{"start_line":50,"end_line":92,"header":"setting.h"}},{"doc":{"name":"strokeWeight","_type":"method","examples":["strokeWeight(8);\nline(200, 200, mouseX, mouseY);"],"bottom_description":"","calls":[{"arguments":[{"description":"The line width in pixels","name":"weight"}]}],"description":"Set the line width"},"source":{"start_line":94,"end_line":104,"header":"setting.h"}},{"doc":{"name":"noFill","_type":"method","examples":["noFill();\ncircle(200, 200, 32);"],"bottom_description":"","calls":[{"arguments":{}}],"description":"Disable fill"},"source":{"start_line":106,"end_line":114,"header":"setting.h"}},{"doc":{"name":"stroke","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The red byte","name":"r"},{"description":"The green byte","name":"g"},{"description":"The blue byte","name":"b"}],"example":" stroke(255, 255, 100);"},{"arguments":[{"description":"The red byte","name":"r"},{"description":"The green byte","name":"g"},{"description":"The blue byte","name":"b"},{"description":"The alpha byte","name":"a"}],"example":" stroke(255, 255, 100, 150);"},{"arguments":[{"description":"The grayscale value","name":"v"}],"example":" stroke(255);"},{"arguments":[{"description":"The color name","name":"color_name"}],"example":" stroke('red');"}],"description":"Set the stroke color for shapes"},"source":{"start_line":116,"end_line":151,"header":"setting.h"}},{"doc":{"name":"noStroke","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"Disable stroke"},"source":{"start_line":153,"end_line":156,"header":"setting.h"}},{"doc":{"name":"push","_type":"method","examples":["function setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n push();\n fill(155, 255, 0);\n strokeWeight(12);\n\n -- Affected by style\n circle(300, 200, 32);\n pop();\n\n -- Not Affected by style\n circle(100, 200, 32);\nend","function setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n push();\n fill('red');\n translate(200, 200);\n\n -- Affected by transformation\n circle(0, 0, 32);\n pop();\n\n -- Not Affected by transformation\n circle(0, 0, 32);\nend"],"bottom_description":"","calls":[{"arguments":{}}],"description":"Save the style and transformation settings.

Pushes the lu5 style settings off the stack
Pushes the OpenGL transformation matrix off the stack"},"source":{"start_line":158,"end_line":206,"header":"setting.h"}},{"doc":{"name":"pop","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"Restore the style and transformation settings.

Pops the lu5 style settings off the stack
Pops the OpenGL transformation matrix off the stack"},"source":{"start_line":208,"end_line":214,"header":"setting.h"}},{"doc":{"name":"rectMode","_type":"method","examples":["function setup()\n createWindow(800, 800, GL3D);\n\n rectMode(CENTER);\nend\n\nfunction draw()\n background(51);\n \n rect(width/2, height/2, 100, 50);\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"either `CENTER`, `CORNER`, `RADIUS`","name":"mode"}]}],"description":"Set rectangle alignment mode"},"source":{"start_line":216,"end_line":235,"header":"setting.h"}},{"doc":{"name":"debugMode","_type":"method","examples":["function setup()\n createWindow(800, 800, GL3D);\n\n debugMode();\nend\n\nfunction draw()\n background(51);\n \n box(100);\nend","function setup()\n createWindow(800, 800, GL3D);\nend\n\nfunction draw()\n background(51);\n \n -- When the d key is down, show debug graphics\n if (keyIsDown('d')) then\n debugMode(true);\n else\n debugMode(false);\n end\n\n box(100);\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"Whether or not to enable the debug mode, if not provided, it defaults to `true`","name":"[enable]"}]}],"description":"Toggle a helpful mode with 3D Graphics "},"source":{"start_line":237,"end_line":275,"header":"setting.h"}},{"doc":{"name":"CENTER","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"Alignment mode for rectMode"},"source":{"start_line":279,"end_line":284,"header":"setting.h"}},{"doc":{"name":"CORNER","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"Alignment mode for rectMode"},"source":{"start_line":287,"end_line":292,"header":"setting.h"}},{"doc":{"name":"RADIUS","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"Alignment mode for rectMode"},"source":{"start_line":295,"end_line":300,"header":"setting.h"}}],"source":"setting"} \ No newline at end of file diff --git a/docs/v0.1.7/shapes/index.html b/docs/v0.1.7/shapes/index.html index 5d8f6248..f38ff4ae 100644 --- a/docs/v0.1.7/shapes/index.html +++ b/docs/v0.1.7/shapes/index.html @@ -1,4 +1,4 @@ -lu5 | 2D Shapes

2D Shapes

v0.1.7
ellipse(x, y, w, h);

Draw an ellipse to the opengl context

Arguments

xThe x position of the ellipse
yThe y position of the ellipse
wThe width diameter of the ellipse
hThe height diameter of the ellipse

function setup()
+lu5 | 2D Shapes

2D Shapes

v0.1.7
ellipse(x, y, w, h);

Draw an ellipse to the opengl context

Arguments

xThe x position of the ellipse
yThe y position of the ellipse
wThe width diameter of the ellipse
hThe height diameter of the ellipse

function setup()
   createWindow(400, 400);
 end
 
@@ -6,7 +6,7 @@
   background(51);
  
   ellipse(200, 200, 64, 72);
-end
See ellipse in shapes.h
circle(x, y, d);

Draw a circle to the opengl context

Arguments

xThe x position of the circle
yThe y position of the circle
dThe diameter of the circle

function setup()
+end
See ellipse in shapes.h
circle(x, y, d);

Draw a circle to the opengl context

Arguments

xThe x position of the circle
yThe y position of the circle
dThe diameter of the circle

function setup()
   createWindow(400, 400);
 end
 
@@ -14,7 +14,7 @@
   background(51);
  
   circle(200, 200, 32);
-end
See circle in shapes.h
rect(x, y, w, h);

Draw a rectangle to the opengl context

Arguments

xThe x position of the reactangle
yThe y position of the reactangle
wThe width
hThe height

function setup()
+end
See circle in shapes.h
rect(x, y, w, h);

Draw a rectangle to the opengl context

Arguments

xThe x position of the reactangle
yThe y position of the reactangle
wThe width
hThe height

function setup()
   createWindow(400, 400);
 end
 
@@ -23,7 +23,7 @@
 
  -- rectangle near the top-left corner
   rect(10, 10, 80, 60); 
-end
See rect in shapes.h
square(x, y, s);

Draw a square to the opengl context

Arguments

xThe x position of the square
yThe y position of the square
sThe size of the square

function setup()
+end
See rect in shapes.h
square(x, y, s);

Draw a square to the opengl context

Arguments

xThe x position of the square
yThe y position of the square
sThe size of the square

function setup()
   createWindow(400, 400);
 end
 
@@ -32,7 +32,7 @@
 
   -- square near the top-left corner
   rect(10, 10, 80);
-end
See square in shapes.h
line(x1, y1, x2, y2);

Draw a line to the opengl context

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point

function setup()
+end
See square in shapes.h
line(x1, y1, x2, y2);

Draw a line to the opengl context

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point

function setup()
   createWindow(400, 400);
 end
 
@@ -41,7 +41,7 @@
 
   -- diagonal line from top-left to bottom-right
   line(0, 0, width, height);
-end
See line in shapes.h
arc(x, y, w, h, start, stop);

Draw an arc on the screen

Arguments

xThe x position of the arc
yThe y position of the arc
wThe width of the arc
hThe height of the arc
startThe angle to start the arc
stopThe angle to stop the arc

function setup()
+end
See line in shapes.h
arc(x, y, w, h, start, stop);

Draw an arc on the screen

Arguments

xThe x position of the arc
yThe y position of the arc
wThe width of the arc
hThe height of the arc
startThe angle to start the arc
stopThe angle to stop the arc

function setup()
     createWindow(400, 400);
 end
 
@@ -53,7 +53,7 @@
 
     -- 3/4 of a pizza
     arc(200, 200, 120, 120, 0, HALF_PI * 3);
-end
See arc in shapes.h
point(x, y);

Draw a point on the screen

Arguments

xThe point
yThe point

Use stroke to set the point's color, and use strokeWeight to set the point's radius. +end

See arc in shapes.h
point(x, y);

Draw a point on the screen

Arguments

xThe point
yThe point

Use stroke to set the point's color, and use strokeWeight to set the point's radius.

Setting the color with fill will not affect point

function setup()
     createWindow(400, 400);
@@ -66,7 +66,7 @@
     stroke('yellow');
 
     point(mouseX, mouseY);
-end
See point in shapes.h
quad(x1, y1, x2, y2, x3, y3, x4, y4);

Draw a quad on the screen

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point
x3The x position of the third point
y3The y position of the third point
x4The x position of the fourth point
y4The y position of the fourth point

function setup()
+end
See point in shapes.h
quad(x1, y1, x2, y2, x3, y3, x4, y4);

Draw a quad on the screen

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point
x3The x position of the third point
y3The y position of the third point
x4The x position of the fourth point
y4The y position of the fourth point

function setup()
     createWindow(400, 400);
 end
 
@@ -82,7 +82,7 @@
       50, 10
    );
    pop();
-end
See quad in shapes.h
triangle(x1, y1, x2, y2, x3, y3);

Draw a triangle on the screen

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point
x3The x position of the third point
y3The y position of the third point

function setup()
+end
See quad in shapes.h
triangle(x1, y1, x2, y2, x3, y3);

Draw a triangle on the screen

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point
x3The x position of the third point
y3The y position of the third point

function setup()
     createWindow(400, 400);
 end
 
@@ -94,7 +94,7 @@
 
     triangle(0,0, 100, 0, 50, 50);
     pop();
-end
See triangle in shapes.h
beginShape(mode);

Begin adding vertices to a custom shape

Arguments

modeThe opengl shape mode LINES, POINTS, QUADS, TRIANGLES, TRIANGLE_FAN

The following would draw a 100 by 100 square at position 100, 100

function setup()
+end
See triangle in shapes.h
beginShape(mode);

Begin adding vertices to a custom shape

Arguments

modeThe opengl shape mode LINES, POINTS, QUADS, TRIANGLES, TRIANGLE_FAN

The following would draw a 100 by 100 square at position 100, 100

function setup()
   createWindow(400, 400);
 end
 
@@ -107,4 +107,4 @@
     vertex(200, 200);
     vertex(200, 100);
   endShape();
-end
See beginShape in shapes.h
vertex(x, y);

beginShape must be called prior
Adding a vertex to a custom shape

Arguments

xThe x position
yThe y position

See vertex in shapes.h
endShape();

beginShape must be called prior
Close the custom shape

See endShape in shapes.h
\ No newline at end of file +endSee beginShape in shapes.h
vertex(x, y);

beginShape must be called prior
Adding a vertex to a custom shape

Arguments

xThe x position
yThe y position

See vertex in shapes.h
endShape();

beginShape must be called prior
Close the custom shape

See endShape in shapes.h
\ No newline at end of file diff --git a/docs/v0.1.7/shapes/methods.json b/docs/v0.1.7/shapes/methods.json new file mode 100644 index 00000000..5f17d035 --- /dev/null +++ b/docs/v0.1.7/shapes/methods.json @@ -0,0 +1 @@ +{"name":"2D Shapes","methods":[{"doc":{"name":"ellipse","_type":"method","examples":["function setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n \n ellipse(200, 200, 64, 72);\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The x position of the ellipse","name":"x"},{"description":"The y position of the ellipse","name":"y"},{"description":"The width diameter of the ellipse","name":"w"},{"description":"The height diameter of the ellipse","name":"h"}]}],"description":"Draw an ellipse to the opengl context"},"source":{"start_line":3,"end_line":34,"header":"shapes.h"}},{"doc":{"name":"circle","_type":"method","examples":["function setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n \n circle(200, 200, 32);\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The x position of the circle","name":"x"},{"description":"The y position of the circle","name":"y"},{"description":"The diameter of the circle","name":"d"}]}],"description":"Draw a circle to the opengl context"},"source":{"start_line":36,"end_line":56,"header":"shapes.h"}},{"doc":{"name":"rect","_type":"method","examples":["function setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n -- rectangle near the top-left corner\n rect(10, 10, 80, 60); \nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The x position of the reactangle","name":"x"},{"description":"The y position of the reactangle","name":"y"},{"description":"The width","name":"w"},{"description":"The height","name":"h"}]}],"description":"Draw a rectangle to the opengl context"},"source":{"start_line":58,"end_line":80,"header":"shapes.h"}},{"doc":{"name":"square","_type":"method","examples":["function setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n -- square near the top-left corner\n rect(10, 10, 80);\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The x position of the square","name":"x"},{"description":"The y position of the square","name":"y"},{"description":"The size of the square","name":"s"}]}],"description":"Draw a square to the opengl context"},"source":{"start_line":82,"end_line":103,"header":"shapes.h"}},{"doc":{"name":"line","_type":"method","examples":["function setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n -- diagonal line from top-left to bottom-right\n line(0, 0, width, height);\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The x position of the first point","name":"x1"},{"description":"The y position of the first point","name":"y1"},{"description":"The x position of the second point","name":"x2"},{"description":"The y position of the second point","name":"y2"}]}],"description":"Draw a line to the opengl context"},"source":{"start_line":105,"end_line":127,"header":"shapes.h"}},{"doc":{"name":"arc","_type":"method","examples":["function setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n strokeWeight(12)\n stroke(0);\n\n -- 3/4 of a pizza\n arc(200, 200, 120, 120, 0, HALF_PI * 3);\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The x position of the arc","name":"x"},{"description":"The y position of the arc","name":"y"},{"description":"The width of the arc","name":"w"},{"description":"The height of the arc","name":"h"},{"description":"The angle to start the arc","name":"start"},{"description":"The angle to stop the arc","name":"stop"}]}],"description":"Draw an arc on the screen"},"source":{"start_line":130,"end_line":156,"header":"shapes.h"}},{"doc":{"name":"point","_type":"method","examples":["function setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n strokeWeight(12);\n stroke('yellow');\n\n point(mouseX, mouseY);\nend"],"bottom_description":"Use stroke to set the point's color, and use strokeWeight to set the point's radius.\n

\nSetting the color with fill will not affect point","calls":[{"arguments":[{"description":"The point","name":"x"},{"description":"The point","name":"y"}]}],"description":"Draw a point on the screen"},"source":{"start_line":159,"end_line":184,"header":"shapes.h"}},{"doc":{"name":"quad","_type":"method","examples":["function setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n push();\n translate(50, 50);\n quad(\n 0, 0,\n 0, 60,\n 60, 70,\n 50, 10\n );\n pop();\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The x position of the first point","name":"x1"},{"description":"The y position of the first point","name":"y1"},{"description":"The x position of the second point","name":"x2"},{"description":"The y position of the second point","name":"y2"},{"description":"The x position of the third point","name":"x3"},{"description":"The y position of the third point","name":"y3"},{"description":"The x position of the fourth point","name":"x4"},{"description":"The y position of the fourth point","name":"y4"}]}],"description":"Draw a quad on the screen"},"source":{"start_line":187,"end_line":219,"header":"shapes.h"}},{"doc":{"name":"triangle","_type":"method","examples":["function setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n\n push();\n translate(130, 50);\n\n triangle(0,0, 100, 0, 50, 50);\n pop();\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The x position of the first point","name":"x1"},{"description":"The y position of the first point","name":"y1"},{"description":"The x position of the second point","name":"x2"},{"description":"The y position of the second point","name":"y2"},{"description":"The x position of the third point","name":"x3"},{"description":"The y position of the third point","name":"y3"}]}],"description":"Draw a triangle on the screen"},"source":{"start_line":221,"end_line":248,"header":"shapes.h"}},{"doc":{"name":"beginShape","_type":"method","examples":["function setup()\n createWindow(400, 400);\nend\n\nfunction draw()\n background(51);\n \n beginShape(QUADS);\n vertex(100, 100);\n vertex(100, 200);\n vertex(200, 200);\n vertex(200, 100);\n endShape();\nend"],"bottom_description":"The following would draw a 100 by 100 square at position 100, 100","calls":[{"arguments":[{"description":"The opengl shape mode `LINES`, `POINTS`, `QUADS`, `TRIANGLES`, `TRIANGLE_FAN`","name":"mode"}]}],"description":"Begin adding vertices to a custom shape"},"source":{"start_line":250,"end_line":274,"header":"shapes.h"}},{"doc":{"name":"vertex","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The x position","name":"x"},{"description":"The y position","name":"y"}]}],"description":"beginShape must be called prior
Adding a vertex to a custom shape"},"source":{"start_line":276,"end_line":284,"header":"shapes.h"}},{"doc":{"name":"endShape","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"beginShape must be called prior
Close the custom shape"},"source":{"start_line":286,"end_line":291,"header":"shapes.h"}}],"source":"shapes"} \ No newline at end of file diff --git a/docs/v0.1.7/shapes3D/index.html b/docs/v0.1.7/shapes3D/index.html index 718b31ab..66ed17d0 100644 --- a/docs/v0.1.7/shapes3D/index.html +++ b/docs/v0.1.7/shapes3D/index.html @@ -1,4 +1,4 @@ -lu5 | 3D Shapes

3D Shapes

v0.1.7
plane(w, h);

Draw a plane

Arguments

wThe width dimension
hThe height dimension

function setup()
+lu5 | 3D Shapes

3D Shapes

v0.1.7
plane(w, h);

Draw a plane

Arguments

wThe width dimension
hThe height dimension

function setup()
   createWindow(800, 800, GL3D);
 end
 
@@ -8,7 +8,7 @@
   rotateX(90);
   plane(400, 400);
 end
-
See plane in shapes3D.h
box(w, [h], [d]);

Draw a 3D box

Arguments

wThe width dimension
[h]The height dimension
[d]The depth dimension

function setup()
+
See plane in shapes3D.h
box(w, [h], [d]);

Draw a 3D box

Arguments

wThe width dimension
[h]The height dimension
[d]The depth dimension

function setup()
   createWindow(800, 800, GL3D);
 end
 
@@ -17,7 +17,7 @@
  
   box(50, 25, 80);
 end
-
See box in shapes3D.h
sphere(w, [detailX], [detailY]);

Draw a 3D Sphere

Arguments

wThe width dimension
[detailX]The detail in the X axis
[detailY]the detailt in the Y axis

function setup()
+
See box in shapes3D.h
sphere(w, [detailX], [detailY]);

Draw a 3D Sphere

Arguments

wThe width dimension
[detailX]The detail in the X axis
[detailY]the detailt in the Y axis

function setup()
   createWindow(800, 800, GL3D);
 end
 
@@ -25,4 +25,4 @@
   background(51);
  
   sphere(50);
-end
See sphere in shapes3D.h
This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +end
See sphere in shapes3D.h
\ No newline at end of file diff --git a/docs/v0.1.7/shapes3D/methods.json b/docs/v0.1.7/shapes3D/methods.json new file mode 100644 index 00000000..d8230e54 --- /dev/null +++ b/docs/v0.1.7/shapes3D/methods.json @@ -0,0 +1 @@ +{"name":"3D Shapes","methods":[{"doc":{"name":"plane","_type":"method","examples":["function setup()\n createWindow(800, 800, GL3D);\nend\n\nfunction draw()\n background(51);\n \n rotateX(90);\n plane(400, 400);\nend\n"],"bottom_description":"","calls":[{"arguments":[{"description":"The width dimension","name":"w"},{"description":"The height dimension","name":"h"}]}],"description":"Draw a plane "},"source":{"start_line":3,"end_line":28,"header":"shapes3D.h"}},{"doc":{"name":"box","_type":"method","examples":["function setup()\n createWindow(800, 800, GL3D);\nend\n\nfunction draw()\n background(51);\n \n box(50, 25, 80);\nend\n"],"bottom_description":"","calls":[{"arguments":[{"description":"The width dimension","name":"w"},{"description":"The height dimension","name":"[h]"},{"description":"The depth dimension","name":"[d]"}]}],"description":"Draw a 3D box "},"source":{"start_line":30,"end_line":50,"header":"shapes3D.h"}},{"doc":{"name":"sphere","_type":"method","examples":["function setup()\n createWindow(800, 800, GL3D);\nend\n\nfunction draw()\n background(51);\n \n sphere(50);\nend"],"bottom_description":"","calls":[{"arguments":[{"description":"The width dimension","name":"w"},{"description":"The detail in the X axis","name":"[detailX]"},{"description":"the detailt in the Y axis","name":"[detailY]"}]}],"description":"Draw a 3D Sphere "},"source":{"start_line":52,"end_line":71,"header":"shapes3D.h"}}],"source":"shapes3D"} \ No newline at end of file diff --git a/docs/v0.1.7/transform/index.html b/docs/v0.1.7/transform/index.html index 69d78a3e..ac4e2f50 100644 --- a/docs/v0.1.7/transform/index.html +++ b/docs/v0.1.7/transform/index.html @@ -1 +1 @@ -lu5 | transform

transform

v0.1.7
rotateX(angle);

Rotate geometry around the X axis

Arguments

angleThe angle of rotation

See rotateX in transform.h
rotateY(angle);

Rotate geometry around the Y axis

Arguments

angleThe angle of rotation

See rotateY in transform.h
rotateZ(angle);

Rotate geometry around the Z axis

Arguments

angleThe angle of rotation

See rotateZ in transform.h
rotate(angle);

Rotate geometry in 2D

Arguments

angleThe angle of rotation

See rotate in transform.h
scale(x, y, [z]);

scale geometry
currently only used for 3D

Arguments

xThe x scaling
yThe y scaling
[z]The z scaling

See scale in transform.h
translate(x, y, [z]);

translate geometry
currently only used for 3D

Arguments

xThe x translation
yThe y translation
[z]The z translation

See translate in transform.h
\ No newline at end of file +lu5 | transform

transform

v0.1.7
rotateX(angle);

Rotate geometry around the X axis

Arguments

angleThe angle of rotation

See rotateX in transform.h
rotateY(angle);

Rotate geometry around the Y axis

Arguments

angleThe angle of rotation

See rotateY in transform.h
rotateZ(angle);

Rotate geometry around the Z axis

Arguments

angleThe angle of rotation

See rotateZ in transform.h
rotate(angle);

Rotate geometry in 2D

Arguments

angleThe angle of rotation

See rotate in transform.h
scale(x, y, [z]);

scale geometry
currently only used for 3D

Arguments

xThe x scaling
yThe y scaling
[z]The z scaling

See scale in transform.h
translate(x, y, [z]);

translate geometry
currently only used for 3D

Arguments

xThe x translation
yThe y translation
[z]The z translation

See translate in transform.h
\ No newline at end of file diff --git a/docs/v0.1.7/transform/methods.json b/docs/v0.1.7/transform/methods.json new file mode 100644 index 00000000..615c9114 --- /dev/null +++ b/docs/v0.1.7/transform/methods.json @@ -0,0 +1 @@ +{"name":"transform","methods":[{"doc":{"name":"rotateX","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The angle of rotation","name":"angle"}]}],"description":"Rotate geometry around the X axis"},"source":{"start_line":6,"end_line":11,"header":"transform.h"}},{"doc":{"name":"rotateY","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The angle of rotation","name":"angle"}]}],"description":"Rotate geometry around the Y axis"},"source":{"start_line":13,"end_line":18,"header":"transform.h"}},{"doc":{"name":"rotateZ","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The angle of rotation","name":"angle"}]}],"description":"Rotate geometry around the Z axis"},"source":{"start_line":20,"end_line":25,"header":"transform.h"}},{"doc":{"name":"rotate","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The angle of rotation","name":"angle"}]}],"description":"Rotate geometry in 2D"},"source":{"start_line":27,"end_line":32,"header":"transform.h"}},{"doc":{"name":"scale","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The x scaling","name":"x"},{"description":"The y scaling","name":"y"},{"description":"The z scaling","name":"[z]"}]}],"description":"scale geometry
currently only used for 3D"},"source":{"start_line":34,"end_line":43,"header":"transform.h"}},{"doc":{"name":"translate","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":[{"description":"The x translation","name":"x"},{"description":"The y translation","name":"y"},{"description":"The z translation","name":"[z]"}]}],"description":"translate geometry
currently only used for 3D"},"source":{"start_line":45,"end_line":55,"header":"transform.h"}}],"source":"transform"} \ No newline at end of file diff --git a/docs/v0.1.7/typography/index.html b/docs/v0.1.7/typography/index.html index dcbc0767..e304b1d6 100644 --- a/docs/v0.1.7/typography/index.html +++ b/docs/v0.1.7/typography/index.html @@ -1,4 +1,4 @@ -lu5 | typography

typography

v0.1.7
loadFont(path);

Load a font

Arguments

pathThe font path on the local system

Returns

fontThe image reference

function setup()
+lu5 | typography

typography

v0.1.7
loadFont(path);

Load a font

Arguments

pathThe font path on the local system

Returns

fontThe image reference

function setup()
   createWindow(600, 600);
   font = loadFont('/path/to/myfont.ttf');
 end
@@ -8,7 +8,7 @@
 
   textFont(font);
   text('Hello from lu5!', 30, 50);
-end   
See loadFont in typography.h
textSize(size);

Set the font size

Arguments

sizeThe size of the font in pixels

If this is called using fonts, make sure to call textSize after calling textFont

textSize(56);
-text('Big Text', 50, 50);
See textSize in typography.h
textAlign(mode);

Set the font alignment

Arguments

modeCENTER, LEFT, RIGHT

textAlign(CENTER);
-text('Big Text', 50, 50);
See textAlign in typography.h
textFont(font);

Set the font family

Arguments

fontThe font value returned when using loadFont

textFont(myfont);
-text('Hello world!', 100, 200);
See textFont in typography.h
text(str, x, y);

Draw text on the screen

Arguments

strString to render
xThe x position of the start of the text
yThe y position of the top of the text

Fonts are not yet implemented

text('Hello lu5!', 40, 60);
See text in typography.h
CENTERConstant

Alignment mode for textAlign

See CENTER in typography.h
LEFTConstant

Alignment mode for textAlign

See LEFT in typography.h
This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +end
See loadFont in typography.h
textSize(size);

Set the font size

Arguments

sizeThe size of the font in pixels

If this is called using fonts, make sure to call textSize after calling textFont

textSize(56);
+text('Big Text', 50, 50);
See textSize in typography.h
textAlign(mode);

Set the font alignment

Arguments

modeCENTER, LEFT, RIGHT

textAlign(CENTER);
+text('Big Text', 50, 50);
See textAlign in typography.h
textFont(font);

Set the font family

Arguments

fontThe font value returned when using loadFont

textFont(myfont);
+text('Hello world!', 100, 200);
See textFont in typography.h
text(str, x, y);

Draw text on the screen

Arguments

strString to render
xThe x position of the start of the text
yThe y position of the top of the text

Fonts are not yet implemented

text('Hello lu5!', 40, 60);
See text in typography.h
CENTERConstant

Alignment mode for textAlign

See CENTER in typography.h
LEFTConstant

Alignment mode for textAlign

See LEFT in typography.h
\ No newline at end of file diff --git a/docs/v0.1.7/typography/methods.json b/docs/v0.1.7/typography/methods.json new file mode 100644 index 00000000..e1b4d545 --- /dev/null +++ b/docs/v0.1.7/typography/methods.json @@ -0,0 +1 @@ +{"name":"typography","methods":[{"doc":{"name":"loadFont","_type":"method","_return":{"description":"The image reference","var":"font"},"examples":["function setup()\n createWindow(600, 600);\n font = loadFont('/path/to/myfont.ttf');\nend\n\nfunction draw()\n background(51);\n\n textFont(font);\n text('Hello from lu5!', 30, 50);\nend "],"bottom_description":"","calls":[{"arguments":[{"description":"The font path on the local system","name":"path"}]}],"description":"Load a font"},"source":{"start_line":6,"end_line":27,"header":"typography.h"}},{"doc":{"name":"textSize","_type":"method","examples":["textSize(56);\ntext('Big Text', 50, 50);"],"bottom_description":"If this is called using fonts, make sure to call textSize after calling textFont","calls":[{"arguments":[{"description":"The size of the font in pixels","name":"size"}]}],"description":"Set the font size"},"source":{"start_line":29,"end_line":42,"header":"typography.h"}},{"doc":{"name":"textAlign","_type":"method","examples":["textAlign(CENTER);\ntext('Big Text', 50, 50);"],"bottom_description":"","calls":[{"arguments":[{"description":"`CENTER`, `LEFT`, `RIGHT`","name":"mode"}]}],"description":"Set the font alignment"},"source":{"start_line":44,"end_line":55,"header":"typography.h"}},{"doc":{"name":"textFont","_type":"method","examples":["textFont(myfont);\ntext('Hello world!', 100, 200);"],"bottom_description":"","calls":[{"arguments":[{"description":"The font value returned when using `loadFont`","name":"font"}]}],"description":"Set the font family"},"source":{"start_line":57,"end_line":67,"header":"typography.h"}},{"doc":{"name":"text","_type":"method","examples":["text('Hello lu5!', 40, 60);"],"bottom_description":"Fonts are not yet implemented","calls":[{"arguments":[{"description":"String to render","name":"str"},{"description":"The x position of the start of the text","name":"x"},{"description":"The y position of the top of the text","name":"y"}]}],"description":"Draw text on the screen"},"source":{"start_line":69,"end_line":82,"header":"typography.h"}},{"doc":{"name":"CENTER","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"Alignment mode for textAlign"},"source":{"start_line":84,"end_line":89,"header":"typography.h"}},{"doc":{"name":"RIGHT","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"Alignment mode for textAlign"},"source":{"start_line":92,"end_line":97,"header":"typography.h"}},{"doc":{"name":"LEFT","_type":"constant","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"Alignment mode for textAlign"},"source":{"start_line":100,"end_line":105,"header":"typography.h"}}],"source":"typography"} \ No newline at end of file diff --git a/docs/v0.1.7/vector/index.html b/docs/v0.1.7/vector/index.html index 6167c3fa..58db4099 100644 --- a/docs/v0.1.7/vector/index.html +++ b/docs/v0.1.7/vector/index.html @@ -1,6 +1,6 @@ -lu5 | vector

vector

v0.1.7
createVector(x, y);

Create a vector instance

Arguments

xThe first component of the vector
yThe second component of the vector

Returns

VectorThe created vector

local point = createVector(80, 125);
+lu5 | vector

vector

v0.1.7
createVector(x, y);

Create a vector instance

Arguments

xThe first component of the vector
yThe second component of the vector

Returns

VectorThe created vector

local point = createVector(80, 125);
 
-print(point);
See createVector in lu5_vector.h
Vector.print();

Since a Vector implements a print method, it can be used in the print function

local a = createVector(3, 5);
+print(point);
See createVector in lu5_vector.h
Vector.print();

Since a Vector implements a print method, it can be used in the print function

local a = createVector(3, 5);
 
 -- With print
 print(a);
@@ -9,11 +9,11 @@
 Vector.print(a);
 
 -- with instance
-a:print();
See Vector.print in lu5_vector.h
Vector.dist(a, b);

No description

Arguments

aThe first point
bThe second point

Returns

numberThe distance between the two points

local a = createVector(300, 500);
+a:print();
See Vector.print in lu5_vector.h
Vector.dist(a, b);

No description

Arguments

aThe first point
bThe second point

Returns

numberThe distance between the two points

local a = createVector(300, 500);
 local b = createVector(200, 250);
 
 local distance = a:dist(b);
-print(distance);
See Vector.dist in lu5_vector.h
Vector.dot(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

numberThe dot product

local a = createVector(3, 5);
+print(distance);
See Vector.dist in lu5_vector.h
Vector.dot(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

numberThe dot product

local a = createVector(3, 5);
 local b = createVector(1, 3);
 
 -- From prototype
@@ -23,7 +23,7 @@
 print(Vector.dot(a, b)); -- 18.0
 
 -- With concat syntax
-print(a .. b); -- 18.0
See Vector.dot in lu5_vector.h
Vector.add(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

VectorThe added vector

local a = createVector(4, 2);
+print(a .. b); -- 18.0
See Vector.dot in lu5_vector.h
Vector.add(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

VectorThe added vector

local a = createVector(4, 2);
 local b = createVector(2, 1);
 
 -- Non-mutable
@@ -33,7 +33,7 @@
 
 -- Mutable
 print(a:add(b));	-- { 6.0, 3.0 }
-print(a) 		-- { 6.0, 3.0 }
See Vector.add in lu5_vector.h
Vector.sub(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

VectorThe subtracted vector

local a = createVector(3, 5);
+print(a) 		-- { 6.0, 3.0 }
See Vector.add in lu5_vector.h
Vector.sub(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

VectorThe subtracted vector

local a = createVector(3, 5);
 local b = createVector(2, 3);
 
 -- Non-mutable
@@ -43,7 +43,7 @@
 
 -- Mutable
 print(a:sub(b)); -- { 1.0, 2.0 }
-print(a);        -- { 1.0, 2.0 }
See Vector.sub in lu5_vector.h
Vector.mult(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

VectorThe multiplied vector

local a = createVector(3, 5);
+print(a);        -- { 1.0, 2.0 }
See Vector.sub in lu5_vector.h
Vector.mult(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

VectorThe multiplied vector

local a = createVector(3, 5);
 local b = createVector(2, 3);
 
 -- Non-mutable
@@ -53,7 +53,7 @@
 
 -- Mutable
 print(a:mult(b)); -- { 3.0, 15.0 }
-print(a);         -- { 3.0, 15.0 }
See Vector.mult in lu5_vector.h
Vector.div(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

VectorThe divided vector

local a = createVector(4, 2);
+print(a);         -- { 3.0, 15.0 }
See Vector.mult in lu5_vector.h
Vector.div(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

VectorThe divided vector

local a = createVector(4, 2);
 local b = createVector(2, 1);
 
 -- Non-mutable
@@ -63,7 +63,7 @@
 
 -- Mutable
 print(a:div(b));	-- { 2.0, 2.0 }
-print(a) 		-- { 2.0, 2.0 }
See Vector.div in lu5_vector.h
Vector.idiv(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

VectorThe divided vector

local a = createVector(7, 8);
+print(a) 		-- { 2.0, 2.0 }
See Vector.div in lu5_vector.h
Vector.idiv(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

VectorThe divided vector

local a = createVector(7, 8);
 local b = createVector(2, 3);
 
 -- Non-mutable
@@ -73,14 +73,14 @@
 
 -- Mutable
 print(a:idiv(b)); -- { 3.0, 2.0 }
-print(a)          -- { 3.0, 2.0 }
See Vector.idiv in lu5_vector.h
Vector.copy();

No description

Returns

VectorThe copied vector

local a = createVector(300, 450, 400);
+print(a)          -- { 3.0, 2.0 }
See Vector.idiv in lu5_vector.h
Vector.copy();

No description

Returns

VectorThe copied vector

local a = createVector(300, 450, 400);
 
 local copy_1 = a:copy();
 
-local copy_2 = Vector.copy(a);
See Vector.copy in lu5_vector.h
Vector();

No description

Returns

VectorThe composed vector

local a = createVector(300, 450, 400);
+local copy_2 = Vector.copy(a);
See Vector.copy in lu5_vector.h
Vector();

No description

Returns

VectorThe composed vector

local a = createVector(300, 450, 400);
 
 local copy = a.xyz;
 
 local a_2d = a.xy; -- { 300, 450 }
 local b = a.xyx; -- { 300, 450, 300 }
-local c = a.zxy; -- { 400, 300, 450 }
See Vector in lu5_vector.h
This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +local c = a.zxy; -- { 400, 300, 450 }
See Vector in lu5_vector.h
\ No newline at end of file diff --git a/docs/v0.1.7/vector/methods.json b/docs/v0.1.7/vector/methods.json new file mode 100644 index 00000000..8c422349 --- /dev/null +++ b/docs/v0.1.7/vector/methods.json @@ -0,0 +1 @@ +{"name":"vector","methods":[{"doc":{"name":"createVector","_type":"method","_return":{"description":"The created vector","var":"Vector"},"examples":["local point = createVector(80, 125);\n\nprint(point);"],"bottom_description":"","calls":[{"arguments":[{"description":"The first component of the vector","name":"x"},{"description":"The second component of the vector","name":"y"}]}],"description":"Create a vector instance"},"source":{"start_line":18,"end_line":32,"header":"lu5_vector.h"}},{"doc":{"name":"Vector.print","_type":"method","examples":["local a = createVector(3, 5);\n\n-- With print\nprint(a);\n\n-- With class method\nVector.print(a);\n\n-- with instance\na:print();"],"bottom_description":"","calls":[{"arguments":{}}],"description":"Since a Vector implements a print method, it can be used in the print function"},"source":{"start_line":34,"end_line":51,"header":"lu5_vector.h"}},{"doc":{"name":"Vector.dist","_type":"method","_return":{"description":"The distance between the two points","var":"number"},"examples":["local a = createVector(300, 500);\nlocal b = createVector(200, 250);\n\nlocal distance = a:dist(b);\nprint(distance);"],"bottom_description":"","calls":[{"arguments":[{"description":"The first point","name":"a"},{"description":"The second point","name":"b"}]}],"description":""},"source":{"start_line":53,"end_line":69,"header":"lu5_vector.h"}},{"doc":{"name":"Vector.dot","_type":"method","_return":{"description":"The dot product","var":"number"},"examples":["local a = createVector(3, 5);\nlocal b = createVector(1, 3);\n\n-- From prototype\nprint(a:dot(b)); -- 18.0\n\n-- With static method\nprint(Vector.dot(a, b)); -- 18.0\n\n-- With concat syntax\nprint(a .. b); -- 18.0"],"bottom_description":"","calls":[{"arguments":[{"description":"The first vector","name":"a"},{"description":"The second vector","name":"b"}]}],"description":""},"source":{"start_line":71,"end_line":93,"header":"lu5_vector.h"}},{"doc":{"name":"Vector.add","_type":"method","_return":{"description":"The added vector","var":"Vector"},"examples":["local a = createVector(4, 2);\nlocal b = createVector(2, 1);\n\n-- Non-mutable\nprint(Vector.add(a, b)); -- { 6.0, 3.0 }\nprint(a + b); -- { 6.0, 3.0 }\nprint(a); -- { 4.0, 2.0 }\n\n-- Mutable\nprint(a:add(b));\t-- { 6.0, 3.0 }\nprint(a) \t\t-- { 6.0, 3.0 }"],"bottom_description":"","calls":[{"arguments":[{"description":"The first vector","name":"a"},{"description":"The second vector","name":"b"}]}],"description":""},"source":{"start_line":95,"end_line":117,"header":"lu5_vector.h"}},{"doc":{"name":"Vector.sub","_type":"method","_return":{"description":"The subtracted vector","var":"Vector"},"examples":["local a = createVector(3, 5);\nlocal b = createVector(2, 3);\n\n-- Non-mutable\nprint(Vector.sub(a, b)); -- { 1.0, 2.0 }\nprint(a - b); -- { 1.0, 2.0 }\nprint(a); -- { 3.0, 5.0 }\n\n-- Mutable\nprint(a:sub(b)); -- { 1.0, 2.0 }\nprint(a); -- { 1.0, 2.0 }"],"bottom_description":"","calls":[{"arguments":[{"description":"The first vector","name":"a"},{"description":"The second vector","name":"b"}]}],"description":""},"source":{"start_line":119,"end_line":141,"header":"lu5_vector.h"}},{"doc":{"name":"Vector.mult","_type":"method","_return":{"description":"The multiplied vector","var":"Vector"},"examples":["local a = createVector(3, 5);\nlocal b = createVector(2, 3);\n\n-- Non-mutable\nprint(Vector.mult(a, b)); -- { 6.0, 15.0 }\nprint(a * b); -- { 6.0, 15.0 }\nprint(a); -- { 3.0, 5.0 }\n\n-- Mutable\nprint(a:mult(b)); -- { 3.0, 15.0 }\nprint(a); -- { 3.0, 15.0 }"],"bottom_description":"","calls":[{"arguments":[{"description":"The first vector","name":"a"},{"description":"The second vector","name":"b"}]}],"description":""},"source":{"start_line":143,"end_line":165,"header":"lu5_vector.h"}},{"doc":{"name":"Vector.div","_type":"method","_return":{"description":"The divided vector","var":"Vector"},"examples":["local a = createVector(4, 2);\nlocal b = createVector(2, 1);\n\n-- Non-mutable\nprint(Vector.div(a, b)); -- { 2.0, 2.0 }\nprint(a / b); -- { 2.0, 2.0 }\nprint(a); -- { 4.0, 2.0 }\n\n-- Mutable\nprint(a:div(b));\t-- { 2.0, 2.0 }\nprint(a) \t\t-- { 2.0, 2.0 }"],"bottom_description":"","calls":[{"arguments":[{"description":"The first vector","name":"a"},{"description":"The second vector","name":"b"}]}],"description":""},"source":{"start_line":167,"end_line":189,"header":"lu5_vector.h"}},{"doc":{"name":"Vector.idiv","_type":"method","_return":{"description":"The divided vector","var":"Vector"},"examples":["local a = createVector(7, 8);\nlocal b = createVector(2, 3);\n\n-- Non-mutable\nprint(Vector.idiv(a, b)) -- { 3.0, 2.0 }\nprint(a // b); -- { 3.0, 2.0 }\nprint(a); -- { 7.0, 8.0 }\n\n-- Mutable\nprint(a:idiv(b)); -- { 3.0, 2.0 }\nprint(a) -- { 3.0, 2.0 }"],"bottom_description":"","calls":[{"arguments":[{"description":"The first vector","name":"a"},{"description":"The second vector","name":"b"}]}],"description":""},"source":{"start_line":193,"end_line":215,"header":"lu5_vector.h"}},{"doc":{"name":"Vector.copy","_type":"method","_return":{"description":"The copied vector","var":"Vector"},"examples":["local a = createVector(300, 450, 400);\n\nlocal copy_1 = a:copy();\n\nlocal copy_2 = Vector.copy(a);"],"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":218,"end_line":231,"header":"lu5_vector.h"}},{"doc":{"name":"Vector","_type":"method","_return":{"description":"The composed vector","var":"Vector"},"examples":["local a = createVector(300, 450, 400);\n\nlocal copy = a.xyz;\n\nlocal a_2d = a.xy; -- { 300, 450 }\nlocal b = a.xyx; -- { 300, 450, 300 }\nlocal c = a.zxy; -- { 400, 300, 450 }"],"bottom_description":"","calls":[{"arguments":{}}],"description":""},"source":{"start_line":233,"end_line":253,"header":"lu5_vector.h"}}],"source":"vector"} \ No newline at end of file diff --git a/docs/v0.1.7/window/index.html b/docs/v0.1.7/window/index.html index 6ed16fe3..83f6b86d 100644 --- a/docs/v0.1.7/window/index.html +++ b/docs/v0.1.7/window/index.html @@ -1,11 +1,11 @@ -lu5 | window

window

v0.1.7
createWindow(w, h, [mode]);

Create a GLFW window.

Arguments

wWindow width
hWindow height
[mode]Rendering mode, either GL2D or GL3D, by default GL2D is set.

It is also possible to create a window in the global scope without defining a setup function.

function setup()
+lu5 | window

window

v0.1.7
createWindow(w, h, [mode]);

Create a GLFW window.

Arguments

wWindow width
hWindow height
[mode]Rendering mode, either GL2D or GL3D, by default GL2D is set.

It is also possible to create a window in the global scope without defining a setup function.

function setup()
   -- Create the window here
   createWindow(600, 600);
 end
 
 function draw()
   -- draw things
-end
See createWindow in window.h
frameRate(fps);

Set the frame rate

Arguments

fpsThe frame rate to set

If frame rate is called without an argument, it will return frame per seconds

x = 0;
+end
See createWindow in window.h
frameRate(fps);

Set the frame rate

Arguments

fpsThe frame rate to set

If frame rate is called without an argument, it will return frame per seconds

x = 0;
 
 function setup()
   createWindow(400, 400);
@@ -18,7 +18,7 @@
 
   circle(x, 200, 32);
   x = x + 1;
-end
See frameRate in window.h
noLoop();

Prevents lu5 from calling draw again.

When noLoop is called, the draw continues execution, but will not be called again.

See noLoop in window.h
loop();

Allow lu5 to call the draw function.

See loop in window.h
deltaTimeGlobal

Elapsed time since the last draw call in seconds

x = 0;
+end
See frameRate in window.h
noLoop();

Prevents lu5 from calling draw again.

When noLoop is called, the draw continues execution, but will not be called again.

See noLoop in window.h
loop();

Allow lu5 to call the draw function.

See loop in window.h
deltaTimeGlobal

Elapsed time since the last draw call in seconds

x = 0;
 vx = 128;
 
 function setup()
@@ -33,13 +33,13 @@
 
   -- Get the same velocity with different framerates
   x = x + vx * deltaTime;
-end
See deltaTime in window.h
widthGlobal

The window's width in pixels. If no window was created, this value is nil

createWindow(800, 600);
+end
See deltaTime in window.h
widthGlobal

The window's width in pixels. If no window was created, this value is nil

createWindow(800, 600);
 
 print(width);
--- 800
See width in window.h
heightGlobal

The window's height in pixels. If no window was created, this value is nil

createWindow(800, 600);
+-- 800
See width in window.h
heightGlobal

The window's height in pixels. If no window was created, this value is nil

createWindow(800, 600);
 
 print(height);
--- 600
See height in window.h
windowResized();Event

Called when the window is resized

function setup()
+-- 600
See height in window.h
windowResized();Event

Called when the window is resized

function setup()
     createWindow(500, 500);
 end
 
@@ -49,4 +49,4 @@
 
 function windowResized()
     print('Resized!')
-end
See windowResized in window.h
This project is licensed under the MIT License.
It also includes the FreeType font engine, which is licensed under the FreeType License (FTL).
\ No newline at end of file +end
See windowResized in window.h
\ No newline at end of file diff --git a/docs/v0.1.7/window/methods.json b/docs/v0.1.7/window/methods.json new file mode 100644 index 00000000..bf86e5bf --- /dev/null +++ b/docs/v0.1.7/window/methods.json @@ -0,0 +1 @@ +{"name":"window","methods":[{"doc":{"name":"createWindow","_type":"method","examples":["function setup()\n -- Create the window here\n createWindow(600, 600);\nend\n\nfunction draw()\n -- draw things\nend"],"bottom_description":"It is also possible to create a window in the global scope without defining a setup function.","calls":[{"arguments":[{"description":"Window width","name":"w"},{"description":"Window height","name":"h"},{"description":"Rendering mode, either `GL2D` or `GL3D`, by default `GL2D` is set.","name":"[mode]"}]}],"description":"Create a GLFW window."},"source":{"start_line":7,"end_line":28,"header":"window.h"}},{"doc":{"name":"frameRate","_type":"method","examples":["x = 0;\n\nfunction setup()\n createWindow(400, 400);\n frameRate(24);\nend\n\nfunction draw()\n background(51);\n text('fps: ' .. frameRate(), 20, 10);\n\n circle(x, 200, 32);\n x = x + 1;\nend"],"bottom_description":"If frame rate is called without an argument, it will return frame per seconds ","calls":[{"arguments":[{"description":"The frame rate to set","name":"fps"}]}],"description":"Set the frame rate "},"source":{"start_line":30,"end_line":54,"header":"window.h"}},{"doc":{"name":"noLoop","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"Prevents lu5 from calling draw again.

When noLoop is called, the draw continues execution, but will not be called again."},"source":{"start_line":56,"end_line":62,"header":"window.h"}},{"doc":{"name":"loop","_type":"method","examples":{},"bottom_description":"","calls":[{"arguments":{}}],"description":"Allow lu5 to call the draw function."},"source":{"start_line":64,"end_line":68,"header":"window.h"}},{"doc":{"name":"deltaTime","_type":"global","examples":["x = 0;\nvx = 128;\n\nfunction setup()\n createWindow(400, 400);\n frameRate(24); -- try with 60\nend\n\nfunction draw()\n background(51);\n\n circle(x, height/2, 32);\n\n -- Get the same velocity with different framerates\n x = x + vx * deltaTime;\nend"],"bottom_description":"","calls":[{"arguments":{}}],"description":"Elapsed time since the last draw call in seconds"},"source":{"start_line":70,"end_line":94,"header":"window.h"}},{"doc":{"name":"width","_type":"global","examples":["createWindow(800, 600);\n\nprint(width);\n-- 800"],"bottom_description":"","calls":[{"arguments":{}}],"description":"The window's width in pixels. If no window was created, this value is nil"},"source":{"start_line":97,"end_line":109,"header":"window.h"}},{"doc":{"name":"height","_type":"global","examples":["createWindow(800, 600);\n\nprint(height);\n-- 600"],"bottom_description":"","calls":[{"arguments":{}}],"description":"The window's height in pixels. If no window was created, this value is nil"},"source":{"start_line":112,"end_line":124,"header":"window.h"}},{"doc":{"name":"windowResized","_type":"event","examples":["function setup()\n createWindow(500, 500);\nend\n\nfunction draw()\n background(51)\nend\n\nfunction windowResized()\n print('Resized!')\nend"],"bottom_description":"","calls":[{"arguments":{}}],"description":"Called when the window is resized"},"source":{"start_line":127,"end_line":145,"header":"window.h"}}],"source":"window"} \ No newline at end of file