diff --git a/build/trois.d.ts b/build/trois.d.ts index c465d5e..ec3b821 100644 --- a/build/trois.d.ts +++ b/build/trois.d.ts @@ -1,7 +1,7 @@ import * as vue from 'vue'; import { InjectionKey, PropType, ComponentPublicInstance, ComponentPropsOptions, App } from 'vue'; import * as three from 'three'; -import { Mesh as Mesh$1, InstancedMesh, Vector2, Vector3, Intersection, WebGLRenderer, Camera, Scene, Object3D, OrthographicCamera, PerspectiveCamera, Group, WebGLCubeRenderTarget, CubeCamera, BufferGeometry, Material, Curve, Light, Texture, MeshBasicMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshPhongMaterial, MeshPhysicalMaterial, ShaderMaterial, MeshStandardMaterial, MeshToonMaterial, TextGeometry, Font, SpriteMaterial, Sprite, TextureLoader } from 'three'; +import { Mesh as Mesh$1, InstancedMesh, Vector2, Vector3, Intersection, WebGLRenderer, Camera, Scene, Object3D, OrthographicCamera, PerspectiveCamera, Group, WebGLCubeRenderTarget, CubeCamera, BufferGeometry, Material, Curve, Light, Texture, MeshBasicMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshPhongMaterial, MeshPhysicalMaterial, ShaderMaterial, MeshStandardMaterial, MeshToonMaterial, PointsMaterial, TextGeometry, Font, SpriteMaterial, Sprite, Points, TextureLoader } from 'three'; import { EffectComposer as EffectComposer$1 } from 'three/examples/jsm/postprocessing/EffectComposer'; import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'; import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'; @@ -115,12 +115,16 @@ interface EventCallbackMap { 'afterrender': RenderCallbackType; 'resize': ResizeCallbackType; } +interface RenderFunctionEventInterface { + renderer: RendererInterface; + time: number; +} interface RendererSetupInterface { canvas: HTMLCanvasElement; three: ThreeInterface; renderer: WebGLRenderer; size: SizeInterface; - renderFn(): void; + renderFn(e: RenderFunctionEventInterface): void; raf: boolean; initCallbacks: InitCallbackType[]; mountedCallbacks: MountedCallbackType[]; @@ -144,7 +148,7 @@ interface RendererInterface extends RendererSetupInterface { removeListener(t: T, cb: EventCallbackMap[T]): void; } declare const RendererInjectionKey: InjectionKey; -declare const _default$1a: vue.DefineComponent<{ +declare const _default$1c: vue.DefineComponent<{ antialias: BooleanConstructor; alpha: BooleanConstructor; autoClear: { @@ -164,6 +168,14 @@ declare const _default$1a: vue.DefineComponent<{ default: boolean; }; shadow: BooleanConstructor; + shadowType: { + type: NumberConstructor; + default: three.ShadowMapType; + }; + toneMapping: { + type: NumberConstructor; + default: three.ToneMapping; + }; width: StringConstructor; height: StringConstructor; xr: BooleanConstructor; @@ -204,6 +216,8 @@ declare const _default$1a: vue.DefineComponent<{ autoClear: boolean; orbitCtrl: boolean | Record; shadow: boolean; + shadowType: number; + toneMapping: number; xr: boolean; } & { onClick?: ((this: HTMLCanvasElement, ev: MouseEvent) => any) | undefined; @@ -218,6 +232,8 @@ declare const _default$1a: vue.DefineComponent<{ autoClear: boolean; orbitCtrl: boolean | Record; shadow: boolean; + shadowType: number; + toneMapping: number; xr: boolean; }>; @@ -237,7 +253,7 @@ interface Vector3PropInterface extends Vector2PropInterface { interface EulerPropInterface extends Vector3PropInterface { order?: 'XYZ' | 'YZX' | 'ZXY' | 'XZY' | 'YXZ' | 'ZYX'; } -declare const _default$19: vue.DefineComponent<{ +declare const _default$1b: vue.DefineComponent<{ position: { type: PropType; default: () => { @@ -298,7 +314,7 @@ declare const _default$19: vue.DefineComponent<{ userData: Record; }>; -declare const _default$18: vue.DefineComponent<{ +declare const _default$1a: vue.DefineComponent<{ left: { type: NumberConstructor; default: number; @@ -358,7 +374,7 @@ declare const _default$18: vue.DefineComponent<{ far: number; }>; -declare const _default$17: vue.DefineComponent<{ +declare const _default$19: vue.DefineComponent<{ aspect: { type: NumberConstructor; default: number; @@ -406,7 +422,7 @@ declare const _default$17: vue.DefineComponent<{ fov: number; }>; -declare const _default$16: vue.DefineComponent<{}, { +declare const _default$18: vue.DefineComponent<{}, { group: Group; }, {}, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ position: { @@ -470,7 +486,7 @@ declare const _default$16: vue.DefineComponent<{}, { }>, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>; declare const SceneInjectionKey: InjectionKey; -declare const _default$15: vue.DefineComponent<{ +declare const _default$17: vue.DefineComponent<{ background: (ObjectConstructor | StringConstructor | NumberConstructor)[]; }, { scene: Scene; @@ -484,7 +500,7 @@ interface RaycasterSetupInterface { renderer?: RendererInterface; pointer?: PointerInterface; } -declare const _default$14: vue.DefineComponent<{ +declare const _default$16: vue.DefineComponent<{ onPointerEnter: { type: PropType; default: PointerIntersectCallbackType; @@ -527,7 +543,7 @@ declare const _default$14: vue.DefineComponent<{ intersectMode: string; }>; -declare const _default$13: vue.DefineComponent<{ +declare const _default$15: vue.DefineComponent<{ cubeRTSize: { type: NumberConstructor; default: number; @@ -723,8 +739,35 @@ interface GeometrySetupInterface { geometry?: BufferGeometry; watchProps?: string[]; } +interface GeometryAttributeInterface { + name: string; + array: ArrayLike; + itemSize: number; + normalized?: boolean; +} +declare const Geometry: vue.DefineComponent<{ + rotateX: NumberConstructor; + rotateY: NumberConstructor; + rotateZ: NumberConstructor; + attributes: { + type: PropType; + default: () => never[]; + }; +}, GeometrySetupInterface, unknown, {}, { + createGeometry(): void; + rotateGeometry(): void; + refreshGeometry(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { + rotateX?: number | undefined; + rotateY?: number | undefined; + rotateZ?: number | undefined; +}>, { + attributes: GeometryAttributeInterface[]; +}>; -declare const _default$12: vue.DefineComponent<{ +declare const _default$14: vue.DefineComponent<{ readonly size: NumberConstructor; readonly width: { readonly type: NumberConstructor; @@ -756,15 +799,23 @@ declare const _default$12: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ width: number; height: number; depth: number; @@ -782,7 +833,7 @@ declare const _default$12: vue.DefineComponent<{ depthSegments: number; }>; -declare const _default$11: vue.DefineComponent<{ +declare const _default$13: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -805,15 +856,23 @@ declare const _default$11: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ segments: number; radius: number; thetaStart: number; @@ -825,7 +884,7 @@ declare const _default$11: vue.DefineComponent<{ thetaLength: number; }>; -declare const _default$10: vue.DefineComponent<{ +declare const _default$12: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -860,15 +919,23 @@ declare const _default$10: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ height: number; heightSegments: number; radius: number; @@ -886,7 +953,7 @@ declare const _default$10: vue.DefineComponent<{ openEnded: boolean; }>; -declare const _default$$: vue.DefineComponent<{ +declare const _default$11: vue.DefineComponent<{ readonly radiusTop: { readonly type: NumberConstructor; readonly default: 1; @@ -925,15 +992,23 @@ declare const _default$$: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ height: number; heightSegments: number; thetaStart: number; @@ -953,7 +1028,7 @@ declare const _default$$: vue.DefineComponent<{ radiusBottom: number; }>; -declare const _default$_: vue.DefineComponent<{ +declare const _default$10: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -968,15 +1043,23 @@ declare const _default$_: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ radius: number; detail: number; } & {}>, { @@ -984,7 +1067,7 @@ declare const _default$_: vue.DefineComponent<{ detail: number; }>; -declare const _default$Z: vue.DefineComponent<{ +declare const _default$$: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -999,15 +1082,23 @@ declare const _default$Z: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ radius: number; detail: number; } & {}>, { @@ -1015,7 +1106,7 @@ declare const _default$Z: vue.DefineComponent<{ detail: number; }>; -declare const _default$Y: vue.DefineComponent<{ +declare const _default$_: vue.DefineComponent<{ readonly points: ArrayConstructor; readonly segments: { readonly type: NumberConstructor; @@ -1035,15 +1126,23 @@ declare const _default$Y: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ segments: number; phiStart: number; phiLength: number; @@ -1055,7 +1154,7 @@ declare const _default$Y: vue.DefineComponent<{ phiLength: number; }>; -declare const _default$X: vue.DefineComponent<{ +declare const _default$Z: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -1070,15 +1169,23 @@ declare const _default$X: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ radius: number; detail: number; } & {}>, { @@ -1086,7 +1193,7 @@ declare const _default$X: vue.DefineComponent<{ detail: number; }>; -declare const _default$W: vue.DefineComponent<{ +declare const _default$Y: vue.DefineComponent<{ readonly width: { readonly type: NumberConstructor; readonly default: 1; @@ -1109,15 +1216,23 @@ declare const _default$W: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ width: number; height: number; widthSegments: number; @@ -1129,7 +1244,7 @@ declare const _default$W: vue.DefineComponent<{ heightSegments: number; }>; -declare const _default$V: vue.DefineComponent<{ +declare const _default$X: vue.DefineComponent<{ readonly vertices: ArrayConstructor; readonly indices: ArrayConstructor; readonly radius: { @@ -1146,15 +1261,23 @@ declare const _default$V: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ radius: number; detail: number; } & { @@ -1165,7 +1288,7 @@ declare const _default$V: vue.DefineComponent<{ detail: number; }>; -declare const _default$U: vue.DefineComponent<{ +declare const _default$W: vue.DefineComponent<{ readonly innerRadius: { readonly type: NumberConstructor; readonly default: 0.5; @@ -1196,15 +1319,23 @@ declare const _default$U: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ thetaStart: number; thetaLength: number; innerRadius: number; @@ -1220,7 +1351,7 @@ declare const _default$U: vue.DefineComponent<{ phiSegments: number; }>; -declare const _default$T: vue.DefineComponent<{ +declare const _default$V: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -1239,15 +1370,23 @@ declare const _default$T: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ widthSegments: number; heightSegments: number; radius: number; @@ -1257,7 +1396,7 @@ declare const _default$T: vue.DefineComponent<{ radius: number; }>; -declare const _default$S: vue.DefineComponent<{ +declare const _default$U: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -1272,15 +1411,23 @@ declare const _default$S: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ radius: number; detail: number; } & {}>, { @@ -1288,7 +1435,7 @@ declare const _default$S: vue.DefineComponent<{ detail: number; }>; -declare const _default$R: vue.DefineComponent<{ +declare const _default$T: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -1315,15 +1462,23 @@ declare const _default$R: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ radius: number; radialSegments: number; tube: number; @@ -1337,7 +1492,7 @@ declare const _default$R: vue.DefineComponent<{ arc: number; }>; -declare const _default$Q: vue.DefineComponent<{ +declare const _default$S: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -1368,15 +1523,23 @@ declare const _default$Q: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ p: number; q: number; radius: number; @@ -1392,7 +1555,7 @@ declare const _default$Q: vue.DefineComponent<{ tubularSegments: number; }>; -declare const _default$P: vue.DefineComponent<{ +declare const _default$R: vue.DefineComponent<{ readonly points: ArrayConstructor; readonly path: typeof Curve; readonly tubularSegments: { @@ -1418,15 +1581,23 @@ declare const _default$P: vue.DefineComponent<{ rotateX: NumberConstructor; rotateY: NumberConstructor; rotateZ: NumberConstructor; + attributes: { + type: vue.PropType; + default: () => never[]; + }; }, GeometrySetupInterface, unknown, {}, { createGeometry(): void; rotateGeometry(): void; refreshGeometry(): void; -}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & { +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + attributes: GeometryAttributeInterface[]; +} & { rotateX?: number | undefined; rotateY?: number | undefined; rotateZ?: number | undefined; -}>, {}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ +}>, { + attributes: GeometryAttributeInterface[]; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ closed: boolean; radius: number; radialSegments: number; @@ -1445,7 +1616,7 @@ interface LightSetupInterface { light?: Light; } -declare const _default$O: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ +declare const _default$Q: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ color: { type: StringConstructor; default: string; @@ -1544,7 +1715,7 @@ declare const _default$O: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentO shadowCamera: Record; }>, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>; -declare const _default$N: vue.DefineComponent<{ +declare const _default$P: vue.DefineComponent<{ target: { type: PropType; default: () => { @@ -1656,7 +1827,7 @@ declare const _default$N: vue.DefineComponent<{ target: Vector2PropInterface; }>; -declare const _default$M: vue.DefineComponent<{ +declare const _default$O: vue.DefineComponent<{ groundColor: { type: StringConstructor; default: string; @@ -1764,7 +1935,7 @@ declare const _default$M: vue.DefineComponent<{ groundColor: string; }>; -declare const _default$L: vue.DefineComponent<{ +declare const _default$N: vue.DefineComponent<{ distance: { type: NumberConstructor; default: number; @@ -1878,7 +2049,7 @@ declare const _default$L: vue.DefineComponent<{ decay: number; }>; -declare const _default$K: vue.DefineComponent<{ +declare const _default$M: vue.DefineComponent<{ width: { type: NumberConstructor; default: number; @@ -1995,7 +2166,7 @@ declare const _default$K: vue.DefineComponent<{ helper: boolean; }>; -declare const _default$J: vue.DefineComponent<{ +declare const _default$L: vue.DefineComponent<{ angle: { type: NumberConstructor; default: number; @@ -2134,11 +2305,19 @@ interface MaterialInterface extends MaterialSetupInterface { setTexture(texture: Texture | null, key: string): void; } declare const MaterialInjectionKey: InjectionKey; -declare const _default$I: vue.DefineComponent<{ +declare const _default$K: vue.DefineComponent<{ color: { - type: (StringConstructor | NumberConstructor)[]; + type: PropType; default: string; }; + blending: { + type: NumberConstructor; + default: three.Blending; + }; + alphaTest: { + type: NumberConstructor; + default: number; + }; depthTest: { type: BooleanConstructor; default: boolean; @@ -2168,6 +2347,8 @@ declare const _default$I: vue.DefineComponent<{ }, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2177,6 +2358,8 @@ declare const _default$I: vue.DefineComponent<{ } & {}>, { transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2185,7 +2368,7 @@ declare const _default$I: vue.DefineComponent<{ vertexColors: boolean; }>; -declare const _default$H: vue.DefineComponent<{ +declare const _default$J: vue.DefineComponent<{ wireframe: { type: BooleanConstructor; default: boolean; @@ -2198,9 +2381,17 @@ declare const _default$H: vue.DefineComponent<{ createMaterial(): MeshBasicMaterial; }, vue.ComponentOptionsMixin, vue.DefineComponent<{ color: { - type: (StringConstructor | NumberConstructor)[]; + type: vue.PropType; default: string; }; + blending: { + type: NumberConstructor; + default: three.Blending; + }; + alphaTest: { + type: NumberConstructor; + default: number; + }; depthTest: { type: BooleanConstructor; default: boolean; @@ -2230,6 +2421,8 @@ declare const _default$H: vue.DefineComponent<{ }, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2239,6 +2432,8 @@ declare const _default$H: vue.DefineComponent<{ } & {}>, { transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2253,7 +2448,7 @@ declare const _default$H: vue.DefineComponent<{ wireframeLinewidth: number; }>; -declare const _default$G: vue.DefineComponent<{ +declare const _default$I: vue.DefineComponent<{ wireframe: { type: BooleanConstructor; default: boolean; @@ -2266,9 +2461,17 @@ declare const _default$G: vue.DefineComponent<{ createMaterial(): MeshLambertMaterial; }, vue.ComponentOptionsMixin, vue.DefineComponent<{ color: { - type: (StringConstructor | NumberConstructor)[]; + type: vue.PropType; default: string; }; + blending: { + type: NumberConstructor; + default: three.Blending; + }; + alphaTest: { + type: NumberConstructor; + default: number; + }; depthTest: { type: BooleanConstructor; default: boolean; @@ -2298,6 +2501,8 @@ declare const _default$G: vue.DefineComponent<{ }, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2307,6 +2512,8 @@ declare const _default$G: vue.DefineComponent<{ } & {}>, { transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2321,7 +2528,7 @@ declare const _default$G: vue.DefineComponent<{ wireframeLinewidth: number; }>; -declare const _default$F: vue.DefineComponent<{ +declare const _default$H: vue.DefineComponent<{ src: StringConstructor; name: { type: StringConstructor; @@ -2332,9 +2539,17 @@ declare const _default$F: vue.DefineComponent<{ createMaterial(): MeshMatcapMaterial; }, vue.ComponentOptionsMixin, vue.DefineComponent<{ color: { - type: (StringConstructor | NumberConstructor)[]; + type: vue.PropType; default: string; }; + blending: { + type: NumberConstructor; + default: three.Blending; + }; + alphaTest: { + type: NumberConstructor; + default: number; + }; depthTest: { type: BooleanConstructor; default: boolean; @@ -2364,6 +2579,8 @@ declare const _default$F: vue.DefineComponent<{ }, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2373,6 +2590,8 @@ declare const _default$F: vue.DefineComponent<{ } & {}>, { transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2389,7 +2608,7 @@ declare const _default$F: vue.DefineComponent<{ flatShading: boolean; }>; -declare const _default$E: vue.DefineComponent<{ +declare const _default$G: vue.DefineComponent<{ wireframe: { type: BooleanConstructor; default: boolean; @@ -2423,9 +2642,17 @@ declare const _default$E: vue.DefineComponent<{ createMaterial(): MeshPhongMaterial; }, vue.ComponentOptionsMixin, vue.DefineComponent<{ color: { - type: (StringConstructor | NumberConstructor)[]; + type: vue.PropType; default: string; }; + blending: { + type: NumberConstructor; + default: three.Blending; + }; + alphaTest: { + type: NumberConstructor; + default: number; + }; depthTest: { type: BooleanConstructor; default: boolean; @@ -2455,6 +2682,8 @@ declare const _default$E: vue.DefineComponent<{ }, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2464,6 +2693,8 @@ declare const _default$E: vue.DefineComponent<{ } & {}>, { transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2490,7 +2721,7 @@ declare const _default$E: vue.DefineComponent<{ specular: string | number; }>; -declare const _default$D: vue.DefineComponent<{ +declare const _default$F: vue.DefineComponent<{ flatShading: BooleanConstructor; }, unknown, unknown, {}, { createMaterial(): MeshPhysicalMaterial; @@ -2559,9 +2790,17 @@ declare const _default$D: vue.DefineComponent<{ createMaterial(): three.MeshStandardMaterial; }, vue.ComponentOptionsMixin, vue.DefineComponent<{ color: { - type: (StringConstructor | NumberConstructor)[]; + type: vue.PropType; default: string; }; + blending: { + type: NumberConstructor; + default: three.Blending; + }; + alphaTest: { + type: NumberConstructor; + default: number; + }; depthTest: { type: BooleanConstructor; default: boolean; @@ -2591,6 +2830,8 @@ declare const _default$D: vue.DefineComponent<{ }, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2600,6 +2841,8 @@ declare const _default$D: vue.DefineComponent<{ } & {}>, { transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2644,7 +2887,7 @@ declare const _default$D: vue.DefineComponent<{ flatShading: boolean; }>; -declare const _default$C: vue.DefineComponent<{ +declare const _default$E: vue.DefineComponent<{ uniforms: { type: ObjectConstructor; default: () => {}; @@ -2659,12 +2902,19 @@ declare const _default$C: vue.DefineComponent<{ }; }, unknown, unknown, {}, { createMaterial(): ShaderMaterial; - addWatchers(): void; }, vue.ComponentOptionsMixin, vue.DefineComponent<{ color: { - type: (StringConstructor | NumberConstructor)[]; + type: vue.PropType; default: string; }; + blending: { + type: NumberConstructor; + default: three.Blending; + }; + alphaTest: { + type: NumberConstructor; + default: number; + }; depthTest: { type: BooleanConstructor; default: boolean; @@ -2694,6 +2944,8 @@ declare const _default$C: vue.DefineComponent<{ }, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2703,6 +2955,8 @@ declare const _default$C: vue.DefineComponent<{ } & {}>, { transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2719,7 +2973,7 @@ declare const _default$C: vue.DefineComponent<{ fragmentShader: string; }>; -declare const _default$B: vue.DefineComponent<{ +declare const _default$D: vue.DefineComponent<{ wireframe: { type: BooleanConstructor; default: boolean; @@ -2784,9 +3038,17 @@ declare const _default$B: vue.DefineComponent<{ createMaterial(): MeshStandardMaterial; }, vue.ComponentOptionsMixin, vue.DefineComponent<{ color: { - type: (StringConstructor | NumberConstructor)[]; + type: PropType; default: string; }; + blending: { + type: NumberConstructor; + default: three.Blending; + }; + alphaTest: { + type: NumberConstructor; + default: number; + }; depthTest: { type: BooleanConstructor; default: boolean; @@ -2816,6 +3078,8 @@ declare const _default$B: vue.DefineComponent<{ }, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2825,6 +3089,8 @@ declare const _default$B: vue.DefineComponent<{ } & {}>, { transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2865,7 +3131,7 @@ declare const _default$B: vue.DefineComponent<{ refractionRatio: number; }>; -declare const _default$A: vue.DefineComponent<{ +declare const _default$C: vue.DefineComponent<{ readonly color: { readonly type: PropType; readonly default: "#ffffff"; @@ -2898,9 +3164,17 @@ declare const _default$A: vue.DefineComponent<{ createMaterial(): ShaderMaterial; }, vue.ComponentOptionsMixin, vue.DefineComponent<{ color: { - type: (StringConstructor | NumberConstructor)[]; + type: PropType; default: string; }; + blending: { + type: NumberConstructor; + default: three.Blending; + }; + alphaTest: { + type: NumberConstructor; + default: number; + }; depthTest: { type: BooleanConstructor; default: boolean; @@ -2930,6 +3204,8 @@ declare const _default$A: vue.DefineComponent<{ }, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2939,6 +3215,8 @@ declare const _default$A: vue.DefineComponent<{ } & {}>, { transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -2963,7 +3241,7 @@ declare const _default$A: vue.DefineComponent<{ thicknessScale: number; }>; -declare const _default$z: vue.DefineComponent<{ +declare const _default$B: vue.DefineComponent<{ wireframe: { type: BooleanConstructor; default: boolean; @@ -2976,9 +3254,17 @@ declare const _default$z: vue.DefineComponent<{ createMaterial(): MeshToonMaterial; }, vue.ComponentOptionsMixin, vue.DefineComponent<{ color: { - type: (StringConstructor | NumberConstructor)[]; + type: vue.PropType; default: string; }; + blending: { + type: NumberConstructor; + default: three.Blending; + }; + alphaTest: { + type: NumberConstructor; + default: number; + }; depthTest: { type: BooleanConstructor; default: boolean; @@ -3008,6 +3294,8 @@ declare const _default$z: vue.DefineComponent<{ }, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -3017,6 +3305,8 @@ declare const _default$z: vue.DefineComponent<{ } & {}>, { transparent: boolean; color: string | number; + blending: number; + alphaTest: number; depthTest: boolean; depthWrite: boolean; fog: boolean; @@ -3035,7 +3325,7 @@ interface TexureInterface { material?: MaterialInterface; texture?: Texture; } -declare const _default$y: vue.DefineComponent<{ +declare const _default$A: vue.DefineComponent<{ name: { type: StringConstructor; default: string; @@ -3045,6 +3335,10 @@ declare const _default$y: vue.DefineComponent<{ onLoad: PropType<(t: Texture) => void>; onProgress: PropType<(e: ProgressEvent) => void>; onError: PropType<(e: ErrorEvent) => void>; + encoding: { + type: NumberConstructor; + default: three.TextureEncoding; + }; mapping: { type: NumberConstructor; default: three.Mapping; @@ -3092,6 +3386,7 @@ declare const _default$y: vue.DefineComponent<{ center: Vector2PropInterface; name: string; rotation: number; + encoding: number; mapping: number; wrapS: number; wrapT: number; @@ -3108,6 +3403,7 @@ declare const _default$y: vue.DefineComponent<{ center: Vector2PropInterface; name: string; rotation: number; + encoding: number; mapping: number; wrapS: number; wrapT: number; @@ -3115,7 +3411,7 @@ declare const _default$y: vue.DefineComponent<{ minFilter: number; }>; -declare const _default$x: vue.DefineComponent<{ +declare const _default$z: vue.DefineComponent<{ path: { type: StringConstructor; required: true; @@ -3140,6 +3436,10 @@ declare const _default$x: vue.DefineComponent<{ onLoad: PropType<(t: three.Texture) => void>; onProgress: PropType<(e: ProgressEvent) => void>; onError: PropType<(e: ErrorEvent) => void>; + encoding: { + type: NumberConstructor; + default: three.TextureEncoding; + }; mapping: { type: NumberConstructor; default: three.Mapping; @@ -3187,6 +3487,7 @@ declare const _default$x: vue.DefineComponent<{ center: Vector2PropInterface; name: string; rotation: number; + encoding: number; mapping: number; wrapS: number; wrapT: number; @@ -3203,6 +3504,7 @@ declare const _default$x: vue.DefineComponent<{ center: Vector2PropInterface; name: string; rotation: number; + encoding: number; mapping: number; wrapS: number; wrapT: number; @@ -3217,7 +3519,87 @@ declare const _default$x: vue.DefineComponent<{ urls: string[]; }>; -declare const _default$w: vue.DefineComponent<{ +declare const _default$y: vue.DefineComponent<{ + size: { + type: NumberConstructor; + default: number; + }; + sizeAttenuation: { + type: BooleanConstructor; + default: boolean; + }; +}, unknown, unknown, {}, { + createMaterial(): PointsMaterial; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + color: { + type: vue.PropType; + default: string; + }; + blending: { + type: NumberConstructor; + default: three.Blending; + }; + alphaTest: { + type: NumberConstructor; + default: number; + }; + depthTest: { + type: BooleanConstructor; + default: boolean; + }; + depthWrite: { + type: BooleanConstructor; + default: boolean; + }; + fog: { + type: BooleanConstructor; + default: boolean; + }; + opacity: { + type: NumberConstructor; + default: number; + }; + side: { + type: NumberConstructor; + default: three.Side; + }; + transparent: BooleanConstructor; + vertexColors: BooleanConstructor; +}, MaterialSetupInterface, unknown, {}, { + setProp(key: string, value: any, needsUpdate?: boolean): void; + setTexture(texture: three.Texture | null, key?: string): void; + addWatchers(): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + transparent: boolean; + color: string | number; + blending: number; + alphaTest: number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +} & {}>, { + transparent: boolean; + color: string | number; + blending: number; + alphaTest: number; + depthTest: boolean; + depthWrite: boolean; + fog: boolean; + opacity: number; + side: number; + vertexColors: boolean; +}>, Record, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + size: number; + sizeAttenuation: boolean; +} & {}>, { + size: number; + sizeAttenuation: boolean; +}>; + +declare const _default$x: vue.DefineComponent<{ readonly size: NumberConstructor; readonly width: { readonly type: NumberConstructor; @@ -3355,7 +3737,7 @@ declare const _default$w: vue.DefineComponent<{ depthSegments: number; }>; -declare const _default$v: vue.DefineComponent<{ +declare const _default$w: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -3478,7 +3860,7 @@ declare const _default$v: vue.DefineComponent<{ thetaLength: number; }>; -declare const _default$u: vue.DefineComponent<{ +declare const _default$v: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -3619,7 +4001,7 @@ declare const _default$u: vue.DefineComponent<{ openEnded: boolean; }>; -declare const _default$t: vue.DefineComponent<{ +declare const _default$u: vue.DefineComponent<{ readonly radiusTop: { readonly type: NumberConstructor; readonly default: 1; @@ -3766,7 +4148,7 @@ declare const _default$t: vue.DefineComponent<{ radiusBottom: number; }>; -declare const _default$s: vue.DefineComponent<{ +declare const _default$t: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -3877,7 +4259,7 @@ declare const _default$s: vue.DefineComponent<{ detail: number; }>; -declare const _default$r: vue.DefineComponent<{ +declare const _default$s: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -3988,7 +4370,7 @@ declare const _default$r: vue.DefineComponent<{ detail: number; }>; -declare const _default$q: vue.DefineComponent<{ +declare const _default$r: vue.DefineComponent<{ readonly points: ArrayConstructor; readonly segments: { readonly type: NumberConstructor; @@ -4108,7 +4490,7 @@ declare const _default$q: vue.DefineComponent<{ phiLength: number; }>; -declare const _default$p: vue.DefineComponent<{ +declare const _default$q: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -4219,7 +4601,7 @@ declare const _default$p: vue.DefineComponent<{ detail: number; }>; -declare const _default$o: vue.DefineComponent<{ +declare const _default$p: vue.DefineComponent<{ readonly width: { readonly type: NumberConstructor; readonly default: 1; @@ -4342,7 +4724,7 @@ declare const _default$o: vue.DefineComponent<{ heightSegments: number; }>; -declare const _default$n: vue.DefineComponent<{ +declare const _default$o: vue.DefineComponent<{ readonly vertices: ArrayConstructor; readonly indices: ArrayConstructor; readonly radius: { @@ -4458,7 +4840,7 @@ declare const _default$n: vue.DefineComponent<{ detail: number; }>; -declare const _default$m: vue.DefineComponent<{ +declare const _default$n: vue.DefineComponent<{ readonly innerRadius: { readonly type: NumberConstructor; readonly default: 0.5; @@ -4593,7 +4975,7 @@ declare const _default$m: vue.DefineComponent<{ phiSegments: number; }>; -declare const _default$l: vue.DefineComponent<{ +declare const _default$m: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -4710,7 +5092,7 @@ declare const _default$l: vue.DefineComponent<{ radius: number; }>; -declare const _default$k: vue.DefineComponent<{ +declare const _default$l: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -4825,7 +5207,7 @@ interface TextSetupInterface extends MeshSetupInterface { geometry?: TextGeometry; font?: Font; } -declare const _default$j: vue.DefineComponent<{ +declare const _default$k: vue.DefineComponent<{ readonly text: { readonly type: StringConstructor; readonly required: true; @@ -4996,7 +5378,7 @@ declare const _default$j: vue.DefineComponent<{ align: string | boolean; }>; -declare const _default$i: vue.DefineComponent<{ +declare const _default$j: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -5125,7 +5507,7 @@ declare const _default$i: vue.DefineComponent<{ arc: number; }>; -declare const _default$h: vue.DefineComponent<{ +declare const _default$i: vue.DefineComponent<{ readonly radius: { readonly type: NumberConstructor; readonly default: 1; @@ -5260,7 +5642,7 @@ declare const _default$h: vue.DefineComponent<{ tubularSegments: number; }>; -declare const _default$g: vue.DefineComponent<{ +declare const _default$h: vue.DefineComponent<{ readonly points: ArrayConstructor; readonly path: typeof three.Curve; readonly tubularSegments: { @@ -5393,7 +5775,7 @@ interface ImageSetupInterface extends MeshSetupInterface { material?: MeshBasicMaterial; texture?: Texture; } -declare const _default$f: vue.DefineComponent<{ +declare const _default$g: vue.DefineComponent<{ src: { type: StringConstructor; required: true; @@ -5520,7 +5902,7 @@ declare const _default$f: vue.DefineComponent<{ keepSize: boolean; }>; -declare const _default$e: vue.DefineComponent<{ +declare const _default$f: vue.DefineComponent<{ count: { type: NumberConstructor; required: true; @@ -5628,7 +6010,7 @@ interface SpriteSetupInterface extends Object3DSetupInterface { material?: SpriteMaterial; sprite?: Sprite; } -declare const _default$d: vue.DefineComponent<{ +declare const _default$e: vue.DefineComponent<{ src: { type: StringConstructor; required: true; @@ -5699,6 +6081,76 @@ declare const _default$d: vue.DefineComponent<{ src: string; } & {}>, {}>; +interface PointsSetupInterface extends Object3DSetupInterface { + mesh?: Points; + points?: Points; + geometry?: BufferGeometry; + material?: Material; +} +declare const _default$d: vue.DefineComponent<{}, PointsSetupInterface, {}, {}, { + setGeometry(geometry: BufferGeometry): void; + setMaterial(material: Material): void; +}, vue.ComponentOptionsMixin, vue.DefineComponent<{ + position: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + rotation: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + }; + }; + scale: { + type: vue.PropType; + default: () => { + x: number; + y: number; + z: number; + order: string; + }; + }; + lookAt: { + type: vue.PropType; + default: null; + }; + autoRemove: { + type: BooleanConstructor; + default: boolean; + }; + userData: { + type: ObjectConstructor; + default: () => {}; + }; +}, Object3DSetupInterface, unknown, {}, { + initObject3D(o3d: three.Object3D): void; + getParent(): vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase> | undefined; + addToParent(o?: three.Object3D | undefined): boolean; + removeFromParent(o?: three.Object3D | undefined): boolean; + add(o: three.Object3D): void; + remove(o: three.Object3D): void; +}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("created" | "ready")[], "created" | "ready", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{ + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +} & {}>, { + position: Vector3PropInterface; + rotation: EulerPropInterface; + scale: Vector3PropInterface; + lookAt: Vector3PropInterface; + autoRemove: boolean; + userData: Record; +}>, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {}>, {}>; + declare const _default$c: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.DefineComponent<{ src: { type: StringConstructor; @@ -6124,4 +6576,4 @@ interface TexturesInterface { } declare function useTextures(): TexturesInterface; -export { _default$O as AmbientLight, _default$H as BasicMaterial, _default$8 as BokehPass, _default$w as Box, _default$12 as BoxGeometry, _default$17 as Camera, _default$v as Circle, _default$11 as CircleGeometry, ComposerInjectionKey, _default$u as Cone, _default$10 as ConeGeometry, _default$13 as CubeCamera, _default$x as CubeTexture, _default$t as Cylinder, _default$$ as CylinderGeometry, _default$N as DirectionalLight, _default$s as Dodecahedron, _default$_ as DodecahedronGeometry, _default$a as EffectComposer, _default$b as FBXModel, _default$6 as FXAAPass, _default$7 as FilmPass, _default$c as GLTFModel, _default$16 as Group, _default$5 as HalftonePass, _default$M as HemisphereLight, _default$r as Icosahedron, _default$Z as IcosahedronGeometry, _default$f as Image, _default$e as InstancedMesh, _default$G as LambertMaterial, _default$q as Lathe, _default$Y as LatheGeometry, _default$F as MatcapMaterial, _default$I as Material, MaterialInjectionKey, Mesh, MeshInjectionKey, _default$19 as Object3D, _default$p as Octahedron, _default$X as OctahedronGeometry, _default$18 as OrthographicCamera, _default$17 as PerspectiveCamera, _default$E as PhongMaterial, _default$D as PhysicalMaterial, _default$o as Plane, _default$W as PlaneGeometry, _default$L as PointLight, _default$n as Polyhedron, _default$V as PolyhedronGeometry, _default$14 as Raycaster, _default$K as RectAreaLight, _default$9 as RenderPass, _default$1a as Renderer, RendererInjectionKey, _default$m as Ring, _default$U as RingGeometry, _default$4 as SMAAPass, _default$3 as SSAOPass, _default$15 as Scene, SceneInjectionKey, _default$C as ShaderMaterial, _default$l as Sphere, _default$T as SphereGeometry, _default$J as SpotLight, _default$d as Sprite, _default$B as StandardMaterial, _default$A as SubSurfaceMaterial, _default$k as Tetrahedron, _default$S as TetrahedronGeometry, _default$j as Text, _default$y as Texture, _default$2 as TiltShiftPass, _default$z as ToonMaterial, _default$i as Torus, _default$R as TorusGeometry, _default$h as TorusKnot, _default$Q as TorusKnotGeometry, TroisJSVuePlugin, _default$g as Tube, _default$P as TubeGeometry, _default$1 as UnrealBloomPass, _default as ZoomBlurPass, bindProp, bindProps, createApp, getMatcapUrl, lerp, limit, propsValues, setFromProp, useTextures }; +export { _default$Q as AmbientLight, _default$J as BasicMaterial, _default$8 as BokehPass, _default$x as Box, _default$14 as BoxGeometry, Geometry as BufferGeometry, _default$19 as Camera, _default$w as Circle, _default$13 as CircleGeometry, ComposerInjectionKey, _default$v as Cone, _default$12 as ConeGeometry, _default$15 as CubeCamera, _default$z as CubeTexture, _default$u as Cylinder, _default$11 as CylinderGeometry, _default$P as DirectionalLight, _default$t as Dodecahedron, _default$10 as DodecahedronGeometry, _default$a as EffectComposer, _default$b as FBXModel, _default$6 as FXAAPass, _default$7 as FilmPass, _default$c as GLTFModel, _default$18 as Group, _default$5 as HalftonePass, _default$O as HemisphereLight, _default$s as Icosahedron, _default$$ as IcosahedronGeometry, _default$g as Image, _default$f as InstancedMesh, _default$I as LambertMaterial, _default$r as Lathe, _default$_ as LatheGeometry, _default$H as MatcapMaterial, _default$K as Material, MaterialInjectionKey, Mesh, MeshInjectionKey, _default$1b as Object3D, _default$q as Octahedron, _default$Z as OctahedronGeometry, _default$1a as OrthographicCamera, _default$19 as PerspectiveCamera, _default$G as PhongMaterial, _default$F as PhysicalMaterial, _default$p as Plane, _default$Y as PlaneGeometry, _default$N as PointLight, _default$d as Points, _default$y as PointsMaterial, _default$o as Polyhedron, _default$X as PolyhedronGeometry, _default$16 as Raycaster, _default$M as RectAreaLight, _default$9 as RenderPass, _default$1c as Renderer, RendererInjectionKey, _default$n as Ring, _default$W as RingGeometry, _default$4 as SMAAPass, _default$3 as SSAOPass, _default$17 as Scene, SceneInjectionKey, _default$E as ShaderMaterial, _default$m as Sphere, _default$V as SphereGeometry, _default$L as SpotLight, _default$e as Sprite, _default$D as StandardMaterial, _default$C as SubSurfaceMaterial, _default$l as Tetrahedron, _default$U as TetrahedronGeometry, _default$k as Text, _default$A as Texture, _default$2 as TiltShiftPass, _default$B as ToonMaterial, _default$j as Torus, _default$T as TorusGeometry, _default$i as TorusKnot, _default$S as TorusKnotGeometry, TroisJSVuePlugin, _default$h as Tube, _default$R as TubeGeometry, _default$1 as UnrealBloomPass, _default as ZoomBlurPass, bindProp, bindProps, createApp, getMatcapUrl, lerp, limit, propsValues, setFromProp, useTextures }; diff --git a/build/trois.js b/build/trois.js index 63c928a..41209a9 100644 --- a/build/trois.js +++ b/build/trois.js @@ -2,8 +2,8 @@ Object.defineProperty(exports, '__esModule', { value: true }); -var vue = require('vue'); var three = require('three'); +var vue = require('vue'); var OrbitControls_js = require('three/examples/jsm/controls/OrbitControls.js'); var RectAreaLightUniformsLib_js = require('three/examples/jsm/lights/RectAreaLightUniformsLib.js'); var RectAreaLightHelper_js = require('three/examples/jsm/helpers/RectAreaLightHelper.js'); @@ -20,6 +20,72 @@ var SMAAPass_js = require('three/examples/jsm/postprocessing/SMAAPass.js'); var SSAOPass_js = require('three/examples/jsm/postprocessing/SSAOPass.js'); var UnrealBloomPass_js = require('three/examples/jsm/postprocessing/UnrealBloomPass.js'); +function setFromProp(o, prop) { + if (prop instanceof Object) { + Object.entries(prop).forEach(([key, value]) => { + o[key] = value; + }); + } +} +function bindProps(src, props, dst) { + props.forEach((prop) => { + bindProp(src, prop, dst, prop); + }); +} +function bindProp(src, srcProp, dst, dstProp) { + const _dstProp = dstProp || srcProp; + const ref = vue.toRef(src, srcProp); + if (ref.value instanceof Object) { + setFromProp(dst[_dstProp], ref.value); + vue.watch(ref, (value) => { + setFromProp(dst[_dstProp], value); + }, {deep: true}); + } else { + if (ref.value) + dst[_dstProp] = src[srcProp]; + vue.watch(ref, (value) => { + dst[_dstProp] = value; + }); + } +} +function propsValues(props, exclude = []) { + const values = {}; + Object.entries(props).forEach(([key, value]) => { + if (!exclude || exclude && !exclude.includes(key)) { + values[key] = value; + } + }); + return values; +} +function lerp(value1, value2, amount) { + amount = amount < 0 ? 0 : amount; + amount = amount > 1 ? 1 : amount; + return value1 + (value2 - value1) * amount; +} +function limit(val, min, max) { + return val < min ? min : val > max ? max : val; +} +const MATCAP_ROOT = "https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d"; +const DEFAULT_MATCAP = "0404E8_0404B5_0404CB_3333FC"; +function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024) { + const fileName = `${hash}${getMatcapFormatString(format)}.png`; + return `${MATCAP_ROOT}/${format}/${fileName}`; +} +function getMatcapFormatString(format) { + switch (format) { + case 64: + return "-64px"; + case 128: + return "-128px"; + case 256: + return "-256px"; + case 512: + return "-512px"; + default: + return ""; + } +} + function useRaycaster(options) { const { camera, @@ -93,7 +159,7 @@ function usePointer(options) { } function updatePosition(event) { let x, y; - if (event instanceof TouchEvent && event.touches && event.touches.length > 0) { + if (event.touches && event.touches.length > 0) { x = event.touches[0].clientX; y = event.touches[0].clientY; } else { @@ -389,6 +455,8 @@ var Renderer = vue.defineComponent({ pointer: {type: [Boolean, Object], default: false}, resize: {type: [Boolean, String], default: false}, shadow: Boolean, + shadowType: {type: Number, default: three.PCFShadowMap}, + toneMapping: {type: Number, default: three.NoToneMapping}, width: String, height: String, xr: Boolean, @@ -416,6 +484,7 @@ var Renderer = vue.defineComponent({ if (props.height) config.height = parseInt(props.height); const three = useThree(config); + bindProp(props, "toneMapping", three.renderer); const renderFn = () => { }; if (props.onClick) { @@ -473,7 +542,10 @@ var Renderer = vue.defineComponent({ this.three.config.onResize = (size) => { this.resizeCallbacks.forEach((e) => e({type: "resize", renderer: this, size})); }; - this.renderer.shadowMap.enabled = this.shadow; + if (this.shadow) { + this.renderer.shadowMap.enabled = true; + this.renderer.shadowMap.type = this.shadowType; + } this.renderFn = this.three.composer ? this.three.renderC : this.three.render; this.initCallbacks.forEach((e) => e({type: "init", renderer: this})); (_a = this.onReady) == null ? void 0 : _a.call(this, this); @@ -543,7 +615,7 @@ var Renderer = vue.defineComponent({ }, render(time) { this.beforeRenderCallbacks.forEach((e) => e({type: "beforerender", renderer: this, time})); - this.renderFn(); + this.renderFn({renderer: this, time}); this.afterRenderCallbacks.forEach((e) => e({type: "afterrender", renderer: this, time})); }, renderLoop(time) { @@ -558,72 +630,6 @@ var Renderer = vue.defineComponent({ __hmrId: "Renderer" }); -function setFromProp(o, prop) { - if (prop instanceof Object) { - Object.entries(prop).forEach(([key, value]) => { - o[key] = value; - }); - } -} -function bindProps(src, props, dst) { - props.forEach((prop) => { - bindProp(src, prop, dst, prop); - }); -} -function bindProp(src, srcProp, dst, dstProp) { - const _dstProp = dstProp || srcProp; - const ref = vue.toRef(src, srcProp); - if (ref.value instanceof Object) { - setFromProp(dst[_dstProp], ref.value); - vue.watch(ref, (value) => { - setFromProp(dst[_dstProp], value); - }, {deep: true}); - } else { - if (ref.value) - dst[_dstProp] = src[srcProp]; - vue.watch(ref, (value) => { - dst[_dstProp] = value; - }); - } -} -function propsValues(props, exclude = []) { - const values = {}; - Object.entries(props).forEach(([key, value]) => { - if (!exclude || exclude && !exclude.includes(key)) { - values[key] = value; - } - }); - return values; -} -function lerp(value1, value2, amount) { - amount = amount < 0 ? 0 : amount; - amount = amount > 1 ? 1 : amount; - return value1 + (value2 - value1) * amount; -} -function limit(val, min, max) { - return val < min ? min : val > max ? max : val; -} -const MATCAP_ROOT = "https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d"; -const DEFAULT_MATCAP = "0404E8_0404B5_0404CB_3333FC"; -function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024) { - const fileName = `${hash}${getMatcapFormatString(format)}.png`; - return `${MATCAP_ROOT}/${format}/${fileName}`; -} -function getMatcapFormatString(format) { - switch (format) { - case 64: - return "-64px"; - case 128: - return "-128px"; - case 256: - return "-256px"; - case 512: - return "-512px"; - default: - return ""; - } -} - var Camera = vue.defineComponent({ render() { return this.$slots.default ? this.$slots.default() : []; @@ -1053,7 +1059,8 @@ const Geometry = vue.defineComponent({ props: { rotateX: Number, rotateY: Number, - rotateZ: Number + rotateZ: Number, + attributes: {type: Array, default: () => []} }, inject: { mesh: MeshInjectionKey @@ -1080,6 +1087,16 @@ const Geometry = vue.defineComponent({ }, methods: { createGeometry() { + const bufferAttributes = {}; + const geometry = new three.BufferGeometry(); + this.attributes.forEach((attribute) => { + if (attribute.name && attribute.itemSize && attribute.array) { + const bufferAttribute = bufferAttributes[attribute.name] = new three.BufferAttribute(attribute.array, attribute.itemSize, attribute.normalized); + geometry.setAttribute(attribute.name, bufferAttribute); + } + }); + geometry.computeBoundingBox(); + this.geometry = geometry; }, rotateGeometry() { if (!this.geometry) @@ -1505,6 +1522,8 @@ var Material = vue.defineComponent({ }, props: { color: {type: [String, Number], default: "#ffffff"}, + blending: {type: Number, default: three.NormalBlending}, + alphaTest: {type: Number, default: 0}, depthTest: {type: Boolean, default: true}, depthWrite: {type: Boolean, default: true}, fog: {type: Boolean, default: true}, @@ -1547,7 +1566,7 @@ var Material = vue.defineComponent({ this.setProp(key, texture, true); }, addWatchers() { - ["color", "depthTest", "depthWrite", "fog", "opacity", "side", "transparent"].forEach((p) => { + ["color", "alphaTest", "blending", "depthTest", "depthWrite", "fog", "opacity", "side", "transparent"].forEach((p) => { vue.watch(() => this[p], (value) => { if (p === "color") { this.material.color.set(value); @@ -1725,20 +1744,14 @@ var ShaderMaterial = vue.defineComponent({ }, methods: { createMaterial() { - const material = new three.ShaderMaterial({ - uniforms: this.uniforms, - vertexShader: this.vertexShader, - fragmentShader: this.fragmentShader - }); - const watchProps = ["vertexShader", "fragmentShader"]; - watchProps.forEach((p) => { + const material = new three.ShaderMaterial(propsValues(this.$props, ["color"])); + ["vertexShader", "fragmentShader"].forEach((p) => { vue.watch(() => this[p], (value) => { - this.setProp(p, value, true); + material[p] = value; + material.needsUpdate = true; }); }); return material; - }, - addWatchers() { } }, __hmrId: "ShaderMaterial" @@ -1862,6 +1875,7 @@ var Texture = vue.defineComponent({ onLoad: Function, onProgress: Function, onError: Function, + encoding: {type: Number, default: three.LinearEncoding}, mapping: {type: Number, default: three.UVMapping}, wrapS: {type: Number, default: three.ClampToEdgeWrapping}, wrapT: {type: Number, default: three.ClampToEdgeWrapping}, @@ -1888,7 +1902,7 @@ var Texture = vue.defineComponent({ if (!this.src) return void 0; const texture = new three.TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError); - const wathProps = ["mapping", "wrapS", "wrapT", "magFilter", "minFilter", "repeat", "rotation", "center"]; + const wathProps = ["encoding", "mapping", "wrapS", "wrapT", "magFilter", "minFilter", "repeat", "rotation", "center"]; wathProps.forEach((prop) => { bindProp(this, prop, texture); }); @@ -1934,6 +1948,21 @@ var CubeTexture = vue.defineComponent({ } }); +var PointsMaterial = vue.defineComponent({ + extends: Material, + props: { + size: {type: Number, default: 10}, + sizeAttenuation: {type: Boolean, default: true} + }, + methods: { + createMaterial() { + const material = new three.PointsMaterial(propsValues(this.$props)); + return material; + } + }, + __hmrId: "PointsMaterial" +}); + var Box = meshComponent("Box", props$n, createGeometry$f); var Circle = meshComponent("Circle", props$m, createGeometry$e); @@ -2213,6 +2242,34 @@ var Sprite = vue.defineComponent({ __hmrId: "Sprite" }); +var Points = vue.defineComponent({ + extends: Object3D, + setup() { + return {}; + }, + provide() { + return { + [MeshInjectionKey]: this + }; + }, + mounted() { + this.mesh = this.points = new three.Points(this.geometry, this.material); + this.initObject3D(this.mesh); + }, + methods: { + setGeometry(geometry) { + this.geometry = geometry; + if (this.mesh) + this.mesh.geometry = geometry; + }, + setMaterial(material) { + this.material = material; + if (this.mesh) + this.mesh.material = material; + } + } +}); + var Model = vue.defineComponent({ extends: Object3D, emits: ["load", "progress", "error"], @@ -2737,6 +2794,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ Object3D: Object3D, Raycaster: Raycaster, CubeCamera: CubeCamera, + BufferGeometry: Geometry, BoxGeometry: BoxGeometry, CircleGeometry: CircleGeometry, ConeGeometry: ConeGeometry, @@ -2772,6 +2830,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ ToonMaterial: ToonMaterial, Texture: Texture, CubeTexture: CubeTexture, + PointsMaterial: PointsMaterial, Mesh: Mesh, MeshInjectionKey: MeshInjectionKey, Box: Box, @@ -2794,6 +2853,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ Image: Image, InstancedMesh: InstancedMesh, Sprite: Sprite, + Points: Points, GLTFModel: GLTF, FBXModel: FBX, EffectComposer: EffectComposer, @@ -2941,6 +3001,7 @@ exports.BasicMaterial = BasicMaterial; exports.BokehPass = BokehPass; exports.Box = Box; exports.BoxGeometry = BoxGeometry; +exports.BufferGeometry = Geometry; exports.Camera = PerspectiveCamera; exports.Circle = Circle; exports.CircleGeometry = CircleGeometry; @@ -2984,6 +3045,8 @@ exports.PhysicalMaterial = PhysicalMaterial; exports.Plane = Plane; exports.PlaneGeometry = PlaneGeometry; exports.PointLight = PointLight; +exports.Points = Points; +exports.PointsMaterial = PointsMaterial; exports.Polyhedron = Polyhedron; exports.PolyhedronGeometry = PolyhedronGeometry; exports.Raycaster = Raycaster; diff --git a/build/trois.js.map b/build/trois.js.map index 31d1804..badd5d9 100644 --- a/build/trois.js.map +++ b/build/trois.js.map @@ -1 +1 @@ -{"version":3,"file":"trois.js","sources":["../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/tools.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/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/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 { 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 if (event instanceof TouchEvent && event.touches && event.touches.length > 0) {\n x = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (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((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\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 = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (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 = (obj.camera!)\n const vFOV = (camera.fov * Math.PI) / 180\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z)\n const w = h * camera.aspect\n return [w, h]\n }\n}\n","/* eslint-disable no-use-before-define */\nimport { Camera, Scene, WebGLRenderer } from 'three'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'\nimport { defineComponent, InjectionKey, PropType } from 'vue'\nimport { PointerPublicConfigInterface } from './usePointer'\nimport useThree, { SizeInterface, ThreeConfigInterface, ThreeInterface } from './useThree'\n\ntype CallbackType = (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\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\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 RendererSetupInterface {\n canvas: HTMLCanvasElement\n three: ThreeInterface\n renderer: WebGLRenderer\n size: SizeInterface\n renderFn(): 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: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = 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>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, default: false },\n shadow: Boolean,\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\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 // TODO : improve shadow params\n this.renderer.shadowMap.enabled = this.shadow\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()\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 { Vector2, Vector3 } from 'three'\nimport { toRef, watch } from 'vue'\n\nexport function setFromProp(o: Record, prop: Record): 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) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\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 { 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, 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, 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 = 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\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\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, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, 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 } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\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 },\r\n setup(props) {\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 = () => { cubeCamera.update(renderer, scene) }\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 }\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 = 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) {\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

>(\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, watch } from 'vue'\nimport { BufferGeometry } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface GeometrySetupInterface {\n mesh?: MeshInterface\n geometry?: BufferGeometry\n watchProps?: string[]\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 },\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 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

>(\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, 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, 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, watch } from 'vue'\nimport { FrontSide, Material, 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 = 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], default: '#ffffff' },\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', '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, 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, 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'\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({\n uniforms: this.uniforms,\n vertexShader: this.vertexShader,\n fragmentShader: this.fragmentShader,\n })\n\n const watchProps = ['vertexShader', 'fragmentShader']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n this.setProp(p, value, true)\n })\n })\n\n return material\n },\n addWatchers() {},\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 ',\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, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, 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, 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 // 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, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, 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 = ['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,\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 { 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, 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\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 { 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 = 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, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, 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, 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 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\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 '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":["Vector3","Raycaster","Plane","Vector2","InstancedMesh","WebGLRenderer","OrbitControls","defineComponent","toRef","inject","OrthographicCamera","PerspectiveCamera","Scene","Color","Texture","Group","WebGLCubeRenderTarget","RGBFormat","LinearMipmapLinearFilter","CubeCamera","TMesh","props","BoxGeometry","createGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","IcosahedronGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","SphereGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","Curve","CatmullRomCurve3","TubeGeometry","SpotLight","DirectionalLight","AmbientLight","HemisphereLight","PointLight","RectAreaLight","RectAreaLightHelper","FrontSide","MeshBasicMaterial","MeshLambertMaterial","TextureLoader","MeshMatcapMaterial","MeshPhongMaterial","MeshStandardMaterial","MeshPhysicalMaterial","ShaderMaterial","ShaderChunk","UniformsUtils","ShaderLib","MeshToonMaterial","UVMapping","ClampToEdgeWrapping","LinearFilter","CubeReflectionMapping","CubeTextureLoader","FontLoader","TextGeometry","DoubleSide","SpriteMaterial","Sprite","GLTFLoader","FBXLoader","EffectComposer","RenderPass","BokehPass","FilmPass","ShaderPass","FXAAShader","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":";;;;;;;;;;;;;;;;;;;;;;sBAcqC,SAAuD;AAC1F,QAAM;AAAA,IACJ;AAAA,IACA,gBAAgB,IAAIA,cAAQ,GAAG,GAAG;AAAA,MAChC;AAEJ,QAAM,YAAY,IAAIC;AACtB,QAAM,WAAW,cAAc;AAC/B,QAAM,QAAQ,IAAIC,YAAM,IAAIF,cAAQ,GAAG,GAAG,IAAI;AAE9C,QAAM,iBAAiB,CAAC,WAAoB;AAC1C,cAAU,cAAc,QAAQ;AAChC,WAAO,kBAAkB,MAAM;AAC/B,cAAU,IAAI,eAAe,OAAO;AAAA;AAGtC,QAAM,YAAY,CAAC,QAAiB,YAA+B;AACjE,cAAU,cAAc,QAAQ;AAChC,WAAO,UAAU,iBAAiB;AAAA;AAGpC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA;AAAA;;oBCkB+B,SAAmD;AACpF,QAAM;AAAA,IACJ;AAAA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AAS;AAAA,MACT;AAAA,MAAa;AAAA,MACb;AAAA,MAAQ;AAAA,MAER;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,MACA;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA;AAGF,UAAM,QAAQ,UAAQ;AAEpB,UAAI,UAAU,MAAM,MAAM;AAAA;AAAA;AAAA;mBAKN,QAAkB;AAC1C,SAAOM,cAAW,QAAQ,IAAI;AAAA;;uBCtEyB;AACvD,QAAM,MAAyB;AAAA,IAC7B,QAAQ,IAAIhC;AAAA,IACZ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,IACd;AAAA,IACA;AAAA;AAEF,SAAO;AAEP,wBAAsB,QAAkC,IAAiB;AACvE,QAAI,QAAQ,OAAO;AACnB,QAAI,SAAS,OAAO;AACpB,QAAI,eAAe;AACnB,YAAQ,IAAI,OAAO,IAAI,cAAc,KAAK;AAAA;AAG5C,uBAAqB,KAA6B,OAAe;AAC/D,WAAO,IAAI,QAAQ,aAAW;AAC5B,UAAI,OAAO,KACT,IAAI,KACJ,aAAW;AACT,YAAI,gBAAgB,IAAI,IAAI;AAC5B,YAAI,SAAS,SAAS;AACtB,gBAAQ;AAAA;AAAA;AAAA;AAMhB,qBAAmB;AACjB,QAAI,SAAS,QAAQ,OAAK,EAAE;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"trois.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, prop: Record): 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) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\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 = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (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((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\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 = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (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 = (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 = (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\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\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: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = 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>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, 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, 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, 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 = 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\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\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, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, 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 } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\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 },\r\n setup(props) {\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 = () => { cubeCamera.update(renderer, scene) }\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 }\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 = 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) {\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

>(\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\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>, 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 = {}\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

>(\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, 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, 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 = 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, 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, 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, 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 ',\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, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, 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, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, 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,\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, 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\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 = 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, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, 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, 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 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\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 '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":["toRef","Vector3","Raycaster","Plane","Vector2","InstancedMesh","WebGLRenderer","OrbitControls","defineComponent","PCFShadowMap","NoToneMapping","inject","OrthographicCamera","PerspectiveCamera","Scene","Color","Texture","Group","WebGLCubeRenderTarget","RGBFormat","LinearMipmapLinearFilter","CubeCamera","TMesh","BufferGeometry","BufferAttribute","props","BoxGeometry","createGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","IcosahedronGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","SphereGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","Curve","CatmullRomCurve3","TubeGeometry","SpotLight","DirectionalLight","AmbientLight","HemisphereLight","PointLight","RectAreaLight","RectAreaLightHelper","NormalBlending","FrontSide","MeshBasicMaterial","MeshLambertMaterial","TextureLoader","MeshMatcapMaterial","MeshPhongMaterial","MeshStandardMaterial","MeshPhysicalMaterial","ShaderMaterial","ShaderChunk","UniformsUtils","ShaderLib","MeshToonMaterial","LinearEncoding","UVMapping","ClampToEdgeWrapping","LinearFilter","CubeReflectionMapping","CubeTextureLoader","PointsMaterial","FontLoader","TextGeometry","DoubleSide","SpriteMaterial","Sprite","Points","GLTFLoader","FBXLoader","EffectComposer","RenderPass","BokehPass","FilmPass","ShaderPass","FXAAShader","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,MAAMA,UAAM,KAAK;AACvB,MAAI,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Q,OAAK,EAAE;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/build/trois.module.cdn.js b/build/trois.module.cdn.js index 70e4268..004e543 100644 --- a/build/trois.module.cdn.js +++ b/build/trois.module.cdn.js @@ -1,5 +1,5 @@ -import { defineComponent, toRef, watch, inject, provide, onUnmounted, createApp as createApp$1 } from 'https://unpkg.com/vue@3.0.11/dist/vue.esm-browser.prod.js'; -import { Vector3, Raycaster as Raycaster$1, Plane as Plane$1, Vector2, InstancedMesh as InstancedMesh$1, WebGLRenderer, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Scene as Scene$1, Color, Texture as Texture$1, Group as Group$1, WebGLCubeRenderTarget, RGBFormat, LinearMipmapLinearFilter, CubeCamera as CubeCamera$1, Mesh as Mesh$1, BoxGeometry as BoxGeometry$1, CircleGeometry as CircleGeometry$1, ConeGeometry as ConeGeometry$1, CylinderGeometry as CylinderGeometry$1, DodecahedronGeometry as DodecahedronGeometry$1, IcosahedronGeometry as IcosahedronGeometry$1, LatheGeometry as LatheGeometry$1, OctahedronGeometry as OctahedronGeometry$1, PlaneGeometry as PlaneGeometry$1, PolyhedronGeometry as PolyhedronGeometry$1, RingGeometry as RingGeometry$1, SphereGeometry as SphereGeometry$1, TetrahedronGeometry as TetrahedronGeometry$1, TorusGeometry as TorusGeometry$1, TorusKnotGeometry as TorusKnotGeometry$1, TubeGeometry as TubeGeometry$1, Curve, CatmullRomCurve3, SpotLight as SpotLight$1, DirectionalLight as DirectionalLight$1, AmbientLight as AmbientLight$1, HemisphereLight as HemisphereLight$1, PointLight as PointLight$1, RectAreaLight as RectAreaLight$1, FrontSide, MeshBasicMaterial, MeshLambertMaterial, TextureLoader, MeshMatcapMaterial, MeshPhongMaterial, MeshStandardMaterial, MeshPhysicalMaterial, ShaderMaterial as ShaderMaterial$1, ShaderChunk, UniformsUtils, ShaderLib, MeshToonMaterial, UVMapping, ClampToEdgeWrapping, LinearFilter, CubeReflectionMapping, CubeTextureLoader, FontLoader, TextGeometry, DoubleSide, SpriteMaterial, Sprite as Sprite$1 } from 'https://unpkg.com/three@0.127.0/build/three.module.js'; +import { Vector3, Raycaster as Raycaster$1, Plane as Plane$1, Vector2, InstancedMesh as InstancedMesh$1, WebGLRenderer, PCFShadowMap, NoToneMapping, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Scene as Scene$1, Color, Texture as Texture$1, Group as Group$1, WebGLCubeRenderTarget, RGBFormat, LinearMipmapLinearFilter, CubeCamera as CubeCamera$1, Mesh as Mesh$1, BufferGeometry, BufferAttribute, BoxGeometry as BoxGeometry$1, CircleGeometry as CircleGeometry$1, ConeGeometry as ConeGeometry$1, CylinderGeometry as CylinderGeometry$1, DodecahedronGeometry as DodecahedronGeometry$1, IcosahedronGeometry as IcosahedronGeometry$1, LatheGeometry as LatheGeometry$1, OctahedronGeometry as OctahedronGeometry$1, PlaneGeometry as PlaneGeometry$1, PolyhedronGeometry as PolyhedronGeometry$1, RingGeometry as RingGeometry$1, SphereGeometry as SphereGeometry$1, TetrahedronGeometry as TetrahedronGeometry$1, TorusGeometry as TorusGeometry$1, TorusKnotGeometry as TorusKnotGeometry$1, TubeGeometry as TubeGeometry$1, Curve, CatmullRomCurve3, SpotLight as SpotLight$1, DirectionalLight as DirectionalLight$1, AmbientLight as AmbientLight$1, HemisphereLight as HemisphereLight$1, PointLight as PointLight$1, RectAreaLight as RectAreaLight$1, NormalBlending, FrontSide, MeshBasicMaterial, MeshLambertMaterial, TextureLoader, MeshMatcapMaterial, MeshPhongMaterial, MeshStandardMaterial, MeshPhysicalMaterial, ShaderMaterial as ShaderMaterial$1, ShaderChunk, UniformsUtils, ShaderLib, MeshToonMaterial, LinearEncoding, UVMapping, ClampToEdgeWrapping, LinearFilter, CubeReflectionMapping, CubeTextureLoader, PointsMaterial as PointsMaterial$1, FontLoader, TextGeometry, DoubleSide, SpriteMaterial, Sprite as Sprite$1, Points as Points$1 } from 'https://unpkg.com/three@0.127.0/build/three.module.js'; +import { toRef, watch, defineComponent, inject, provide, onUnmounted, createApp as createApp$1 } from 'https://unpkg.com/vue@3.0.11/dist/vue.esm-browser.prod.js'; import { OrbitControls } from 'https://unpkg.com/three@0.127.0/examples/jsm/controls/OrbitControls.js'; import { RectAreaLightUniformsLib } from 'https://unpkg.com/three@0.127.0/examples/jsm/lights/RectAreaLightUniformsLib.js'; import { RectAreaLightHelper } from 'https://unpkg.com/three@0.127.0/examples/jsm/helpers/RectAreaLightHelper.js'; @@ -16,6 +16,72 @@ import { SMAAPass as SMAAPass$1 } from 'https://unpkg.com/three@0.127.0/examples import { SSAOPass as SSAOPass$1 } from 'https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/SSAOPass.js'; import { UnrealBloomPass as UnrealBloomPass$1 } from 'https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/UnrealBloomPass.js'; +function setFromProp(o, prop) { + if (prop instanceof Object) { + Object.entries(prop).forEach(([key, value]) => { + o[key] = value; + }); + } +} +function bindProps(src, props, dst) { + props.forEach((prop) => { + bindProp(src, prop, dst, prop); + }); +} +function bindProp(src, srcProp, dst, dstProp) { + const _dstProp = dstProp || srcProp; + const ref = toRef(src, srcProp); + if (ref.value instanceof Object) { + setFromProp(dst[_dstProp], ref.value); + watch(ref, (value) => { + setFromProp(dst[_dstProp], value); + }, {deep: true}); + } else { + if (ref.value) + dst[_dstProp] = src[srcProp]; + watch(ref, (value) => { + dst[_dstProp] = value; + }); + } +} +function propsValues(props, exclude = []) { + const values = {}; + Object.entries(props).forEach(([key, value]) => { + if (!exclude || exclude && !exclude.includes(key)) { + values[key] = value; + } + }); + return values; +} +function lerp(value1, value2, amount) { + amount = amount < 0 ? 0 : amount; + amount = amount > 1 ? 1 : amount; + return value1 + (value2 - value1) * amount; +} +function limit(val, min, max) { + return val < min ? min : val > max ? max : val; +} +const MATCAP_ROOT = "https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d"; +const DEFAULT_MATCAP = "0404E8_0404B5_0404CB_3333FC"; +function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024) { + const fileName = `${hash}${getMatcapFormatString(format)}.png`; + return `${MATCAP_ROOT}/${format}/${fileName}`; +} +function getMatcapFormatString(format) { + switch (format) { + case 64: + return "-64px"; + case 128: + return "-128px"; + case 256: + return "-256px"; + case 512: + return "-512px"; + default: + return ""; + } +} + function useRaycaster(options) { const { camera, @@ -89,7 +155,7 @@ function usePointer(options) { } function updatePosition(event) { let x, y; - if (event instanceof TouchEvent && event.touches && event.touches.length > 0) { + if (event.touches && event.touches.length > 0) { x = event.touches[0].clientX; y = event.touches[0].clientY; } else { @@ -385,6 +451,8 @@ var Renderer = defineComponent({ pointer: {type: [Boolean, Object], default: false}, resize: {type: [Boolean, String], default: false}, shadow: Boolean, + shadowType: {type: Number, default: PCFShadowMap}, + toneMapping: {type: Number, default: NoToneMapping}, width: String, height: String, xr: Boolean, @@ -412,6 +480,7 @@ var Renderer = defineComponent({ if (props.height) config.height = parseInt(props.height); const three = useThree(config); + bindProp(props, "toneMapping", three.renderer); const renderFn = () => { }; if (props.onClick) { @@ -469,7 +538,10 @@ var Renderer = defineComponent({ this.three.config.onResize = (size) => { this.resizeCallbacks.forEach((e) => e({type: "resize", renderer: this, size})); }; - this.renderer.shadowMap.enabled = this.shadow; + if (this.shadow) { + this.renderer.shadowMap.enabled = true; + this.renderer.shadowMap.type = this.shadowType; + } this.renderFn = this.three.composer ? this.three.renderC : this.three.render; this.initCallbacks.forEach((e) => e({type: "init", renderer: this})); (_a = this.onReady) == null ? void 0 : _a.call(this, this); @@ -539,7 +611,7 @@ var Renderer = defineComponent({ }, render(time) { this.beforeRenderCallbacks.forEach((e) => e({type: "beforerender", renderer: this, time})); - this.renderFn(); + this.renderFn({renderer: this, time}); this.afterRenderCallbacks.forEach((e) => e({type: "afterrender", renderer: this, time})); }, renderLoop(time) { @@ -554,72 +626,6 @@ var Renderer = defineComponent({ __hmrId: "Renderer" }); -function setFromProp(o, prop) { - if (prop instanceof Object) { - Object.entries(prop).forEach(([key, value]) => { - o[key] = value; - }); - } -} -function bindProps(src, props, dst) { - props.forEach((prop) => { - bindProp(src, prop, dst, prop); - }); -} -function bindProp(src, srcProp, dst, dstProp) { - const _dstProp = dstProp || srcProp; - const ref = toRef(src, srcProp); - if (ref.value instanceof Object) { - setFromProp(dst[_dstProp], ref.value); - watch(ref, (value) => { - setFromProp(dst[_dstProp], value); - }, {deep: true}); - } else { - if (ref.value) - dst[_dstProp] = src[srcProp]; - watch(ref, (value) => { - dst[_dstProp] = value; - }); - } -} -function propsValues(props, exclude = []) { - const values = {}; - Object.entries(props).forEach(([key, value]) => { - if (!exclude || exclude && !exclude.includes(key)) { - values[key] = value; - } - }); - return values; -} -function lerp(value1, value2, amount) { - amount = amount < 0 ? 0 : amount; - amount = amount > 1 ? 1 : amount; - return value1 + (value2 - value1) * amount; -} -function limit(val, min, max) { - return val < min ? min : val > max ? max : val; -} -const MATCAP_ROOT = "https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d"; -const DEFAULT_MATCAP = "0404E8_0404B5_0404CB_3333FC"; -function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024) { - const fileName = `${hash}${getMatcapFormatString(format)}.png`; - return `${MATCAP_ROOT}/${format}/${fileName}`; -} -function getMatcapFormatString(format) { - switch (format) { - case 64: - return "-64px"; - case 128: - return "-128px"; - case 256: - return "-256px"; - case 512: - return "-512px"; - default: - return ""; - } -} - var Camera = defineComponent({ render() { return this.$slots.default ? this.$slots.default() : []; @@ -1049,7 +1055,8 @@ const Geometry = defineComponent({ props: { rotateX: Number, rotateY: Number, - rotateZ: Number + rotateZ: Number, + attributes: {type: Array, default: () => []} }, inject: { mesh: MeshInjectionKey @@ -1076,6 +1083,16 @@ const Geometry = defineComponent({ }, methods: { createGeometry() { + const bufferAttributes = {}; + const geometry = new BufferGeometry(); + this.attributes.forEach((attribute) => { + if (attribute.name && attribute.itemSize && attribute.array) { + const bufferAttribute = bufferAttributes[attribute.name] = new BufferAttribute(attribute.array, attribute.itemSize, attribute.normalized); + geometry.setAttribute(attribute.name, bufferAttribute); + } + }); + geometry.computeBoundingBox(); + this.geometry = geometry; }, rotateGeometry() { if (!this.geometry) @@ -1501,6 +1518,8 @@ var Material = defineComponent({ }, props: { color: {type: [String, Number], default: "#ffffff"}, + blending: {type: Number, default: NormalBlending}, + alphaTest: {type: Number, default: 0}, depthTest: {type: Boolean, default: true}, depthWrite: {type: Boolean, default: true}, fog: {type: Boolean, default: true}, @@ -1543,7 +1562,7 @@ var Material = defineComponent({ this.setProp(key, texture, true); }, addWatchers() { - ["color", "depthTest", "depthWrite", "fog", "opacity", "side", "transparent"].forEach((p) => { + ["color", "alphaTest", "blending", "depthTest", "depthWrite", "fog", "opacity", "side", "transparent"].forEach((p) => { watch(() => this[p], (value) => { if (p === "color") { this.material.color.set(value); @@ -1721,20 +1740,14 @@ var ShaderMaterial = defineComponent({ }, methods: { createMaterial() { - const material = new ShaderMaterial$1({ - uniforms: this.uniforms, - vertexShader: this.vertexShader, - fragmentShader: this.fragmentShader - }); - const watchProps = ["vertexShader", "fragmentShader"]; - watchProps.forEach((p) => { + const material = new ShaderMaterial$1(propsValues(this.$props, ["color"])); + ["vertexShader", "fragmentShader"].forEach((p) => { watch(() => this[p], (value) => { - this.setProp(p, value, true); + material[p] = value; + material.needsUpdate = true; }); }); return material; - }, - addWatchers() { } }, __hmrId: "ShaderMaterial" @@ -1858,6 +1871,7 @@ var Texture = defineComponent({ onLoad: Function, onProgress: Function, onError: Function, + encoding: {type: Number, default: LinearEncoding}, mapping: {type: Number, default: UVMapping}, wrapS: {type: Number, default: ClampToEdgeWrapping}, wrapT: {type: Number, default: ClampToEdgeWrapping}, @@ -1884,7 +1898,7 @@ var Texture = defineComponent({ if (!this.src) return void 0; const texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError); - const wathProps = ["mapping", "wrapS", "wrapT", "magFilter", "minFilter", "repeat", "rotation", "center"]; + const wathProps = ["encoding", "mapping", "wrapS", "wrapT", "magFilter", "minFilter", "repeat", "rotation", "center"]; wathProps.forEach((prop) => { bindProp(this, prop, texture); }); @@ -1930,6 +1944,21 @@ var CubeTexture = defineComponent({ } }); +var PointsMaterial = defineComponent({ + extends: Material, + props: { + size: {type: Number, default: 10}, + sizeAttenuation: {type: Boolean, default: true} + }, + methods: { + createMaterial() { + const material = new PointsMaterial$1(propsValues(this.$props)); + return material; + } + }, + __hmrId: "PointsMaterial" +}); + var Box = meshComponent("Box", props$n, createGeometry$f); var Circle = meshComponent("Circle", props$m, createGeometry$e); @@ -2209,6 +2238,34 @@ var Sprite = defineComponent({ __hmrId: "Sprite" }); +var Points = defineComponent({ + extends: Object3D, + setup() { + return {}; + }, + provide() { + return { + [MeshInjectionKey]: this + }; + }, + mounted() { + this.mesh = this.points = new Points$1(this.geometry, this.material); + this.initObject3D(this.mesh); + }, + methods: { + setGeometry(geometry) { + this.geometry = geometry; + if (this.mesh) + this.mesh.geometry = geometry; + }, + setMaterial(material) { + this.material = material; + if (this.mesh) + this.mesh.material = material; + } + } +}); + var Model = defineComponent({ extends: Object3D, emits: ["load", "progress", "error"], @@ -2733,6 +2790,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ Object3D: Object3D, Raycaster: Raycaster, CubeCamera: CubeCamera, + BufferGeometry: Geometry, BoxGeometry: BoxGeometry, CircleGeometry: CircleGeometry, ConeGeometry: ConeGeometry, @@ -2768,6 +2826,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ ToonMaterial: ToonMaterial, Texture: Texture, CubeTexture: CubeTexture, + PointsMaterial: PointsMaterial, Mesh: Mesh, MeshInjectionKey: MeshInjectionKey, Box: Box, @@ -2790,6 +2849,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ Image: Image, InstancedMesh: InstancedMesh, Sprite: Sprite, + Points: Points, GLTFModel: GLTF, FBXModel: FBX, EffectComposer: EffectComposer, @@ -2932,5 +2992,5 @@ function useTextures() { } } -export { AmbientLight, BasicMaterial, BokehPass, Box, BoxGeometry, PerspectiveCamera as Camera, Circle, CircleGeometry, ComposerInjectionKey, Cone, ConeGeometry, CubeCamera, CubeTexture, Cylinder, CylinderGeometry, DirectionalLight, Dodecahedron, DodecahedronGeometry, EffectComposer, FBX as FBXModel, FXAAPass, FilmPass, GLTF as GLTFModel, Group, HalftonePass, HemisphereLight, Icosahedron, IcosahedronGeometry, Image, InstancedMesh, LambertMaterial, Lathe, LatheGeometry, MatcapMaterial, Material, MaterialInjectionKey, Mesh, MeshInjectionKey, Object3D, Octahedron, OctahedronGeometry, OrthographicCamera, PerspectiveCamera, PhongMaterial, PhysicalMaterial, Plane, PlaneGeometry, PointLight, Polyhedron, PolyhedronGeometry, Raycaster, RectAreaLight, RenderPass, Renderer, RendererInjectionKey, Ring, RingGeometry, SMAAPass, SSAOPass, Scene, SceneInjectionKey, ShaderMaterial, Sphere, SphereGeometry, SpotLight, Sprite, StandardMaterial, SubSurfaceMaterial, Tetrahedron, TetrahedronGeometry, Text, Texture, TiltShiftPass, ToonMaterial, Torus, TorusGeometry, TorusKnot, TorusKnotGeometry, TroisJSVuePlugin, Tube, TubeGeometry, UnrealBloomPass, ZoomBlurPass, bindProp, bindProps, createApp, getMatcapUrl, lerp, limit, propsValues, setFromProp, useTextures }; +export { AmbientLight, BasicMaterial, BokehPass, Box, BoxGeometry, Geometry as BufferGeometry, PerspectiveCamera as Camera, Circle, CircleGeometry, ComposerInjectionKey, Cone, ConeGeometry, CubeCamera, CubeTexture, Cylinder, CylinderGeometry, DirectionalLight, Dodecahedron, DodecahedronGeometry, EffectComposer, FBX as FBXModel, FXAAPass, FilmPass, GLTF as GLTFModel, Group, HalftonePass, HemisphereLight, Icosahedron, IcosahedronGeometry, Image, InstancedMesh, LambertMaterial, Lathe, LatheGeometry, MatcapMaterial, Material, MaterialInjectionKey, Mesh, MeshInjectionKey, Object3D, Octahedron, OctahedronGeometry, OrthographicCamera, PerspectiveCamera, PhongMaterial, PhysicalMaterial, Plane, PlaneGeometry, PointLight, Points, PointsMaterial, Polyhedron, PolyhedronGeometry, Raycaster, RectAreaLight, RenderPass, Renderer, RendererInjectionKey, Ring, RingGeometry, SMAAPass, SSAOPass, Scene, SceneInjectionKey, ShaderMaterial, Sphere, SphereGeometry, SpotLight, Sprite, StandardMaterial, SubSurfaceMaterial, Tetrahedron, TetrahedronGeometry, Text, Texture, TiltShiftPass, ToonMaterial, Torus, TorusGeometry, TorusKnot, TorusKnotGeometry, TroisJSVuePlugin, Tube, TubeGeometry, UnrealBloomPass, ZoomBlurPass, bindProp, bindProps, createApp, getMatcapUrl, lerp, limit, propsValues, setFromProp, useTextures }; //# sourceMappingURL=trois.module.cdn.js.map diff --git a/build/trois.module.cdn.js.map b/build/trois.module.cdn.js.map index 3c44e45..7fc8624 100644 --- a/build/trois.module.cdn.js.map +++ b/build/trois.module.cdn.js.map @@ -1 +1 @@ -{"version":3,"file":"trois.module.cdn.js","sources":["../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/tools.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/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/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 { 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 if (event instanceof TouchEvent && event.touches && event.touches.length > 0) {\n x = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (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((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\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 = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (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 = (obj.camera!)\n const vFOV = (camera.fov * Math.PI) / 180\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z)\n const w = h * camera.aspect\n return [w, h]\n }\n}\n","/* eslint-disable no-use-before-define */\nimport { Camera, Scene, WebGLRenderer } from 'three'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'\nimport { defineComponent, InjectionKey, PropType } from 'vue'\nimport { PointerPublicConfigInterface } from './usePointer'\nimport useThree, { SizeInterface, ThreeConfigInterface, ThreeInterface } from './useThree'\n\ntype CallbackType = (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\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\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 RendererSetupInterface {\n canvas: HTMLCanvasElement\n three: ThreeInterface\n renderer: WebGLRenderer\n size: SizeInterface\n renderFn(): 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: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = 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>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, default: false },\n shadow: Boolean,\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\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 // TODO : improve shadow params\n this.renderer.shadowMap.enabled = this.shadow\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()\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 { Vector2, Vector3 } from 'three'\nimport { toRef, watch } from 'vue'\n\nexport function setFromProp(o: Record, prop: Record): 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) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\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 { 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, 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, 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 = 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\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\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, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, 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 } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\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 },\r\n setup(props) {\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 = () => { cubeCamera.update(renderer, scene) }\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 }\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 = 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) {\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

>(\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, watch } from 'vue'\nimport { BufferGeometry } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface GeometrySetupInterface {\n mesh?: MeshInterface\n geometry?: BufferGeometry\n watchProps?: string[]\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 },\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 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

>(\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, 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, 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, watch } from 'vue'\nimport { FrontSide, Material, 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 = 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], default: '#ffffff' },\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', '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, 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, 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'\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({\n uniforms: this.uniforms,\n vertexShader: this.vertexShader,\n fragmentShader: this.fragmentShader,\n })\n\n const watchProps = ['vertexShader', 'fragmentShader']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n this.setProp(p, value, true)\n })\n })\n\n return material\n },\n addWatchers() {},\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 ',\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, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, 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, 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 // 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, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, 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 = ['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,\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 { 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, 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\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 { 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 = 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, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, 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, 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 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\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 '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","Sprite","EffectComposer","RenderPass","BokehPass","FilmPass","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":";;;;;;;;;;;;;;;;;;sBAcqC,SAAuD;AAC1F,QAAM;AAAA,IACJ;AAAA,IACA,gBAAgB,IAAI,QAAQ,GAAG,GAAG;AAAA,MAChC;AAEJ,QAAM,YAAY,IAAIA;AACtB,QAAM,WAAW,cAAc;AAC/B,QAAM,QAAQ,IAAIC,QAAM,IAAI,QAAQ,GAAG,GAAG,IAAI;AAE9C,QAAM,iBAAiB,CAAC,WAAoB;AAC1C,cAAU,cAAc,QAAQ;AAChC,WAAO,kBAAkB,MAAM;AAC/B,cAAU,IAAI,eAAe,OAAO;AA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AA,MAER;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,MACA;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA;AAGF,UAAM,QAAQ,UAAQ;AAEpB,UAAI,UAAU,MAAM,MAAM;AAAA;AAAA;AAAA;mBAKN,QAAkB;AAC1C,SAAOC,YAAW,QAAQ,IAAI;AAAA;;uBCtEyB;AACvD,QAAM,MAAyB;AAAA,IAC7B,QAAQ,IAAI;AAAA,IACZ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,IACd;AAAA,IACA;AAAA;AAEF,SAAO;AAEP,wBAAsB,QAAkC,IAAiB;AACvE,QAAI,QAAQ,OAAO;AACnB,QAAI,SAAS,OAAO;AACpB,QAAI,eAAe;AACnB,YAAQ,IAAI,OAAO,IAAI,cAAc,KAAK;AAAA;AAG5C,uBAAqB,KAA6B,OAAe;AAC/D,WAAO,IAAI,QAAQ,aAAW;AAC5B,UAAI,OAAO,KACT,IAAI,KACJ,aAAW;AACT,YAAI,gBAAgB,IAAI,IAAI;AAC5B,YAAI,SAAS,SAAS;AACtB,gBAAQ;AAAA;AAAA;AAAA;AAMhB,qBAAmB;AACjB,QAAI,SAAS,QAAQ,OAAK,EAAE;AAAA;AAAA;;"} \ No newline at end of file +{"version":3,"file":"trois.module.cdn.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, prop: Record): 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) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\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 = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (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((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\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 = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (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 = (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 = (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\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\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: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = 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>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, 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, 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, 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 = 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\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\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, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, 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 } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\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 },\r\n setup(props) {\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 = () => { cubeCamera.update(renderer, scene) }\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 }\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 = 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) {\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

>(\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\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>, 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 = {}\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

>(\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, 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, 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 = 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, 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, 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, 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 ',\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, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, 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, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, 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,\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, 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\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 = 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, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, 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, 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 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\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 '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;AAAO,UAAI,YAAY,IAAI;AACnC,UAAM,KAAK,CAAC,UAAU;AAAE,UAAI,YAAY;AAAA;AAAA;AAAA;qBAIhB,OAAgC,UAAoB,IAA6B;AAC3G,QAAM,SAAkC;AACxC,SAAO,QAAQ,OAAO,QAAQ,CAAC,CAAC,KAAK,WAAW;AAC9C,QAAI,CAAC,WAAY,WAAW,CAAC,QAAQ,SAAS,MAAO;AACnD,aAAO,OAAO;AAAA;AAAA;AAGlB,SAAO;AAAA;cAGY,QAAgB,QAAgB,QAAwB;AAC3E,WAAS,SAAS,IAAI,IAAI;AAC1B,WAAS,SAAS,IAAI,IAAI;AAC1B,SAAO,SAAU,UAAS,UAAU;AAAA;eAGhB,KAAa,KAAa,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AO;AACnB,QAAI,SAAS,OAAO;AACpB,QAAI,eAAe;AACnB,YAAQ,IAAI,OAAO,IAAI,cAAc,KAAK;AAAA;AAG5C,uBAAqB,KAA6B,OAAe;AAC/D,WAAO,IAAI,QAAQ,aAAW;AAC5B,UAAI,OAAO,KACT,IAAI,KACJ,aAAW;AACT,YAAI,gBAAgB,IAAI,IAAI;AAC5B,YAAI,SAAS,SAAS;AACtB,gBAAQ;AAAA;AAAA;AAAA;AAMhB,qBAAmB;AACjB,QAAI,SAAS,QAAQ,OAAK,EAAE;AAAA;AAAA;;;;"} \ No newline at end of file diff --git a/build/trois.module.cdn.min.js b/build/trois.module.cdn.min.js index ce524d6..4a202bf 100644 --- a/build/trois.module.cdn.min.js +++ b/build/trois.module.cdn.min.js @@ -1,22 +1,22 @@ -import{defineComponent as o,toRef as Fr,watch as l,inject as X,provide as Dr,onUnmounted as Ur,createApp as Hr}from"vue";import{Vector3 as Z,Raycaster as Wr,Plane as Xr,Vector2 as I,InstancedMesh as ue,WebGLRenderer as Kr,OrthographicCamera as Vr,PerspectiveCamera as qr,Scene as Zr,Color as se,Texture as Yr,Group as Jr,WebGLCubeRenderTarget as Qr,RGBFormat as es,LinearMipmapLinearFilter as we,CubeCamera as ts,Mesh as rs,BoxGeometry as Ce,CircleGeometry as ss,ConeGeometry as is,CylinderGeometry as ns,DodecahedronGeometry as as,IcosahedronGeometry as os,LatheGeometry as hs,OctahedronGeometry as ds,PlaneGeometry as Me,PolyhedronGeometry as ls,RingGeometry as us,SphereGeometry as cs,TetrahedronGeometry as ms,TorusGeometry as fs,TorusKnotGeometry as ps,TubeGeometry as ys,Curve as gs,CatmullRomCurve3 as Le,SpotLight as ce,DirectionalLight as me,AmbientLight as vs,HemisphereLight as bs,PointLight as Ss,RectAreaLight as Ps,FrontSide as xs,MeshBasicMaterial as Ne,MeshLambertMaterial as ws,TextureLoader as Y,MeshMatcapMaterial as Cs,MeshPhongMaterial as Ms,MeshStandardMaterial as Ls,MeshPhysicalMaterial as Ns,ShaderMaterial as fe,ShaderChunk as K,UniformsUtils as Ge,ShaderLib as Gs,MeshToonMaterial as _s,UVMapping as js,ClampToEdgeWrapping as _e,LinearFilter as Es,CubeReflectionMapping as ks,CubeTextureLoader as Rs,FontLoader as Os,TextGeometry as $s,DoubleSide as Is,SpriteMaterial as zs,Sprite as Ts}from"three";import{OrbitControls as As}from"three/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as Bs}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as Fs}from"three/examples/jsm/helpers/RectAreaLightHelper.js";import{GLTFLoader as Ds}from"three/examples/jsm/loaders/GLTFLoader.js";import{FBXLoader as Us}from"three/examples/jsm/loaders/FBXLoader.js";import{EffectComposer as Hs}from"three/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as Ws}from"three/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as Xs}from"three/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as Ks}from"three/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as ie}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as Vs}from"three/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as qs}from"three/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as Zs}from"three/examples/jsm/postprocessing/SMAAPass.js";import{SSAOPass as Ys}from"three/examples/jsm/postprocessing/SSAOPass.js";import{UnrealBloomPass as Js}from"three/examples/jsm/postprocessing/UnrealBloomPass.js";function Qs(e){const{camera:t,resetPosition:r=new Z(0,0,0)}=e,s=new Wr,n=r.clone(),a=new Xr(new Z(0,0,1),0);return{position:n,updatePosition:P=>{s.setFromCamera(P,t),t.getWorldDirection(a.normal),s.ray.intersectPlane(a,n)},intersect:(P,R)=>(s.setFromCamera(P,t),s.intersectObjects(R))}}function je(e){const{camera:t,domElement:r,intersectObjects:s,touch:n=!0,resetOnEnd:a=!1,resetPosition:i=new I(0,0),resetPositionV3:c=new Z(0,0,0),onEnter:P=()=>{},onMove:R=()=>{},onLeave:f=()=>{},onClick:T=()=>{},onIntersectEnter:W=()=>{},onIntersectOver:x=()=>{},onIntersectMove:F=()=>{},onIntersectLeave:D=()=>{},onIntersectClick:G=()=>{}}=e,m=i.clone(),p=new I(0,0),h=Qs({camera:t}),d=h.position,w={position:m,positionN:p,positionV3:d,intersectObjects:s,listeners:!1,addListeners:Ar,removeListeners:Br,intersect:be};return w;function C(){m.copy(i),d.copy(c)}function de(y){let O,$;y instanceof TouchEvent&&y.touches&&y.touches.length>0?(O=y.touches[0].clientX,$=y.touches[0].clientY):(O=y.clientX,$=y.clientY);const g=r.getBoundingClientRect();m.x=O-g.left,m.y=$-g.top,p.x=m.x/g.width*2-1,p.y=-(m.y/g.height)*2+1,h.updatePosition(p)}function be(){if(s.length){const y=h.intersect(p,s),O=[...s],$=[];y.forEach(g=>{var A,_,M;const{object:S}=g,{component:L}=S.userData;if(S instanceof ue){if($.indexOf(S)!==-1)return;$.push(S)}if(!S.userData.over){S.userData.over=!0;const le={type:"pointerover",over:!0,component:L,intersect:g},xe={...le,type:"pointerenter"};x(le),W(xe),(A=L.onPointerOver)==null||A.call(L,le),(_=L.onPointerEnter)==null||_.call(L,xe)}const Pe={type:"pointermove",component:L,intersect:g};F(Pe),(M=L.onPointerMove)==null||M.call(L,Pe),O.splice(O.indexOf(S),1)}),O.forEach(g=>{var A,_;const{component:M}=g.userData;if(g.userData.over){g.userData.over=!1;const S={type:"pointerover",over:!1,component:M},L={...S,type:"pointerleave"};x(S),D(L),(A=M.onPointerOver)==null||A.call(M,S),(_=M.onPointerLeave)==null||_.call(M,L)}})}}function ee(y){de(y),P({type:"pointerenter",position:m,positionN:p,positionV3:d})}function te(y){de(y),R({type:"pointermove",position:m,positionN:p,positionV3:d}),be()}function Se(y){if(de(y),s.length){const O=h.intersect(p,s),$=[];O.forEach(g=>{var A;const{object:_}=g,{component:M}=_.userData;if(_ instanceof ue){if($.indexOf(_)!==-1)return;$.push(_)}const S={type:"click",component:M,intersect:g};G(S),(A=M.onClick)==null||A.call(M,S)})}T({type:"click",position:m,positionN:p,positionV3:d})}function re(){a&&C(),f({type:"pointerleave"})}function Ar(){r.addEventListener("mouseenter",ee),r.addEventListener("mousemove",te),r.addEventListener("mouseleave",re),r.addEventListener("click",Se),n&&(r.addEventListener("touchstart",ee),r.addEventListener("touchmove",te),r.addEventListener("touchend",re)),w.listeners=!0}function Br(){r.removeEventListener("mouseenter",ee),r.removeEventListener("mousemove",te),r.removeEventListener("mouseleave",re),r.removeEventListener("click",Se),r.removeEventListener("touchstart",ee),r.removeEventListener("touchmove",te),r.removeEventListener("touchend",re),w.listeners=!1}}function ei(e){const t={antialias:!0,alpha:!1,autoClear:!0,orbitCtrl:!1,pointer:!1,resize:!1,width:300,height:150};e&&Object.entries(e).forEach(([h,d])=>{t[h]=d});const r={width:1,height:1,wWidth:1,wHeight:1,ratio:1},s=[],n=[],a=c(),i={config:t,renderer:a,size:r,init:P,dispose:D,render:T,renderC:W,setSize:m,addIntersectObject:x,removeIntersectObject:F};return i;function c(){const h=new Kr({canvas:t.canvas,antialias:t.antialias,alpha:t.alpha});return h.autoClear=t.autoClear,h}function P(){if(!i.scene)return console.error("Missing Scene"),!1;if(!i.camera)return console.error("Missing Camera"),!1;if(t.resize?(G(),window.addEventListener("resize",G)):t.width&&t.height&&m(t.width,t.height),R(),t.orbitCtrl){const h=new As(i.camera,i.renderer.domElement);t.orbitCtrl instanceof Object&&Object.entries(t.orbitCtrl).forEach(([d,w])=>{h[d]=w}),f(()=>{h.update()}),i.cameraCtrl=h}return!0}function R(){let h={camera:i.camera,domElement:i.renderer.domElement,intersectObjects:n};t.pointer&&t.pointer instanceof Object&&(h={...h,...t.pointer});const d=i.pointer=je(h);(t.pointer||n.length)&&(d.addListeners(),h.intersectMode==="frame"&&f(d.intersect))}function f(h){s.push(h)}function T(){s.forEach(h=>h()),i.renderer.render(i.scene,i.camera)}function W(){s.forEach(h=>h()),i.composer.render()}function x(h){n.indexOf(h)===-1&&n.push(h),i.pointer&&!i.pointer.listeners&&i.pointer.addListeners()}function F(h){const d=n.indexOf(h);d!==-1&&n.splice(d,1),i.pointer&&!t.pointer&&n.length===0&&i.pointer.removeListeners()}function D(){window.removeEventListener("resize",G),i.pointer&&i.pointer.removeListeners(),i.cameraCtrl&&i.cameraCtrl.dispose(),i.renderer&&i.renderer.dispose()}function G(){var h;if(t.resize==="window")m(window.innerWidth,window.innerHeight);else{const d=i.renderer.domElement.parentNode;d&&m(d.clientWidth,d.clientHeight)}(h=t.onResize)==null||h.call(t,r)}function m(h,d){r.width=h,r.height=d,r.ratio=h/d,i.renderer.setSize(h,d,!1);const w=i.camera;if(w.type==="PerspectiveCamera"){const C=w;C.aspect=r.ratio,C.updateProjectionMatrix()}if(w.type==="OrthographicCamera"){const C=w;r.wWidth=C.right-C.left,r.wHeight=C.top-C.bottom}else{const C=p();r.wWidth=C[0],r.wHeight=C[1]}}function p(){const h=i.camera,d=h.fov*Math.PI/180,w=2*Math.tan(d/2)*Math.abs(h.position.z);return[w*h.aspect,w]}}const N=Symbol("Renderer");var Ee=o({name:"Renderer",props:{antialias:Boolean,alpha:Boolean,autoClear:{type:Boolean,default:!0},orbitCtrl:{type:[Boolean,Object],default:!1},pointer:{type:[Boolean,Object],default:!1},resize:{type:[Boolean,String],default:!1},shadow:Boolean,width:String,height:String,xr:Boolean,onReady:Function,onClick:Function},setup(e){const t=[],r=[],s=[],n=[],a=[],i=document.createElement("canvas"),c={canvas:i,antialias:e.antialias,alpha:e.alpha,autoClear:e.autoClear,orbitCtrl:e.orbitCtrl,pointer:e.pointer,resize:e.resize};e.width&&(c.width=parseInt(e.width)),e.height&&(c.height=parseInt(e.height));const P=ei(c),R=()=>{};return e.onClick&&i.addEventListener("click",e.onClick),{canvas:i,three:P,renderer:P.renderer,size:P.size,renderFn:R,raf:!0,initCallbacks:t,mountedCallbacks:r,beforeRenderCallbacks:s,afterRenderCallbacks:n,resizeCallbacks:a}},computed:{camera:{get:function(){return this.three.camera},set:function(e){this.three.camera=e}},scene:{get:function(){return this.three.scene},set:function(e){this.three.scene=e}},composer:{get:function(){return this.three.composer},set:function(e){this.three.composer=e}}},provide(){return{[N]:this}},mounted(){var e;this.$el.parentNode.insertBefore(this.canvas,this.$el),this.three.init()&&(this.three.config.onResize=t=>{this.resizeCallbacks.forEach(r=>r({type:"resize",renderer:this,size:t}))},this.renderer.shadowMap.enabled=this.shadow,this.renderFn=this.three.composer?this.three.renderC:this.three.render,this.initCallbacks.forEach(t=>t({type:"init",renderer:this})),(e=this.onReady)==null||e.call(this,this),this.xr?(this.renderer.xr.enabled=!0,this.renderer.setAnimationLoop(this.render)):requestAnimationFrame(this.renderLoop)),this.mountedCallbacks.forEach(t=>t({type:"mounted",renderer:this}))},beforeUnmount(){this.canvas.remove(),this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[],this.raf=!1,this.three.dispose()},methods:{onInit(e){this.addListener("init",e)},onMounted(e){this.addListener("mounted",e)},onBeforeRender(e){this.addListener("beforerender",e)},offBeforeRender(e){this.removeListener("beforerender",e)},onAfterRender(e){this.addListener("afterrender",e)},offAfterRender(e){this.removeListener("afterrender",e)},onResize(e){this.addListener("resize",e)},offResize(e){this.removeListener("resize",e)},addListener(e,t){this.getCallbacks(e).push(t)},removeListener(e,t){const r=this.getCallbacks(e),s=r.indexOf(t);s&&r.splice(s,1)},getCallbacks(e){return e==="init"?this.initCallbacks:e==="mounted"?this.mountedCallbacks:e==="beforerender"?this.beforeRenderCallbacks:e==="afterrender"?this.afterRenderCallbacks:this.resizeCallbacks},render(e){this.beforeRenderCallbacks.forEach(t=>t({type:"beforerender",renderer:this,time:e})),this.renderFn(),this.afterRenderCallbacks.forEach(t=>t({type:"afterrender",renderer:this,time:e}))},renderLoop(e){this.raf&&requestAnimationFrame(this.renderLoop),this.render(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Renderer"});function V(e,t){t instanceof Object&&Object.entries(t).forEach(([r,s])=>{e[r]=s})}function U(e,t,r){t.forEach(s=>{u(e,s,r,s)})}function u(e,t,r,s){const n=s||t,a=Fr(e,t);a.value instanceof Object?(V(r[n],a.value),l(a,i=>{V(r[n],i)},{deep:!0})):(a.value&&(r[n]=e[t]),l(a,i=>{r[n]=i}))}function z(e,t=[]){const r={};return Object.entries(e).forEach(([s,n])=>{(!t||t&&!t.includes(s))&&(r[s]=n)}),r}function ke(e,t,r){return r=r<0?0:r,r=r>1?1:r,e+(t-e)*r}function Re(e,t,r){return er?r:e}const ti="https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d",ri="0404E8_0404B5_0404CB_3333FC";function pe(e=ri,t=1024){const r=`${e}${si(t)}.png`;return`${ti}/${t}/${r}`}function si(e){switch(e){case 64:return"-64px";case 128:return"-128px";case 256:return"-256px";case 512:return"-512px";default:return""}}var Oe=o({render(){return this.$slots.default?this.$slots.default():[]}}),$e=o({extends:Oe,name:"OrthographicCamera",props:{left:{type:Number,default:-1},right:{type:Number,default:1},top:{type:Number,default:1},bottom:{type:Number,default:-1},near:{type:Number,default:.1},far:{type:Number,default:2e3},zoom:{type:Number,default:1},position:{type:Object,default:()=>({x:0,y:0,z:0})}},setup(e){const t=X(N);if(!t){console.error("Renderer not found");return}const r=new Vr(e.left,e.right,e.top,e.bottom,e.near,e.far);return t.camera=r,u(e,"position",r),["left","right","top","bottom","near","far","zoom"].forEach(n=>{l(()=>e[n],a=>{r[n]=a,r.updateProjectionMatrix()})}),{renderer:t,camera:r}},__hmrId:"OrthographicCamera"}),ne=o({extends:Oe,name:"PerspectiveCamera",props:{aspect:{type:Number,default:1},far:{type:Number,default:2e3},fov:{type:Number,default:50},near:{type:Number,default:.1},position:{type:Object,default:()=>({x:0,y:0,z:0})},lookAt:{type:Object,default:null}},setup(e){var t;const r=X(N);if(!r){console.error("Renderer not found");return}const s=new qr(e.fov,e.aspect,e.near,e.far);return r.camera=s,u(e,"position",s),e.lookAt&&s.lookAt((t=e.lookAt.x)!=null?t:0,e.lookAt.y,e.lookAt.z),l(()=>e.lookAt,a=>{var i;s.lookAt((i=a.x)!=null?i:0,a.y,a.z)},{deep:!0}),["aspect","far","fov","near"].forEach(a=>{l(()=>e[a],i=>{s[a]=i,s.updateProjectionMatrix()})}),{renderer:r,camera:s}},__hmrId:"PerspectiveCamera"});const ae=Symbol("Scene");var Ie=o({name:"Scene",props:{background:[String,Number,Object]},setup(e){const t=X(N),r=new Zr;if(!t){console.error("Renderer not found");return}t.scene=r,Dr(ae,r);const s=i=>{!i||(typeof i=="string"||typeof i=="number"?r.background instanceof se?r.background.set(i):r.background=new se(i):i instanceof Yr&&(r.background=i))};return s(e.background),l(()=>e.background,s),{scene:r,add:i=>{r.add(i)},remove:i=>{r.remove(i)}}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Scene"}),B=o({name:"Object3D",inject:{renderer:N,scene:ae},emits:["created","ready"],props:{position:{type:Object,default:()=>({x:0,y:0,z:0})},rotation:{type:Object,default:()=>({x:0,y:0,z:0})},scale:{type:Object,default:()=>({x:1,y:1,z:1,order:"XYZ"})},lookAt:{type:Object,default:null},autoRemove:{type:Boolean,default:!0},userData:{type:Object,default:()=>({})}},setup(){return{}},created(){this.renderer||console.error("Missing parent Renderer"),this.scene||console.error("Missing parent Scene")},unmounted(){this.autoRemove&&this.removeFromParent()},methods:{initObject3D(e){var t;this.o3d=e,this.$emit("created",e),u(this,"position",e),u(this,"rotation",e),u(this,"scale",e),u(this,"userData",e.userData),this.lookAt&&e.lookAt((t=this.lookAt.x)!=null?t:0,this.lookAt.y,this.lookAt.z),l(()=>this.lookAt,r=>{var s;e.lookAt((s=r.x)!=null?s:0,r.y,r.z)},{deep:!0}),this.parent=this.getParent(),this.addToParent()?this.$emit("ready",this):console.error("Missing parent (Scene, Group...)")},getParent(){let e=this.$parent;for(;e;){if(e.add)return e;e=e.$parent}},addToParent(e){const t=e||this.o3d;return this.parent?(this.parent.add(t),!0):!1},removeFromParent(e){const t=e||this.o3d;return this.parent?(this.parent.remove(t),!0):!1},add(e){var t;(t=this.o3d)==null||t.add(e)},remove(e){var t;(t=this.o3d)==null||t.remove(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Object3D"}),ze=o({name:"Group",extends:B,setup(){return{group:new Jr}},created(){this.initObject3D(this.group)},__hmrId:"Group"});const J=()=>{};var Te=o({name:"Raycaster",props:{onPointerEnter:{type:Function,default:J},onPointerOver:{type:Function,default:J},onPointerMove:{type:Function,default:J},onPointerLeave:{type:Function,default:J},onClick:{type:Function,default:J},intersectMode:{type:String,default:"move"}},setup(){return{renderer:X(N)}},mounted(){if(!this.renderer){console.error("Renderer not found");return}const e=this.renderer;this.renderer.onMounted(()=>{!e.camera||(this.pointer=je({camera:e.camera,domElement:e.canvas,intersectObjects:this.getIntersectObjects(),onIntersectEnter:this.onPointerEnter,onIntersectOver:this.onPointerOver,onIntersectMove:this.onPointerMove,onIntersectLeave:this.onPointerLeave,onIntersectClick:this.onClick}),this.pointer.addListeners(),this.intersectMode==="frame"&&e.onBeforeRender(this.pointer.intersect))})},unmounted(){var e;this.pointer&&(this.pointer.removeListeners(),(e=this.renderer)==null||e.offBeforeRender(this.pointer.intersect))},methods:{getIntersectObjects(){return this.renderer&&this.renderer.scene?this.renderer.scene.children.filter(t=>["Mesh","InstancedMesh"].includes(t.type)):[]}},render(){return[]},__hmrId:"Raycaster"}),Ae=o({extends:B,props:{cubeRTSize:{type:Number,default:256},cubeCameraNear:{type:Number,default:.1},cubeCameraFar:{type:Number,default:2e3},autoUpdate:Boolean},setup(e){const t=X(N);if(!t||!t.scene){console.error("Missing Renderer / Scene");return}const r=t.renderer,s=t.scene,n=new Qr(e.cubeRTSize,{format:es,generateMipmaps:!0,minFilter:we}),a=new ts(e.cubeCameraNear,e.cubeCameraFar,n),i=()=>{a.update(r,s)};return e.autoUpdate?(t.onBeforeRender(i),Ur(()=>{t.offBeforeRender(i)})):t.onMounted(i),{cubeRT:n,cubeCamera:a}},render(){return[]},__hmrId:"CubeCamera"});const ii={onPointerEnter:Function,onPointerOver:Function,onPointerMove:Function,onPointerLeave:Function,onPointerDown:Function,onPointerUp:Function,onClick:Function},Q=Symbol("Mesh"),H=o({name:"Mesh",extends:B,props:{castShadow:Boolean,receiveShadow:Boolean,...ii},setup(){return{}},provide(){return{[Q]:this}},mounted(){!this.mesh&&!this.loading&&this.initMesh()},methods:{initMesh(){const e=new rs(this.geometry,this.material);e.userData.component=this,u(this,"castShadow",e),u(this,"receiveShadow",e),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.renderer&&this.renderer.three.addIntersectObject(e),this.mesh=e,this.initObject3D(e)},createGeometry(){},addGeometryWatchers(e){Object.keys(e).forEach(t=>{l(()=>this[t],()=>{this.refreshGeometry()})})},setGeometry(e){this.geometry=e,this.mesh&&(this.mesh.geometry=e)},setMaterial(e){this.material=e,this.mesh&&(this.mesh.material=e)},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.mesh&&this.geometry&&(this.mesh.geometry=this.geometry),e==null||e.dispose()}},unmounted(){this.mesh&&this.renderer&&this.renderer.three.removeIntersectObject(this.mesh),this.geometry&&this.geometry.dispose(),this.material&&this.material.dispose()},__hmrId:"Mesh"});function v(e,t,r){return o({name:e,extends:H,props:t,created(){this.createGeometry(),this.addGeometryWatchers(t)},methods:{createGeometry(){this.geometry=r(this)}}})}const Be=o({props:{rotateX:Number,rotateY:Number,rotateZ:Number},inject:{mesh:Q},setup(){return{}},created(){if(!this.mesh){console.error("Missing parent Mesh");return}this.createGeometry(),this.rotateGeometry(),this.geometry&&this.mesh.setGeometry(this.geometry),Object.keys(this.$props).forEach(e=>{l(()=>this[e],this.refreshGeometry)})},unmounted(){var e;(e=this.geometry)==null||e.dispose()},methods:{createGeometry(){},rotateGeometry(){!this.geometry||(this.rotateX&&this.geometry.rotateX(this.rotateX),this.rotateY&&this.geometry.rotateY(this.rotateY),this.rotateZ&&this.geometry.rotateZ(this.rotateZ))},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.rotateGeometry(),this.geometry&&this.mesh&&this.mesh.setGeometry(this.geometry),e==null||e.dispose()}},render(){return[]}});function b(e,t,r){return o({name:e,extends:Be,props:t,methods:{createGeometry(){this.geometry=r(this)}}})}const Fe={size:Number,width:{type:Number,default:1},height:{type:Number,default:1},depth:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},depthSegments:{type:Number,default:1}};function De(e){return e.size?new Ce(e.size,e.size,e.size,e.widthSegments,e.heightSegments,e.depthSegments):new Ce(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}var Ue=b("BoxGeometry",Fe,De);const He={radius:{type:Number,default:1},segments:{type:Number,default:8},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function We(e){return new ss(e.radius,e.segments,e.thetaStart,e.thetaLength)}var Xe=b("CircleGeometry",He,We);const Ke={radius:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Ve(e){return new is(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var qe=b("ConeGeometry",Ke,Ve);const Ze={radiusTop:{type:Number,default:1},radiusBottom:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Ye(e){return new ns(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var Je=b("CylinderGeometry",Ze,Ye);const Qe={radius:{type:Number,default:1},detail:{type:Number,default:0}};function et(e){return new as(e.radius,e.detail)}var tt=b("DodecahedronGeometry",Qe,et);const rt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function st(e){return new os(e.radius,e.detail)}var it=b("IcosahedronGeometry",rt,st);const nt={points:Array,segments:{type:Number,default:12},phiStart:{type:Number,default:0},phiLength:{type:Number,default:Math.PI*2}};function at(e){return new hs(e.points,e.segments,e.phiStart,e.phiLength)}var ot=b("LatheGeometry",nt,at);const ht={radius:{type:Number,default:1},detail:{type:Number,default:0}};function dt(e){return new ds(e.radius,e.detail)}var lt=b("OctahedronGeometry",ht,dt);const ut={width:{type:Number,default:1},height:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1}};function ct(e){return new Me(e.width,e.height,e.widthSegments,e.heightSegments)}var mt=b("PlaneGeometry",ut,ct);const ft={vertices:Array,indices:Array,radius:{type:Number,default:1},detail:{type:Number,default:0}};function pt(e){return new ls(e.vertices,e.indices,e.radius,e.detail)}var yt=b("PolyhedronGeometry",ft,pt);const gt={innerRadius:{type:Number,default:.5},outerRadius:{type:Number,default:1},thetaSegments:{type:Number,default:8},phiSegments:{type:Number,default:1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function vt(e){return new us(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}var bt=b("RingGeometry",gt,vt);const St={radius:{type:Number,default:1},widthSegments:{type:Number,default:12},heightSegments:{type:Number,default:12}};function Pt(e){return new cs(e.radius,e.widthSegments,e.heightSegments)}var xt=b("SphereGeometry",St,Pt);const wt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function Ct(e){return new ms(e.radius,e.detail)}var Mt=b("TetrahedronGeometry",wt,Ct);const Lt={radius:{type:Number,default:1},tube:{type:Number,default:.4},radialSegments:{type:Number,default:8},tubularSegments:{type:Number,default:6},arc:{type:Number,default:Math.PI*2}};function Nt(e){return new fs(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}var Gt=b("TorusGeometry",Lt,Nt);const _t={radius:{type:Number,default:1},tube:{type:Number,default:.4},tubularSegments:{type:Number,default:64},radialSegments:{type:Number,default:8},p:{type:Number,default:2},q:{type:Number,default:3}};function jt(e){return new ps(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}var Et=b("TorusKnotGeometry",_t,jt);const ye={points:Array,path:gs,tubularSegments:{type:Number,default:64},radius:{type:Number,default:1},radialSegments:{type:Number,default:8},closed:{type:Boolean,default:!1}};function kt(e){let t;return e.points?t=new Le(e.points):e.path?t=e.path:console.error("Missing path curve or points."),new ys(t,e.tubularSegments,e.radius,e.radiusSegments,e.closed)}var Rt=o({extends:Be,props:ye,methods:{createGeometry(){this.geometry=kt(this)},updatePoints(e){Ot(this.geometry,e)}}});function Ot(e,t){const r=new Le(t),{radialSegments:s,radius:n,tubularSegments:a,closed:i}=e.parameters,c=r.computeFrenetFrames(a,i);e.tangents=c.tangents,e.normals=c.normals,e.binormals=c.binormals,e.parameters.path=r;const P=e.getAttribute("position"),R=e.getAttribute("normal"),f=new Z,T=new Z;for(let x=0;x({x:512,y:512})},shadowCamera:{type:Object,default:()=>({})}},setup(){return{}},unmounted(){(this.light instanceof ce||this.light instanceof me)&&this.removeFromParent(this.light.target)},methods:{initLight(e){this.light=e,e.shadow&&(e.castShadow=this.castShadow,V(e.shadow.mapSize,this.shadowMapSize),V(e.shadow.camera,this.shadowCamera)),["color","intensity","castShadow"].forEach(t=>{l(()=>this[t],r=>{t==="color"?e.color.set(r):e[t]=r})}),this.initObject3D(e),(e instanceof ce||e instanceof me)&&(u(this,"target",e.target,"position"),this.addToParent(e.target))}},__hmrId:"Light"}),$t=o({extends:q,created(){this.initLight(new vs(this.color,this.intensity))},__hmrId:"AmbientLight"}),It=o({extends:q,props:{target:{type:Object,default:()=>({x:0,y:0,z:0})}},created(){this.initLight(new me(this.color,this.intensity))},__hmrId:"DirectionalLight"}),zt=o({extends:q,props:{groundColor:{type:String,default:"#444444"}},created(){const e=new bs(this.color,this.groundColor,this.intensity);l(()=>this.groundColor,t=>{e.groundColor.set(t)}),this.initLight(e)},__hmrId:"HemisphereLight"}),Tt=o({extends:q,props:{distance:{type:Number,default:0},decay:{type:Number,default:1}},created(){this.initLight(new Ss(this.color,this.intensity,this.distance,this.decay))},__hmrId:"PointLight"}),At=o({extends:q,props:{width:{type:Number,default:10},height:{type:Number,default:10},helper:Boolean},created(){Bs.init();const e=new Ps(this.color,this.intensity,this.width,this.height);if(["width","height"].forEach(r=>{l(()=>this[r],s=>{e[r]=s})}),this.helper){const r=new Fs(e);e.add(r)}this.initLight(e)},__hmrId:"RectAreaLight"}),Bt=o({extends:q,props:{angle:{type:Number,default:Math.PI/3},decay:{type:Number,default:1},distance:{type:Number,default:0},penumbra:{type:Number,default:0},target:Object},created(){const e=new ce(this.color,this.intensity,this.distance,this.angle,this.penumbra,this.decay);["angle","decay","distance","penumbra"].forEach(r=>{l(()=>this[r],s=>{e[r]=s})}),this.initLight(e)},__hmrId:"SpotLight"});const oe=Symbol("Material");var j=o({inject:{mesh:Q},props:{color:{type:[String,Number],default:"#ffffff"},depthTest:{type:Boolean,default:!0},depthWrite:{type:Boolean,default:!0},fog:{type:Boolean,default:!0},opacity:{type:Number,default:1},side:{type:Number,default:xs},transparent:Boolean,vertexColors:Boolean},setup(){return{}},provide(){return{[oe]:this}},created(){if(!this.mesh){console.error("Missing parent Mesh");return}this.createMaterial&&(this.material=this.createMaterial(),this.mesh.setMaterial(this.material),this.addWatchers())},unmounted(){var e;(e=this.material)==null||e.dispose()},methods:{setProp(e,t,r=!1){this.material&&(this.material[e]=t,this.material.needsUpdate=r)},setTexture(e,t="map"){this.setProp(t,e,!0)},addWatchers(){["color","depthTest","depthWrite","fog","opacity","side","transparent"].forEach(e=>{l(()=>this[e],t=>{e==="color"?this.material.color.set(t):this.material[e]=t})})}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Material"});const E={wireframe:{type:Boolean,default:!1},wireframeLinewidth:{type:Number,default:1}};var Ft=o({extends:j,props:{...E},methods:{createMaterial(){const e=new Ne(z(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"BasicMaterial"}),Dt=o({extends:j,props:{...E},methods:{createMaterial(){const e=new ws(z(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"LambertMaterial"}),Ut=o({extends:j,props:{src:String,name:{type:String,default:"0404E8_0404B5_0404CB_3333FC"},flatShading:Boolean},methods:{createMaterial(){const e=this.src?this.src:pe(this.name),t=z(this.$props,["src","name"]);return t.matcap=new Y().load(e),new Cs(t)}},__hmrId:"MatcapMaterial"}),Ht=o({extends:j,props:{emissive:{type:[Number,String],default:0},emissiveIntensity:{type:Number,default:1},reflectivity:{type:Number,default:1},shininess:{type:Number,default:30},specular:{type:[String,Number],default:1118481},flatShading:Boolean,...E},methods:{createMaterial(){const e=new Ms(z(this.$props));return["emissive","emissiveIntensity","reflectivity","shininess","specular"].forEach(r=>{l(()=>this[r],s=>{r==="emissive"||r==="specular"?e[r].set(s):e[r]=s})}),U(this,Object.keys(E),e),e}},__hmrId:"PhongMaterial"});const Wt={aoMapIntensity:{type:Number,default:1},bumpScale:{type:Number,default:1},displacementBias:{type:Number,default:0},displacementScale:{type:Number,default:1},emissive:{type:[String,Number],default:0},emissiveIntensity:{type:Number,default:1},envMapIntensity:{type:Number,default:1},lightMapIntensity:{type:Number,default:1},metalness:{type:Number,default:0},normalScale:{type:Object,default:()=>({x:1,y:1})},roughness:{type:Number,default:1},refractionRatio:{type:Number,default:.98},flatShading:Boolean};var ge=o({extends:j,props:{...Wt,...E},methods:{createMaterial(){const e=new Ls(z(this.$props,["normalScale"]));return Object.keys(Wt).forEach(t=>{t!=="normalScale"&&l(()=>this[t],r=>{t==="emissive"?e[t].set(r):e[t]=r})}),u(this,"normalScale",e),U(this,Object.keys(E),e),e}},__hmrId:"StandardMaterial"}),Xt=o({extends:ge,props:{flatShading:Boolean},methods:{createMaterial(){return new Ns(z(this.$props))}},__hmrId:"PhysicalMaterial"});const ni=` +import{Vector3 as Y,Raycaster as Ur,Plane as Hr,Vector2 as T,InstancedMesh as ce,WebGLRenderer as Xr,PCFShadowMap as Kr,NoToneMapping as Wr,OrthographicCamera as Vr,PerspectiveCamera as qr,Scene as Zr,Color as se,Texture as Yr,Group as Jr,WebGLCubeRenderTarget as Qr,RGBFormat as es,LinearMipmapLinearFilter as Me,CubeCamera as ts,Mesh as rs,BufferGeometry as ss,BufferAttribute as is,BoxGeometry as Ce,CircleGeometry as ns,ConeGeometry as as,CylinderGeometry as os,DodecahedronGeometry as hs,IcosahedronGeometry as ds,LatheGeometry as ls,OctahedronGeometry as us,PlaneGeometry as Le,PolyhedronGeometry as cs,RingGeometry as ms,SphereGeometry as fs,TetrahedronGeometry as ps,TorusGeometry as ys,TorusKnotGeometry as gs,TubeGeometry as vs,Curve as bs,CatmullRomCurve3 as Ne,SpotLight as me,DirectionalLight as fe,AmbientLight as Ss,HemisphereLight as Ps,PointLight as ws,RectAreaLight as xs,NormalBlending as Ms,FrontSide as Cs,MeshBasicMaterial as Ge,MeshLambertMaterial as Ls,TextureLoader as J,MeshMatcapMaterial as Ns,MeshPhongMaterial as Gs,MeshStandardMaterial as _s,MeshPhysicalMaterial as ks,ShaderMaterial as pe,ShaderChunk as K,UniformsUtils as _e,ShaderLib as js,MeshToonMaterial as Es,LinearEncoding as Os,UVMapping as Rs,ClampToEdgeWrapping as ke,LinearFilter as $s,CubeReflectionMapping as zs,CubeTextureLoader as Ts,PointsMaterial as Is,FontLoader as As,TextGeometry as Bs,DoubleSide as Fs,SpriteMaterial as Ds,Sprite as Us,Points as Hs}from"https://unpkg.com/three@0.127.0/build/three.module.js";import{toRef as Xs,watch as l,defineComponent as o,inject as W,provide as Ks,onUnmounted as Ws,createApp as Vs}from"https://unpkg.com/vue@3.0.11/dist/vue.esm-browser.prod.js";import{OrbitControls as qs}from"https://unpkg.com/three@0.127.0/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as Zs}from"https://unpkg.com/three@0.127.0/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as Ys}from"https://unpkg.com/three@0.127.0/examples/jsm/helpers/RectAreaLightHelper.js";import{GLTFLoader as Js}from"https://unpkg.com/three@0.127.0/examples/jsm/loaders/GLTFLoader.js";import{FBXLoader as Qs}from"https://unpkg.com/three@0.127.0/examples/jsm/loaders/FBXLoader.js";import{EffectComposer as ei}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as ti}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as ri}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as si}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as ie}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as ii}from"https://unpkg.com/three@0.127.0/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as ni}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as ai}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/SMAAPass.js";import{SSAOPass as oi}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/SSAOPass.js";import{UnrealBloomPass as hi}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/UnrealBloomPass.js";function V(e,t){t instanceof Object&&Object.entries(t).forEach(([r,s])=>{e[r]=s})}function U(e,t,r){t.forEach(s=>{u(e,s,r,s)})}function u(e,t,r,s){const n=s||t,a=Xs(e,t);a.value instanceof Object?(V(r[n],a.value),l(a,i=>{V(r[n],i)},{deep:!0})):(a.value&&(r[n]=e[t]),l(a,i=>{r[n]=i}))}function N(e,t=[]){const r={};return Object.entries(e).forEach(([s,n])=>{(!t||t&&!t.includes(s))&&(r[s]=n)}),r}function je(e,t,r){return r=r<0?0:r,r=r>1?1:r,e+(t-e)*r}function Ee(e,t,r){return er?r:e}const di="https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d",li="0404E8_0404B5_0404CB_3333FC";function ye(e=li,t=1024){const r=`${e}${ui(t)}.png`;return`${di}/${t}/${r}`}function ui(e){switch(e){case 64:return"-64px";case 128:return"-128px";case 256:return"-256px";case 512:return"-512px";default:return""}}function ci(e){const{camera:t,resetPosition:r=new Y(0,0,0)}=e,s=new Ur,n=r.clone(),a=new Hr(new Y(0,0,1),0);return{position:n,updatePosition:b=>{s.setFromCamera(b,t),t.getWorldDirection(a.normal),s.ray.intersectPlane(a,n)},intersect:(b,R)=>(s.setFromCamera(b,t),s.intersectObjects(R))}}function Oe(e){const{camera:t,domElement:r,intersectObjects:s,touch:n=!0,resetOnEnd:a=!1,resetPosition:i=new T(0,0),resetPositionV3:c=new Y(0,0,0),onEnter:b=()=>{},onMove:R=()=>{},onLeave:f=()=>{},onClick:A=()=>{},onIntersectEnter:X=()=>{},onIntersectOver:w=()=>{},onIntersectMove:F=()=>{},onIntersectLeave:D=()=>{},onIntersectClick:k=()=>{}}=e,m=i.clone(),p=new T(0,0),h=ci({camera:t}),d=h.position,x={position:m,positionN:p,positionV3:d,intersectObjects:s,listeners:!1,addListeners:Fr,removeListeners:Dr,intersect:Se};return x;function M(){m.copy(i),d.copy(c)}function le(S){let $,z;S.touches&&S.touches.length>0?($=S.touches[0].clientX,z=S.touches[0].clientY):($=S.clientX,z=S.clientY);const y=r.getBoundingClientRect();m.x=$-y.left,m.y=z-y.top,p.x=m.x/y.width*2-1,p.y=-(m.y/y.height)*2+1,h.updatePosition(p)}function Se(){if(s.length){const S=h.intersect(p,s),$=[...s],z=[];S.forEach(y=>{var B,j,C;const{object:P}=y,{component:L}=P.userData;if(P instanceof ce){if(z.indexOf(P)!==-1)return;z.push(P)}if(!P.userData.over){P.userData.over=!0;const ue={type:"pointerover",over:!0,component:L,intersect:y},xe={...ue,type:"pointerenter"};w(ue),X(xe),(B=L.onPointerOver)==null||B.call(L,ue),(j=L.onPointerEnter)==null||j.call(L,xe)}const we={type:"pointermove",component:L,intersect:y};F(we),(C=L.onPointerMove)==null||C.call(L,we),$.splice($.indexOf(P),1)}),$.forEach(y=>{var B,j;const{component:C}=y.userData;if(y.userData.over){y.userData.over=!1;const P={type:"pointerover",over:!1,component:C},L={...P,type:"pointerleave"};w(P),D(L),(B=C.onPointerOver)==null||B.call(C,P),(j=C.onPointerLeave)==null||j.call(C,L)}})}}function ee(S){le(S),b({type:"pointerenter",position:m,positionN:p,positionV3:d})}function te(S){le(S),R({type:"pointermove",position:m,positionN:p,positionV3:d}),Se()}function Pe(S){if(le(S),s.length){const $=h.intersect(p,s),z=[];$.forEach(y=>{var B;const{object:j}=y,{component:C}=j.userData;if(j instanceof ce){if(z.indexOf(j)!==-1)return;z.push(j)}const P={type:"click",component:C,intersect:y};k(P),(B=C.onClick)==null||B.call(C,P)})}A({type:"click",position:m,positionN:p,positionV3:d})}function re(){a&&M(),f({type:"pointerleave"})}function Fr(){r.addEventListener("mouseenter",ee),r.addEventListener("mousemove",te),r.addEventListener("mouseleave",re),r.addEventListener("click",Pe),n&&(r.addEventListener("touchstart",ee),r.addEventListener("touchmove",te),r.addEventListener("touchend",re)),x.listeners=!0}function Dr(){r.removeEventListener("mouseenter",ee),r.removeEventListener("mousemove",te),r.removeEventListener("mouseleave",re),r.removeEventListener("click",Pe),r.removeEventListener("touchstart",ee),r.removeEventListener("touchmove",te),r.removeEventListener("touchend",re),x.listeners=!1}}function mi(e){const t={antialias:!0,alpha:!1,autoClear:!0,orbitCtrl:!1,pointer:!1,resize:!1,width:300,height:150};e&&Object.entries(e).forEach(([h,d])=>{t[h]=d});const r={width:1,height:1,wWidth:1,wHeight:1,ratio:1},s=[],n=[],a=c(),i={config:t,renderer:a,size:r,init:b,dispose:D,render:A,renderC:X,setSize:m,addIntersectObject:w,removeIntersectObject:F};return i;function c(){const h=new Xr({canvas:t.canvas,antialias:t.antialias,alpha:t.alpha});return h.autoClear=t.autoClear,h}function b(){if(!i.scene)return console.error("Missing Scene"),!1;if(!i.camera)return console.error("Missing Camera"),!1;if(t.resize?(k(),window.addEventListener("resize",k)):t.width&&t.height&&m(t.width,t.height),R(),t.orbitCtrl){const h=new qs(i.camera,i.renderer.domElement);t.orbitCtrl instanceof Object&&Object.entries(t.orbitCtrl).forEach(([d,x])=>{h[d]=x}),f(()=>{h.update()}),i.cameraCtrl=h}return!0}function R(){let h={camera:i.camera,domElement:i.renderer.domElement,intersectObjects:n};t.pointer&&t.pointer instanceof Object&&(h={...h,...t.pointer});const d=i.pointer=Oe(h);(t.pointer||n.length)&&(d.addListeners(),h.intersectMode==="frame"&&f(d.intersect))}function f(h){s.push(h)}function A(){s.forEach(h=>h()),i.renderer.render(i.scene,i.camera)}function X(){s.forEach(h=>h()),i.composer.render()}function w(h){n.indexOf(h)===-1&&n.push(h),i.pointer&&!i.pointer.listeners&&i.pointer.addListeners()}function F(h){const d=n.indexOf(h);d!==-1&&n.splice(d,1),i.pointer&&!t.pointer&&n.length===0&&i.pointer.removeListeners()}function D(){window.removeEventListener("resize",k),i.pointer&&i.pointer.removeListeners(),i.cameraCtrl&&i.cameraCtrl.dispose(),i.renderer&&i.renderer.dispose()}function k(){var h;if(t.resize==="window")m(window.innerWidth,window.innerHeight);else{const d=i.renderer.domElement.parentNode;d&&m(d.clientWidth,d.clientHeight)}(h=t.onResize)==null||h.call(t,r)}function m(h,d){r.width=h,r.height=d,r.ratio=h/d,i.renderer.setSize(h,d,!1);const x=i.camera;if(x.type==="PerspectiveCamera"){const M=x;M.aspect=r.ratio,M.updateProjectionMatrix()}if(x.type==="OrthographicCamera"){const M=x;r.wWidth=M.right-M.left,r.wHeight=M.top-M.bottom}else{const M=p();r.wWidth=M[0],r.wHeight=M[1]}}function p(){const h=i.camera,d=h.fov*Math.PI/180,x=2*Math.tan(d/2)*Math.abs(h.position.z);return[x*h.aspect,x]}}const G=Symbol("Renderer");var Re=o({name:"Renderer",props:{antialias:Boolean,alpha:Boolean,autoClear:{type:Boolean,default:!0},orbitCtrl:{type:[Boolean,Object],default:!1},pointer:{type:[Boolean,Object],default:!1},resize:{type:[Boolean,String],default:!1},shadow:Boolean,shadowType:{type:Number,default:Kr},toneMapping:{type:Number,default:Wr},width:String,height:String,xr:Boolean,onReady:Function,onClick:Function},setup(e){const t=[],r=[],s=[],n=[],a=[],i=document.createElement("canvas"),c={canvas:i,antialias:e.antialias,alpha:e.alpha,autoClear:e.autoClear,orbitCtrl:e.orbitCtrl,pointer:e.pointer,resize:e.resize};e.width&&(c.width=parseInt(e.width)),e.height&&(c.height=parseInt(e.height));const b=mi(c);u(e,"toneMapping",b.renderer);const R=()=>{};return e.onClick&&i.addEventListener("click",e.onClick),{canvas:i,three:b,renderer:b.renderer,size:b.size,renderFn:R,raf:!0,initCallbacks:t,mountedCallbacks:r,beforeRenderCallbacks:s,afterRenderCallbacks:n,resizeCallbacks:a}},computed:{camera:{get:function(){return this.three.camera},set:function(e){this.three.camera=e}},scene:{get:function(){return this.three.scene},set:function(e){this.three.scene=e}},composer:{get:function(){return this.three.composer},set:function(e){this.three.composer=e}}},provide(){return{[G]:this}},mounted(){var e;this.$el.parentNode.insertBefore(this.canvas,this.$el),this.three.init()&&(this.three.config.onResize=t=>{this.resizeCallbacks.forEach(r=>r({type:"resize",renderer:this,size:t}))},this.shadow&&(this.renderer.shadowMap.enabled=!0,this.renderer.shadowMap.type=this.shadowType),this.renderFn=this.three.composer?this.three.renderC:this.three.render,this.initCallbacks.forEach(t=>t({type:"init",renderer:this})),(e=this.onReady)==null||e.call(this,this),this.xr?(this.renderer.xr.enabled=!0,this.renderer.setAnimationLoop(this.render)):requestAnimationFrame(this.renderLoop)),this.mountedCallbacks.forEach(t=>t({type:"mounted",renderer:this}))},beforeUnmount(){this.canvas.remove(),this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[],this.raf=!1,this.three.dispose()},methods:{onInit(e){this.addListener("init",e)},onMounted(e){this.addListener("mounted",e)},onBeforeRender(e){this.addListener("beforerender",e)},offBeforeRender(e){this.removeListener("beforerender",e)},onAfterRender(e){this.addListener("afterrender",e)},offAfterRender(e){this.removeListener("afterrender",e)},onResize(e){this.addListener("resize",e)},offResize(e){this.removeListener("resize",e)},addListener(e,t){this.getCallbacks(e).push(t)},removeListener(e,t){const r=this.getCallbacks(e),s=r.indexOf(t);s&&r.splice(s,1)},getCallbacks(e){return e==="init"?this.initCallbacks:e==="mounted"?this.mountedCallbacks:e==="beforerender"?this.beforeRenderCallbacks:e==="afterrender"?this.afterRenderCallbacks:this.resizeCallbacks},render(e){this.beforeRenderCallbacks.forEach(t=>t({type:"beforerender",renderer:this,time:e})),this.renderFn({renderer:this,time:e}),this.afterRenderCallbacks.forEach(t=>t({type:"afterrender",renderer:this,time:e}))},renderLoop(e){this.raf&&requestAnimationFrame(this.renderLoop),this.render(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Renderer"}),$e=o({render(){return this.$slots.default?this.$slots.default():[]}}),ze=o({extends:$e,name:"OrthographicCamera",props:{left:{type:Number,default:-1},right:{type:Number,default:1},top:{type:Number,default:1},bottom:{type:Number,default:-1},near:{type:Number,default:.1},far:{type:Number,default:2e3},zoom:{type:Number,default:1},position:{type:Object,default:()=>({x:0,y:0,z:0})}},setup(e){const t=W(G);if(!t){console.error("Renderer not found");return}const r=new Vr(e.left,e.right,e.top,e.bottom,e.near,e.far);return t.camera=r,u(e,"position",r),["left","right","top","bottom","near","far","zoom"].forEach(n=>{l(()=>e[n],a=>{r[n]=a,r.updateProjectionMatrix()})}),{renderer:t,camera:r}},__hmrId:"OrthographicCamera"}),ne=o({extends:$e,name:"PerspectiveCamera",props:{aspect:{type:Number,default:1},far:{type:Number,default:2e3},fov:{type:Number,default:50},near:{type:Number,default:.1},position:{type:Object,default:()=>({x:0,y:0,z:0})},lookAt:{type:Object,default:null}},setup(e){var t;const r=W(G);if(!r){console.error("Renderer not found");return}const s=new qr(e.fov,e.aspect,e.near,e.far);return r.camera=s,u(e,"position",s),e.lookAt&&s.lookAt((t=e.lookAt.x)!=null?t:0,e.lookAt.y,e.lookAt.z),l(()=>e.lookAt,a=>{var i;s.lookAt((i=a.x)!=null?i:0,a.y,a.z)},{deep:!0}),["aspect","far","fov","near"].forEach(a=>{l(()=>e[a],i=>{s[a]=i,s.updateProjectionMatrix()})}),{renderer:r,camera:s}},__hmrId:"PerspectiveCamera"});const ae=Symbol("Scene");var Te=o({name:"Scene",props:{background:[String,Number,Object]},setup(e){const t=W(G),r=new Zr;if(!t){console.error("Renderer not found");return}t.scene=r,Ks(ae,r);const s=i=>{!i||(typeof i=="string"||typeof i=="number"?r.background instanceof se?r.background.set(i):r.background=new se(i):i instanceof Yr&&(r.background=i))};return s(e.background),l(()=>e.background,s),{scene:r,add:i=>{r.add(i)},remove:i=>{r.remove(i)}}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Scene"}),I=o({name:"Object3D",inject:{renderer:G,scene:ae},emits:["created","ready"],props:{position:{type:Object,default:()=>({x:0,y:0,z:0})},rotation:{type:Object,default:()=>({x:0,y:0,z:0})},scale:{type:Object,default:()=>({x:1,y:1,z:1,order:"XYZ"})},lookAt:{type:Object,default:null},autoRemove:{type:Boolean,default:!0},userData:{type:Object,default:()=>({})}},setup(){return{}},created(){this.renderer||console.error("Missing parent Renderer"),this.scene||console.error("Missing parent Scene")},unmounted(){this.autoRemove&&this.removeFromParent()},methods:{initObject3D(e){var t;this.o3d=e,this.$emit("created",e),u(this,"position",e),u(this,"rotation",e),u(this,"scale",e),u(this,"userData",e.userData),this.lookAt&&e.lookAt((t=this.lookAt.x)!=null?t:0,this.lookAt.y,this.lookAt.z),l(()=>this.lookAt,r=>{var s;e.lookAt((s=r.x)!=null?s:0,r.y,r.z)},{deep:!0}),this.parent=this.getParent(),this.addToParent()?this.$emit("ready",this):console.error("Missing parent (Scene, Group...)")},getParent(){let e=this.$parent;for(;e;){if(e.add)return e;e=e.$parent}},addToParent(e){const t=e||this.o3d;return this.parent?(this.parent.add(t),!0):!1},removeFromParent(e){const t=e||this.o3d;return this.parent?(this.parent.remove(t),!0):!1},add(e){var t;(t=this.o3d)==null||t.add(e)},remove(e){var t;(t=this.o3d)==null||t.remove(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Object3D"}),Ie=o({name:"Group",extends:I,setup(){return{group:new Jr}},created(){this.initObject3D(this.group)},__hmrId:"Group"});const Q=()=>{};var Ae=o({name:"Raycaster",props:{onPointerEnter:{type:Function,default:Q},onPointerOver:{type:Function,default:Q},onPointerMove:{type:Function,default:Q},onPointerLeave:{type:Function,default:Q},onClick:{type:Function,default:Q},intersectMode:{type:String,default:"move"}},setup(){return{renderer:W(G)}},mounted(){if(!this.renderer){console.error("Renderer not found");return}const e=this.renderer;this.renderer.onMounted(()=>{!e.camera||(this.pointer=Oe({camera:e.camera,domElement:e.canvas,intersectObjects:this.getIntersectObjects(),onIntersectEnter:this.onPointerEnter,onIntersectOver:this.onPointerOver,onIntersectMove:this.onPointerMove,onIntersectLeave:this.onPointerLeave,onIntersectClick:this.onClick}),this.pointer.addListeners(),this.intersectMode==="frame"&&e.onBeforeRender(this.pointer.intersect))})},unmounted(){var e;this.pointer&&(this.pointer.removeListeners(),(e=this.renderer)==null||e.offBeforeRender(this.pointer.intersect))},methods:{getIntersectObjects(){return this.renderer&&this.renderer.scene?this.renderer.scene.children.filter(t=>["Mesh","InstancedMesh"].includes(t.type)):[]}},render(){return[]},__hmrId:"Raycaster"}),Be=o({extends:I,props:{cubeRTSize:{type:Number,default:256},cubeCameraNear:{type:Number,default:.1},cubeCameraFar:{type:Number,default:2e3},autoUpdate:Boolean},setup(e){const t=W(G);if(!t||!t.scene){console.error("Missing Renderer / Scene");return}const r=t.renderer,s=t.scene,n=new Qr(e.cubeRTSize,{format:es,generateMipmaps:!0,minFilter:Me}),a=new ts(e.cubeCameraNear,e.cubeCameraFar,n),i=()=>{a.update(r,s)};return e.autoUpdate?(t.onBeforeRender(i),Ws(()=>{t.offBeforeRender(i)})):t.onMounted(i),{cubeRT:n,cubeCamera:a}},render(){return[]},__hmrId:"CubeCamera"});const fi={onPointerEnter:Function,onPointerOver:Function,onPointerMove:Function,onPointerLeave:Function,onPointerDown:Function,onPointerUp:Function,onClick:Function},q=Symbol("Mesh"),H=o({name:"Mesh",extends:I,props:{castShadow:Boolean,receiveShadow:Boolean,...fi},setup(){return{}},provide(){return{[q]:this}},mounted(){!this.mesh&&!this.loading&&this.initMesh()},methods:{initMesh(){const e=new rs(this.geometry,this.material);e.userData.component=this,u(this,"castShadow",e),u(this,"receiveShadow",e),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.renderer&&this.renderer.three.addIntersectObject(e),this.mesh=e,this.initObject3D(e)},createGeometry(){},addGeometryWatchers(e){Object.keys(e).forEach(t=>{l(()=>this[t],()=>{this.refreshGeometry()})})},setGeometry(e){this.geometry=e,this.mesh&&(this.mesh.geometry=e)},setMaterial(e){this.material=e,this.mesh&&(this.mesh.material=e)},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.mesh&&this.geometry&&(this.mesh.geometry=this.geometry),e==null||e.dispose()}},unmounted(){this.mesh&&this.renderer&&this.renderer.three.removeIntersectObject(this.mesh),this.geometry&&this.geometry.dispose(),this.material&&this.material.dispose()},__hmrId:"Mesh"});function g(e,t,r){return o({name:e,extends:H,props:t,created(){this.createGeometry(),this.addGeometryWatchers(t)},methods:{createGeometry(){this.geometry=r(this)}}})}const oe=o({props:{rotateX:Number,rotateY:Number,rotateZ:Number,attributes:{type:Array,default:()=>[]}},inject:{mesh:q},setup(){return{}},created(){if(!this.mesh){console.error("Missing parent Mesh");return}this.createGeometry(),this.rotateGeometry(),this.geometry&&this.mesh.setGeometry(this.geometry),Object.keys(this.$props).forEach(e=>{l(()=>this[e],this.refreshGeometry)})},unmounted(){var e;(e=this.geometry)==null||e.dispose()},methods:{createGeometry(){const e={},t=new ss;this.attributes.forEach(r=>{if(r.name&&r.itemSize&&r.array){const s=e[r.name]=new is(r.array,r.itemSize,r.normalized);t.setAttribute(r.name,s)}}),t.computeBoundingBox(),this.geometry=t},rotateGeometry(){!this.geometry||(this.rotateX&&this.geometry.rotateX(this.rotateX),this.rotateY&&this.geometry.rotateY(this.rotateY),this.rotateZ&&this.geometry.rotateZ(this.rotateZ))},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.rotateGeometry(),this.geometry&&this.mesh&&this.mesh.setGeometry(this.geometry),e==null||e.dispose()}},render(){return[]}});function v(e,t,r){return o({name:e,extends:oe,props:t,methods:{createGeometry(){this.geometry=r(this)}}})}const Fe={size:Number,width:{type:Number,default:1},height:{type:Number,default:1},depth:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},depthSegments:{type:Number,default:1}};function De(e){return e.size?new Ce(e.size,e.size,e.size,e.widthSegments,e.heightSegments,e.depthSegments):new Ce(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}var Ue=v("BoxGeometry",Fe,De);const He={radius:{type:Number,default:1},segments:{type:Number,default:8},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Xe(e){return new ns(e.radius,e.segments,e.thetaStart,e.thetaLength)}var Ke=v("CircleGeometry",He,Xe);const We={radius:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Ve(e){return new as(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var qe=v("ConeGeometry",We,Ve);const Ze={radiusTop:{type:Number,default:1},radiusBottom:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Ye(e){return new os(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var Je=v("CylinderGeometry",Ze,Ye);const Qe={radius:{type:Number,default:1},detail:{type:Number,default:0}};function et(e){return new hs(e.radius,e.detail)}var tt=v("DodecahedronGeometry",Qe,et);const rt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function st(e){return new ds(e.radius,e.detail)}var it=v("IcosahedronGeometry",rt,st);const nt={points:Array,segments:{type:Number,default:12},phiStart:{type:Number,default:0},phiLength:{type:Number,default:Math.PI*2}};function at(e){return new ls(e.points,e.segments,e.phiStart,e.phiLength)}var ot=v("LatheGeometry",nt,at);const ht={radius:{type:Number,default:1},detail:{type:Number,default:0}};function dt(e){return new us(e.radius,e.detail)}var lt=v("OctahedronGeometry",ht,dt);const ut={width:{type:Number,default:1},height:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1}};function ct(e){return new Le(e.width,e.height,e.widthSegments,e.heightSegments)}var mt=v("PlaneGeometry",ut,ct);const ft={vertices:Array,indices:Array,radius:{type:Number,default:1},detail:{type:Number,default:0}};function pt(e){return new cs(e.vertices,e.indices,e.radius,e.detail)}var yt=v("PolyhedronGeometry",ft,pt);const gt={innerRadius:{type:Number,default:.5},outerRadius:{type:Number,default:1},thetaSegments:{type:Number,default:8},phiSegments:{type:Number,default:1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function vt(e){return new ms(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}var bt=v("RingGeometry",gt,vt);const St={radius:{type:Number,default:1},widthSegments:{type:Number,default:12},heightSegments:{type:Number,default:12}};function Pt(e){return new fs(e.radius,e.widthSegments,e.heightSegments)}var wt=v("SphereGeometry",St,Pt);const xt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function Mt(e){return new ps(e.radius,e.detail)}var Ct=v("TetrahedronGeometry",xt,Mt);const Lt={radius:{type:Number,default:1},tube:{type:Number,default:.4},radialSegments:{type:Number,default:8},tubularSegments:{type:Number,default:6},arc:{type:Number,default:Math.PI*2}};function Nt(e){return new ys(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}var Gt=v("TorusGeometry",Lt,Nt);const _t={radius:{type:Number,default:1},tube:{type:Number,default:.4},tubularSegments:{type:Number,default:64},radialSegments:{type:Number,default:8},p:{type:Number,default:2},q:{type:Number,default:3}};function kt(e){return new gs(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}var jt=v("TorusKnotGeometry",_t,kt);const ge={points:Array,path:bs,tubularSegments:{type:Number,default:64},radius:{type:Number,default:1},radialSegments:{type:Number,default:8},closed:{type:Boolean,default:!1}};function Et(e){let t;return e.points?t=new Ne(e.points):e.path?t=e.path:console.error("Missing path curve or points."),new vs(t,e.tubularSegments,e.radius,e.radiusSegments,e.closed)}var Ot=o({extends:oe,props:ge,methods:{createGeometry(){this.geometry=Et(this)},updatePoints(e){Rt(this.geometry,e)}}});function Rt(e,t){const r=new Ne(t),{radialSegments:s,radius:n,tubularSegments:a,closed:i}=e.parameters,c=r.computeFrenetFrames(a,i);e.tangents=c.tangents,e.normals=c.normals,e.binormals=c.binormals,e.parameters.path=r;const b=e.getAttribute("position"),R=e.getAttribute("normal"),f=new Y,A=new Y;for(let w=0;w({x:512,y:512})},shadowCamera:{type:Object,default:()=>({})}},setup(){return{}},unmounted(){(this.light instanceof me||this.light instanceof fe)&&this.removeFromParent(this.light.target)},methods:{initLight(e){this.light=e,e.shadow&&(e.castShadow=this.castShadow,V(e.shadow.mapSize,this.shadowMapSize),V(e.shadow.camera,this.shadowCamera)),["color","intensity","castShadow"].forEach(t=>{l(()=>this[t],r=>{t==="color"?e.color.set(r):e[t]=r})}),this.initObject3D(e),(e instanceof me||e instanceof fe)&&(u(this,"target",e.target,"position"),this.addToParent(e.target))}},__hmrId:"Light"}),$t=o({extends:Z,created(){this.initLight(new Ss(this.color,this.intensity))},__hmrId:"AmbientLight"}),zt=o({extends:Z,props:{target:{type:Object,default:()=>({x:0,y:0,z:0})}},created(){this.initLight(new fe(this.color,this.intensity))},__hmrId:"DirectionalLight"}),Tt=o({extends:Z,props:{groundColor:{type:String,default:"#444444"}},created(){const e=new Ps(this.color,this.groundColor,this.intensity);l(()=>this.groundColor,t=>{e.groundColor.set(t)}),this.initLight(e)},__hmrId:"HemisphereLight"}),It=o({extends:Z,props:{distance:{type:Number,default:0},decay:{type:Number,default:1}},created(){this.initLight(new ws(this.color,this.intensity,this.distance,this.decay))},__hmrId:"PointLight"}),At=o({extends:Z,props:{width:{type:Number,default:10},height:{type:Number,default:10},helper:Boolean},created(){Zs.init();const e=new xs(this.color,this.intensity,this.width,this.height);if(["width","height"].forEach(r=>{l(()=>this[r],s=>{e[r]=s})}),this.helper){const r=new Ys(e);e.add(r)}this.initLight(e)},__hmrId:"RectAreaLight"}),Bt=o({extends:Z,props:{angle:{type:Number,default:Math.PI/3},decay:{type:Number,default:1},distance:{type:Number,default:0},penumbra:{type:Number,default:0},target:Object},created(){const e=new me(this.color,this.intensity,this.distance,this.angle,this.penumbra,this.decay);["angle","decay","distance","penumbra"].forEach(r=>{l(()=>this[r],s=>{e[r]=s})}),this.initLight(e)},__hmrId:"SpotLight"});const he=Symbol("Material");var _=o({inject:{mesh:q},props:{color:{type:[String,Number],default:"#ffffff"},blending:{type:Number,default:Ms},alphaTest:{type:Number,default:0},depthTest:{type:Boolean,default:!0},depthWrite:{type:Boolean,default:!0},fog:{type:Boolean,default:!0},opacity:{type:Number,default:1},side:{type:Number,default:Cs},transparent:Boolean,vertexColors:Boolean},setup(){return{}},provide(){return{[he]:this}},created(){if(!this.mesh){console.error("Missing parent Mesh");return}this.createMaterial&&(this.material=this.createMaterial(),this.mesh.setMaterial(this.material),this.addWatchers())},unmounted(){var e;(e=this.material)==null||e.dispose()},methods:{setProp(e,t,r=!1){this.material&&(this.material[e]=t,this.material.needsUpdate=r)},setTexture(e,t="map"){this.setProp(t,e,!0)},addWatchers(){["color","alphaTest","blending","depthTest","depthWrite","fog","opacity","side","transparent"].forEach(e=>{l(()=>this[e],t=>{e==="color"?this.material.color.set(t):this.material[e]=t})})}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Material"});const E={wireframe:{type:Boolean,default:!1},wireframeLinewidth:{type:Number,default:1}};var Ft=o({extends:_,props:{...E},methods:{createMaterial(){const e=new Ge(N(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"BasicMaterial"}),Dt=o({extends:_,props:{...E},methods:{createMaterial(){const e=new Ls(N(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"LambertMaterial"}),Ut=o({extends:_,props:{src:String,name:{type:String,default:"0404E8_0404B5_0404CB_3333FC"},flatShading:Boolean},methods:{createMaterial(){const e=this.src?this.src:ye(this.name),t=N(this.$props,["src","name"]);return t.matcap=new J().load(e),new Ns(t)}},__hmrId:"MatcapMaterial"}),Ht=o({extends:_,props:{emissive:{type:[Number,String],default:0},emissiveIntensity:{type:Number,default:1},reflectivity:{type:Number,default:1},shininess:{type:Number,default:30},specular:{type:[String,Number],default:1118481},flatShading:Boolean,...E},methods:{createMaterial(){const e=new Gs(N(this.$props));return["emissive","emissiveIntensity","reflectivity","shininess","specular"].forEach(r=>{l(()=>this[r],s=>{r==="emissive"||r==="specular"?e[r].set(s):e[r]=s})}),U(this,Object.keys(E),e),e}},__hmrId:"PhongMaterial"});const Xt={aoMapIntensity:{type:Number,default:1},bumpScale:{type:Number,default:1},displacementBias:{type:Number,default:0},displacementScale:{type:Number,default:1},emissive:{type:[String,Number],default:0},emissiveIntensity:{type:Number,default:1},envMapIntensity:{type:Number,default:1},lightMapIntensity:{type:Number,default:1},metalness:{type:Number,default:0},normalScale:{type:Object,default:()=>({x:1,y:1})},roughness:{type:Number,default:1},refractionRatio:{type:Number,default:.98},flatShading:Boolean};var ve=o({extends:_,props:{...Xt,...E},methods:{createMaterial(){const e=new _s(N(this.$props,["normalScale"]));return Object.keys(Xt).forEach(t=>{t!=="normalScale"&&l(()=>this[t],r=>{t==="emissive"?e[t].set(r):e[t]=r})}),u(this,"normalScale",e),U(this,Object.keys(E),e),e}},__hmrId:"StandardMaterial"}),Kt=o({extends:ve,props:{flatShading:Boolean},methods:{createMaterial(){return new ks(N(this.$props))}},__hmrId:"PhysicalMaterial"});const pi=` varying vec2 vUv; void main(){ vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); } -`,ai=` +`,yi=` varying vec2 vUv; void main() { gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0); } -`;var Kt=o({extends:j,props:{uniforms:{type:Object,default:()=>({})},vertexShader:{type:String,default:ni},fragmentShader:{type:String,default:ai}},methods:{createMaterial(){const e=new fe({uniforms:this.uniforms,vertexShader:this.vertexShader,fragmentShader:this.fragmentShader});return["vertexShader","fragmentShader"].forEach(r=>{l(()=>this[r],s=>{this.setProp(r,s,!0)})}),e},addWatchers(){}},__hmrId:"ShaderMaterial"});function oi(e,t,r){return e.split(t).join(r)}const hi=K.meshphong_frag.slice(0,K.meshphong_frag.indexOf("void main() {")),di=K.meshphong_frag.slice(K.meshphong_frag.indexOf("void main() {")),li={uniforms:Ge.merge([Gs.phong.uniforms,{thicknessColor:{value:new se(16777215)},thicknessDistortion:{value:.1},thicknessAmbient:{value:0},thicknessAttenuation:{value:.1},thicknessPower:{value:2},thicknessScale:{value:10}}]),vertexShader:` +`;var Wt=o({extends:_,props:{uniforms:{type:Object,default:()=>({})},vertexShader:{type:String,default:pi},fragmentShader:{type:String,default:yi}},methods:{createMaterial(){const e=new pe(N(this.$props,["color"]));return["vertexShader","fragmentShader"].forEach(t=>{l(()=>this[t],r=>{e[t]=r,e.needsUpdate=!0})}),e}},__hmrId:"ShaderMaterial"});function gi(e,t,r){return e.split(t).join(r)}const vi=K.meshphong_frag.slice(0,K.meshphong_frag.indexOf("void main() {")),bi=K.meshphong_frag.slice(K.meshphong_frag.indexOf("void main() {")),Si={uniforms:_e.merge([js.phong.uniforms,{thicknessColor:{value:new se(16777215)},thicknessDistortion:{value:.1},thicknessAmbient:{value:0},thicknessAttenuation:{value:.1},thicknessPower:{value:2},thicknessScale:{value:10}}]),vertexShader:` #define USE_UV ${K.meshphong_vert} `,fragmentShader:` #define USE_UV #define SUBSURFACE - ${hi} + ${vi} uniform float thicknessPower; uniform float thicknessScale; @@ -36,12 +36,12 @@ import{defineComponent as o,toRef as Fr,watch as l,inject as X,provide as Dr,onU vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness; reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color; } - `+di.replace("#include ",oi(K.lights_fragment_begin,"RE_Direct( directLight, geometry, material, reflectedLight );",` + `+bi.replace("#include ",gi(K.lights_fragment_begin,"RE_Direct( directLight, geometry, material, reflectedLight );",` RE_Direct( directLight, geometry, material, reflectedLight ); #if defined( SUBSURFACE ) && defined( USE_UV ) RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight); #endif - `))},Vt={color:{type:[String,Number],default:"#ffffff"},thicknessColor:{type:[String,Number],default:"#ffffff"},thicknessDistortion:{type:Number,default:.4},thicknessAmbient:{type:Number,default:.01},thicknessAttenuation:{type:Number,default:.7},thicknessPower:{type:Number,default:2},thicknessScale:{type:Number,default:4}};var qt=o({extends:j,props:Vt,methods:{createMaterial(){const e=li,t=Ge.clone(e.uniforms);return Object.keys(Vt).forEach(s=>{const n=this[s];let a=s,i=n;["color","thicknessColor"].includes(s)&&(s==="color"&&(a="diffuse"),i=new se(n)),t[a].value=i}),new fe({...e,uniforms:t,lights:!0,transparent:this.transparent,vertexColors:this.vertexColors})}},__hmrId:"SubSurfaceMaterial"}),Zt=o({extends:j,props:{...E},methods:{createMaterial(){const e=new _s(z(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"ToonMaterial"}),ve=o({inject:{material:oe},props:{name:{type:String,default:"map"},uniform:String,src:String,onLoad:Function,onProgress:Function,onError:Function,mapping:{type:Number,default:js},wrapS:{type:Number,default:_e},wrapT:{type:Number,default:_e},magFilter:{type:Number,default:Es},minFilter:{type:Number,default:we},repeat:{type:Object,default:()=>({x:1,y:1})},rotation:{type:Number,default:0},center:{type:Object,default:()=>({x:0,y:0})}},setup(){return{}},created(){this.refreshTexture(),l(()=>this.src,this.refreshTexture)},unmounted(){var e,t;(e=this.material)==null||e.setTexture(null,this.name),(t=this.texture)==null||t.dispose()},methods:{createTexture(){if(!this.src)return;const e=new Y().load(this.src,this.onLoaded,this.onProgress,this.onError);return["mapping","wrapS","wrapT","magFilter","minFilter","repeat","rotation","center"].forEach(r=>{u(this,r,e)}),e},refreshTexture(){this.texture=this.createTexture(),this.texture&&this.material&&(this.material.setTexture(this.texture,this.name),this.material.material instanceof fe&&this.uniform&&(this.material.uniforms[this.uniform]={value:this.texture}))},onLoaded(e){var t;(t=this.onLoad)==null||t.call(this,e)}},render(){return[]}}),Yt=o({extends:ve,props:{path:{type:String,required:!0},urls:{type:Array,default:()=>["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]},mapping:{type:Number,default:ks}},created(){l(()=>this.path,this.refreshTexture),l(()=>this.urls,this.refreshTexture)},methods:{createTexture(){return new Rs().setPath(this.path).load(this.urls,this.onLoaded,this.onProgress,this.onError)}}}),Jt=v("Box",Fe,De),Qt=v("Circle",He,We),er=v("Cone",Ke,Ve),tr=v("Cylinder",Ze,Ye),rr=v("Dodecahedron",Qe,et),sr=v("Icosahedron",rt,st),ir=v("Lathe",nt,at),nr=v("Octahedron",ht,dt),ar=v("Plane",ut,ct),or=v("Polyhedron",ft,pt),hr=v("Ring",gt,vt),dr=v("Sphere",St,Pt),lr=v("Tetrahedron",wt,Ct);const ui={text:{type:String,required:!0,default:"Text"},fontSrc:{type:String,required:!0},size:{type:Number,default:80},height:{type:Number,default:5},depth:{type:Number,default:1},curveSegments:{type:Number,default:12},bevelEnabled:{type:Boolean,default:!1},bevelThickness:{type:Number,default:10},bevelSize:{type:Number,default:8},bevelOffset:{type:Number,default:0},bevelSegments:{type:Number,default:5},align:{type:[Boolean,String],default:!1}};var ur=o({extends:H,props:ui,setup(){return{}},created(){if(!this.fontSrc){console.error('Missing required prop: "font-src"');return}["text","size","height","curveSegments","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","align"].forEach(r=>{l(()=>this[r],()=>{this.font&&this.refreshGeometry()})});const t=new Os;this.loading=!0,t.load(this.fontSrc,r=>{this.loading=!1,this.font=r,this.createGeometry(),this.initMesh()})},methods:{createGeometry(){this.geometry=new $s(this.text,{font:this.font,size:this.size,height:this.height,depth:this.depth,curveSegments:this.curveSegments,bevelEnabled:this.bevelEnabled,bevelThickness:this.bevelThickness,bevelSize:this.bevelSize,bevelOffset:this.bevelOffset,bevelSegments:this.bevelSegments}),this.align==="center"&&this.geometry.center()}}}),cr=v("Torus",Lt,Nt),mr=v("TorusKnot",_t,jt),fr=o({extends:H,props:ye,created(){this.createGeometry(),this.addGeometryWatchers(ye)},methods:{createGeometry(){this.geometry=kt(this)},updatePoints(e){Ot(this.geometry,e)}},__hmrId:"Tube"}),pr=o({emits:["loaded"],extends:H,props:{src:{type:String,required:!0},width:Number,height:Number,widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},keepSize:Boolean},setup(){return{}},created(){!this.renderer||(this.geometry=new Me(1,1,this.widthSegments,this.heightSegments),this.material=new Ne({side:Is,map:this.loadTexture()}),l(()=>this.src,this.refreshTexture),["width","height"].forEach(e=>{l(()=>this[e],this.resize)}),this.resize(),this.keepSize&&this.renderer.onResize(this.resize))},unmounted(){var e;(e=this.renderer)==null||e.offResize(this.resize)},methods:{loadTexture(){return new Y().load(this.src,this.onLoaded)},refreshTexture(){var e;(e=this.texture)==null||e.dispose(),this.material&&(this.material.map=this.loadTexture(),this.material.needsUpdate=!0)},onLoaded(e){this.texture=e,this.resize(),this.$emit("loaded",e)},resize(){if(!this.renderer||!this.texture)return;const e=this.renderer.size,t=this.texture.image.width,r=this.texture.image.height,s=t/r;let n=1,a=1;this.width&&this.height?(n=this.width*e.wWidth/e.width,a=this.height*e.wHeight/e.height):this.width?(n=this.width*e.wWidth/e.width,a=n/s):this.height?(a=this.height*e.wHeight/e.height,n=a*s):s>1?n=a*s:a=n/s,this.mesh&&(this.mesh.scale.x=n,this.mesh.scale.y=a)}},__hmrId:"Image"}),yr=o({extends:H,props:{count:{type:Number,required:!0}},methods:{initMesh(){if(!!this.renderer){if(!this.geometry||!this.material)return console.error("Missing geometry and/or material"),!1;this.mesh=new ue(this.geometry,this.material,this.count),this.mesh.userData.component=this,u(this,"castShadow",this.mesh),u(this,"receiveShadow",this.mesh),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.renderer.three.addIntersectObject(this.mesh),this.initObject3D(this.mesh)}}},__hmrId:"InstancedMesh"}),gr=o({extends:B,emits:["loaded"],props:{src:{type:String,required:!0}},setup(){return{}},created(){this.texture=new Y().load(this.src,this.onLoaded),this.material=new zs({map:this.texture}),this.sprite=new Ts(this.material),this.initObject3D(this.sprite)},unmounted(){var e,t;(e=this.texture)==null||e.dispose(),(t=this.material)==null||t.dispose()},methods:{onLoaded(){this.updateUV(),this.$emit("loaded")},updateUV(){if(!this.texture||!this.sprite)return;const e=this.texture.image.width,t=this.texture.image.height,r=e/t;let s=.5,n=.5;r>1?s=.5*r:n=.5/r;const a=this.sprite.geometry.attributes.position.array;a[0]=-s,a[1]=-n,a[5]=s,a[6]=-n,a[10]=s,a[11]=n,a[15]=-s,a[16]=n,this.sprite.geometry.attributes.position.needsUpdate=!0}},__hmrId:"Sprite"}),vr=o({extends:B,emits:["load","progress","error"],props:{src:{type:String,required:!0}},data(){return{progress:0}},methods:{onLoad(e){this.$emit("load",e),this.initObject3D(e)},onProgress(e){this.progress=e.loaded/e.total,this.$emit("progress",e)},onError(e){this.$emit("error",e)}}}),br=o({extends:vr,created(){new Ds().load(this.src,t=>{this.onLoad(t.scene)},this.onProgress,this.onError)}}),Sr=o({extends:vr,created(){new Us().load(this.src,t=>{this.onLoad(t)},this.onProgress,this.onError)}});const he=Symbol("Composer");var Pr=o({setup(){return{renderer:X(N)}},provide(){return{[he]:this}},created(){if(!this.renderer){console.error("Renderer not found");return}const e=this.renderer,t=new Hs(this.renderer.renderer);this.composer=t,this.renderer.composer=t,e.addListener("init",()=>{e.renderer.autoClear=!1,this.resize(),e.addListener("resize",this.resize)})},unmounted(){var e;(e=this.renderer)==null||e.removeListener("resize",this.resize)},methods:{addPass(e){var t;(t=this.composer)==null||t.addPass(e)},removePass(e){var t;(t=this.composer)==null||t.removePass(e)},resize(){this.composer&&this.renderer&&this.composer.setSize(this.renderer.size.width,this.renderer.size.height)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"EffectComposer"}),k=o({inject:{renderer:N,composer:he},emits:["ready"],setup(){return{}},created(){this.composer||console.error("Missing parent EffectComposer"),this.renderer||console.error("Missing parent Renderer")},unmounted(){var e,t,r;this.pass&&((e=this.composer)==null||e.removePass(this.pass),(r=(t=this.pass).dispose)==null||r.call(t))},methods:{initEffectPass(e){var t;this.pass=e,(t=this.composer)==null||t.addPass(e),this.$emit("ready",e)}},render(){return[]},__hmrId:"EffectPass"}),xr=o({extends:k,created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e=new Ws(this.renderer.scene,this.renderer.camera);this.initEffectPass(e)},__hmrId:"RenderPass"});const wr={focus:{type:Number,default:1},aperture:{type:Number,default:.025},maxblur:{type:Number,default:.01}};var Cr=o({extends:k,props:wr,created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e={focus:this.focus,aperture:this.aperture,maxblur:this.maxblur,width:this.renderer.size.width,height:this.renderer.size.height},t=new Xs(this.renderer.scene,this.renderer.camera,e);Object.keys(wr).forEach(r=>{l(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"BokehPass"});const Mr={noiseIntensity:{type:Number,default:.5},scanlinesIntensity:{type:Number,default:.05},scanlinesCount:{type:Number,default:4096},grayscale:{type:Number,default:0}};var Lr=o({extends:k,props:Mr,created(){const e=new Ks(this.noiseIntensity,this.scanlinesIntensity,this.scanlinesCount,this.grayscale);Object.keys(Mr).forEach(t=>{l(()=>this[t],r=>{e.uniforms[t].value=r})}),this.initEffectPass(e)},__hmrId:"FilmPass"}),Nr=o({extends:k,created(){var e;const t=new ie(Vs);(e=this.renderer)==null||e.addListener("resize",this.resize),this.initEffectPass(t)},unmounted(){var e;(e=this.renderer)==null||e.removeListener("resize",this.resize)},methods:{resize({size:e}){if(this.pass){const{resolution:t}=this.pass.material.uniforms;t.value.x=1/e.width,t.value.y=1/e.height}}},__hmrId:"FXAAPass"});const Gr={shape:{type:Number,default:1},radius:{type:Number,default:4},rotateR:{type:Number,default:Math.PI/12*1},rotateG:{type:Number,default:Math.PI/12*2},rotateB:{type:Number,default:Math.PI/12*3},scatter:{type:Number,default:0}};var _r=o({extends:k,props:Gr,created(){if(!this.renderer)return;const e=new qs(this.renderer.size.width,this.renderer.size.height,{});Object.keys(Gr).forEach(t=>{e.uniforms[t].value=this[t],l(()=>this[t],r=>{e.uniforms[t].value=r})}),this.initEffectPass(e)},__hmrId:"HalftonePass"}),jr=o({extends:k,created(){if(!this.renderer)return;const e=new Zs(this.renderer.size.width,this.renderer.size.height);this.initEffectPass(e)},__hmrId:"SMAAPass"}),Er=o({extends:k,props:{options:{type:Object,default:()=>({})}},created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e=new Ys(this.renderer.scene,this.renderer.camera,this.renderer.size.width,this.renderer.size.height);Object.keys(this.options).forEach(t=>{e[t]=this.options[t]}),this.initEffectPass(e)},__hmrId:"SSAOPass"}),kr={uniforms:{},vertexShader:` + `))},Vt={color:{type:[String,Number],default:"#ffffff"},thicknessColor:{type:[String,Number],default:"#ffffff"},thicknessDistortion:{type:Number,default:.4},thicknessAmbient:{type:Number,default:.01},thicknessAttenuation:{type:Number,default:.7},thicknessPower:{type:Number,default:2},thicknessScale:{type:Number,default:4}};var qt=o({extends:_,props:Vt,methods:{createMaterial(){const e=Si,t=_e.clone(e.uniforms);return Object.keys(Vt).forEach(s=>{const n=this[s];let a=s,i=n;["color","thicknessColor"].includes(s)&&(s==="color"&&(a="diffuse"),i=new se(n)),t[a].value=i}),new pe({...e,uniforms:t,lights:!0,transparent:this.transparent,vertexColors:this.vertexColors})}},__hmrId:"SubSurfaceMaterial"}),Zt=o({extends:_,props:{...E},methods:{createMaterial(){const e=new Es(N(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"ToonMaterial"}),be=o({inject:{material:he},props:{name:{type:String,default:"map"},uniform:String,src:String,onLoad:Function,onProgress:Function,onError:Function,encoding:{type:Number,default:Os},mapping:{type:Number,default:Rs},wrapS:{type:Number,default:ke},wrapT:{type:Number,default:ke},magFilter:{type:Number,default:$s},minFilter:{type:Number,default:Me},repeat:{type:Object,default:()=>({x:1,y:1})},rotation:{type:Number,default:0},center:{type:Object,default:()=>({x:0,y:0})}},setup(){return{}},created(){this.refreshTexture(),l(()=>this.src,this.refreshTexture)},unmounted(){var e,t;(e=this.material)==null||e.setTexture(null,this.name),(t=this.texture)==null||t.dispose()},methods:{createTexture(){if(!this.src)return;const e=new J().load(this.src,this.onLoaded,this.onProgress,this.onError);return["encoding","mapping","wrapS","wrapT","magFilter","minFilter","repeat","rotation","center"].forEach(r=>{u(this,r,e)}),e},refreshTexture(){this.texture=this.createTexture(),this.texture&&this.material&&(this.material.setTexture(this.texture,this.name),this.material.material instanceof pe&&this.uniform&&(this.material.uniforms[this.uniform]={value:this.texture}))},onLoaded(e){var t;(t=this.onLoad)==null||t.call(this,e)}},render(){return[]}}),Yt=o({extends:be,props:{path:{type:String,required:!0},urls:{type:Array,default:()=>["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]},mapping:{type:Number,default:zs}},created(){l(()=>this.path,this.refreshTexture),l(()=>this.urls,this.refreshTexture)},methods:{createTexture(){return new Ts().setPath(this.path).load(this.urls,this.onLoaded,this.onProgress,this.onError)}}}),Jt=o({extends:_,props:{size:{type:Number,default:10},sizeAttenuation:{type:Boolean,default:!0}},methods:{createMaterial(){return new Is(N(this.$props))}},__hmrId:"PointsMaterial"}),Qt=g("Box",Fe,De),er=g("Circle",He,Xe),tr=g("Cone",We,Ve),rr=g("Cylinder",Ze,Ye),sr=g("Dodecahedron",Qe,et),ir=g("Icosahedron",rt,st),nr=g("Lathe",nt,at),ar=g("Octahedron",ht,dt),or=g("Plane",ut,ct),hr=g("Polyhedron",ft,pt),dr=g("Ring",gt,vt),lr=g("Sphere",St,Pt),ur=g("Tetrahedron",xt,Mt);const Pi={text:{type:String,required:!0,default:"Text"},fontSrc:{type:String,required:!0},size:{type:Number,default:80},height:{type:Number,default:5},depth:{type:Number,default:1},curveSegments:{type:Number,default:12},bevelEnabled:{type:Boolean,default:!1},bevelThickness:{type:Number,default:10},bevelSize:{type:Number,default:8},bevelOffset:{type:Number,default:0},bevelSegments:{type:Number,default:5},align:{type:[Boolean,String],default:!1}};var cr=o({extends:H,props:Pi,setup(){return{}},created(){if(!this.fontSrc){console.error('Missing required prop: "font-src"');return}["text","size","height","curveSegments","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","align"].forEach(r=>{l(()=>this[r],()=>{this.font&&this.refreshGeometry()})});const t=new As;this.loading=!0,t.load(this.fontSrc,r=>{this.loading=!1,this.font=r,this.createGeometry(),this.initMesh()})},methods:{createGeometry(){this.geometry=new Bs(this.text,{font:this.font,size:this.size,height:this.height,depth:this.depth,curveSegments:this.curveSegments,bevelEnabled:this.bevelEnabled,bevelThickness:this.bevelThickness,bevelSize:this.bevelSize,bevelOffset:this.bevelOffset,bevelSegments:this.bevelSegments}),this.align==="center"&&this.geometry.center()}}}),mr=g("Torus",Lt,Nt),fr=g("TorusKnot",_t,kt),pr=o({extends:H,props:ge,created(){this.createGeometry(),this.addGeometryWatchers(ge)},methods:{createGeometry(){this.geometry=Et(this)},updatePoints(e){Rt(this.geometry,e)}},__hmrId:"Tube"}),yr=o({emits:["loaded"],extends:H,props:{src:{type:String,required:!0},width:Number,height:Number,widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},keepSize:Boolean},setup(){return{}},created(){!this.renderer||(this.geometry=new Le(1,1,this.widthSegments,this.heightSegments),this.material=new Ge({side:Fs,map:this.loadTexture()}),l(()=>this.src,this.refreshTexture),["width","height"].forEach(e=>{l(()=>this[e],this.resize)}),this.resize(),this.keepSize&&this.renderer.onResize(this.resize))},unmounted(){var e;(e=this.renderer)==null||e.offResize(this.resize)},methods:{loadTexture(){return new J().load(this.src,this.onLoaded)},refreshTexture(){var e;(e=this.texture)==null||e.dispose(),this.material&&(this.material.map=this.loadTexture(),this.material.needsUpdate=!0)},onLoaded(e){this.texture=e,this.resize(),this.$emit("loaded",e)},resize(){if(!this.renderer||!this.texture)return;const e=this.renderer.size,t=this.texture.image.width,r=this.texture.image.height,s=t/r;let n=1,a=1;this.width&&this.height?(n=this.width*e.wWidth/e.width,a=this.height*e.wHeight/e.height):this.width?(n=this.width*e.wWidth/e.width,a=n/s):this.height?(a=this.height*e.wHeight/e.height,n=a*s):s>1?n=a*s:a=n/s,this.mesh&&(this.mesh.scale.x=n,this.mesh.scale.y=a)}},__hmrId:"Image"}),gr=o({extends:H,props:{count:{type:Number,required:!0}},methods:{initMesh(){if(!!this.renderer){if(!this.geometry||!this.material)return console.error("Missing geometry and/or material"),!1;this.mesh=new ce(this.geometry,this.material,this.count),this.mesh.userData.component=this,u(this,"castShadow",this.mesh),u(this,"receiveShadow",this.mesh),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.renderer.three.addIntersectObject(this.mesh),this.initObject3D(this.mesh)}}},__hmrId:"InstancedMesh"}),vr=o({extends:I,emits:["loaded"],props:{src:{type:String,required:!0}},setup(){return{}},created(){this.texture=new J().load(this.src,this.onLoaded),this.material=new Ds({map:this.texture}),this.sprite=new Us(this.material),this.initObject3D(this.sprite)},unmounted(){var e,t;(e=this.texture)==null||e.dispose(),(t=this.material)==null||t.dispose()},methods:{onLoaded(){this.updateUV(),this.$emit("loaded")},updateUV(){if(!this.texture||!this.sprite)return;const e=this.texture.image.width,t=this.texture.image.height,r=e/t;let s=.5,n=.5;r>1?s=.5*r:n=.5/r;const a=this.sprite.geometry.attributes.position.array;a[0]=-s,a[1]=-n,a[5]=s,a[6]=-n,a[10]=s,a[11]=n,a[15]=-s,a[16]=n,this.sprite.geometry.attributes.position.needsUpdate=!0}},__hmrId:"Sprite"}),br=o({extends:I,setup(){return{}},provide(){return{[q]:this}},mounted(){this.mesh=this.points=new Hs(this.geometry,this.material),this.initObject3D(this.mesh)},methods:{setGeometry(e){this.geometry=e,this.mesh&&(this.mesh.geometry=e)},setMaterial(e){this.material=e,this.mesh&&(this.mesh.material=e)}}}),Sr=o({extends:I,emits:["load","progress","error"],props:{src:{type:String,required:!0}},data(){return{progress:0}},methods:{onLoad(e){this.$emit("load",e),this.initObject3D(e)},onProgress(e){this.progress=e.loaded/e.total,this.$emit("progress",e)},onError(e){this.$emit("error",e)}}}),Pr=o({extends:Sr,created(){new Js().load(this.src,t=>{this.onLoad(t.scene)},this.onProgress,this.onError)}}),wr=o({extends:Sr,created(){new Qs().load(this.src,t=>{this.onLoad(t)},this.onProgress,this.onError)}});const de=Symbol("Composer");var xr=o({setup(){return{renderer:W(G)}},provide(){return{[de]:this}},created(){if(!this.renderer){console.error("Renderer not found");return}const e=this.renderer,t=new ei(this.renderer.renderer);this.composer=t,this.renderer.composer=t,e.addListener("init",()=>{e.renderer.autoClear=!1,this.resize(),e.addListener("resize",this.resize)})},unmounted(){var e;(e=this.renderer)==null||e.removeListener("resize",this.resize)},methods:{addPass(e){var t;(t=this.composer)==null||t.addPass(e)},removePass(e){var t;(t=this.composer)==null||t.removePass(e)},resize(){this.composer&&this.renderer&&this.composer.setSize(this.renderer.size.width,this.renderer.size.height)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"EffectComposer"}),O=o({inject:{renderer:G,composer:de},emits:["ready"],setup(){return{}},created(){this.composer||console.error("Missing parent EffectComposer"),this.renderer||console.error("Missing parent Renderer")},unmounted(){var e,t,r;this.pass&&((e=this.composer)==null||e.removePass(this.pass),(r=(t=this.pass).dispose)==null||r.call(t))},methods:{initEffectPass(e){var t;this.pass=e,(t=this.composer)==null||t.addPass(e),this.$emit("ready",e)}},render(){return[]},__hmrId:"EffectPass"}),Mr=o({extends:O,created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e=new ti(this.renderer.scene,this.renderer.camera);this.initEffectPass(e)},__hmrId:"RenderPass"});const Cr={focus:{type:Number,default:1},aperture:{type:Number,default:.025},maxblur:{type:Number,default:.01}};var Lr=o({extends:O,props:Cr,created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e={focus:this.focus,aperture:this.aperture,maxblur:this.maxblur,width:this.renderer.size.width,height:this.renderer.size.height},t=new ri(this.renderer.scene,this.renderer.camera,e);Object.keys(Cr).forEach(r=>{l(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"BokehPass"});const Nr={noiseIntensity:{type:Number,default:.5},scanlinesIntensity:{type:Number,default:.05},scanlinesCount:{type:Number,default:4096},grayscale:{type:Number,default:0}};var Gr=o({extends:O,props:Nr,created(){const e=new si(this.noiseIntensity,this.scanlinesIntensity,this.scanlinesCount,this.grayscale);Object.keys(Nr).forEach(t=>{l(()=>this[t],r=>{e.uniforms[t].value=r})}),this.initEffectPass(e)},__hmrId:"FilmPass"}),_r=o({extends:O,created(){var e;const t=new ie(ii);(e=this.renderer)==null||e.addListener("resize",this.resize),this.initEffectPass(t)},unmounted(){var e;(e=this.renderer)==null||e.removeListener("resize",this.resize)},methods:{resize({size:e}){if(this.pass){const{resolution:t}=this.pass.material.uniforms;t.value.x=1/e.width,t.value.y=1/e.height}}},__hmrId:"FXAAPass"});const kr={shape:{type:Number,default:1},radius:{type:Number,default:4},rotateR:{type:Number,default:Math.PI/12*1},rotateG:{type:Number,default:Math.PI/12*2},rotateB:{type:Number,default:Math.PI/12*3},scatter:{type:Number,default:0}};var jr=o({extends:O,props:kr,created(){if(!this.renderer)return;const e=new ni(this.renderer.size.width,this.renderer.size.height,{});Object.keys(kr).forEach(t=>{e.uniforms[t].value=this[t],l(()=>this[t],r=>{e.uniforms[t].value=r})}),this.initEffectPass(e)},__hmrId:"HalftonePass"}),Er=o({extends:O,created(){if(!this.renderer)return;const e=new ai(this.renderer.size.width,this.renderer.size.height);this.initEffectPass(e)},__hmrId:"SMAAPass"}),Or=o({extends:O,props:{options:{type:Object,default:()=>({})}},created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e=new oi(this.renderer.scene,this.renderer.camera,this.renderer.size.width,this.renderer.size.height);Object.keys(this.options).forEach(t=>{e[t]=this.options[t]}),this.initEffectPass(e)},__hmrId:"SSAOPass"}),Rr={uniforms:{},vertexShader:` varying vec2 vUv; void main() { vUv = uv; @@ -52,7 +52,7 @@ import{defineComponent as o,toRef as Fr,watch as l,inject as X,provide as Dr,onU void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); } - `},Rr={uniforms:{tDiffuse:{value:null},blurRadius:{value:0},gradientRadius:{value:0},start:{value:new I},end:{value:new I},delta:{value:new I},texSize:{value:new I}},vertexShader:kr.vertexShader,fragmentShader:` + `},$r={uniforms:{tDiffuse:{value:null},blurRadius:{value:0},gradientRadius:{value:0},start:{value:new T},end:{value:new T},delta:{value:new T},texSize:{value:new T}},vertexShader:Rr.vertexShader,fragmentShader:` uniform sampler2D tDiffuse; uniform float blurRadius; uniform float gradientRadius; @@ -95,7 +95,7 @@ import{defineComponent as o,toRef as Fr,watch as l,inject as X,provide as Dr,onU /* switch back from pre-multiplied alpha */ gl_FragColor.rgb /= gl_FragColor.a + 0.00001; } - `};const ci={blurRadius:{type:Number,default:10},gradientRadius:{type:Number,default:100},start:{type:Object,default:()=>({x:0,y:100})},end:{type:Object,default:()=>({x:10,y:100})}};var Or=o({extends:k,props:ci,setup(){return{uniforms1:{},uniforms2:{}}},created(){if(!this.composer)return;this.pass1=new ie(Rr),this.pass2=new ie(Rr);const e=this.uniforms1=this.pass1.uniforms,t=this.uniforms2=this.pass2.uniforms;t.blurRadius=e.blurRadius,t.gradientRadius=e.gradientRadius,t.start=e.start,t.end=e.end,t.texSize=e.texSize,u(this,"blurRadius",e.blurRadius,"value"),u(this,"gradientRadius",e.gradientRadius,"value"),this.updateFocusLine(),["start","end"].forEach(r=>{l(()=>this[r],this.updateFocusLine,{deep:!0})}),this.pass1.setSize=(r,s)=>{e.texSize.value.set(r,s)},this.initEffectPass(this.pass1),this.composer.addPass(this.pass2)},unmounted(){this.composer&&this.pass2&&this.composer.removePass(this.pass2)},methods:{updateFocusLine(){this.uniforms1.start.value.copy(this.start),this.uniforms1.end.value.copy(this.end);const e=new I().copy(this.end).sub(this.start).normalize();this.uniforms1.delta.value.copy(e),this.uniforms2.delta.value.set(-e.y,e.x)}},__hmrId:"TiltShiftPass"});const $r={strength:{type:Number,default:1.5},radius:{type:Number,default:0},threshold:{type:Number,default:0}};var Ir=o({extends:k,props:$r,created(){if(!this.renderer)return;const e=new I(this.renderer.size.width,this.renderer.size.height),t=new Js(e,this.strength,this.radius,this.threshold);Object.keys($r).forEach(r=>{l(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"UnrealBloomPass"}),mi={uniforms:{tDiffuse:{value:null},center:{value:new I(.5,.5)},strength:{value:0}},vertexShader:kr.vertexShader,fragmentShader:` + `};const wi={blurRadius:{type:Number,default:10},gradientRadius:{type:Number,default:100},start:{type:Object,default:()=>({x:0,y:100})},end:{type:Object,default:()=>({x:10,y:100})}};var zr=o({extends:O,props:wi,setup(){return{uniforms1:{},uniforms2:{}}},created(){if(!this.composer)return;this.pass1=new ie($r),this.pass2=new ie($r);const e=this.uniforms1=this.pass1.uniforms,t=this.uniforms2=this.pass2.uniforms;t.blurRadius=e.blurRadius,t.gradientRadius=e.gradientRadius,t.start=e.start,t.end=e.end,t.texSize=e.texSize,u(this,"blurRadius",e.blurRadius,"value"),u(this,"gradientRadius",e.gradientRadius,"value"),this.updateFocusLine(),["start","end"].forEach(r=>{l(()=>this[r],this.updateFocusLine,{deep:!0})}),this.pass1.setSize=(r,s)=>{e.texSize.value.set(r,s)},this.initEffectPass(this.pass1),this.composer.addPass(this.pass2)},unmounted(){this.composer&&this.pass2&&this.composer.removePass(this.pass2)},methods:{updateFocusLine(){this.uniforms1.start.value.copy(this.start),this.uniforms1.end.value.copy(this.end);const e=new T().copy(this.end).sub(this.start).normalize();this.uniforms1.delta.value.copy(e),this.uniforms2.delta.value.set(-e.y,e.x)}},__hmrId:"TiltShiftPass"});const Tr={strength:{type:Number,default:1.5},radius:{type:Number,default:0},threshold:{type:Number,default:0}};var Ir=o({extends:O,props:Tr,created(){if(!this.renderer)return;const e=new T(this.renderer.size.width,this.renderer.size.height),t=new hi(e,this.strength,this.radius,this.threshold);Object.keys(Tr).forEach(r=>{l(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"UnrealBloomPass"}),xi={uniforms:{tDiffuse:{value:null},center:{value:new T(.5,.5)},strength:{value:0}},vertexShader:Rr.vertexShader,fragmentShader:` uniform sampler2D tDiffuse; uniform vec2 center; uniform float strength; @@ -131,5 +131,5 @@ import{defineComponent as o,toRef as Fr,watch as l,inject as X,provide as Dr,onU /* switch back from pre-multiplied alpha */ gl_FragColor.rgb /= gl_FragColor.a + 0.00001; } - `},zr=o({extends:k,props:{center:{type:Object,default:()=>({x:.5,y:.5})},strength:{type:Number,default:.5}},created(){const e=new ie(mi);u(this,"center",e.uniforms.center,"value"),u(this,"strength",e.uniforms.strength,"value"),this.initEffectPass(e)},__hmrId:"ZoomBlurPass"}),fi=Object.freeze({__proto__:null,Renderer:Ee,RendererInjectionKey:N,OrthographicCamera:$e,PerspectiveCamera:ne,Camera:ne,Group:ze,Scene:Ie,SceneInjectionKey:ae,Object3D:B,Raycaster:Te,CubeCamera:Ae,BoxGeometry:Ue,CircleGeometry:Xe,ConeGeometry:qe,CylinderGeometry:Je,DodecahedronGeometry:tt,IcosahedronGeometry:it,LatheGeometry:ot,OctahedronGeometry:lt,PlaneGeometry:mt,PolyhedronGeometry:yt,RingGeometry:bt,SphereGeometry:xt,TetrahedronGeometry:Mt,TorusGeometry:Gt,TorusKnotGeometry:Et,TubeGeometry:Rt,AmbientLight:$t,DirectionalLight:It,HemisphereLight:zt,PointLight:Tt,RectAreaLight:At,SpotLight:Bt,Material:j,MaterialInjectionKey:oe,BasicMaterial:Ft,LambertMaterial:Dt,MatcapMaterial:Ut,PhongMaterial:Ht,PhysicalMaterial:Xt,ShaderMaterial:Kt,StandardMaterial:ge,SubSurfaceMaterial:qt,ToonMaterial:Zt,Texture:ve,CubeTexture:Yt,Mesh:H,MeshInjectionKey:Q,Box:Jt,Circle:Qt,Cone:er,Cylinder:tr,Dodecahedron:rr,Icosahedron:sr,Lathe:ir,Octahedron:nr,Plane:ar,Polyhedron:or,Ring:hr,Sphere:dr,Tetrahedron:lr,Text:ur,Torus:cr,TorusKnot:mr,Tube:fr,Image:pr,InstancedMesh:yr,Sprite:gr,GLTFModel:br,FBXModel:Sr,EffectComposer:Pr,ComposerInjectionKey:he,RenderPass:xr,BokehPass:Cr,FilmPass:Lr,FXAAPass:Nr,HalftonePass:_r,SMAAPass:jr,SSAOPass:Er,TiltShiftPass:Or,UnrealBloomPass:Ir,ZoomBlurPass:zr,setFromProp:V,bindProps:U,bindProp:u,propsValues:z,lerp:ke,limit:Re,getMatcapUrl:pe});const Tr={install(e){["Camera","OrthographicCamera","PerspectiveCamera","Raycaster","Renderer","Scene","Group","AmbientLight","DirectionalLight","HemisphereLight","PointLight","RectAreaLight","SpotLight","BasicMaterial","LambertMaterial","MatcapMaterial","PhongMaterial","PhysicalMaterial","ShaderMaterial","StandardMaterial","SubSurfaceMaterial","ToonMaterial","Texture","CubeTexture","Mesh","Box","BoxGeometry","Circle","CircleGeometry","Cone","ConeGeometry","Cylinder","CylinderGeometry","Dodecahedron","DodecahedronGeometry","Icosahedron","IcosahedronGeometry","Lathe","LatheGeometry","Octahedron","OctahedronGeometry","Plane","PlaneGeometry","Polyhedron","PolyhedronGeometry","Ring","RingGeometry","Sphere","SphereGeometry","Tetrahedron","TetrahedronGeometry","Text","Torus","TorusGeometry","TorusKnot","TorusKnotGeometry","Tube","TubeGeometry","Image","InstancedMesh","Sprite","FBXModel","GLTFModel","BokehPass","EffectComposer","FilmPass","FXAAPass","HalftonePass","RenderPass","SAOPass","SMAAPass","SSAOPass","TiltShiftPass","UnrealBloomPass","ZoomBlurPass","GLTFViewer"].forEach(r=>{e.component(r,fi[r])})}};function pi(e){return Hr(e).use(Tr)}function yi(){const e={loader:new Y,count:0,textures:[],loadProgress:0,loadTextures:t,dispose:s};return e;function t(n,a){e.count=n.length,e.textures.splice(0),e.loadProgress=0,Promise.all(n.map(r)).then(a)}function r(n,a){return new Promise(i=>{e.loader.load(n.src,c=>{e.loadProgress+=1/e.count,e.textures[a]=c,i(c)})})}function s(){e.textures.forEach(n=>n.dispose())}}export{$t as AmbientLight,Ft as BasicMaterial,Cr as BokehPass,Jt as Box,Ue as BoxGeometry,ne as Camera,Qt as Circle,Xe as CircleGeometry,he as ComposerInjectionKey,er as Cone,qe as ConeGeometry,Ae as CubeCamera,Yt as CubeTexture,tr as Cylinder,Je as CylinderGeometry,It as DirectionalLight,rr as Dodecahedron,tt as DodecahedronGeometry,Pr as EffectComposer,Sr as FBXModel,Nr as FXAAPass,Lr as FilmPass,br as GLTFModel,ze as Group,_r as HalftonePass,zt as HemisphereLight,sr as Icosahedron,it as IcosahedronGeometry,pr as Image,yr as InstancedMesh,Dt as LambertMaterial,ir as Lathe,ot as LatheGeometry,Ut as MatcapMaterial,j as Material,oe as MaterialInjectionKey,H as Mesh,Q as MeshInjectionKey,B as Object3D,nr as Octahedron,lt as OctahedronGeometry,$e as OrthographicCamera,ne as PerspectiveCamera,Ht as PhongMaterial,Xt as PhysicalMaterial,ar as Plane,mt as PlaneGeometry,Tt as PointLight,or as Polyhedron,yt as PolyhedronGeometry,Te as Raycaster,At as RectAreaLight,xr as RenderPass,Ee as Renderer,N as RendererInjectionKey,hr as Ring,bt as RingGeometry,jr as SMAAPass,Er as SSAOPass,Ie as Scene,ae as SceneInjectionKey,Kt as ShaderMaterial,dr as Sphere,xt as SphereGeometry,Bt as SpotLight,gr as Sprite,ge as StandardMaterial,qt as SubSurfaceMaterial,lr as Tetrahedron,Mt as TetrahedronGeometry,ur as Text,ve as Texture,Or as TiltShiftPass,Zt as ToonMaterial,cr as Torus,Gt as TorusGeometry,mr as TorusKnot,Et as TorusKnotGeometry,Tr as TroisJSVuePlugin,fr as Tube,Rt as TubeGeometry,Ir as UnrealBloomPass,zr as ZoomBlurPass,u as bindProp,U as bindProps,pi as createApp,pe as getMatcapUrl,ke as lerp,Re as limit,z as propsValues,V as setFromProp,yi as useTextures}; + `},Ar=o({extends:O,props:{center:{type:Object,default:()=>({x:.5,y:.5})},strength:{type:Number,default:.5}},created(){const e=new ie(xi);u(this,"center",e.uniforms.center,"value"),u(this,"strength",e.uniforms.strength,"value"),this.initEffectPass(e)},__hmrId:"ZoomBlurPass"}),Mi=Object.freeze({__proto__:null,Renderer:Re,RendererInjectionKey:G,OrthographicCamera:ze,PerspectiveCamera:ne,Camera:ne,Group:Ie,Scene:Te,SceneInjectionKey:ae,Object3D:I,Raycaster:Ae,CubeCamera:Be,BufferGeometry:oe,BoxGeometry:Ue,CircleGeometry:Ke,ConeGeometry:qe,CylinderGeometry:Je,DodecahedronGeometry:tt,IcosahedronGeometry:it,LatheGeometry:ot,OctahedronGeometry:lt,PlaneGeometry:mt,PolyhedronGeometry:yt,RingGeometry:bt,SphereGeometry:wt,TetrahedronGeometry:Ct,TorusGeometry:Gt,TorusKnotGeometry:jt,TubeGeometry:Ot,AmbientLight:$t,DirectionalLight:zt,HemisphereLight:Tt,PointLight:It,RectAreaLight:At,SpotLight:Bt,Material:_,MaterialInjectionKey:he,BasicMaterial:Ft,LambertMaterial:Dt,MatcapMaterial:Ut,PhongMaterial:Ht,PhysicalMaterial:Kt,ShaderMaterial:Wt,StandardMaterial:ve,SubSurfaceMaterial:qt,ToonMaterial:Zt,Texture:be,CubeTexture:Yt,PointsMaterial:Jt,Mesh:H,MeshInjectionKey:q,Box:Qt,Circle:er,Cone:tr,Cylinder:rr,Dodecahedron:sr,Icosahedron:ir,Lathe:nr,Octahedron:ar,Plane:or,Polyhedron:hr,Ring:dr,Sphere:lr,Tetrahedron:ur,Text:cr,Torus:mr,TorusKnot:fr,Tube:pr,Image:yr,InstancedMesh:gr,Sprite:vr,Points:br,GLTFModel:Pr,FBXModel:wr,EffectComposer:xr,ComposerInjectionKey:de,RenderPass:Mr,BokehPass:Lr,FilmPass:Gr,FXAAPass:_r,HalftonePass:jr,SMAAPass:Er,SSAOPass:Or,TiltShiftPass:zr,UnrealBloomPass:Ir,ZoomBlurPass:Ar,setFromProp:V,bindProps:U,bindProp:u,propsValues:N,lerp:je,limit:Ee,getMatcapUrl:ye});const Br={install(e){["Camera","OrthographicCamera","PerspectiveCamera","Raycaster","Renderer","Scene","Group","AmbientLight","DirectionalLight","HemisphereLight","PointLight","RectAreaLight","SpotLight","BasicMaterial","LambertMaterial","MatcapMaterial","PhongMaterial","PhysicalMaterial","ShaderMaterial","StandardMaterial","SubSurfaceMaterial","ToonMaterial","Texture","CubeTexture","Mesh","Box","BoxGeometry","Circle","CircleGeometry","Cone","ConeGeometry","Cylinder","CylinderGeometry","Dodecahedron","DodecahedronGeometry","Icosahedron","IcosahedronGeometry","Lathe","LatheGeometry","Octahedron","OctahedronGeometry","Plane","PlaneGeometry","Polyhedron","PolyhedronGeometry","Ring","RingGeometry","Sphere","SphereGeometry","Tetrahedron","TetrahedronGeometry","Text","Torus","TorusGeometry","TorusKnot","TorusKnotGeometry","Tube","TubeGeometry","Image","InstancedMesh","Sprite","FBXModel","GLTFModel","BokehPass","EffectComposer","FilmPass","FXAAPass","HalftonePass","RenderPass","SAOPass","SMAAPass","SSAOPass","TiltShiftPass","UnrealBloomPass","ZoomBlurPass","GLTFViewer"].forEach(r=>{e.component(r,Mi[r])})}};function Ci(e){return Vs(e).use(Br)}function Li(){const e={loader:new J,count:0,textures:[],loadProgress:0,loadTextures:t,dispose:s};return e;function t(n,a){e.count=n.length,e.textures.splice(0),e.loadProgress=0,Promise.all(n.map(r)).then(a)}function r(n,a){return new Promise(i=>{e.loader.load(n.src,c=>{e.loadProgress+=1/e.count,e.textures[a]=c,i(c)})})}function s(){e.textures.forEach(n=>n.dispose())}}export{$t as AmbientLight,Ft as BasicMaterial,Lr as BokehPass,Qt as Box,Ue as BoxGeometry,oe as BufferGeometry,ne as Camera,er as Circle,Ke as CircleGeometry,de as ComposerInjectionKey,tr as Cone,qe as ConeGeometry,Be as CubeCamera,Yt as CubeTexture,rr as Cylinder,Je as CylinderGeometry,zt as DirectionalLight,sr as Dodecahedron,tt as DodecahedronGeometry,xr as EffectComposer,wr as FBXModel,_r as FXAAPass,Gr as FilmPass,Pr as GLTFModel,Ie as Group,jr as HalftonePass,Tt as HemisphereLight,ir as Icosahedron,it as IcosahedronGeometry,yr as Image,gr as InstancedMesh,Dt as LambertMaterial,nr as Lathe,ot as LatheGeometry,Ut as MatcapMaterial,_ as Material,he as MaterialInjectionKey,H as Mesh,q as MeshInjectionKey,I as Object3D,ar as Octahedron,lt as OctahedronGeometry,ze as OrthographicCamera,ne as PerspectiveCamera,Ht as PhongMaterial,Kt as PhysicalMaterial,or as Plane,mt as PlaneGeometry,It as PointLight,br as Points,Jt as PointsMaterial,hr as Polyhedron,yt as PolyhedronGeometry,Ae as Raycaster,At as RectAreaLight,Mr as RenderPass,Re as Renderer,G as RendererInjectionKey,dr as Ring,bt as RingGeometry,Er as SMAAPass,Or as SSAOPass,Te as Scene,ae as SceneInjectionKey,Wt as ShaderMaterial,lr as Sphere,wt as SphereGeometry,Bt as SpotLight,vr as Sprite,ve as StandardMaterial,qt as SubSurfaceMaterial,ur as Tetrahedron,Ct as TetrahedronGeometry,cr as Text,be as Texture,zr as TiltShiftPass,Zt as ToonMaterial,mr as Torus,Gt as TorusGeometry,fr as TorusKnot,jt as TorusKnotGeometry,Br as TroisJSVuePlugin,pr as Tube,Ot as TubeGeometry,Ir as UnrealBloomPass,Ar as ZoomBlurPass,u as bindProp,U as bindProps,Ci as createApp,ye as getMatcapUrl,je as lerp,Ee as limit,N as propsValues,V as setFromProp,Li as useTextures}; //# sourceMappingURL=trois.module.cdn.min.js.map diff --git a/build/trois.module.cdn.min.js.map b/build/trois.module.cdn.min.js.map index 1cfa166..141c340 100644 --- a/build/trois.module.cdn.min.js.map +++ b/build/trois.module.cdn.min.js.map @@ -1 +1 @@ -{"version":3,"file":"trois.module.cdn.min.js","sources":["../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/tools.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/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/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 { 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 if (event instanceof TouchEvent && event.touches && event.touches.length > 0) {\n x = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (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((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\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 = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (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 = (obj.camera!)\n const vFOV = (camera.fov * Math.PI) / 180\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z)\n const w = h * camera.aspect\n return [w, h]\n }\n}\n","/* eslint-disable no-use-before-define */\nimport { Camera, Scene, WebGLRenderer } from 'three'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'\nimport { defineComponent, InjectionKey, PropType } from 'vue'\nimport { PointerPublicConfigInterface } from './usePointer'\nimport useThree, { SizeInterface, ThreeConfigInterface, ThreeInterface } from './useThree'\n\ntype CallbackType = (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\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\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 RendererSetupInterface {\n canvas: HTMLCanvasElement\n three: ThreeInterface\n renderer: WebGLRenderer\n size: SizeInterface\n renderFn(): 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: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = 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>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, default: false },\n shadow: Boolean,\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\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 // TODO : improve shadow params\n this.renderer.shadowMap.enabled = this.shadow\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()\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 { Vector2, Vector3 } from 'three'\nimport { toRef, watch } from 'vue'\n\nexport function setFromProp(o: Record, prop: Record): 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) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\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 { 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, 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, 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 = 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\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\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, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, 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 } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\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 },\r\n setup(props) {\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 = () => { cubeCamera.update(renderer, scene) }\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 }\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 = 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) {\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

>(\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, watch } from 'vue'\nimport { BufferGeometry } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface GeometrySetupInterface {\n mesh?: MeshInterface\n geometry?: BufferGeometry\n watchProps?: string[]\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 },\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 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

>(\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, 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, 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, watch } from 'vue'\nimport { FrontSide, Material, 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 = 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], default: '#ffffff' },\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', '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, 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, 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'\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({\n uniforms: this.uniforms,\n vertexShader: this.vertexShader,\n fragmentShader: this.fragmentShader,\n })\n\n const watchProps = ['vertexShader', 'fragmentShader']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n this.setProp(p, value, true)\n })\n })\n\n return material\n },\n addWatchers() {},\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 ',\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, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, 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, 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 // 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, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, 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 = ['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,\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 { 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, 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\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 { 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 = 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, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, 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, 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 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\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 '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","Sprite","EffectComposer","RenderPass","BokehPass","FilmPass","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":"gkFAcqC,EAAuD,MACpF,CACJ,SACA,gBAAgB,GAAI,GAAQ,EAAG,EAAG,IAChC,EAEE,EAAY,GAAIA,IAChB,EAAW,EAAc,QACzB,EAAQ,GAAIC,IAAM,GAAI,GAAQ,EAAG,EAAG,GAAI,SAavC,CACL,WACA,eAbqB,AAAC,GAAoB,GAChC,cAAc,EAAQ,KACzB,kBAAkB,EAAM,UACrB,IAAI,eAAe,EAAO,IAWpC,UARgB,CAAC,EAAiB,OACxB,cAAc,EAAQ,GACzB,EAAU,iBAAiB,iBCwBH,EAAmD,MAC9E,CACJ,SACA,aACA,mBACA,QAAQ,GACR,aAAa,GACb,gBAAgB,GAAI,GAA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AO,IAAI,IAAc,KAAK,cAGvB,EAA6B,EAAe,OACxD,IAAI,SAAQ,GAAW,GACxB,OAAO,KACT,EAAI,IACJ,GAAW,GACL,cAAgB,EAAI,EAAI,QACxB,SAAS,GAAS,IACd,mBAMG,GACb,SAAS,QAAQ,GAAK,EAAE"} \ No newline at end of file +{"version":3,"file":"trois.module.cdn.min.js","sources":["../src/tools.ts","../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/core/Camera.ts","../src/core/OrthographicCamera.ts","../src/core/PerspectiveCamera.ts","../src/core/Scene.ts","../src/core/Object3D.ts","../src/core/Group.ts","../src/core/Raycaster.ts","../src/core/CubeCamera.ts","../src/meshes/Mesh.ts","../src/geometries/Geometry.ts","../src/geometries/BoxGeometry.ts","../src/geometries/CircleGeometry.ts","../src/geometries/ConeGeometry.ts","../src/geometries/CylinderGeometry.ts","../src/geometries/DodecahedronGeometry.ts","../src/geometries/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, prop: Record): 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) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\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 = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (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((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\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 = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (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 = (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 = (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\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\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: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = 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>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, 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, 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, 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 = 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\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\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, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, 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 } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\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 },\r\n setup(props) {\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 = () => { cubeCamera.update(renderer, scene) }\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 }\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 = 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) {\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

>(\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\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>, 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 = {}\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

>(\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, 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, 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 = 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, 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, 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, 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 ',\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, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, 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, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, 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,\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, 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\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 = 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, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, 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, 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 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\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 '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":"ysGAE4B,EAA4B,EAAqC,CACvF,YAAgB,gBACX,QAAQ,GAAM,QAAQ,CAAC,CAAC,EAAK,KAAW,GAC3C,GAAO,eAKW,EAAU,EAAiB,EAAgB,GAC7D,QAAQ,GAAQ,GACX,EAAK,EAAM,EAAK,gBAIJ,EAAU,EAAiB,EAAU,EAAwB,MAC9E,GAAW,GAAW,EACtB,EAAM,GAAM,EAAK,GACnB,EAAI,gBAAiB,WACX,EAAI,GAAW,EAAI,SACzB,EAAK,AAAC,GAAU,GAAc,EAAI,GAAW,IAAU,CAAE,KAAM,MAEjE,GAAI,UAAW,GAAY,EAAI,MAC7B,EAAK,AAAC,GAAU,GAAM,GAAY,gBAIhB,EAAgC,EAAoB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AS,MAAS,EAAG,GAAK,EAAG,MACvF,SAAU,CAAE,KAAM,OAAQ,QAAS,KAErC,SAAU,MACF,GAAO,GAAI,IAAW,MAEnB,KAAM,SAAU,EAAK,SAAS,OAAQ,WACtC,KAAM,WAAY,EAAK,SAAS,SAAU,cAE9C,eAAe,IAEtB,QAAS,i6CClBE,IAAmB,CAC9B,QAAQ,EAAgB,CACR,CACZ,SACA,qBACA,oBACA,YACA,WACA,QACA,QAEA,eACA,mBACA,kBACA,aACA,gBACA,YAEA,gBACA,kBACA,iBACA,gBACA,mBACA,iBACA,mBACA,qBACA,eAEA,UACA,cAEA,OAEA,MAAO,cACP,SAAU,iBACV,OAAQ,eACR,WAAY,mBACZ,eAAgB,uBAChB,cAAe,sBACf,QAAS,gBACT,aAAc,qBACd,QAAS,gBACT,aAAc,qBACd,OAAQ,eACR,SAAU,iBACV,cAAe,sBACf,OACA,QAAS,gBACT,YAAa,oBACb,OAAQ,eAER,QACA,gBACA,SAEA,WACA,YAEA,YACA,iBACA,WACA,WACA,eACA,aACA,UACA,WACA,WACA,gBACA,kBACA,eAEA,cAGI,QAAQ,GAAQ,GAEhB,UAAU,EAAM,GAAM,oBAKN,EAAkB,OACnCC,IAAW,GAAQ,IAAI,iBCtEyB,MACjD,GAAyB,CAC7B,OAAQ,GAAI,GACZ,MAAO,EACP,SAAU,GACV,aAAc,EACd,eACA,iBAEK,cAEe,EAAkC,EAAiB,GACnE,MAAQ,EAAO,SACf,SAAS,OAAO,KAChB,aAAe,UACX,IAAI,EAAO,IAAI,IAAc,KAAK,cAGvB,EAA6B,EAAe,OACxD,IAAI,SAAQ,GAAW,GACxB,OAAO,KACT,EAAI,IACJ,GAAW,GACL,cAAgB,EAAI,EAAI,QACxB,SAAS,GAAS,IACd,mBAMG,GACb,SAAS,QAAQ,GAAK,EAAE"} \ No newline at end of file diff --git a/build/trois.module.js b/build/trois.module.js index 6eb0b45..7677d95 100644 --- a/build/trois.module.js +++ b/build/trois.module.js @@ -1,5 +1,5 @@ -import { defineComponent, toRef, watch, inject, provide, onUnmounted, createApp as createApp$1 } from 'vue'; -import { Vector3, Raycaster as Raycaster$1, Plane as Plane$1, Vector2, InstancedMesh as InstancedMesh$1, WebGLRenderer, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Scene as Scene$1, Color, Texture as Texture$1, Group as Group$1, WebGLCubeRenderTarget, RGBFormat, LinearMipmapLinearFilter, CubeCamera as CubeCamera$1, Mesh as Mesh$1, BoxGeometry as BoxGeometry$1, CircleGeometry as CircleGeometry$1, ConeGeometry as ConeGeometry$1, CylinderGeometry as CylinderGeometry$1, DodecahedronGeometry as DodecahedronGeometry$1, IcosahedronGeometry as IcosahedronGeometry$1, LatheGeometry as LatheGeometry$1, OctahedronGeometry as OctahedronGeometry$1, PlaneGeometry as PlaneGeometry$1, PolyhedronGeometry as PolyhedronGeometry$1, RingGeometry as RingGeometry$1, SphereGeometry as SphereGeometry$1, TetrahedronGeometry as TetrahedronGeometry$1, TorusGeometry as TorusGeometry$1, TorusKnotGeometry as TorusKnotGeometry$1, TubeGeometry as TubeGeometry$1, Curve, CatmullRomCurve3, SpotLight as SpotLight$1, DirectionalLight as DirectionalLight$1, AmbientLight as AmbientLight$1, HemisphereLight as HemisphereLight$1, PointLight as PointLight$1, RectAreaLight as RectAreaLight$1, FrontSide, MeshBasicMaterial, MeshLambertMaterial, TextureLoader, MeshMatcapMaterial, MeshPhongMaterial, MeshStandardMaterial, MeshPhysicalMaterial, ShaderMaterial as ShaderMaterial$1, ShaderChunk, UniformsUtils, ShaderLib, MeshToonMaterial, UVMapping, ClampToEdgeWrapping, LinearFilter, CubeReflectionMapping, CubeTextureLoader, FontLoader, TextGeometry, DoubleSide, SpriteMaterial, Sprite as Sprite$1 } from 'three'; +import { Vector3, Raycaster as Raycaster$1, Plane as Plane$1, Vector2, InstancedMesh as InstancedMesh$1, WebGLRenderer, PCFShadowMap, NoToneMapping, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Scene as Scene$1, Color, Texture as Texture$1, Group as Group$1, WebGLCubeRenderTarget, RGBFormat, LinearMipmapLinearFilter, CubeCamera as CubeCamera$1, Mesh as Mesh$1, BufferGeometry, BufferAttribute, BoxGeometry as BoxGeometry$1, CircleGeometry as CircleGeometry$1, ConeGeometry as ConeGeometry$1, CylinderGeometry as CylinderGeometry$1, DodecahedronGeometry as DodecahedronGeometry$1, IcosahedronGeometry as IcosahedronGeometry$1, LatheGeometry as LatheGeometry$1, OctahedronGeometry as OctahedronGeometry$1, PlaneGeometry as PlaneGeometry$1, PolyhedronGeometry as PolyhedronGeometry$1, RingGeometry as RingGeometry$1, SphereGeometry as SphereGeometry$1, TetrahedronGeometry as TetrahedronGeometry$1, TorusGeometry as TorusGeometry$1, TorusKnotGeometry as TorusKnotGeometry$1, TubeGeometry as TubeGeometry$1, Curve, CatmullRomCurve3, SpotLight as SpotLight$1, DirectionalLight as DirectionalLight$1, AmbientLight as AmbientLight$1, HemisphereLight as HemisphereLight$1, PointLight as PointLight$1, RectAreaLight as RectAreaLight$1, NormalBlending, FrontSide, MeshBasicMaterial, MeshLambertMaterial, TextureLoader, MeshMatcapMaterial, MeshPhongMaterial, MeshStandardMaterial, MeshPhysicalMaterial, ShaderMaterial as ShaderMaterial$1, ShaderChunk, UniformsUtils, ShaderLib, MeshToonMaterial, LinearEncoding, UVMapping, ClampToEdgeWrapping, LinearFilter, CubeReflectionMapping, CubeTextureLoader, PointsMaterial as PointsMaterial$1, FontLoader, TextGeometry, DoubleSide, SpriteMaterial, Sprite as Sprite$1, Points as Points$1 } from 'three'; +import { toRef, watch, defineComponent, inject, provide, onUnmounted, createApp as createApp$1 } from 'vue'; import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'; import { RectAreaLightUniformsLib } from 'three/examples/jsm/lights/RectAreaLightUniformsLib.js'; import { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js'; @@ -16,6 +16,72 @@ import { SMAAPass as SMAAPass$1 } from 'three/examples/jsm/postprocessing/SMAAPa import { SSAOPass as SSAOPass$1 } from 'three/examples/jsm/postprocessing/SSAOPass.js'; import { UnrealBloomPass as UnrealBloomPass$1 } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js'; +function setFromProp(o, prop) { + if (prop instanceof Object) { + Object.entries(prop).forEach(([key, value]) => { + o[key] = value; + }); + } +} +function bindProps(src, props, dst) { + props.forEach((prop) => { + bindProp(src, prop, dst, prop); + }); +} +function bindProp(src, srcProp, dst, dstProp) { + const _dstProp = dstProp || srcProp; + const ref = toRef(src, srcProp); + if (ref.value instanceof Object) { + setFromProp(dst[_dstProp], ref.value); + watch(ref, (value) => { + setFromProp(dst[_dstProp], value); + }, {deep: true}); + } else { + if (ref.value) + dst[_dstProp] = src[srcProp]; + watch(ref, (value) => { + dst[_dstProp] = value; + }); + } +} +function propsValues(props, exclude = []) { + const values = {}; + Object.entries(props).forEach(([key, value]) => { + if (!exclude || exclude && !exclude.includes(key)) { + values[key] = value; + } + }); + return values; +} +function lerp(value1, value2, amount) { + amount = amount < 0 ? 0 : amount; + amount = amount > 1 ? 1 : amount; + return value1 + (value2 - value1) * amount; +} +function limit(val, min, max) { + return val < min ? min : val > max ? max : val; +} +const MATCAP_ROOT = "https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d"; +const DEFAULT_MATCAP = "0404E8_0404B5_0404CB_3333FC"; +function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024) { + const fileName = `${hash}${getMatcapFormatString(format)}.png`; + return `${MATCAP_ROOT}/${format}/${fileName}`; +} +function getMatcapFormatString(format) { + switch (format) { + case 64: + return "-64px"; + case 128: + return "-128px"; + case 256: + return "-256px"; + case 512: + return "-512px"; + default: + return ""; + } +} + function useRaycaster(options) { const { camera, @@ -89,7 +155,7 @@ function usePointer(options) { } function updatePosition(event) { let x, y; - if (event instanceof TouchEvent && event.touches && event.touches.length > 0) { + if (event.touches && event.touches.length > 0) { x = event.touches[0].clientX; y = event.touches[0].clientY; } else { @@ -385,6 +451,8 @@ var Renderer = defineComponent({ pointer: {type: [Boolean, Object], default: false}, resize: {type: [Boolean, String], default: false}, shadow: Boolean, + shadowType: {type: Number, default: PCFShadowMap}, + toneMapping: {type: Number, default: NoToneMapping}, width: String, height: String, xr: Boolean, @@ -412,6 +480,7 @@ var Renderer = defineComponent({ if (props.height) config.height = parseInt(props.height); const three = useThree(config); + bindProp(props, "toneMapping", three.renderer); const renderFn = () => { }; if (props.onClick) { @@ -469,7 +538,10 @@ var Renderer = defineComponent({ this.three.config.onResize = (size) => { this.resizeCallbacks.forEach((e) => e({type: "resize", renderer: this, size})); }; - this.renderer.shadowMap.enabled = this.shadow; + if (this.shadow) { + this.renderer.shadowMap.enabled = true; + this.renderer.shadowMap.type = this.shadowType; + } this.renderFn = this.three.composer ? this.three.renderC : this.three.render; this.initCallbacks.forEach((e) => e({type: "init", renderer: this})); (_a = this.onReady) == null ? void 0 : _a.call(this, this); @@ -539,7 +611,7 @@ var Renderer = defineComponent({ }, render(time) { this.beforeRenderCallbacks.forEach((e) => e({type: "beforerender", renderer: this, time})); - this.renderFn(); + this.renderFn({renderer: this, time}); this.afterRenderCallbacks.forEach((e) => e({type: "afterrender", renderer: this, time})); }, renderLoop(time) { @@ -554,72 +626,6 @@ var Renderer = defineComponent({ __hmrId: "Renderer" }); -function setFromProp(o, prop) { - if (prop instanceof Object) { - Object.entries(prop).forEach(([key, value]) => { - o[key] = value; - }); - } -} -function bindProps(src, props, dst) { - props.forEach((prop) => { - bindProp(src, prop, dst, prop); - }); -} -function bindProp(src, srcProp, dst, dstProp) { - const _dstProp = dstProp || srcProp; - const ref = toRef(src, srcProp); - if (ref.value instanceof Object) { - setFromProp(dst[_dstProp], ref.value); - watch(ref, (value) => { - setFromProp(dst[_dstProp], value); - }, {deep: true}); - } else { - if (ref.value) - dst[_dstProp] = src[srcProp]; - watch(ref, (value) => { - dst[_dstProp] = value; - }); - } -} -function propsValues(props, exclude = []) { - const values = {}; - Object.entries(props).forEach(([key, value]) => { - if (!exclude || exclude && !exclude.includes(key)) { - values[key] = value; - } - }); - return values; -} -function lerp(value1, value2, amount) { - amount = amount < 0 ? 0 : amount; - amount = amount > 1 ? 1 : amount; - return value1 + (value2 - value1) * amount; -} -function limit(val, min, max) { - return val < min ? min : val > max ? max : val; -} -const MATCAP_ROOT = "https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d"; -const DEFAULT_MATCAP = "0404E8_0404B5_0404CB_3333FC"; -function getMatcapUrl(hash = DEFAULT_MATCAP, format = 1024) { - const fileName = `${hash}${getMatcapFormatString(format)}.png`; - return `${MATCAP_ROOT}/${format}/${fileName}`; -} -function getMatcapFormatString(format) { - switch (format) { - case 64: - return "-64px"; - case 128: - return "-128px"; - case 256: - return "-256px"; - case 512: - return "-512px"; - default: - return ""; - } -} - var Camera = defineComponent({ render() { return this.$slots.default ? this.$slots.default() : []; @@ -1049,7 +1055,8 @@ const Geometry = defineComponent({ props: { rotateX: Number, rotateY: Number, - rotateZ: Number + rotateZ: Number, + attributes: {type: Array, default: () => []} }, inject: { mesh: MeshInjectionKey @@ -1076,6 +1083,16 @@ const Geometry = defineComponent({ }, methods: { createGeometry() { + const bufferAttributes = {}; + const geometry = new BufferGeometry(); + this.attributes.forEach((attribute) => { + if (attribute.name && attribute.itemSize && attribute.array) { + const bufferAttribute = bufferAttributes[attribute.name] = new BufferAttribute(attribute.array, attribute.itemSize, attribute.normalized); + geometry.setAttribute(attribute.name, bufferAttribute); + } + }); + geometry.computeBoundingBox(); + this.geometry = geometry; }, rotateGeometry() { if (!this.geometry) @@ -1501,6 +1518,8 @@ var Material = defineComponent({ }, props: { color: {type: [String, Number], default: "#ffffff"}, + blending: {type: Number, default: NormalBlending}, + alphaTest: {type: Number, default: 0}, depthTest: {type: Boolean, default: true}, depthWrite: {type: Boolean, default: true}, fog: {type: Boolean, default: true}, @@ -1543,7 +1562,7 @@ var Material = defineComponent({ this.setProp(key, texture, true); }, addWatchers() { - ["color", "depthTest", "depthWrite", "fog", "opacity", "side", "transparent"].forEach((p) => { + ["color", "alphaTest", "blending", "depthTest", "depthWrite", "fog", "opacity", "side", "transparent"].forEach((p) => { watch(() => this[p], (value) => { if (p === "color") { this.material.color.set(value); @@ -1721,20 +1740,14 @@ var ShaderMaterial = defineComponent({ }, methods: { createMaterial() { - const material = new ShaderMaterial$1({ - uniforms: this.uniforms, - vertexShader: this.vertexShader, - fragmentShader: this.fragmentShader - }); - const watchProps = ["vertexShader", "fragmentShader"]; - watchProps.forEach((p) => { + const material = new ShaderMaterial$1(propsValues(this.$props, ["color"])); + ["vertexShader", "fragmentShader"].forEach((p) => { watch(() => this[p], (value) => { - this.setProp(p, value, true); + material[p] = value; + material.needsUpdate = true; }); }); return material; - }, - addWatchers() { } }, __hmrId: "ShaderMaterial" @@ -1858,6 +1871,7 @@ var Texture = defineComponent({ onLoad: Function, onProgress: Function, onError: Function, + encoding: {type: Number, default: LinearEncoding}, mapping: {type: Number, default: UVMapping}, wrapS: {type: Number, default: ClampToEdgeWrapping}, wrapT: {type: Number, default: ClampToEdgeWrapping}, @@ -1884,7 +1898,7 @@ var Texture = defineComponent({ if (!this.src) return void 0; const texture = new TextureLoader().load(this.src, this.onLoaded, this.onProgress, this.onError); - const wathProps = ["mapping", "wrapS", "wrapT", "magFilter", "minFilter", "repeat", "rotation", "center"]; + const wathProps = ["encoding", "mapping", "wrapS", "wrapT", "magFilter", "minFilter", "repeat", "rotation", "center"]; wathProps.forEach((prop) => { bindProp(this, prop, texture); }); @@ -1930,6 +1944,21 @@ var CubeTexture = defineComponent({ } }); +var PointsMaterial = defineComponent({ + extends: Material, + props: { + size: {type: Number, default: 10}, + sizeAttenuation: {type: Boolean, default: true} + }, + methods: { + createMaterial() { + const material = new PointsMaterial$1(propsValues(this.$props)); + return material; + } + }, + __hmrId: "PointsMaterial" +}); + var Box = meshComponent("Box", props$n, createGeometry$f); var Circle = meshComponent("Circle", props$m, createGeometry$e); @@ -2209,6 +2238,34 @@ var Sprite = defineComponent({ __hmrId: "Sprite" }); +var Points = defineComponent({ + extends: Object3D, + setup() { + return {}; + }, + provide() { + return { + [MeshInjectionKey]: this + }; + }, + mounted() { + this.mesh = this.points = new Points$1(this.geometry, this.material); + this.initObject3D(this.mesh); + }, + methods: { + setGeometry(geometry) { + this.geometry = geometry; + if (this.mesh) + this.mesh.geometry = geometry; + }, + setMaterial(material) { + this.material = material; + if (this.mesh) + this.mesh.material = material; + } + } +}); + var Model = defineComponent({ extends: Object3D, emits: ["load", "progress", "error"], @@ -2733,6 +2790,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ Object3D: Object3D, Raycaster: Raycaster, CubeCamera: CubeCamera, + BufferGeometry: Geometry, BoxGeometry: BoxGeometry, CircleGeometry: CircleGeometry, ConeGeometry: ConeGeometry, @@ -2768,6 +2826,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ ToonMaterial: ToonMaterial, Texture: Texture, CubeTexture: CubeTexture, + PointsMaterial: PointsMaterial, Mesh: Mesh, MeshInjectionKey: MeshInjectionKey, Box: Box, @@ -2790,6 +2849,7 @@ var TROIS = /*#__PURE__*/Object.freeze({ Image: Image, InstancedMesh: InstancedMesh, Sprite: Sprite, + Points: Points, GLTFModel: GLTF, FBXModel: FBX, EffectComposer: EffectComposer, @@ -2932,5 +2992,5 @@ function useTextures() { } } -export { AmbientLight, BasicMaterial, BokehPass, Box, BoxGeometry, PerspectiveCamera as Camera, Circle, CircleGeometry, ComposerInjectionKey, Cone, ConeGeometry, CubeCamera, CubeTexture, Cylinder, CylinderGeometry, DirectionalLight, Dodecahedron, DodecahedronGeometry, EffectComposer, FBX as FBXModel, FXAAPass, FilmPass, GLTF as GLTFModel, Group, HalftonePass, HemisphereLight, Icosahedron, IcosahedronGeometry, Image, InstancedMesh, LambertMaterial, Lathe, LatheGeometry, MatcapMaterial, Material, MaterialInjectionKey, Mesh, MeshInjectionKey, Object3D, Octahedron, OctahedronGeometry, OrthographicCamera, PerspectiveCamera, PhongMaterial, PhysicalMaterial, Plane, PlaneGeometry, PointLight, Polyhedron, PolyhedronGeometry, Raycaster, RectAreaLight, RenderPass, Renderer, RendererInjectionKey, Ring, RingGeometry, SMAAPass, SSAOPass, Scene, SceneInjectionKey, ShaderMaterial, Sphere, SphereGeometry, SpotLight, Sprite, StandardMaterial, SubSurfaceMaterial, Tetrahedron, TetrahedronGeometry, Text, Texture, TiltShiftPass, ToonMaterial, Torus, TorusGeometry, TorusKnot, TorusKnotGeometry, TroisJSVuePlugin, Tube, TubeGeometry, UnrealBloomPass, ZoomBlurPass, bindProp, bindProps, createApp, getMatcapUrl, lerp, limit, propsValues, setFromProp, useTextures }; +export { AmbientLight, BasicMaterial, BokehPass, Box, BoxGeometry, Geometry as BufferGeometry, PerspectiveCamera as Camera, Circle, CircleGeometry, ComposerInjectionKey, Cone, ConeGeometry, CubeCamera, CubeTexture, Cylinder, CylinderGeometry, DirectionalLight, Dodecahedron, DodecahedronGeometry, EffectComposer, FBX as FBXModel, FXAAPass, FilmPass, GLTF as GLTFModel, Group, HalftonePass, HemisphereLight, Icosahedron, IcosahedronGeometry, Image, InstancedMesh, LambertMaterial, Lathe, LatheGeometry, MatcapMaterial, Material, MaterialInjectionKey, Mesh, MeshInjectionKey, Object3D, Octahedron, OctahedronGeometry, OrthographicCamera, PerspectiveCamera, PhongMaterial, PhysicalMaterial, Plane, PlaneGeometry, PointLight, Points, PointsMaterial, Polyhedron, PolyhedronGeometry, Raycaster, RectAreaLight, RenderPass, Renderer, RendererInjectionKey, Ring, RingGeometry, SMAAPass, SSAOPass, Scene, SceneInjectionKey, ShaderMaterial, Sphere, SphereGeometry, SpotLight, Sprite, StandardMaterial, SubSurfaceMaterial, Tetrahedron, TetrahedronGeometry, Text, Texture, TiltShiftPass, ToonMaterial, Torus, TorusGeometry, TorusKnot, TorusKnotGeometry, TroisJSVuePlugin, Tube, TubeGeometry, UnrealBloomPass, ZoomBlurPass, bindProp, bindProps, createApp, getMatcapUrl, lerp, limit, propsValues, setFromProp, useTextures }; //# sourceMappingURL=trois.module.js.map diff --git a/build/trois.module.js.map b/build/trois.module.js.map index 7db2bb3..7ffd6f8 100644 --- a/build/trois.module.js.map +++ b/build/trois.module.js.map @@ -1 +1 @@ -{"version":3,"file":"trois.module.js","sources":["../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/tools.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/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/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 { 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 if (event instanceof TouchEvent && event.touches && event.touches.length > 0) {\n x = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (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((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\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 = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (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 = (obj.camera!)\n const vFOV = (camera.fov * Math.PI) / 180\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z)\n const w = h * camera.aspect\n return [w, h]\n }\n}\n","/* eslint-disable no-use-before-define */\nimport { Camera, Scene, WebGLRenderer } from 'three'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'\nimport { defineComponent, InjectionKey, PropType } from 'vue'\nimport { PointerPublicConfigInterface } from './usePointer'\nimport useThree, { SizeInterface, ThreeConfigInterface, ThreeInterface } from './useThree'\n\ntype CallbackType = (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\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\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 RendererSetupInterface {\n canvas: HTMLCanvasElement\n three: ThreeInterface\n renderer: WebGLRenderer\n size: SizeInterface\n renderFn(): 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: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = 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>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, default: false },\n shadow: Boolean,\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\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 // TODO : improve shadow params\n this.renderer.shadowMap.enabled = this.shadow\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()\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 { Vector2, Vector3 } from 'three'\nimport { toRef, watch } from 'vue'\n\nexport function setFromProp(o: Record, prop: Record): 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) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\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 { 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, 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, 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 = 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\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\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, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, 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 } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\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 },\r\n setup(props) {\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 = () => { cubeCamera.update(renderer, scene) }\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 }\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 = 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) {\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

>(\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, watch } from 'vue'\nimport { BufferGeometry } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface GeometrySetupInterface {\n mesh?: MeshInterface\n geometry?: BufferGeometry\n watchProps?: string[]\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 },\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 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

>(\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, 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, 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, watch } from 'vue'\nimport { FrontSide, Material, 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 = 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], default: '#ffffff' },\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', '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, 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, 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'\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({\n uniforms: this.uniforms,\n vertexShader: this.vertexShader,\n fragmentShader: this.fragmentShader,\n })\n\n const watchProps = ['vertexShader', 'fragmentShader']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n this.setProp(p, value, true)\n })\n })\n\n return material\n },\n addWatchers() {},\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 ',\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, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, 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, 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 // 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, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, 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 = ['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,\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 { 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, 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\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 { 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 = 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, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, 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, 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 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\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 '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","Sprite","EffectComposer","RenderPass","BokehPass","FilmPass","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":";;;;;;;;;;;;;;;;;;sBAcqC,SAAuD;AAC1F,QAAM;AAAA,IACJ;AAAA,IACA,gBAAgB,IAAI,QAAQ,GAAG,GAAG;AAAA,MAChC;AAEJ,QAAM,YAAY,IAAIA;AACtB,QAAM,WAAW,cAAc;AAC/B,QAAM,QAAQ,IAAIC,QAAM,IAAI,QAAQ,GAAG,GAAG,IAAI;AAE9C,QAAM,iBAAiB,CAAC,WAAoB;AAC1C,cAAU,cAAc,QAAQ;AAChC,WAAO,kBAAkB,MAAM;AAC/B,cAAU,IAAI,eAAe,OAAO;AAAA;AAGtC,QAAM,YAAY,CAAC,QAAiB,YAA+B;AACjE,cAAU,cAAc,QAAQ;AAChC,WAAO,UAAU,iBAAiB;AAAA;AAGpC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA;AAAA;;oBCkB+B,SAAmD;AACpF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,gBAAgB,IAAI,QAAQ,GAAG;AAAA,IAC/B,kBAAkB,IAAI,QAAQ,GAAG,GAAG;AAAA,IACpC,UAAU,MAAM;AAAA;AAAA,IAChB,SAAS,MAAM;AAAA;AAAA,IACf,UAAU,MAAM;AAAA;AAAA,IAChB,UAAU,MAAM;AAAA;AAAA,IAChB,mBAAmB,MAAM;AAAA;AAAA,IACzB,kB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AACvE,QAAI,QAAQ,OAAO;AACnB,QAAI,SAAS,OAAO;AACpB,QAAI,eAAe;AACnB,YAAQ,IAAI,OAAO,IAAI,cAAc,KAAK;AAAA;AAG5C,uBAAqB,KAA6B,OAAe;AAC/D,WAAO,IAAI,QAAQ,aAAW;AAC5B,UAAI,OAAO,KACT,IAAI,KACJ,aAAW;AACT,YAAI,gBAAgB,IAAI,IAAI;AAC5B,YAAI,SAAS,SAAS;AACtB,gBAAQ;AAAA;AAAA;AAAA;AAMhB,qBAAmB;AACjB,QAAI,SAAS,QAAQ,OAAK,EAAE;AAAA;AAAA;;;;"} \ No newline at end of file +{"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, prop: Record): 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) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\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 = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (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((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\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 = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (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 = (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 = (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\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\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: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = 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>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, 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, 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, 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 = 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\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\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, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, 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 } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\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 },\r\n setup(props) {\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 = () => { cubeCamera.update(renderer, scene) }\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 }\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 = 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) {\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

>(\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\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>, 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 = {}\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

>(\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, 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, 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 = 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, 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, 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, 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 ',\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, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, 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, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, 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,\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, 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\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 = 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, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, 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, 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 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\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 '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;A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d;AAAA,MAAS;AAAA,MACT;AAAA,MAAc;AAAA,MACd;AAAA,MAAQ;AAAA,MACR;AAAA,MAAU;AAAA,MACV;AAAA,MAAe;AAAA,MACf;AAAA,MACA;AAAA,MAAS;AAAA,MACT;AAAA,MAAa;AAAA,MACb;AAAA,MAAQ;AAAA,MAER;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,MACA;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA;AAGF,UAAM,QAAQ,UAAQ;AAEpB,UAAI,UAAU,MAAM,MAAM;AAAA;AAAA;AAAA;mBAKN,QAAkB;AAC1C,SAAOC,YAAW,QAAQ,IAAI;AAAA;;uBCtEyB;AACvD,QAAM,MAAyB;AAAA,IAC7B,QAAQ,IAAI;AAAA,IACZ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,IACd;AAAA,IACA;AAAA;AAEF,SAAO;AAEP,wBAAsB,QAAkC,IAAiB;AACvE,QAAI,QAAQ,OAAO;AACnB,QAAI,SAAS,OAAO;AACpB,QAAI,eAAe;AACnB,YAAQ,IAAI,OAAO,IAAI,cAAc,KAAK;AAAA;AAG5C,uBAAqB,KAA6B,OAAe;AAC/D,WAAO,IAAI,QAAQ,aAAW;AAC5B,UAAI,OAAO,KACT,IAAI,KACJ,aAAW;AACT,YAAI,gBAAgB,IAAI,IAAI;AAC5B,YAAI,SAAS,SAAS;AACtB,gBAAQ;AAAA;AAAA;AAAA;AAMhB,qBAAmB;AACjB,QAAI,SAAS,QAAQ,OAAK,EAAE;AAAA;AAAA;;;;"} \ No newline at end of file diff --git a/build/trois.module.min.js b/build/trois.module.min.js index fc8e253..722f03d 100644 --- a/build/trois.module.min.js +++ b/build/trois.module.min.js @@ -1,22 +1,22 @@ -import{defineComponent as o,toRef as Fr,watch as l,inject as X,provide as Dr,onUnmounted as Ur,createApp as Hr}from"vue";import{Vector3 as Z,Raycaster as Wr,Plane as Xr,Vector2 as I,InstancedMesh as ue,WebGLRenderer as Kr,OrthographicCamera as Vr,PerspectiveCamera as qr,Scene as Zr,Color as se,Texture as Yr,Group as Jr,WebGLCubeRenderTarget as Qr,RGBFormat as es,LinearMipmapLinearFilter as we,CubeCamera as ts,Mesh as rs,BoxGeometry as Ce,CircleGeometry as ss,ConeGeometry as is,CylinderGeometry as ns,DodecahedronGeometry as as,IcosahedronGeometry as os,LatheGeometry as hs,OctahedronGeometry as ds,PlaneGeometry as Me,PolyhedronGeometry as ls,RingGeometry as us,SphereGeometry as cs,TetrahedronGeometry as ms,TorusGeometry as fs,TorusKnotGeometry as ps,TubeGeometry as ys,Curve as gs,CatmullRomCurve3 as Le,SpotLight as ce,DirectionalLight as me,AmbientLight as vs,HemisphereLight as bs,PointLight as Ss,RectAreaLight as Ps,FrontSide as xs,MeshBasicMaterial as Ne,MeshLambertMaterial as ws,TextureLoader as Y,MeshMatcapMaterial as Cs,MeshPhongMaterial as Ms,MeshStandardMaterial as Ls,MeshPhysicalMaterial as Ns,ShaderMaterial as fe,ShaderChunk as K,UniformsUtils as Ge,ShaderLib as Gs,MeshToonMaterial as _s,UVMapping as js,ClampToEdgeWrapping as _e,LinearFilter as Es,CubeReflectionMapping as ks,CubeTextureLoader as Rs,FontLoader as Os,TextGeometry as $s,DoubleSide as Is,SpriteMaterial as zs,Sprite as Ts}from"three";import{OrbitControls as As}from"three/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as Bs}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as Fs}from"three/examples/jsm/helpers/RectAreaLightHelper.js";import{GLTFLoader as Ds}from"three/examples/jsm/loaders/GLTFLoader.js";import{FBXLoader as Us}from"three/examples/jsm/loaders/FBXLoader.js";import{EffectComposer as Hs}from"three/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as Ws}from"three/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as Xs}from"three/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as Ks}from"three/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as ie}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as Vs}from"three/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as qs}from"three/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as Zs}from"three/examples/jsm/postprocessing/SMAAPass.js";import{SSAOPass as Ys}from"three/examples/jsm/postprocessing/SSAOPass.js";import{UnrealBloomPass as Js}from"three/examples/jsm/postprocessing/UnrealBloomPass.js";function Qs(e){const{camera:t,resetPosition:r=new Z(0,0,0)}=e,s=new Wr,n=r.clone(),a=new Xr(new Z(0,0,1),0);return{position:n,updatePosition:P=>{s.setFromCamera(P,t),t.getWorldDirection(a.normal),s.ray.intersectPlane(a,n)},intersect:(P,R)=>(s.setFromCamera(P,t),s.intersectObjects(R))}}function je(e){const{camera:t,domElement:r,intersectObjects:s,touch:n=!0,resetOnEnd:a=!1,resetPosition:i=new I(0,0),resetPositionV3:c=new Z(0,0,0),onEnter:P=()=>{},onMove:R=()=>{},onLeave:f=()=>{},onClick:T=()=>{},onIntersectEnter:W=()=>{},onIntersectOver:x=()=>{},onIntersectMove:F=()=>{},onIntersectLeave:D=()=>{},onIntersectClick:G=()=>{}}=e,m=i.clone(),p=new I(0,0),h=Qs({camera:t}),d=h.position,w={position:m,positionN:p,positionV3:d,intersectObjects:s,listeners:!1,addListeners:Ar,removeListeners:Br,intersect:be};return w;function C(){m.copy(i),d.copy(c)}function de(y){let O,$;y instanceof TouchEvent&&y.touches&&y.touches.length>0?(O=y.touches[0].clientX,$=y.touches[0].clientY):(O=y.clientX,$=y.clientY);const g=r.getBoundingClientRect();m.x=O-g.left,m.y=$-g.top,p.x=m.x/g.width*2-1,p.y=-(m.y/g.height)*2+1,h.updatePosition(p)}function be(){if(s.length){const y=h.intersect(p,s),O=[...s],$=[];y.forEach(g=>{var A,_,M;const{object:S}=g,{component:L}=S.userData;if(S instanceof ue){if($.indexOf(S)!==-1)return;$.push(S)}if(!S.userData.over){S.userData.over=!0;const le={type:"pointerover",over:!0,component:L,intersect:g},xe={...le,type:"pointerenter"};x(le),W(xe),(A=L.onPointerOver)==null||A.call(L,le),(_=L.onPointerEnter)==null||_.call(L,xe)}const Pe={type:"pointermove",component:L,intersect:g};F(Pe),(M=L.onPointerMove)==null||M.call(L,Pe),O.splice(O.indexOf(S),1)}),O.forEach(g=>{var A,_;const{component:M}=g.userData;if(g.userData.over){g.userData.over=!1;const S={type:"pointerover",over:!1,component:M},L={...S,type:"pointerleave"};x(S),D(L),(A=M.onPointerOver)==null||A.call(M,S),(_=M.onPointerLeave)==null||_.call(M,L)}})}}function ee(y){de(y),P({type:"pointerenter",position:m,positionN:p,positionV3:d})}function te(y){de(y),R({type:"pointermove",position:m,positionN:p,positionV3:d}),be()}function Se(y){if(de(y),s.length){const O=h.intersect(p,s),$=[];O.forEach(g=>{var A;const{object:_}=g,{component:M}=_.userData;if(_ instanceof ue){if($.indexOf(_)!==-1)return;$.push(_)}const S={type:"click",component:M,intersect:g};G(S),(A=M.onClick)==null||A.call(M,S)})}T({type:"click",position:m,positionN:p,positionV3:d})}function re(){a&&C(),f({type:"pointerleave"})}function Ar(){r.addEventListener("mouseenter",ee),r.addEventListener("mousemove",te),r.addEventListener("mouseleave",re),r.addEventListener("click",Se),n&&(r.addEventListener("touchstart",ee),r.addEventListener("touchmove",te),r.addEventListener("touchend",re)),w.listeners=!0}function Br(){r.removeEventListener("mouseenter",ee),r.removeEventListener("mousemove",te),r.removeEventListener("mouseleave",re),r.removeEventListener("click",Se),r.removeEventListener("touchstart",ee),r.removeEventListener("touchmove",te),r.removeEventListener("touchend",re),w.listeners=!1}}function ei(e){const t={antialias:!0,alpha:!1,autoClear:!0,orbitCtrl:!1,pointer:!1,resize:!1,width:300,height:150};e&&Object.entries(e).forEach(([h,d])=>{t[h]=d});const r={width:1,height:1,wWidth:1,wHeight:1,ratio:1},s=[],n=[],a=c(),i={config:t,renderer:a,size:r,init:P,dispose:D,render:T,renderC:W,setSize:m,addIntersectObject:x,removeIntersectObject:F};return i;function c(){const h=new Kr({canvas:t.canvas,antialias:t.antialias,alpha:t.alpha});return h.autoClear=t.autoClear,h}function P(){if(!i.scene)return console.error("Missing Scene"),!1;if(!i.camera)return console.error("Missing Camera"),!1;if(t.resize?(G(),window.addEventListener("resize",G)):t.width&&t.height&&m(t.width,t.height),R(),t.orbitCtrl){const h=new As(i.camera,i.renderer.domElement);t.orbitCtrl instanceof Object&&Object.entries(t.orbitCtrl).forEach(([d,w])=>{h[d]=w}),f(()=>{h.update()}),i.cameraCtrl=h}return!0}function R(){let h={camera:i.camera,domElement:i.renderer.domElement,intersectObjects:n};t.pointer&&t.pointer instanceof Object&&(h={...h,...t.pointer});const d=i.pointer=je(h);(t.pointer||n.length)&&(d.addListeners(),h.intersectMode==="frame"&&f(d.intersect))}function f(h){s.push(h)}function T(){s.forEach(h=>h()),i.renderer.render(i.scene,i.camera)}function W(){s.forEach(h=>h()),i.composer.render()}function x(h){n.indexOf(h)===-1&&n.push(h),i.pointer&&!i.pointer.listeners&&i.pointer.addListeners()}function F(h){const d=n.indexOf(h);d!==-1&&n.splice(d,1),i.pointer&&!t.pointer&&n.length===0&&i.pointer.removeListeners()}function D(){window.removeEventListener("resize",G),i.pointer&&i.pointer.removeListeners(),i.cameraCtrl&&i.cameraCtrl.dispose(),i.renderer&&i.renderer.dispose()}function G(){var h;if(t.resize==="window")m(window.innerWidth,window.innerHeight);else{const d=i.renderer.domElement.parentNode;d&&m(d.clientWidth,d.clientHeight)}(h=t.onResize)==null||h.call(t,r)}function m(h,d){r.width=h,r.height=d,r.ratio=h/d,i.renderer.setSize(h,d,!1);const w=i.camera;if(w.type==="PerspectiveCamera"){const C=w;C.aspect=r.ratio,C.updateProjectionMatrix()}if(w.type==="OrthographicCamera"){const C=w;r.wWidth=C.right-C.left,r.wHeight=C.top-C.bottom}else{const C=p();r.wWidth=C[0],r.wHeight=C[1]}}function p(){const h=i.camera,d=h.fov*Math.PI/180,w=2*Math.tan(d/2)*Math.abs(h.position.z);return[w*h.aspect,w]}}const N=Symbol("Renderer");var Ee=o({name:"Renderer",props:{antialias:Boolean,alpha:Boolean,autoClear:{type:Boolean,default:!0},orbitCtrl:{type:[Boolean,Object],default:!1},pointer:{type:[Boolean,Object],default:!1},resize:{type:[Boolean,String],default:!1},shadow:Boolean,width:String,height:String,xr:Boolean,onReady:Function,onClick:Function},setup(e){const t=[],r=[],s=[],n=[],a=[],i=document.createElement("canvas"),c={canvas:i,antialias:e.antialias,alpha:e.alpha,autoClear:e.autoClear,orbitCtrl:e.orbitCtrl,pointer:e.pointer,resize:e.resize};e.width&&(c.width=parseInt(e.width)),e.height&&(c.height=parseInt(e.height));const P=ei(c),R=()=>{};return e.onClick&&i.addEventListener("click",e.onClick),{canvas:i,three:P,renderer:P.renderer,size:P.size,renderFn:R,raf:!0,initCallbacks:t,mountedCallbacks:r,beforeRenderCallbacks:s,afterRenderCallbacks:n,resizeCallbacks:a}},computed:{camera:{get:function(){return this.three.camera},set:function(e){this.three.camera=e}},scene:{get:function(){return this.three.scene},set:function(e){this.three.scene=e}},composer:{get:function(){return this.three.composer},set:function(e){this.three.composer=e}}},provide(){return{[N]:this}},mounted(){var e;this.$el.parentNode.insertBefore(this.canvas,this.$el),this.three.init()&&(this.three.config.onResize=t=>{this.resizeCallbacks.forEach(r=>r({type:"resize",renderer:this,size:t}))},this.renderer.shadowMap.enabled=this.shadow,this.renderFn=this.three.composer?this.three.renderC:this.three.render,this.initCallbacks.forEach(t=>t({type:"init",renderer:this})),(e=this.onReady)==null||e.call(this,this),this.xr?(this.renderer.xr.enabled=!0,this.renderer.setAnimationLoop(this.render)):requestAnimationFrame(this.renderLoop)),this.mountedCallbacks.forEach(t=>t({type:"mounted",renderer:this}))},beforeUnmount(){this.canvas.remove(),this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[],this.raf=!1,this.three.dispose()},methods:{onInit(e){this.addListener("init",e)},onMounted(e){this.addListener("mounted",e)},onBeforeRender(e){this.addListener("beforerender",e)},offBeforeRender(e){this.removeListener("beforerender",e)},onAfterRender(e){this.addListener("afterrender",e)},offAfterRender(e){this.removeListener("afterrender",e)},onResize(e){this.addListener("resize",e)},offResize(e){this.removeListener("resize",e)},addListener(e,t){this.getCallbacks(e).push(t)},removeListener(e,t){const r=this.getCallbacks(e),s=r.indexOf(t);s&&r.splice(s,1)},getCallbacks(e){return e==="init"?this.initCallbacks:e==="mounted"?this.mountedCallbacks:e==="beforerender"?this.beforeRenderCallbacks:e==="afterrender"?this.afterRenderCallbacks:this.resizeCallbacks},render(e){this.beforeRenderCallbacks.forEach(t=>t({type:"beforerender",renderer:this,time:e})),this.renderFn(),this.afterRenderCallbacks.forEach(t=>t({type:"afterrender",renderer:this,time:e}))},renderLoop(e){this.raf&&requestAnimationFrame(this.renderLoop),this.render(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Renderer"});function V(e,t){t instanceof Object&&Object.entries(t).forEach(([r,s])=>{e[r]=s})}function U(e,t,r){t.forEach(s=>{u(e,s,r,s)})}function u(e,t,r,s){const n=s||t,a=Fr(e,t);a.value instanceof Object?(V(r[n],a.value),l(a,i=>{V(r[n],i)},{deep:!0})):(a.value&&(r[n]=e[t]),l(a,i=>{r[n]=i}))}function z(e,t=[]){const r={};return Object.entries(e).forEach(([s,n])=>{(!t||t&&!t.includes(s))&&(r[s]=n)}),r}function ke(e,t,r){return r=r<0?0:r,r=r>1?1:r,e+(t-e)*r}function Re(e,t,r){return er?r:e}const ti="https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d",ri="0404E8_0404B5_0404CB_3333FC";function pe(e=ri,t=1024){const r=`${e}${si(t)}.png`;return`${ti}/${t}/${r}`}function si(e){switch(e){case 64:return"-64px";case 128:return"-128px";case 256:return"-256px";case 512:return"-512px";default:return""}}var Oe=o({render(){return this.$slots.default?this.$slots.default():[]}}),$e=o({extends:Oe,name:"OrthographicCamera",props:{left:{type:Number,default:-1},right:{type:Number,default:1},top:{type:Number,default:1},bottom:{type:Number,default:-1},near:{type:Number,default:.1},far:{type:Number,default:2e3},zoom:{type:Number,default:1},position:{type:Object,default:()=>({x:0,y:0,z:0})}},setup(e){const t=X(N);if(!t){console.error("Renderer not found");return}const r=new Vr(e.left,e.right,e.top,e.bottom,e.near,e.far);return t.camera=r,u(e,"position",r),["left","right","top","bottom","near","far","zoom"].forEach(n=>{l(()=>e[n],a=>{r[n]=a,r.updateProjectionMatrix()})}),{renderer:t,camera:r}},__hmrId:"OrthographicCamera"}),ne=o({extends:Oe,name:"PerspectiveCamera",props:{aspect:{type:Number,default:1},far:{type:Number,default:2e3},fov:{type:Number,default:50},near:{type:Number,default:.1},position:{type:Object,default:()=>({x:0,y:0,z:0})},lookAt:{type:Object,default:null}},setup(e){var t;const r=X(N);if(!r){console.error("Renderer not found");return}const s=new qr(e.fov,e.aspect,e.near,e.far);return r.camera=s,u(e,"position",s),e.lookAt&&s.lookAt((t=e.lookAt.x)!=null?t:0,e.lookAt.y,e.lookAt.z),l(()=>e.lookAt,a=>{var i;s.lookAt((i=a.x)!=null?i:0,a.y,a.z)},{deep:!0}),["aspect","far","fov","near"].forEach(a=>{l(()=>e[a],i=>{s[a]=i,s.updateProjectionMatrix()})}),{renderer:r,camera:s}},__hmrId:"PerspectiveCamera"});const ae=Symbol("Scene");var Ie=o({name:"Scene",props:{background:[String,Number,Object]},setup(e){const t=X(N),r=new Zr;if(!t){console.error("Renderer not found");return}t.scene=r,Dr(ae,r);const s=i=>{!i||(typeof i=="string"||typeof i=="number"?r.background instanceof se?r.background.set(i):r.background=new se(i):i instanceof Yr&&(r.background=i))};return s(e.background),l(()=>e.background,s),{scene:r,add:i=>{r.add(i)},remove:i=>{r.remove(i)}}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Scene"}),B=o({name:"Object3D",inject:{renderer:N,scene:ae},emits:["created","ready"],props:{position:{type:Object,default:()=>({x:0,y:0,z:0})},rotation:{type:Object,default:()=>({x:0,y:0,z:0})},scale:{type:Object,default:()=>({x:1,y:1,z:1,order:"XYZ"})},lookAt:{type:Object,default:null},autoRemove:{type:Boolean,default:!0},userData:{type:Object,default:()=>({})}},setup(){return{}},created(){this.renderer||console.error("Missing parent Renderer"),this.scene||console.error("Missing parent Scene")},unmounted(){this.autoRemove&&this.removeFromParent()},methods:{initObject3D(e){var t;this.o3d=e,this.$emit("created",e),u(this,"position",e),u(this,"rotation",e),u(this,"scale",e),u(this,"userData",e.userData),this.lookAt&&e.lookAt((t=this.lookAt.x)!=null?t:0,this.lookAt.y,this.lookAt.z),l(()=>this.lookAt,r=>{var s;e.lookAt((s=r.x)!=null?s:0,r.y,r.z)},{deep:!0}),this.parent=this.getParent(),this.addToParent()?this.$emit("ready",this):console.error("Missing parent (Scene, Group...)")},getParent(){let e=this.$parent;for(;e;){if(e.add)return e;e=e.$parent}},addToParent(e){const t=e||this.o3d;return this.parent?(this.parent.add(t),!0):!1},removeFromParent(e){const t=e||this.o3d;return this.parent?(this.parent.remove(t),!0):!1},add(e){var t;(t=this.o3d)==null||t.add(e)},remove(e){var t;(t=this.o3d)==null||t.remove(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Object3D"}),ze=o({name:"Group",extends:B,setup(){return{group:new Jr}},created(){this.initObject3D(this.group)},__hmrId:"Group"});const J=()=>{};var Te=o({name:"Raycaster",props:{onPointerEnter:{type:Function,default:J},onPointerOver:{type:Function,default:J},onPointerMove:{type:Function,default:J},onPointerLeave:{type:Function,default:J},onClick:{type:Function,default:J},intersectMode:{type:String,default:"move"}},setup(){return{renderer:X(N)}},mounted(){if(!this.renderer){console.error("Renderer not found");return}const e=this.renderer;this.renderer.onMounted(()=>{!e.camera||(this.pointer=je({camera:e.camera,domElement:e.canvas,intersectObjects:this.getIntersectObjects(),onIntersectEnter:this.onPointerEnter,onIntersectOver:this.onPointerOver,onIntersectMove:this.onPointerMove,onIntersectLeave:this.onPointerLeave,onIntersectClick:this.onClick}),this.pointer.addListeners(),this.intersectMode==="frame"&&e.onBeforeRender(this.pointer.intersect))})},unmounted(){var e;this.pointer&&(this.pointer.removeListeners(),(e=this.renderer)==null||e.offBeforeRender(this.pointer.intersect))},methods:{getIntersectObjects(){return this.renderer&&this.renderer.scene?this.renderer.scene.children.filter(t=>["Mesh","InstancedMesh"].includes(t.type)):[]}},render(){return[]},__hmrId:"Raycaster"}),Ae=o({extends:B,props:{cubeRTSize:{type:Number,default:256},cubeCameraNear:{type:Number,default:.1},cubeCameraFar:{type:Number,default:2e3},autoUpdate:Boolean},setup(e){const t=X(N);if(!t||!t.scene){console.error("Missing Renderer / Scene");return}const r=t.renderer,s=t.scene,n=new Qr(e.cubeRTSize,{format:es,generateMipmaps:!0,minFilter:we}),a=new ts(e.cubeCameraNear,e.cubeCameraFar,n),i=()=>{a.update(r,s)};return e.autoUpdate?(t.onBeforeRender(i),Ur(()=>{t.offBeforeRender(i)})):t.onMounted(i),{cubeRT:n,cubeCamera:a}},render(){return[]},__hmrId:"CubeCamera"});const ii={onPointerEnter:Function,onPointerOver:Function,onPointerMove:Function,onPointerLeave:Function,onPointerDown:Function,onPointerUp:Function,onClick:Function},Q=Symbol("Mesh"),H=o({name:"Mesh",extends:B,props:{castShadow:Boolean,receiveShadow:Boolean,...ii},setup(){return{}},provide(){return{[Q]:this}},mounted(){!this.mesh&&!this.loading&&this.initMesh()},methods:{initMesh(){const e=new rs(this.geometry,this.material);e.userData.component=this,u(this,"castShadow",e),u(this,"receiveShadow",e),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.renderer&&this.renderer.three.addIntersectObject(e),this.mesh=e,this.initObject3D(e)},createGeometry(){},addGeometryWatchers(e){Object.keys(e).forEach(t=>{l(()=>this[t],()=>{this.refreshGeometry()})})},setGeometry(e){this.geometry=e,this.mesh&&(this.mesh.geometry=e)},setMaterial(e){this.material=e,this.mesh&&(this.mesh.material=e)},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.mesh&&this.geometry&&(this.mesh.geometry=this.geometry),e==null||e.dispose()}},unmounted(){this.mesh&&this.renderer&&this.renderer.three.removeIntersectObject(this.mesh),this.geometry&&this.geometry.dispose(),this.material&&this.material.dispose()},__hmrId:"Mesh"});function v(e,t,r){return o({name:e,extends:H,props:t,created(){this.createGeometry(),this.addGeometryWatchers(t)},methods:{createGeometry(){this.geometry=r(this)}}})}const Be=o({props:{rotateX:Number,rotateY:Number,rotateZ:Number},inject:{mesh:Q},setup(){return{}},created(){if(!this.mesh){console.error("Missing parent Mesh");return}this.createGeometry(),this.rotateGeometry(),this.geometry&&this.mesh.setGeometry(this.geometry),Object.keys(this.$props).forEach(e=>{l(()=>this[e],this.refreshGeometry)})},unmounted(){var e;(e=this.geometry)==null||e.dispose()},methods:{createGeometry(){},rotateGeometry(){!this.geometry||(this.rotateX&&this.geometry.rotateX(this.rotateX),this.rotateY&&this.geometry.rotateY(this.rotateY),this.rotateZ&&this.geometry.rotateZ(this.rotateZ))},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.rotateGeometry(),this.geometry&&this.mesh&&this.mesh.setGeometry(this.geometry),e==null||e.dispose()}},render(){return[]}});function b(e,t,r){return o({name:e,extends:Be,props:t,methods:{createGeometry(){this.geometry=r(this)}}})}const Fe={size:Number,width:{type:Number,default:1},height:{type:Number,default:1},depth:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},depthSegments:{type:Number,default:1}};function De(e){return e.size?new Ce(e.size,e.size,e.size,e.widthSegments,e.heightSegments,e.depthSegments):new Ce(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}var Ue=b("BoxGeometry",Fe,De);const He={radius:{type:Number,default:1},segments:{type:Number,default:8},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function We(e){return new ss(e.radius,e.segments,e.thetaStart,e.thetaLength)}var Xe=b("CircleGeometry",He,We);const Ke={radius:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Ve(e){return new is(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var qe=b("ConeGeometry",Ke,Ve);const Ze={radiusTop:{type:Number,default:1},radiusBottom:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Ye(e){return new ns(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var Je=b("CylinderGeometry",Ze,Ye);const Qe={radius:{type:Number,default:1},detail:{type:Number,default:0}};function et(e){return new as(e.radius,e.detail)}var tt=b("DodecahedronGeometry",Qe,et);const rt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function st(e){return new os(e.radius,e.detail)}var it=b("IcosahedronGeometry",rt,st);const nt={points:Array,segments:{type:Number,default:12},phiStart:{type:Number,default:0},phiLength:{type:Number,default:Math.PI*2}};function at(e){return new hs(e.points,e.segments,e.phiStart,e.phiLength)}var ot=b("LatheGeometry",nt,at);const ht={radius:{type:Number,default:1},detail:{type:Number,default:0}};function dt(e){return new ds(e.radius,e.detail)}var lt=b("OctahedronGeometry",ht,dt);const ut={width:{type:Number,default:1},height:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1}};function ct(e){return new Me(e.width,e.height,e.widthSegments,e.heightSegments)}var mt=b("PlaneGeometry",ut,ct);const ft={vertices:Array,indices:Array,radius:{type:Number,default:1},detail:{type:Number,default:0}};function pt(e){return new ls(e.vertices,e.indices,e.radius,e.detail)}var yt=b("PolyhedronGeometry",ft,pt);const gt={innerRadius:{type:Number,default:.5},outerRadius:{type:Number,default:1},thetaSegments:{type:Number,default:8},phiSegments:{type:Number,default:1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function vt(e){return new us(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}var bt=b("RingGeometry",gt,vt);const St={radius:{type:Number,default:1},widthSegments:{type:Number,default:12},heightSegments:{type:Number,default:12}};function Pt(e){return new cs(e.radius,e.widthSegments,e.heightSegments)}var xt=b("SphereGeometry",St,Pt);const wt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function Ct(e){return new ms(e.radius,e.detail)}var Mt=b("TetrahedronGeometry",wt,Ct);const Lt={radius:{type:Number,default:1},tube:{type:Number,default:.4},radialSegments:{type:Number,default:8},tubularSegments:{type:Number,default:6},arc:{type:Number,default:Math.PI*2}};function Nt(e){return new fs(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}var Gt=b("TorusGeometry",Lt,Nt);const _t={radius:{type:Number,default:1},tube:{type:Number,default:.4},tubularSegments:{type:Number,default:64},radialSegments:{type:Number,default:8},p:{type:Number,default:2},q:{type:Number,default:3}};function jt(e){return new ps(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}var Et=b("TorusKnotGeometry",_t,jt);const ye={points:Array,path:gs,tubularSegments:{type:Number,default:64},radius:{type:Number,default:1},radialSegments:{type:Number,default:8},closed:{type:Boolean,default:!1}};function kt(e){let t;return e.points?t=new Le(e.points):e.path?t=e.path:console.error("Missing path curve or points."),new ys(t,e.tubularSegments,e.radius,e.radiusSegments,e.closed)}var Rt=o({extends:Be,props:ye,methods:{createGeometry(){this.geometry=kt(this)},updatePoints(e){Ot(this.geometry,e)}}});function Ot(e,t){const r=new Le(t),{radialSegments:s,radius:n,tubularSegments:a,closed:i}=e.parameters,c=r.computeFrenetFrames(a,i);e.tangents=c.tangents,e.normals=c.normals,e.binormals=c.binormals,e.parameters.path=r;const P=e.getAttribute("position"),R=e.getAttribute("normal"),f=new Z,T=new Z;for(let x=0;x({x:512,y:512})},shadowCamera:{type:Object,default:()=>({})}},setup(){return{}},unmounted(){(this.light instanceof ce||this.light instanceof me)&&this.removeFromParent(this.light.target)},methods:{initLight(e){this.light=e,e.shadow&&(e.castShadow=this.castShadow,V(e.shadow.mapSize,this.shadowMapSize),V(e.shadow.camera,this.shadowCamera)),["color","intensity","castShadow"].forEach(t=>{l(()=>this[t],r=>{t==="color"?e.color.set(r):e[t]=r})}),this.initObject3D(e),(e instanceof ce||e instanceof me)&&(u(this,"target",e.target,"position"),this.addToParent(e.target))}},__hmrId:"Light"}),$t=o({extends:q,created(){this.initLight(new vs(this.color,this.intensity))},__hmrId:"AmbientLight"}),It=o({extends:q,props:{target:{type:Object,default:()=>({x:0,y:0,z:0})}},created(){this.initLight(new me(this.color,this.intensity))},__hmrId:"DirectionalLight"}),zt=o({extends:q,props:{groundColor:{type:String,default:"#444444"}},created(){const e=new bs(this.color,this.groundColor,this.intensity);l(()=>this.groundColor,t=>{e.groundColor.set(t)}),this.initLight(e)},__hmrId:"HemisphereLight"}),Tt=o({extends:q,props:{distance:{type:Number,default:0},decay:{type:Number,default:1}},created(){this.initLight(new Ss(this.color,this.intensity,this.distance,this.decay))},__hmrId:"PointLight"}),At=o({extends:q,props:{width:{type:Number,default:10},height:{type:Number,default:10},helper:Boolean},created(){Bs.init();const e=new Ps(this.color,this.intensity,this.width,this.height);if(["width","height"].forEach(r=>{l(()=>this[r],s=>{e[r]=s})}),this.helper){const r=new Fs(e);e.add(r)}this.initLight(e)},__hmrId:"RectAreaLight"}),Bt=o({extends:q,props:{angle:{type:Number,default:Math.PI/3},decay:{type:Number,default:1},distance:{type:Number,default:0},penumbra:{type:Number,default:0},target:Object},created(){const e=new ce(this.color,this.intensity,this.distance,this.angle,this.penumbra,this.decay);["angle","decay","distance","penumbra"].forEach(r=>{l(()=>this[r],s=>{e[r]=s})}),this.initLight(e)},__hmrId:"SpotLight"});const oe=Symbol("Material");var j=o({inject:{mesh:Q},props:{color:{type:[String,Number],default:"#ffffff"},depthTest:{type:Boolean,default:!0},depthWrite:{type:Boolean,default:!0},fog:{type:Boolean,default:!0},opacity:{type:Number,default:1},side:{type:Number,default:xs},transparent:Boolean,vertexColors:Boolean},setup(){return{}},provide(){return{[oe]:this}},created(){if(!this.mesh){console.error("Missing parent Mesh");return}this.createMaterial&&(this.material=this.createMaterial(),this.mesh.setMaterial(this.material),this.addWatchers())},unmounted(){var e;(e=this.material)==null||e.dispose()},methods:{setProp(e,t,r=!1){this.material&&(this.material[e]=t,this.material.needsUpdate=r)},setTexture(e,t="map"){this.setProp(t,e,!0)},addWatchers(){["color","depthTest","depthWrite","fog","opacity","side","transparent"].forEach(e=>{l(()=>this[e],t=>{e==="color"?this.material.color.set(t):this.material[e]=t})})}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Material"});const E={wireframe:{type:Boolean,default:!1},wireframeLinewidth:{type:Number,default:1}};var Ft=o({extends:j,props:{...E},methods:{createMaterial(){const e=new Ne(z(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"BasicMaterial"}),Dt=o({extends:j,props:{...E},methods:{createMaterial(){const e=new ws(z(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"LambertMaterial"}),Ut=o({extends:j,props:{src:String,name:{type:String,default:"0404E8_0404B5_0404CB_3333FC"},flatShading:Boolean},methods:{createMaterial(){const e=this.src?this.src:pe(this.name),t=z(this.$props,["src","name"]);return t.matcap=new Y().load(e),new Cs(t)}},__hmrId:"MatcapMaterial"}),Ht=o({extends:j,props:{emissive:{type:[Number,String],default:0},emissiveIntensity:{type:Number,default:1},reflectivity:{type:Number,default:1},shininess:{type:Number,default:30},specular:{type:[String,Number],default:1118481},flatShading:Boolean,...E},methods:{createMaterial(){const e=new Ms(z(this.$props));return["emissive","emissiveIntensity","reflectivity","shininess","specular"].forEach(r=>{l(()=>this[r],s=>{r==="emissive"||r==="specular"?e[r].set(s):e[r]=s})}),U(this,Object.keys(E),e),e}},__hmrId:"PhongMaterial"});const Wt={aoMapIntensity:{type:Number,default:1},bumpScale:{type:Number,default:1},displacementBias:{type:Number,default:0},displacementScale:{type:Number,default:1},emissive:{type:[String,Number],default:0},emissiveIntensity:{type:Number,default:1},envMapIntensity:{type:Number,default:1},lightMapIntensity:{type:Number,default:1},metalness:{type:Number,default:0},normalScale:{type:Object,default:()=>({x:1,y:1})},roughness:{type:Number,default:1},refractionRatio:{type:Number,default:.98},flatShading:Boolean};var ge=o({extends:j,props:{...Wt,...E},methods:{createMaterial(){const e=new Ls(z(this.$props,["normalScale"]));return Object.keys(Wt).forEach(t=>{t!=="normalScale"&&l(()=>this[t],r=>{t==="emissive"?e[t].set(r):e[t]=r})}),u(this,"normalScale",e),U(this,Object.keys(E),e),e}},__hmrId:"StandardMaterial"}),Xt=o({extends:ge,props:{flatShading:Boolean},methods:{createMaterial(){return new Ns(z(this.$props))}},__hmrId:"PhysicalMaterial"});const ni=` +import{Vector3 as Y,Raycaster as Ur,Plane as Hr,Vector2 as T,InstancedMesh as ce,WebGLRenderer as Xr,PCFShadowMap as Kr,NoToneMapping as Wr,OrthographicCamera as Vr,PerspectiveCamera as qr,Scene as Zr,Color as se,Texture as Yr,Group as Jr,WebGLCubeRenderTarget as Qr,RGBFormat as es,LinearMipmapLinearFilter as Me,CubeCamera as ts,Mesh as rs,BufferGeometry as ss,BufferAttribute as is,BoxGeometry as Ce,CircleGeometry as ns,ConeGeometry as as,CylinderGeometry as os,DodecahedronGeometry as hs,IcosahedronGeometry as ds,LatheGeometry as ls,OctahedronGeometry as us,PlaneGeometry as Le,PolyhedronGeometry as cs,RingGeometry as ms,SphereGeometry as fs,TetrahedronGeometry as ps,TorusGeometry as ys,TorusKnotGeometry as gs,TubeGeometry as vs,Curve as bs,CatmullRomCurve3 as Ne,SpotLight as me,DirectionalLight as fe,AmbientLight as Ss,HemisphereLight as Ps,PointLight as ws,RectAreaLight as xs,NormalBlending as Ms,FrontSide as Cs,MeshBasicMaterial as Ge,MeshLambertMaterial as Ls,TextureLoader as J,MeshMatcapMaterial as Ns,MeshPhongMaterial as Gs,MeshStandardMaterial as _s,MeshPhysicalMaterial as js,ShaderMaterial as pe,ShaderChunk as K,UniformsUtils as _e,ShaderLib as Es,MeshToonMaterial as ks,LinearEncoding as Os,UVMapping as Rs,ClampToEdgeWrapping as je,LinearFilter as $s,CubeReflectionMapping as zs,CubeTextureLoader as Ts,PointsMaterial as Is,FontLoader as As,TextGeometry as Bs,DoubleSide as Fs,SpriteMaterial as Ds,Sprite as Us,Points as Hs}from"three";import{toRef as Xs,watch as l,defineComponent as o,inject as W,provide as Ks,onUnmounted as Ws,createApp as Vs}from"vue";import{OrbitControls as qs}from"three/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as Zs}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as Ys}from"three/examples/jsm/helpers/RectAreaLightHelper.js";import{GLTFLoader as Js}from"three/examples/jsm/loaders/GLTFLoader.js";import{FBXLoader as Qs}from"three/examples/jsm/loaders/FBXLoader.js";import{EffectComposer as ei}from"three/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as ti}from"three/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as ri}from"three/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as si}from"three/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as ie}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as ii}from"three/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as ni}from"three/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as ai}from"three/examples/jsm/postprocessing/SMAAPass.js";import{SSAOPass as oi}from"three/examples/jsm/postprocessing/SSAOPass.js";import{UnrealBloomPass as hi}from"three/examples/jsm/postprocessing/UnrealBloomPass.js";function V(e,t){t instanceof Object&&Object.entries(t).forEach(([r,s])=>{e[r]=s})}function U(e,t,r){t.forEach(s=>{u(e,s,r,s)})}function u(e,t,r,s){const n=s||t,a=Xs(e,t);a.value instanceof Object?(V(r[n],a.value),l(a,i=>{V(r[n],i)},{deep:!0})):(a.value&&(r[n]=e[t]),l(a,i=>{r[n]=i}))}function N(e,t=[]){const r={};return Object.entries(e).forEach(([s,n])=>{(!t||t&&!t.includes(s))&&(r[s]=n)}),r}function Ee(e,t,r){return r=r<0?0:r,r=r>1?1:r,e+(t-e)*r}function ke(e,t,r){return er?r:e}const di="https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d",li="0404E8_0404B5_0404CB_3333FC";function ye(e=li,t=1024){const r=`${e}${ui(t)}.png`;return`${di}/${t}/${r}`}function ui(e){switch(e){case 64:return"-64px";case 128:return"-128px";case 256:return"-256px";case 512:return"-512px";default:return""}}function ci(e){const{camera:t,resetPosition:r=new Y(0,0,0)}=e,s=new Ur,n=r.clone(),a=new Hr(new Y(0,0,1),0);return{position:n,updatePosition:b=>{s.setFromCamera(b,t),t.getWorldDirection(a.normal),s.ray.intersectPlane(a,n)},intersect:(b,R)=>(s.setFromCamera(b,t),s.intersectObjects(R))}}function Oe(e){const{camera:t,domElement:r,intersectObjects:s,touch:n=!0,resetOnEnd:a=!1,resetPosition:i=new T(0,0),resetPositionV3:c=new Y(0,0,0),onEnter:b=()=>{},onMove:R=()=>{},onLeave:f=()=>{},onClick:A=()=>{},onIntersectEnter:X=()=>{},onIntersectOver:w=()=>{},onIntersectMove:F=()=>{},onIntersectLeave:D=()=>{},onIntersectClick:j=()=>{}}=e,m=i.clone(),p=new T(0,0),h=ci({camera:t}),d=h.position,x={position:m,positionN:p,positionV3:d,intersectObjects:s,listeners:!1,addListeners:Fr,removeListeners:Dr,intersect:Se};return x;function M(){m.copy(i),d.copy(c)}function le(S){let $,z;S.touches&&S.touches.length>0?($=S.touches[0].clientX,z=S.touches[0].clientY):($=S.clientX,z=S.clientY);const y=r.getBoundingClientRect();m.x=$-y.left,m.y=z-y.top,p.x=m.x/y.width*2-1,p.y=-(m.y/y.height)*2+1,h.updatePosition(p)}function Se(){if(s.length){const S=h.intersect(p,s),$=[...s],z=[];S.forEach(y=>{var B,E,C;const{object:P}=y,{component:L}=P.userData;if(P instanceof ce){if(z.indexOf(P)!==-1)return;z.push(P)}if(!P.userData.over){P.userData.over=!0;const ue={type:"pointerover",over:!0,component:L,intersect:y},xe={...ue,type:"pointerenter"};w(ue),X(xe),(B=L.onPointerOver)==null||B.call(L,ue),(E=L.onPointerEnter)==null||E.call(L,xe)}const we={type:"pointermove",component:L,intersect:y};F(we),(C=L.onPointerMove)==null||C.call(L,we),$.splice($.indexOf(P),1)}),$.forEach(y=>{var B,E;const{component:C}=y.userData;if(y.userData.over){y.userData.over=!1;const P={type:"pointerover",over:!1,component:C},L={...P,type:"pointerleave"};w(P),D(L),(B=C.onPointerOver)==null||B.call(C,P),(E=C.onPointerLeave)==null||E.call(C,L)}})}}function ee(S){le(S),b({type:"pointerenter",position:m,positionN:p,positionV3:d})}function te(S){le(S),R({type:"pointermove",position:m,positionN:p,positionV3:d}),Se()}function Pe(S){if(le(S),s.length){const $=h.intersect(p,s),z=[];$.forEach(y=>{var B;const{object:E}=y,{component:C}=E.userData;if(E instanceof ce){if(z.indexOf(E)!==-1)return;z.push(E)}const P={type:"click",component:C,intersect:y};j(P),(B=C.onClick)==null||B.call(C,P)})}A({type:"click",position:m,positionN:p,positionV3:d})}function re(){a&&M(),f({type:"pointerleave"})}function Fr(){r.addEventListener("mouseenter",ee),r.addEventListener("mousemove",te),r.addEventListener("mouseleave",re),r.addEventListener("click",Pe),n&&(r.addEventListener("touchstart",ee),r.addEventListener("touchmove",te),r.addEventListener("touchend",re)),x.listeners=!0}function Dr(){r.removeEventListener("mouseenter",ee),r.removeEventListener("mousemove",te),r.removeEventListener("mouseleave",re),r.removeEventListener("click",Pe),r.removeEventListener("touchstart",ee),r.removeEventListener("touchmove",te),r.removeEventListener("touchend",re),x.listeners=!1}}function mi(e){const t={antialias:!0,alpha:!1,autoClear:!0,orbitCtrl:!1,pointer:!1,resize:!1,width:300,height:150};e&&Object.entries(e).forEach(([h,d])=>{t[h]=d});const r={width:1,height:1,wWidth:1,wHeight:1,ratio:1},s=[],n=[],a=c(),i={config:t,renderer:a,size:r,init:b,dispose:D,render:A,renderC:X,setSize:m,addIntersectObject:w,removeIntersectObject:F};return i;function c(){const h=new Xr({canvas:t.canvas,antialias:t.antialias,alpha:t.alpha});return h.autoClear=t.autoClear,h}function b(){if(!i.scene)return console.error("Missing Scene"),!1;if(!i.camera)return console.error("Missing Camera"),!1;if(t.resize?(j(),window.addEventListener("resize",j)):t.width&&t.height&&m(t.width,t.height),R(),t.orbitCtrl){const h=new qs(i.camera,i.renderer.domElement);t.orbitCtrl instanceof Object&&Object.entries(t.orbitCtrl).forEach(([d,x])=>{h[d]=x}),f(()=>{h.update()}),i.cameraCtrl=h}return!0}function R(){let h={camera:i.camera,domElement:i.renderer.domElement,intersectObjects:n};t.pointer&&t.pointer instanceof Object&&(h={...h,...t.pointer});const d=i.pointer=Oe(h);(t.pointer||n.length)&&(d.addListeners(),h.intersectMode==="frame"&&f(d.intersect))}function f(h){s.push(h)}function A(){s.forEach(h=>h()),i.renderer.render(i.scene,i.camera)}function X(){s.forEach(h=>h()),i.composer.render()}function w(h){n.indexOf(h)===-1&&n.push(h),i.pointer&&!i.pointer.listeners&&i.pointer.addListeners()}function F(h){const d=n.indexOf(h);d!==-1&&n.splice(d,1),i.pointer&&!t.pointer&&n.length===0&&i.pointer.removeListeners()}function D(){window.removeEventListener("resize",j),i.pointer&&i.pointer.removeListeners(),i.cameraCtrl&&i.cameraCtrl.dispose(),i.renderer&&i.renderer.dispose()}function j(){var h;if(t.resize==="window")m(window.innerWidth,window.innerHeight);else{const d=i.renderer.domElement.parentNode;d&&m(d.clientWidth,d.clientHeight)}(h=t.onResize)==null||h.call(t,r)}function m(h,d){r.width=h,r.height=d,r.ratio=h/d,i.renderer.setSize(h,d,!1);const x=i.camera;if(x.type==="PerspectiveCamera"){const M=x;M.aspect=r.ratio,M.updateProjectionMatrix()}if(x.type==="OrthographicCamera"){const M=x;r.wWidth=M.right-M.left,r.wHeight=M.top-M.bottom}else{const M=p();r.wWidth=M[0],r.wHeight=M[1]}}function p(){const h=i.camera,d=h.fov*Math.PI/180,x=2*Math.tan(d/2)*Math.abs(h.position.z);return[x*h.aspect,x]}}const G=Symbol("Renderer");var Re=o({name:"Renderer",props:{antialias:Boolean,alpha:Boolean,autoClear:{type:Boolean,default:!0},orbitCtrl:{type:[Boolean,Object],default:!1},pointer:{type:[Boolean,Object],default:!1},resize:{type:[Boolean,String],default:!1},shadow:Boolean,shadowType:{type:Number,default:Kr},toneMapping:{type:Number,default:Wr},width:String,height:String,xr:Boolean,onReady:Function,onClick:Function},setup(e){const t=[],r=[],s=[],n=[],a=[],i=document.createElement("canvas"),c={canvas:i,antialias:e.antialias,alpha:e.alpha,autoClear:e.autoClear,orbitCtrl:e.orbitCtrl,pointer:e.pointer,resize:e.resize};e.width&&(c.width=parseInt(e.width)),e.height&&(c.height=parseInt(e.height));const b=mi(c);u(e,"toneMapping",b.renderer);const R=()=>{};return e.onClick&&i.addEventListener("click",e.onClick),{canvas:i,three:b,renderer:b.renderer,size:b.size,renderFn:R,raf:!0,initCallbacks:t,mountedCallbacks:r,beforeRenderCallbacks:s,afterRenderCallbacks:n,resizeCallbacks:a}},computed:{camera:{get:function(){return this.three.camera},set:function(e){this.three.camera=e}},scene:{get:function(){return this.three.scene},set:function(e){this.three.scene=e}},composer:{get:function(){return this.three.composer},set:function(e){this.three.composer=e}}},provide(){return{[G]:this}},mounted(){var e;this.$el.parentNode.insertBefore(this.canvas,this.$el),this.three.init()&&(this.three.config.onResize=t=>{this.resizeCallbacks.forEach(r=>r({type:"resize",renderer:this,size:t}))},this.shadow&&(this.renderer.shadowMap.enabled=!0,this.renderer.shadowMap.type=this.shadowType),this.renderFn=this.three.composer?this.three.renderC:this.three.render,this.initCallbacks.forEach(t=>t({type:"init",renderer:this})),(e=this.onReady)==null||e.call(this,this),this.xr?(this.renderer.xr.enabled=!0,this.renderer.setAnimationLoop(this.render)):requestAnimationFrame(this.renderLoop)),this.mountedCallbacks.forEach(t=>t({type:"mounted",renderer:this}))},beforeUnmount(){this.canvas.remove(),this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[],this.raf=!1,this.three.dispose()},methods:{onInit(e){this.addListener("init",e)},onMounted(e){this.addListener("mounted",e)},onBeforeRender(e){this.addListener("beforerender",e)},offBeforeRender(e){this.removeListener("beforerender",e)},onAfterRender(e){this.addListener("afterrender",e)},offAfterRender(e){this.removeListener("afterrender",e)},onResize(e){this.addListener("resize",e)},offResize(e){this.removeListener("resize",e)},addListener(e,t){this.getCallbacks(e).push(t)},removeListener(e,t){const r=this.getCallbacks(e),s=r.indexOf(t);s&&r.splice(s,1)},getCallbacks(e){return e==="init"?this.initCallbacks:e==="mounted"?this.mountedCallbacks:e==="beforerender"?this.beforeRenderCallbacks:e==="afterrender"?this.afterRenderCallbacks:this.resizeCallbacks},render(e){this.beforeRenderCallbacks.forEach(t=>t({type:"beforerender",renderer:this,time:e})),this.renderFn({renderer:this,time:e}),this.afterRenderCallbacks.forEach(t=>t({type:"afterrender",renderer:this,time:e}))},renderLoop(e){this.raf&&requestAnimationFrame(this.renderLoop),this.render(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Renderer"}),$e=o({render(){return this.$slots.default?this.$slots.default():[]}}),ze=o({extends:$e,name:"OrthographicCamera",props:{left:{type:Number,default:-1},right:{type:Number,default:1},top:{type:Number,default:1},bottom:{type:Number,default:-1},near:{type:Number,default:.1},far:{type:Number,default:2e3},zoom:{type:Number,default:1},position:{type:Object,default:()=>({x:0,y:0,z:0})}},setup(e){const t=W(G);if(!t){console.error("Renderer not found");return}const r=new Vr(e.left,e.right,e.top,e.bottom,e.near,e.far);return t.camera=r,u(e,"position",r),["left","right","top","bottom","near","far","zoom"].forEach(n=>{l(()=>e[n],a=>{r[n]=a,r.updateProjectionMatrix()})}),{renderer:t,camera:r}},__hmrId:"OrthographicCamera"}),ne=o({extends:$e,name:"PerspectiveCamera",props:{aspect:{type:Number,default:1},far:{type:Number,default:2e3},fov:{type:Number,default:50},near:{type:Number,default:.1},position:{type:Object,default:()=>({x:0,y:0,z:0})},lookAt:{type:Object,default:null}},setup(e){var t;const r=W(G);if(!r){console.error("Renderer not found");return}const s=new qr(e.fov,e.aspect,e.near,e.far);return r.camera=s,u(e,"position",s),e.lookAt&&s.lookAt((t=e.lookAt.x)!=null?t:0,e.lookAt.y,e.lookAt.z),l(()=>e.lookAt,a=>{var i;s.lookAt((i=a.x)!=null?i:0,a.y,a.z)},{deep:!0}),["aspect","far","fov","near"].forEach(a=>{l(()=>e[a],i=>{s[a]=i,s.updateProjectionMatrix()})}),{renderer:r,camera:s}},__hmrId:"PerspectiveCamera"});const ae=Symbol("Scene");var Te=o({name:"Scene",props:{background:[String,Number,Object]},setup(e){const t=W(G),r=new Zr;if(!t){console.error("Renderer not found");return}t.scene=r,Ks(ae,r);const s=i=>{!i||(typeof i=="string"||typeof i=="number"?r.background instanceof se?r.background.set(i):r.background=new se(i):i instanceof Yr&&(r.background=i))};return s(e.background),l(()=>e.background,s),{scene:r,add:i=>{r.add(i)},remove:i=>{r.remove(i)}}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Scene"}),I=o({name:"Object3D",inject:{renderer:G,scene:ae},emits:["created","ready"],props:{position:{type:Object,default:()=>({x:0,y:0,z:0})},rotation:{type:Object,default:()=>({x:0,y:0,z:0})},scale:{type:Object,default:()=>({x:1,y:1,z:1,order:"XYZ"})},lookAt:{type:Object,default:null},autoRemove:{type:Boolean,default:!0},userData:{type:Object,default:()=>({})}},setup(){return{}},created(){this.renderer||console.error("Missing parent Renderer"),this.scene||console.error("Missing parent Scene")},unmounted(){this.autoRemove&&this.removeFromParent()},methods:{initObject3D(e){var t;this.o3d=e,this.$emit("created",e),u(this,"position",e),u(this,"rotation",e),u(this,"scale",e),u(this,"userData",e.userData),this.lookAt&&e.lookAt((t=this.lookAt.x)!=null?t:0,this.lookAt.y,this.lookAt.z),l(()=>this.lookAt,r=>{var s;e.lookAt((s=r.x)!=null?s:0,r.y,r.z)},{deep:!0}),this.parent=this.getParent(),this.addToParent()?this.$emit("ready",this):console.error("Missing parent (Scene, Group...)")},getParent(){let e=this.$parent;for(;e;){if(e.add)return e;e=e.$parent}},addToParent(e){const t=e||this.o3d;return this.parent?(this.parent.add(t),!0):!1},removeFromParent(e){const t=e||this.o3d;return this.parent?(this.parent.remove(t),!0):!1},add(e){var t;(t=this.o3d)==null||t.add(e)},remove(e){var t;(t=this.o3d)==null||t.remove(e)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Object3D"}),Ie=o({name:"Group",extends:I,setup(){return{group:new Jr}},created(){this.initObject3D(this.group)},__hmrId:"Group"});const Q=()=>{};var Ae=o({name:"Raycaster",props:{onPointerEnter:{type:Function,default:Q},onPointerOver:{type:Function,default:Q},onPointerMove:{type:Function,default:Q},onPointerLeave:{type:Function,default:Q},onClick:{type:Function,default:Q},intersectMode:{type:String,default:"move"}},setup(){return{renderer:W(G)}},mounted(){if(!this.renderer){console.error("Renderer not found");return}const e=this.renderer;this.renderer.onMounted(()=>{!e.camera||(this.pointer=Oe({camera:e.camera,domElement:e.canvas,intersectObjects:this.getIntersectObjects(),onIntersectEnter:this.onPointerEnter,onIntersectOver:this.onPointerOver,onIntersectMove:this.onPointerMove,onIntersectLeave:this.onPointerLeave,onIntersectClick:this.onClick}),this.pointer.addListeners(),this.intersectMode==="frame"&&e.onBeforeRender(this.pointer.intersect))})},unmounted(){var e;this.pointer&&(this.pointer.removeListeners(),(e=this.renderer)==null||e.offBeforeRender(this.pointer.intersect))},methods:{getIntersectObjects(){return this.renderer&&this.renderer.scene?this.renderer.scene.children.filter(t=>["Mesh","InstancedMesh"].includes(t.type)):[]}},render(){return[]},__hmrId:"Raycaster"}),Be=o({extends:I,props:{cubeRTSize:{type:Number,default:256},cubeCameraNear:{type:Number,default:.1},cubeCameraFar:{type:Number,default:2e3},autoUpdate:Boolean},setup(e){const t=W(G);if(!t||!t.scene){console.error("Missing Renderer / Scene");return}const r=t.renderer,s=t.scene,n=new Qr(e.cubeRTSize,{format:es,generateMipmaps:!0,minFilter:Me}),a=new ts(e.cubeCameraNear,e.cubeCameraFar,n),i=()=>{a.update(r,s)};return e.autoUpdate?(t.onBeforeRender(i),Ws(()=>{t.offBeforeRender(i)})):t.onMounted(i),{cubeRT:n,cubeCamera:a}},render(){return[]},__hmrId:"CubeCamera"});const fi={onPointerEnter:Function,onPointerOver:Function,onPointerMove:Function,onPointerLeave:Function,onPointerDown:Function,onPointerUp:Function,onClick:Function},q=Symbol("Mesh"),H=o({name:"Mesh",extends:I,props:{castShadow:Boolean,receiveShadow:Boolean,...fi},setup(){return{}},provide(){return{[q]:this}},mounted(){!this.mesh&&!this.loading&&this.initMesh()},methods:{initMesh(){const e=new rs(this.geometry,this.material);e.userData.component=this,u(this,"castShadow",e),u(this,"receiveShadow",e),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.renderer&&this.renderer.three.addIntersectObject(e),this.mesh=e,this.initObject3D(e)},createGeometry(){},addGeometryWatchers(e){Object.keys(e).forEach(t=>{l(()=>this[t],()=>{this.refreshGeometry()})})},setGeometry(e){this.geometry=e,this.mesh&&(this.mesh.geometry=e)},setMaterial(e){this.material=e,this.mesh&&(this.mesh.material=e)},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.mesh&&this.geometry&&(this.mesh.geometry=this.geometry),e==null||e.dispose()}},unmounted(){this.mesh&&this.renderer&&this.renderer.three.removeIntersectObject(this.mesh),this.geometry&&this.geometry.dispose(),this.material&&this.material.dispose()},__hmrId:"Mesh"});function g(e,t,r){return o({name:e,extends:H,props:t,created(){this.createGeometry(),this.addGeometryWatchers(t)},methods:{createGeometry(){this.geometry=r(this)}}})}const oe=o({props:{rotateX:Number,rotateY:Number,rotateZ:Number,attributes:{type:Array,default:()=>[]}},inject:{mesh:q},setup(){return{}},created(){if(!this.mesh){console.error("Missing parent Mesh");return}this.createGeometry(),this.rotateGeometry(),this.geometry&&this.mesh.setGeometry(this.geometry),Object.keys(this.$props).forEach(e=>{l(()=>this[e],this.refreshGeometry)})},unmounted(){var e;(e=this.geometry)==null||e.dispose()},methods:{createGeometry(){const e={},t=new ss;this.attributes.forEach(r=>{if(r.name&&r.itemSize&&r.array){const s=e[r.name]=new is(r.array,r.itemSize,r.normalized);t.setAttribute(r.name,s)}}),t.computeBoundingBox(),this.geometry=t},rotateGeometry(){!this.geometry||(this.rotateX&&this.geometry.rotateX(this.rotateX),this.rotateY&&this.geometry.rotateY(this.rotateY),this.rotateZ&&this.geometry.rotateZ(this.rotateZ))},refreshGeometry(){const e=this.geometry;this.createGeometry(),this.rotateGeometry(),this.geometry&&this.mesh&&this.mesh.setGeometry(this.geometry),e==null||e.dispose()}},render(){return[]}});function v(e,t,r){return o({name:e,extends:oe,props:t,methods:{createGeometry(){this.geometry=r(this)}}})}const Fe={size:Number,width:{type:Number,default:1},height:{type:Number,default:1},depth:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},depthSegments:{type:Number,default:1}};function De(e){return e.size?new Ce(e.size,e.size,e.size,e.widthSegments,e.heightSegments,e.depthSegments):new Ce(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}var Ue=v("BoxGeometry",Fe,De);const He={radius:{type:Number,default:1},segments:{type:Number,default:8},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Xe(e){return new ns(e.radius,e.segments,e.thetaStart,e.thetaLength)}var Ke=v("CircleGeometry",He,Xe);const We={radius:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Ve(e){return new as(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var qe=v("ConeGeometry",We,Ve);const Ze={radiusTop:{type:Number,default:1},radiusBottom:{type:Number,default:1},height:{type:Number,default:1},radialSegments:{type:Number,default:8},heightSegments:{type:Number,default:1},openEnded:{type:Boolean,default:!1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function Ye(e){return new os(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}var Je=v("CylinderGeometry",Ze,Ye);const Qe={radius:{type:Number,default:1},detail:{type:Number,default:0}};function et(e){return new hs(e.radius,e.detail)}var tt=v("DodecahedronGeometry",Qe,et);const rt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function st(e){return new ds(e.radius,e.detail)}var it=v("IcosahedronGeometry",rt,st);const nt={points:Array,segments:{type:Number,default:12},phiStart:{type:Number,default:0},phiLength:{type:Number,default:Math.PI*2}};function at(e){return new ls(e.points,e.segments,e.phiStart,e.phiLength)}var ot=v("LatheGeometry",nt,at);const ht={radius:{type:Number,default:1},detail:{type:Number,default:0}};function dt(e){return new us(e.radius,e.detail)}var lt=v("OctahedronGeometry",ht,dt);const ut={width:{type:Number,default:1},height:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1}};function ct(e){return new Le(e.width,e.height,e.widthSegments,e.heightSegments)}var mt=v("PlaneGeometry",ut,ct);const ft={vertices:Array,indices:Array,radius:{type:Number,default:1},detail:{type:Number,default:0}};function pt(e){return new cs(e.vertices,e.indices,e.radius,e.detail)}var yt=v("PolyhedronGeometry",ft,pt);const gt={innerRadius:{type:Number,default:.5},outerRadius:{type:Number,default:1},thetaSegments:{type:Number,default:8},phiSegments:{type:Number,default:1},thetaStart:{type:Number,default:0},thetaLength:{type:Number,default:Math.PI*2}};function vt(e){return new ms(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}var bt=v("RingGeometry",gt,vt);const St={radius:{type:Number,default:1},widthSegments:{type:Number,default:12},heightSegments:{type:Number,default:12}};function Pt(e){return new fs(e.radius,e.widthSegments,e.heightSegments)}var wt=v("SphereGeometry",St,Pt);const xt={radius:{type:Number,default:1},detail:{type:Number,default:0}};function Mt(e){return new ps(e.radius,e.detail)}var Ct=v("TetrahedronGeometry",xt,Mt);const Lt={radius:{type:Number,default:1},tube:{type:Number,default:.4},radialSegments:{type:Number,default:8},tubularSegments:{type:Number,default:6},arc:{type:Number,default:Math.PI*2}};function Nt(e){return new ys(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}var Gt=v("TorusGeometry",Lt,Nt);const _t={radius:{type:Number,default:1},tube:{type:Number,default:.4},tubularSegments:{type:Number,default:64},radialSegments:{type:Number,default:8},p:{type:Number,default:2},q:{type:Number,default:3}};function jt(e){return new gs(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}var Et=v("TorusKnotGeometry",_t,jt);const ge={points:Array,path:bs,tubularSegments:{type:Number,default:64},radius:{type:Number,default:1},radialSegments:{type:Number,default:8},closed:{type:Boolean,default:!1}};function kt(e){let t;return e.points?t=new Ne(e.points):e.path?t=e.path:console.error("Missing path curve or points."),new vs(t,e.tubularSegments,e.radius,e.radiusSegments,e.closed)}var Ot=o({extends:oe,props:ge,methods:{createGeometry(){this.geometry=kt(this)},updatePoints(e){Rt(this.geometry,e)}}});function Rt(e,t){const r=new Ne(t),{radialSegments:s,radius:n,tubularSegments:a,closed:i}=e.parameters,c=r.computeFrenetFrames(a,i);e.tangents=c.tangents,e.normals=c.normals,e.binormals=c.binormals,e.parameters.path=r;const b=e.getAttribute("position"),R=e.getAttribute("normal"),f=new Y,A=new Y;for(let w=0;w({x:512,y:512})},shadowCamera:{type:Object,default:()=>({})}},setup(){return{}},unmounted(){(this.light instanceof me||this.light instanceof fe)&&this.removeFromParent(this.light.target)},methods:{initLight(e){this.light=e,e.shadow&&(e.castShadow=this.castShadow,V(e.shadow.mapSize,this.shadowMapSize),V(e.shadow.camera,this.shadowCamera)),["color","intensity","castShadow"].forEach(t=>{l(()=>this[t],r=>{t==="color"?e.color.set(r):e[t]=r})}),this.initObject3D(e),(e instanceof me||e instanceof fe)&&(u(this,"target",e.target,"position"),this.addToParent(e.target))}},__hmrId:"Light"}),$t=o({extends:Z,created(){this.initLight(new Ss(this.color,this.intensity))},__hmrId:"AmbientLight"}),zt=o({extends:Z,props:{target:{type:Object,default:()=>({x:0,y:0,z:0})}},created(){this.initLight(new fe(this.color,this.intensity))},__hmrId:"DirectionalLight"}),Tt=o({extends:Z,props:{groundColor:{type:String,default:"#444444"}},created(){const e=new Ps(this.color,this.groundColor,this.intensity);l(()=>this.groundColor,t=>{e.groundColor.set(t)}),this.initLight(e)},__hmrId:"HemisphereLight"}),It=o({extends:Z,props:{distance:{type:Number,default:0},decay:{type:Number,default:1}},created(){this.initLight(new ws(this.color,this.intensity,this.distance,this.decay))},__hmrId:"PointLight"}),At=o({extends:Z,props:{width:{type:Number,default:10},height:{type:Number,default:10},helper:Boolean},created(){Zs.init();const e=new xs(this.color,this.intensity,this.width,this.height);if(["width","height"].forEach(r=>{l(()=>this[r],s=>{e[r]=s})}),this.helper){const r=new Ys(e);e.add(r)}this.initLight(e)},__hmrId:"RectAreaLight"}),Bt=o({extends:Z,props:{angle:{type:Number,default:Math.PI/3},decay:{type:Number,default:1},distance:{type:Number,default:0},penumbra:{type:Number,default:0},target:Object},created(){const e=new me(this.color,this.intensity,this.distance,this.angle,this.penumbra,this.decay);["angle","decay","distance","penumbra"].forEach(r=>{l(()=>this[r],s=>{e[r]=s})}),this.initLight(e)},__hmrId:"SpotLight"});const he=Symbol("Material");var _=o({inject:{mesh:q},props:{color:{type:[String,Number],default:"#ffffff"},blending:{type:Number,default:Ms},alphaTest:{type:Number,default:0},depthTest:{type:Boolean,default:!0},depthWrite:{type:Boolean,default:!0},fog:{type:Boolean,default:!0},opacity:{type:Number,default:1},side:{type:Number,default:Cs},transparent:Boolean,vertexColors:Boolean},setup(){return{}},provide(){return{[he]:this}},created(){if(!this.mesh){console.error("Missing parent Mesh");return}this.createMaterial&&(this.material=this.createMaterial(),this.mesh.setMaterial(this.material),this.addWatchers())},unmounted(){var e;(e=this.material)==null||e.dispose()},methods:{setProp(e,t,r=!1){this.material&&(this.material[e]=t,this.material.needsUpdate=r)},setTexture(e,t="map"){this.setProp(t,e,!0)},addWatchers(){["color","alphaTest","blending","depthTest","depthWrite","fog","opacity","side","transparent"].forEach(e=>{l(()=>this[e],t=>{e==="color"?this.material.color.set(t):this.material[e]=t})})}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"Material"});const k={wireframe:{type:Boolean,default:!1},wireframeLinewidth:{type:Number,default:1}};var Ft=o({extends:_,props:{...k},methods:{createMaterial(){const e=new Ge(N(this.$props));return U(this,Object.keys(k),e),e}},__hmrId:"BasicMaterial"}),Dt=o({extends:_,props:{...k},methods:{createMaterial(){const e=new Ls(N(this.$props));return U(this,Object.keys(k),e),e}},__hmrId:"LambertMaterial"}),Ut=o({extends:_,props:{src:String,name:{type:String,default:"0404E8_0404B5_0404CB_3333FC"},flatShading:Boolean},methods:{createMaterial(){const e=this.src?this.src:ye(this.name),t=N(this.$props,["src","name"]);return t.matcap=new J().load(e),new Ns(t)}},__hmrId:"MatcapMaterial"}),Ht=o({extends:_,props:{emissive:{type:[Number,String],default:0},emissiveIntensity:{type:Number,default:1},reflectivity:{type:Number,default:1},shininess:{type:Number,default:30},specular:{type:[String,Number],default:1118481},flatShading:Boolean,...k},methods:{createMaterial(){const e=new Gs(N(this.$props));return["emissive","emissiveIntensity","reflectivity","shininess","specular"].forEach(r=>{l(()=>this[r],s=>{r==="emissive"||r==="specular"?e[r].set(s):e[r]=s})}),U(this,Object.keys(k),e),e}},__hmrId:"PhongMaterial"});const Xt={aoMapIntensity:{type:Number,default:1},bumpScale:{type:Number,default:1},displacementBias:{type:Number,default:0},displacementScale:{type:Number,default:1},emissive:{type:[String,Number],default:0},emissiveIntensity:{type:Number,default:1},envMapIntensity:{type:Number,default:1},lightMapIntensity:{type:Number,default:1},metalness:{type:Number,default:0},normalScale:{type:Object,default:()=>({x:1,y:1})},roughness:{type:Number,default:1},refractionRatio:{type:Number,default:.98},flatShading:Boolean};var ve=o({extends:_,props:{...Xt,...k},methods:{createMaterial(){const e=new _s(N(this.$props,["normalScale"]));return Object.keys(Xt).forEach(t=>{t!=="normalScale"&&l(()=>this[t],r=>{t==="emissive"?e[t].set(r):e[t]=r})}),u(this,"normalScale",e),U(this,Object.keys(k),e),e}},__hmrId:"StandardMaterial"}),Kt=o({extends:ve,props:{flatShading:Boolean},methods:{createMaterial(){return new js(N(this.$props))}},__hmrId:"PhysicalMaterial"});const pi=` varying vec2 vUv; void main(){ vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); } -`,ai=` +`,yi=` varying vec2 vUv; void main() { gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0); } -`;var Kt=o({extends:j,props:{uniforms:{type:Object,default:()=>({})},vertexShader:{type:String,default:ni},fragmentShader:{type:String,default:ai}},methods:{createMaterial(){const e=new fe({uniforms:this.uniforms,vertexShader:this.vertexShader,fragmentShader:this.fragmentShader});return["vertexShader","fragmentShader"].forEach(r=>{l(()=>this[r],s=>{this.setProp(r,s,!0)})}),e},addWatchers(){}},__hmrId:"ShaderMaterial"});function oi(e,t,r){return e.split(t).join(r)}const hi=K.meshphong_frag.slice(0,K.meshphong_frag.indexOf("void main() {")),di=K.meshphong_frag.slice(K.meshphong_frag.indexOf("void main() {")),li={uniforms:Ge.merge([Gs.phong.uniforms,{thicknessColor:{value:new se(16777215)},thicknessDistortion:{value:.1},thicknessAmbient:{value:0},thicknessAttenuation:{value:.1},thicknessPower:{value:2},thicknessScale:{value:10}}]),vertexShader:` +`;var Wt=o({extends:_,props:{uniforms:{type:Object,default:()=>({})},vertexShader:{type:String,default:pi},fragmentShader:{type:String,default:yi}},methods:{createMaterial(){const e=new pe(N(this.$props,["color"]));return["vertexShader","fragmentShader"].forEach(t=>{l(()=>this[t],r=>{e[t]=r,e.needsUpdate=!0})}),e}},__hmrId:"ShaderMaterial"});function gi(e,t,r){return e.split(t).join(r)}const vi=K.meshphong_frag.slice(0,K.meshphong_frag.indexOf("void main() {")),bi=K.meshphong_frag.slice(K.meshphong_frag.indexOf("void main() {")),Si={uniforms:_e.merge([Es.phong.uniforms,{thicknessColor:{value:new se(16777215)},thicknessDistortion:{value:.1},thicknessAmbient:{value:0},thicknessAttenuation:{value:.1},thicknessPower:{value:2},thicknessScale:{value:10}}]),vertexShader:` #define USE_UV ${K.meshphong_vert} `,fragmentShader:` #define USE_UV #define SUBSURFACE - ${hi} + ${vi} uniform float thicknessPower; uniform float thicknessScale; @@ -36,12 +36,12 @@ import{defineComponent as o,toRef as Fr,watch as l,inject as X,provide as Dr,onU vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness; reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color; } - `+di.replace("#include ",oi(K.lights_fragment_begin,"RE_Direct( directLight, geometry, material, reflectedLight );",` + `+bi.replace("#include ",gi(K.lights_fragment_begin,"RE_Direct( directLight, geometry, material, reflectedLight );",` RE_Direct( directLight, geometry, material, reflectedLight ); #if defined( SUBSURFACE ) && defined( USE_UV ) RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight); #endif - `))},Vt={color:{type:[String,Number],default:"#ffffff"},thicknessColor:{type:[String,Number],default:"#ffffff"},thicknessDistortion:{type:Number,default:.4},thicknessAmbient:{type:Number,default:.01},thicknessAttenuation:{type:Number,default:.7},thicknessPower:{type:Number,default:2},thicknessScale:{type:Number,default:4}};var qt=o({extends:j,props:Vt,methods:{createMaterial(){const e=li,t=Ge.clone(e.uniforms);return Object.keys(Vt).forEach(s=>{const n=this[s];let a=s,i=n;["color","thicknessColor"].includes(s)&&(s==="color"&&(a="diffuse"),i=new se(n)),t[a].value=i}),new fe({...e,uniforms:t,lights:!0,transparent:this.transparent,vertexColors:this.vertexColors})}},__hmrId:"SubSurfaceMaterial"}),Zt=o({extends:j,props:{...E},methods:{createMaterial(){const e=new _s(z(this.$props));return U(this,Object.keys(E),e),e}},__hmrId:"ToonMaterial"}),ve=o({inject:{material:oe},props:{name:{type:String,default:"map"},uniform:String,src:String,onLoad:Function,onProgress:Function,onError:Function,mapping:{type:Number,default:js},wrapS:{type:Number,default:_e},wrapT:{type:Number,default:_e},magFilter:{type:Number,default:Es},minFilter:{type:Number,default:we},repeat:{type:Object,default:()=>({x:1,y:1})},rotation:{type:Number,default:0},center:{type:Object,default:()=>({x:0,y:0})}},setup(){return{}},created(){this.refreshTexture(),l(()=>this.src,this.refreshTexture)},unmounted(){var e,t;(e=this.material)==null||e.setTexture(null,this.name),(t=this.texture)==null||t.dispose()},methods:{createTexture(){if(!this.src)return;const e=new Y().load(this.src,this.onLoaded,this.onProgress,this.onError);return["mapping","wrapS","wrapT","magFilter","minFilter","repeat","rotation","center"].forEach(r=>{u(this,r,e)}),e},refreshTexture(){this.texture=this.createTexture(),this.texture&&this.material&&(this.material.setTexture(this.texture,this.name),this.material.material instanceof fe&&this.uniform&&(this.material.uniforms[this.uniform]={value:this.texture}))},onLoaded(e){var t;(t=this.onLoad)==null||t.call(this,e)}},render(){return[]}}),Yt=o({extends:ve,props:{path:{type:String,required:!0},urls:{type:Array,default:()=>["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]},mapping:{type:Number,default:ks}},created(){l(()=>this.path,this.refreshTexture),l(()=>this.urls,this.refreshTexture)},methods:{createTexture(){return new Rs().setPath(this.path).load(this.urls,this.onLoaded,this.onProgress,this.onError)}}}),Jt=v("Box",Fe,De),Qt=v("Circle",He,We),er=v("Cone",Ke,Ve),tr=v("Cylinder",Ze,Ye),rr=v("Dodecahedron",Qe,et),sr=v("Icosahedron",rt,st),ir=v("Lathe",nt,at),nr=v("Octahedron",ht,dt),ar=v("Plane",ut,ct),or=v("Polyhedron",ft,pt),hr=v("Ring",gt,vt),dr=v("Sphere",St,Pt),lr=v("Tetrahedron",wt,Ct);const ui={text:{type:String,required:!0,default:"Text"},fontSrc:{type:String,required:!0},size:{type:Number,default:80},height:{type:Number,default:5},depth:{type:Number,default:1},curveSegments:{type:Number,default:12},bevelEnabled:{type:Boolean,default:!1},bevelThickness:{type:Number,default:10},bevelSize:{type:Number,default:8},bevelOffset:{type:Number,default:0},bevelSegments:{type:Number,default:5},align:{type:[Boolean,String],default:!1}};var ur=o({extends:H,props:ui,setup(){return{}},created(){if(!this.fontSrc){console.error('Missing required prop: "font-src"');return}["text","size","height","curveSegments","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","align"].forEach(r=>{l(()=>this[r],()=>{this.font&&this.refreshGeometry()})});const t=new Os;this.loading=!0,t.load(this.fontSrc,r=>{this.loading=!1,this.font=r,this.createGeometry(),this.initMesh()})},methods:{createGeometry(){this.geometry=new $s(this.text,{font:this.font,size:this.size,height:this.height,depth:this.depth,curveSegments:this.curveSegments,bevelEnabled:this.bevelEnabled,bevelThickness:this.bevelThickness,bevelSize:this.bevelSize,bevelOffset:this.bevelOffset,bevelSegments:this.bevelSegments}),this.align==="center"&&this.geometry.center()}}}),cr=v("Torus",Lt,Nt),mr=v("TorusKnot",_t,jt),fr=o({extends:H,props:ye,created(){this.createGeometry(),this.addGeometryWatchers(ye)},methods:{createGeometry(){this.geometry=kt(this)},updatePoints(e){Ot(this.geometry,e)}},__hmrId:"Tube"}),pr=o({emits:["loaded"],extends:H,props:{src:{type:String,required:!0},width:Number,height:Number,widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},keepSize:Boolean},setup(){return{}},created(){!this.renderer||(this.geometry=new Me(1,1,this.widthSegments,this.heightSegments),this.material=new Ne({side:Is,map:this.loadTexture()}),l(()=>this.src,this.refreshTexture),["width","height"].forEach(e=>{l(()=>this[e],this.resize)}),this.resize(),this.keepSize&&this.renderer.onResize(this.resize))},unmounted(){var e;(e=this.renderer)==null||e.offResize(this.resize)},methods:{loadTexture(){return new Y().load(this.src,this.onLoaded)},refreshTexture(){var e;(e=this.texture)==null||e.dispose(),this.material&&(this.material.map=this.loadTexture(),this.material.needsUpdate=!0)},onLoaded(e){this.texture=e,this.resize(),this.$emit("loaded",e)},resize(){if(!this.renderer||!this.texture)return;const e=this.renderer.size,t=this.texture.image.width,r=this.texture.image.height,s=t/r;let n=1,a=1;this.width&&this.height?(n=this.width*e.wWidth/e.width,a=this.height*e.wHeight/e.height):this.width?(n=this.width*e.wWidth/e.width,a=n/s):this.height?(a=this.height*e.wHeight/e.height,n=a*s):s>1?n=a*s:a=n/s,this.mesh&&(this.mesh.scale.x=n,this.mesh.scale.y=a)}},__hmrId:"Image"}),yr=o({extends:H,props:{count:{type:Number,required:!0}},methods:{initMesh(){if(!!this.renderer){if(!this.geometry||!this.material)return console.error("Missing geometry and/or material"),!1;this.mesh=new ue(this.geometry,this.material,this.count),this.mesh.userData.component=this,u(this,"castShadow",this.mesh),u(this,"receiveShadow",this.mesh),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.renderer.three.addIntersectObject(this.mesh),this.initObject3D(this.mesh)}}},__hmrId:"InstancedMesh"}),gr=o({extends:B,emits:["loaded"],props:{src:{type:String,required:!0}},setup(){return{}},created(){this.texture=new Y().load(this.src,this.onLoaded),this.material=new zs({map:this.texture}),this.sprite=new Ts(this.material),this.initObject3D(this.sprite)},unmounted(){var e,t;(e=this.texture)==null||e.dispose(),(t=this.material)==null||t.dispose()},methods:{onLoaded(){this.updateUV(),this.$emit("loaded")},updateUV(){if(!this.texture||!this.sprite)return;const e=this.texture.image.width,t=this.texture.image.height,r=e/t;let s=.5,n=.5;r>1?s=.5*r:n=.5/r;const a=this.sprite.geometry.attributes.position.array;a[0]=-s,a[1]=-n,a[5]=s,a[6]=-n,a[10]=s,a[11]=n,a[15]=-s,a[16]=n,this.sprite.geometry.attributes.position.needsUpdate=!0}},__hmrId:"Sprite"}),vr=o({extends:B,emits:["load","progress","error"],props:{src:{type:String,required:!0}},data(){return{progress:0}},methods:{onLoad(e){this.$emit("load",e),this.initObject3D(e)},onProgress(e){this.progress=e.loaded/e.total,this.$emit("progress",e)},onError(e){this.$emit("error",e)}}}),br=o({extends:vr,created(){new Ds().load(this.src,t=>{this.onLoad(t.scene)},this.onProgress,this.onError)}}),Sr=o({extends:vr,created(){new Us().load(this.src,t=>{this.onLoad(t)},this.onProgress,this.onError)}});const he=Symbol("Composer");var Pr=o({setup(){return{renderer:X(N)}},provide(){return{[he]:this}},created(){if(!this.renderer){console.error("Renderer not found");return}const e=this.renderer,t=new Hs(this.renderer.renderer);this.composer=t,this.renderer.composer=t,e.addListener("init",()=>{e.renderer.autoClear=!1,this.resize(),e.addListener("resize",this.resize)})},unmounted(){var e;(e=this.renderer)==null||e.removeListener("resize",this.resize)},methods:{addPass(e){var t;(t=this.composer)==null||t.addPass(e)},removePass(e){var t;(t=this.composer)==null||t.removePass(e)},resize(){this.composer&&this.renderer&&this.composer.setSize(this.renderer.size.width,this.renderer.size.height)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"EffectComposer"}),k=o({inject:{renderer:N,composer:he},emits:["ready"],setup(){return{}},created(){this.composer||console.error("Missing parent EffectComposer"),this.renderer||console.error("Missing parent Renderer")},unmounted(){var e,t,r;this.pass&&((e=this.composer)==null||e.removePass(this.pass),(r=(t=this.pass).dispose)==null||r.call(t))},methods:{initEffectPass(e){var t;this.pass=e,(t=this.composer)==null||t.addPass(e),this.$emit("ready",e)}},render(){return[]},__hmrId:"EffectPass"}),xr=o({extends:k,created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e=new Ws(this.renderer.scene,this.renderer.camera);this.initEffectPass(e)},__hmrId:"RenderPass"});const wr={focus:{type:Number,default:1},aperture:{type:Number,default:.025},maxblur:{type:Number,default:.01}};var Cr=o({extends:k,props:wr,created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e={focus:this.focus,aperture:this.aperture,maxblur:this.maxblur,width:this.renderer.size.width,height:this.renderer.size.height},t=new Xs(this.renderer.scene,this.renderer.camera,e);Object.keys(wr).forEach(r=>{l(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"BokehPass"});const Mr={noiseIntensity:{type:Number,default:.5},scanlinesIntensity:{type:Number,default:.05},scanlinesCount:{type:Number,default:4096},grayscale:{type:Number,default:0}};var Lr=o({extends:k,props:Mr,created(){const e=new Ks(this.noiseIntensity,this.scanlinesIntensity,this.scanlinesCount,this.grayscale);Object.keys(Mr).forEach(t=>{l(()=>this[t],r=>{e.uniforms[t].value=r})}),this.initEffectPass(e)},__hmrId:"FilmPass"}),Nr=o({extends:k,created(){var e;const t=new ie(Vs);(e=this.renderer)==null||e.addListener("resize",this.resize),this.initEffectPass(t)},unmounted(){var e;(e=this.renderer)==null||e.removeListener("resize",this.resize)},methods:{resize({size:e}){if(this.pass){const{resolution:t}=this.pass.material.uniforms;t.value.x=1/e.width,t.value.y=1/e.height}}},__hmrId:"FXAAPass"});const Gr={shape:{type:Number,default:1},radius:{type:Number,default:4},rotateR:{type:Number,default:Math.PI/12*1},rotateG:{type:Number,default:Math.PI/12*2},rotateB:{type:Number,default:Math.PI/12*3},scatter:{type:Number,default:0}};var _r=o({extends:k,props:Gr,created(){if(!this.renderer)return;const e=new qs(this.renderer.size.width,this.renderer.size.height,{});Object.keys(Gr).forEach(t=>{e.uniforms[t].value=this[t],l(()=>this[t],r=>{e.uniforms[t].value=r})}),this.initEffectPass(e)},__hmrId:"HalftonePass"}),jr=o({extends:k,created(){if(!this.renderer)return;const e=new Zs(this.renderer.size.width,this.renderer.size.height);this.initEffectPass(e)},__hmrId:"SMAAPass"}),Er=o({extends:k,props:{options:{type:Object,default:()=>({})}},created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e=new Ys(this.renderer.scene,this.renderer.camera,this.renderer.size.width,this.renderer.size.height);Object.keys(this.options).forEach(t=>{e[t]=this.options[t]}),this.initEffectPass(e)},__hmrId:"SSAOPass"}),kr={uniforms:{},vertexShader:` + `))},Vt={color:{type:[String,Number],default:"#ffffff"},thicknessColor:{type:[String,Number],default:"#ffffff"},thicknessDistortion:{type:Number,default:.4},thicknessAmbient:{type:Number,default:.01},thicknessAttenuation:{type:Number,default:.7},thicknessPower:{type:Number,default:2},thicknessScale:{type:Number,default:4}};var qt=o({extends:_,props:Vt,methods:{createMaterial(){const e=Si,t=_e.clone(e.uniforms);return Object.keys(Vt).forEach(s=>{const n=this[s];let a=s,i=n;["color","thicknessColor"].includes(s)&&(s==="color"&&(a="diffuse"),i=new se(n)),t[a].value=i}),new pe({...e,uniforms:t,lights:!0,transparent:this.transparent,vertexColors:this.vertexColors})}},__hmrId:"SubSurfaceMaterial"}),Zt=o({extends:_,props:{...k},methods:{createMaterial(){const e=new ks(N(this.$props));return U(this,Object.keys(k),e),e}},__hmrId:"ToonMaterial"}),be=o({inject:{material:he},props:{name:{type:String,default:"map"},uniform:String,src:String,onLoad:Function,onProgress:Function,onError:Function,encoding:{type:Number,default:Os},mapping:{type:Number,default:Rs},wrapS:{type:Number,default:je},wrapT:{type:Number,default:je},magFilter:{type:Number,default:$s},minFilter:{type:Number,default:Me},repeat:{type:Object,default:()=>({x:1,y:1})},rotation:{type:Number,default:0},center:{type:Object,default:()=>({x:0,y:0})}},setup(){return{}},created(){this.refreshTexture(),l(()=>this.src,this.refreshTexture)},unmounted(){var e,t;(e=this.material)==null||e.setTexture(null,this.name),(t=this.texture)==null||t.dispose()},methods:{createTexture(){if(!this.src)return;const e=new J().load(this.src,this.onLoaded,this.onProgress,this.onError);return["encoding","mapping","wrapS","wrapT","magFilter","minFilter","repeat","rotation","center"].forEach(r=>{u(this,r,e)}),e},refreshTexture(){this.texture=this.createTexture(),this.texture&&this.material&&(this.material.setTexture(this.texture,this.name),this.material.material instanceof pe&&this.uniform&&(this.material.uniforms[this.uniform]={value:this.texture}))},onLoaded(e){var t;(t=this.onLoad)==null||t.call(this,e)}},render(){return[]}}),Yt=o({extends:be,props:{path:{type:String,required:!0},urls:{type:Array,default:()=>["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]},mapping:{type:Number,default:zs}},created(){l(()=>this.path,this.refreshTexture),l(()=>this.urls,this.refreshTexture)},methods:{createTexture(){return new Ts().setPath(this.path).load(this.urls,this.onLoaded,this.onProgress,this.onError)}}}),Jt=o({extends:_,props:{size:{type:Number,default:10},sizeAttenuation:{type:Boolean,default:!0}},methods:{createMaterial(){return new Is(N(this.$props))}},__hmrId:"PointsMaterial"}),Qt=g("Box",Fe,De),er=g("Circle",He,Xe),tr=g("Cone",We,Ve),rr=g("Cylinder",Ze,Ye),sr=g("Dodecahedron",Qe,et),ir=g("Icosahedron",rt,st),nr=g("Lathe",nt,at),ar=g("Octahedron",ht,dt),or=g("Plane",ut,ct),hr=g("Polyhedron",ft,pt),dr=g("Ring",gt,vt),lr=g("Sphere",St,Pt),ur=g("Tetrahedron",xt,Mt);const Pi={text:{type:String,required:!0,default:"Text"},fontSrc:{type:String,required:!0},size:{type:Number,default:80},height:{type:Number,default:5},depth:{type:Number,default:1},curveSegments:{type:Number,default:12},bevelEnabled:{type:Boolean,default:!1},bevelThickness:{type:Number,default:10},bevelSize:{type:Number,default:8},bevelOffset:{type:Number,default:0},bevelSegments:{type:Number,default:5},align:{type:[Boolean,String],default:!1}};var cr=o({extends:H,props:Pi,setup(){return{}},created(){if(!this.fontSrc){console.error('Missing required prop: "font-src"');return}["text","size","height","curveSegments","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","align"].forEach(r=>{l(()=>this[r],()=>{this.font&&this.refreshGeometry()})});const t=new As;this.loading=!0,t.load(this.fontSrc,r=>{this.loading=!1,this.font=r,this.createGeometry(),this.initMesh()})},methods:{createGeometry(){this.geometry=new Bs(this.text,{font:this.font,size:this.size,height:this.height,depth:this.depth,curveSegments:this.curveSegments,bevelEnabled:this.bevelEnabled,bevelThickness:this.bevelThickness,bevelSize:this.bevelSize,bevelOffset:this.bevelOffset,bevelSegments:this.bevelSegments}),this.align==="center"&&this.geometry.center()}}}),mr=g("Torus",Lt,Nt),fr=g("TorusKnot",_t,jt),pr=o({extends:H,props:ge,created(){this.createGeometry(),this.addGeometryWatchers(ge)},methods:{createGeometry(){this.geometry=kt(this)},updatePoints(e){Rt(this.geometry,e)}},__hmrId:"Tube"}),yr=o({emits:["loaded"],extends:H,props:{src:{type:String,required:!0},width:Number,height:Number,widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},keepSize:Boolean},setup(){return{}},created(){!this.renderer||(this.geometry=new Le(1,1,this.widthSegments,this.heightSegments),this.material=new Ge({side:Fs,map:this.loadTexture()}),l(()=>this.src,this.refreshTexture),["width","height"].forEach(e=>{l(()=>this[e],this.resize)}),this.resize(),this.keepSize&&this.renderer.onResize(this.resize))},unmounted(){var e;(e=this.renderer)==null||e.offResize(this.resize)},methods:{loadTexture(){return new J().load(this.src,this.onLoaded)},refreshTexture(){var e;(e=this.texture)==null||e.dispose(),this.material&&(this.material.map=this.loadTexture(),this.material.needsUpdate=!0)},onLoaded(e){this.texture=e,this.resize(),this.$emit("loaded",e)},resize(){if(!this.renderer||!this.texture)return;const e=this.renderer.size,t=this.texture.image.width,r=this.texture.image.height,s=t/r;let n=1,a=1;this.width&&this.height?(n=this.width*e.wWidth/e.width,a=this.height*e.wHeight/e.height):this.width?(n=this.width*e.wWidth/e.width,a=n/s):this.height?(a=this.height*e.wHeight/e.height,n=a*s):s>1?n=a*s:a=n/s,this.mesh&&(this.mesh.scale.x=n,this.mesh.scale.y=a)}},__hmrId:"Image"}),gr=o({extends:H,props:{count:{type:Number,required:!0}},methods:{initMesh(){if(!!this.renderer){if(!this.geometry||!this.material)return console.error("Missing geometry and/or material"),!1;this.mesh=new ce(this.geometry,this.material,this.count),this.mesh.userData.component=this,u(this,"castShadow",this.mesh),u(this,"receiveShadow",this.mesh),(this.onPointerEnter||this.onPointerOver||this.onPointerMove||this.onPointerLeave||this.onPointerDown||this.onPointerUp||this.onClick)&&this.renderer.three.addIntersectObject(this.mesh),this.initObject3D(this.mesh)}}},__hmrId:"InstancedMesh"}),vr=o({extends:I,emits:["loaded"],props:{src:{type:String,required:!0}},setup(){return{}},created(){this.texture=new J().load(this.src,this.onLoaded),this.material=new Ds({map:this.texture}),this.sprite=new Us(this.material),this.initObject3D(this.sprite)},unmounted(){var e,t;(e=this.texture)==null||e.dispose(),(t=this.material)==null||t.dispose()},methods:{onLoaded(){this.updateUV(),this.$emit("loaded")},updateUV(){if(!this.texture||!this.sprite)return;const e=this.texture.image.width,t=this.texture.image.height,r=e/t;let s=.5,n=.5;r>1?s=.5*r:n=.5/r;const a=this.sprite.geometry.attributes.position.array;a[0]=-s,a[1]=-n,a[5]=s,a[6]=-n,a[10]=s,a[11]=n,a[15]=-s,a[16]=n,this.sprite.geometry.attributes.position.needsUpdate=!0}},__hmrId:"Sprite"}),br=o({extends:I,setup(){return{}},provide(){return{[q]:this}},mounted(){this.mesh=this.points=new Hs(this.geometry,this.material),this.initObject3D(this.mesh)},methods:{setGeometry(e){this.geometry=e,this.mesh&&(this.mesh.geometry=e)},setMaterial(e){this.material=e,this.mesh&&(this.mesh.material=e)}}}),Sr=o({extends:I,emits:["load","progress","error"],props:{src:{type:String,required:!0}},data(){return{progress:0}},methods:{onLoad(e){this.$emit("load",e),this.initObject3D(e)},onProgress(e){this.progress=e.loaded/e.total,this.$emit("progress",e)},onError(e){this.$emit("error",e)}}}),Pr=o({extends:Sr,created(){new Js().load(this.src,t=>{this.onLoad(t.scene)},this.onProgress,this.onError)}}),wr=o({extends:Sr,created(){new Qs().load(this.src,t=>{this.onLoad(t)},this.onProgress,this.onError)}});const de=Symbol("Composer");var xr=o({setup(){return{renderer:W(G)}},provide(){return{[de]:this}},created(){if(!this.renderer){console.error("Renderer not found");return}const e=this.renderer,t=new ei(this.renderer.renderer);this.composer=t,this.renderer.composer=t,e.addListener("init",()=>{e.renderer.autoClear=!1,this.resize(),e.addListener("resize",this.resize)})},unmounted(){var e;(e=this.renderer)==null||e.removeListener("resize",this.resize)},methods:{addPass(e){var t;(t=this.composer)==null||t.addPass(e)},removePass(e){var t;(t=this.composer)==null||t.removePass(e)},resize(){this.composer&&this.renderer&&this.composer.setSize(this.renderer.size.width,this.renderer.size.height)}},render(){return this.$slots.default?this.$slots.default():[]},__hmrId:"EffectComposer"}),O=o({inject:{renderer:G,composer:de},emits:["ready"],setup(){return{}},created(){this.composer||console.error("Missing parent EffectComposer"),this.renderer||console.error("Missing parent Renderer")},unmounted(){var e,t,r;this.pass&&((e=this.composer)==null||e.removePass(this.pass),(r=(t=this.pass).dispose)==null||r.call(t))},methods:{initEffectPass(e){var t;this.pass=e,(t=this.composer)==null||t.addPass(e),this.$emit("ready",e)}},render(){return[]},__hmrId:"EffectPass"}),Mr=o({extends:O,created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e=new ti(this.renderer.scene,this.renderer.camera);this.initEffectPass(e)},__hmrId:"RenderPass"});const Cr={focus:{type:Number,default:1},aperture:{type:Number,default:.025},maxblur:{type:Number,default:.01}};var Lr=o({extends:O,props:Cr,created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e={focus:this.focus,aperture:this.aperture,maxblur:this.maxblur,width:this.renderer.size.width,height:this.renderer.size.height},t=new ri(this.renderer.scene,this.renderer.camera,e);Object.keys(Cr).forEach(r=>{l(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"BokehPass"});const Nr={noiseIntensity:{type:Number,default:.5},scanlinesIntensity:{type:Number,default:.05},scanlinesCount:{type:Number,default:4096},grayscale:{type:Number,default:0}};var Gr=o({extends:O,props:Nr,created(){const e=new si(this.noiseIntensity,this.scanlinesIntensity,this.scanlinesCount,this.grayscale);Object.keys(Nr).forEach(t=>{l(()=>this[t],r=>{e.uniforms[t].value=r})}),this.initEffectPass(e)},__hmrId:"FilmPass"}),_r=o({extends:O,created(){var e;const t=new ie(ii);(e=this.renderer)==null||e.addListener("resize",this.resize),this.initEffectPass(t)},unmounted(){var e;(e=this.renderer)==null||e.removeListener("resize",this.resize)},methods:{resize({size:e}){if(this.pass){const{resolution:t}=this.pass.material.uniforms;t.value.x=1/e.width,t.value.y=1/e.height}}},__hmrId:"FXAAPass"});const jr={shape:{type:Number,default:1},radius:{type:Number,default:4},rotateR:{type:Number,default:Math.PI/12*1},rotateG:{type:Number,default:Math.PI/12*2},rotateB:{type:Number,default:Math.PI/12*3},scatter:{type:Number,default:0}};var Er=o({extends:O,props:jr,created(){if(!this.renderer)return;const e=new ni(this.renderer.size.width,this.renderer.size.height,{});Object.keys(jr).forEach(t=>{e.uniforms[t].value=this[t],l(()=>this[t],r=>{e.uniforms[t].value=r})}),this.initEffectPass(e)},__hmrId:"HalftonePass"}),kr=o({extends:O,created(){if(!this.renderer)return;const e=new ai(this.renderer.size.width,this.renderer.size.height);this.initEffectPass(e)},__hmrId:"SMAAPass"}),Or=o({extends:O,props:{options:{type:Object,default:()=>({})}},created(){if(!this.renderer)return;if(!this.renderer.scene){console.error("Missing Scene");return}if(!this.renderer.camera){console.error("Missing Camera");return}const e=new oi(this.renderer.scene,this.renderer.camera,this.renderer.size.width,this.renderer.size.height);Object.keys(this.options).forEach(t=>{e[t]=this.options[t]}),this.initEffectPass(e)},__hmrId:"SSAOPass"}),Rr={uniforms:{},vertexShader:` varying vec2 vUv; void main() { vUv = uv; @@ -52,7 +52,7 @@ import{defineComponent as o,toRef as Fr,watch as l,inject as X,provide as Dr,onU void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); } - `},Rr={uniforms:{tDiffuse:{value:null},blurRadius:{value:0},gradientRadius:{value:0},start:{value:new I},end:{value:new I},delta:{value:new I},texSize:{value:new I}},vertexShader:kr.vertexShader,fragmentShader:` + `},$r={uniforms:{tDiffuse:{value:null},blurRadius:{value:0},gradientRadius:{value:0},start:{value:new T},end:{value:new T},delta:{value:new T},texSize:{value:new T}},vertexShader:Rr.vertexShader,fragmentShader:` uniform sampler2D tDiffuse; uniform float blurRadius; uniform float gradientRadius; @@ -95,7 +95,7 @@ import{defineComponent as o,toRef as Fr,watch as l,inject as X,provide as Dr,onU /* switch back from pre-multiplied alpha */ gl_FragColor.rgb /= gl_FragColor.a + 0.00001; } - `};const ci={blurRadius:{type:Number,default:10},gradientRadius:{type:Number,default:100},start:{type:Object,default:()=>({x:0,y:100})},end:{type:Object,default:()=>({x:10,y:100})}};var Or=o({extends:k,props:ci,setup(){return{uniforms1:{},uniforms2:{}}},created(){if(!this.composer)return;this.pass1=new ie(Rr),this.pass2=new ie(Rr);const e=this.uniforms1=this.pass1.uniforms,t=this.uniforms2=this.pass2.uniforms;t.blurRadius=e.blurRadius,t.gradientRadius=e.gradientRadius,t.start=e.start,t.end=e.end,t.texSize=e.texSize,u(this,"blurRadius",e.blurRadius,"value"),u(this,"gradientRadius",e.gradientRadius,"value"),this.updateFocusLine(),["start","end"].forEach(r=>{l(()=>this[r],this.updateFocusLine,{deep:!0})}),this.pass1.setSize=(r,s)=>{e.texSize.value.set(r,s)},this.initEffectPass(this.pass1),this.composer.addPass(this.pass2)},unmounted(){this.composer&&this.pass2&&this.composer.removePass(this.pass2)},methods:{updateFocusLine(){this.uniforms1.start.value.copy(this.start),this.uniforms1.end.value.copy(this.end);const e=new I().copy(this.end).sub(this.start).normalize();this.uniforms1.delta.value.copy(e),this.uniforms2.delta.value.set(-e.y,e.x)}},__hmrId:"TiltShiftPass"});const $r={strength:{type:Number,default:1.5},radius:{type:Number,default:0},threshold:{type:Number,default:0}};var Ir=o({extends:k,props:$r,created(){if(!this.renderer)return;const e=new I(this.renderer.size.width,this.renderer.size.height),t=new Js(e,this.strength,this.radius,this.threshold);Object.keys($r).forEach(r=>{l(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"UnrealBloomPass"}),mi={uniforms:{tDiffuse:{value:null},center:{value:new I(.5,.5)},strength:{value:0}},vertexShader:kr.vertexShader,fragmentShader:` + `};const wi={blurRadius:{type:Number,default:10},gradientRadius:{type:Number,default:100},start:{type:Object,default:()=>({x:0,y:100})},end:{type:Object,default:()=>({x:10,y:100})}};var zr=o({extends:O,props:wi,setup(){return{uniforms1:{},uniforms2:{}}},created(){if(!this.composer)return;this.pass1=new ie($r),this.pass2=new ie($r);const e=this.uniforms1=this.pass1.uniforms,t=this.uniforms2=this.pass2.uniforms;t.blurRadius=e.blurRadius,t.gradientRadius=e.gradientRadius,t.start=e.start,t.end=e.end,t.texSize=e.texSize,u(this,"blurRadius",e.blurRadius,"value"),u(this,"gradientRadius",e.gradientRadius,"value"),this.updateFocusLine(),["start","end"].forEach(r=>{l(()=>this[r],this.updateFocusLine,{deep:!0})}),this.pass1.setSize=(r,s)=>{e.texSize.value.set(r,s)},this.initEffectPass(this.pass1),this.composer.addPass(this.pass2)},unmounted(){this.composer&&this.pass2&&this.composer.removePass(this.pass2)},methods:{updateFocusLine(){this.uniforms1.start.value.copy(this.start),this.uniforms1.end.value.copy(this.end);const e=new T().copy(this.end).sub(this.start).normalize();this.uniforms1.delta.value.copy(e),this.uniforms2.delta.value.set(-e.y,e.x)}},__hmrId:"TiltShiftPass"});const Tr={strength:{type:Number,default:1.5},radius:{type:Number,default:0},threshold:{type:Number,default:0}};var Ir=o({extends:O,props:Tr,created(){if(!this.renderer)return;const e=new T(this.renderer.size.width,this.renderer.size.height),t=new hi(e,this.strength,this.radius,this.threshold);Object.keys(Tr).forEach(r=>{l(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"UnrealBloomPass"}),xi={uniforms:{tDiffuse:{value:null},center:{value:new T(.5,.5)},strength:{value:0}},vertexShader:Rr.vertexShader,fragmentShader:` uniform sampler2D tDiffuse; uniform vec2 center; uniform float strength; @@ -131,5 +131,5 @@ import{defineComponent as o,toRef as Fr,watch as l,inject as X,provide as Dr,onU /* switch back from pre-multiplied alpha */ gl_FragColor.rgb /= gl_FragColor.a + 0.00001; } - `},zr=o({extends:k,props:{center:{type:Object,default:()=>({x:.5,y:.5})},strength:{type:Number,default:.5}},created(){const e=new ie(mi);u(this,"center",e.uniforms.center,"value"),u(this,"strength",e.uniforms.strength,"value"),this.initEffectPass(e)},__hmrId:"ZoomBlurPass"}),fi=Object.freeze({__proto__:null,Renderer:Ee,RendererInjectionKey:N,OrthographicCamera:$e,PerspectiveCamera:ne,Camera:ne,Group:ze,Scene:Ie,SceneInjectionKey:ae,Object3D:B,Raycaster:Te,CubeCamera:Ae,BoxGeometry:Ue,CircleGeometry:Xe,ConeGeometry:qe,CylinderGeometry:Je,DodecahedronGeometry:tt,IcosahedronGeometry:it,LatheGeometry:ot,OctahedronGeometry:lt,PlaneGeometry:mt,PolyhedronGeometry:yt,RingGeometry:bt,SphereGeometry:xt,TetrahedronGeometry:Mt,TorusGeometry:Gt,TorusKnotGeometry:Et,TubeGeometry:Rt,AmbientLight:$t,DirectionalLight:It,HemisphereLight:zt,PointLight:Tt,RectAreaLight:At,SpotLight:Bt,Material:j,MaterialInjectionKey:oe,BasicMaterial:Ft,LambertMaterial:Dt,MatcapMaterial:Ut,PhongMaterial:Ht,PhysicalMaterial:Xt,ShaderMaterial:Kt,StandardMaterial:ge,SubSurfaceMaterial:qt,ToonMaterial:Zt,Texture:ve,CubeTexture:Yt,Mesh:H,MeshInjectionKey:Q,Box:Jt,Circle:Qt,Cone:er,Cylinder:tr,Dodecahedron:rr,Icosahedron:sr,Lathe:ir,Octahedron:nr,Plane:ar,Polyhedron:or,Ring:hr,Sphere:dr,Tetrahedron:lr,Text:ur,Torus:cr,TorusKnot:mr,Tube:fr,Image:pr,InstancedMesh:yr,Sprite:gr,GLTFModel:br,FBXModel:Sr,EffectComposer:Pr,ComposerInjectionKey:he,RenderPass:xr,BokehPass:Cr,FilmPass:Lr,FXAAPass:Nr,HalftonePass:_r,SMAAPass:jr,SSAOPass:Er,TiltShiftPass:Or,UnrealBloomPass:Ir,ZoomBlurPass:zr,setFromProp:V,bindProps:U,bindProp:u,propsValues:z,lerp:ke,limit:Re,getMatcapUrl:pe});const Tr={install(e){["Camera","OrthographicCamera","PerspectiveCamera","Raycaster","Renderer","Scene","Group","AmbientLight","DirectionalLight","HemisphereLight","PointLight","RectAreaLight","SpotLight","BasicMaterial","LambertMaterial","MatcapMaterial","PhongMaterial","PhysicalMaterial","ShaderMaterial","StandardMaterial","SubSurfaceMaterial","ToonMaterial","Texture","CubeTexture","Mesh","Box","BoxGeometry","Circle","CircleGeometry","Cone","ConeGeometry","Cylinder","CylinderGeometry","Dodecahedron","DodecahedronGeometry","Icosahedron","IcosahedronGeometry","Lathe","LatheGeometry","Octahedron","OctahedronGeometry","Plane","PlaneGeometry","Polyhedron","PolyhedronGeometry","Ring","RingGeometry","Sphere","SphereGeometry","Tetrahedron","TetrahedronGeometry","Text","Torus","TorusGeometry","TorusKnot","TorusKnotGeometry","Tube","TubeGeometry","Image","InstancedMesh","Sprite","FBXModel","GLTFModel","BokehPass","EffectComposer","FilmPass","FXAAPass","HalftonePass","RenderPass","SAOPass","SMAAPass","SSAOPass","TiltShiftPass","UnrealBloomPass","ZoomBlurPass","GLTFViewer"].forEach(r=>{e.component(r,fi[r])})}};function pi(e){return Hr(e).use(Tr)}function yi(){const e={loader:new Y,count:0,textures:[],loadProgress:0,loadTextures:t,dispose:s};return e;function t(n,a){e.count=n.length,e.textures.splice(0),e.loadProgress=0,Promise.all(n.map(r)).then(a)}function r(n,a){return new Promise(i=>{e.loader.load(n.src,c=>{e.loadProgress+=1/e.count,e.textures[a]=c,i(c)})})}function s(){e.textures.forEach(n=>n.dispose())}}export{$t as AmbientLight,Ft as BasicMaterial,Cr as BokehPass,Jt as Box,Ue as BoxGeometry,ne as Camera,Qt as Circle,Xe as CircleGeometry,he as ComposerInjectionKey,er as Cone,qe as ConeGeometry,Ae as CubeCamera,Yt as CubeTexture,tr as Cylinder,Je as CylinderGeometry,It as DirectionalLight,rr as Dodecahedron,tt as DodecahedronGeometry,Pr as EffectComposer,Sr as FBXModel,Nr as FXAAPass,Lr as FilmPass,br as GLTFModel,ze as Group,_r as HalftonePass,zt as HemisphereLight,sr as Icosahedron,it as IcosahedronGeometry,pr as Image,yr as InstancedMesh,Dt as LambertMaterial,ir as Lathe,ot as LatheGeometry,Ut as MatcapMaterial,j as Material,oe as MaterialInjectionKey,H as Mesh,Q as MeshInjectionKey,B as Object3D,nr as Octahedron,lt as OctahedronGeometry,$e as OrthographicCamera,ne as PerspectiveCamera,Ht as PhongMaterial,Xt as PhysicalMaterial,ar as Plane,mt as PlaneGeometry,Tt as PointLight,or as Polyhedron,yt as PolyhedronGeometry,Te as Raycaster,At as RectAreaLight,xr as RenderPass,Ee as Renderer,N as RendererInjectionKey,hr as Ring,bt as RingGeometry,jr as SMAAPass,Er as SSAOPass,Ie as Scene,ae as SceneInjectionKey,Kt as ShaderMaterial,dr as Sphere,xt as SphereGeometry,Bt as SpotLight,gr as Sprite,ge as StandardMaterial,qt as SubSurfaceMaterial,lr as Tetrahedron,Mt as TetrahedronGeometry,ur as Text,ve as Texture,Or as TiltShiftPass,Zt as ToonMaterial,cr as Torus,Gt as TorusGeometry,mr as TorusKnot,Et as TorusKnotGeometry,Tr as TroisJSVuePlugin,fr as Tube,Rt as TubeGeometry,Ir as UnrealBloomPass,zr as ZoomBlurPass,u as bindProp,U as bindProps,pi as createApp,pe as getMatcapUrl,ke as lerp,Re as limit,z as propsValues,V as setFromProp,yi as useTextures}; + `},Ar=o({extends:O,props:{center:{type:Object,default:()=>({x:.5,y:.5})},strength:{type:Number,default:.5}},created(){const e=new ie(xi);u(this,"center",e.uniforms.center,"value"),u(this,"strength",e.uniforms.strength,"value"),this.initEffectPass(e)},__hmrId:"ZoomBlurPass"}),Mi=Object.freeze({__proto__:null,Renderer:Re,RendererInjectionKey:G,OrthographicCamera:ze,PerspectiveCamera:ne,Camera:ne,Group:Ie,Scene:Te,SceneInjectionKey:ae,Object3D:I,Raycaster:Ae,CubeCamera:Be,BufferGeometry:oe,BoxGeometry:Ue,CircleGeometry:Ke,ConeGeometry:qe,CylinderGeometry:Je,DodecahedronGeometry:tt,IcosahedronGeometry:it,LatheGeometry:ot,OctahedronGeometry:lt,PlaneGeometry:mt,PolyhedronGeometry:yt,RingGeometry:bt,SphereGeometry:wt,TetrahedronGeometry:Ct,TorusGeometry:Gt,TorusKnotGeometry:Et,TubeGeometry:Ot,AmbientLight:$t,DirectionalLight:zt,HemisphereLight:Tt,PointLight:It,RectAreaLight:At,SpotLight:Bt,Material:_,MaterialInjectionKey:he,BasicMaterial:Ft,LambertMaterial:Dt,MatcapMaterial:Ut,PhongMaterial:Ht,PhysicalMaterial:Kt,ShaderMaterial:Wt,StandardMaterial:ve,SubSurfaceMaterial:qt,ToonMaterial:Zt,Texture:be,CubeTexture:Yt,PointsMaterial:Jt,Mesh:H,MeshInjectionKey:q,Box:Qt,Circle:er,Cone:tr,Cylinder:rr,Dodecahedron:sr,Icosahedron:ir,Lathe:nr,Octahedron:ar,Plane:or,Polyhedron:hr,Ring:dr,Sphere:lr,Tetrahedron:ur,Text:cr,Torus:mr,TorusKnot:fr,Tube:pr,Image:yr,InstancedMesh:gr,Sprite:vr,Points:br,GLTFModel:Pr,FBXModel:wr,EffectComposer:xr,ComposerInjectionKey:de,RenderPass:Mr,BokehPass:Lr,FilmPass:Gr,FXAAPass:_r,HalftonePass:Er,SMAAPass:kr,SSAOPass:Or,TiltShiftPass:zr,UnrealBloomPass:Ir,ZoomBlurPass:Ar,setFromProp:V,bindProps:U,bindProp:u,propsValues:N,lerp:Ee,limit:ke,getMatcapUrl:ye});const Br={install(e){["Camera","OrthographicCamera","PerspectiveCamera","Raycaster","Renderer","Scene","Group","AmbientLight","DirectionalLight","HemisphereLight","PointLight","RectAreaLight","SpotLight","BasicMaterial","LambertMaterial","MatcapMaterial","PhongMaterial","PhysicalMaterial","ShaderMaterial","StandardMaterial","SubSurfaceMaterial","ToonMaterial","Texture","CubeTexture","Mesh","Box","BoxGeometry","Circle","CircleGeometry","Cone","ConeGeometry","Cylinder","CylinderGeometry","Dodecahedron","DodecahedronGeometry","Icosahedron","IcosahedronGeometry","Lathe","LatheGeometry","Octahedron","OctahedronGeometry","Plane","PlaneGeometry","Polyhedron","PolyhedronGeometry","Ring","RingGeometry","Sphere","SphereGeometry","Tetrahedron","TetrahedronGeometry","Text","Torus","TorusGeometry","TorusKnot","TorusKnotGeometry","Tube","TubeGeometry","Image","InstancedMesh","Sprite","FBXModel","GLTFModel","BokehPass","EffectComposer","FilmPass","FXAAPass","HalftonePass","RenderPass","SAOPass","SMAAPass","SSAOPass","TiltShiftPass","UnrealBloomPass","ZoomBlurPass","GLTFViewer"].forEach(r=>{e.component(r,Mi[r])})}};function Ci(e){return Vs(e).use(Br)}function Li(){const e={loader:new J,count:0,textures:[],loadProgress:0,loadTextures:t,dispose:s};return e;function t(n,a){e.count=n.length,e.textures.splice(0),e.loadProgress=0,Promise.all(n.map(r)).then(a)}function r(n,a){return new Promise(i=>{e.loader.load(n.src,c=>{e.loadProgress+=1/e.count,e.textures[a]=c,i(c)})})}function s(){e.textures.forEach(n=>n.dispose())}}export{$t as AmbientLight,Ft as BasicMaterial,Lr as BokehPass,Qt as Box,Ue as BoxGeometry,oe as BufferGeometry,ne as Camera,er as Circle,Ke as CircleGeometry,de as ComposerInjectionKey,tr as Cone,qe as ConeGeometry,Be as CubeCamera,Yt as CubeTexture,rr as Cylinder,Je as CylinderGeometry,zt as DirectionalLight,sr as Dodecahedron,tt as DodecahedronGeometry,xr as EffectComposer,wr as FBXModel,_r as FXAAPass,Gr as FilmPass,Pr as GLTFModel,Ie as Group,Er as HalftonePass,Tt as HemisphereLight,ir as Icosahedron,it as IcosahedronGeometry,yr as Image,gr as InstancedMesh,Dt as LambertMaterial,nr as Lathe,ot as LatheGeometry,Ut as MatcapMaterial,_ as Material,he as MaterialInjectionKey,H as Mesh,q as MeshInjectionKey,I as Object3D,ar as Octahedron,lt as OctahedronGeometry,ze as OrthographicCamera,ne as PerspectiveCamera,Ht as PhongMaterial,Kt as PhysicalMaterial,or as Plane,mt as PlaneGeometry,It as PointLight,br as Points,Jt as PointsMaterial,hr as Polyhedron,yt as PolyhedronGeometry,Ae as Raycaster,At as RectAreaLight,Mr as RenderPass,Re as Renderer,G as RendererInjectionKey,dr as Ring,bt as RingGeometry,kr as SMAAPass,Or as SSAOPass,Te as Scene,ae as SceneInjectionKey,Wt as ShaderMaterial,lr as Sphere,wt as SphereGeometry,Bt as SpotLight,vr as Sprite,ve as StandardMaterial,qt as SubSurfaceMaterial,ur as Tetrahedron,Ct as TetrahedronGeometry,cr as Text,be as Texture,zr as TiltShiftPass,Zt as ToonMaterial,mr as Torus,Gt as TorusGeometry,fr as TorusKnot,Et as TorusKnotGeometry,Br as TroisJSVuePlugin,pr as Tube,Ot as TubeGeometry,Ir as UnrealBloomPass,Ar as ZoomBlurPass,u as bindProp,U as bindProps,Ci as createApp,ye as getMatcapUrl,Ee as lerp,ke as limit,N as propsValues,V as setFromProp,Li as useTextures}; //# sourceMappingURL=trois.module.min.js.map diff --git a/build/trois.module.min.js.map b/build/trois.module.min.js.map index f5603b2..0d011a6 100644 --- a/build/trois.module.min.js.map +++ b/build/trois.module.min.js.map @@ -1 +1 @@ -{"version":3,"file":"trois.module.min.js","sources":["../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/tools.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/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/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 { 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 if (event instanceof TouchEvent && event.touches && event.touches.length > 0) {\n x = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (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((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\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 = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (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 = (obj.camera!)\n const vFOV = (camera.fov * Math.PI) / 180\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(camera.position.z)\n const w = h * camera.aspect\n return [w, h]\n }\n}\n","/* eslint-disable no-use-before-define */\nimport { Camera, Scene, WebGLRenderer } from 'three'\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'\nimport { defineComponent, InjectionKey, PropType } from 'vue'\nimport { PointerPublicConfigInterface } from './usePointer'\nimport useThree, { SizeInterface, ThreeConfigInterface, ThreeInterface } from './useThree'\n\ntype CallbackType = (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\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\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 RendererSetupInterface {\n canvas: HTMLCanvasElement\n three: ThreeInterface\n renderer: WebGLRenderer\n size: SizeInterface\n renderFn(): 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: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = 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>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, default: false },\n shadow: Boolean,\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\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 // TODO : improve shadow params\n this.renderer.shadowMap.enabled = this.shadow\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()\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 { Vector2, Vector3 } from 'three'\nimport { toRef, watch } from 'vue'\n\nexport function setFromProp(o: Record, prop: Record): 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) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\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 { 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, 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, 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 = 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\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\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, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, 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 } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\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 },\r\n setup(props) {\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 = () => { cubeCamera.update(renderer, scene) }\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 }\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 = 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) {\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

>(\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, watch } from 'vue'\nimport { BufferGeometry } from 'three'\nimport { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'\n\nexport interface GeometrySetupInterface {\n mesh?: MeshInterface\n geometry?: BufferGeometry\n watchProps?: string[]\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 },\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 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

>(\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, 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, 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, watch } from 'vue'\nimport { FrontSide, Material, 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 = 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], default: '#ffffff' },\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', '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, 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, 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'\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({\n uniforms: this.uniforms,\n vertexShader: this.vertexShader,\n fragmentShader: this.fragmentShader,\n })\n\n const watchProps = ['vertexShader', 'fragmentShader']\n watchProps.forEach(p => {\n // @ts-ignore\n watch(() => this[p], (value) => {\n this.setProp(p, value, true)\n })\n })\n\n return material\n },\n addWatchers() {},\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 ',\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, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, 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, 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 // 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, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, 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 = ['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,\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 { 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, 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\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 { 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 = 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, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, 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, 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 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\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 '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","Sprite","EffectComposer","RenderPass","BokehPass","FilmPass","HalftonePass","SMAAPass","SSAOPass","UnrealBloomPass","_createApp"],"mappings":"gkFAcqC,EAAuD,MACpF,CACJ,SACA,gBAAgB,GAAI,GAAQ,EAAG,EAAG,IAChC,EAEE,EAAY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WACA,YAEA,YACA,iBACA,WACA,WACA,eACA,aACA,UACA,WACA,WACA,gBACA,kBACA,eAEA,cAGI,QAAQ,GAAQ,GAEhB,UAAU,EAAM,GAAM,oBAKN,EAAkB,OACnCC,IAAW,GAAQ,IAAI,iBCtEyB,MACjD,GAAyB,CAC7B,OAAQ,GAAI,GACZ,MAAO,EACP,SAAU,GACV,aAAc,EACd,eACA,iBAEK,cAEe,EAAkC,EAAiB,GACnE,MAAQ,EAAO,SACf,SAAS,OAAO,KAChB,aAAe,UACX,IAAI,EAAO,IAAI,IAAc,KAAK,cAGvB,EAA6B,EAAe,OACxD,IAAI,SAAQ,GAAW,GACxB,OAAO,KACT,EAAI,IACJ,GAAW,GACL,cAAgB,EAAI,EAAI,QACxB,SAAS,GAAS,IACd,mBAMG,GACb,SAAS,QAAQ,GAAK,EAAE"} \ No newline at end of file +{"version":3,"file":"trois.module.min.js","sources":["../src/tools.ts","../src/core/useRaycaster.ts","../src/core/usePointer.ts","../src/core/useThree.ts","../src/core/Renderer.ts","../src/core/Camera.ts","../src/core/OrthographicCamera.ts","../src/core/PerspectiveCamera.ts","../src/core/Scene.ts","../src/core/Object3D.ts","../src/core/Group.ts","../src/core/Raycaster.ts","../src/core/CubeCamera.ts","../src/meshes/Mesh.ts","../src/geometries/Geometry.ts","../src/geometries/BoxGeometry.ts","../src/geometries/CircleGeometry.ts","../src/geometries/ConeGeometry.ts","../src/geometries/CylinderGeometry.ts","../src/geometries/DodecahedronGeometry.ts","../src/geometries/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, prop: Record): 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) dst[_dstProp] = src[srcProp]\n watch(ref, (value) => { dst[_dstProp] = value })\n }\n}\n\nexport function propsValues(props: Record, exclude: string[] = []): Record {\n const values: Record = {}\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 = (event).touches[0].clientX\n y = (event).touches[0].clientY\n } else {\n x = (event).clientX\n y = (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((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\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 = (obj.camera!)\n if (camera.type === 'PerspectiveCamera') {\n const pCamera = (camera)\n pCamera.aspect = size.ratio\n pCamera.updateProjectionMatrix()\n }\n\n if (camera.type === 'OrthographicCamera') {\n const oCamera = (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 = (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 = (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\ntype MountedCallbackType = CallbackType\ntype RenderCallbackType = CallbackType\ntype ResizeCallbackType = CallbackType\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: T, cb: EventCallbackMap[T]): void\n removeListener(t: T, cb: EventCallbackMap[T]): void\n}\n\nexport const RendererInjectionKey: InjectionKey = 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>, default: false },\n pointer: { type: [Boolean, Object] as PropType, default: false },\n resize: { type: [Boolean, String] as PropType, 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, 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n lookAt: { type: Object as PropType, 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 = 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, default: () => ({ x: 0, y: 0, z: 0 }) },\n rotation: { type: Object as PropType, default: () => ({ x: 0, y: 0, z: 0 }) },\n scale: { type: Object as PropType, default: () => ({ x: 1, y: 1, z: 1, order: 'XYZ' }) },\n lookAt: { type: Object as PropType, default: null },\n autoRemove: { type: Boolean, default: true },\n userData: { type: Object, default: () => ({}) },\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\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, default: emptyCallBack },\n onPointerOver: { type: Function as PropType, default: emptyCallBack },\n onPointerMove: { type: Function as PropType, default: emptyCallBack },\n onPointerLeave: { type: Function as PropType, default: emptyCallBack },\n onClick: { type: Function as PropType, 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 } from 'vue'\r\nimport {\r\n CubeCamera,\r\n LinearMipmapLinearFilter,\r\n RGBFormat,\r\n WebGLCubeRenderTarget,\r\n} from 'three'\r\nimport Object3D from './Object3D'\r\nimport { RendererInjectionKey } from './Renderer'\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 },\r\n setup(props) {\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 = () => { cubeCamera.update(renderer, scene) }\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 }\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 = 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) {\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

>(\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\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>, 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 = {}\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

>(\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, 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, 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 = 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, 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, 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, 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 ',\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, default: '#ffffff' },\n thicknessColor: { type: [String, Number] as PropType, 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, default: () => ({ x: 1, y: 1 }) },\n rotation: { type: Number, default: 0 },\n center: { type: Object as PropType, 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,\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, 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\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 = 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, default: () => ({ x: 0, y: 100 }) },\n end: { type: Object as PropType, 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, 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 'AmbientLight',\n 'DirectionalLight',\n 'HemisphereLight',\n 'PointLight',\n 'RectAreaLight',\n 'SpotLight',\n\n 'BasicMaterial',\n 'LambertMaterial',\n 'MatcapMaterial',\n 'PhongMaterial',\n 'PhysicalMaterial',\n 'ShaderMaterial',\n 'StandardMaterial',\n 'SubSurfaceMaterial',\n 'ToonMaterial',\n\n 'Texture',\n 'CubeTexture',\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 '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":"6tFAE4B,EAA4B,EAAqC,CACvF,YAAgB,gBACX,QAAQ,GAAM,QAAQ,CAAC,CAAC,EAAK,KAAW,GAC3C,GAAO,eAKW,EAAU,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SACf,SAAS,OAAO,KAChB,aAAe,UACX,IAAI,EAAO,IAAI,IAAc,KAAK,cAGvB,EAA6B,EAAe,OACxD,IAAI,SAAQ,GAAW,GACxB,OAAO,KACT,EAAI,IACJ,GAAW,GACL,cAAgB,EAAI,EAAI,QACxB,SAAS,GAAS,IACd,mBAMG,GACb,SAAS,QAAQ,GAAK,EAAE"} \ No newline at end of file diff --git a/package.json b/package.json index 4a029db..f183200 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "troisjs", - "version": "0.3.0-beta.0", + "version": "0.3.0-beta.4", "scripts": { "dev": "vite", "types": "tsc",