| "imports": { | "imports": { | ||||
| "three": "./../../dist/index.mjs", | "three": "./../../dist/index.mjs", | ||||
| "threepipe": "./../../dist/index.mjs", | "threepipe": "./../../dist/index.mjs", | ||||
| "@threepipe/plugin-extra-importers": "./../../plugins/extra-importers/dist/index.mjs" | |||||
| "@threepipe/plugins-extra-importers": "./../../plugins/extra-importers/dist/index.mjs" | |||||
| } | } | ||||
| } | } | ||||
| VRMLLoadPlugin, | VRMLLoadPlugin, | ||||
| VTKLoadPlugin, | VTKLoadPlugin, | ||||
| XYZLoadPlugin, | XYZLoadPlugin, | ||||
| } from '@threepipe/plugin-extra-importers' | |||||
| } from '@threepipe/plugins-extra-importers' | |||||
| async function init() { | async function init() { | ||||
| 'https://threejs.org/examples/models/vtk/bunny.vtk', | 'https://threejs.org/examples/models/vtk/bunny.vtk', | ||||
| 'https://threejs.org/examples/models/vtk/cube_binary.vtp', | 'https://threejs.org/examples/models/vtk/cube_binary.vtp', | ||||
| 'https://threejs.org/examples/models/xyz/helix_201.xyz', | 'https://threejs.org/examples/models/xyz/helix_201.xyz', | ||||
| 'https://threejs.org/examples/models/vrml/meshWithTexture.wrl', | |||||
| ] | ] | ||||
| const options: ImportAddOptions = { | const options: ImportAddOptions = { |
| "imports": { | "imports": { | ||||
| "three": "./../../dist/index.mjs", | "three": "./../../dist/index.mjs", | ||||
| "threepipe": "./../../dist/index.mjs", | "threepipe": "./../../dist/index.mjs", | ||||
| "@threepipe/plugin-extra-importers": "./../../plugins/extra-importers/dist/index.mjs", | |||||
| "@threepipe/plugins-extra-importers": "./../../plugins/extra-importers/dist/index.mjs", | |||||
| "@threepipe/plugin-blend-importer": "./../../plugins/blend-importer/dist/index.mjs", | "@threepipe/plugin-blend-importer": "./../../plugins/blend-importer/dist/index.mjs", | ||||
| "@threepipe/plugin-configurator": "./../../plugins/configurator/dist/index.mjs", | "@threepipe/plugin-configurator": "./../../plugins/configurator/dist/index.mjs", | ||||
| "@threepipe/plugin-network": "./../../plugins/network/dist/index.mjs", | "@threepipe/plugin-network": "./../../plugins/network/dist/index.mjs", |
| ClearcoatTintPlugin, | ClearcoatTintPlugin, | ||||
| ContactShadowGroundPlugin, | ContactShadowGroundPlugin, | ||||
| CustomBumpMapPlugin, | CustomBumpMapPlugin, | ||||
| DepthBufferPlugin, | |||||
| DeviceOrientationControlsPlugin, | DeviceOrientationControlsPlugin, | ||||
| DropzonePlugin, | DropzonePlugin, | ||||
| EditorViewWidgetPlugin, | EditorViewWidgetPlugin, | ||||
| HalfFloatType, | HalfFloatType, | ||||
| HDRiGroundPlugin, | HDRiGroundPlugin, | ||||
| HemisphereLight, | HemisphereLight, | ||||
| InteractionPromptPlugin, | |||||
| KTX2LoadPlugin, | KTX2LoadPlugin, | ||||
| KTXLoadPlugin, | KTXLoadPlugin, | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| MeshOptSimplifyModifierPlugin, | |||||
| NoiseBumpMaterialPlugin, | NoiseBumpMaterialPlugin, | ||||
| NormalBufferPlugin, | |||||
| Object3DGeneratorPlugin, | Object3DGeneratorPlugin, | ||||
| Object3DWidgetsPlugin, | Object3DWidgetsPlugin, | ||||
| ParallaxMappingPlugin, | ParallaxMappingPlugin, | ||||
| import {GaussianSplattingPlugin} from '@threepipe/plugin-gaussian-splatting' | import {GaussianSplattingPlugin} from '@threepipe/plugin-gaussian-splatting' | ||||
| import {MaterialConfiguratorPlugin, SwitchNodePlugin} from '@threepipe/plugin-configurator' | import {MaterialConfiguratorPlugin, SwitchNodePlugin} from '@threepipe/plugin-configurator' | ||||
| import {BlendLoadPlugin} from '@threepipe/plugin-blend-importer' | import {BlendLoadPlugin} from '@threepipe/plugin-blend-importer' | ||||
| import {extraImportPlugins} from '@threepipe/plugin-extra-importers' | |||||
| import {extraImportPlugins} from '@threepipe/plugins-extra-importers' | |||||
| import {AWSClientPlugin} from '@threepipe/plugin-network' | import {AWSClientPlugin} from '@threepipe/plugin-network' | ||||
| async function init() { | async function init() { | ||||
| VirtualCamerasPlugin, | VirtualCamerasPlugin, | ||||
| // new SceneUiConfigPlugin(), // this is already in ViewerUiPlugin | // new SceneUiConfigPlugin(), // this is already in ViewerUiPlugin | ||||
| new GBufferPlugin(HalfFloatType, true, true, true), | new GBufferPlugin(HalfFloatType, true, true, true), | ||||
| new DepthBufferPlugin(HalfFloatType, false, false), | |||||
| new NormalBufferPlugin(HalfFloatType, false), | |||||
| // new DepthBufferPlugin(HalfFloatType, false, false), | |||||
| // new NormalBufferPlugin(HalfFloatType, false), | |||||
| new RenderTargetPreviewPlugin(false), | new RenderTargetPreviewPlugin(false), | ||||
| new FrameFadePlugin(), | new FrameFadePlugin(), | ||||
| new HDRiGroundPlugin(false, true), | new HDRiGroundPlugin(false, true), | ||||
| DeviceOrientationControlsPlugin, | DeviceOrientationControlsPlugin, | ||||
| PointerLockControlsPlugin, | PointerLockControlsPlugin, | ||||
| ThreeFirstPersonControlsPlugin, | ThreeFirstPersonControlsPlugin, | ||||
| // InteractionPromptPlugin, // todo disable when not in Viewer tab, like in webgi | |||||
| new MeshOptSimplifyModifierPlugin(false, document.head), // will auto-initialize on first use. | |||||
| InteractionPromptPlugin, | |||||
| // new MeshOptSimplifyModifierPlugin(false, document.head), // will auto-initialize on first use. | |||||
| new GLTFMeshOptDecodePlugin(true, document.head), | new GLTFMeshOptDecodePlugin(true, document.head), | ||||
| // new BasicSVGRendererPlugin(false, true), | // new BasicSVGRendererPlugin(false, true), | ||||
| ...extraImportPlugins, | ...extraImportPlugins, |
| ui.setupPluginUi(PickingPlugin) | ui.setupPluginUi(PickingPlugin) | ||||
| picking.addEventListener('hitObject', (e)=>{ | picking.addEventListener('hitObject', (e)=>{ | ||||
| console.log('Hit object', e) | |||||
| console.log('Hit object', e, e.intersects.selectedObject) | |||||
| // set to null to prevent selection | |||||
| // e.intersects.selectedObject = null | |||||
| }) | }) | ||||
| picking.addEventListener('selectedObjectChanged', (e)=>{ | picking.addEventListener('selectedObjectChanged', (e)=>{ | ||||
| console.log('Selected Object Changed', e) | console.log('Selected Object Changed', e) |
| "compilerOptions": { | "compilerOptions": { | ||||
| "paths": { | "paths": { | ||||
| "threepipe": ["../dist/"], | "threepipe": ["../dist/"], | ||||
| "@threepipe/plugin-*": ["../plugins/*/dist"] | |||||
| "@threepipe/plugin-*": ["../plugins/*/dist"], | |||||
| "@threepipe/plugins-*": ["../plugins/*/dist"] | |||||
| }, | }, | ||||
| }, | }, | ||||
| } | } |
| "sourceMap": false, | "sourceMap": false, | ||||
| "paths": { | "paths": { | ||||
| "@threepipe/plugin-*": ["../plugins/*/src"], | "@threepipe/plugin-*": ["../plugins/*/src"], | ||||
| "@threepipe/plugins-*": ["../plugins/*/src"], | |||||
| "threepipe": ["../src/"] | "threepipe": ["../src/"] | ||||
| }, | }, | ||||
| "target": "ES2020", | "target": "ES2020", |
| "threepipe": "./../../dist/index.mjs", | "threepipe": "./../../dist/index.mjs", | ||||
| "@threepipe/plugin-tweakpane": "./../../plugins/tweakpane/dist/index.mjs", | "@threepipe/plugin-tweakpane": "./../../plugins/tweakpane/dist/index.mjs", | ||||
| "@threepipe/plugin-tweakpane-editor": "./../../plugins/tweakpane-editor/dist/index.mjs", | "@threepipe/plugin-tweakpane-editor": "./../../plugins/tweakpane-editor/dist/index.mjs", | ||||
| "@threepipe/plugin-extra-importers": "./../../plugins/extra-importers/dist/index.mjs", | |||||
| "@threepipe/plugins-extra-importers": "./../../plugins/extra-importers/dist/index.mjs", | |||||
| "@threepipe/plugin-blend-importer": "./../../plugins/blend-importer/dist/index.mjs", | "@threepipe/plugin-blend-importer": "./../../plugins/blend-importer/dist/index.mjs", | ||||
| "@threepipe/plugin-geometry-generator": "./../../plugins/geometry-generator/dist/index.mjs", | "@threepipe/plugin-geometry-generator": "./../../plugins/geometry-generator/dist/index.mjs", | ||||
| "@threepipe/plugin-configurator": "./../../plugins/configurator/dist/index.mjs", | "@threepipe/plugin-configurator": "./../../plugins/configurator/dist/index.mjs", | ||||
| "@threepipe/plugin-network": "./../../plugins/network/dist/index.mjs", | "@threepipe/plugin-network": "./../../plugins/network/dist/index.mjs", | ||||
| "@threepipe/plugin-gltf-transform": "./../../plugins/gltf-transform/dist/index.mjs" | |||||
| "@threepipe/plugin-gltf-transform": "./../../plugins/gltf-transform/dist/index.mjs", | |||||
| "@threepipe/plugin-gaussian-splatting": "./../../plugins/gaussian-splatting/dist/index.mjs" | "@threepipe/plugin-gaussian-splatting": "./../../plugins/gaussian-splatting/dist/index.mjs" | ||||
| } | } | ||||
| } | } |
| PickingPlugin, | PickingPlugin, | ||||
| PLYLoadPlugin, | PLYLoadPlugin, | ||||
| PointerLockControlsPlugin, | PointerLockControlsPlugin, | ||||
| PopmotionPlugin, | |||||
| ProgressivePlugin, | ProgressivePlugin, | ||||
| RenderTargetPreviewPlugin, | RenderTargetPreviewPlugin, | ||||
| Rhino3dmLoadPlugin, | Rhino3dmLoadPlugin, | ||||
| ThreeFirstPersonControlsPlugin, | ThreeFirstPersonControlsPlugin, | ||||
| ThreeViewer, | ThreeViewer, | ||||
| TonemapPlugin, | TonemapPlugin, | ||||
| TransformAnimationPlugin, | |||||
| TransformControlsPlugin, | TransformControlsPlugin, | ||||
| UnsignedByteType, | UnsignedByteType, | ||||
| USDZLoadPlugin, | USDZLoadPlugin, | ||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| import {HierarchyUiPlugin, TweakpaneEditorPlugin} from '@threepipe/plugin-tweakpane-editor' | import {HierarchyUiPlugin, TweakpaneEditorPlugin} from '@threepipe/plugin-tweakpane-editor' | ||||
| import {BlendLoadPlugin} from '@threepipe/plugin-blend-importer' | import {BlendLoadPlugin} from '@threepipe/plugin-blend-importer' | ||||
| import {extraImportPlugins} from '@threepipe/plugin-extra-importers' | |||||
| import {extraImportPlugins} from '@threepipe/plugins-extra-importers' | |||||
| import {GeometryGeneratorPlugin} from '@threepipe/plugin-geometry-generator' | import {GeometryGeneratorPlugin} from '@threepipe/plugin-geometry-generator' | ||||
| import {GaussianSplattingPlugin} from '@threepipe/plugin-gaussian-splatting' | import {GaussianSplattingPlugin} from '@threepipe/plugin-gaussian-splatting' | ||||
| import {MaterialConfiguratorPlugin, SwitchNodePlugin} from '@threepipe/plugin-configurator' | import {MaterialConfiguratorPlugin, SwitchNodePlugin} from '@threepipe/plugin-configurator' | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| AssetExporterPlugin, | AssetExporterPlugin, | ||||
| GLTFDracoExportPlugin, | GLTFDracoExportPlugin, | ||||
| PopmotionPlugin, | |||||
| new ProgressivePlugin(), | new ProgressivePlugin(), | ||||
| new SSAAPlugin(), | new SSAAPlugin(), | ||||
| GLTFAnimationPlugin, | GLTFAnimationPlugin, | ||||
| TransformAnimationPlugin, | |||||
| PickingPlugin, | PickingPlugin, | ||||
| new TransformControlsPlugin(false), | new TransformControlsPlugin(false), | ||||
| EditorViewWidgetPlugin, | EditorViewWidgetPlugin, |