awv3-protocol v7.5.4
npm install awv3-protocol
▲ API
pack
Raw deflates and base64-encodes an ArrayBuffer
, the result will be a string.
import pack from 'awv3-protocol/pack'
const result = { command: 'Blob', data: pack(arrayBuffer) }
inflate
Inflates a zipped/base64 encoded stream back into string-shape.
import inflate from 'awv3-protocol/inflate'
const result = inflate(stream)
unpack
Unpack raw inflates, base64-decodes blobs ({ command: 'Blob', data: ... }
). It uses multiple cores to deal with several objects at once. The result will be multiple, optimized json objects, containing meshes, lines, materials, meta data and so on. unpack returns a promise, when it resolves object has been fully unpacked.
import unpack from 'awv3-protocol/unpack'
unpack(object, data => ... ).then( ... )
▲ BUILD PRE-REQUISITES
node >= 6.0 (https://nodejs.org/en/download/current/)
npm >= 3.0 (pre-installed by node)
yarn (npm install yarn -g)
▲ INSTALL DEPENDENCIES AND BUILD
yarn
yarn start
▲ TESTING & ALIASING
awv3-protocol build a packed webworker, hence it needs to create a distributable via npm start
. Without this step aliasing to the raw code will cause errors!
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago