W
W
Wasya UK2018-05-18 16:59:50
JavaScript
Wasya UK, 2018-05-18 16:59:50

Why are Three.js examples not working?

I'm trying to run the three.js examples, but I get a simple page with an empty canvas. Created a local server on the node. The pages display normally, but the scenes themselves do not work. What could be the problem?

const express = require('express');
const app = express();

app.use(express.static('three.js-master/examples'));

app.get('/', (req, res) => {
  res.sendFile('three.js-master/examples/canvas_materials_normal.html', {root: __dirname});
});

app.listen(3000, () => { console.log(`Server work on port 3000...`); })

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
A person from Kazakhstan, 2018-05-18
@LenovoId

on the server run

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question