- Object for keeping track of time. This uses <a href="https://developer.mozilla.org/en-US/docs/Web/API/Performance/now">performance.now()</a>
- if it is available, otherwise it reverts to the less accurate <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date/now">Date.now()</a>.
+ Object for keeping track of time. This uses [link:https://developer.mozilla.org/en-US/docs/Web/API/Performance/now performance.now]
+ if it is available, otherwise it reverts to the less accurate [link:https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date/now Date.now].
+ [page:String url] — A string containing the path/URL of the <em>.basis</em> file.<br />
+ [page:Function onLoad] — A function to be called after the loading is successfully completed.<br />
+ [page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, that contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+ [page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives error as an argument.<br />
+ </p>
+ <p>
+ Load from url and call the <em>onLoad</em> function with the transcoded [page:CompressedTexture].
- General information about the Quickhull algorithm: Dirk Gregorius. March 2014, Game Developers Conference: [link:http://media.steampowered.com/apps/valve/2014/DirkGregorius_ImplementingQuickHull.pdf Implementing QuickHull].
+ A convex hull class. Implements the Quickhull algorithm by: Dirk Gregorius. March 2014, Game Developers Conference: [link:http://media.steampowered.com/apps/valve/2014/DirkGregorius_ImplementingQuickHull.pdf Implementing QuickHull].
</p>
</p>
@@ -63,19 +63,19 @@
<p>Creates a face with the vertices 'eyeVertex.point', 'horizonEdge.tail' and 'horizonEdge.head' in CCW order.
<p>Creates a face with the vertices 'eyeVertex.point', 'horizonEdge.tail' and 'horizonEdge.head' in CCW order.
All the half edges are created in CCW order thus the face is always pointing outside the hull</p>
All the half edges are created in CCW order thus the face is always pointing outside the hull</p>
[page:Vector3 eyePoint] - The 3D-coordinates of a point.<br /><br />
[page:Vector3 eyePoint] - The 3D-coordinates of a point.<br /><br />
[page:HalfEdge crossEdge] - The edge used to jump to the current face.<br /><br />
[page:HalfEdge crossEdge] - The edge used to jump to the current face.<br /><br />
[page:Face face] - The current face being tested.<br /><br />
[page:Face face] - The current face being tested.<br /><br />
@@ -107,16 +107,16 @@
<p>Computes a chain of half edges in CCW order called the 'horizon'. For an edge to be part of the horizon it must join a face that can see 'eyePoint' and a face that cannot see 'eyePoint'.</p>
<p>Computes a chain of half edges in CCW order called the 'horizon'. For an edge to be part of the horizon it must join a face that can see 'eyePoint' and a face that cannot see 'eyePoint'.</p>
[page:VertexNode vertex] - The vertex to remove.<br /><br />
[page:VertexNode vertex] - The vertex to remove.<br /><br />
[page:Face face] - The target face.<br /><br />
[page:Face face] - The target face.<br /><br />
<p>Removes a vertex from the 'assigned' list of vertices and from the given face. It also makes sure that the link from 'face' to the first vertex it sees in 'assigned' is linked correctly after the removal.</p>
<p>Removes a vertex from the 'assigned' list of vertices and from the given face. It also makes sure that the link from 'face' to the first vertex it sees in 'assigned' is linked correctly after the removal.</p>
<p>The goal of this section is to give a brief introduction to three.js. We will start by setting up a scene, with a spinning cube. A working example is provided at the bottom of the page in case you get stuck and need help.</p>
<p>The goal of this section is to give a brief introduction to three.js. We will start by setting up a scene, with a spinning cube. A working example is provided at the bottom of the page in case you get stuck and need help.</p>
- "gl_FragColor = linearToOutputTexel( vec4( outgoingLight, diffuseColor.a ) );", // TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
- "gl_FragColor = vec4( outgoingLight, diffuseColor.a );", // TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
- "gl_FragColor = vec4( outgoingLight, diffuseColor.a );", // TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
-
- THREE.ShaderChunk[ "fog_fragment" ],
-
- "}"
-
- ].join( "\n" ),
-
- vertexShader: [
-
- "attribute vec4 tangent;",
-
- "uniform vec2 uRepeatBase;",
-
- "uniform sampler2D tNormal;",
-
- "#ifdef VERTEX_TEXTURES",
-
- "uniform sampler2D tDisplacement;",
- "uniform float uDisplacementScale;",
- "uniform float uDisplacementBias;",
-
- "#endif",
-
- "varying vec3 vTangent;",
- "varying vec3 vBinormal;",
- "varying vec3 vNormal;",
- "varying vec2 vUv;",
-
- "varying vec3 vViewPosition;",
-
- THREE.ShaderChunk[ "shadowmap_pars_vertex" ],
- THREE.ShaderChunk[ "fog_pars_vertex" ],
-
- "void main() {",
-
- "vNormal = normalize( normalMatrix * normal );",
+the [Basis GitHub repository](https://github.com/BinomialLLC/basis_universal). The JavaScript wrapper requires one modification from the version provided in the Basis repository – the declaration on the first line is changed from `var Module` to `Module`, to accomodate lazy initialization in a Web Worker ([details](https://github.com/mrdoob/three.js/issues/16524)).
+ * string, series of ASCII chars followed by null byte (If the length of the string including the null terminating byte is odd, an extra null is added so that the data that follows will begin on an even byte boundary): S0
+ *
+ * COMPOUND DATA TYPES
+ * Variable-length Index (index into an array or collection): U2 or U4 : VX
+ * Color (RGB): F4 + F4 + F4: COL12
+ * Coordinate (x, y, z): F4 + F4 + F4: VEC12
+ * Percentage F4 data type from 0->1 with 1 = 100%: FP4
- // string, series of ASCII chars followed by null byte (If the length of the string including the null terminating byte is odd, an extra null is added so that the data that follows will begin on an even byte boundary): S0
- //
- // COMPOUND DATA TYPES
- // Variable-length Index (index into an array or collection): U2 or U4 : VX
- // Color (RGB): F4 + F4 + F4: COL12
- // Coordinate (x, y, z): F4 + F4 + F4: VEC12
- // Percentage F4 data type from 0->1 with 1 = 100%: FP4
+ " gl_FragColor = linearToOutputTexel( vec4( outgoingLight, diffuseColor.a ) );", // TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
+ " gl_FragColor = vec4( outgoingLight, diffuseColor.a );", // TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
+ "gl_FragColor = vec4( outgoingLight, diffuseColor.a );", // TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
+
+ THREE.ShaderChunk[ "fog_fragment" ],
+
+ "}"
+
+ ].join( "\n" ),
+
+ vertexShader: [
+
+ "attribute vec4 tangent;",
+
+ "uniform vec2 uRepeatBase;",
+
+ "uniform sampler2D tNormal;",
+
+ "#ifdef VERTEX_TEXTURES",
+
+ "uniform sampler2D tDisplacement;",
+ "uniform float uDisplacementScale;",
+ "uniform float uDisplacementBias;",
+
+ "#endif",
+
+ "varying vec3 vTangent;",
+ "varying vec3 vBinormal;",
+ "varying vec3 vNormal;",
+ "varying vec2 vUv;",
+
+ "varying vec3 vViewPosition;",
+
+ THREE.ShaderChunk[ "shadowmap_pars_vertex" ],
+ THREE.ShaderChunk[ "fog_pars_vertex" ],
+
+ "void main() {",
+
+ "vNormal = normalize( normalMatrix * normal );",