instance

The root instance where you instantiate a three-musketeers application by invoking the function.

Source:
Example
// there are several ways to instantiate the musketeers tool

import musketeers from 'three-musketeers';

// you can pass in all necessary resources at initialization
const $$$ = musketeers({
  renderer, // THREE renderer instance
  scene, // THREE scene instance
  camera // THREE camera instance
});

// you can also just instantiate and set later throughout the application
const $$$ = musketeers();
$$$.setResource('camera', camera); // THREE camera instance
// see `setResource` for further documentation

// If no camera is specified, the default camera attached the `scene` will be set
const $$$ = musketeers({
  renderer, // THREE renderer instance
  scene, // THREE scene instance
});
$$$.getResource('camera'); // returns the camera that's attached to the `scene`
Parameters:
Name Type Attributes Description
config object <optional>

The THREE.js application resources for introspection.

Properties
Name Type Attributes Description
camera camera <optional>

THREE.js camera instance. If not provided, the one attached to the scene will automatically be used.

renderer renderer

THREE.js renderer instance.

scene scene

THREE.js scene instance.