mirror of
https://github.com/diffusionstudio/lottie.git
synced 2026-09-14 13:40:33 +08:00
Add LICENSE file and update project metadata
- Introduced a LICENSE file with MIT licensing terms. - Renamed project from "lottie-experiments" to "text-to-lottie" in package.json. - Added license information to package.json. - Updated README.md to reflect project name change and improved usage instructions. - Revised SKILL.md to clarify the authoring process for Lottie files.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
Copyright (c) 2026 Diffusion Studio Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,12 +1,23 @@
|
||||
# lottie-experiments
|
||||
# Text-To-Lottie
|
||||
|
||||
A full-screen Lottie player built on **Skia CanvasKit (Skottie)**, with a
|
||||
This project includes a full-screen Lottie player built on **Skia CanvasKit (Skottie)**, with a
|
||||
React + shadcn/ui + TypeScript control surface. Built to **generate a Lottie
|
||||
animation with an LLM and watch it play live**: the agent writes
|
||||
`public/lottie.json`, the dev server hot-reloads it.
|
||||
|
||||
## Usage
|
||||
|
||||
Run
|
||||
```bash
|
||||
npx skills add diffusionstudio/lottie
|
||||
```
|
||||
|
||||
Then ask claude code/codex or any other agent supporting skills to generate an animation using `text-to-lottie`
|
||||
|
||||
## Getting started
|
||||
|
||||
Alternatively you can set up the repository manually
|
||||
|
||||
```bash
|
||||
npm install # also copies the CanvasKit wasm into /public (postinstall)
|
||||
npm run dev
|
||||
@@ -14,33 +25,6 @@ npm run dev
|
||||
|
||||
Then open the printed local URL.
|
||||
|
||||
## Generating an animation with an LLM
|
||||
|
||||
This is the intended workflow:
|
||||
|
||||
1. **Scaffold** a fresh project (optional — this repo already is one) with
|
||||
[degit](https://github.com/Rich-Harris/degit), which copies the repo as a
|
||||
clean starting point (no git history):
|
||||
```bash
|
||||
npx degit diffusionstudio/lottie my-animation
|
||||
cd my-animation
|
||||
npm install
|
||||
```
|
||||
2. **Run** `npm run dev`.
|
||||
3. **Point a coding agent at the repo.** It reads [`CLAUDE.md`](CLAUDE.md) and the
|
||||
[`write-lottie` skill](.claude/skills/write-lottie/SKILL.md), then writes a
|
||||
renderable Lottie to `public/lottie.json`. A Vite dev plugin
|
||||
([`vite.config.ts`](vite.config.ts)) watches that file and **full-reloads the
|
||||
page on save**, so the animation appears immediately.
|
||||
|
||||
## Swapping the animation manually
|
||||
|
||||
Replace [`public/lottie.json`](public/lottie.json) with any Lottie JSON; the dev
|
||||
server reloads it on save. Note that Skottie expects shape elements wrapped in a
|
||||
group (`"ty": "gr"` with an `it` array) — flat shape lists render blank. The
|
||||
[`write-lottie` skill](.claude/skills/write-lottie/SKILL.md) documents the full
|
||||
set of Skottie gotchas.
|
||||
|
||||
## CanvasKit wasm
|
||||
|
||||
The wasm binary is **not** committed; it is copied from
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "lottie-experiments",
|
||||
"name": "text-to-lottie",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -3,7 +3,7 @@ name: text-to-lottie
|
||||
description: Author a Lottie (Bodymovin) JSON animation that renders in a local skia player. Use whenever the user asks to create, generate, edit, or fix a Lottie animation, or asks for "an animation" to load.
|
||||
---
|
||||
|
||||
# Writing a renderable Lottie for this project
|
||||
# Authoring Renderable Lottie Files
|
||||
|
||||
This app renders Lottie with **Skia's Skottie** module (via `canvaskit-wasm`),
|
||||
not the JS `lottie-web` runtime. Follow the rules below and
|
||||
|
||||
Reference in New Issue
Block a user