The official glTF 2.0 Specification dictates that asset URIs follow internet standard RFC 3986 Section 6.2.2. While syntax-based normalization (removing .. segments) is strongly recommended (“SHOULD”), passing a non-normalized relative parent path (like "../textures/image.png") remains technically valid under the core specification.
Currently, the GLTFFileLoader aggressively treats the presence of ".." inside a URI string as a hard application failure. While this defensive default is logical for untrusted native environments (Electron, Node, Drop-in Sandboxes), it penalizes enterprise web application developers who run glTF assets in fully controlled, secure same-origin web server configurations with large distributed texture catalogs.
Proposed Solution:
Introduce a boolean configuration flag—allowParentURIs—to the GLTFFileLoader options block.
- By default, it will remain
falseto maintain full safety protocols across native hosts. - When set to
true, the internal string validation bypasses the restrictive".."error throw, allowing the underlying environment (like the web browser) to natively parse the valid relative network request.
Use Case / Motivation:
Centralized content libraries where a single directory structure serves texture sheets across several localized sub-folders (e.g. ../shared_textures/wood_base.png). Forcing file modifications or forcing structural redesigns limits standard CDN optimization pipelines.