mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
1 line
168 KiB
Plaintext
1 line
168 KiB
Plaintext
{"version":3,"file":"trois.module.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/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/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/BasicMaterial.ts","../src/materials/LambertMaterial.ts","../src/materials/MatcapMaterial.ts","../src/materials/PhongMaterial.ts","../src/materials/StandardMaterial.ts","../src/materials/PhysicalMaterial.ts","../src/materials/ShaderMaterial.ts","../src/materials/SubsurfaceScatteringShader.ts","../src/materials/SubSurfaceMaterial.ts","../src/materials/ToonMaterial.ts","../src/materials/Texture.ts","../src/materials/CubeTexture.ts","../src/materials/PointsMaterial.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 { toRef, watch } from 'vue'\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 && !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, Plane, Raycaster, Vector2, Vector3 } from 'three'\nimport { IntersectObject } from './usePointer'\n\nexport interface RaycasterInterface {\n position: Vector3\n updatePosition(coords: Vector2): void\n intersect(coords: Vector2, objects: IntersectObject[]): 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: IntersectObject[]) => {\n raycaster.setFromCamera(coords, camera)\n return raycaster.intersectObjects(objects)\n }\n\n return {\n position,\n updatePosition,\n intersect,\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { Camera, InstancedMesh, Intersection, Mesh, 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\nexport type IntersectObject = Mesh | InstancedMesh\n\nexport interface PointerPublicConfigInterface {\n intersectMode?: 'frame'\n touch?: boolean\n resetOnEnd?: boolean\n resetPosition?: Vector2\n resetPositionV3?: Vector3\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: IntersectObject[]\n}\n\nexport interface PointerInterface {\n position: Vector2\n positionN: Vector2\n positionV3: Vector3\n intersectObjects: IntersectObject[]\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 touch = true,\n resetOnEnd = false,\n resetPosition = new Vector2(0, 0),\n resetPositionV3 = new Vector3(0, 0, 0),\n onEnter = () => {},\n onMove = () => {},\n onLeave = () => {},\n onClick = () => {},\n onIntersectEnter = () => {},\n onIntersectOver = () => {},\n onIntersectMove = () => {},\n onIntersectLeave = () => {},\n onIntersectClick = () => {},\n } = options\n\n const position = resetPosition.clone()\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.copy(resetPosition)\n positionV3.copy(resetPositionV3)\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 if (intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, intersectObjects)\n const offObjects: IntersectObject[] = [...intersectObjects]\n const iMeshes: InstancedMesh[] = []\n\n intersects.forEach(intersect => {\n const { object } = intersect\n const { component } = object.userData\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((<IntersectObject>object)), 1)\n })\n\n offObjects.forEach(object => {\n const { component } = object.userData\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 if (intersectObjects.length) {\n const intersects = raycaster.intersect(positionN, intersectObjects)\n const iMeshes: InstancedMesh[] = []\n intersects.forEach(intersect => {\n const { object } = intersect\n const { component } = object.userData\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 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, OrthographicCamera, PerspectiveCamera, Scene, WebGLRenderer } from 'three'\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'\nimport usePointer, { IntersectObject, 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 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: IntersectObject): void\n removeIntersectObject(o: IntersectObject): 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: IntersectObject[] = []\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 })\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: IntersectObject) {\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: IntersectObject) {\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, NoToneMapping, PCFShadowMap, Scene, WebGLRenderer } from 'three'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'\nimport { defineComponent, InjectionKey, PropType } from 'vue'\nimport { bindProp } from '../tools'\nimport { 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 // pointerPosition?: Vector2\n // pointerPositionN?: Vector2\n // pointerPositionV3?: Vector3\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 const RendererInjectionKey: InjectionKey<RendererInterface> = Symbol('Renderer')\n\nexport default defineComponent({\n name: 'Renderer',\n props: {\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 shadowType: { type: Number, default: PCFShadowMap },\n toneMapping: { type: Number, default: NoToneMapping },\n width: String,\n height: String,\n xr: Boolean,\n onReady: Function as PropType<(r: RendererInterface) => void>,\n onClick: Function as PropType<(this: HTMLCanvasElement, ev: MouseEvent) => any>,\n },\n setup(props): 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 const config: ThreeConfigInterface = {\n canvas,\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 bindProp(props, 'toneMapping', three.renderer)\n\n const renderFn: {(): void} = () => {}\n\n // we have to handle canvas events ourself (it is not rendered by vue)\n if (props.onClick) {\n canvas.addEventListener('click', props.onClick)\n }\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.pointerPosition = this.three.pointer.position\n // this.pointerPositionN = this.three.pointer.positionN\n // this.pointerPositionV3 = this.three.pointer.positionV3\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 this.renderer.shadowMap.type = this.shadowType\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) 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 // 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","import { defineComponent, inject, PropType, watch } from 'vue'\nimport { OrthographicCamera } from 'three'\nimport { bindProp } from '../tools'\nimport Camera 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\n const watchProps = ['left', 'right', 'top', 'bottom', 'near', 'far', 'zoom']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n // @ts-ignore\n camera[p] = value\n camera.updateProjectionMatrix()\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 { bindProp } from '../tools'\nimport Camera 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 const watchProps = ['aspect', 'far', 'fov', 'near']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => props[p], (value) => {\n // @ts-ignore\n camera[p] = value\n camera.updateProjectionMatrix()\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, PropType, watch } from 'vue'\nimport { 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\n// export function object3DSetup(): Object3DSetupInterface {\n// const renderer = inject(RendererInjectionKey)\n// const scene = inject(SceneInjectionKey)\n// return { scene, renderer }\n// }\n\nexport interface Vector2PropInterface {\n x?: number\n y?: 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 autoRemove: { type: Boolean, default: true },\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.autoRemove) this.removeFromParent()\n },\n methods: {\n initObject3D(o3d: Object3D) {\n this.o3d = o3d\n\n this.$emit('created', o3d)\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 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.addToParent()) this.$emit('ready', this)\n else console.error('Missing parent (Scene, Group...)')\n },\n getParent(): undefined | ComponentPublicInstance {\n let parent = this.$parent\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 { Object3D } from 'three'\nimport { defineComponent, inject, PropType } from 'vue'\nimport usePointer, { IntersectObject, 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 },\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: this.getIntersectObjects(),\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 methods: {\n getIntersectObjects() {\n if (this.renderer && this.renderer.scene) {\n const children = this.renderer.scene.children.filter((c: Object3D) => ['Mesh', 'InstancedMesh'].includes(c.type))\n return children as IntersectObject[]\n }\n return []\n },\n },\n render() {\n return []\n },\n __hmrId: 'Raycaster',\n})\n","import { defineComponent, inject, onUnmounted, PropType } from 'vue'\r\nimport { CubeCamera, LinearMipmapLinearFilter, Mesh, RGBFormat, WebGLCubeRenderTarget } from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\r\n\r\ninterface CubeCameraSetupInterface {\r\n cubeRT?: WebGLCubeRenderTarget\r\n cubeCamera?: CubeCamera\r\n updateRT?: {(): void}\r\n}\r\n\r\nexport default defineComponent({\r\n extends: Object3D,\r\n props: {\r\n cubeRTSize: { type: Number, default: 256 },\r\n cubeCameraNear: { type: Number, default: 0.1 },\r\n cubeCameraFar: { type: Number, default: 2000 },\r\n autoUpdate: Boolean,\r\n hideMeshes: { type: Array as PropType<Mesh[]>, default: () => ([]) },\r\n },\r\n setup(props): CubeCameraSetupInterface {\r\n const rendererC = inject(RendererInjectionKey)\r\n if (!rendererC || !rendererC.scene) {\r\n console.error('Missing Renderer / Scene')\r\n return {}\r\n }\r\n\r\n const renderer = rendererC.renderer, scene = rendererC.scene\r\n const cubeRT = new WebGLCubeRenderTarget(props.cubeRTSize, { format: RGBFormat, generateMipmaps: true, minFilter: LinearMipmapLinearFilter })\r\n const cubeCamera = new CubeCamera(props.cubeCameraNear, props.cubeCameraFar, cubeRT)\r\n const updateRT = () => {\r\n props.hideMeshes.forEach(m => { m.visible = false })\r\n cubeCamera.update(renderer, scene)\r\n props.hideMeshes.forEach(m => { m.visible = true })\r\n }\r\n\r\n if (props.autoUpdate) {\r\n rendererC.onBeforeRender(updateRT)\r\n onUnmounted(() => { rendererC.offBeforeRender(updateRT) })\r\n } else {\r\n rendererC.onMounted(updateRT)\r\n }\r\n\r\n return { cubeRT, cubeCamera, updateRT }\r\n },\r\n created() {\r\n if (this.cubeCamera) this.initObject3D(this.cubeCamera)\r\n },\r\n render() {\r\n return []\r\n },\r\n __hmrId: 'CubeCamera',\r\n})\r\n","import { ComponentPropsOptions, 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 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 MeshSetupInterface extends Object3DSetupInterface {\n mesh?: TMesh\n geometry?: BufferGeometry\n 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 const MeshInjectionKey: InjectionKey<MeshInterface> = Symbol('Mesh')\n\nconst Mesh = defineComponent({\n name: 'Mesh',\n extends: Object3D,\n props: {\n castShadow: Boolean,\n receiveShadow: Boolean,\n ...pointerProps,\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 mesh.userData.component = this\n\n bindProp(this, 'castShadow', mesh)\n bindProp(this, 'receiveShadow', 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 if (this.renderer) this.renderer.three.addIntersectObject(mesh)\n }\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) {\n this.material = material\n if (this.mesh) this.mesh.material = material\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 if (this.mesh) {\n if (this.renderer) this.renderer.three.removeIntersectObject(this.mesh)\n }\n // for predefined mesh (geometry/material are not unmounted)\n if (this.geometry) this.geometry.dispose()\n if (this.material) this.material.dispose()\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 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 this.geometry = 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 },\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 { 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} as const\n\nexport function createGeometry(comp: any): SphereGeometry {\n return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments)\n}\n\nexport default geometryComponent('SphereGeometry', 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 { Vector2PropInterface } from '../core/Object3D'\nimport Light from './Light'\n\nexport default defineComponent({\n extends: Light,\n props: {\n target: { type: Object as PropType<Vector2PropInterface>, 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 { defineComponent, InjectionKey, PropType, watch } from 'vue'\nimport { FrontSide, Material, NormalBlending, Texture } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface MaterialSetupInterface {\n mesh?: MeshInterface\n material?: Material\n createMaterial?(): Material\n}\n\nexport interface MaterialInterface extends MaterialSetupInterface {\n setProp(key: string, value: unknown, needsUpdate: boolean): void\n setTexture(texture: Texture | null, key: string): void\n}\n\nexport const MaterialInjectionKey: InjectionKey<MaterialInterface> = Symbol('Material')\n\nexport default defineComponent({\n // inject for sub components\n inject: {\n mesh: MeshInjectionKey as symbol,\n },\n props: {\n color: { type: [String, Number] as PropType<string | number>, default: '#ffffff' },\n blending: { type: Number, default: NormalBlending },\n alphaTest: { type: Number, default: 0 },\n depthTest: { type: Boolean, default: true },\n depthWrite: { type: Boolean, default: true },\n fog: { type: Boolean, default: true },\n opacity: { type: Number, default: 1 },\n side: { type: Number, default: FrontSide },\n transparent: Boolean,\n vertexColors: Boolean,\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 this.material = this.createMaterial()\n this.mesh.setMaterial(this.material)\n this.addWatchers()\n }\n },\n unmounted() {\n this.material?.dispose()\n },\n methods: {\n setProp(key: string, value: any, needsUpdate = false) {\n if (this.material) {\n // @ts-ignore\n this.material[key] = value\n this.material.needsUpdate = needsUpdate\n }\n },\n setTexture(texture: Texture | null, key = 'map') {\n this.setProp(key, texture, true)\n },\n addWatchers() {\n ['color', 'alphaTest', 'blending', 'depthTest', 'depthWrite', 'fog', 'opacity', 'side', 'transparent'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'color') {\n // @ts-ignore\n this.material.color.set(value)\n } else {\n // @ts-ignore\n this.material[p] = value\n }\n })\n })\n },\n },\n render() {\n return this.$slots.default ? this.$slots.default() : []\n },\n __hmrId: 'Material',\n})\n\nexport const wireframeProps = {\n wireframe: { type: Boolean, default: false },\n // not needed for WebGL\n // wireframeLinecap: { type: String, default: 'round' },\n // wireframeLinejoin: { type: String, default: 'round' },\n wireframeLinewidth: { type: Number, default: 1 }, // not really useful\n}\n","import { defineComponent } from 'vue'\nimport { MeshBasicMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshBasicMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'BasicMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshLambertMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshLambertMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'LambertMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshMatcapMaterial, TextureLoader } from 'three'\nimport { propsValues, getMatcapUrl } from '../tools'\nimport Material from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n src: String,\n name: { type: String, default: '0404E8_0404B5_0404CB_3333FC' },\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n const src = this.src ? this.src : getMatcapUrl(this.name)\n const opts = propsValues(this.$props, ['src', 'name'])\n opts.matcap = new TextureLoader().load(src)\n return new MeshMatcapMaterial(opts)\n },\n },\n __hmrId: 'MatcapMaterial',\n})\n","import { defineComponent, watch } from 'vue'\nimport { MeshPhongMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n emissive: { type: [Number, String], default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n reflectivity: { type: Number, default: 1 },\n shininess: { type: Number, default: 30 },\n specular: { type: [String, Number], default: 0x111111 },\n flatShading: Boolean,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshPhongMaterial(propsValues(this.$props))\n\n // TODO : handle flatShading ?\n const watchProps = ['emissive', 'emissiveIntensity', 'reflectivity', 'shininess', 'specular']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'emissive' || p === 'specular') {\n material[p].set(value)\n } else {\n // @ts-ignore\n material[p] = value\n }\n })\n })\n bindProps(this, Object.keys(wireframeProps), material)\n\n return material\n },\n },\n __hmrId: 'PhongMaterial',\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { MeshStandardMaterial } from 'three'\nimport { bindProp, bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\nimport { Vector2PropInterface } from '../core/Object3D'\n\nconst props = {\n aoMapIntensity: { type: Number, default: 1 },\n bumpScale: { type: Number, default: 1 },\n displacementBias: { type: Number, default: 0 },\n displacementScale: { type: Number, default: 1 },\n emissive: { type: [String, Number] as PropType<string | number>, default: 0 },\n emissiveIntensity: { type: Number, default: 1 },\n envMapIntensity: { type: Number, default: 1 },\n lightMapIntensity: { type: Number, default: 1 },\n metalness: { type: Number, default: 0 },\n normalScale: { type: Object as PropType<Vector2PropInterface>, default: () => ({ x: 1, y: 1 }) },\n roughness: { type: Number, default: 1 },\n refractionRatio: { type: Number, default: 0.98 },\n flatShading: Boolean,\n} as const\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...props,\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshStandardMaterial(propsValues(this.$props, ['normalScale']))\n\n // TODO : use setProp, handle flatShading ?\n Object.keys(props).forEach(p => {\n if (p === 'normalScale') return\n // @ts-ignore\n watch(() => this[p], (value) => {\n if (p === 'emissive') {\n material[p].set(value)\n } else {\n // @ts-ignore\n material[p] = value\n }\n })\n })\n\n bindProp(this, 'normalScale', material)\n bindProps(this, Object.keys(wireframeProps), material)\n\n return material\n },\n },\n __hmrId: 'StandardMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshPhysicalMaterial } from 'three'\nimport { propsValues } from '../tools'\nimport StandardMaterial from './StandardMaterial'\n\nexport default defineComponent({\n extends: StandardMaterial,\n props: {\n flatShading: Boolean,\n },\n methods: {\n createMaterial() {\n return new MeshPhysicalMaterial(propsValues(this.$props))\n },\n },\n __hmrId: 'PhysicalMaterial',\n})\n","import { defineComponent, watch } from 'vue'\nimport { ShaderMaterial } from 'three'\nimport Material 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 defineComponent({\n extends: Material,\n props: {\n uniforms: { type: Object, default: () => ({}) },\n vertexShader: { type: String, default: defaultVertexShader },\n fragmentShader: { type: String, default: defaultFragmentShader },\n },\n methods: {\n createMaterial() {\n const material = new ShaderMaterial(propsValues(this.$props, ['color']));\n\n ['vertexShader', 'fragmentShader'].forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => { material[p] = value; material.needsUpdate = true })\n })\n\n return material\n },\n },\n __hmrId: 'ShaderMaterial',\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'\n// import { bindProps, propsValues } from '../tools'\n\nconst props = {\n color: { type: [String, Number] as PropType<string | number>, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType<string | number>, default: '#ffffff' },\n thicknessDistortion: { type: Number, default: 0.4 },\n thicknessAmbient: { type: Number, default: 0.01 },\n thicknessAttenuation: { type: Number, default: 0.7 },\n thicknessPower: { type: Number, default: 2 },\n thicknessScale: { type: Number, default: 4 },\n} as const\n\nexport default defineComponent({\n extends: Material,\n props,\n methods: {\n createMaterial() {\n const params = SubsurfaceScatteringShader\n const uniforms = UniformsUtils.clone(params.uniforms)\n\n Object.keys(props).forEach((key) => {\n // @ts-ignore\n const value = this[key]\n let _key = key, _value = value\n if (['color', 'thicknessColor'].includes(key)) {\n if (key === 'color') _key = 'diffuse'\n _value = new Color(value)\n }\n uniforms[_key].value = _value\n })\n\n const material = new ShaderMaterial({\n ...params,\n uniforms,\n lights: true,\n transparent: this.transparent,\n vertexColors: this.vertexColors,\n })\n\n return material\n },\n },\n __hmrId: 'SubSurfaceMaterial',\n})\n","import { defineComponent } from 'vue'\nimport { MeshToonMaterial } from 'three'\nimport { bindProps, propsValues } from '../tools'\nimport Material, { wireframeProps } from './Material'\n\nexport default defineComponent({\n extends: Material,\n props: {\n ...wireframeProps,\n },\n methods: {\n createMaterial() {\n const material = new MeshToonMaterial(propsValues(this.$props))\n bindProps(this, Object.keys(wireframeProps), material)\n return material\n },\n },\n __hmrId: 'ToonMaterial',\n})\n","import { defineComponent, PropType, watch } from 'vue'\nimport { ClampToEdgeWrapping, LinearEncoding, LinearFilter, LinearMipmapLinearFilter, ShaderMaterial, Texture, TextureLoader, UVMapping } from 'three'\nimport { bindProp } from '../tools'\nimport { MaterialInjectionKey, MaterialInterface } from './Material'\nimport { Vector2PropInterface } from '../core/Object3D'\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 encoding: { type: Number, default: LinearEncoding },\n // format: { type: Number, default: RGBAFormat },\n mapping: { type: Number, default: UVMapping },\n wrapS: { type: Number, default: ClampToEdgeWrapping },\n wrapT: { type: Number, default: ClampToEdgeWrapping },\n magFilter: { type: Number, default: LinearFilter },\n minFilter: { type: Number, default: LinearMipmapLinearFilter },\n repeat: { type: Object as PropType<Vector2PropInterface>, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType<Vector2PropInterface>, default: () => ({ x: 0, y: 0 }) },\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 const texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError)\n // use format ? TextureLoader will automatically set format to THREE.RGBFormat for JPG images.\n const wathProps = ['encoding', 'mapping', 'wrapS', 'wrapT', 'magFilter', 'minFilter', 'repeat', 'rotation', 'center']\n wathProps.forEach(prop => { bindProp(this, prop, texture) })\n return texture\n },\n refreshTexture() {\n this.texture = this.createTexture()\n\n if (this.texture && this.material) {\n this.material.setTexture(this.texture, this.name)\n if (this.material.material instanceof ShaderMaterial && this.uniform) {\n (this.material as any).uniforms[this.uniform] = { value: this.texture }\n }\n }\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, RGBFormat } from 'three'\nimport Texture from './Texture'\n\nexport default defineComponent({\n extends: Texture,\n props: {\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 // format: { type: Number, default: RGBFormat },\n mapping: { type: Number, default: 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 } from 'vue'\r\nimport { PointsMaterial } from 'three'\r\nimport { propsValues } from '../tools'\r\nimport Material from './Material'\r\n\r\nexport default defineComponent({\r\n extends: Material,\r\n props: {\r\n size: { type: Number, default: 10 },\r\n sizeAttenuation: { type: Boolean, default: true },\r\n },\r\n methods: {\r\n createMaterial() {\r\n const material = new PointsMaterial(propsValues(this.$props))\r\n return material\r\n },\r\n },\r\n __hmrId: 'PointsMaterial',\r\n})\r\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 { Font, FontLoader, TextGeometry } from 'three'\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'\r\nimport { BufferGeometry, Material, Points } from 'three'\r\nimport Object3D, { Object3DSetupInterface } from '../core/Object3D'\r\nimport { MeshInjectionKey } from './Mesh'\r\n\r\nexport interface PointsSetupInterface extends Object3DSetupInterface {\r\n mesh?: Points\r\n points?: Points\r\n geometry?: BufferGeometry\r\n material?: Material\r\n}\r\n\r\nexport interface PointsInterface extends PointsSetupInterface {\r\n setGeometry(geometry: BufferGeometry): void\r\n setMaterial(material: Material): void\r\n}\r\n\r\n// not really a mesh, but allow us to easily get geometry/material support\r\nexport default defineComponent({\r\n extends: Object3D,\r\n setup(): PointsSetupInterface {\r\n return {}\r\n },\r\n provide() {\r\n return {\r\n [MeshInjectionKey as symbol]: this,\r\n }\r\n },\r\n mounted() {\r\n this.mesh = this.points = new Points(this.geometry, this.material)\r\n this.initObject3D(this.mesh)\r\n },\r\n methods: {\r\n setGeometry(geometry: BufferGeometry) {\r\n this.geometry = geometry\r\n if (this.mesh) this.mesh.geometry = geometry\r\n },\r\n setMaterial(material: Material) {\r\n this.material = material\r\n if (this.mesh) this.mesh.material = material\r\n },\r\n },\r\n})\r\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: ['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 this.initObject3D(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 loader.load(this.src, (gltf) => {\n this.onLoad(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 loader.load(this.src, (fbx) => {\n this.onLoad(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 'GLTFViewer',\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":["Raycaster","Plane","InstancedMesh","OrthographicCamera","PerspectiveCamera","Scene","Texture","Group","CubeCamera","TMesh","props","BoxGeometry","createGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","IcosahedronGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","SphereGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","TubeGeometry","SpotLight","DirectionalLight","AmbientLight","HemisphereLight","PointLight","RectAreaLight","ShaderMaterial","PointsMaterial","Sprite","Points","EffectComposer","RenderPass","BokehPass","FilmPass","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":";;;;;;;;;;;;;;;;;;qBAE4B,GAA4B,MAAqC;AAC3F,MAAI,gBAAgB,QAAQ;AAC1B,WAAO,QAAQ,MAAM,QAAQ,CAAC,CAAC,KAAK,WAAW;AAC7C,QAAE,OAAO;AAAA;AAAA;AAAA;mBAKW,KAAU,OAAiB,KAAgB;AACnE,QAAM,QAAQ,UAAQ;AACpB,aAAS,KAAK,MAAM,KAAK;AAAA;AAAA;kBAIJ,KAAU,SAAiB,KAAU,SAAwB;AACpF,QAAM,WAAW,WAAW;AAC5B,QAAM,MAAM,MAAM,KAAK;AACvB,MAAI,IAAI,iBAAiB,QAAQ;AAC/B,gBAAY,IAAI,WAAW,IAAI;AAC/B,UAAM,KAAK,CAAC,UAAU;AAAE,kBAAY,IAAI,WAAW;AAAA,OAAU,CAAE,MAAM;AAAA,SAChE;AACL,QAAI,IAAI,UAAU;AAAW,UAAI,YAAY,IAAI;AACjD,UAAM,KAAK,CAAC,UAAU;AAAE,UAAI,YAAY;AAAA;AAAA;AAAA;qBAIhB,OAAgC,UAAoB,IAA6B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