@@ -1,5 +1,3 @@
-
var WEBGL = {
isWebGLAvailable: function () {
@@ -12,6 +12,7 @@ import {
SphereBufferGeometry,
Vector3
} from "../../../build/three.module.js";
+
/**
* CCD Algorithm
* - https://sites.google.com/site/auraliusproject/ccd-algorithm
@@ -6,6 +6,7 @@ import {
import { CCDIKSolver } from "../animation/CCDIKSolver.js";
import { MMDPhysics } from "../animation/MMDPhysics.js";
* MMDAnimationHelper handles animation of MMD assets loaded by MMDLoader
* with MMD special features as IK, Grant, and Physics.
* Dependencies
* - Ammo.js https://github.com/kripken/ammo.js
@@ -2,6 +2,7 @@ import {
Curve,
* A bunch of parametric curves
*
@@ -4,6 +4,7 @@ import {
Vector4
import { NURBSUtils } from "../curves/NURBSUtils.js";
* NURBS curve object
* NURBS surface object
Vector3,
* NURBS utils
@@ -1,4 +1,3 @@
* Ascii generation is based on http://www.nihilogic.dk/labs/jsascii/
* Maybe more about this later with a blog post at http://lab4games.net/zz85/blog
@@ -5,6 +5,7 @@ import {
UniformsLib,
UniformsUtils
* Reference: https://en.wikipedia.org/wiki/Cel_shading
@@ -3,6 +3,7 @@ import {
Quaternion,
* peppers ghost effect based on http://www.instructables.com/id/Reflective-Prism/?ALLSTEPS
*/
@@ -8,6 +8,7 @@ import {
MeshBasicMaterial,
MeshLambertMaterial
* https://github.com/gkjohnson/collada-exporter-js
@@ -1,6 +1,7 @@
import {
BufferGeometry
* Export draco compressed files from threejs geometry objects.
import { MMDParser } from "../libs/mmdparser.module.js";
* - mmd-parser https://github.com/takahirox/mmd-parser
Matrix3,
* https://github.com/gkjohnson/ply-exporter-js
BufferGeometry,
* Usage:
* var exporter = new STLExporter();
Matrix4,
* You can use this geometry to create a decal mesh, that serves different kinds of purposes.
* e.g. adding unique details to models, performing dynamic visual environmental changes or covering seams.
@@ -7,6 +7,7 @@ import {
import { SimplexNoise } from "../math/SimplexNoise.js";
* @fileoverview LightningStrike object for creating lightning strikes and voltaic arcs.
ParametricGeometry,
* Experimenting of primitive geometry creation using Surface Parametric equations
* Tessellates the famous Utah teapot database by Martin Newell into triangles.
Frustum,
* This is a class to check whether objects are in a selection area in 3D space
@@ -9,6 +9,7 @@ import {
UVMapping,
UniformsLib
* Uniforms library for RectAreaLight shared webgl shaders
import { LineSegments2 } from "../lines/LineSegments2.js";
import { LineGeometry } from "../lines/LineGeometry.js";
import { LineMaterial } from "../lines/LineMaterial.js";
import { LineSegmentsGeometry } from "../lines/LineSegmentsGeometry.js";
var LineGeometry = function () {
UniformsUtils,
Vector2
* parameters = {
* color: <hex>,
@@ -21,6 +21,7 @@ import {
sRGBEncoding
import { JSZip } from "../libs/jszip.module.min.js";
* 3D Manufacturing Format (3MF) specification: https://3mf.io/specification/
@@ -10,6 +10,7 @@ import {
MeshPhongMaterial
* Description: Early release of an AMF Loader following the pattern of the
* example loaders in the three.js project.
VectorKeyframeTrack
* Description: reads BVH files and outputs a single Skeleton and an AnimationClip
UnsignedByteType
import { Inflate } from "../libs/inflate.module.min.js";
* OpenEXR loader currently supports uncompressed, ZIP(S), RLE, PIZ and DWA/B compression.
* Supports reading as UnsignedByte, HalfFloat and Float type data texture.
@@ -44,6 +44,7 @@ import {
import { NURBSCurve } from "../curves/NURBSCurve.js";
* Loader loads FBX file and generates Group representing FBX scene.
* Requires FBX file to be >= 7.0 and in ASCII or >= 6400 in Binary format
LineSegments,
Loader
* GCodeLoader is used to load gcode files usually used for 3D printing or CNC applications.
CompressedTextureLoader
* for description see https://www.khronos.org/opengles/sdk/tools/KTX/
* for file layout see https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/
@@ -32,6 +32,7 @@ import {
import { TGALoader } from "../loaders/TGALoader.js";
TextureLoader,
* Loads a Wavefront .mtl file specifying materials
Loader,
LoaderUtils
* Description: A THREE loader for PLY ASCII files (known as the Polygon
* File Format or the Stanford Triangle Format).
FileLoader,
* See https://github.com/kchapelier/PRWM for more informations about this file format
RGB_PVRTC_2BPPV1_Format,
RGB_PVRTC_4BPPV1_Format
/*
* PVR v2 (legacy) parser
* TODO : Add Support for PVR v3 format
LoaderUtils,
* Description: A THREE loader for STL ASCII files, as created by Solidworks and other CAD programs.
@@ -13,6 +13,7 @@ import {
MeshPhongMaterial,
TextureLoader
* Autodesk 3DS three.js file loader, based on lib3ds.
import { opentype } from "../libs/opentype.module.min.js";
* Requires opentype.js to be included in the project.
* Loads TTF files and converts them into typeface JSON that can be used directly
Triangle,
* Ported from: https://github.com/maurizzzio/quickhull3d/ by Mauricio Poppe (https://github.com/maurizzzio)
// http://mrl.nyu.edu/~perlin/noise/
var ImprovedNoise = function () {
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
import { ConvexBufferGeometry } from "../geometries/ConvexGeometry.js";
* @fileoverview This class can be used to subdivide a convex Geometry object into pieces.
@@ -11,6 +11,7 @@ import {
ShaderMaterial,
WebGLRenderTarget
* GPUComputationRenderer, based on SimulationRenderer by zz85
import { VolumeSlice } from "../misc/VolumeSlice.js";
* This class had been written to handle the output of the NRRD loader.
* It contains a volume of data and informations about it.
PlaneBufferGeometry,
Texture
* This class has been made to hold a slice of a volume data
* @class
Geometry,
* Simplification Geometry Modifier
* - based on code and technique
Vector2,
* Subdivision Geometry Modifier
* using Loop Subdivision Scheme
Face3
* Break faces with edges longer than maxEdgeLength
* - not recursive
Object3D
import { LightningStrike } from "../geometries/LightningStrike.js";
* @fileoverview Lightning strike object generator
ImmediateRenderObject,
NoColors
* Port of http://webglsamples.org/blob/blob.html
import { Reflector } from "../objects/Reflector.js";
var ReflectorRTT = function ( geometry, options ) {
Mesh,
MeshBasicMaterial
* A shadow Mesh that follows a shadow-casting Mesh in the scene, but is confined to a single plane.
* Based on "A Practical Analytic Model for Daylight"
* aka The Preetham Model, the de facto standard analytic skydome model
@@ -17,6 +17,7 @@ import {
Vector4,
* Work based on :
* http://slayvin.net : Flat mirror for three.js
@@ -14,6 +14,7 @@ import {
import { Refractor } from "../objects/Refractor.js";
* References:
* http://www.valvesoftware.com/publications/2010/siggraph2010_vlachos_waterflow.pdf
@@ -12,6 +12,7 @@ import { Pass } from "../postprocessing/Pass.js";
import { CopyShader } from "../shaders/CopyShader.js";
import { LuminosityShader } from "../shaders/LuminosityShader.js";
import { ToneMapShader } from "../shaders/ToneMapShader.js";
* Generate a texture that represents the luminosity of the current scene, adapted over time
* to simulate the optic nerve responding to the amount of light it is receiving.
import { Pass } from "../postprocessing/Pass.js";
import { BokehShader } from "../shaders/BokehShader.js";
* Depth-of-field post-process with bokeh shader
var ClearPass = function ( clearColor, clearAlpha ) {
import { HalftoneShader } from "../shaders/HalftoneShader.js";
* RGB Halftone pass for three.js effects composer. Requires HalftoneShader.
var MaskPass = function ( scene, camera ) {
var RenderPass = function ( scene, camera, overrideMaterial, clearColor, clearAlpha ) {
@@ -25,6 +25,7 @@ import { DepthLimitedBlurShader } from "../shaders/DepthLimitedBlurShader.js";
import { BlurShaderUtils } from "../shaders/DepthLimitedBlurShader.js";
import { UnpackDepthRGBAShader } from "../shaders/UnpackDepthRGBAShader.js";
* SAO implementation inspired from bhouston previous SAO work
* Supersample Anti-Aliasing Render Pass
import { SSAARenderPass } from "../postprocessing/SSAARenderPass.js";
* Temporal Anti-Aliasing Render Pass
Object3D,
* Based on http://www.emagix.net/academic/mscs-project/item/camera-sync-with-css3-and-webgl-threejs
* ACES Filmic Tone Mapping Shader by Stephen Hill
* source: https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs
* Afterimage shader
* I created this effect inspired by a demo on codepen:
* Simple test shader
* Bleach bypass shader [http://en.wikipedia.org/wiki/Bleach_bypass]
* - based on Nvidia example
* Blend two textures
* Depth-of-field shader with bokeh
* ported from GLSL shader by Martins Upitis
* Brightness and contrast adjustment
* https://github.com/evanw/glfx.js
* Color correction
Color
* Colorify shader
* Convolution shader
* ported from o3d sample to WebGL / GLSL
* Full-screen textured quad shader
* Depth-of-field shader using mipmaps
* - from Matt Handley @applmak
* TODO
* RGB Shift Shader
* Shifts red and blue channels from center in opposite directions
* Dot screen shader
* based on glfx.js sepia shader
* NVIDIA FXAA by Timothy Lottes
* http://timothylottes.blogspot.com/2011/06/fxaa3-source-released.html
* Film grain & scanlines shader
* Focus shader
* based on PaintEffect postprocess from ro.me
* Edge Detection Shader using Frei-Chen filter
* Based on http://rastergrid.com/blog/2011/01/frei-chen-edge-detector
* Based on Nvidia Cg tutorial
* Gamma Correction Shader
* http://en.wikipedia.org/wiki/gamma_correction
Color,
* God-rays (crepuscular rays)
* RGB Halftone shader for three.js.
* NOTE:
* Two pass Gaussian blur filter (horizontal and vertical blur shaders)
* - described in http://www.gamerendering.com/2008/10/11/gaussian-blur-filter-shader/
* Simple fake tilt-shift effect, modulating two pass Gaussian blur (see above) by vertical position
* Hue and saturation adjustment
* Kaleidoscope Shader
* Radial reflection around center point
* Luminosity
* http://en.wikipedia.org/wiki/Luminosity
* Mirror Shader
* Copies half the input to the other half
* Normal map shader
* - compute normals from heightmap
// Parallax Occlusion shaders from
// http://sunandblackcat.com/tipFullView.php?topicid=28
// No tangent-space transforms logic based on