michaltakac / aframe-next-static

Build WebVR apps with React and serve them as static site on Zeit's Now!

Home Page:https://aframe-next-static.now.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aframe-next-static

Deploy to now

This boilerplate leverages extremely simple deployment flow from Zeit's Now, now available for WebVR with A-Frame and React!

Libraries

Installation

To get started:

npm install # or yarn install
npm run dev

Development server now lives at http://localhost:3000.

This project uses static exporting feature from Next.js. If you wan't to build a Multiverse of multiple "pages" or "routes" (or should I say worlds?) and navigate through them, you need to provide a map of the routes in next.config.js. Read more info here.

Note: Next.js is universal, which means it executes code first server-side, then client-side. The window object is only present client-side, so if you absolutely need to have access to it in some React component, you should put that code in componentDidMount. Check the /pages/index.js how we're doing it right now. You can load A-Frame-specific librabries like that. More info here.

Deploy with ▲Now:

npm run deploy

About

Build WebVR apps with React and serve them as static site on Zeit's Now!

https://aframe-next-static.now.sh

License:MIT License


Languages

Language:JavaScript 100.0%