NEW YORK — Facebook has agreed to buy Oculus for $2 billion, betting that its virtual reality technology may be a new way for people to communicate, learn, or be entertained.
‘‘This is a long-term bet on the future of computing,’’ Facebook chief executive Mark Zuckerberg said Tuesday on a call with analysts. ‘‘I believe Oculus can be one of the platforms of the future.’’
Oculus makes the Oculus Rift, a virtual reality headset that gas received a lot of attention from video game developers, though it has yet to be released for consumers. The headsets cover a user’s eyes and create an immersive world that reacts to turning one’s head or moving back and forth.
Two Boston-area venture capital firms, Spark Capital and Matrix Partners, are among investors positioned to earn a windfall from the deal.
Matrix’s investment was led by Cambridge-based general partner Antonio Rodriguez, while Spark’s investment was led by Boston-based general partner Santo Politi.
Spark venture partner Nabeel Hyatt assisted.
Occulus has raised at least $91 million in venture capital in two funding rounds since mid-2013. Matrix and Spark took part in both funding rounds, and led the Series A round of $16 million.
Beyond games, Zuckerberg said, virtual reality headsets might someday be used to enjoy a courtside seat at a basketball game, study in a classroom, consult with a doctor, or shop in a virtual store. The technology also has social applications, he said.
‘‘Imagine sharing not just moments with friends online but entire experiences and adventures,’’ he said.
It is Facebook’s second big acquisition in as many months. Last month, the social network said it would pay $19 billion for the messaging startup WhatsApp, a deal that hasn’t closed.
Zuckerberg called Oculus a unique company with a lead on rivals. He said virtual reality technology is a computing platform unto itself, comparing it to personal computers, which revolutionized the world in the 1970s and 1980s, and mobile phones.
Facebook Inc. said the deal includes $400 million in cash and 23.1 million shares worth about $1.6 billion. Oculus employees are eligible for an additional $300 million if the company hits certain targets.
Zuckerberg said Facebook intends to let Oculus continue with its development plan but help with recruiting, marketing, infrastructure, and opening doors to new partnerships. He said he intends not to make a profit on hardware but instead make the product affordable and ubiquitous so Facebook could look at generating revenue from services, software, advertising, virtual goods, or other areas.
Facebook says Oculus has received more than 75,000 pre-orders for second-generation development kits for the headset at $350 apiece. The kits are to be shipped in July.