manim-mobject-svg


Namemanim-mobject-svg JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/naveen521kk/manim-mobject-svg
SummaryCreate SVG files from VMobject and VGroup in Manim
upload_time2024-01-01 17:28:01
maintainer
docs_urlNone
authorNaveen M K
requires_python>=3.9,<3.13
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # manim-mobject-svg

Create SVG files from [VMobject](https://docs.manim.community/en/stable/reference/manim.mobject.types.vectorized_mobject.VMobject.html) and [VGroup](https://docs.manim.community/en/stable/reference/manim.mobject.types.vectorized_mobject.VGroup.html).

Install: `pip install manim-mobject-svg`

Here's an example of how to use this plugin:

```python
from manim import *
from manim_mobject_svg import *

a = Square(color=BLUE)
a.to_svg("square.svg")
```
This should create a file `square.svg` in the current directory and return the path to the file. The output should look like this:

![svg square manim](https://github.com/naveen521kk/manim-mobject-svg/assets/49693820/ba232f4c-7a11-4d6f-b36e-7c49867bc6a8)

It's also possible to create a SVG file for VGroup.

```python
from manim import *
from manim_mobject_svg import *

a = Square(color=BLUE)
b = Circle(color=RED)
c = VGroup(a, b)
c.to_svg("group.svg")
```
It'll create a SVG file like this:

![svg vgroup manim](https://github.com/naveen521kk/manim-mobject-svg/assets/49693820/4073c65f-0397-450a-90d6-6a2226dade15)

## Parameters for `to_svg()`

`to_svg()` takes the following parameters:
- `path`: Path to the SVG file to be created. If not specified, it'll create a temporary file and return the path to the file.
- `crop`: Crop the SVG file to the bounding box of the VMobject. Default: `True`
- `padding`: Padding around the VMobject. Default: `0.5`

This method returns the path to the SVG file.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/naveen521kk/manim-mobject-svg",
    "name": "manim-mobject-svg",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<3.13",
    "maintainer_email": "",
    "keywords": "",
    "author": "Naveen M K",
    "author_email": "naveen521kk@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bb/01/06838a75caf675b8c098152270437d173d4448b4ce4cde61e8c738535c36/manim_mobject_svg-0.5.0.tar.gz",
    "platform": null,
    "description": "# manim-mobject-svg\n\nCreate SVG files from [VMobject](https://docs.manim.community/en/stable/reference/manim.mobject.types.vectorized_mobject.VMobject.html) and [VGroup](https://docs.manim.community/en/stable/reference/manim.mobject.types.vectorized_mobject.VGroup.html).\n\nInstall: `pip install manim-mobject-svg`\n\nHere's an example of how to use this plugin:\n\n```python\nfrom manim import *\nfrom manim_mobject_svg import *\n\na = Square(color=BLUE)\na.to_svg(\"square.svg\")\n```\nThis should create a file `square.svg` in the current directory and return the path to the file. The output should look like this:\n\n![svg square manim](https://github.com/naveen521kk/manim-mobject-svg/assets/49693820/ba232f4c-7a11-4d6f-b36e-7c49867bc6a8)\n\nIt's also possible to create a SVG file for VGroup.\n\n```python\nfrom manim import *\nfrom manim_mobject_svg import *\n\na = Square(color=BLUE)\nb = Circle(color=RED)\nc = VGroup(a, b)\nc.to_svg(\"group.svg\")\n```\nIt'll create a SVG file like this:\n\n![svg vgroup manim](https://github.com/naveen521kk/manim-mobject-svg/assets/49693820/4073c65f-0397-450a-90d6-6a2226dade15)\n\n## Parameters for `to_svg()`\n\n`to_svg()` takes the following parameters:\n- `path`: Path to the SVG file to be created. If not specified, it'll create a temporary file and return the path to the file.\n- `crop`: Crop the SVG file to the bounding box of the VMobject. Default: `True`\n- `padding`: Padding around the VMobject. Default: `0.5`\n\nThis method returns the path to the SVG file.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Create SVG files from VMobject and VGroup in Manim",
    "version": "0.5.0",
    "project_urls": {
        "Homepage": "https://github.com/naveen521kk/manim-mobject-svg",
        "Repository": "https://github.com/naveen521kk/manim-mobject-svg"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ee17c4a230900c5c130244bda851ed2711d5fc5507bdd36a775e73e8c40a9afe",
                "md5": "22b214b008843a764012cbc643e4be99",
                "sha256": "8f6403d0cb528a98f2c0678b3733edf7f24585b5f4a821baf9186162c1196d69"
            },
            "downloads": -1,
            "filename": "manim_mobject_svg-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "22b214b008843a764012cbc643e4be99",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<3.13",
            "size": 5267,
            "upload_time": "2024-01-01T17:27:59",
            "upload_time_iso_8601": "2024-01-01T17:27:59.749054Z",
            "url": "https://files.pythonhosted.org/packages/ee/17/c4a230900c5c130244bda851ed2711d5fc5507bdd36a775e73e8c40a9afe/manim_mobject_svg-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb0106838a75caf675b8c098152270437d173d4448b4ce4cde61e8c738535c36",
                "md5": "b653e3db17d4ca7e96beade431a06e82",
                "sha256": "f8a8c21917e30ad1798c6a48290c0c2787dcb976b7b59ceb3e4a75f7a2e97fd5"
            },
            "downloads": -1,
            "filename": "manim_mobject_svg-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b653e3db17d4ca7e96beade431a06e82",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<3.13",
            "size": 4238,
            "upload_time": "2024-01-01T17:28:01",
            "upload_time_iso_8601": "2024-01-01T17:28:01.403161Z",
            "url": "https://files.pythonhosted.org/packages/bb/01/06838a75caf675b8c098152270437d173d4448b4ce4cde61e8c738535c36/manim_mobject_svg-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-01 17:28:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "naveen521kk",
    "github_project": "manim-mobject-svg",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "manim-mobject-svg"
}
        
Elapsed time: 3.58616s