WebRepo 2.0 - Easy access to projects from the Codea community (not iCloud compatible)

Touch Sensor - 1.0.0 is now available.

Description: Extendable full-featured gesture handler
Author(s): @jmv38

Description:

From jmv38 comes a fairly complex but also darn impressive class called Sensor, along with a bunch of cool demos. It handles a bunch of standard gestures out-of-the-box, but it’s also set up to be extendable to handle any other gestures you care to define. Fun to try out and play with even if you are satisfied with your current touch-handling.

Change-notes:

  • Initial Release

Latest WebRepo project

Tried to use Oil as a dependency from a brand-new Craft project, no code added at all.

Got this warning upon trying to run the project:

Hey @UberGoober,

I think the error message needs to be clearer but it’s asking you to close and re-open your project (back to project browser in Codea).

Any projects utilising WebRepoLib insert a guard at the top of all source files in order to control the order files are loaded but Codea doesn’t detect this change until you close and re-open :slight_smile:

My code (iPhone ), with Oil as a dependency:

----------------- DO NOT REMOVE OR MOVE -----------------
– Ensure Codea doesn’t load this file automatically
– This MUST be at the top of this file!
if WRL and not WRL.loading then return end
--------------- END DO NOT REMOVE OR MOVE ---------------
– Oil-dependent

function setup()
Oil.setup()
Oil.List(0.5, -0.0001, 100)
:add_children(
Oil.Label(0.5, 0, 200, 50, “I’m also scrollable!”),
Oil.IconButton(0.5, 0, 50, 50, asset.builtin.Blocks.Dirt_Grass),
Oil.Icon(0.5, 0, 50, 50, asset.builtin.Blocks.Dirt_Snow),
Oil.Icon(0.5, 0, 50, 50, asset.builtin.Blocks.Dirt_Sand),
Oil.Icon(0.5, 0, 50, 50, asset.builtin.Blocks.Brick_Red),
Oil.Icon(0.5, 0, 50, 50, asset.builtin.Blocks.Cactus_Side),
Oil.Icon(0.5, 0, 50, 50, asset.builtin.Blocks.Cotton_Red)
)
end

function update(dt)
– Update the scene (physics, transforms etc)
end

function draw()
Oil.beginDraw()
background(64)
Oil.endDraw()
end

function sizeChanged(w, h)
Oil.sizeChanged(w, h)
end

function hover(g)
Oil.hover(g)
end

function scroll(g)
Oil.scroll(g)
end

function touched(t)
Oil.touch(t)
end

function keyboard(k)
Oil.keyboard(k)
end

My result:

Ah, that’s interesting. I think I know what’s going on and I’ll try to sort it out. I expect other WebRepoLib based projects could have the same issue too.

I pretty much overlooked loading the project as a normal Codea dependency :man_facepalming:

Also I don’t know how other people feel but to me it would be a lot better to have the intrusive code at the bottom of the files instead of the top, if it’s possible.

Otherwise it’s quite a significant land grab, screen-real-estate-wise. At the bottom lots of people won’t even notice it.

WebRepoLib - 1.0.1 is now available.

Description: Downloadable Dependencies
Author(s): @Steppers

Description:

Dynamically Download dependency projects from WebRepo at runtime!

By adding WebRepoLib as a dependency and adding a ‘WRL’ tab to your project you can easily include projects from WebRepo as dependencies, download and load them dynamically at project launch.

Features:

  • Simple ‘WRL’ manifest format written in Lua.
  • Downloaded dependencies are cached for offline use.
  • Include local projects as dependencies using a ‘~’ prefix.
  • Dependencies can also use WebRepoLib and load dependencies of their own.
  • Version specifiers to load specific dependency versions.
  • & Many more!

Full documentation is included with this project and can be viewed when launching ‘WebRepoLib’.

Change-notes:

  • Fix broken functionality when adding WebRepoLib projects as dependencies using normal Codea UI.

Latest WebRepo project

@UberGoober As much as I’d like to put the guard at the bottom it’s not really possible as that would mean the code has already loaded into whatever environment is current.

Oil - 1.0a14 is now available.

Description: Slick UI Library
Author(s): @Steppers

Description:

Oil is the UI Library used by WebRepo 2.0

Features include:

  • Text Labels
  • Buttons
  • Toggle Switches
  • Sliders
  • Vertical & Horizontal stacks
  • Lists
  • Dropdowns
  • Text entry fields
  • Scrollable panels
  • Rectangles with various configurations, texture, blur, shadow etc.
  • Versatile style system allowing global ‘themes’ to be created.
  • Nested UI elements make creating complex interfaces a breeze.
  • Modal Alerts

Full documentation is available via the forum link and is also included (‘Docs’ tab)

Change-notes:

  • Update WebRepoLib to 1.0.1

Latest WebRepo project

@UberGoober Oil should work now with a14 (was supposed to change it to 1.0.14…) :slight_smile:

If the header stuff can’t be at the end, can it be reduced to one line or two lines at least?

I love WebRepo, but it seems to be taking over more and more of the projects—first there was all the tabs at the front, now there’s a big block of text taking over the beginning of every tab.

Think of the children!

:slight_smile:

Oil - 1.0a15 is now available.

Description: Slick UI Library
Author(s): @Steppers

Description:

Oil is the UI Library used by WebRepo 2.0

Features include:

  • Text Labels
  • Buttons
  • Toggle Switches
  • Sliders
  • Vertical & Horizontal stacks
  • Lists
  • Dropdowns
  • Text entry fields
  • Scrollable panels
  • Rectangles with various configurations, texture, blur, shadow etc.
  • Versatile style system allowing global ‘themes’ to be created.
  • Nested UI elements make creating complex interfaces a breeze.
  • Modal Alerts

Full documentation is available via the forum link and is also included (‘Docs’ tab)

Change-notes:

  • Add assert for use before calling Oil.setup().

Latest WebRepo project

I know it’s not ideal :sweat:
I could probably reduce the header size but sadly it does need to be at the top as it’s supposed to conditionally control further execution of the file…

If you could get it down to one line it would be liveable, imho.

webRMicroIDE - 1.0.0 is now available.

Description: Enhancement to WebR
Author(s): @SugarRay (with special thanks to Kartik for help with advanced troubleshooting)

Description:

An enhancement to using Steppers’ great webR-lua bridge project.

It provide an expanded REPL capability which allows users somewhat more space to input both lua and R commands (including graphical commands and plots) and display their results. Like webR, it can install many of R’s packages.

Useful to test out combinations of graphical and non-graphical lua code mixed with R.

Please see the attached video, Codea forum link, or click on the in-project Tips button for help:

Change-notes:

  • Initial Release

Latest WebRepo project

2 Likes

That’s amazing.

Someone could make an interactive lua tutorial playground with this.

That would be a cool thing for Codea to have.

1 Like

xml2lua-Parser - 1.0.0 is now available.

Description: xml2lua as Codea dependency
Author(s): @SugarRay (modification of Manoel Campos’s original xml2lua library)

Description:

Modified Manoel Campos’s pure lua xml parser library to use as a Codea dependency.

To use:

  1. Import xml2lua-Parser as a dependency to your project
  2. (In your project type): local parser = xml2lua.parser(tree)
    parser:parse(YourXmlFileAsXMLString)
  3. XML file is then contained in a table named “tree”
    Access element data (e.g. print(tree.root.data) etc.)

See Manoel Campos’s project on Github:

Note: in order to get the project to work as a dependency, most of the xml2lua local functions were converted to global functions (ensure your function names don’t conflict or perhaps restructure the code into classes to not conflict with your functions)

Change-notes:

  • Initial Release

Latest WebRepo project

SARS-CoV-2-Wastewater - 1.0.0 is now available.

Description: Demo use of webR
Author(s): @SugarRay

Description:

Demo project of how can combine webR’s graphing (and statistical) capabilities with Codea lua. Uses base R’s standard plots; much more professional plots can be made using the R package ‘ggplot2’ which can be installed in webR (see webR project and https://ggplot2.tidyverse.org and https://r-graph-gallery.com/).

Demo project also demonstrates the use of Codea’s objective-C bridge with multiple objective-C controls (e.g. labels, buttons, date and general pickers, and auto-layout). App is ready to use when both white square backgrounds have been rendered; there is currently a variable amount of lag in being able to use the buttons when the app starts. @jfperusse indicated he is aware and that the lag should be improved with a future Codea release.

The app queries CDC’s National Wastewater Surveillance System database (info: https://www.cdc.gov/news’s/how-was-works.html or Wastewater-based surveillance as a tool for public health action: SARS-CoV-2 and beyond - PubMed for a good treatise on the subject) for the concentration of SARS-CoV-2 viral concentrations in selected wastewater plants for selected cities. The app allows comparison of two cities side by side over a variable timeframe from 12/1/2021 (when reporting standard more consistent) to the present. For reasons explained in the informational links, best to compare trends in cities over time rather than absolute concentrations of SARS-CoV-2 in different cities’ wastewater.

The project includes two dependency libraries: webR & xml2lua-Parser

Special thanks to @steppers for his work creating the webR-Codea lua bridge, @jfperusse for objective-C bridge and providing tips on how to use it in this project, and my online programming colleague, Kartik (@akkartik.itch.io) who debug this project.

Suggestion for improvement welcomed

Change-notes:

  • Initial Release

Latest WebRepo project

Loopspace’s Useless Code - 1.0.0 is now available.

Description: Extensions for meshes etc
Author(s): @LoopSpace

Description:

This library contains my code that extends various of the inbuilt objects in Codea:

  • MeshExt: add additional shapes to meshes
  • PseudoMesh: create models for Craft using meshes
  • VecExt: extends the various vector and matrix objects
  • ColourExt: extends the color object

Change-notes:

  • Initial Release

Latest WebRepo project

2 Likes

xml2lua-Parser - 1.0.2 is now available.

Description: xml2lua as Codea dependency
Author(s): @SugarRay (modification of Manoel Campos’s original xml2lua library)

Description:

Modified Manoel Campos’s pure lua xml parser library to use as a Codea dependency.

To use:

  1. Import xml2lua-Parser as a dependency to your project
  2. (In your project type): local parser = xml2lua.parser(tree)
    parser:parse(YourXmlFileAsXMLString)
  3. XML file is then contained in a table named “tree”
    Access element data (e.g. print(tree.root.data) etc.)
  4. To parse multiple XML files from your project, reset the tree before setting the parser like this:
    tree = tree:new()
    local parser = xml2lua.parser(tree)
    parser:parse(nextXMLFileAsString)

(Enclose this code in your iterator XML parsing loop)

See Manoel Campos’s project on Github:

Note: in order to get the project to work as a dependency, most of the xml2lua local functions were converted to global functions (ensure your function names don’t conflict or perhaps restructure the code into classes to not conflict with your functions)

Change-notes:

  • Description update x 2

Latest WebRepo project