学习ThreeJS 09 引擎常量

Animation

  • loop 循环方式
THREE.LoopOnce        //单次
THREE.LoopRepeat     //重复
THREE.LoopPingPong //往返
  • Interpolation 插值
THREE.InterpolateDiscrete //离散插值
THREE.InterpolateLinear     //线性插值
THREE.InterpolateSmooth  //柔和插值
  • Ending 结束
THREE.ZeroCurvatureEnding
THREE.ZeroSlopeEnding
THREE.WrapAroundEnding

Core

  • reversion number 版本
THREE.REV
  • Mouse Button 鼠标按键
THREE.MOUSE.LEFT
THREE.MOUSE.MIDDLE
THREE.MOUSE.RIGHT

Custom Blending Equation Constants

自定义蒙版效果

var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
material.blending = THREE.CustomBlending;
material.blendEquation = THREE.AddEquation; //default
material.blendSrc = THREE.SrcAlphaFactor; //default
material.blendDst = THREE.OneMinusSrcAlphaFactor; //default
  • Blending Equations 蒙版方程类型
THREE.AddEquation
THREE.SubtractEquation
THREE.ReverseSubtractEquation
THREE.MinEquation
THREE.MaxEquation
  • Source Factors 源因子
THREE.ZeroFactor
THREE.OneFactor
THREE.SrcColorFactor
THREE.OneMinusSrcColorFactor
THREE.SrcAlphaFactor
THREE.OneMinusSrcAlphaFactor
THREE.DstAlphaFactor
THREE.OneMinusDstAlphaFactor
THREE.DstColorFactor
THREE.OneMinusDstColorFactor
THREE.SrcAlphaSaturateFactor
  • Destination Factors 目标因子 (上面的源因子也包含)
THREE.SrcAlphaSaturateFactor

Draw Mode Constants

  • Draw Modes
//默认, (v0, v1, v2), (v2, v3, v5)
THREE.TrianglesDrawMode
//(v0, v1, v2), (v2, v1, v3), (v2, v3, v4)
THREE.TriangleStripDrawMode
//(v0, v1, v2), (v0, v2, v3), (v0, v3, v4)
THREE.TriangleFanDrawMode

Material

  • Side 渲染方向
THREE.FrontSide    //前, 默认
THREE.BackSide    //后
THREE.DoubleSide //双面都渲染
  • Colors 色彩
//默认, 并使用material设置色来覆盖整个对象色彩
THREE.NoColors
//根据每个面颜色
THREE.FaceColors
//顶点色
THREE.VertexColors
  • Blending 蒙版
THREE.NoBlending
THREE.NormalBlending
THREE.AdditiveBlending
THREE.SubtractiveBlending
THREE.MultiplyBlending
THREE.CustomBlending
  • Depth 深度
    如果返回true则被绘制
//永不返回true
THREE.NeverDepth
//永远返回true
THREE.AlwaysDepth
//如果小于某z值则返回true
THREE.LessDepth
THREE.LessEqualDepth
THREE.GreaterEqualDepth
THREE.GreaterDepth
THREE.NotEqualDepth
  • Texture Combine Operations 纹理混合
THREE.MultiplyOperation //默认
THREE.MixOperation         //通过blend混合
THREE.AddOperation        //直接叠加

WebGLRenderer

webgl渲染器

  • Cull Face Modes
THREE.CullFaceNone
THREE.CullFaceBack  //默认
THREE.CullFaceFront
THREE.CullFaceFrontBack
  • Front Face Direction
THREE.FrontFaceDirectionCW
THREE.FrontFaceDirectionCCW //默认
  • Shadow Types 阴影
THREE.BasicShadowMap     //最快, 但影子效果最差
THREE.PCFShadowMap       //默认
THREE.PCFSoftShadowMap //最慢
  • Tone Mapping 色调映射
THREE.NoToneMapping
THREE.LinearToneMapping           //默认
THREE.ReinhardToneMapping
THREE.Uncharted2ToneMapping
THREE.CineonToneMapping

Texture

纹理

  • Mapping Modes 贴图
THREE.UVMapping  //默认
THREE.CubeReflectionMapping
THREE.CubeRefractionMapping
THREE.EquirectangularReflectionMapping
THREE.EquirectangularRefractionMapping
THREE.SphericalReflectionMapping
THREE.CubeUVReflectionMapping
THREE.CubeUVRefractionMapping
  • Wrapping Modes 纹理连接方式
//简单重复
THREE.RepeatWrapping
//拉伸边缘
THREE.ClampToEdgeWrapping
//重复加镜像
THREE.MirroredRepeatWrapping
  • Magnification Filters 放大
THREE.NearestFilter  //使用附近色彩
THREE.LinearFilter     //使用线性推算颜色
  • Minification Filters 缩小
THREE.NearestFilter
THREE.NearestMipMapNearestFilter
THREE.NearestMipMapLinearFilter
THREE.LinearFilter
THREE.LinearMipMapNearestFilter
THREE.LinearMipMapLinearFilter
  • Types
THREE.UnsignedByteType
THREE.ByteType
THREE.ShortType
THREE.UnsignedShortType
THREE.IntType
THREE.UnsignedIntType
THREE.FloatType
THREE.HalfFloatType
THREE.UnsignedShort4444Type
THREE.UnsignedShort5551Type
THREE.UnsignedShort565Type
THREE.UnsignedInt248Type
  • Formats
THREE.AlphaFormat
THREE.RGBFormat
THREE.RGBAFormat
THREE.LuminanceFormat
THREE.LuminanceAlphaFormat
THREE.RGBEFormat
THREE.DepthFormat
THREE.DepthStencilFormat
  • DDS / ST3C Compressed Texture Formats
THREE.RGB_S3TC_DXT1_Format
THREE.RGBA_S3TC_DXT1_Format
THREE.RGBA_S3TC_DXT3_Format
THREE.RGBA_S3TC_DXT5_Format
  • PVRTC Compressed Texture Formats
THREE.RGB_PVRTC_4BPPV1_Format
THREE.RGB_PVRTC_2BPPV1_Format
THREE.RGBA_PVRTC_4BPPV1_Format
THREE.RGBA_PVRTC_2BPPV1_Format
  • ETC Compressed Texture Format
THREE.RGB_ETC1_Format
  • Encoding
THREE.LinearEncoding
THREE.sRGBEncoding
THREE.GammaEncoding
THREE.RGBEEncoding
THREE.LogLuvEncoding
THREE.RGBM7Encoding
THREE.RGBM16Encoding
THREE.RGBDEncoding
THREE.BasicDepthPacking
THREE.RGBADepthPacking

你可能感兴趣的:(学习ThreeJS 09 引擎常量)