Three.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. var THREE = { REVISION: '69dev' };
  5. // browserify support
  6. if ( typeof module === 'object' ) {
  7. module.exports = THREE;
  8. }
  9. // GL STATE CONSTANTS
  10. THREE.CullFaceNone = 0;
  11. THREE.CullFaceBack = 1;
  12. THREE.CullFaceFront = 2;
  13. THREE.CullFaceFrontBack = 3;
  14. THREE.FrontFaceDirectionCW = 0;
  15. THREE.FrontFaceDirectionCCW = 1;
  16. // SHADOWING TYPES
  17. THREE.BasicShadowMap = 0;
  18. THREE.PCFShadowMap = 1;
  19. THREE.PCFSoftShadowMap = 2;
  20. // MATERIAL CONSTANTS
  21. // side
  22. THREE.FrontSide = 0;
  23. THREE.BackSide = 1;
  24. THREE.DoubleSide = 2;
  25. // shading
  26. THREE.NoShading = 0;
  27. THREE.FlatShading = 1;
  28. THREE.SmoothShading = 2;
  29. // colors
  30. THREE.NoColors = 0;
  31. THREE.FaceColors = 1;
  32. THREE.VertexColors = 2;
  33. // blending modes
  34. THREE.NoBlending = 0;
  35. THREE.NormalBlending = 1;
  36. THREE.AdditiveBlending = 2;
  37. THREE.SubtractiveBlending = 3;
  38. THREE.MultiplyBlending = 4;
  39. THREE.CustomBlending = 5;
  40. // custom blending equations
  41. // (numbers start from 100 not to clash with other
  42. // mappings to OpenGL constants defined in Texture.js)
  43. THREE.AddEquation = 100;
  44. THREE.SubtractEquation = 101;
  45. THREE.ReverseSubtractEquation = 102;
  46. // custom blending destination factors
  47. THREE.ZeroFactor = 200;
  48. THREE.OneFactor = 201;
  49. THREE.SrcColorFactor = 202;
  50. THREE.OneMinusSrcColorFactor = 203;
  51. THREE.SrcAlphaFactor = 204;
  52. THREE.OneMinusSrcAlphaFactor = 205;
  53. THREE.DstAlphaFactor = 206;
  54. THREE.OneMinusDstAlphaFactor = 207;
  55. // custom blending source factors
  56. //THREE.ZeroFactor = 200;
  57. //THREE.OneFactor = 201;
  58. //THREE.SrcAlphaFactor = 204;
  59. //THREE.OneMinusSrcAlphaFactor = 205;
  60. //THREE.DstAlphaFactor = 206;
  61. //THREE.OneMinusDstAlphaFactor = 207;
  62. THREE.DstColorFactor = 208;
  63. THREE.OneMinusDstColorFactor = 209;
  64. THREE.SrcAlphaSaturateFactor = 210;
  65. // TEXTURE CONSTANTS
  66. THREE.MultiplyOperation = 0;
  67. THREE.MixOperation = 1;
  68. THREE.AddOperation = 2;
  69. // Mapping modes
  70. THREE.UVMapping = function () {};
  71. THREE.CubeReflectionMapping = function () {};
  72. THREE.CubeRefractionMapping = function () {};
  73. THREE.SphericalReflectionMapping = function () {};
  74. THREE.SphericalRefractionMapping = function () {};
  75. // Wrapping modes
  76. THREE.RepeatWrapping = 1000;
  77. THREE.ClampToEdgeWrapping = 1001;
  78. THREE.MirroredRepeatWrapping = 1002;
  79. // Filters
  80. THREE.NearestFilter = 1003;
  81. THREE.NearestMipMapNearestFilter = 1004;
  82. THREE.NearestMipMapLinearFilter = 1005;
  83. THREE.LinearFilter = 1006;
  84. THREE.LinearMipMapNearestFilter = 1007;
  85. THREE.LinearMipMapLinearFilter = 1008;
  86. // Data types
  87. THREE.UnsignedByteType = 1009;
  88. THREE.ByteType = 1010;
  89. THREE.ShortType = 1011;
  90. THREE.UnsignedShortType = 1012;
  91. THREE.IntType = 1013;
  92. THREE.UnsignedIntType = 1014;
  93. THREE.FloatType = 1015;
  94. // Pixel types
  95. //THREE.UnsignedByteType = 1009;
  96. THREE.UnsignedShort4444Type = 1016;
  97. THREE.UnsignedShort5551Type = 1017;
  98. THREE.UnsignedShort565Type = 1018;
  99. // Pixel formats
  100. THREE.AlphaFormat = 1019;
  101. THREE.RGBFormat = 1020;
  102. THREE.RGBAFormat = 1021;
  103. THREE.LuminanceFormat = 1022;
  104. THREE.LuminanceAlphaFormat = 1023;
  105. // Compressed texture formats
  106. THREE.RGB_S3TC_DXT1_Format = 2001;
  107. THREE.RGBA_S3TC_DXT1_Format = 2002;
  108. THREE.RGBA_S3TC_DXT3_Format = 2003;
  109. THREE.RGBA_S3TC_DXT5_Format = 2004;
  110. /*
  111. // Potential future PVRTC compressed texture formats
  112. THREE.RGB_PVRTC_4BPPV1_Format = 2100;
  113. THREE.RGB_PVRTC_2BPPV1_Format = 2101;
  114. THREE.RGBA_PVRTC_4BPPV1_Format = 2102;
  115. THREE.RGBA_PVRTC_2BPPV1_Format = 2103;
  116. */
粤ICP备19079148号