non important commit
This commit is contained in:
parent
6d517609de
commit
e01a84c36f
12 changed files with 101 additions and 11 deletions
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
NAME=$1
|
||||||
|
|
||||||
|
sed -i "s/project_name/$NAME/g" package.json
|
||||||
|
npm install
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "project_name",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.0",
|
||||||
|
"scripts": {
|
||||||
|
"start": "vite",
|
||||||
|
"serve": "vite",
|
||||||
|
"build": "tsc && vite build"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@motion-canvas/core": "^3.17.2",
|
||||||
|
"@motion-canvas/2d": "^3.17.2",
|
||||||
|
"@motion-canvas/ffmpeg": "^1.1.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@motion-canvas/ui": "^3.17.2",
|
||||||
|
"@motion-canvas/vite-plugin": "^3.17.2",
|
||||||
|
"typescript": "^5.2.2",
|
||||||
|
"vite": "^4.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
home/modules/create-project/project-blueprints/animation/src/motion-canvas.d.ts
vendored
Normal file
1
home/modules/create-project/project-blueprints/animation/src/motion-canvas.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/// <reference types="@motion-canvas/core/project" />
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import {makeProject} from '@motion-canvas/core';
|
||||||
|
|
||||||
|
import example from './scenes/example?scene';
|
||||||
|
|
||||||
|
export default makeProject({
|
||||||
|
scenes: [example],
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
import {Circle, makeScene2D} from '@motion-canvas/2d';
|
||||||
|
import {createRef} from '@motion-canvas/core';
|
||||||
|
|
||||||
|
export default makeScene2D(function* (view) {
|
||||||
|
// Create your animations here
|
||||||
|
|
||||||
|
const circle = createRef<Circle>();
|
||||||
|
|
||||||
|
view.add(<Circle ref={circle} size={320} fill={'lightseagreen'} />);
|
||||||
|
|
||||||
|
yield* circle().scale(2, 2).to(1, 2);
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"extends": "@motion-canvas/2d/tsconfig.project.json",
|
||||||
|
"include": ["src"]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import {defineConfig} from 'vite';
|
||||||
|
import motionCanvas from '@motion-canvas/vite-plugin';
|
||||||
|
import ffmpeg from '@motion-canvas/ffmpeg';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [
|
||||||
|
motionCanvas(),
|
||||||
|
ffmpeg(),
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
@ -16,4 +16,8 @@ namespace $1
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|
||||||
echo "$program" >>Program.cs
|
echo "$program" >Program.cs
|
||||||
|
|
||||||
|
nix develop . --command bash -c "dotnet restore --use-lock-file"
|
||||||
|
|
||||||
|
nix run nixpkgs#nuget-to-nix -- ./packages.lock.json >deps.nix
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
sed -i -e "s/change_this/$1/g" flake.nix
|
sed -i -e "s/change_this/$1/g" flake.nix
|
||||||
|
|
|
||||||
|
|
@ -3,20 +3,29 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
};
|
};
|
||||||
outputs = {nixpkgs, ...} @ inputs: let
|
outputs = {nixpkgs, ...}: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
|
pythonEnv = pkgs.python3.withPackages (python-pkgs: [
|
||||||
|
python-pkgs.numpy
|
||||||
|
python-pkgs.pandas
|
||||||
|
]);
|
||||||
in {
|
in {
|
||||||
|
packages."${system}" = {
|
||||||
|
default = pkgs.writeShellApplication {
|
||||||
|
name = "my-app";
|
||||||
|
runtimeInputs = [pythonEnv];
|
||||||
|
text = ''
|
||||||
|
python ${./main.py} "$@"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
devShells."${system}" = {
|
devShells."${system}" = {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = [
|
packages = [pythonEnv];
|
||||||
(pkgs.python3.withPackages (python-pkgs: [
|
|
||||||
python-pkgs.numpy
|
|
||||||
python-pkgs.pandas
|
|
||||||
]))
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -13,13 +13,27 @@
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system overlays;
|
inherit system overlays;
|
||||||
};
|
};
|
||||||
|
rustToolchain = pkgs.rust-bin.stable.latest.default;
|
||||||
|
rustPlatform = pkgs.makeRustPlatform {
|
||||||
|
cargo = rustToolchain;
|
||||||
|
rustc = rustToolchain;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
|
packages."${system}" = {
|
||||||
|
default = rustPlatform.buildRustPackage {
|
||||||
|
pname = "change_this";
|
||||||
|
version = "0.1.0";
|
||||||
|
src = ./.;
|
||||||
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
devShells."${system}" = {
|
devShells."${system}" = {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
gcc
|
gcc
|
||||||
gnumake
|
gnumake
|
||||||
rust-bin.stable.latest.default
|
rustToolchain
|
||||||
evcxr
|
evcxr
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,6 @@
|
||||||
nix develop . --command bash -c "cargo new $1"
|
nix develop . --command bash -c "cargo new $1"
|
||||||
|
|
||||||
cp -r "$1"/* .
|
cp -r "$1"/* .
|
||||||
|
|
||||||
rm -fr "$1"
|
rm -fr "$1"
|
||||||
|
|
||||||
|
sed -i -e "s/change_this/$1/g" flake.nix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue