Asset request/response pipeline #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/3-asset-pipeline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements the asset delivery system (closes #3) so the web client can request and receive raw Source engine files from the server.
Server side (native module)
asset_requestJSON messages from WebSocket clientsIFileSystem::Open()— transparently supports VPKs, workshop GMAs, and loose files.mdl,.vtx,.vvd,.vtf,.vmt,.bsp,.phy,.ani,.wav,.mp3), rejects..traversal and absolute pathsMSG_ASSET_DATA(0x10) header with path length + path + raw bytesClient side
AssetCacheclass with IndexedDB persistence and in-memory hot cacheparseBinaryMessage) now dispatches both snapshot and asset binary framesConnection.requestAsset(path)sends JSON requestconnection.onAssetData/connection.onAssetErrorcallbackswindow.__webstreamFoundation for
.bspfiles.mdl/.vtx/.vvd/.vtffilesTest plan
__webstream.assetCache.get('models/props_c17/oildrum001a.mdl')— should request from server and return ArrayBuffer../cfg/server.cfg) — should getasset_errorresponse.lua,.cfg) — should getasset_errorresponse