This paper presents a software architecture for a collaborative virtual environment (CVE) for simulation and visualisation based on the Functional Mock-up Interface (FMI) for co-simulation and web technologies. FMI has been chosen in order to have a standardised and independent interface to models created in different modelling tools.The user interface has been implemented using web technologies, which enables a very high degree of flexibility. The Web Graphics Library (WebGL) is used for interactive 3D visualisations, enabling native cross-platform rendering directly in the browser without the need of installing any additional plug-ins. Employing the bidirectional communication capabilities of the WebSocket protocol, multiple users can interact with the same simulation models simultaneously.A software prototype has been developed in order to demonstrate the applicability of the proposed architecture. As a case study, we have considered virtual prototyping of marine cranes, to illustrate the use on real world problems.