Reputation: 126
I need to make a 3D map from heightmap image in React and I came across this website which has a decent demo I wanted to implement in my application as a beginning.
The very problem of this example is that the ShaderTerrain property is completely missing (at least in my application). Am I missing an import? Here is the error I am getting:
Failed to compile.
./src/App.js
Attempted import error: 'ShaderTerrain' is not exported from 'three' (imported as 'THREE').
Upvotes: 2
Views: 185
Reputation: 31026
The tutorial you have linked is many years old. The respective demo uses three.js
in version r49
. The current release is r115
. In the past, ShaderTerrain
was first renamed to TerrainShader
and later removed with release r112
.
However, you can move back in time with this URL and copy the code to your project.
Upvotes: 2