Skip to content

Commit

Permalink
Added build files for live demo
Browse files Browse the repository at this point in the history
  • Loading branch information
WestLangley committed Jul 28, 2019
1 parent e09031c commit 1bacebb
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 140 deletions.
145 changes: 75 additions & 70 deletions build/three.js
Original file line number Diff line number Diff line change
Expand Up @@ -2349,6 +2349,8 @@
* @author tschw
*/

var _vector;

function Matrix3() {

this.elements = [
Expand Down Expand Up @@ -2432,29 +2434,25 @@

},

applyToBufferAttribute: function () {

var v1 = new Vector3();

return function applyToBufferAttribute( attribute ) {
applyToBufferAttribute: function ( attribute ) {

for ( var i = 0, l = attribute.count; i < l; i ++ ) {
if ( _vector === undefined ) _vector = new Vector3();

v1.x = attribute.getX( i );
v1.y = attribute.getY( i );
v1.z = attribute.getZ( i );
for ( var i = 0, l = attribute.count; i < l; i ++ ) {

v1.applyMatrix3( this );
_vector.x = attribute.getX( i );
_vector.y = attribute.getY( i );
_vector.z = attribute.getZ( i );

attribute.setXYZ( i, v1.x, v1.y, v1.z );
_vector.applyMatrix3( this );

}
attribute.setXYZ( i, _vector.x, _vector.y, _vector.z );

return attribute;
}

};
return attribute;

}(),
},

multiply: function ( m ) {

Expand Down Expand Up @@ -4825,6 +4823,8 @@
* @author bhouston / http://clara.io
*/

var _matrix, _quaternion;

function Euler( x, y, z, order ) {

this._x = x || 0;
Expand Down Expand Up @@ -5069,41 +5069,33 @@

},

setFromQuaternion: function () {

var matrix = new Matrix4();

return function setFromQuaternion( q, order, update ) {
setFromQuaternion: function ( q, order, update ) {

matrix.makeRotationFromQuaternion( q );
if ( _matrix === undefined ) _matrix = new Matrix4();

return this.setFromRotationMatrix( matrix, order, update );
_matrix.makeRotationFromQuaternion( q );

};
return this.setFromRotationMatrix( _matrix, order, update );

}(),
},

setFromVector3: function ( v, order ) {

return this.set( v.x, v.y, v.z, order || this._order );

},

reorder: function () {
reorder: function ( newOrder ) {

// WARNING: this discards revolution information -bhouston

var q = new Quaternion();

return function reorder( newOrder ) {
if ( _quaternion === undefined ) _quaternion = new Quaternion();

q.setFromEuler( this );
_quaternion.setFromEuler( this );

return this.setFromQuaternion( q, newOrder );

};
return this.setFromQuaternion( _quaternion, newOrder );

}(),
},

equals: function ( euler ) {

Expand Down Expand Up @@ -6807,6 +6799,8 @@
* @author mrdoob / http://mrdoob.com/
*/

var _box;

function Sphere( center, radius ) {

this.center = ( center !== undefined ) ? center : new Vector3();
Expand All @@ -6825,39 +6819,35 @@

},

setFromPoints: function () {
setFromPoints: function ( points, optionalCenter ) {

var box = new Box3();

return function setFromPoints( points, optionalCenter ) {

var center = this.center;
if ( _box === undefined ) _box = new Box3();

if ( optionalCenter !== undefined ) {
var center = this.center;

center.copy( optionalCenter );
if ( optionalCenter !== undefined ) {

} else {
center.copy( optionalCenter );

box.setFromPoints( points ).getCenter( center );
} else {

}
_box.setFromPoints( points ).getCenter( center );

var maxRadiusSq = 0;
}

for ( var i = 0, il = points.length; i < il; i ++ ) {
var maxRadiusSq = 0;

maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( points[ i ] ) );
for ( var i = 0, il = points.length; i < il; i ++ ) {

}
maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( points[ i ] ) );

this.radius = Math.sqrt( maxRadiusSq );
}

return this;
this.radius = Math.sqrt( maxRadiusSq );

};
return this;

}(),
},

clone: function () {

Expand Down Expand Up @@ -14572,7 +14562,7 @@

var meshphong_vert = "#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";

var meshphysical_frag = "#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
var meshphysical_frag = "#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n\tuniform float transparency;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tdiffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";

var meshphysical_vert = "#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";

Expand Down Expand Up @@ -15180,7 +15170,8 @@
ShaderLib.standard.uniforms,
{
clearCoat: { value: 0 },
clearCoatRoughness: { value: 0 }
clearCoatRoughness: { value: 0 },
transparency: { value: 0 }
}
] ),

Expand Down Expand Up @@ -25347,6 +25338,8 @@
uniforms.clearCoat.value = material.clearCoat;
uniforms.clearCoatRoughness.value = material.clearCoatRoughness;

uniforms.transparency.value = material.transparency;

}

function refreshUniformsMatcap( uniforms, material ) {
Expand Down Expand Up @@ -32238,6 +32231,8 @@
this.clearCoat = 0.0;
this.clearCoatRoughness = 0.0;

this.transparency = 0.0;

this.setValues( parameters );

}
Expand All @@ -32258,6 +32253,8 @@
this.clearCoat = source.clearCoat;
this.clearCoatRoughness = source.clearCoatRoughness;

this.transparency = source.transparency;

return this;

};
Expand Down Expand Up @@ -40138,7 +40135,13 @@

var glyph = data.glyphs[ char ] || data.glyphs[ '?' ];

if ( ! glyph ) return;
if ( ! glyph ) {

console.error( 'THREE.Font: character "' + char + '" does not exists in font family ' + data.familyName + '.' );

return;

}

var path = new ShapePath();

Expand Down Expand Up @@ -45158,6 +45161,8 @@
* @author bhouston / http://clara.io
*/

var _startP, _startEnd;

function Line3( start, end ) {

this.start = ( start !== undefined ) ? start : new Vector3();
Expand Down Expand Up @@ -45242,32 +45247,32 @@

},

closestPointToPointParameter: function () {
closestPointToPointParameter: function ( point, clampToLine ) {

var startP = new Vector3();
var startEnd = new Vector3();
if ( _startP === undefined ) {

return function closestPointToPointParameter( point, clampToLine ) {
_startP = new Vector3();
_startEnd = new Vector3();

startP.subVectors( point, this.start );
startEnd.subVectors( this.end, this.start );
}

var startEnd2 = startEnd.dot( startEnd );
var startEnd_startP = startEnd.dot( startP );
_startP.subVectors( point, this.start );
_startEnd.subVectors( this.end, this.start );

var t = startEnd_startP / startEnd2;
var startEnd2 = _startEnd.dot( _startEnd );
var startEnd_startP = _startEnd.dot( _startP );

if ( clampToLine ) {
var t = startEnd_startP / startEnd2;

t = _Math.clamp( t, 0, 1 );
if ( clampToLine ) {

}
t = _Math.clamp( t, 0, 1 );

return t;
}

};
return t;

}(),
},

closestPointToPoint: function ( point, clampToLine, target ) {

Expand Down
Loading

0 comments on commit 1bacebb

Please sign in to comment.