程序猿的干货

学习ThreeJS 09 引擎常量

2018-01-01  本文已影响140人  Zszen

Animation

THREE.LoopOnce        //单次
THREE.LoopRepeat     //重复
THREE.LoopPingPong //往返
THREE.InterpolateDiscrete //离散插值
THREE.InterpolateLinear     //线性插值
THREE.InterpolateSmooth  //柔和插值
THREE.ZeroCurvatureEnding
THREE.ZeroSlopeEnding
THREE.WrapAroundEnding

Core

THREE.REV
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
THREE.AddEquation
THREE.SubtractEquation
THREE.ReverseSubtractEquation
THREE.MinEquation
THREE.MaxEquation
THREE.ZeroFactor
THREE.OneFactor
THREE.SrcColorFactor
THREE.OneMinusSrcColorFactor
THREE.SrcAlphaFactor
THREE.OneMinusSrcAlphaFactor
THREE.DstAlphaFactor
THREE.OneMinusDstAlphaFactor
THREE.DstColorFactor
THREE.OneMinusDstColorFactor
THREE.SrcAlphaSaturateFactor
THREE.SrcAlphaSaturateFactor

Draw Mode Constants

//默认, (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

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

WebGLRenderer

webgl渲染器

THREE.CullFaceNone
THREE.CullFaceBack  //默认
THREE.CullFaceFront
THREE.CullFaceFrontBack
THREE.FrontFaceDirectionCW
THREE.FrontFaceDirectionCCW //默认
THREE.BasicShadowMap     //最快, 但影子效果最差
THREE.PCFShadowMap       //默认
THREE.PCFSoftShadowMap //最慢
THREE.NoToneMapping
THREE.LinearToneMapping           //默认
THREE.ReinhardToneMapping
THREE.Uncharted2ToneMapping
THREE.CineonToneMapping

Texture

纹理

THREE.UVMapping  //默认
THREE.CubeReflectionMapping
THREE.CubeRefractionMapping
THREE.EquirectangularReflectionMapping
THREE.EquirectangularRefractionMapping
THREE.SphericalReflectionMapping
THREE.CubeUVReflectionMapping
THREE.CubeUVRefractionMapping
//简单重复
THREE.RepeatWrapping
//拉伸边缘
THREE.ClampToEdgeWrapping
//重复加镜像
THREE.MirroredRepeatWrapping
THREE.NearestFilter  //使用附近色彩
THREE.LinearFilter     //使用线性推算颜色
THREE.NearestFilter
THREE.NearestMipMapNearestFilter
THREE.NearestMipMapLinearFilter
THREE.LinearFilter
THREE.LinearMipMapNearestFilter
THREE.LinearMipMapLinearFilter
THREE.UnsignedByteType
THREE.ByteType
THREE.ShortType
THREE.UnsignedShortType
THREE.IntType
THREE.UnsignedIntType
THREE.FloatType
THREE.HalfFloatType
THREE.UnsignedShort4444Type
THREE.UnsignedShort5551Type
THREE.UnsignedShort565Type
THREE.UnsignedInt248Type
THREE.AlphaFormat
THREE.RGBFormat
THREE.RGBAFormat
THREE.LuminanceFormat
THREE.LuminanceAlphaFormat
THREE.RGBEFormat
THREE.DepthFormat
THREE.DepthStencilFormat
THREE.RGB_S3TC_DXT1_Format
THREE.RGBA_S3TC_DXT1_Format
THREE.RGBA_S3TC_DXT3_Format
THREE.RGBA_S3TC_DXT5_Format
THREE.RGB_PVRTC_4BPPV1_Format
THREE.RGB_PVRTC_2BPPV1_Format
THREE.RGBA_PVRTC_4BPPV1_Format
THREE.RGBA_PVRTC_2BPPV1_Format
THREE.RGB_ETC1_Format
THREE.LinearEncoding
THREE.sRGBEncoding
THREE.GammaEncoding
THREE.RGBEEncoding
THREE.LogLuvEncoding
THREE.RGBM7Encoding
THREE.RGBM16Encoding
THREE.RGBDEncoding
THREE.BasicDepthPacking
THREE.RGBADepthPacking
上一篇下一篇

猜你喜欢

热点阅读