6/23

日記

2025/06/23

Particleにて、OrbitControlで上下に移動して、

これスクロールと連動するだけでかなり良さそうに思えた。

DepthBuffer<深度バッファ>とは

新しいオブジェクトを描画する際、すでにあるオブジェクトと深度値を比較し、より手前のものを描画する仕組みで、

作られたオブジェクトは深度バッファに登録される感じ?かな

奥の方はレンダリングしないでくださいという。

BufferGeometryの使い方が課題だと思う

geometry = new THREE.BufferGeometry()

// create vertices

// create colors

geometry.setAttribute("position/ color", new THREE.Float32BufferAttribute(vertices/colors, SIZE))

material = new ...Material({vertexColors: true // if create colors})

const mesh = ...(geometry,material)