Guys, back again with some thin instances stuff!
I thought about creating a mandelbrot visualization but it was painfully slow on the CPU. So I’ve created a 3D terminal window with rastered fonts.
Check out the PG:
https://playground.babylonjs.com/#5PHDKG#86
So there is only one step left to create a BabylonJS 3D Asciinema player Anyone interested in doing it?
Have a great day/night!
R.
EDIT: Guys, we can gain much more performance by not setting the thin instances buffer again and again as I did it originally, but we can call thinInstancesBufferUpdate()
. We can use the thinInstancesPartailBufferUpdate
to be even more faster. The only change in code is:
drawChar(char: string, x: number, y: number) {
const segmentData = this._charmap.get(char)
if (!segmentData) {
return
}
this.updateSegment(x, y, segmentData)
added -> this._prefabMesh.thinInstanceBufferUpdated("color")
removed -> // this.setThins(false, true)
}