Skip to content
This repository has been archived by the owner on Dec 6, 2018. It is now read-only.

README edit for npm build #234

Open
cainesap opened this issue Jul 26, 2017 · 5 comments
Open

README edit for npm build #234

cainesap opened this issue Jul 26, 2017 · 5 comments

Comments

@cainesap
Copy link

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
Copy link

jenbhu commented Aug 16, 2017

Yes, had to do the same !

@alfski
Copy link

alfski commented Sep 12, 2017

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
Copy link

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
Copy link

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
Copy link

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
};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants