threepipe
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GaussianSplatsPlugin.ts 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // import {AViewerPluginSync, createStyles, IViewerEvent, ThreeViewer} from 'threepipe'
  2. // import styles from './SamplePlugin.css'
  3. // import * as GaussianSplats3D from '@mkkellogg/gaussian-splats-3d'
  4. //
  5. // // import * as GaussianSplats3D from 'gle-gs3d'
  6. //
  7. // export class GaussianSplatsPlugin extends AViewerPluginSync {
  8. // public static readonly PluginType: string = 'GaussianSplatsPlugin'
  9. // enabled = true
  10. // dependencies = []
  11. // toJSON: any = null
  12. //
  13. // constructor() {
  14. // super()
  15. // }
  16. //
  17. // splats: any
  18. // private _ready = false
  19. // onAdded(viewer: ThreeViewer) {
  20. // super.onAdded(viewer)
  21. // createStyles(styles)
  22. // this.splats = new GaussianSplats3D.Viewer({
  23. // 'selfDrivenMode': false,
  24. // 'renderer': viewer.renderManager.webglRenderer,
  25. // 'camera': viewer.scene.mainCamera,
  26. // 'useBuiltInControls': false,
  27. // // 'ignoreDevicePixelRatio': false,
  28. // // 'gpuAcceleratedSort': true,
  29. // // 'halfPrecisionCovariancesOnGPU': true,
  30. // 'sharedMemoryForWorkers': false,
  31. // // 'integerBasedSort': false,
  32. // // 'dynamicScene': false,
  33. // // 'webXRMode': GaussianSplats3D.WebXRMode.None,
  34. // })
  35. // this.splats.init()
  36. // // this.splats.loadFile('https://generic-cors-proxy.repalash.workers.dev/https://zappar-xr.github.io/three-gaussian-splat-example/bonsai.5148b146.splat').then(()=>{
  37. // this.splats.addSplatScene('https://generic-cors-proxy.repalash.workers.dev/https://projects.markkellogg.org/threejs/assets/data/garden/garden_high.ksplat').then(()=>{
  38. // this._ready = true
  39. // })
  40. // }
  41. //
  42. // protected _viewerListeners = {
  43. // postFrame: (_: IViewerEvent) => {
  44. // if (!this._ready) return
  45. // console.log('postframe')
  46. // this.splats.update()
  47. // this.splats.render()
  48. // },
  49. // }
  50. // }