packages/docs/blog/2023-05-29-version-3.9.0.mdx
import IssueGroup from '@site/src/components/Release/IssueGroup'; import Issue from '@site/src/components/Release/Issue'; import PullRequest from '@site/src/components/Release/PullRequest'; import Link from '@docusaurus/Link'; import CodeBlock from '@theme/CodeBlock';
<IssueGroup type={'feat'}>
<Issue user={'aarthificial'} pr={710}>
All entities are now imported from the main entry point of each package. The
only exception is the <code>CodeBlock</code> node which still requires the
full import path:
<CodeBlock language={'ts'} className="margin-top--sm margin-bottom--sm">
{import {all, createRef} from '@motion-canvas/core'; import {makeScene2D, Circle} from '@motion-canvas/2d'; // the only exception: import {CodeBlock, insert} from '@motion-canvas/2d/lib/components/CodeBlock';}
</CodeBlock>
Importing from subdirectories will continue to work until version 4.
<PullRequest id={721} />
</Issue>
<Issue user={'aarthificial'} pr={723}>
New{' '}
<Link to="/api/core/plugin/Plugin#presenter">
<code>presenter</code>
</Link>{' '}
and{' '}
<Link to="/api/core/plugin/Plugin#renderer">
<code>renderer</code>
</Link>{' '}
plugin hooks.
You can learn how to create your own plugins in the new{' '}
<Link to="/docs/plugins">Authoring Plugins</Link> guide.
(see{' '}
<Link to="https://developer.mozilla.org/en-US/docs/Web/API/EyeDropper_API#browser_compatibility">
browser compatibility
</Link>
)