aframevr / aframevr/aframe

custom.json glitch baseurl

Open
#4,211 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
17.6k
Forks
4.4k
PR merge metrics
No merged PRs in 30d

Description

in text,js in src/components

i'm using a custom font so i can have accents. i have a custom-msdf.json that points to a png. the png is in a cdn, so different url than json.

getFontImageSrc() is trying to set the base url to the custom.json font

return THREE.LoaderUtils.extractUrlBase(fontSrc) + imageSrc;

In Glitch the font is automatically put in cdn, so fontSrc and imageSrc are in different locations. So i get the following url: "./https://cdn.glitch.com/09d415c2-7643-4eb9-b37a-ef44049cdbe1%2Fcustom.png?v=1561374112276"
it should see if i'm already giving a full url. and be possible to give both files different locations

aframe 0.9.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/components/text.js at getFontImageSrc(), especially the use of THREE.LoaderUtils.extractUrlBase(fontSrc). Reproduce with a custom-msdf.json whose PNG is hosted on a different CDN URL, then verify that a full image URL is preserved while relative paths still use the font JSON location.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, three.js
Domain
frontend, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.