prototype/general/index.js
// shows how to get a buffer and convert it to an image
shows how to get a buffer and convert it to an image
shows how to get a buffer and convert it to an image
function initBlob() {
  loadResource('models/AnimatedCube_MetallicRoughness.png', 'arrayBuffer')
    .then((buffer) => {
      const blob = new Blob([buffer], { type: 'img/png' });
      console.log(blob);
    })
}
function initBlob ( ) { loadResource ( 'models/AnimatedCube_MetallicRoughness.png' , 'arrayBuffer' ) . then ( ( buffer ) => { const blob = new Blob ( [ buffer ] , { type : 'img/png' } ) ; console . log ( blob ) ; } ) }
shows how to get a buffer and convert it to an image
shows how to get a buffer and convert it to an image