三。
我正在尝试通过三个示例对象“ water2”来创建水面。
这是对象的演示: https://threejs.org/examples/?q=water#weater#webgl_water
i使用此代码来创建水面,该水面直接从演示代码:
const waterGeometry = new THREE.PlaneGeometry( 16, 16 );
water = new Water( waterGeometry, {
color: '#aabbcc',
scale: 4,
flowDirection: new THREE.Vector2( 1, 1 ),
textureWidth: 1024,
textureHeight: 1024
} );
water.position.z = 0.1;
scene.add( water );
水面渲染(如左图中看到);但是,水面在右图上的演示场景中不透明。这里有什么问题?我检查了演示,那里没有其他与水面相互作用的。尽管代码是1:1的副本,但它如何在我自己的实现中显示出如此不同的显示?
I'm trying to create a water surface via the three.js example object "water2".
This is a demo of the object:
https://threejs.org/examples/?q=water#webgl_water
I use this code to create the water surface, which is taken directly from the demo code:
const waterGeometry = new THREE.PlaneGeometry( 16, 16 );
water = new Water( waterGeometry, {
color: '#aabbcc',
scale: 4,
flowDirection: new THREE.Vector2( 1, 1 ),
textureWidth: 1024,
textureHeight: 1024
} );
water.position.z = 0.1;
scene.add( water );
The water plane renders (as you can see in the left image); However the water surface is not transparent like in the demo scene on the right image. What could be the issue here? I checked the demo and there is nothing else there that interacts with the water plane. How is it possible it displays so differently on my own implementation, despite code being a 1:1 copy?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论