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#ImageUtils JavaScript Examples
The following examples show how to use
three#ImageUtils.
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: main.js From architect3d with MIT License | 5 votes |
![]() ![]() |
init()
{
var scope = this;
ImageUtils.crossOrigin = '';
var orthoScale = 100;
var orthoWidth = window.innerWidth;
var orthoHeight = window.innerHeight;
scope.domElement = scope.element.get(0);
scope.fpscamera = new PerspectiveCamera(60, 1, 1, 10000 );
scope.perspectivecamera = new PerspectiveCamera(45, 10, scope.cameraNear, scope.cameraFar);
scope.orthocamera = new OrthographicCamera(orthoWidth / -orthoScale, orthoWidth /orthoScale, orthoHeight /orthoScale, orthoHeight / -orthoScale, scope.cameraNear, scope.cameraFar);
scope.camera = scope.perspectivecamera;
// scope.camera = scope.orthocamera;
scope.renderer = scope.getARenderer();
scope.domElement.appendChild(scope.renderer.domElement);
scope.skybox = new Skybox(scope.scene, scope.renderer);
scope.controls = new OrbitControls(scope.camera, scope.domElement);
scope.controls.autoRotate = this.options['spin'];
scope.controls.enableDamping = true;
scope.controls.dampingFactor = 0.5;
scope.controls.maxPolarAngle = Math.PI * 0.5;
scope.controls.maxDistance = 3000;
scope.controls.minZoom = 0.9;
scope.controls.screenSpacePanning = true;
scope.fpscontrols = new PointerLockControls(scope.fpscamera);
scope.fpscontrols.characterHeight = 160;
this.scene.add(scope.fpscontrols.getObject());
this.fpscontrols.getObject().position.set(0, 200, 0);
this.fpscontrols.addEventListener('unlock', function(){
scope.switchFPSMode(false);
scope.dispatchEvent({type:EVENT_FPS_EXIT});
});
scope.hud = new HUD(scope, scope.scene);
scope.controller = new Controller(scope, scope.model, scope.camera, scope.element, scope.controls, scope.hud);
// handle window resizing
scope.updateWindowSize();
if (scope.options.resize)
{
$(window).resize(() => {scope.updateWindowSize();});
}
// setup camera nicely
scope.centerCamera();
scope.model.floorplan.addEventListener(EVENT_UPDATED, this.updatedevent);
scope.model.addEventListener(EVENT_GLTF_READY, this.gltfreadyevent);
scope.lights = new Lights(scope.scene, scope.model.floorplan);
scope.floorplan = new Floorplan3D(scope.scene, scope.model.floorplan, scope.controls);
function animate()
{
// requestAnimationFrame(animate);
scope.renderer.setAnimationLoop(function(){scope.render();});
scope.render();
}
scope.switchFPSMode(false);
animate();
scope.element.mouseenter(function () {scope.mouseOver = true;}).mouseleave(function () {scope.mouseOver = false;}).click(function () {scope.hasClicked = true;});
}