From 779877953c16f828c7ae081d3e8582b12b8cdfa4 Mon Sep 17 00:00:00 2001 From: Leon van Kammen Date: Thu, 2 Oct 2025 16:56:10 +0200 Subject: [PATCH] doc: update README.md --- README.awk | 4 ++-- README.md | 10 +++++++++- level0.js | 15 ++++++++++++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/README.awk b/README.awk index ff30545..ed916ed 100755 --- a/README.awk +++ b/README.awk @@ -14,8 +14,8 @@ # BEGIN{ - # printf README.md until '# Component List' - system("grep -B9999 '# Functions' README.md") + # printf README.md until '# library functions' + system("grep -B9999 '# library functions' README.md") print "" } diff --git a/README.md b/README.md index fdc492d..a4e8229 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,12 @@ See function list below > this README.md is generated by running `echo "$(./README.awk *.js)" > README.md` -# Function list +# library functions + + +### import {...} from 'xrf/level0' + +| function | example | +|------------------------|-------------------------------------------------------------------------| +| fetchSideCarFiles(...) | fetchSideCarFiles("https://f.org/a.glb") // ["https://f.org/a.png",...] | + diff --git a/level0.js b/level0.js index e1a124e..d2c108d 100644 --- a/level0.js +++ b/level0.js @@ -1,3 +1,11 @@ +/** + * ### import {...} from 'xrf/level0' + * + * | function | example | + * |------------------------|-------------------------------------------------------------------------| + * | fetchSideCarFiles(...) | fetchSideCarFiles("https://f.org/a.glb") // ["https://f.org/a.png",...] | + * + */ import * as http from './scheme/http.js' import * as xrf from './scheme/http.js' @@ -5,7 +13,12 @@ function defaultSchemes(){ return {http,xrf} } -async function pollSideCarFiles(urlString, opts){ +async function sideCarFiles(urlString, opts){ + + const sext = [".png",".ogg",".vtt",".json"] +} + +async function fetchSideCarFiles(urlString, opts){ opts = {} opts.scheme = opts.scheme || defaultSchemes()