Skip to content

Commit

Permalink
Fix for splat loadinh (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
slimbuck authored Oct 23, 2023
1 parent 8292d76 commit c9fcc31
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/splat/splat-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class SplatResource extends ContainerResource {
materials: Material[] = [];
textures: Texture[] = [];

handle: any;

constructor(device: GraphicsDevice, splatData: SplatData) {
super();

Expand All @@ -42,7 +44,7 @@ class SplatResource extends ContainerResource {
}

destroy() {

this.handle.off();
}

instantiateModelEntity(/* options: any */): Entity {
Expand Down Expand Up @@ -92,7 +94,7 @@ class SplatResource extends ContainerResource {

const viewport = [0, 0];

options.app.on('prerender', () => {
this.handle = options.app.on('prerender', () => {
const cameraMat = options.camera.getWorldTransform();
cameraMat.getTranslation(pos);
cameraMat.getZ(dir);
Expand Down

0 comments on commit c9fcc31

Please sign in to comment.