this plugin will draw simple universe in canvas with three.js
JavaScript HTML
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
dist
src
.babelrc
.gitignore
.npmignore
LICENSE
README.md
bower.json
package.json
webpack.config.js

README.md

universe-bg

a simple universe bg plugin build with three.js

demo

http://html5beta.com/apps/universe.html

install

npm i universe-bg
# or
bower install universe-bg

use

<script src='dist/universe.min.js'></script>
<script>
var uni = new Universe()

// instantiate a loader
var loader = new THREE.TextureLoader()

// load a resource
loader.load(
	// resource URL
	'/_dist/star.png',
	// Function when resource is loaded
	function ( texture ) {
    
                let uni = new Universe({
                        size: 5 //star size
                        ,id: null //id
                        ,starNumber: 10000
                        ,color: 0xffffff
                        ,width: null
                        ,height: null
                        ,container: document.getElementById('wrapper')
                        ,map: texture
                })

	}
)

</script>

or

import Universe from 'universe-bg'
//const Universe = require('universe-bg')

LICENCE

MIT