Skip to content

Commit

Permalink
Minor updates for new threejs version
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardMoyse committed Nov 14, 2024
1 parent 473af87 commit 6fb88e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion packages/phoenix-event-display/src/loaders/objects/tracks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ export class TracksMaterial extends ShaderMaterial {
/** If the material is of track. */
isTracksMaterial: boolean;

static get type() {
return 'TracksMaterial';
}

/**
* Create the tracks material.
* @param params Params for creating the tracks material.
Expand All @@ -248,7 +252,6 @@ export class TracksMaterial extends ShaderMaterial {
fragmentShader: tracks_vert,
});
this.isTracksMaterial = true;
this.type = 'TracksMaterial';

Object.defineProperties(this, {
lineWidth: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,21 +162,21 @@ export class ControlsManager {
* @returns Currently active camera.
*/
getActiveCamera(): Camera {
return this.activeControls.object;
return this.activeControls.object as Camera;
}
/**
* Get the main camera.
* @returns Main camera.
*/
getMainCamera(): Camera {
return this.mainControls.object;
return this.mainControls.object as Camera;
}
/**
* Get the camera for overlay.
* @returns The camera for overlay.
*/
getOverlayCamera(): Camera {
return this.overlayControls.object;
return this.overlayControls.object as Camera;
}
/**
* Get the main and overlay cameras.
Expand Down

0 comments on commit 6fb88e1

Please sign in to comment.