How to use the async-preloader.default function in async-preloader

To help you get started, we’ve selected a few async-preloader examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dmnsgn / primitive-geometry / demo / index.js View on Github external
const Primitives = require("../");
const AsyncPreloader = require("async-preloader").default;
const createCamera = require("perspective-camera");
const createOrbitControls = require("orbit-controls");
const dat = require("dat.gui");
const triangulate = require("geom-triangulate");

const createMesh = require("./mesh.js");
const regl = require("./context.js");

// Setup
const camera = createCamera({
  fov: Math.PI / 4,
  near: 0.1,
  far: 100,
  viewport: [0, 0, window.innerWidth, window.innerHeight]
});
const controls = createOrbitControls({

async-preloader

Assets preloader using async/await and fetch for usage both in the browser and Node.js.

MIT
Latest version published 4 months ago

Package Health Score

62 / 100
Full package analysis