three3d/three library

Classes

AmbientLight
AnimationAction
AnimationClip
AnimationMixer
AnimationObjectGroup
A group of objects that receives a shared animation state.
AnimationUtils
ArrayCamera
ArrowHelper
AxesHelper
BaseBufferAttribute<TData extends NativeArray<num>>
Bone
BooleanKeyframeTrack
A Track of Boolean keyframe values.
Box2
Box3
Box3Helper
BoxGeometry
BoxHelper
BufferAttribute<TData extends NativeArray<num>>
BufferGeometry
BufferGeometryLoader
BufferGeometryParameters
Cache
Camera
CameraHelper
  • shows frustum, line of sight and up of the camera
  • CatmullRomCurve3
    CircleGeometry
    Clock
    Color
    ColorKeyframeTrack
    A Track of keyframe values that represent color.
    ColorManagement
    Composite
    CompressedTexture
    ConeGeometry
    ConvexGeometry
    ConvexHull
    CubeCamera
    CubeTexture
    CubicBezierCurve
    CubicInterpolant
    Fast and simple cubic spline interpolant.
    CubicPoly
    Centripetal CatmullRom Curve - which is useful for avoiding cusps and self-intersections in non-uniform catmull rom curves. http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf
    Curve
    Extensible curve object.
    CurvePath
    CylinderGeometry
    Cylindrical
    Data3DTexture
    DataArrayTexture
    DataTexture
    DataTextureLoader
    Abstract Base class to load generic binary textures formats (rgbe, hdr, ...)
    DataUtils
    DepthTexture
    DirectionalLight
    DirectionalLightHelper
    DirectionalLightShadow
    DiscreteInterpolant
    Interpolant that evaluates to the sample value at the position preceeding the parameter.
    DodecahedronGeometry
    Earcut
    Port from https://github.com/mapbox/earcut (v2.2.2)
    EdgesGeometry
    EllipseCurve
    Euler
    Event
    https://github.com/mrdoob/eventdispatcher.js/
    ExtrudeGeometry
    Face
    Face2
    FileLoader
    Float16BufferAttribute
    Float32BufferAttribute
    Float64BufferAttribute
    Fog
    FogBase
    FogExp2
    Font
    FontLoader
    FramebufferTexture
    Frustum
    GLBufferAttribute
    GridHelper
    Group
    GroupMaterial
    HalfEdge
    HemisphereLight
    HemisphereLightHelper
    HemisphereLightProbe
    HslData
    IcosahedronGeometry
    ImageDataInfo
    ImageElement
    ImageLoader
    ImageUtils
    InstancedBufferAttribute
    InstancedBufferGeometry
    InstancedInterleavedBuffer
    InstancedMesh
    Int16BufferAttribute
    Int32BufferAttribute
    Int8BufferAttribute
    InterleavedBuffer
    InterleavedBufferAttribute
    Interpolant
    Abstract base class of interpolants over parametric samples.
    Intersection
    KeyframeTrack
    LatheGeometry
    Layers
    Light
    LightProbe
    LightShadow
    Line
    Line3
    LinearInterpolant
    LineBasicMaterial
    LineCurve
    LineCurve3
    LineDashedMaterial
    LineLoop
    LineSegments
    Loader
    LoaderUtils
    LoadingManager
    Material
    MaterialLoader
    Math
    MathUtils
    Matrix3
    Matrix4
    Mesh
    MeshBasicMaterial
    MeshDepthMaterial
    MeshDistanceMaterial
    MeshLambertMaterial
    MeshMatcapMaterial
    MeshNormalMaterial
    MeshPhongMaterial
    MeshPhysicalMaterial
    MeshStandardMaterial
    MeshToonMaterial
    MOUSE
    NumberKeyframeTrack
    A Track of numeric keyframe values.
    Object3D
    Object3dMeta
    ObjectLoader
    OctahedronGeometry
    OpenGLTexture
    OrthographicCamera
    ParametricGeometry
    Path
    PerspectiveCamera
    Plane
    PlaneGeometry
    PlaneHelper
    PMREMGenerator
    PointLight
    PointLightHelper
    PointLightShadow
    Points
    PointsMaterial
    PolarGridHelper
    PolyhedronGeometry
    PropertyBinding
    PropertyMixer
    QuadraticBezierCurve
    Quaternion
    QuaternionKeyframeTrack
    A Track of quaternion keyframe values.
    QuaternionLinearInterpolant
    Spherical linear unit quaternion interpolant.
    RawShaderMaterial
    Ray
    Raycaster
    RectAreaLight
    RenderTarget
    RingGeometry
    Scene
    ShaderMaterial
    ShadowMaterial
    Shape
    ShapeGeometry
    ShapePath
    ShapeUtils
    Skeleton
    SkeletonHelper
    SkinnedMesh
    Source
    Sphere
    SphereGeometry
    Spherical
    SphericalHarmonics3
    Primary reference: https://graphics.stanford.edu/papers/envmap/envmap.pdf
    SplineCurve
    SpotLight
    SpotLightHelper
    SpotLightShadow
    Sprite
    SpriteAnimator
    SpriteMaterial
    StereoCamera
    StringKeyframeTrack
    A Track that interpolates Strings
    SVGLoader
    SVGLoaderParser
    SVGLoaderPointsToStroke
    SvgPath
    TetrahedronGeometry
    TextGeometry
    Texture
    TextureLoader
    ThreeHelper
    TorusGeometry
    TorusKnotGeometry
    TOUCH
    Triangle
    TTFFont
    TubeGeometry
    TYPRFont
    Uint16BufferAttribute
    Uint32BufferAttribute
    Uint8BufferAttribute
    Uint8ClampedBufferAttribute
    UniformsUtils
    Vector2
    Vector3
    Vector4
    VectorKeyframeTrack
    A Track of vectored keyframe values.
    VertexList
    VertexNode
    VideoTexture
    WeakMap<K, V>
    A WeakMap lets you garbage-collect its keys. Please note: The key can be garbage-collected, not the value.
    WebGL3DRenderTarget
    WebGLArrayRenderTarget
    WebGLCubeRenderTarget
    WebGLMultipleRenderTargets
    WebGLMultisampleRenderTarget
    WebGLRenderer
    WebGLRenderTarget
    WebGLRenderTargetOptions
    WebXRManager
    WireframeGeometry
    WorldUVGenerator

    Constants

    ACESFilmicToneMapping → const int
    AddEquation → const int
    AdditiveAnimationBlendMode → const int
    AdditiveBlending → const int
    AddOperation → const int
    AlphaFormat → const int
    AlwaysDepth → const int
    AlwaysStencilFunc → const int
    BackSide → const int
    BasicDepthPacking → const int
    BasicShadowMap → const int
    ByteType → const int
    CineonToneMapping → const int
    ClampToEdgeWrapping → const int
    CubeReflectionMapping → const int
    CubeRefractionMapping → const int
    CubeUVReflectionMapping → const int
    CullFaceBack → const int
    CullFaceFront → const int
    CullFaceFrontBack → const int
    CullFaceNone → const int
    CustomBlending → const int
    CustomToneMapping → const int
    DecrementStencilOp → const int
    DecrementWrapStencilOp → const int
    DepthFormat → const int
    DepthStencilFormat → const int
    DoubleSide → const int
    DstAlphaFactor → const int
    DstColorFactor → const int
    DynamicCopyUsage → const int
    DynamicDrawUsage → const int
    DynamicReadUsage → const int
    EqualDepth → const int
    EqualStencilFunc → const int
    EquirectangularReflectionMapping → const int
    EquirectangularRefractionMapping → const int
    FlatShading → const bool
    FloatType → const int
    FrontSide → const int
    GammaEncoding → const int
    GLSL1 → const String
    GLSL3 → const String
    GreaterDepth → const int
    GreaterEqualDepth → const int
    GreaterEqualStencilFunc → const int
    GreaterStencilFunc → const int
    HalfFloatType → const int
    IncrementStencilOp → const int
    IncrementWrapStencilOp → const int
    InterpolateDiscrete → const int
    InterpolateLinear → const int
    InterpolateSmooth → const int
    IntType → const int
    InvertStencilOp → const int
    KeepStencilOp → const int
    LessDepth → const int
    LessEqualDepth → const int
    LessEqualStencilFunc → const int
    LessStencilFunc → const int
    LinearEncoding → const int
    LinearFilter → const int
    LinearMipmapLinearFilter → const int
    LinearMipMapLinearFilter → const int
    LinearMipMapNearestFilter → const int
    LinearMipmapNearestFilter → const int
    LinearSRGBColorSpace → const String
    LinearToneMapping → const int
    LogLuvEncoding → const int
    LoopOnce → const int
    LoopPingPong → const int
    LoopRepeat → const int
    LuminanceAlphaFormat → const int
    LuminanceFormat → const int
    MAX_SAFE_INTEGER → const int
    MaxEquation → const int
    MinEquation → const int
    MirroredRepeatWrapping → const int
    MixOperation → const int
    MultiplyBlending → const int
    MultiplyOperation → const int
    NearestFilter → const int
    NearestMipmapLinearFilter → const int
    NearestMipMapLinearFilter → const int
    NearestMipmapNearestFilter → const int
    NearestMipMapNearestFilter → const int
    NeverDepth → const int
    NeverStencilFunc → const int
    NoBlending → const int
    NoColorSpace → const String
    NormalAnimationBlendMode → const int
    NormalBlending → const int
    NotEqualDepth → const int
    NotEqualStencilFunc → const int
    NoToneMapping → const int
    ObjectSpaceNormalMap → const int
    OneFactor → const int
    OneMinusDstAlphaFactor → const int
    OneMinusDstColorFactor → const int
    OneMinusSrcAlphaFactor → const int
    OneMinusSrcColorFactor → const int
    PCFShadowMap → const int
    PCFSoftShadowMap → const int
    RedFormat → const int
    RedIntegerFormat → const int
    ReinhardToneMapping → const int
    RepeatWrapping → const int
    ReplaceStencilOp → const int
    ReverseSubtractEquation → const int
    REVISION → const String
    RGB_ETC1_Format → const int
    RGB_ETC2_Format → const int
    RGB_PVRTC_2BPPV1_Format → const int
    RGB_PVRTC_4BPPV1_Format → const int
    RGB_S3TC_DXT1_Format → const int
    RGBA_ASTC_10x10_Format → const int
    RGBA_ASTC_10x5_Format → const int
    RGBA_ASTC_10x6_Format → const int
    RGBA_ASTC_10x8_Format → const int
    RGBA_ASTC_12x10_Format → const int
    RGBA_ASTC_12x12_Format → const int
    RGBA_ASTC_4x4_Format → const int
    RGBA_ASTC_5x4_Format → const int
    RGBA_ASTC_5x5_Format → const int
    RGBA_ASTC_6x5_Format → const int
    RGBA_ASTC_6x6_Format → const int
    RGBA_ASTC_8x5_Format → const int
    RGBA_ASTC_8x6_Format → const int
    RGBA_ASTC_8x8_Format → const int
    RGBA_BPTC_Format → const int
    RGBA_ETC2_EAC_Format → const int
    RGBA_PVRTC_2BPPV1_Format → const int
    RGBA_PVRTC_4BPPV1_Format → const int
    RGBA_S3TC_DXT1_Format → const int
    RGBA_S3TC_DXT3_Format → const int
    RGBA_S3TC_DXT5_Format → const int
    RGBADepthPacking → const int
    RGBAFormat → const int
    RGBAIntegerFormat → const int
    RGBDEncoding → const int
    RGBEEncoding → const int
    RGBEFormat → const int
    RGBFormat → const int
    RGBIntegerFormat → const int
    RGBM16Encoding → const int
    RGBM7Encoding → const int
    RGFormat → const int
    RGIntegerFormat → const int
    ShortType → const int
    SmoothShading → const int
    SrcAlphaFactor → const int
    SrcAlphaSaturateFactor → const int
    SrcColorFactor → const int
    SRGBAFormat → const int
    SRGBColorSpace → const String
    sRGBEncoding → const int
    SRGBFormat → const int
    StaticCopyUsage → const int
    StaticDrawUsage → const int
    StaticReadUsage → const int
    StreamCopyUsage → const int
    StreamDrawUsage → const int
    StreamReadUsage → const int
    SubtractEquation → const int
    SubtractiveBlending → const int
    TangentSpaceNormalMap → const int
    TriangleFanDrawMode → const int
    TrianglesDrawMode → const int
    TriangleStripDrawMode → const int
    UnsignedByteType → const int
    UnsignedInt248Type → const int
    UnsignedIntType → const int
    UnsignedShort4444Type → const int
    UnsignedShort5551Type → const int
    UnsignedShort565Type → const int
    UnsignedShortType → const int
    UVMapping → const int
    VSMShadowMap → const int
    WrapAroundEnding → const int
    ZeroCurvatureEnding → const int
    ZeroFactor → const int
    ZeroSlopeEnding → const int
    ZeroStencilOp → const int

    Properties

    comma num
    getter/setter pair
    defaultLoadingManager LoadingManager
    getter/setter pair
    degsToRads double
    getter/setter pair
    deleted int
    getter/setter pair
    digit0 num
    getter/setter pair
    digit9 num
    getter/setter pair
    extraLodSigma List<double>
    getter/setter pair
    fn Map<String, Map<String, double Function(double c)>>
    getter/setter pair
    loading Map
    getter/setter pair
    lodMin int
    This class generates a Prefiltered, Mipmapped Radiance Environment Map (PMREM) from a cubeMap environment texture. This allows different levels of blur to be quickly accessed based on material roughness. It is packed into a special CubeUV format that allows us to perform custom interpolation so that we can support nonlinear formats such as RGBE. Unlike a traditional mipmap chain, it only goes down to the LOD_MIN level (above), and then creates extra even more filtered 'mips' at the same LOD_MIN resolution, associated with higher roughness levels. In this way we maintain resolution to smoothly interpolate diffuse lighting while limiting sampling computation.
    getter/setter pair
    materialId int
    getter/setter pair
    minus num
    getter/setter pair
    period num
    getter/setter pair
    px CubicPoly
    getter/setter pair
    py CubicPoly
    getter/setter pair
    pz CubicPoly
    getter/setter pair
    shaderChunk Map<String, String>
    getter/setter pair
    shaderLib Map<String, dynamic>
    getter/setter pair
    shaderLibStandard Map<String, dynamic>
    getter/setter pair
    space num
    getter/setter pair
    textureFilter Map<String, int>
    getter/setter pair
    textureId int
    getter/setter pair
    textureMapping Map<String, int>
    getter/setter pair
    textureWrapping Map<String, int>
    getter/setter pair
    tmp Vector3
    getter/setter pair
    uniformsLib Map<String, dynamic>
    Uniforms library for shared webgl shaders
    getter/setter pair
    visible int
    Ported from: https://github.com/maurizzzio/quickhull3d/ by Mauricio Poppe (https://github.com/maurizzzio)
    getter/setter pair
    vsmCert String
    getter/setter pair
    vsmFrag String
    getter/setter pair

    Functions

    addContour(dynamic vertices, dynamic contour) → dynamic
    area(dynamic p, dynamic q, dynamic r) → dynamic
    catmullRom(dynamic t, dynamic p0, dynamic p1, dynamic p2, dynamic p3) num
    Bezier Curves formulas obtained from http://en.wikipedia.org/wiki/Bézier_curve
    charAt(String str, int atPos) String
    Strings
    charCodeAt(String str, int atPos) int
    checkBufferGeometryIntersection(Object3D object, Material material, Raycaster raycaster, Ray ray, BufferAttribute<NativeArray<num>> position, dynamic morphPosition, dynamic morphTargetsRelative, dynamic uv, dynamic uv2, int a, int b, int c) Intersection?
    checkIntersection(Object3D object, Material material, Raycaster raycaster, Ray ray, Vector3 pA, Vector3 pB, Vector3 pC, Vector3 point) Intersection?
    cloneUniforms(Map<String, dynamic> src) Map<String, dynamic>
    Uniform Utilities
    compareX(dynamic a, dynamic b) int
    concat(List lists) List
    cubicBezier(dynamic t, dynamic p0, dynamic p1, dynamic p2, dynamic p3) → dynamic
    cubicBezierP0(dynamic t, dynamic p) → dynamic
    cubicBezierP1(dynamic t, dynamic p) → dynamic
    cubicBezierP2(dynamic t, dynamic p) → dynamic
    cubicBezierP3(dynamic t, dynamic p) → dynamic
    cureLocalIntersections(dynamic start, dynamic triangles, dynamic dim) → dynamic
    earcutLinked(Node? ear, dynamic triangles, dynamic dim, dynamic minX, dynamic minY, num? invSize, num? pass) → dynamic
    eliminateHole(dynamic hole, dynamic outerNode) → dynamic
    eliminateHoles(dynamic data, dynamic holeIndices, dynamic outerNode, dynamic dim) → dynamic
    equals(dynamic p1, dynamic p2) → dynamic
    escapeHtml(String html) String
    every(List list, dynamic fn(dynamic e)) bool
    exec(RegExp regex, String str) List<String?>?
    RegEx
    falsey(dynamic value) bool
    filter(List list, dynamic fn(dynamic e)) List
    filterPoints(dynamic start, dynamic end) → dynamic
    findHoleBridge(dynamic hole, dynamic outerNode) → dynamic
    getBoneList(dynamic object) List<Bone>
    getLeftmost(dynamic start) → dynamic
    getTrackTypeForValueTypeName(dynamic typeName) String
    hue2rgb(double p, double q, double t) double
    indexCurve(Node start, dynamic minX, dynamic minY, dynamic invSize) → dynamic
    insertNode(dynamic i, dynamic x, dynamic y, dynamic last) → dynamic
    intersects(dynamic p1, dynamic q1, dynamic p2, dynamic q2) → dynamic
    intersectsPolygon(dynamic a, dynamic b) → dynamic
    isEar(dynamic ear) → dynamic
    isEarHashed(dynamic ear, dynamic minX, dynamic minY, dynamic invSize) → dynamic
    isFinite(num v) bool
    isUniqueEdge(dynamic start, dynamic end, dynamic edges) → dynamic
    isValidDiagonal(dynamic a, dynamic b) → dynamic
    linearToSRGB(double c) double
    linkedList(dynamic data, dynamic start, dynamic end, dynamic dim, dynamic clockwise) → dynamic
    listSetter(List list, int idx, dynamic value) → dynamic
    locallyInside(dynamic a, dynamic b) → dynamic
    mergeUniforms(dynamic uniforms) Map<String, dynamic>
    middleInside(dynamic a, dynamic b) → dynamic
    now() int
    onSegment(dynamic p, dynamic q, dynamic r) → dynamic
    or(dynamic value, dynamic defaultValue) → dynamic
    JS Patterns
    parseFloat(String n) double
    parseKeyframeTrack(dynamic json) → dynamic
    pointInTriangle(dynamic ax, dynamic ay, dynamic bx, dynamic by, dynamic cx, dynamic cy, dynamic px, dynamic py) → dynamic
    pop<T>(List<T> list) → T
    push<T>(List<T> list, T item) int
    quadraticBezier(dynamic t, dynamic p0, dynamic p1, dynamic p2) → dynamic
    quadraticBezierP0(double t, double p) double
    quadraticBezierP1(dynamic t, dynamic p) → dynamic
    quadraticBezierP2(dynamic t, dynamic p) → dynamic
    quote(String str) String
    reduce(List list, dynamic fn(dynamic prev, dynamic curr, int index, List list), [dynamic initialValue]) → dynamic
    reduceRight(List list, dynamic fn(dynamic prev, dynamic curr, int index, List list), [dynamic initialValue]) → dynamic
    removeDupEndPts(dynamic points) → dynamic
    removeNode(dynamic p) → dynamic
    replace(String str, dynamic pattern) String
    reverse<T>(List<T> list) List<T>
    sectorContainsSector(dynamic m, dynamic p) → dynamic
    serializeImage(dynamic image) → dynamic
    setList<T>(List<T> target, List<T> source) → void
    setPoint(dynamic point, dynamic pointMap, dynamic geometry, dynamic camera, double x, double y, double z) → dynamic
    shift<T>(List<T> list) → T
    sign(num num) int
    signedArea(dynamic data, dynamic start, dynamic end, dynamic dim) → dynamic
    slice<T>(List<T> list, int begin, [int? end]) List<T>
    some(List list, dynamic fn(dynamic e)) bool
    sortLinked(dynamic list) → dynamic
    splice(List list, int index, [num howMany = 0, dynamic elements]) List
    Arrays
    splitEarcut(dynamic start, dynamic triangles, dynamic dim, dynamic minX, dynamic minY, dynamic invSize) → dynamic
    splitPolygon(dynamic a, dynamic b) → dynamic
    sRGBToLinear(double c) double
    substr(String str, int start, [int? length]) String
    testPoint(Vector3 point, num index, num localThresholdSq, Matrix4 matrixWorld, Raycaster raycaster, List<Intersection> intersects, Object3D object) → void
    toComponents(dynamic source, dynamic target) → dynamic
    toFixed<T extends num>(T x, int l) String
    toJSON2(dynamic shapes, Map<String, dynamic>? options, dynamic data) → dynamic
    transformVertex(dynamic vertexPosition, Vector3 mvPosition, Vector2 center, dynamic scale, double? sin, double? cos) → void
    trimLeft(String str) String
    trimRight(String str) String
    truthy(dynamic value) bool
    unshift(List list, dynamic item) int
    zOrder(num x0, num y0, num minX, num minY, num invSize) → dynamic