How to use the buffer function from bindings
Find comprehensive JavaScript bindings.buffer code examples handpicked from public code repositorys.
GitHub: hydra2s/vulkan.node.js
35 36 37 38 39 40 41 42 43 44 45
SharedArrayBuffer.prototype.address = function () { return native.nativeAddress(this); } DataView.prototype.address = function () { return (native.nativeAddress(this.buffer) + BigInt(this.byteOffset)); } Float16Array.prototype.address = function () { return (this.buffer.address() + BigInt(this.byteOffset)); } // Buffer.fromAddress = native.buffer; ArrayBuffer.fromAddress = native.arrayBuffer; SharedArrayBuffer.fromAddress = native.arrayBuffer; ArrayBuffer.prototype.set = function(typed) { new Uint8Array(this, 0, typed.byteLength).set( new Uint8Array(typed.buffer || typed, typed.byteOffset||0, typed.byteLength) ); }; SharedArrayBuffer.prototype.set = function(typed) { new Uint8Array(this, 0, typed.byteLength).set( new Uint8Array(typed.buffer || typed, typed.byteOffset||0, typed.byteLength) ); };
0
10
2
+ 8 other calls in file
bindings.createKey is the most popular function in bindings (8616 examples)