command case nodesSetAutoFade(ids: [String], maxDistance: CGFloat) case nodesSetVisibility(showIds: [String]?, hideIds: [String]?) case materialSetProperties( id: String, material: String, properties: ARViewer.Model.MaterialProperties ) // automatically bridges JS <-> Swift and provided as fully typed enum switch (command) { case let .materialSetProperties(id, materialName, properties): by @merowing_ 37