Support #142
create and publish node package
0%
Description
Point being, of course, make it easier for web developers to use it.
I did manage to create minified package a year ago or so. But since vrspace client isn't exactly stable, we can't lose the ability to peek into the source, so non-minified source files are a must.
But I failed due to conflicting requirements, IIRC it was something about use of javascript classes.
Remains of my attempts are in babylon dir, unmaintained since: webpack.config.js and package.json.
At the time and for a while, using babylon.js from CDN seemed like a good idea, thus vrspace cdn, max and min.js in js subdir. But babylon 5 turned to be unstable, so I've fixed babylon version to latest release of 4, 4.2.1, in js/lib dir. This, and three other dependencies - openvidu, pep and perlin - may or may not be already available as node packages.
I think we need at least two packages.
First is vrspace-client, with what we have in js/client dir. That one is thin network layer to connect to the server, and doesn't depend on babylon. Could be used for e.g. three.js client.
And the other one is built on top of babylon, everything that is in js/ui dir.
History
Updated by Josip Almasi 11 months ago
- Description updated (diff)
- Status changed from New to In Progress
- Assignee set to Josip Almasi
Updated by Josip Almasi 11 months ago
https://www.npmjs.com/package/@vrspace/babylonjs
This definitely doesn't work yet, as it does not include icons if nothing else.
But it already can be included as e.g.
{ "name": "testme", "version": "1.0.0", "description": "", "main": "index.js", "type": "module", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "@vrspace/babylonjs": "^0.0.2" } }
npm install, then node index.js:
import * as VRSpace from '@vrspace/babylonjs' const world=new VRSpace.World({name:'aWorld'}); console.log('did not fail yet'); console.log(world);