The root instance where you instantiate a three-musketeers
application by invoking the
function.
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
|