@spawnite/assets
v0.1.0-beta.41
Published
The shared 3D models, motions, textures, sounds, particle effects, sprite sheets and tile sets.
Readme
@spawnite/assets
The shared models, avatars, animation clips, textures and sounds of Spawnite. A game imports a file by name, and the name holds the file's URL:
import { fris } from "@spawnite/assets/avatars";
import { idle, turnLeft } from "@spawnite/assets/animations";The package holds no file. Each name is a URL on https://assets.spawnite.com, so no game's deploy carries a copy. Browse the files, with a live viewer for each, in the asset store.
Install
pnpm add @spawnite/assetsQuickstart
Find a file.
spawnite assets listprints each shared asset with its id, and takes a search word:pnpm exec spawnite assets list robotImport the file by the camelCase of its id:
boss.glbisboss, andturn-left.vrmaisturnLeft.import { boss } from "@spawnite/assets/models";Pass the name wherever the engine or three.js takes a URL. Each name is a
string.
What you can do
The following seven entries cover the seven kinds a game loads by URL:
| Entry | Files |
| ----------------------------- | ------------------------------------------------- |
| @spawnite/assets/avatars | VRM bodies (.vrm) |
| @spawnite/assets/animations | VRM animation clips (.vrma) |
| @spawnite/assets/models | glTF models (.glb) |
| @spawnite/assets/textures | textures and HDR skies (.webp, .ktx2, .hdr) |
| @spawnite/assets/sounds | sounds (.mp3) |
| @spawnite/assets/sprites | pixel sprite sheets (.png) |
| @spawnite/assets/tiles | pixel tile sets (.png) |
The package also exports each avatar's record, each model's measurements and each particle effect as JSON, and each sheet's Aseprite .json and tile set's Tiled .tsj, such as @spawnite/assets/sprites/dungeon/dungeon-knight.json. Assets on the wiki covers those, the cache that lets a game load offline, and the hosts a sandbox must allow.
Where it fits
A game made with spawnite create from a template that names a shared file already has this package. To copy a file into the game instead, so the game's own deploy serves it, run spawnite add asset <id> from @spawnite/cli.
Status
Beta. A release can change the API. spawnite upgrade moves a game to the newest release and prints each change between the two versions.
Documentation
Assets on the wiki covers finding, adding and publishing an asset.
Licences
This package's own files are under the Spawnite License in LICENSE.md. Each shared file keeps the licence spawnite assets list prints for it:
cc0: free for any use, with no attribution.platform: made for Spawnite, under theplatformlicense.royalty-free: free in a game, under the terms itstermslink names, such as an animation from Mixamo under Adobe's terms, with no right to redistribute the file itself.custom: its maker's own terms, which itstermslink names, such as an avatar from VRoid Hub.unknown: a file whose licence nobody recorded.
