How to use THREE.Water2?

Hello! I’m trying to generate a flowmap with Three.js: https://threejs.org/examples/#webgl_water_flowmap

I’ve used parts of the code source indicated here: https://github.com/mrdoob/three.js/blob/159a40648ee86755220491d4f0bae202235a341c/examples/webgl_water_flowmap.html but nothing appears on my page: https://flowmaptest-site.superhi.com/

I’ve used parts of the code source indicated here: https://github.com/mrdoob/three.js/blob/159a40648ee86755220491d4f0bae202235a341c/examples/webgl_water_flowmap.html

but nothing appears on my test page: https://flowmaptest-site.superhi.com/

I would be super grateful if someone could help me :slight_smile:

/cc

1 Like

Thank you Mugen! I’ve been trying to add the REflector - but it doesn’t work… I added the code in my sheet53

I’ve provided you a live example with your code at stackoverflow. Please avoid crossposting when you see that a user (like me) is active on both sites (forum and stackoverflow).

makes sense! sorry about that and thank you for your help!!

May I ask what’s the problem with “TypeError: scope.material.uniforms is undefined” when using ‘Water2.js’ ?Thanks for any helps!

I’m not aware of any runtime errors regarding Water2. Can you please share your code as a live example that shows what you are doing?

Thanks for your reply! I’m just making water with flowMap like the example, and before I write “var water=new Water(…);” it shows such error above.Now,I change for"var water=new THREE.Water(…);", it shows the error"TypeError:THREE.Water is not a constructor". I dont know how to go,and I’m sorry I’m new in three.js.

Please share your code as a GitHub repo.