export class Buffer { private cursor = 0 ; private buffer : ArrayBuffer ; private bindingPoint : number ; private i32 : Int32Array ; private f32 : Float32Array ; constructor ( bindingPoint , length ) { this . buffer = new ArrayBuffer ( length * 4 ) ; this . i32 = new Int32Array ( this . buffer ) ; this . f32 = new Float32Array ( this . buffer ) ; this . bindingPoint = bindingPoint ; } protected appendF ( n ) { this . f32 [ this . cursor ++ ] = n ; } protected appendI ( n ) { this . i32 [ this . cursor ++ ] = n ; } protected pad ( n ) { this . cursor += n ; } }