Skip to content

Commit

Permalink
fix: Splat remove unused vars, storybook cam fix (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
vis-prime authored Dec 5, 2023
1 parent 9ace203 commit b9d0dfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .storybook/stories/Splat.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ export const SplatStory = async () => {

const controls = new OrbitControls(camera, renderer.domElement)
controls.target.set(0, 1, 0)
camera.position.set(10, 10, 10)
controls.update()

scene.background = new THREE.Color('white')

camera.position.set(10, 10, 10)

loadSplats(renderer, camera, scene)
}

Expand Down
11 changes: 1 addition & 10 deletions src/core/Splat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -616,14 +616,9 @@ function pushDataBuffer(shared: SharedState, buffer: ArrayBufferLike, vertexCoun
}

export class Splat extends THREE.Mesh {
camera: THREE.Camera
shared: any
alphaHash: boolean
constructor(shared: any, camera: THREE.Camera, { toneMapped = false, alphaTest = 0, alphaHash = false } = {}) {
super()
this.shared = shared
this.camera = camera
this.alphaHash = alphaHash

this.frustumCulled = false
this.onBeforeRender = () => shared.update(this, camera, alphaHash)
this.material = new SplatMaterial()
Expand All @@ -641,8 +636,4 @@ export class Splat extends THREE.Mesh {
})
shared.connect(this)
}

splatUpdate() {
this.shared.update(this, this.camera, this.alphaHash)
}
}

0 comments on commit b9d0dfa

Please sign in to comment.