pixi-jsVariables
Variable: path
> const path: Path
Defined in: node_modules/pixi.js/lib/utils/path.d.ts:138
Path utilities for working with URLs and file paths in a cross-platform way. All paths that are passed in will become normalized to have posix separators.
Example
import { path } from 'pixi.js';
// Basic path normalization
path.normalize('http://www.example.com/foo/bar/../baz');
// -> 'http://www.example.com/foo/baz'
// Working with file paths
path.join('assets', 'images', 'sprite.png');
// -> 'assets/images/sprite.png'
// URL handling
path.toAbsolute('images/texture.png', 'http://example.com/assets/');
// -> 'http://example.com/assets/images/texture.png'
Remarks
- Normalizes to POSIX separators (forward slashes)
- Handles URLs, data URLs, and file paths
- Supports path composition and decomposition
- Common in asset loading and URL management
Standard
See
- Path For full API reference
- DOMAdapter For platform-specific path handling