doc: update README.md

This commit is contained in:
Leon van Kammen 2025-10-02 16:56:10 +02:00
parent 0c6686f5a0
commit 779877953c
3 changed files with 25 additions and 4 deletions

View file

@ -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 ""
}

View file

@ -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",...] |

View file

@ -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()