googlearchive / vrview

Library for embedding immersive media into traditional websites.
http://developers.google.com/cardboard/vrview
Apache License 2.0
1.71k stars 1.09k forks source link

README edit for npm build #234

Open cainesap opened 7 years ago

cainesap commented 7 years ago

Hi, For those new to npm (like me), it would be very helpful to add npm install as an instruction in the README before trying to build. Also for me I needed to run: npm install -g polyfills; npm install -g rollup; npm install -g derequire; npm install -g browserify; npm install -g uglify-js Thanks for the great resource!

jenbhu commented 7 years ago

Yes, had to do the same !

alfski commented 6 years ago

Yes do this. Now there's no pre-built vrview.js and the developers.google.com/vr/concepts/vrview-web page directs to github, we need instructions for noobs under 'Building'.

A simple npm install worked for me.

omniviewer360 commented 6 years ago

Hi all, it seems I've also had exactly the same issue. Got to the end of the supplied instructions and instead of a navigable 360 panorama window it was just a black square. Luckily I discovered this thread. Quick question I've followed the above instructions and ran an npm install followed by the above written commands in the CMD window inside the /vrview directory. I still have the black square of no action :-( any thoughts? Cheers!

michelePap commented 6 years ago

Hi, i'm new to the npm build system, what's the correct way to build the library? I have added all the missing packages for npm but i still have some errors: src/third_party/three/Three.js → build/three.js... [!] Error: You must specify options.format, which can be one of 'amd', 'cjs', 'es', 'iife' or 'umd' https://rollupjs.org/#format-f-output-format-

michelePap commented 6 years ago

Solved: need to update rollup.config.js in src/third_party/three/ This:

export default {
    entry: 'src/third_party/three/Three.js',
    dest: 'build/three.js',
    moduleName: 'THREE',
    format: 'umd',
    plugins: [
        glsl()
    ],
    outro: outro
};

become:

export default {
    input: 'src/third_party/three/Three.js',
    output: {
        file: 'build/three.js',
        name: 'THREE',
        format: 'umd',
    },
    plugins: [
        glsl()
    ],
    outro: outro
};