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\nexport function bindProps(src: any, props: string[], dst: any): void {\n props.forEach(prop => {\n bindProp(src, prop, dst, prop)\n })\n}\n\nexport function bindProp(src: any, srcProp: string, dst: any, dstProp?: string): void {\n const _dstProp = dstProp || srcProp\n const ref = toRef(src, srcProp)\n if (ref.value instanceof Object) {\n setFromProp(dst[_dstProp], ref.value)\n watch(ref, (value) => { setFromProp(dst[_dstProp], value) }, { deep: true })\n } else {\n if (ref.value !== undefined) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record<string, unknown>, exclude: string[] = []): Record<string, unknown> {\n const values: Record<string, unknown> = {}\n Object.entries(props).forEach(([key, value]) => {\n if (!exclude || !exclude.includes(key)) {\n values[key] = value\n }\n })\n return values\n}\n\nexport function lerp(value1: number, value2: number, amount: number): number {\n amount = amount < 0 ? 0 : amount\n amount = amount > 1 ? 1 : amount\n return value1 + (value2 - value1) * amount\n}\n\nexport function limit(val: number, min: number, max: number): number {\n return val < min ? min : (val > max ? max : val)\n}\n\n// from https://github.com/pmndrs/drei/blob/master/src/useMatcapTexture.tsx\nconst MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d'\nconst DEFAULT_MATCAP = '0404E8_0404B5_0404CB_3333FC'\n\nexport function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024): string {\n const fileName = `${hash}${getMatcapFormatString(format)}.png`\n return `${MATCAP_ROOT}/${format}/${fileName}`\n}\n\nfunction getMatcapFormatString(format: number) {\n switch (format) {\n case 64:\n return '-64px'\n case 128:\n return '-128px'\n case 256:\n return '-256px'\n case 512:\n return '-512px'\n default:\n return ''\n }\n}\n","import { Camera, Intersection, Object3D, Plane, Raycaster, Vector2, Vector3 } from 'three'\n\nexport interface RaycasterInterface {\n position: Vector3\n updatePosition(coords: Vector2): void\n intersect(coords: Vector2, objects: Object3D[], recursive?: boolean): Intersection[],\n}\n\nexport interface RaycasterConfigInterface {\n camera: Camera\n resetPosition?: Vector3\n}\n\nexport default function useRaycaster(options: RaycasterConfigInterface): RaycasterInterface {\n const {\n camera,\n resetPosition = new Vector3(0, 0, 0),\n } = options\n\n const raycaster = new Raycaster()\n const position = resetPosition.clone()\n const plane = new Plane(new Vector3(0, 0, 1), 0)\n\n const updatePosition = (coords: Vector2) => {\n raycaster.setFromCamera(coords, camera)\n camera.getWorldDirection(plane.normal)\n raycaster.ray.intersectPlane(plane, position)\n }\n\n const intersect = (coords: Vector2, objects: Object3D[], recursive = false) => {\n raycaster.setFromCamera(coords, camera)\n return raycaster.intersectObjects(objects, recursive)\n }\n\n return {\n position,\n updatePosition,\n intersect,\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { Camera, InstancedMesh, Intersection, Object3D, Vector2, Vector3 } from 'three'\nimport useRaycaster from './useRaycaster'\n\nexport interface PointerEventInterface {\n type: 'pointerenter' | 'pointermove' | 'pointerleave' | 'click'\n position?: Vector2\n positionN?: Vector2\n positionV3?: Vector3\n}\n\nexport interface PointerIntersectEventInterface {\n type: 'pointerenter' | 'pointerover' | 'pointermove' | 'pointerleave' | 'click'\n component: any\n over?: boolean\n intersect?: Intersection\n}\n\nexport type PointerCallbackType = (e: PointerEventInterface) => void\nexport type PointerIntersectCallbackType = (e: PointerIntersectEventInterface) => void\n\nexport interface PointerPublicConfigInterface {\n intersectMode?: 'frame'\n intersectRecursive?: boolean\n touch?: boolean\n resetOnEnd?: boolean\n onEnter?: PointerCallbackType\n onMove?: PointerCallbackType\n onLeave?: PointerCallbackType\n onClick?: PointerCallbackType\n onIntersectEnter?: PointerIntersectCallbackType\n onIntersectOver?: PointerIntersectCallbackType\n onIntersectMove?: PointerIntersectCallbackType\n onIntersectLeave?: PointerIntersectCallbackType\n onIntersectClick?: PointerIntersectCallbackType\n}\n\nexport interface PointerConfigInterface extends PointerPublicConfigInterface {\n camera: Camera\n domElement: HTMLCanvasElement\n intersectObjects: Object3D[] | (() => Object3D[])\n}\n\nexport interface PointerInterface {\n position: Vector2\n positionN: Vector2\n positionV3: Vector3\n intersectObjects: Object3D[] | (() => Object3D[])\n listeners: boolean\n addListeners(cb: void): void\n removeListeners(cb: void): void\n intersect(): void\n}\n\nexport default function usePointer(options: PointerConfigInterface): PointerInterface {\n const {\n camera,\n domElement,\n intersectObjects,\n intersectRecursive = false,\n touch = true,\n resetOnEnd = false,\n onEnter = () => {},\n onMove = () => {},\n onLeave = () => {},\n onClick = () => {},\n onIntersectEnter = () => {},\n onIntersectOver = () => {},\n onIntersectMove = () => {},\n onIntersectLeave = () => {},\n onIntersectClick = () => {},\n } = options\n\n const position = new Vector2(0, 0)\n const positionN = new Vector2(0, 0)\n\n const raycaster = useRaycaster({ camera })\n const positionV3 = raycaster.position\n\n const obj: PointerInterface = {\n position,\n positionN,\n positionV3,\n intersectObjects,\n listeners: false,\n addListeners,\n removeListeners,\n intersect,\n }\n\n return obj\n\n function reset() {\n position.set(0, 0)\n positionN.set(0, 0)\n positionV3.set(0, 0, 0)\n }\n\n function updatePosition(event: TouchEvent | MouseEvent) {\n let x, y\n // @ts-ignore\n if (event.touches && event.touches.length > 0) {\n x = (<TouchEvent>event).touches[0].clientX\n y = (<TouchEvent>event).touches[0].clientY\n } else {\n x = (<MouseEvent>event).clientX\n y = (<MouseEvent>event).clientY\n }\n\n const rect = domElement.getBoundingClientRect()\n position.x = x - rect.left\n position.y = y - rect.top\n positionN.x = (position.x / rect.width) * 2 - 1\n positionN.y = -(position.y / rect.height) * 2 + 1\n raycaster.updatePosition(positionN)\n }\n\n function intersect() {\n const _intersectObjects = getIntersectObjects()\n if (_intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, _intersectObjects, intersectRecursive)\n const offObjects: Object3D[] = [..._intersectObjects]\n const iMeshes: InstancedMesh[] = []\n\n intersects.forEach(intersect => {\n const { object } = intersect\n const component = getComponent(object)\n\n // only once for InstancedMesh\n if (object instanceof InstancedMesh) {\n if (iMeshes.indexOf(object) !== -1) return\n iMeshes.push(object)\n }\n\n if (!object.userData.over) {\n object.userData.over = true\n const overEvent: PointerIntersectEventInterface = { type: 'pointerover', over: true, component, intersect }\n const enterEvent: PointerIntersectEventInterface = { ...overEvent, type: 'pointerenter' }\n onIntersectOver(overEvent)\n onIntersectEnter(enterEvent)\n component?.onPointerOver?.(overEvent)\n component?.onPointerEnter?.(enterEvent)\n }\n\n const moveEvent: PointerIntersectEventInterface = { type: 'pointermove', component, intersect }\n onIntersectMove(moveEvent)\n component?.onPointerMove?.(moveEvent)\n\n offObjects.splice(offObjects.indexOf((<Object3D>object)), 1)\n })\n\n offObjects.forEach(object => {\n const component = getComponent(object)\n if (object.userData.over) {\n object.userData.over = false\n const overEvent: PointerIntersectEventInterface = { type: 'pointerover', over: false, component }\n const leaveEvent: PointerIntersectEventInterface = { ...overEvent, type: 'pointerleave' }\n onIntersectOver(overEvent)\n onIntersectLeave(leaveEvent)\n component?.onPointerOver?.(overEvent)\n component?.onPointerLeave?.(leaveEvent)\n }\n })\n }\n }\n\n function pointerEnter(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n onEnter({ type: 'pointerenter', position, positionN, positionV3 })\n }\n\n function pointerMove(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n onMove({ type: 'pointermove', position, positionN, positionV3 })\n intersect()\n }\n\n function pointerClick(event: TouchEvent | MouseEvent) {\n updatePosition(event)\n const _intersectObjects = getIntersectObjects()\n if (_intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, _intersectObjects, intersectRecursive)\n const iMeshes: InstancedMesh[] = []\n intersects.forEach(intersect => {\n const { object } = intersect\n const component = getComponent(object)\n\n // only once for InstancedMesh\n if (object instanceof InstancedMesh) {\n if (iMeshes.indexOf(object) !== -1) return\n iMeshes.push(object)\n }\n\n const event: PointerIntersectEventInterface = { type: 'click', component, intersect }\n onIntersectClick(event)\n component?.onClick?.(event)\n })\n }\n onClick({ type: 'click', position, positionN, positionV3 })\n }\n\n function pointerLeave() {\n if (resetOnEnd) reset()\n onLeave({ type: 'pointerleave' })\n }\n\n function getComponent(object: Object3D) {\n if (object.userData.component) return object.userData.component\n\n let parent = object.parent\n while (parent) {\n if (parent.userData.component) {\n return parent.userData.component\n }\n parent = parent.parent\n }\n\n return undefined\n }\n\n function getIntersectObjects() {\n if (typeof intersectObjects === 'function') {\n return intersectObjects()\n } else return intersectObjects\n }\n\n function addListeners() {\n domElement.addEventListener('mouseenter', pointerEnter)\n domElement.addEventListener('mousemove', pointerMove)\n domElement.addEventListener('mouseleave', pointerLeave)\n domElement.addEventListener('click', pointerClick)\n if (touch) {\n domElement.addEventListener('touchstart', pointerEnter)\n domElement.addEventListener('touchmove', pointerMove)\n domElement.addEventListener('touchend', pointerLeave)\n }\n obj.listeners = true\n }\n\n function removeListeners() {\n domElement.removeEventListener('mouseenter', pointerEnter)\n domElement.removeEventListener('mousemove', pointerMove)\n domElement.removeEventListener('mouseleave', pointerLeave)\n domElement.removeEventListener('click', pointerClick)\n\n domElement.removeEventListener('touchstart', pointerEnter)\n domElement.removeEventListener('touchmove', pointerMove)\n domElement.removeEventListener('touchend', pointerLeave)\n obj.listeners = false\n }\n}\n","import { Camera, Object3D, OrthographicCamera, PerspectiveCamera, Scene, WebGLRenderer, WebGLRendererParameters } from 'three'\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport usePointer, { PointerConfigInterface, PointerPublicConfigInterface, PointerInterface } from './usePointer'\n\nexport interface SizeInterface {\n width: number\n height: number\n wWidth: number\n wHeight: number\n ratio: number\n}\n\nexport interface ThreeConfigInterface {\n params?: WebGLRendererParameters\n canvas?: HTMLCanvasElement\n antialias: boolean\n alpha: boolean\n autoClear: boolean\n orbitCtrl: boolean | Record<string, unknown>\n pointer: boolean | PointerPublicConfigInterface\n resize: boolean | string\n width?: number\n height?: number\n onResize?(size: SizeInterface): void\n [index:string]: any\n}\n\nexport interface ThreeInterface {\n config: ThreeConfigInterface\n renderer: WebGLRenderer\n composer?: EffectComposer\n camera?: Camera\n cameraCtrl?: OrbitControls\n scene?: Scene\n pointer?: PointerInterface\n size: SizeInterface\n init(): boolean\n dispose(): void\n render(): void\n renderC(): void\n setSize(width: number, height: number): void\n addIntersectObject(o: Object3D): void\n removeIntersectObject(o: Object3D): void\n}\n\n/**\n * Three.js helper\n */\nexport default function useThree(params: ThreeConfigInterface): ThreeInterface {\n // default config\n const config: ThreeConfigInterface = {\n antialias: true,\n alpha: false,\n autoClear: true,\n orbitCtrl: false,\n pointer: false,\n resize: false,\n width: 300,\n height: 150,\n }\n\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n config[key] = value\n })\n }\n\n // size\n const size: SizeInterface = {\n width: 1, height: 1,\n wWidth: 1, wHeight: 1,\n ratio: 1,\n }\n\n const beforeRenderCallbacks: {(): void}[] = []\n\n const intersectObjects: Object3D[] = []\n\n const renderer = createRenderer()\n\n // returned object\n const obj: ThreeInterface = {\n config,\n renderer,\n size,\n init,\n dispose,\n render,\n renderC,\n setSize,\n addIntersectObject, removeIntersectObject,\n }\n\n return obj\n\n /**\n * create WebGLRenderer\n */\n function createRenderer(): WebGLRenderer {\n const renderer = new WebGLRenderer({ canvas: config.canvas, antialias: config.antialias, alpha: config.alpha, ...config.params })\n renderer.autoClear = config.autoClear\n return renderer\n }\n\n /**\n * init three\n */\n function init() {\n if (!obj.scene) {\n console.error('Missing Scene')\n return false\n }\n\n if (!obj.camera) {\n console.error('Missing Camera')\n return false\n }\n\n if (config.resize) {\n onResize()\n window.addEventListener('resize', onResize)\n } else if (config.width && config.height) {\n setSize(config.width, config.height)\n }\n\n initPointer()\n\n if (config.orbitCtrl) {\n const cameraCtrl = new OrbitControls(obj.camera, obj.renderer.domElement)\n if (config.orbitCtrl instanceof Object) {\n Object.entries(config.orbitCtrl).forEach(([key, value]) => {\n // @ts-ignore\n cameraCtrl[key] = value\n })\n }\n onBeforeRender(() => { cameraCtrl.update() })\n obj.cameraCtrl = cameraCtrl\n }\n\n return true\n }\n\n /**\n * init pointer\n */\n function initPointer() {\n let pointerConf: PointerConfigInterface = {\n camera: obj.camera!,\n domElement: obj.renderer!.domElement,\n intersectObjects,\n }\n\n if (config.pointer && config.pointer instanceof Object) {\n pointerConf = { ...pointerConf, ...config.pointer }\n }\n\n const pointer = obj.pointer = usePointer(pointerConf)\n if (config.pointer || intersectObjects.length) {\n pointer.addListeners()\n if (pointerConf.intersectMode === 'frame') {\n onBeforeRender(pointer.intersect)\n }\n }\n }\n\n /**\n * add before render callback\n */\n function onBeforeRender(cb: {(): void}) {\n beforeRenderCallbacks.push(cb)\n }\n\n /**\n * default render\n */\n function render() {\n // if (obj.cameraCtrl) obj.cameraCtrl.update()\n beforeRenderCallbacks.forEach(c => c())\n obj.renderer!.render(obj.scene!, obj.camera!)\n }\n\n /**\n * composer render\n */\n function renderC() {\n // if (obj.cameraCtrl) obj.cameraCtrl.update()\n beforeRenderCallbacks.forEach(c => c())\n obj.composer!.render()\n }\n\n /**\n * add intersect object\n */\n function addIntersectObject(o: Object3D) {\n if (intersectObjects.indexOf(o) === -1) {\n intersectObjects.push(o)\n }\n // add listeners if needed\n if (obj.pointer && !obj.pointer.listeners) {\n obj.pointer.addListeners()\n }\n }\n\n /**\n * remove intersect object\n */\n function removeIntersectObject(o: Object3D) {\n const i = intersectObjects.indexOf(o)\n if (i !== -1) {\n intersectObjects.splice(i, 1)\n }\n // remove listeners if needed\n if (obj.pointer && !config.pointer && intersectObjects.length === 0) {\n obj.pointer.removeListeners()\n }\n }\n\n /**\n * remove listeners and dispose\n */\n function dispose() {\n // beforeRenderCallbacks = []\n window.removeEventListener('resize', onResize)\n if (obj.pointer) obj.pointer.removeListeners()\n if (obj.cameraCtrl) obj.cameraCtrl.dispose()\n if (obj.renderer) obj.renderer.dispose()\n }\n\n /**\n * resize listener\n */\n function onResize() {\n if (config.resize === 'window') {\n setSize(window.innerWidth, window.innerHeight)\n } else {\n const elt = obj.renderer!.domElement.parentNode as Element\n if (elt) setSize(elt.clientWidth, elt.clientHeight)\n }\n config.onResize?.(size)\n }\n\n /**\n * update renderer size and camera\n */\n function setSize(width: number, height: number) {\n size.width = width\n size.height = height\n size.ratio = width / height\n\n obj.renderer!.setSize(width, height, false)\n\n // already done in EffectComposer\n // if (obj.composer) {\n // obj.composer.setSize(width, height)\n // }\n\n const camera = (<Camera>obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (<PerspectiveCamera>camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (<OrthographicCamera>camera)\n size.wWidth = oCamera.right - oCamera.left\n size.wHeight = oCamera.top - oCamera.bottom\n } else {\n const wsize = getCameraSize()\n size.wWidth = wsize[0]\n size.wHeight = wsize[1]\n }\n }\n\n /**\n * calculate camera visible area size\n */\n function getCameraSize() {\n const camera = (<PerspectiveCamera>obj.camera!)\n const vFOV = (camera.fov * Math.PI) / 180\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z)\n const w = h * camera.aspect\n return [w, h]\n }\n}\n","/* eslint-disable no-use-before-define */\nimport { Camera, Scene, WebGLRenderer, WebGLRendererParameters } from 'three'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'\nimport { ComponentPublicInstance, defineComponent, InjectionKey, PropType, watchEffect } from 'vue'\nimport { bindObjectProp } from '../tools'\nimport { PointerInterface, PointerPublicConfigInterface } from './usePointer'\nimport useThree, { SizeInterface, ThreeConfigInterface, ThreeInterface } from './useThree'\n\ntype CallbackType<T> = (event: T) => void\n\n// type EventType = 'init' | 'mounted' | 'beforerender' | 'afterrender' | 'resize'\n\nexport interface EventInterface {\n type: 'init' | 'mounted'\n renderer: RendererInterface\n}\n\nexport interface RenderEventInterface {\n type: 'beforerender' | 'afterrender'\n renderer: RendererInterface\n time: number\n}\n\nexport interface ResizeEventInterface {\n type: 'resize'\n renderer: RendererInterface\n size: SizeInterface\n}\n\ntype InitCallbackType = CallbackType<EventInterface>\ntype MountedCallbackType = CallbackType<EventInterface>\ntype RenderCallbackType = CallbackType<RenderEventInterface>\ntype ResizeCallbackType = CallbackType<ResizeEventInterface>\n// type CallbackTypes = InitCallbackType | MountedCallbackType | RenderCallbackType | ResizeCallbackType\n\n// interface EventMap {\n// 'init': EventInterface;\n// 'mounted': EventInterface;\n// 'beforerender': RenderEventInterface;\n// 'afterrender': RenderEventInterface;\n// 'resize': ResizeEventInterface;\n// }\n\ninterface EventCallbackMap {\n 'init': InitCallbackType;\n 'mounted': MountedCallbackType;\n 'beforerender': RenderCallbackType;\n 'afterrender': RenderCallbackType;\n 'resize': ResizeCallbackType;\n}\n\ninterface RenderFunctionEventInterface {\n renderer: RendererInterface\n time: number\n}\n\ninterface RendererSetupInterface {\n canvas: HTMLCanvasElement\n three: ThreeInterface\n renderer: WebGLRenderer\n size: SizeInterface\n renderFn(e: RenderFunctionEventInterface): void\n raf: boolean\n\n $pointer?: PointerInterface\n\n initCallbacks: InitCallbackType[]\n mountedCallbacks: MountedCallbackType[]\n beforeRenderCallbacks: RenderCallbackType[]\n afterRenderCallbacks: RenderCallbackType[]\n resizeCallbacks: ResizeCallbackType[]\n}\n\nexport interface RendererInterface extends RendererSetupInterface {\n scene?: Scene\n camera?: Camera\n composer?: EffectComposer\n\n onInit(cb: InitCallbackType): void\n onMounted(cb: MountedCallbackType): void\n\n onBeforeRender(cb: RenderCallbackType): void\n offBeforeRender(cb: RenderCallbackType): void\n onAfterRender(cb: RenderCallbackType): void\n offAfterRender(cb: RenderCallbackType): void\n\n onResize(cb: ResizeCallbackType): void\n offResize(cb: ResizeCallbackType): void\n\n addListener<T extends keyof EventCallbackMap>(t: T, cb: EventCallbackMap[T]): void\n removeListener<T extends keyof EventCallbackMap>(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport interface RendererPublicInterface extends ComponentPublicInstance, RendererInterface {}\n\nexport const RendererInjectionKey: InjectionKey<RendererPublicInterface> = Symbol('Renderer')\n\nexport default defineComponent({\n name: 'Renderer',\n props: {\n params: { type: Object as PropType<WebGLRendererParameters>, default: () => ({}) },\n antialias: Boolean,\n alpha: Boolean,\n autoClear: { type: Boolean, default: true },\n orbitCtrl: { type: [Boolean, Object] as PropType<boolean | Record<string, unknown>>, default: false },\n pointer: { type: [Boolean, Object] as PropType<boolean | PointerPublicConfigInterface>, default: false },\n resize: { type: [Boolean, String] as PropType<boolean | string>, default: false },\n shadow: Boolean,\n width: String,\n height: String,\n pixelRatio: Number,\n xr: Boolean,\n props: { type: Object, default: () => ({}) },\n onReady: Function as PropType<(r: RendererInterface) => void>,\n },\n inheritAttrs: false,\n setup(props, { attrs }): RendererSetupInterface {\n const initCallbacks: InitCallbackType[] = []\n const mountedCallbacks: MountedCallbackType[] = []\n const beforeRenderCallbacks: RenderCallbackType[] = []\n const afterRenderCallbacks: RenderCallbackType[] = []\n const resizeCallbacks: ResizeCallbackType[] = []\n\n const canvas = document.createElement('canvas')\n Object.entries(attrs).forEach(([key, value]) => {\n const matches = key.match(/^on([A-Z][a-zA-Z]*)$/)\n if (matches) {\n canvas.addEventListener(matches[1].toLowerCase(), value as {(): void })\n } else {\n canvas.setAttribute(key, value as string)\n }\n })\n\n const config: ThreeConfigInterface = {\n canvas,\n params: props.params,\n antialias: props.antialias,\n alpha: props.alpha,\n autoClear: props.autoClear,\n orbitCtrl: props.orbitCtrl,\n pointer: props.pointer,\n resize: props.resize,\n }\n\n if (props.width) config.width = parseInt(props.width)\n if (props.height) config.height = parseInt(props.height)\n\n const three = useThree(config)\n bindObjectProp(props, 'props', three.renderer)\n\n watchEffect(() => {\n if (props.pixelRatio) three.renderer.setPixelRatio(props.pixelRatio)\n })\n\n const renderFn: {(): void} = () => {}\n\n return {\n canvas,\n three,\n renderer: three.renderer,\n size: three.size,\n renderFn,\n raf: true,\n initCallbacks,\n mountedCallbacks,\n beforeRenderCallbacks,\n afterRenderCallbacks,\n resizeCallbacks,\n }\n },\n computed: {\n camera: {\n get: function(): Camera | undefined { return this.three.camera },\n set: function(camera: Camera): void { this.three.camera = camera },\n },\n scene: {\n get: function(): Scene | undefined { return this.three.scene },\n set: function(scene: Scene): void { this.three.scene = scene },\n },\n composer: {\n get: function(): EffectComposer | undefined { return this.three.composer },\n set: function(composer: EffectComposer): void { this.three.composer = composer },\n },\n },\n provide() {\n return {\n [RendererInjectionKey as symbol]: this,\n }\n },\n mounted() {\n // appendChild won't work on reload\n this.$el.parentNode.insertBefore(this.canvas, this.$el)\n\n if (this.three.init()) {\n if (this.three.pointer) {\n this.$pointer = this.three.pointer\n }\n\n // TODO : don't use config\n this.three.config.onResize = (size) => {\n this.resizeCallbacks.forEach(e => e({ type: 'resize', renderer: this, size }))\n }\n\n if (this.shadow) {\n this.renderer.shadowMap.enabled = true\n }\n\n this.renderFn = this.three.composer ? this.three.renderC : this.three.render\n\n this.initCallbacks.forEach(e => e({ type: 'init', renderer: this }))\n this.onReady?.(this as RendererInterface)\n\n if (this.xr) {\n this.renderer.xr.enabled = true\n this.renderer.setAnimationLoop(this.render)\n } else {\n requestAnimationFrame(this.renderLoop)\n }\n }\n\n this.mountedCallbacks.forEach(e => e({ type: 'mounted', renderer: this }))\n },\n beforeUnmount() {\n this.canvas.remove()\n this.beforeRenderCallbacks = []\n this.afterRenderCallbacks = []\n this.raf = false\n this.three.dispose()\n },\n methods: {\n onInit(cb: InitCallbackType) { this.addListener('init', cb) },\n onMounted(cb: MountedCallbackType) { this.addListener('mounted', cb) },\n onBeforeRender(cb: RenderCallbackType) { this.addListener('beforerender', cb) },\n offBeforeRender(cb: RenderCallbackType) { this.removeListener('beforerender', cb) },\n onAfterRender(cb: RenderCallbackType) { this.addListener('afterrender', cb) },\n offAfterRender(cb: RenderCallbackType) { this.removeListener('afterrender', cb) },\n onResize(cb: ResizeCallbackType) { this.addListener('resize', cb) },\n offResize(cb: ResizeCallbackType) { this.removeListener('resize', cb) },\n\n addListener(type: string, cb: {(e?: any): void}) {\n const callbacks = this.getCallbacks(type)\n callbacks.push(cb)\n },\n\n removeListener(type: string, cb: {(e?: any): void}) {\n const callbacks = this.getCallbacks(type)\n const index = callbacks.indexOf(cb)\n if (index !== -1) callbacks.splice(index, 1)\n },\n\n getCallbacks(type: string) {\n if (type === 'init') {\n return this.initCallbacks\n } else if (type === 'mounted') {\n return this.mountedCallbacks\n } else if (type === 'beforerender') {\n return this.beforeRenderCallbacks\n } else if (type === 'afterrender') {\n return this.afterRenderCallbacks\n } else {\n return this.resizeCallbacks\n }\n },\n\n render(time: number) {\n this.beforeRenderCallbacks.forEach(e => e({ type: 'beforerender', renderer: this, time }))\n // this.onFrame?.(cbParams)\n this.renderFn({ renderer: this, time })\n this.afterRenderCallbacks.forEach(e => e({ type: 'afterrender', renderer: this, time }))\n },\n renderLoop(time: number) {\n if (this.raf) requestAnimationFrame(this.renderLoop)\n this.render(time)\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Renderer',\n})\n","import { defineComponent } from 'vue'\n// import { Camera } from 'three'\n// import { RendererInjectionKey, RendererInterface } from './Renderer'\n// import Object3D from './Object3D'\n\n// export interface CameraSetupInterface {\n// renderer?: RendererInterface\n// camera: Camera\n// }\n\nexport default defineComponent({\n // TODO: eventually extend Object3D\n // extends: Object3D,\n\n props: {\n props: { type: Object, default: () => ({}) },\n },\n\n // inject: { renderer: RendererInjectionKey as symbol },\n\n // setup(): CameraSetupInterface {\n // return {}\n // },\n\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n})\n\nexport function cameraSetProp(camera: any, key: string, value: any, updateProjectionMatrix = true) {\n camera[key] = value\n if (updateProjectionMatrix) camera.updateProjectionMatrix()\n}\n","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { OrthographicCamera } from 'three'\nimport { bindObjectProp, bindProp } from '../tools'\nimport Camera, { cameraSetProp } from './Camera'\nimport { Vector3PropInterface } from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\nexport default defineComponent({\n extends: Camera,\n name: 'OrthographicCamera',\n props: {\n left: { type: Number, default: -1 },\n right: { type: Number, default: 1 },\n top: { type: Number, default: 1 },\n bottom: { type: Number, default: -1 },\n near: { type: Number, default: 0.1 },\n far: { type: Number, default: 2000 },\n zoom: { type: Number, default: 1 },\n position: { type: Object as PropType<Vector3PropInterface>, default: () => ({ x: 0, y: 0, z: 0 }) },\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n const camera = new OrthographicCamera(props.left, props.right, props.top, props.bottom, props.near, props.far)\n renderer.camera = camera\n\n bindProp(props, 'position', camera)\n bindObjectProp(props, 'props', camera, true, cameraSetProp);\n\n ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom'].forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n cameraSetProp(camera, p, value)\n })\n })\n\n return { renderer, camera }\n },\n __hmrId: 'OrthographicCamera',\n})\n","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { PerspectiveCamera } from 'three'\nimport { bindObjectProp, bindProp } from '../tools'\nimport Camera, { cameraSetProp } from './Camera'\nimport { Vector3PropInterface } from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\nexport default defineComponent({\n extends: Camera,\n name: 'PerspectiveCamera',\n props: {\n aspect: { type: Number, default: 1 },\n far: { type: Number, default: 2000 },\n fov: { type: Number, default: 50 },\n near: { type: Number, default: 0.1 },\n position: { type: Object as PropType<Vector3PropInterface>, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType<Vector3PropInterface>, default: null },\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n const camera = new PerspectiveCamera(props.fov, props.aspect, props.near, props.far)\n renderer.camera = camera\n\n bindProp(props, 'position', camera)\n\n if (props.lookAt) camera.lookAt(props.lookAt.x ?? 0, props.lookAt.y, props.lookAt.z)\n watch(() => props.lookAt, (v) => { camera.lookAt(v.x ?? 0, v.y, v.z) }, { deep: true })\n\n bindObjectProp(props, 'props', camera, true, cameraSetProp);\n\n ['aspect', 'far', 'fov', 'near'].forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n cameraSetProp(camera, p, value)\n })\n })\n\n return { renderer, camera }\n },\n __hmrId: 'PerspectiveCamera',\n})\n","import { defineComponent, inject, InjectionKey, provide, watch } from 'vue'\nimport { Scene, Color, Object3D, Texture } from 'three'\nimport { RendererInjectionKey } from './Renderer'\n\nexport const SceneInjectionKey: InjectionKey<Scene> = Symbol('Scene')\n\nexport default defineComponent({\n name: 'Scene',\n props: {\n background: [String, Number, Object],\n },\n setup(props) {\n const renderer = inject(RendererInjectionKey)\n const scene = new Scene()\n\n if (!renderer) {\n console.error('Renderer not found')\n return\n }\n\n renderer.scene = scene\n provide(SceneInjectionKey, scene)\n\n const setBackground = (value: any): void => {\n if (!value) return\n if (typeof value === 'string' || typeof value === 'number') {\n if (scene.background instanceof Color) scene.background.set(value)\n else scene.background = new Color(value)\n } else if (value instanceof Texture) {\n scene.background = value\n }\n }\n\n setBackground(props.background)\n watch(() => props.background, setBackground)\n\n const add = (o: Object3D): void => { scene.add(o) }\n const remove = (o: Object3D): void => { scene.remove(o) }\n\n return { scene, add, remove }\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Scene',\n})\n","import { Object3D, Scene } from 'three'\nimport { ComponentPublicInstance, defineComponent, getCurrentInstance, PropType, watch } from 'vue'\nimport { bindObjectProp, bindProp } from '../tools'\nimport { RendererInjectionKey, RendererInterface } from './Renderer'\nimport { SceneInjectionKey } from './Scene'\n\nexport interface Object3DSetupInterface {\n renderer?: RendererInterface\n scene?: Scene\n o3d?: Object3D\n parent?: ComponentPublicInstance\n}\n\nexport interface Object3DInterface extends Object3DSetupInterface {\n addToParent(o?: Object3D): boolean\n removeFromParent(o?: Object3D): boolean\n add(o: Object3D): void\n remove(o: Object3D): void\n}\n\nexport interface Object3DPublicInterface extends ComponentPublicInstance, Object3DInterface {}\n\n// export function object3DSetup(): Object3DSetupInterface {\n// const renderer = inject(RendererInjectionKey)\n// const scene = inject(SceneInjectionKey)\n// return { scene, renderer }\n// }\n\nexport const pointerProps = {\n onPointerEnter: Function,\n onPointerOver: Function,\n onPointerMove: Function,\n onPointerLeave: Function,\n onPointerDown: Function,\n onPointerUp: Function,\n onClick: Function,\n}\n\nexport interface Vector2PropInterface {\n x?: number\n y?: number\n width?: number\n height?: number\n}\n\nexport interface Vector3PropInterface extends Vector2PropInterface {\n z?: number\n}\n\nexport interface EulerPropInterface extends Vector3PropInterface {\n order?: 'XYZ' | 'YZX' | 'ZXY' | 'XZY' | 'YXZ' | 'ZYX'\n}\n\nexport default defineComponent({\n name: 'Object3D',\n // inject for sub components\n inject: {\n renderer: RendererInjectionKey as symbol,\n scene: SceneInjectionKey as symbol,\n },\n emits: ['created', 'ready'],\n props: {\n position: { type: Object as PropType<Vector3PropInterface>, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType<EulerPropInterface>, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType<Vector3PropInterface>, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType<Vector3PropInterface>, default: null },\n userData: { type: Object, default: () => ({}) },\n visible: { type: Boolean, default: true },\n props: { type: Object, default: () => ({}) },\n disableAdd: { type: Boolean, default: false },\n disableRemove: { type: Boolean, default: false },\n ...pointerProps,\n },\n setup(): Object3DSetupInterface {\n // return object3DSetup()\n return {}\n },\n created() {\n if (!this.renderer) {\n console.error('Missing parent Renderer')\n }\n if (!this.scene) {\n console.error('Missing parent Scene')\n }\n },\n unmounted() {\n if (!this.disableRemove) this.removeFromParent()\n if (this.o3d) {\n if (this.renderer) this.renderer.three.removeIntersectObject(this.o3d)\n }\n },\n methods: {\n initObject3D(o3d: Object3D) {\n this.o3d = o3d\n o3d.userData.component = this\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n if (this.renderer) this.renderer.three.addIntersectObject(o3d)\n }\n\n bindProp(this, 'position', o3d)\n bindProp(this, 'rotation', o3d)\n bindProp(this, 'scale', o3d)\n bindProp(this, 'userData', o3d.userData)\n bindProp(this, 'visible', o3d)\n\n bindObjectProp(this, 'props', o3d)\n\n this.$emit('created', o3d)\n\n if (this.lookAt) o3d.lookAt(this.lookAt.x ?? 0, this.lookAt.y, this.lookAt.z)\n watch(() => this.lookAt, (v) => { o3d.lookAt(v.x ?? 0, v.y, v.z) }, { deep: true })\n\n this.parent = this.getParent()\n if (!this.disableAdd) {\n if (this.addToParent()) this.$emit('ready', this)\n else console.error('Missing parent (Scene, Group...)')\n }\n },\n getParent(): undefined | ComponentPublicInstance {\n let parent = this.$parent\n\n if (!parent) {\n // for script setup\n const instance = getCurrentInstance() as any // ctx is internal\n if (instance && instance.parent) parent = instance.parent.ctx\n }\n\n while (parent) {\n if ((parent as any).add) return parent\n parent = parent.$parent\n }\n return undefined\n },\n addToParent(o?: Object3D) {\n const o3d = o || this.o3d\n if (this.parent) {\n (this.parent as any).add(o3d)\n return true\n }\n return false\n },\n removeFromParent(o?: Object3D) {\n const o3d = o || this.o3d\n if (this.parent) {\n (this.parent as any).remove(o3d)\n return true\n }\n return false\n },\n add(o: Object3D) { this.o3d?.add(o) },\n remove(o: Object3D) { this.o3d?.remove(o) },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Object3D',\n})\n","import { defineComponent } from 'vue'\nimport { Group } from 'three'\nimport Object3D from './Object3D'\n\nexport default defineComponent({\n name: 'Group',\n extends: Object3D,\n setup() {\n return {\n group: new Group(),\n }\n },\n created() {\n this.initObject3D(this.group)\n },\n __hmrId: 'Group',\n})\n","import { defineComponent, inject, PropType } from 'vue'\nimport usePointer, { PointerInterface, PointerIntersectCallbackType } from './usePointer'\nimport { RendererInjectionKey, RendererInterface } from './Renderer'\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst emptyCallBack: PointerIntersectCallbackType = () => {}\n\ninterface RaycasterSetupInterface {\n renderer?: RendererInterface\n pointer?: PointerInterface\n}\n\nexport default defineComponent({\n name: 'Raycaster',\n props: {\n onPointerEnter: { type: Function as PropType<PointerIntersectCallbackType>, default: emptyCallBack },\n onPointerOver: { type: Function as PropType<PointerIntersectCallbackType>, default: emptyCallBack },\n onPointerMove: { type: Function as PropType<PointerIntersectCallbackType>, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType<PointerIntersectCallbackType>, default: emptyCallBack },\n onClick: { type: Function as PropType<PointerIntersectCallbackType>, default: emptyCallBack },\n intersectMode: { type: String, default: 'move' },\n intersectRecursive: { type: Boolean, default: false },\n },\n setup(): RaycasterSetupInterface {\n const renderer = inject(RendererInjectionKey)\n return { renderer }\n },\n mounted() {\n if (!this.renderer) {\n console.error('Renderer not found')\n return\n }\n const renderer = this.renderer\n\n this.renderer.onMounted(() => {\n if (!renderer.camera) return\n\n this.pointer = usePointer({\n camera: renderer.camera,\n domElement: renderer.canvas,\n intersectObjects: () => renderer.scene ? renderer.scene.children : [],\n intersectRecursive: this.intersectRecursive,\n onIntersectEnter: this.onPointerEnter,\n onIntersectOver: this.onPointerOver,\n onIntersectMove: this.onPointerMove,\n onIntersectLeave: this.onPointerLeave,\n onIntersectClick: this.onClick,\n })\n this.pointer.addListeners()\n\n if (this.intersectMode === 'frame') {\n renderer.onBeforeRender(this.pointer.intersect)\n }\n })\n },\n unmounted() {\n if (this.pointer) {\n this.pointer.removeListeners()\n this.renderer?.offBeforeRender(this.pointer.intersect)\n }\n },\n render() {\n return []\n },\n __hmrId: 'Raycaster',\n})\n","import { defineComponent, inject, onUnmounted, PropType } from 'vue'\nimport { CubeCamera, LinearMipmapLinearFilter, Mesh, RGBAFormat, WebGLCubeRenderTarget } from 'three'\nimport Object3D from './Object3D'\nimport { RendererInjectionKey } from './Renderer'\n\ninterface CubeCameraSetupInterface {\n cubeRT?: WebGLCubeRenderTarget\n cubeCamera?: CubeCamera\n updateRT?: {(): void}\n}\n\nexport default defineComponent({\n extends: Object3D,\n props: {\n cubeRTSize: { type: Number, default: 256 },\n cubeCameraNear: { type: Number, default: 0.1 },\n cubeCameraFar: { type: Number, default: 2000 },\n autoUpdate: Boolean,\n hideMeshes: { type: Array as PropType<Mesh[]>, default: () => ([]) },\n },\n setup(props): CubeCameraSetupInterface {\n const rendererC = inject(RendererInjectionKey)\n if (!rendererC || !rendererC.scene) {\n console.error('Missing Renderer / Scene')\n return {}\n }\n\n const renderer = rendererC.renderer, scene = rendererC.scene\n const cubeRT = new WebGLCubeRenderTarget(props.cubeRTSize, { format: RGBAFormat, generateMipmaps: true, minFilter: LinearMipmapLinearFilter })\n const cubeCamera = new CubeCamera(props.cubeCameraNear, props.cubeCameraFar, cubeRT)\n const updateRT = () => {\n props.hideMeshes.forEach(m => { m.visible = false })\n cubeCamera.update(renderer, scene)\n props.hideMeshes.forEach(m => { m.visible = true })\n }\n\n if (props.autoUpdate) {\n rendererC.onBeforeRender(updateRT)\n onUnmounted(() => { rendererC.offBeforeRender(updateRT) })\n } else {\n rendererC.onMounted(updateRT)\n }\n\n return { cubeRT, cubeCamera, updateRT }\n },\n created() {\n if (this.cubeCamera) this.initObject3D(this.cubeCamera)\n },\n render() {\n return []\n },\n __hmrId: 'CubeCamera',\n})\n","import { ComponentPropsOptions, ComponentPublicInstance, defineComponent, InjectionKey, watch } from 'vue'\nimport { BufferGeometry, Material, Mesh as TMesh } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nexport interface MeshSetupInterface extends Object3DSetupInterface {\n mesh?: TMesh\n geometry?: BufferGeometry\n material?: Material | Material[]\n loading?: boolean\n}\n\nexport interface MeshInterface extends MeshSetupInterface {\n setGeometry(g: BufferGeometry): void\n setMaterial(m: Material): void\n}\n\nexport interface MeshPublicInterface extends ComponentPublicInstance, MeshInterface {}\n\nexport const MeshInjectionKey: InjectionKey<MeshPublicInterface> = Symbol('Mesh')\n\nconst Mesh = defineComponent({\n name: 'Mesh',\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n },\n setup(): MeshSetupInterface {\n return {}\n },\n provide() {\n return {\n [MeshInjectionKey as symbol]: this,\n }\n },\n mounted() {\n // TODO : proper ?\n if (!this.mesh && !this.loading) this.initMesh()\n },\n methods: {\n initMesh() {\n const mesh = new TMesh(this.geometry, this.material)\n\n bindProp(this, 'castShadow', mesh)\n bindProp(this, 'receiveShadow', mesh)\n\n this.mesh = mesh\n this.initObject3D(mesh)\n },\n createGeometry() {},\n addGeometryWatchers(props: Readonly<ComponentPropsOptions>) {\n Object.keys(props).forEach(prop => {\n // @ts-ignore\n watch(() => this[prop], () => {\n this.refreshGeometry()\n })\n })\n },\n setGeometry(geometry: BufferGeometry) {\n this.geometry = geometry\n if (this.mesh) this.mesh.geometry = geometry\n },\n setMaterial(material: Material | Material[]) {\n if (Array.isArray(material) || !this.material) {\n this.material = material\n if (this.mesh) this.mesh.material = material\n } else {\n let prev = this.material\n if (Array.isArray(prev)) {\n prev.push(material)\n } else {\n prev = [prev, material]\n }\n this.material = prev\n if (this.mesh) this.mesh.material = prev\n }\n },\n refreshGeometry() {\n const oldGeo = this.geometry\n this.createGeometry()\n if (this.mesh && this.geometry) this.mesh.geometry = this.geometry\n oldGeo?.dispose()\n },\n },\n unmounted() {\n // for predefined mesh (geometry/material are not unmounted)\n if (this.geometry) this.geometry.dispose()\n if (this.material) {\n if (Array.isArray(this.material)) {\n for (const m of this.material) m.dispose()\n } else {\n this.material.dispose()\n }\n }\n },\n __hmrId: 'Mesh',\n})\n\nexport default Mesh\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function meshComponent<P extends Readonly<ComponentPropsOptions>>(\n name: string,\n props: P,\n createGeometry: {(c: any): BufferGeometry}\n) {\n return defineComponent({\n name,\n extends: Mesh,\n props,\n created() {\n this.createGeometry()\n this.addGeometryWatchers(props)\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n },\n })\n}\n","import { ComponentPropsOptions, defineComponent, PropType, watch } from 'vue'\nimport { BufferAttribute, BufferGeometry } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface GeometrySetupInterface {\n mesh?: MeshInterface\n geometry?: BufferGeometry\n watchProps?: string[]\n}\n\nexport interface GeometryAttributeInterface {\n name: string\n array: ArrayLike<number>\n itemSize: number\n normalized?: boolean\n}\n\n// function defaultSetup(): GeometryInterface {\n// const mesh = inject('mesh') as MeshInterface\n// const watchProps: string[] = []\n// return { mesh, watchProps }\n// }\n\nconst Geometry = defineComponent({\n emits: ['created'],\n props: {\n rotateX: Number,\n rotateY: Number,\n rotateZ: Number,\n attributes: { type: Array as PropType<Array<GeometryAttributeInterface>>, default: () => ([]) },\n },\n // inject for sub components\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n setup(): GeometrySetupInterface {\n return {}\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh')\n return\n }\n\n this.createGeometry()\n this.rotateGeometry()\n if (this.geometry) this.mesh.setGeometry(this.geometry)\n\n Object.keys(this.$props).forEach(prop => {\n // @ts-ignore\n watch(() => this[prop], this.refreshGeometry)\n })\n },\n unmounted() {\n this.geometry?.dispose()\n },\n methods: {\n createGeometry() {\n const bufferAttributes: Record<string, unknown> = {}\n const geometry = new BufferGeometry()\n this.attributes.forEach(attribute => {\n if (attribute.name && attribute.itemSize && attribute.array) {\n const bufferAttribute = bufferAttributes[attribute.name] = new BufferAttribute(attribute.array, attribute.itemSize, attribute.normalized)\n geometry.setAttribute(attribute.name, bufferAttribute)\n }\n })\n geometry.computeBoundingBox()\n geometry.userData.component = this\n this.geometry = geometry\n this.$emit('created', geometry)\n },\n rotateGeometry() {\n if (!this.geometry) return\n if (this.rotateX) this.geometry.rotateX(this.rotateX)\n if (this.rotateY) this.geometry.rotateY(this.rotateY)\n if (this.rotateZ) this.geometry.rotateZ(this.rotateZ)\n },\n refreshGeometry() {\n const oldGeo = this.geometry\n this.createGeometry()\n this.rotateGeometry()\n if (this.geometry && this.mesh) this.mesh.setGeometry(this.geometry)\n oldGeo?.dispose()\n },\n },\n render() { return [] },\n})\n\nexport default Geometry\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function geometryComponent<P extends Readonly<ComponentPropsOptions>>(\n name: string,\n props: P,\n createGeometry: {(c: any): BufferGeometry}\n) {\n return defineComponent({\n name,\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n this.geometry.userData.component = this\n this.$emit('created', this.geometry)\n },\n },\n })\n}\n","import { geometryComponent } from './Geometry'\nimport { BoxGeometry } from 'three'\n\nexport const props = {\n size: Number,\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n depth: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n depthSegments: { type: Number, default: 1 },\n} as const\n\nexport function createGeometry(comp: any): BoxGeometry {\n if (comp.size) {\n return new BoxGeometry(comp.size, comp.size, comp.size, comp.widthSegments, comp.heightSegments, comp.depthSegments)\n } else {\n return new BoxGeometry(comp.width, comp.height, comp.depth, comp.widthSegments, comp.heightSegments, comp.depthSegments)\n }\n}\n\nexport default geometryComponent('BoxGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { CircleGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n segments: { type: Number, default: 8 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): CircleGeometry {\n return new CircleGeometry(comp.radius, comp.segments, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('CircleGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { ConeGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): ConeGeometry {\n return new ConeGeometry(comp.radius, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('ConeGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { CylinderGeometry } from 'three'\n\nexport const props = {\n radiusTop: { type: Number, default: 1 },\n radiusBottom: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n heightSegments: { type: Number, default: 1 },\n openEnded: { type: Boolean, default: false },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): CylinderGeometry {\n return new CylinderGeometry(comp.radiusTop, comp.radiusBottom, comp.height, comp.radialSegments, comp.heightSegments, comp.openEnded, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('CylinderGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { DodecahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): DodecahedronGeometry {\n return new DodecahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('DodecahedronGeometry', props, createGeometry)\n","import { PropType } from 'vue'\nimport { geometryComponent } from './Geometry'\nimport { ExtrudeGeometry, ExtrudeGeometryOptions, Shape } from 'three'\n\nexport const props = {\n shapes: { type: [Object, Array] as PropType<Shape | Shape[]> },\n options: { type: Object as PropType<ExtrudeGeometryOptions> },\n} as const\n\nexport function createGeometry(comp: any): ExtrudeGeometry {\n return new ExtrudeGeometry(comp.shapes, comp.options)\n}\n\nexport default geometryComponent('ExtrudeGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { IcosahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): IcosahedronGeometry {\n return new IcosahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('IcosahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { LatheGeometry } from 'three'\n\nexport const props = {\n points: Array,\n segments: { type: Number, default: 12 },\n phiStart: { type: Number, default: 0 },\n phiLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): LatheGeometry {\n return new LatheGeometry(comp.points, comp.segments, comp.phiStart, comp.phiLength)\n}\n\nexport default geometryComponent('LatheGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { OctahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): OctahedronGeometry {\n return new OctahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('OctahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { PlaneGeometry } from 'three'\n\nexport const props = {\n width: { type: Number, default: 1 },\n height: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n} as const\n\nexport function createGeometry(comp: any): PlaneGeometry {\n return new PlaneGeometry(comp.width, comp.height, comp.widthSegments, comp.heightSegments)\n}\n\nexport default geometryComponent('PlaneGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { PolyhedronGeometry } from 'three'\n\nexport const props = {\n vertices: Array,\n indices: Array,\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): PolyhedronGeometry {\n return new PolyhedronGeometry(comp.vertices, comp.indices, comp.radius, comp.detail)\n}\n\nexport default geometryComponent('PolyhedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { RingGeometry } from 'three'\n\nexport const props = {\n innerRadius: { type: Number, default: 0.5 },\n outerRadius: { type: Number, default: 1 },\n thetaSegments: { type: Number, default: 8 },\n phiSegments: { type: Number, default: 1 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): RingGeometry {\n return new RingGeometry(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('RingGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { SphereGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n widthSegments: { type: Number, default: 12 },\n heightSegments: { type: Number, default: 12 },\n phiStart: { type: Number, default: 0 },\n phiLength: { type: Number, default: Math.PI * 2 },\n thetaStart: { type: Number, default: 0 },\n thetaLength: { type: Number, default: Math.PI },\n} as const\n\nexport function createGeometry(comp: any): SphereGeometry {\n return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments, comp.phiStart, comp.phiLength, comp.thetaStart, comp.thetaLength)\n}\n\nexport default geometryComponent('SphereGeometry', props, createGeometry)\n","import { PropType } from 'vue'\nimport { geometryComponent } from './Geometry'\nimport { Shape, ShapeGeometry } from 'three'\n\nexport const props = {\n shapes: { type: [Object, Array] as PropType<Shape | Shape[]> },\n curveSegments: { type: Number },\n} as const\n\nexport function createGeometry(comp: any): ShapeGeometry {\n return new ShapeGeometry(comp.shapes, comp.curveSegments)\n}\n\nexport default geometryComponent('ShapeGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TetrahedronGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n detail: { type: Number, default: 0 },\n} as const\n\nexport function createGeometry(comp: any): TetrahedronGeometry {\n return new TetrahedronGeometry(comp.radius, comp.detail)\n}\n\nexport default geometryComponent('TetrahedronGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TorusGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n radialSegments: { type: Number, default: 8 },\n tubularSegments: { type: Number, default: 6 },\n arc: { type: Number, default: Math.PI * 2 },\n} as const\n\nexport function createGeometry(comp: any): TorusGeometry {\n return new TorusGeometry(comp.radius, comp.tube, comp.radialSegments, comp.tubularSegments, comp.arc)\n}\n\nexport default geometryComponent('TorusGeometry', props, createGeometry)\n","import { geometryComponent } from './Geometry'\nimport { TorusKnotGeometry } from 'three'\n\nexport const props = {\n radius: { type: Number, default: 1 },\n tube: { type: Number, default: 0.4 },\n tubularSegments: { type: Number, default: 64 },\n radialSegments: { type: Number, default: 8 },\n p: { type: Number, default: 2 },\n q: { type: Number, default: 3 },\n} as const\n\nexport function createGeometry(comp: any): TorusKnotGeometry {\n return new TorusKnotGeometry(comp.radius, comp.tube, comp.tubularSegments, comp.radialSegments, comp.p, comp.q)\n}\n\nexport default geometryComponent('TorusKnotGeometry', props, createGeometry)\n","import { defineComponent } from 'vue'\nimport { CatmullRomCurve3, Curve, TubeGeometry, Vector3 } from 'three'\nimport Geometry from './Geometry'\n\nexport const props = {\n points: Array,\n path: Curve,\n tubularSegments: { type: Number, default: 64 },\n radius: { type: Number, default: 1 },\n radialSegments: { type: Number, default: 8 },\n closed: { type: Boolean, default: false },\n} as const\n\nexport function createGeometry(comp: any): TubeGeometry {\n let curve\n if (comp.points) {\n curve = new CatmullRomCurve3(comp.points)\n } else if (comp.path) {\n curve = comp.path\n } else {\n console.error('Missing path curve or points.')\n }\n return new TubeGeometry(curve, comp.tubularSegments, comp.radius, comp.radiusSegments, comp.closed)\n}\n\nexport default defineComponent({\n extends: Geometry,\n props,\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n // update points (without using prop, faster)\n updatePoints(points: Vector3[]) {\n updateTubeGeometryPoints(this.geometry as TubeGeometry, points)\n },\n },\n})\n\nexport function updateTubeGeometryPoints(tube: TubeGeometry, points: Vector3[]): void {\n const curve = new CatmullRomCurve3(points)\n const { radialSegments, radius, tubularSegments, closed } = tube.parameters\n const frames = curve.computeFrenetFrames(tubularSegments, closed)\n tube.tangents = frames.tangents\n tube.normals = frames.normals\n tube.binormals = frames.binormals\n tube.parameters.path = curve\n\n const pAttribute = tube.getAttribute('position')\n const nAttribute = tube.getAttribute('normal')\n\n const normal = new Vector3()\n const P = new Vector3()\n\n for (let i = 0; i < tubularSegments; i++) {\n updateSegment(i)\n }\n updateSegment(tubularSegments)\n\n tube.attributes.position.needsUpdate = true\n tube.attributes.normal.needsUpdate = true\n\n function updateSegment(i: number) {\n curve.getPointAt(i / tubularSegments, P)\n const N = frames.normals[i]\n const B = frames.binormals[i]\n for (let j = 0; j <= radialSegments; j++) {\n const v = j / radialSegments * Math.PI * 2\n const sin = Math.sin(v)\n const cos = -Math.cos(v)\n normal.x = (cos * N.x + sin * B.x)\n normal.y = (cos * N.y + sin * B.y)\n normal.z = (cos * N.z + sin * B.z)\n normal.normalize()\n const index = (i * (radialSegments + 1) + j)\n nAttribute.setXYZ(index, normal.x, normal.y, normal.z)\n pAttribute.setXYZ(index, P.x + radius * normal.x, P.y + radius * normal.y, P.z + radius * normal.z)\n }\n }\n}\n","import { DirectionalLight, Light, SpotLight } from 'three'\nimport { defineComponent, PropType, watch } from 'vue'\nimport Object3D, { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp, setFromProp } from '../tools'\n\nexport interface LightSetupInterface {\n light?: Light\n}\n\nexport default defineComponent({\n extends: Object3D,\n name: 'Light',\n props: {\n color: { type: String, default: '#ffffff' },\n intensity: { type: Number, default: 1 },\n castShadow: { type: Boolean, default: false },\n shadowMapSize: { type: Object as PropType<Vector2PropInterface>, default: () => ({ x: 512, y: 512 }) },\n shadowCamera: { type: Object, default: () => ({}) },\n },\n setup(): LightSetupInterface {\n return {}\n },\n unmounted() {\n if (this.light instanceof SpotLight || this.light instanceof DirectionalLight) {\n this.removeFromParent(this.light.target)\n }\n },\n methods: {\n initLight(light: Light) {\n this.light = light\n\n if ((light as any).shadow) {\n light.castShadow = this.castShadow\n // @ts-ignore\n setFromProp(light.shadow.mapSize, this.shadowMapSize)\n // @ts-ignore\n setFromProp(light.shadow.camera, this.shadowCamera)\n }\n\n ['color', 'intensity', 'castShadow'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'color') {\n light.color.set(value)\n } else {\n // @ts-ignore\n light[p] = value\n }\n })\n })\n\n this.initObject3D(light)\n\n if (light instanceof SpotLight || light instanceof DirectionalLight) {\n bindProp(this, 'target', light.target, 'position')\n this.addToParent(light.target)\n }\n },\n },\n __hmrId: 'Light',\n})\n","import { defineComponent } from 'vue'\nimport { AmbientLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n created() {\n this.initLight(new AmbientLight(this.color, this.intensity))\n },\n __hmrId: 'AmbientLight',\n})\n","import { defineComponent, PropType } from 'vue'\nimport { DirectionalLight } from 'three'\nimport { Vector3PropInterface } from '../core/Object3D'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n target: { type: Object as PropType<Vector3PropInterface>, default: () => ({ x: 0, y: 0, z: 0 }) },\n },\n created() {\n this.initLight(new DirectionalLight(this.color, this.intensity))\n },\n __hmrId: 'DirectionalLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { HemisphereLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n groundColor: { type: String, default: '#444444' },\n },\n created() {\n const light = new HemisphereLight(this.color, this.groundColor, this.intensity)\n watch(() => this.groundColor, (value) => { light.groundColor.set(value) })\n this.initLight(light)\n },\n __hmrId: 'HemisphereLight',\n})\n","import { defineComponent } from 'vue'\nimport { PointLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n distance: { type: Number, default: 0 },\n decay: { type: Number, default: 1 },\n },\n created() {\n this.initLight(new PointLight(this.color, this.intensity, this.distance, this.decay))\n },\n __hmrId: 'PointLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { RectAreaLight } from 'three'\nimport { RectAreaLightUniformsLib } from 'three/examples/jsm/lights/RectAreaLightUniformsLib.js'\nimport { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n width: { type: Number, default: 10 },\n height: { type: Number, default: 10 },\n helper: Boolean,\n },\n created() {\n RectAreaLightUniformsLib.init()\n const light = new RectAreaLight(this.color, this.intensity, this.width, this.height)\n\n const watchProps = ['width', 'height']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { light[p] = value })\n })\n\n if (this.helper) {\n const lightHelper = new RectAreaLightHelper(light)\n light.add(lightHelper)\n }\n\n this.initLight(light)\n },\n __hmrId: 'RectAreaLight',\n})\n","import { defineComponent, watch } from 'vue'\nimport { SpotLight } from 'three'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n angle: { type: Number, default: Math.PI / 3 },\n decay: { type: Number, default: 1 },\n distance: { type: Number, default: 0 },\n penumbra: { type: Number, default: 0 },\n target: Object,\n },\n created() {\n const light = new SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay)\n\n const watchProps = ['angle', 'decay', 'distance', 'penumbra']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { light[p] = value })\n })\n\n this.initLight(light)\n },\n __hmrId: 'SpotLight',\n})\n","import { ComponentPropsOptions, ComponentPublicInstance, defineComponent, InjectionKey, PropType, watch } from 'vue'\nimport { Color, Material, MeshBasicMaterial, MeshLambertMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, PointsMaterial as TPointsMaterial, Texture, ShadowMaterial as TShadowMaterial } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\nimport { bindObjectProp, propsValues } from '../tools'\nimport { BasicMaterialPropsInterface, LambertMaterialPropsInterface, MaterialPropsInterface, PhongMaterialPropsInterface, PhysicalMaterialPropsInterface, PointsMaterialPropsInterface, StandardMaterialPropsInterface, ToonMaterialPropsInterface } from './types'\n\nexport interface MaterialSetupInterface {\n mesh?: MeshInterface\n material?: Material\n createMaterial?(): Material\n}\n\nexport interface MaterialInterface extends MaterialSetupInterface {\n setTexture(texture: Texture | null, key: string): void\n}\n\nexport interface MaterialPublicInterface extends ComponentPublicInstance, MaterialInterface {}\n\nexport const MaterialInjectionKey: InjectionKey<MaterialPublicInterface> = Symbol('Material')\n\nconst BaseMaterial = defineComponent({\n emits: ['created'],\n props: {\n color: { type: String, default: '#ffffff' },\n props: { type: Object as PropType<MaterialPropsInterface>, default: () => ({}) },\n },\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n setup(): MaterialSetupInterface {\n return {}\n },\n provide() {\n return {\n [MaterialInjectionKey as symbol]: this,\n }\n },\n created() {\n if (!this.mesh) {\n console.error('Missing parent Mesh')\n return\n }\n\n if (this.createMaterial) {\n const material = this.material = this.createMaterial()\n // @ts-ignore\n watch(() => this.color, (value) => { material.color.set(value) })\n bindObjectProp(this, 'props', material, false, this.setProp)\n this.$emit('created', material)\n this.mesh.setMaterial(material)\n }\n },\n unmounted() {\n this.material?.dispose()\n },\n methods: {\n getMaterialParams() {\n return { ...propsValues(this.$props, ['props']), ...this.props }\n },\n setProp(material: any, key: string, value: any, needsUpdate = false) {\n const dstVal = material[key]\n if (dstVal instanceof Color) dstVal.set(value)\n else material[key] = value\n material.needsUpdate = needsUpdate\n },\n setTexture(texture: Texture | null, key = 'map') {\n this.setProp(this.material, key, texture, true)\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Material',\n})\n\nexport default BaseMaterial\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function materialComponent<P extends Readonly<ComponentPropsOptions>>(\n name: string,\n props: P,\n createMaterial: {(opts: any): Material}\n) {\n return defineComponent({\n name,\n extends: BaseMaterial,\n props,\n methods: {\n createMaterial() {\n return createMaterial(this.getMaterialParams())\n },\n },\n })\n}\n\n// TODO : proper\nexport const BasicMaterial = materialComponent('BasicMaterial', { props: { type: Object as PropType<BasicMaterialPropsInterface>, default: () => ({}) } }, (opts) => new MeshBasicMaterial(opts))\nexport const LambertMaterial = materialComponent('LambertMaterial', { props: { type: Object as PropType<LambertMaterialPropsInterface>, default: () => ({}) } }, (opts) => new MeshLambertMaterial(opts))\nexport const PhongMaterial = materialComponent('PhongMaterial', { props: { type: Object as PropType<PhongMaterialPropsInterface>, default: () => ({}) } }, (opts) => new MeshPhongMaterial(opts))\nexport const PhysicalMaterial = materialComponent('PhysicalMaterial', { props: { type: Object as PropType<PhysicalMaterialPropsInterface>, default: () => ({}) } }, (opts) => new MeshPhysicalMaterial(opts))\nexport const PointsMaterial = materialComponent('PointsMaterial', { props: { type: Object as PropType<PointsMaterialPropsInterface>, default: () => ({}) } }, (opts) => new TPointsMaterial(opts))\nexport const ShadowMaterial = materialComponent('ShadowMaterial', { color: { type: String, default: '#000000' }, props: { type: Object as PropType<MaterialPropsInterface>, default: () => ({}) } }, (opts) => new TShadowMaterial(opts))\nexport const StandardMaterial = materialComponent('StandardMaterial', { props: { type: Object as PropType<StandardMaterialPropsInterface>, default: () => ({}) } }, (opts) => new MeshStandardMaterial(opts))\nexport const ToonMaterial = materialComponent('ToonMaterial', { props: { type: Object as PropType<ToonMaterialPropsInterface>, default: () => ({}) } }, (opts) => new MeshToonMaterial(opts))\n","import { MeshMatcapMaterial, TextureLoader } from 'three'\nimport { propsValues, getMatcapUrl } from '../tools'\nimport { materialComponent } from './Material'\n\nexport default materialComponent(\n 'MatcapMaterial',\n {\n src: String,\n name: { type: String, default: '0404E8_0404B5_0404CB_3333FC' },\n },\n (opts) => {\n const src = opts.src ? opts.src : getMatcapUrl(opts.name)\n const params = propsValues(opts, ['src', 'name'])\n params.matcap = new TextureLoader().load(src)\n return new MeshMatcapMaterial(params)\n }\n)\n","import { ShaderMaterial } from 'three'\nimport { materialComponent } from './Material'\nimport { propsValues } from '../tools'\n\nconst defaultVertexShader = `\n varying vec2 vUv;\n void main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n }\n`\n\nconst defaultFragmentShader = `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);\n }\n`\n\nexport default materialComponent(\n 'ShaderMaterial',\n {\n props: { type: Object, default: () => ({\n uniforms: {},\n vertexShader: defaultVertexShader,\n fragmentShader: defaultFragmentShader,\n }) },\n },\n (opts) => new ShaderMaterial(propsValues(opts, ['color']))\n)\n","/**\n * ------------------------------------------------------------------------------------------\n * Subsurface Scattering shader\n * Based on three/examples/jsm/shaders/SubsurfaceScatteringShader.js\n * Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look\n * https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/\n *------------------------------------------------------------------------------------------\n */\nimport {\n Color,\n ShaderChunk,\n ShaderLib,\n UniformsUtils,\n} from 'three'\n\nfunction replaceAll(string: string, find: string, replace: string) {\n return string.split(find).join(replace)\n}\n\nconst meshphongFragHead = ShaderChunk.meshphong_frag.slice(0, ShaderChunk.meshphong_frag.indexOf('void main() {'))\nconst meshphongFragBody = ShaderChunk.meshphong_frag.slice(ShaderChunk.meshphong_frag.indexOf('void main() {'))\n\nconst SubsurfaceScatteringShader = {\n\n uniforms: UniformsUtils.merge([\n ShaderLib.phong.uniforms,\n {\n thicknessColor: { value: new Color(0xffffff) },\n thicknessDistortion: { value: 0.1 },\n thicknessAmbient: { value: 0.0 },\n thicknessAttenuation: { value: 0.1 },\n thicknessPower: { value: 2.0 },\n thicknessScale: { value: 10.0 },\n },\n ]),\n\n vertexShader: `\n #define USE_UV\n ${ShaderChunk.meshphong_vert}\n `,\n\n fragmentShader: `\n #define USE_UV\n #define SUBSURFACE\n\n ${meshphongFragHead}\n\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n #ifdef USE_COLOR\n vec3 thickness = vColor * thicknessColor;\n #else\n vec3 thickness = thicknessColor;\n #endif\n vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n ` + meshphongFragBody.replace(\n '#include <lights_fragment_begin>',\n replaceAll(\n ShaderChunk.lights_fragment_begin,\n 'RE_Direct( directLight, geometry, material, reflectedLight );',\n `\n RE_Direct( directLight, geometry, material, reflectedLight );\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n `\n )\n ),\n}\n\nexport default SubsurfaceScatteringShader\n","import { defineComponent, PropType } from 'vue'\nimport { Color, ShaderMaterial, UniformsUtils } from 'three'\nimport SubsurfaceScatteringShader from './SubsurfaceScatteringShader'\nimport Material from './Material'\nimport { bindObjectProp } from '../tools'\n\nexport interface SubSurfaceMaterialUniformsInterface {\n diffuse?: string | number\n thicknessColor?: string | number\n thicknessDistortion?: number\n thicknessAmbient?: number\n thicknessAttenuation?: number\n thicknessPower?: number\n thicknessScale?: number\n}\n\nexport default defineComponent({\n extends: Material,\n props: {\n uniforms: { type: Object as PropType<SubSurfaceMaterialUniformsInterface>, default: () => ({\n diffuse: '#ffffff',\n thicknessColor: '#ffffff',\n thicknessDistortion: 0.4,\n thicknessAmbient: 0.01,\n thicknessAttenuation: 0.7,\n thicknessPower: 2,\n thicknessScale: 4,\n }) },\n },\n methods: {\n createMaterial() {\n const params = SubsurfaceScatteringShader\n const uniforms = UniformsUtils.clone(params.uniforms)\n\n bindObjectProp(this, 'uniforms', uniforms, true, (dst: any, key: string, value: any) => {\n const dstVal = dst[key].value\n if (dstVal instanceof Color) dstVal.set(value)\n else dst[key].value = value\n })\n\n const material = new ShaderMaterial({\n ...params,\n lights: true,\n ...this.props,\n uniforms,\n })\n\n return material\n },\n },\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { ShaderMaterial, Texture, TextureLoader } from 'three'\nimport { bindObjectProp } from '../tools'\nimport { MaterialInjectionKey, MaterialInterface } from './Material'\n\nexport interface TexureInterface {\n material?: MaterialInterface\n texture?: Texture\n}\n\nexport default defineComponent({\n inject: {\n material: MaterialInjectionKey as symbol,\n },\n props: {\n name: { type: String, default: 'map' },\n uniform: String,\n src: String,\n onLoad: Function as PropType<(t: Texture) => void>,\n onProgress: Function as PropType<(e: ProgressEvent) => void>,\n onError: Function as PropType<(e: ErrorEvent) => void>,\n props: { type: Object, default: () => ({}) },\n },\n setup(): TexureInterface {\n return {}\n },\n created() {\n this.refreshTexture()\n watch(() => this.src, this.refreshTexture)\n },\n unmounted() {\n this.material?.setTexture(null, this.name)\n this.texture?.dispose()\n },\n methods: {\n createTexture() {\n if (!this.src) return undefined\n return new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError)\n },\n initTexture() {\n if (!this.texture) return\n\n bindObjectProp(this, 'props', this.texture)\n if (!this.material) return\n\n this.material.setTexture(this.texture, this.name)\n if (this.material.material instanceof ShaderMaterial && this.uniform) {\n (this.material.material).uniforms[this.uniform] = { value: this.texture }\n }\n },\n refreshTexture() {\n this.texture?.dispose()\n this.texture = this.createTexture()\n this.initTexture()\n },\n onLoaded(t: Texture) {\n this.onLoad?.(t)\n },\n },\n render() { return [] },\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { CubeReflectionMapping, CubeTextureLoader } from 'three'\nimport Texture from './Texture'\n\nexport default defineComponent({\n extends: Texture,\n props: {\n name: { type: String, default: 'envMap' },\n path: { type: String, required: true },\n urls: {\n type: Array as PropType<string[]>,\n default: () => ['px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg'],\n },\n props: { type: Object, default: () => ({ mapping: CubeReflectionMapping }) },\n },\n created() {\n watch(() => this.path, this.refreshTexture)\n watch(() => this.urls, this.refreshTexture)\n },\n methods: {\n createTexture() {\n return new CubeTextureLoader()\n .setPath(this.path)\n .load(this.urls, this.onLoaded, this.onProgress, this.onError)\n },\n },\n})\n","import { defineComponent, watch } from 'vue'\nimport { VideoTexture } from 'three'\nimport Texture from './Texture'\n\nexport default defineComponent({\n extends: Texture,\n props: {\n videoId: {\n type: String,\n required: true,\n },\n },\n created() {\n watch(() => this.videoId, this.refreshTexture)\n },\n methods: {\n createTexture() {\n const video = document.getElementById(this.videoId) as HTMLVideoElement\n return new VideoTexture(video)\n },\n },\n})\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/BoxGeometry'\n\nexport default meshComponent('Box', props, createGeometry)\n\n// import { defineComponent } from 'vue'\n// import Mesh, { meshComponent } from './Mesh'\n//\n// export default defineComponent({\n// extends: Mesh,\n// props,\n// created() {\n// this.createGeometry()\n// this.addGeometryWatchers(props)\n// },\n// methods: {\n// createGeometry() {\n// this.geometry = createGeometry(this)\n// },\n// },\n// })\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/CircleGeometry'\n\nexport default meshComponent('Circle', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/ConeGeometry'\n\nexport default meshComponent('Cone', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/CylinderGeometry'\n\nexport default meshComponent('Cylinder', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/DodecahedronGeometry'\n\nexport default meshComponent('Dodecahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/IcosahedronGeometry'\n\nexport default meshComponent('Icosahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/LatheGeometry'\n\nexport default meshComponent('Lathe', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/OctahedronGeometry'\n\nexport default meshComponent('Octahedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/PlaneGeometry'\n\nexport default meshComponent('Plane', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/PolyhedronGeometry'\n\nexport default meshComponent('Polyhedron', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/RingGeometry'\n\nexport default meshComponent('Ring', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/SphereGeometry'\n\nexport default meshComponent('Sphere', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TetrahedronGeometry'\n\nexport default meshComponent('Tetrahedron', props, createGeometry)\n","import { defineComponent, PropType, watch } from 'vue'\nimport { TextGeometry } from 'three/examples/jsm/geometries/TextGeometry.js'\nimport { Font, FontLoader } from 'three/examples/jsm/loaders/FontLoader.js'\nimport Mesh, { MeshSetupInterface } from './Mesh'\n\ninterface TextSetupInterface extends MeshSetupInterface {\n geometry?: TextGeometry\n font?: Font\n}\n\nconst props = {\n text: { type: String, required: true, default: 'Text' },\n fontSrc: { type: String, required: true },\n size: { type: Number, default: 80 },\n height: { type: Number, default: 5 },\n depth: { type: Number, default: 1 },\n curveSegments: { type: Number, default: 12 },\n bevelEnabled: { type: Boolean, default: false },\n bevelThickness: { type: Number, default: 10 },\n bevelSize: { type: Number, default: 8 },\n bevelOffset: { type: Number, default: 0 },\n bevelSegments: { type: Number, default: 5 },\n align: { type: [Boolean, String] as PropType<boolean | string>, default: false },\n} as const\n\nexport default defineComponent({\n extends: Mesh,\n props,\n setup(): TextSetupInterface {\n return {}\n },\n created() {\n if (!this.fontSrc) {\n console.error('Missing required prop: \"font-src\"')\n return\n }\n // if (!this.text) {\n // console.error('Missing required prop: \"text\"')\n // return\n // }\n\n // add watchers\n const watchProps = [\n 'text', 'size', 'height', 'curveSegments',\n 'bevelEnabled', 'bevelThickness', 'bevelSize', 'bevelOffset', 'bevelSegments',\n 'align',\n ]\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], () => {\n if (this.font) this.refreshGeometry()\n })\n })\n\n const loader = new FontLoader()\n this.loading = true\n loader.load(this.fontSrc, (font) => {\n this.loading = false\n this.font = font\n this.createGeometry()\n this.initMesh()\n })\n },\n methods: {\n createGeometry() {\n this.geometry = new TextGeometry(this.text, {\n // @ts-ignore\n font: this.font,\n size: this.size,\n height: this.height,\n depth: this.depth,\n curveSegments: this.curveSegments,\n bevelEnabled: this.bevelEnabled,\n bevelThickness: this.bevelThickness,\n bevelSize: this.bevelSize,\n bevelOffset: this.bevelOffset,\n bevelSegments: this.bevelSegments,\n })\n\n if (this.align === 'center') {\n this.geometry.center()\n }\n },\n },\n})\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TorusGeometry'\n\nexport default meshComponent('Torus', props, createGeometry)\n","import { meshComponent } from './Mesh'\nimport { props, createGeometry } from '../geometries/TorusKnotGeometry'\n\nexport default meshComponent('TorusKnot', props, createGeometry)\n","import { defineComponent } from 'vue'\nimport { TubeGeometry, Vector3 } from 'three'\nimport Mesh from './Mesh'\nimport { props, createGeometry, updateTubeGeometryPoints } from '../geometries/TubeGeometry'\n\nexport default defineComponent({\n extends: Mesh,\n props,\n created() {\n this.createGeometry()\n this.addGeometryWatchers(props)\n },\n methods: {\n createGeometry() {\n this.geometry = createGeometry(this)\n },\n // update curve points (without using prop, faster)\n updatePoints(points: Vector3[]) {\n updateTubeGeometryPoints(this.geometry as TubeGeometry, points)\n },\n },\n __hmrId: 'Tube',\n})\n","import { defineComponent, watch } from 'vue'\nimport { DoubleSide, MeshBasicMaterial, PlaneGeometry, Texture, TextureLoader } from 'three'\nimport Mesh, { MeshSetupInterface } from './Mesh'\n\ninterface ImageSetupInterface extends MeshSetupInterface {\n material?: MeshBasicMaterial\n texture?: Texture\n}\n\nexport default defineComponent({\n emits: ['loaded'],\n extends: Mesh,\n props: {\n src: { type: String, required: true },\n width: Number,\n height: Number,\n widthSegments: { type: Number, default: 1 },\n heightSegments: { type: Number, default: 1 },\n keepSize: Boolean,\n },\n setup(): ImageSetupInterface {\n return {}\n },\n created() {\n if (!this.renderer) return\n\n this.geometry = new PlaneGeometry(1, 1, this.widthSegments, this.heightSegments)\n this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() })\n\n watch(() => this.src, this.refreshTexture);\n\n ['width', 'height'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], this.resize)\n })\n\n this.resize()\n if (this.keepSize) this.renderer.onResize(this.resize)\n },\n unmounted() {\n this.renderer?.offResize(this.resize)\n },\n methods: {\n loadTexture() {\n return new TextureLoader().load(this.src, this.onLoaded)\n },\n refreshTexture() {\n this.texture?.dispose()\n if (this.material) {\n this.material.map = this.loadTexture()\n this.material.needsUpdate = true\n }\n },\n onLoaded(texture: Texture) {\n this.texture = texture\n this.resize()\n this.$emit('loaded', texture)\n },\n resize() {\n if (!this.renderer || !this.texture) return\n const screen = this.renderer.size\n const iW = this.texture.image.width\n const iH = this.texture.image.height\n const iRatio = iW / iH\n let w = 1, h = 1\n if (this.width && this.height) {\n w = this.width * screen.wWidth / screen.width\n h = this.height * screen.wHeight / screen.height\n } else if (this.width) {\n w = this.width * screen.wWidth / screen.width\n h = w / iRatio\n } else if (this.height) {\n h = this.height * screen.wHeight / screen.height\n w = h * iRatio\n } else {\n if (iRatio > 1) w = h * iRatio\n else h = w / iRatio\n }\n if (this.mesh) {\n this.mesh.scale.x = w\n this.mesh.scale.y = h\n }\n },\n },\n __hmrId: 'Image',\n})\n","import { defineComponent } from 'vue'\nimport { InstancedMesh } from 'three'\nimport Mesh from './Mesh'\nimport { bindProp } from '../tools'\n\nexport default defineComponent({\n extends: Mesh,\n props: {\n count: { type: Number, required: true },\n },\n methods: {\n initMesh() {\n if (!this.renderer) return\n\n if (!this.geometry || !this.material) {\n console.error('Missing geometry and/or material')\n return false\n }\n\n this.mesh = new InstancedMesh(this.geometry, this.material, this.count)\n this.mesh.userData.component = this\n\n bindProp(this, 'castShadow', this.mesh)\n bindProp(this, 'receiveShadow', this.mesh)\n\n if (this.onPointerEnter ||\n this.onPointerOver ||\n this.onPointerMove ||\n this.onPointerLeave ||\n this.onPointerDown ||\n this.onPointerUp ||\n this.onClick) {\n this.renderer.three.addIntersectObject(this.mesh)\n }\n\n this.initObject3D(this.mesh)\n },\n },\n __hmrId: 'InstancedMesh',\n})\n","import { defineComponent } from 'vue'\nimport { Sprite, SpriteMaterial, Texture, TextureLoader } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\n\ninterface SpriteSetupInterface extends Object3DSetupInterface {\n texture?: Texture\n material?: SpriteMaterial\n sprite?: Sprite\n}\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['loaded'],\n props: {\n src: { type: String, required: true },\n },\n setup(): SpriteSetupInterface {\n return {}\n },\n created() {\n this.texture = new TextureLoader().load(this.src, this.onLoaded)\n this.material = new SpriteMaterial({ map: this.texture })\n this.sprite = new Sprite(this.material)\n this.initObject3D(this.sprite)\n },\n unmounted() {\n this.texture?.dispose()\n this.material?.dispose()\n },\n methods: {\n onLoaded() {\n this.updateUV()\n this.$emit('loaded')\n },\n updateUV() {\n if (!this.texture || !this.sprite) return\n\n const iWidth = this.texture.image.width\n const iHeight = this.texture.image.height\n const iRatio = iWidth / iHeight\n\n let x = 0.5, y = 0.5\n if (iRatio > 1) {\n x = 0.5 * iRatio\n } else {\n y = 0.5 / iRatio\n }\n\n const positions = this.sprite.geometry.attributes.position.array as Array<number>\n positions[0] = -x; positions[1] = -y\n positions[5] = x; positions[6] = -y\n positions[10] = x; positions[11] = y\n positions[15] = -x; positions[16] = y\n this.sprite.geometry.attributes.position.needsUpdate = true\n },\n },\n __hmrId: 'Sprite',\n})\n","import { defineComponent } from 'vue'\nimport { BufferGeometry, Material, Points } from 'three'\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\nimport { MeshInjectionKey } from './Mesh'\n\nexport interface PointsSetupInterface extends Object3DSetupInterface {\n mesh?: Points\n points?: Points\n geometry?: BufferGeometry\n material?: Material\n}\n\nexport interface PointsInterface extends PointsSetupInterface {\n setGeometry(geometry: BufferGeometry): void\n setMaterial(material: Material): void\n}\n\n// not really a mesh, but allow us to easily get geometry/material support\nexport default defineComponent({\n extends: Object3D,\n setup(): PointsSetupInterface {\n return {}\n },\n provide() {\n return {\n [MeshInjectionKey as symbol]: this,\n }\n },\n mounted() {\n this.mesh = this.points = new Points(this.geometry, this.material)\n this.initObject3D(this.mesh)\n },\n methods: {\n setGeometry(geometry: BufferGeometry) {\n this.geometry = geometry\n if (this.mesh) this.mesh.geometry = geometry\n },\n setMaterial(material: Material) {\n this.material = material\n if (this.mesh) this.mesh.material = material\n },\n },\n})\n","import { Object3D as TObject3D } from 'three'\nimport { defineComponent } from 'vue'\nimport Object3D from '../core/Object3D'\n\nexport default defineComponent({\n extends: Object3D,\n emits: ['before-load', 'load', 'progress', 'error'],\n props: {\n src: { type: String, required: true },\n },\n data() {\n return {\n progress: 0,\n }\n },\n methods: {\n onLoad(model: TObject3D) {\n this.$emit('load', model)\n },\n onProgress(progress: ProgressEvent) {\n this.progress = progress.loaded / progress.total\n this.$emit('progress', progress)\n },\n onError(error: ErrorEvent) {\n this.$emit('error', error)\n },\n },\n})\n","import { defineComponent } from 'vue'\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'\nimport Model from './Model'\n\nexport default defineComponent({\n extends: Model,\n created() {\n const loader = new GLTFLoader()\n this.$emit('before-load', loader)\n loader.load(this.src, (gltf) => {\n this.onLoad(gltf)\n this.initObject3D(gltf.scene)\n }, this.onProgress, this.onError)\n },\n})\n","import { defineComponent } from 'vue'\nimport { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js'\nimport Model from './Model'\n\nexport default defineComponent({\n extends: Model,\n created() {\n const loader = new FBXLoader()\n this.$emit('before-load', loader)\n loader.load(this.src, (fbx) => {\n this.onLoad(fbx)\n this.initObject3D(fbx)\n }, this.onProgress, this.onError)\n },\n})\n","import { defineComponent, inject, InjectionKey } from 'vue'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport { Pass } from 'three/examples/jsm/postprocessing/Pass'\nimport { RendererInjectionKey, RendererInterface } from '../core/Renderer'\n\ninterface EffectComposerSetupInterface {\n renderer?: RendererInterface\n composer?: EffectComposer\n}\n\nexport interface EffectComposerInterface extends EffectComposerSetupInterface {\n addPass(pass: Pass): void\n removePass(pass: Pass): void\n}\n\nexport const ComposerInjectionKey: InjectionKey<EffectComposerInterface> = Symbol('Composer')\n\nexport default defineComponent({\n setup(): EffectComposerSetupInterface {\n const renderer = inject(RendererInjectionKey)\n return { renderer }\n },\n provide() {\n return {\n [ComposerInjectionKey as symbol]: this,\n }\n },\n created() {\n if (!this.renderer) {\n console.error('Renderer not found')\n return\n }\n const renderer = this.renderer\n\n const composer = new EffectComposer(this.renderer.renderer)\n this.composer = composer\n this.renderer.composer = composer\n\n // this.renderer.onInit(() => {\n renderer.addListener('init', () => {\n renderer.renderer.autoClear = false\n this.resize()\n renderer.addListener('resize', this.resize)\n })\n },\n unmounted() {\n this.renderer?.removeListener('resize', this.resize)\n },\n methods: {\n addPass(pass: Pass) {\n this.composer?.addPass(pass)\n },\n removePass(pass: Pass) {\n this.composer?.removePass(pass)\n },\n resize() {\n if (this.composer && this.renderer) {\n this.composer.setSize(this.renderer.size.width, this.renderer.size.height)\n }\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'EffectComposer',\n})\n","import { Pass } from 'three/examples/jsm/postprocessing/Pass'\nimport { defineComponent } from 'vue'\nimport { RendererInjectionKey, RendererInterface } from '../core/Renderer'\nimport { ComposerInjectionKey, EffectComposerInterface } from './EffectComposer'\n\nexport interface EffectSetupInterface {\n renderer?: RendererInterface\n composer?: EffectComposerInterface\n pass?: Pass\n}\n\nexport default defineComponent({\n // inject for sub components\n inject: {\n renderer: RendererInjectionKey as symbol,\n composer: ComposerInjectionKey as symbol,\n },\n emits: ['ready'],\n setup(): EffectSetupInterface {\n return {}\n },\n created() {\n if (!this.composer) {\n console.error('Missing parent EffectComposer')\n }\n if (!this.renderer) {\n console.error('Missing parent Renderer')\n }\n },\n unmounted() {\n if (this.pass) {\n this.composer?.removePass(this.pass);\n (this.pass as any).dispose?.()\n }\n },\n methods: {\n initEffectPass(pass: Pass) {\n this.pass = pass\n this.composer?.addPass(pass)\n this.$emit('ready', pass)\n },\n },\n render() {\n return []\n },\n __hmrId: 'EffectPass',\n})\n","import { defineComponent } from 'vue'\nimport { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n const pass = new RenderPass(this.renderer.scene, this.renderer.camera)\n this.initEffectPass(pass)\n },\n __hmrId: 'RenderPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { BokehPass } from 'three/examples/jsm/postprocessing/BokehPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n focus: { type: Number, default: 1 },\n aperture: { type: Number, default: 0.025 },\n maxblur: { type: Number, default: 0.01 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n\n const params = {\n focus: this.focus,\n aperture: this.aperture,\n maxblur: this.maxblur,\n width: this.renderer.size.width,\n height: this.renderer.size.height,\n }\n\n const pass = new BokehPass(this.renderer.scene, this.renderer.camera, params)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'BokehPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { FilmPass } from 'three/examples/jsm/postprocessing/FilmPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n noiseIntensity: { type: Number, default: 0.5 },\n scanlinesIntensity: { type: Number, default: 0.05 },\n scanlinesCount: { type: Number, default: 4096 },\n grayscale: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n const pass = new FilmPass(this.noiseIntensity, this.scanlinesIntensity, this.scanlinesCount, this.grayscale)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'FilmPass',\n})\n","import { defineComponent } from 'vue'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js'\nimport EffectPass from './EffectPass'\nimport { SizeInterface } from '../core/useThree'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n const pass = new ShaderPass(FXAAShader)\n\n // resize will be first called in renderer init\n this.renderer?.addListener('resize', this.resize)\n\n this.initEffectPass(pass)\n },\n unmounted() {\n this.renderer?.removeListener('resize', this.resize)\n },\n methods: {\n resize({ size }: { size: SizeInterface }) {\n if (this.pass) {\n const { resolution } = (this.pass as ShaderPass).material.uniforms\n resolution.value.x = 1 / size.width\n resolution.value.y = 1 / size.height\n }\n },\n },\n __hmrId: 'FXAAPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { HalftonePass } from 'three/examples/jsm/postprocessing/HalftonePass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n shape: { type: Number, default: 1 },\n radius: { type: Number, default: 4 },\n rotateR: { type: Number, default: Math.PI / 12 * 1 },\n rotateG: { type: Number, default: Math.PI / 12 * 2 },\n rotateB: { type: Number, default: Math.PI / 12 * 3 },\n scatter: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n const pass = new HalftonePass(this.renderer.size.width, this.renderer.size.height, {})\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n pass.uniforms[p].value = this[p]\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'HalftonePass',\n})\n","import { defineComponent } from 'vue'\nimport { SMAAPass } from 'three/examples/jsm/postprocessing/SMAAPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n created() {\n if (!this.renderer) return\n\n const pass = new SMAAPass(this.renderer.size.width, this.renderer.size.height)\n this.initEffectPass(pass)\n },\n __hmrId: 'SMAAPass',\n})\n","import { defineComponent } from 'vue'\nimport { SSAOPass } from 'three/examples/jsm/postprocessing/SSAOPass.js'\nimport EffectPass from './EffectPass'\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n options: {\n type: Object,\n default: () => ({}),\n },\n },\n created() {\n if (!this.renderer) return\n\n if (!this.renderer.scene) {\n console.error('Missing Scene')\n return\n }\n if (!this.renderer.camera) {\n console.error('Missing Camera')\n return\n }\n\n const pass = new SSAOPass(\n this.renderer.scene,\n this.renderer.camera,\n this.renderer.size.width,\n this.renderer.size.height\n )\n\n Object.keys(this.options).forEach(key => {\n // @ts-ignore\n pass[key] = this.options[key]\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'SSAOPass',\n})\n","export default {\n uniforms: {},\n vertexShader: `\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec2 vUv;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n }\n `,\n}\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three'\nimport DefaultShader from './default'\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n blurRadius: { value: 0 },\n gradientRadius: { value: 0 },\n start: { value: new Vector2() },\n end: { value: new Vector2() },\n delta: { value: new Vector2() },\n texSize: { value: new Vector2() },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform float blurRadius;\n uniform float gradientRadius;\n uniform vec2 start;\n uniform vec2 end;\n uniform vec2 delta;\n uniform vec2 texSize;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n\n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);\n // vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n // texel2.rgb *= texel2.a;\n\n color += texel * weight;\n total += 2.0 * weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n}\n","import { defineComponent, PropType, watch } from 'vue'\nimport { Vector2 } from 'three'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport EffectPass from './EffectPass'\nimport TiltShift from '../shaders/TiltShift'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nconst props = {\n blurRadius: { type: Number, default: 10 },\n gradientRadius: { type: Number, default: 100 },\n start: { type: Object as PropType<Vector2PropInterface>, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType<Vector2PropInterface>, default: () => ({ x: 10, y: 100 }) },\n} as const\n\ninterface TiltShiftPassSetupInterface {\n uniforms1: {[name: string]: { value: any }}\n uniforms2: {[name: string]: { value: any }}\n pass1?: ShaderPass\n pass2?: ShaderPass\n}\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n setup(): TiltShiftPassSetupInterface {\n return { uniforms1: {}, uniforms2: {} }\n },\n created() {\n if (!this.composer) return\n\n this.pass1 = new ShaderPass(TiltShift)\n this.pass2 = new ShaderPass(TiltShift)\n\n const uniforms1 = this.uniforms1 = this.pass1.uniforms\n const uniforms2 = this.uniforms2 = this.pass2.uniforms\n\n // shared uniforms\n uniforms2.blurRadius = uniforms1.blurRadius\n uniforms2.gradientRadius = uniforms1.gradientRadius\n uniforms2.start = uniforms1.start\n uniforms2.end = uniforms1.end\n uniforms2.texSize = uniforms1.texSize\n\n bindProp(this, 'blurRadius', uniforms1.blurRadius, 'value')\n bindProp(this, 'gradientRadius', uniforms1.gradientRadius, 'value')\n\n this.updateFocusLine();\n\n ['start', 'end'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], this.updateFocusLine, { deep: true })\n })\n\n this.pass1.setSize = (width: number, height: number) => {\n uniforms1.texSize.value.set(width, height)\n }\n\n this.initEffectPass(this.pass1)\n this.composer.addPass(this.pass2)\n },\n unmounted() {\n if (this.composer && this.pass2) this.composer.removePass(this.pass2)\n },\n methods: {\n updateFocusLine() {\n this.uniforms1.start.value.copy(this.start)\n this.uniforms1.end.value.copy(this.end)\n const dv = new Vector2().copy(this.end as Vector2).sub(this.start as Vector2).normalize()\n this.uniforms1.delta.value.copy(dv)\n this.uniforms2.delta.value.set(-dv.y, dv.x)\n },\n },\n __hmrId: 'TiltShiftPass',\n})\n","import { defineComponent, watch } from 'vue'\nimport { Vector2 } from 'three'\nimport { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js'\nimport EffectPass from './EffectPass'\n\nconst props = {\n strength: { type: Number, default: 1.5 },\n radius: { type: Number, default: 0 },\n threshold: { type: Number, default: 0 },\n} as const\n\nexport default defineComponent({\n extends: EffectPass,\n props,\n created() {\n if (!this.renderer) return\n\n const size = new Vector2(this.renderer.size.width, this.renderer.size.height)\n const pass = new UnrealBloomPass(size, this.strength, this.radius, this.threshold)\n\n Object.keys(props).forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { pass.uniforms[p].value = value })\n })\n\n this.initEffectPass(pass)\n },\n __hmrId: 'UnrealBloomPass',\n})\n","// From https://github.com/evanw/glfx.js\nimport { Vector2 } from 'three'\nimport DefaultShader from './default'\n\nexport default {\n uniforms: {\n tDiffuse: { value: null },\n center: { value: new Vector2(0.5, 0.5) },\n strength: { value: 0 },\n },\n vertexShader: DefaultShader.vertexShader,\n fragmentShader: `\n uniform sampler2D tDiffuse;\n uniform vec2 center;\n uniform float strength;\n varying vec2 vUv;\n\n float random(vec3 scale, float seed) {\n /* use the fragment position for a different seed per-pixel */\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n }\n \n void main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center - vUv;\n \n /* randomize the lookup values to hide the fixed number of samples */\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n \n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);\n\n /* switch to pre-multiplied alpha to correctly blur transparent images */\n texel.rgb *= texel.a;\n\n color += texel * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n\n /* switch back from pre-multiplied alpha */\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n }\n `,\n}\n","import { defineComponent, PropType } from 'vue'\nimport { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'\nimport EffectPass from './EffectPass'\nimport ZoomBlur from '../shaders/ZoomBlur'\nimport { Vector2PropInterface } from '../core/Object3D'\nimport { bindProp } from '../tools'\n\nexport default defineComponent({\n extends: EffectPass,\n props: {\n center: { type: Object as PropType<Vector2PropInterface>, default: () => ({ x: 0.5, y: 0.5 }) },\n strength: { type: Number, default: 0.5 },\n },\n created() {\n const pass = new ShaderPass(ZoomBlur)\n\n bindProp(this, 'center', pass.uniforms.center, 'value')\n bindProp(this, 'strength', pass.uniforms.strength, 'value')\n\n this.initEffectPass(pass)\n },\n __hmrId: 'ZoomBlurPass',\n})\n","import { App, createApp as _createApp } from 'vue'\nimport * as TROIS from './index'\n\nexport const TroisJSVuePlugin = {\n install(app: App): void {\n const comps = [\n 'Camera',\n 'OrthographicCamera',\n 'PerspectiveCamera',\n 'Raycaster',\n 'Renderer',\n 'Scene',\n 'Group',\n\n 'CubeCamera',\n\n 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'PointsMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\n\n 'BufferGeometry',\n\n 'Mesh',\n\n 'Box', 'BoxGeometry',\n 'Circle', 'CircleGeometry',\n 'Cone', 'ConeGeometry',\n 'Cylinder', 'CylinderGeometry',\n 'Dodecahedron', 'DodecahedronGeometry',\n 'Icosahedron', 'IcosahedronGeometry',\n 'Lathe', 'LatheGeometry',\n 'Octahedron', 'OctahedronGeometry',\n 'Plane', 'PlaneGeometry',\n 'Polyhedron', 'PolyhedronGeometry',\n 'Ring', 'RingGeometry',\n 'Sphere', 'SphereGeometry',\n 'Tetrahedron', 'TetrahedronGeometry',\n 'Text',\n 'Torus', 'TorusGeometry',\n 'TorusKnot', 'TorusKnotGeometry',\n 'Tube', 'TubeGeometry',\n\n 'Image',\n 'InstancedMesh',\n 'Points',\n 'Sprite',\n\n 'FbxModel',\n 'GltfModel',\n\n 'BokehPass',\n 'EffectComposer',\n 'FilmPass',\n 'FXAAPass',\n 'HalftonePass',\n 'RenderPass',\n 'SAOPass',\n 'SMAAPass',\n 'SSAOPass',\n 'TiltShiftPass',\n 'UnrealBloomPass',\n 'ZoomBlurPass',\n ]\n\n comps.forEach(comp => {\n // @ts-ignore\n app.component(comp, TROIS[comp])\n })\n },\n}\n\nexport function createApp(params: any): App {\n return _createApp(params).use(TroisJSVuePlugin)\n}\n","import { Texture, TextureLoader } from 'three'\n\nexport interface TextureConfigInterface {\n src: string\n}\n\nexport interface TexturesInterface {\n loader: TextureLoader\n count: number\n textures: Texture[],\n loadProgress: number\n loadTextures(images: TextureConfigInterface[], cb: {() : void}): void\n dispose(): void\n}\n\nexport default function useTextures(): TexturesInterface {\n const obj: TexturesInterface = {\n loader: new TextureLoader(),\n count: 0,\n textures: [],\n loadProgress: 0,\n loadTextures,\n dispose,\n }\n return obj\n\n function loadTextures(images: TextureConfigInterface[], cb: {() : void}) {\n obj.count = images.length\n obj.textures.splice(0)\n obj.loadProgress = 0\n Promise.all(images.map(loadTexture)).then(cb)\n }\n\n function loadTexture(img: TextureConfigInterface, index: number) {\n return new Promise(resolve => {\n obj.loader.load(\n img.src,\n texture => {\n obj.loadProgress += 1 / obj.count\n obj.textures[index] = texture\n resolve(texture)\n }\n )\n })\n }\n\n function dispose() {\n obj.textures.forEach(t => t.dispose())\n }\n}\n"],"names":["applyObjectProps","dst","options","setter","key","value","bindObjectProp","src","prop","apply","r","toRef","watch","bindObjectProps","ref","setFromProp","o","bindProps","props","bindProp","srcProp","dstProp","_dstProp","propsValues","exclude","values","lerp","value1","value2","amount","limit","val","min","max","MATCAP_ROOT","DEFAULT_MATCAP","getMatcapUrl","hash","format","fileName","getMatcapFormatString","useRaycaster","camera","resetPosition","Vector3","raycaster","Raycaster","position","plane","Plane","coords","objects","recursive","usePointer","domElement","intersectObjects","intersectRecursive","touch","resetOnEnd","onEnter","onMove","onLeave","onClick","onIntersectEnter","onIntersectOver","onIntersectMove","onIntersectLeave","onIntersectClick","Vector2","positionN","positionV3","obj","addListeners","removeListeners","intersect","reset","updatePosition","event","x","y","rect","_intersectObjects","getIntersectObjects","intersects","offObjects","iMeshes","_a","_b","_c","object","component","getComponent","InstancedMesh","overEvent","enterEvent","moveEvent","leaveEvent","pointerEnter","pointerMove","pointerClick","pointerLeave","parent","useThree","params","config","size","beforeRenderCallbacks","renderer","createRenderer","init","dispose","render","renderC","setSize","addIntersectObject","removeIntersectObject","WebGLRenderer","onResize","initPointer","cameraCtrl","OrbitControls","onBeforeRender","pointerConf","pointer","cb","c","i","elt","width","height","pCamera","oCamera","wsize","getCameraSize","vFOV","h","RendererInjectionKey","defineComponent","attrs","initCallbacks","mountedCallbacks","afterRenderCallbacks","resizeCallbacks","canvas","matches","three","watchEffect","renderFn","scene","composer","e","type","callbacks","index","time","p$1","cameraSetProp","updateProjectionMatrix","OrthographicCamera","Camera","inject","p","PerspectiveCamera","v","SceneInjectionKey","Scene","provide","setBackground","Color","Texture","pointerProps","o3d","instance","getCurrentInstance","Group","Object3D","emptyCallBack","CubeCamera","rendererC","cubeRT","WebGLCubeRenderTarget","RGBAFormat","LinearMipmapLinearFilter","cubeCamera","updateRT","m","onUnmounted","MeshInjectionKey","Mesh","mesh","TMesh","geometry","material","prev","oldGeo","meshComponent","name","createGeometry","Geometry","bufferAttributes","BufferGeometry","attribute","bufferAttribute","BufferAttribute","geometryComponent","comp","BoxGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","ExtrudeGeometry","IcosahedronGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","SphereGeometry","ShapeGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","Curve","curve","CatmullRomCurve3","TubeGeometry","points","updateTubeGeometryPoints","tube","radialSegments","radius","tubularSegments","closed","frames","pAttribute","nAttribute","normal","P","updateSegment","N","B","j","sin","cos","n","SpotLight","DirectionalLight","light","AmbientLight","Light","HemisphereLight","PointLight","RectAreaLight","RectAreaLightUniformsLib","lightHelper","RectAreaLightHelper","MaterialInjectionKey","BaseMaterial","needsUpdate","dstVal","texture","materialComponent","createMaterial","BasicMaterial","opts","MeshBasicMaterial","LambertMaterial","MeshLambertMaterial","PhongMaterial","MeshPhongMaterial","PhysicalMaterial","MeshPhysicalMaterial","PointsMaterial","TPointsMaterial","ShadowMaterial","TShadowMaterial","StandardMaterial","MeshStandardMaterial","ToonMaterial","MeshToonMaterial","MatcapMaterial","TextureLoader","MeshMatcapMaterial","defaultVertexShader","defaultFragmentShader","ShaderMaterial","replaceAll","string","find","replace","meshphongFragHead","ShaderChunk","meshphongFragBody","SubsurfaceScatteringShader","UniformsUtils","ShaderLib","SubSurfaceMaterial","Material","uniforms","d","t","CubeTexture","CubeReflectionMapping","CubeTextureLoader","VideoTexture","video","Box","Circle","Cone","Cylinder","Dodecahedron","Icosahedron","Lathe","Octahedron","Polyhedron","Ring","Sphere","Tetrahedron","Text","loader","FontLoader","font","TextGeometry","Torus","TorusKnot","Tube","DoubleSide","screen","iW","iH","iRatio","w","Sprite","SpriteMaterial","iWidth","iHeight","positions","Points","model","progress","error","GLTF","Model","GLTFLoader","gltf","FBX","FBXLoader","fbx","ComposerInjectionKey","EffectComposer","pass","s$1","RenderPass","EffectPass","BokehPass","FilmPass","FXAAPass","ShaderPass","FXAAShader","resolution","HalftonePass","SMAAPass","SSAOPass","r$1","DefaultShader","TiltShift","uniforms1","uniforms2","dv","UnrealBloomPass","ZoomBlur","TroisJSVuePlugin","app","TROIS","createApp","_createApp","useTextures","loadTextures","images","loadTexture","img","resolve"],"mappings":"y7GAIO,SAASA,EACdC,EACAC,EACAC,EACM,CACFD,aAAmB,QACrB,OAAO,QAAQA,CAAO,EAAE,QAAQ,CAAC,CAACE,EAAKC,CAAK,IAAM,CAC5CF,EAAQA,EAAOF,EAAKG,EAAKC,CAAK,EAC7BJ,EAAIG,GAAOC,CAClB,CAAC,CAEL,CAEO,SAASC,EACdC,EACAC,EACAP,EACAQ,EAAQ,GACRN,EACiB,CACbM,GAAOT,EAAiBC,EAAKM,EAAIC,GAAOL,CAAM,EAClD,MAAMO,EAAIC,GAAMJ,EAAKC,CAAI,EACzB,OAAOI,EAAMF,EAAIL,GAAU,CAAEL,EAAiBC,EAAKI,EAAOF,CAAM,CAAE,CAAC,CACrE,CAEO,SAASU,GACdN,EACAN,EACAQ,EAAQ,GACRN,EACiB,CACbM,GAAOT,EAAiBC,EAAKM,EAAKJ,CAAM,EAC5C,MAAMO,EAAII,GAAIP,CAAG,EACjB,OAAOK,EAAMF,EAAIL,GAAU,CAAEL,EAAiBC,EAAKI,EAAOF,CAAM,CAAE,EAAG,CAAE,KAAM,EAAK,CAAC,CACrF,CAEO,SAASY,EAAYC,EAA4BR,EAAqC,CACvFA,aAAgB,QAClB,OAAO,QAAQA,CAAI,EAAE,QAAQ,CAAC,CAACJ,EAAKC,CAAK,IAAM,CAC7CW,EAAEZ,GAAOC,CACX,CAAC,CAEL,UAEgBY,GAAUV,EAAUW,EAAiBjB,EAAgB,CACnEiB,EAAM,QAAQV,GAAQ,CACpBW,EAASZ,EAAKC,EAAMP,EAAKO,CAAI,CAC/B,CAAC,CACH,CAEgB,SAAAW,EAASZ,EAAUa,EAAiBnB,EAAUoB,EAAwB,CACpF,MAAMC,EAAWD,GAAWD,EACtBN,EAAMH,GAAMJ,EAAKa,CAAO,EAC1BN,EAAI,iBAAiB,QACvBC,EAAYd,EAAIqB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