https://github.com/aframevr/sample-assets
:rice_scene: Sample assets for the Inspector.
https://github.com/aframevr/sample-assets
Last synced: about 2 months ago
JSON representation
:rice_scene: Sample assets for the Inspector.
- Host: GitHub
- URL: https://github.com/aframevr/sample-assets
- Owner: aframevr
- License: mit
- Created: 2016-10-21T12:00:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-09T05:04:16.000Z (9 months ago)
- Last Synced: 2025-04-02T19:46:27.920Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 19.2 MB
- Stars: 9
- Watchers: 3
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sample-assets
Curated collection of assets (images, models and sounds) to use in A-Frame.
> Work in progress.
## Folder structure
You can have as many subfolders as you want in the assets folder, each folder on the tree will be added as tags automatically to the final file. In the following folder structure `noiseperlin.jpg` image will have `tags=[noise, perlin]`:
```
- noise
- perlin
noiseperlin.jpg
```### Licenses
Inside each assets folder (image/sound/model) you could include a root level `license.txt` that will apply by default to any asset that doesn't contains a specific license. You can override the license for one folder and its subfolders just by including a `license.txt` file.
If you want to specify a license for just one file while leaving the default license for the rest of them, just include a `filename.txt` to the same folder of the original file.For example:
```
license.txt [LicenseA]
- particles * LicenseA applied
- noise
license.txt [LicenseB]
- perlin * LicenseB applied
noiseperlin.txt [Specific file license]
noiseperlin.jpg * noiseperlin.txt license
perlin0.jpg * LicenseB applied
perlin1.jpg * LicenseB applied
```## JSON Structure
The generated JSON files for each assets are stored on the `build` folder. They share the same structure:
- `licenseId`: Index of the license used for this asset
- `id`: Valid HTML ID for the asset
- `path`: Relative path to the file
- `tags`: Array with tags for this assetExample of JSON file for images:
```json
{
"licenses": [
"MIT Three.js project\n"
],
"images": [
{
"licenseId": 0,
"id": "brick_bump",
"path": "images/bricks/brick_bump.jpg",
"tags": [ "bricks" ]
}
]
}
```## How to build
To build the output JSON files for each asset type you should execute the following command:
```bash
npm run build
```## How to use it
You can fetch the assets JSON using the following url:
https://aframe.io/sample-assets/dist/images.json