1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 12:22:03 +08:00
trois/build/trois.module.min.js.map

1 line
142 KiB
Plaintext
Raw Normal View History

2021-04-07 03:46:35 +08:00
{"version":3,"file":"trois.module.min.js","sources":["../src/core/usePointer.js","../src/core/useRaycaster.js","../src/core/useThree.js","../src/core/Renderer.js","../src/tools.js","../src/core/Camera.js","../src/core/OrthographicCamera.js","../src/core/PerspectiveCamera.js","../src/core/Object3D.js","../src/core/Group.js","../src/core/Scene.js","../src/core/Raycaster.js","../src/geometries/Geometry.js","../src/geometries/BoxGeometry.js","../src/geometries/CircleGeometry.js","../src/geometries/ConeGeometry.js","../src/geometries/CylinderGeometry.js","../src/geometries/DodecahedronGeometry.js","../src/geometries/IcosahedronGeometry.js","../src/geometries/LatheGeometry.js","../src/geometries/OctahedronGeometry.js","../src/geometries/PlaneGeometry.js","../src/geometries/PolyhedronGeometry.js","../src/geometries/RingGeometry.js","../src/geometries/SphereGeometry.js","../src/geometries/TetrahedronGeometry.js","../src/geometries/TorusGeometry.js","../src/geometries/TorusKnotGeometry.js","../src/geometries/TubeGeometry.js","../src/lights/Light.js","../src/lights/AmbientLight.js","../src/lights/DirectionalLight.js","../src/lights/HemisphereLight.js","../src/lights/PointLight.js","../src/lights/RectAreaLight.js","../src/lights/SpotLight.js","../src/materials/Material.js","../src/materials/BasicMaterial.js","../src/materials/LambertMaterial.js","../src/materials/MatcapMaterial.js","../src/materials/PhongMaterial.js","../src/materials/StandardMaterial.js","../src/materials/PhysicalMaterial.js","../src/materials/ShaderMaterial.js","../src/materials/SubsurfaceScatteringShader.js","../src/materials/SubSurfaceMaterial.js","../src/materials/ToonMaterial.js","../src/materials/Texture.js","../src/materials/CubeTexture.js","../src/meshes/Mesh.js","../src/meshes/Box.js","../src/meshes/Circle.js","../src/meshes/Cone.js","../src/meshes/Cylinder.js","../src/meshes/Dodecahedron.js","../src/meshes/Icosahedron.js","../src/meshes/Lathe.js","../src/meshes/Octahedron.js","../src/meshes/Plane.js","../src/meshes/Polyhedron.js","../src/meshes/Ring.js","../src/meshes/Sphere.js","../src/meshes/Tetrahedron.js","../src/meshes/Text.js","../src/meshes/Torus.js","../src/meshes/TorusKnot.js","../src/meshes/Tube.js","../src/meshes/Image.js","../src/meshes/InstancedMesh.js","../src/meshes/Sprite.js","../src/models/Model.js","../src/models/GLTF.js","../src/models/FBX.js","../src/effects/EffectComposer.js","../src/effects/EffectPass.js","../src/effects/RenderPass.js","../src/effects/BokehPass.js","../src/effects/FilmPass.js","../src/effects/FXAAPass.js","../src/effects/HalftonePass.js","../src/effects/SMAAPass.js","../src/effects/SSAOPass.js","../src/shaders/default.js","../src/shaders/TiltShift.js","../src/effects/TiltShiftPass.js","../src/effects/UnrealBloomPass.js","../src/shaders/ZoomBlur.js","../src/effects/ZoomBlurPass.js","../src/plugin.js"],"sourcesContent":["import { InstancedMesh, Vector2, Vector3 } from 'three';\r\nimport useRaycaster from './useRaycaster';\r\n\r\nexport default function usePointer(options) {\r\n const {\r\n camera,\r\n domElement,\r\n intersectObjects,\r\n touch = true,\r\n resetOnEnd = false,\r\n resetPosition = new Vector2(0, 0),\r\n resetPositionV3 = new Vector3(0, 0, 0),\r\n onEnter = () => {},\r\n onMove = () => {},\r\n onLeave = () => {},\r\n onIntersectEnter = () => {},\r\n onIntersectOver = () => {},\r\n onIntersectMove = () => {},\r\n onIntersectLeave = () => {},\r\n onIntersectClick = () => {},\r\n } = options;\r\n\r\n const position = resetPosition.clone();\r\n const positionN = new Vector2(0, 0);\r\n\r\n const raycaster = useRaycaster({ camera });\r\n const positionV3 = raycaster.position;\r\n\r\n const obj = {\r\n position,\r\n positionN,\r\n positionV3,\r\n intersectObjects,\r\n listeners: false,\r\n addListeners,\r\n removeListeners,\r\n intersect,\r\n };\r\n\r\n return obj;\r\n\r\n function reset() {\r\n position.copy(resetPosition);\r\n positionV3.copy(resetPositionV3);\r\n };\r\n\r\n function updatePosition(event) {\r\n let x, y