Environment mapping

I've added two new types of environment mapping including equirectangular mapping (commonly used for image-based lighting and HDR environment maps) and sphere mapping.

When a material is built, the texture's mapping type leads affects the defines used in the shader for sampling the environment map. This means that material.needsUpdate must be set to true when an environment map is changed to one with a different mapping (ideally, this would be auto-detected somehow).

I've included a simple example but this may not be necessary as the feature is fairly self-explanatory. Besides that, the sphere mapping example doesn't really fit with the others since sphere-mapping is kind of a view-space cheat (i.e. the reflections are aligned with the view and not with the world). I can remove this example file if you think that's best.
Oh, right. I forgot about that. I was having trouble getting dat.gui to
appear overtop of the page and I ended up using jquery to access the
element and adjust the z-index from code (since dat.gui overrides the
z-index when it is initialized). I'm sure there was a better solution and
I'll look at it again tomorrow morning. I come from a 3D graphics
background and web stuff isn't really my strength :)

On 16 November 2014 20:56, Mr.doob <notifications@github.com> wrote:

> In examples/webgl_environment_maps.html:
>
> > +			.dg { z-index: 100 }
> > +
> > +			#oldie { background:rgb(50,0,0) !important; color:#fff !important; margin-top:7em!important }
> > +		</style>
> > +	</head>
> > +
> > +	<body>
> > +		
> > +		<script src="../build/three.js"></script>
> > +
> > +		<script src="js/loaders/BinaryLoader.js"></script>
> > +
> > +		<script src="js/Detector.js"></script>
> > +		<script src="js/libs/stats.min.js"></script>
> > +		<script src="js/libs/dat.gui.min.js"></script>
> > +		<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
>
> Why is jquery (and internet) needed? :)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/mrdoob/three.js/pull/5622/files#r20415840>.
>