Polygonjs comes with a **javascript api**, which allows you to extend it.

2 common ways to extend it would be:

-   by creating plugins
-   by adding controls to update the scene once added to your scene.

## Common usage

The most common use of the api is to update node parameters. Here is an example:

```ts
// import and mount the scene
import {fetchSceneAndMount_scene_01} from './polygonjs/scenes/scene_01/autogenerated/fetchSceneAndMount';
const loadedData = await fetchSceneAndMount_scene_01({
	domElement: 'app',
});
const {scene} = loadedData;
// get a node
const node = scene.node('/grid/planeHelper1');
// access a parameter with .p and set the value
node.p.size.set(0.5);
```

You can then update the parameters based on any user action or event.

## Classes List

Here is the list of documented classes.

### Scene

-   [PolyScene](/docs/api/PolyScene)

### Viewers

-   [TypedViewer](/docs/api/TypedViewer)
-   [ThreejsViewer](/docs/api/ThreejsViewer)

### Nodes

-   [TypedNode](/docs/api/TypedNode)
-   [TypedAnimNode](/docs/api/TypedAnimNode)
-   [TypedAudioNode](/docs/api/TypedAudioNode)
-   [TypedCopNode](/docs/api/TypedCopNode)
-   [TypedEventNode](/docs/api/TypedEventNode)
-   [TypedGlNode](/docs/api/TypedGlNode)
-   [TypedJsNode](/docs/api/TypedJsNode)
-   [TypedMatNode](/docs/api/TypedMatNode)
-   [TypedObjNode](/docs/api/TypedObjNode)
-   [TypedPostNode](/docs/api/TypedPostNode)
-   [TypedRopNode](/docs/api/TypedRopNode)
-   [TypedSopNode](/docs/api/TypedSopNode)

### Core

-   [CoreGraphNode](/docs/api/CoreGraphNode)
