three APIs
- Vector3
- Mesh
- Vector2
- Color
- Matrix4
- PerspectiveCamera
- MeshBasicMaterial
- Scene
- ShaderMaterial
- BufferGeometry
- Quaternion
- Object3D
- LineBasicMaterial
- TextureLoader
- EventDispatcher
- DoubleSide
- LineSegments
- FileLoader
- UniformsUtils
- Vector4
- Box3
- Group
- DirectionalLight
- BufferAttribute
- MathUtils
- NearestFilter
- LinearFilter
- Spherical
- OrthographicCamera
- WebGLRenderer
- BackSide
- Float32BufferAttribute
- MeshPhongMaterial
- Points
- MOUSE
- WebGLRenderTarget
- AmbientLight
- MeshStandardMaterial
- PlaneBufferGeometry
- BoxGeometry
- Raycaster
- FrontSide
- Sphere
- Loader
- PointsMaterial
- TOUCH
- sRGBEncoding
- AdditiveBlending
- Line
- RepeatWrapping
- RGBAFormat
- RGBFormat
- Plane
- ClampToEdgeWrapping
- ShaderLib
- UniformsLib
- Clock
- FloatType
- UnsignedByteType
- BoxBufferGeometry
- Euler
- Texture
- VertexColors
- InterleavedBufferAttribute
- Material
- DepthTexture
- PCFSoftShadowMap
- Matrix3
- LinearMipmapLinearFilter
- LoaderUtils
- AnimationClip
- Bone
- PointLight
- QuaternionKeyframeTrack
- Skeleton
- SkinnedMesh
- SpotLight
- VectorKeyframeTrack
- NearestMipmapLinearFilter
- DataTextureLoader
- HalfFloatType
- LinearEncoding
- RawShaderMaterial
- CanvasTexture
- Geometry
- MeshNormalMaterial
- DataTexture
- ShaderChunk
- Shape
- SphereGeometry
- SphereBufferGeometry
- HemisphereLight
- FogExp2
- Box3Helper
- InstancedMesh
- Frustum
- Curve
- MirroredRepeatWrapping
- MeshLambertMaterial
- NumberKeyframeTrack
- PropertyBinding
- InterleavedBuffer
- Interpolant
- InterpolateDiscrete
- InterpolateLinear
- LineLoop
- LinearMipmapNearestFilter
- MeshPhysicalMaterial
- NearestMipmapNearestFilter
- TangentSpaceNormalMap
- TriangleFanDrawMode
- TriangleStripDrawMode
- RGBEEncoding
- RGBEFormat
- NoBlending
- PlaneGeometry
- Face3
- AxesHelper
- Uniform
- MeshDepthMaterial
- RGBADepthPacking
- LuminanceFormat
- DepthStencilFormat
- UnsignedInt248Type
- NearestMipMapLinearFilter
- BufferGeometryLoader
- ExtrudeBufferGeometry
- ShapeBufferGeometry
- InstancedInterleavedBuffer
- Line3
- InstancedBufferGeometry
- WireframeGeometry
- NoColors
- LoadingManager
- CameraHelper
- CylinderBufferGeometry
- TorusBufferGeometry
- GridHelper
- RingBufferGeometry
- DefaultLoadingManager
- Ray
- EquirectangularReflectionMapping
- Uint16BufferAttribute
- TrianglesDrawMode
- LinearMipMapLinearFilter
- BoxHelper
- Triangle
- ShapeGeometry
- JSONLoader
- Path
- CylinderGeometry
- ImageUtils
- CompressedTextureLoader
- RGBA_S3TC_DXT3_Format
- RGBA_S3TC_DXT5_Format
- RGB_ETC1_Format
- RGB_S3TC_DXT1_Format
- CurvePath
- EdgesGeometry
- DynamicDrawUsage
- StaticDrawUsage
- RedFormat
- AddEquation
- CustomBlending
- DstAlphaFactor
- DstColorFactor
- UnsignedShortType
- ZeroFactor
- NormalBlending
- SrcAlphaFactor
- OneMinusSrcAlphaFactor
- UnsignedIntType
- WebGLMultisampleRenderTarget
- Camera
- IcosahedronBufferGeometry
- LineDashedMaterial
- CircleGeometry
OtherRelated APIs
- three#Vector3
- three#MathUtils
- three#Color
- three#NearestFilter
- three#ShaderMaterial
- three#UniformsUtils
- three#DepthTexture
- three#WebGLRenderTarget
- three#RepeatWrapping
- three#FloatType
- three#NoBlending
- three#MeshNormalMaterial
- three#DataTexture
- three#LuminanceFormat
- three#AddEquation
- three#CustomBlending
- three#DstAlphaFactor
- three#DstColorFactor
- three#ZeroFactor
- three#DepthStencilFormat
- three#UnsignedInt248Type
three#RedFormat JavaScript Examples
The following examples show how to use
three#RedFormat.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GlitchPass.js From Computer-Graphics with MIT License | 7 votes |
![]() ![]() |
generateHeightmap( dt_size ) {
const data_arr = new Float32Array( dt_size * dt_size );
const length = dt_size * dt_size;
for ( let i = 0; i < length; i ++ ) {
const val = MathUtils.randFloat( 0, 1 );
data_arr[ i ] = val;
}
const texture = new DataTexture( data_arr, dt_size, dt_size, RedFormat, FloatType );
texture.needsUpdate = true;
return texture;
}
Example #2
Source File: SSAOPass.js From Computer-Graphics with MIT License | 6 votes |
![]() ![]() |
generateRandomKernelRotations() {
const width = 4, height = 4;
if ( SimplexNoise === undefined ) {
console.error( 'THREE.SSAOPass: The pass relies on SimplexNoise.' );
}
const simplex = new SimplexNoise();
const size = width * height;
const data = new Float32Array( size );
for ( let i = 0; i < size; i ++ ) {
const x = ( Math.random() * 2 ) - 1;
const y = ( Math.random() * 2 ) - 1;
const z = 0;
data[ i ] = simplex.noise3d( x, y, z );
}
this.noiseTexture = new DataTexture( data, width, height, RedFormat, FloatType );
this.noiseTexture.wrapS = RepeatWrapping;
this.noiseTexture.wrapT = RepeatWrapping;
this.noiseTexture.needsUpdate = true;
}