fix: Interpret relative URLs correctly. (#19)
Also update to latest version of Civet. Resolves #11. Reviewed-on: #19 Co-authored-by: Glen Whitney <glen@studioinfinity.org> Co-committed-by: Glen Whitney <glen@studioinfinity.org>
This commit is contained in:
parent
b5478254af
commit
765d4ff840
3 changed files with 9 additions and 8 deletions
|
@ -15,9 +15,10 @@ else if url.includes '.wrl'
|
|||
// Need to obtain the text and check what level it is
|
||||
response := await fetch url
|
||||
text .= await response.text()
|
||||
if /#\s*VRML\s*V?1./i.test(text)
|
||||
text = convert(text)
|
||||
if /#\s*VRML\s*V?1[.]/i.test text
|
||||
text = convert text
|
||||
browser.baseURL = url
|
||||
scene := await browser.createX3DFromString text
|
||||
browser.replaceWorld(scene)
|
||||
browser.replaceWorld scene
|
||||
|
||||
site.after(canvas)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue