@@ -6,6 +6,7 @@ import { get_required } from "./utility.ts";
66import { AbstractSceneElement } from "./elements/AbstractSceneElement.ts" ;
77import { ArrowsElement } from "./elements/ArrowsElement.ts" ;
88import { PointsElement } from "./elements/PointsElement.ts" ;
9+ import { SurfaceBaseElement } from "./elements/SurfaceBaseElement.ts" ;
910import { SurfaceLatheElement } from "./elements/SurfaceLatheElement.ts" ;
1011import { SurfacePlaneElement } from "./elements/SurfacePlaneElement.ts" ;
1112import { WIPXYElement } from "./elements/WIPXYElement.ts" ;
@@ -124,7 +125,7 @@ export class TLMScene {
124125 // Call a function on all elements of the scene graph matching a given
125126 // subtype of AbstractSceneElement
126127 public updateElements < T extends AbstractSceneElement > (
127- type : new ( ... args : any [ ] ) => T ,
128+ type : Function & { prototype : T } ,
128129 f : ( group : THREE . Group , element : T ) => void
129130 ) : void {
130131 this . sceneGraph . traverse ( ( child : THREE . Object3D ) => {
@@ -179,8 +180,8 @@ export class TLMScene {
179180
180181 public setSurfacesColor ( color : THREE . Color ) : void {
181182 this . updateElements (
182- SurfaceLatheElement ,
183- ( group : THREE . Group , element : SurfaceLatheElement ) => {
183+ SurfaceBaseElement ,
184+ ( group : THREE . Group , element : SurfaceBaseElement ) => {
184185 element . setColor ( group , color ) ;
185186 }
186187 ) ;
0 commit comments