mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 12:22:03 +08:00
1 line
175 KiB
Plaintext
1 line
175 KiB
Plaintext
|
{"version":3,"file":"trois.module.cdn.min.js","sources":["../src/tools.ts","../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/core/Camera.ts","../src/core/OrthographicCamera.ts","../src/core/PerspectiveCamera.ts","../src/core/Scene.ts","../src/core/Object3D.ts","../src/core/Group.ts","../src/core/Raycaster.ts","../src/core/CubeCamera.ts","../src/meshes/Mesh.ts","../src/geometries/Geometry.ts","../src/geometries/BoxGeometry.ts","../src/geometries/CircleGeometry.ts","../src/geometries/ConeGeometry.ts","../src/geometries/CylinderGeometry.ts","../src/geometries/DodecahedronGeometry.ts","../src/geometries/ExtrudeGeometry.ts","../src/geometries/IcosahedronGeometry.ts","../src/geometries/LatheGeometry.ts","../src/geometries/OctahedronGeometry.ts","../src/geometries/PlaneGeometry.ts","../src/geometries/PolyhedronGeometry.ts","../src/geometries/RingGeometry.ts","../src/geometries/SphereGeometry.ts","../src/geometries/ShapeGeometry.ts","../src/geometries/TetrahedronGeometry.ts","../src/geometries/TorusGeometry.ts","../src/geometries/TorusKnotGeometry.ts","../src/geometries/TubeGeometry.ts","../src/lights/Light.ts","../src/lights/AmbientLight.ts","../src/lights/DirectionalLight.ts","../src/lights/HemisphereLight.ts","../src/lights/PointLight.ts","../src/lights/RectAreaLight.ts","../src/lights/SpotLight.ts","../src/materials/Material.ts","../src/materials/MatcapMaterial.ts","../src/materials/ShaderMaterial.ts","../src/materials/SubsurfaceScatteringShader.ts","../src/materials/SubSurfaceMaterial.ts","../src/materials/Texture.ts","../src/materials/CubeTexture.ts","../src/materials/VideoTexture.ts","../src/meshes/Box.ts","../src/meshes/Circle.ts","../src/meshes/Cone.ts","../src/meshes/Cylinder.ts","../src/meshes/Dodecahedron.ts","../src/meshes/Icosahedron.ts","../src/meshes/Lathe.ts","../src/meshes/Octahedron.ts","../src/meshes/Plane.ts","../src/meshes/Polyhedron.ts","../src/meshes/Ring.ts","../src/meshes/Sphere.ts","../src/meshes/Tetrahedron.ts","../src/meshes/Text.ts","../src/meshes/Torus.ts","../src/meshes/TorusKnot.ts","../src/meshes/Tube.ts","../src/meshes/Image.ts","../src/meshes/InstancedMesh.ts","../src/meshes/Sprite.ts","../src/meshes/Points.ts","../src/models/Model.ts","../src/models/GLTF.ts","../src/models/FBX.ts","../src/effects/EffectComposer.ts","../src/effects/EffectPass.ts","../src/effects/RenderPass.ts","../src/effects/BokehPass.ts","../src/effects/FilmPass.ts","../src/effects/FXAAPass.ts","../src/effects/HalftonePass.ts","../src/effects/SMAAPass.ts","../src/effects/SSAOPass.ts","../src/shaders/default.ts","../src/shaders/TiltShift.ts","../src/effects/TiltShiftPass.ts","../src/effects/UnrealBloomPass.ts","../src/shaders/ZoomBlur.ts","../src/effects/ZoomBlurPass.ts","../src/plugin.ts","../src/use/useTextures.ts"],"sourcesContent":["import { ref, toRef, watch, WatchStopHandle } from 'vue'\n\ntype OptionSetter = (dst: any, key: string, value: any) => void\n\nexport function applyObjectProps(\n dst: any,\n options: Record<string, unknown>,\n setter?: OptionSetter\n): void {\n if (options instanceof Object) {\n Object.entries(options).forEach(([key, value]) => {\n if (setter) setter(dst, key, value)\n else dst[key] = value\n })\n }\n}\n\nexport function bindObjectProp(\n src: any,\n prop: string,\n dst: any,\n apply = true,\n setter?: OptionSetter\n): WatchStopHandle {\n if (apply) applyObjectProps(dst, src[prop], setter)\n const r = toRef(src, prop)\n return watch(r, (value) => { applyObjectProps(dst, value, setter) })\n}\n\nexport function bindObjectProps(\n src: any,\n dst: any,\n apply = true,\n setter?: OptionSetter\n): WatchStopHandle {\n if (apply) applyObjectProps(dst, src, setter)\n const r = ref(src)\n return watch(r, (value) => { applyObjectProps(dst, value, setter) }, { deep: true })\n}\n\nexport function setFromProp(o: Record<string, unknown>, prop: Record<string, unknown>): void {\n if (prop instanceof Object) {\n Object.entries(prop).forEach(([key, value]) => {\n o[key] = value\n })\n }\n}\n\ne
|