Coder Social home page Coder Social logo

rossning92 / movy Goto Github PK

View Code? Open in Web Editor NEW
1.3K 1.3K 141.0 17.92 MB

movy.js is a client-side JS animation engine for creating explanatory videos.

Home Page: https://rossning92.github.io/movy/

License: MIT License

JavaScript 35.97% HTML 0.23% TypeScript 63.36% CSS 0.45%
animation animation-engine animations movy

movy's People

Contributors

aybcoo avatar rossning92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

movy's Issues

Module parse failed: Unexpected token (20:8) Failed to compile.

I tried to run it according to the README, but this exception was thrown:

ERROR in ...\npm\node_modules\movy\src\movy.ts 20:8
Module parse failed: Unexpected token (20:8)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import TextMesh from "./objects/TextMesh";
|
> declare class CCapture {
|   constructor(params: any);
| }

webpack 5.18.0 compiled with 1 error in 2654 ms
i 「wdm」: Failed to compile.

I am not familiar with JavaScript, hope to get help. :)

Are there any live examples to view?

I see there is an "examples" folder, but maybe it would be good to move those to a few CodePen demos, just to have something to link to from the repo without having to fork it and whatnot.

没法跑

按照文档操作,打开就是报错

控制台报了一个 BigInt的错误

SVG render

Hi,

Thanks for developing movyjs. Its a great software. Request your help regarding one thing.

I tried to use this code, for rendering svg files.

const key = mo.addImage('images/key.svg', {
x: 0.35,
y: 0.5,
z: 0.01,
scale: 6,
color: rainbowPalette[0],
ccw: false,
});

key.moveTo({
x: 5,
rz: -Math.PI * 4,
duration: 1,
ease: 'linear',
t: 0,
});

It executes for the svg files from your examples directory e.g. key.svg, logo-without-triangle.svg

However, it does not render any other svg files.

Both your svg files have this written in them:

Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)

Please let know whether movyjs onky supports Adobe Illustrator generated svg files.

Or, if anything can be done to render other files.

Thanks,

Linux端运行错误

在linux中编写movyjs程序后运行movy [file name],出现如下异常:

ℹ 「wds」: Project is running at http://localhost:42379/
ℹ 「wds」: webpack output is served from undefined
ℹ 「wds」: Content not from webpack is served from /usr/local/lib/node_modules/movy/public, /usr/local/lib/node_modules/movy/examples, /usr/local/lib/node_modules/movy/node_modules/ccapture.js/build, /home/goat
ℹ 「wdm」: wait until bundle finished: /
✖ 「wdm」: 3 assets
37 modules

ERROR in ./movy_test.js 1:0-27
Module not found: Error: Can't resolve 'ts-loader' in '/home/goat'

webpack 5.64.0 compiled with 1 error in 1960 ms
ℹ 「wdm」: Failed to compile.

Some symbols won't display correctly

I ran the hello-world according to the README on the OS X platform, but what the browsers displayed was movy.js is simple?, instead of movy.js is simple!.

After a few tries I found some common symbols like: !`_ and other symbols like: ∏π will be displayed as ?.

Both my editor(VS Code 1.52.1) and browsers (Chrome 88.0.4324.96 and Safari 14.0.2) are encoding=UTF-8.

Compiled with problems of ts-loader

as you could see in the shell output below, when i run movy test.js it show me like that. please check it out.

problems

pic

[impressionyang@impressionyang-pc test002]$ movy test.js 
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.100.131:8080/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::f5cd:7b:e35c:4407]:8080/
<i> [webpack-dev-server] Content not from webpack is served from '/usr/lib/node_modules/movy/dist, /usr/lib/node_modules/movy/examples, /usr/lib/node_modules/movy/node_modules/ccapture.js/build, /usr/lib/node_modules/movy/node_modules/mathjax/es5, /home/impressionyang/workspace/movy/test002/test, /home/impressionyang/workspace/movy/test002' directory
3 assets
36 modules

ERROR in ./test.js 1:0-27
Module not found: Error: Can't resolve 'ts-loader' in '/home/impressionyang/workspace/movy/test002'

webpack 5.68.0 compiled with 1 error in 381 ms

/examples/prime-numbers.js 感觉不太对的样子

import * as mo from "movy";

const gridSize = [21, 12];

mo.enableMotionBlur();

let n = 1;
for (let i = 1; i < gridSize[1]; i++) {
    for (let j = 1; j < gridSize[0]; j++) {
        const prime = isPrime(n);
        const position = [j, -i];

        mo.addText(n.toString(), {
            position: position.concat([0]),
            scale: 0.3,
            color: "white",
        });

        mo.addRectOutline({ position, lineWidth: 0.03 });

        if (prime) {
            mo.addRect({ position: position.concat([0.01]), color: "#fad390" }).grow2({
                t: "<0.1",
            });
            mo.addText(n.toString(), {
                position: position.concat([0.02]),
                scale: 0.3,
                color: "black"
            }).grow2({
                t: "<0.1",
            });
        }

        n++;
    }
}

mo.cameraMoveTo({ position: [3, -3, 5], rx: 0.2, duration: 0, t: 0 });
mo.cameraMoveTo({
    position: [gridSize[0] * 0.5, -gridSize[1] * 0.5, 10],
    rx: 0,
    t: "<",
    duration: 10,
});

mo.run();

function isPrime(num) {
    for (let i = 2, s = Math.sqrt(num); i <= s; i++)
        if (num % i === 0) return false;
    return num > 1;
}

改成这样?不然一开始不会显示质数,有点水(

Is it possible to add charts with animation

Hi Rossning92,

This is a great framework, I’m not sure if my idea can be realized, Is it possible to add charts with animation.
I hope to get your advice or help.

Best Regards
Kevin

imcompatible with npx

when use movy as a local module instead of global modules, __dirname points to the path of movy instead of the project,it cause movy can't be found.
These following __dirname in webpack.config.js should use process.cwd () instead to make it works.

- path.resolve(__dirname, "node_modules/ccapture.js/build"),
+ path.resolve(process.cwd(), "node_modules/ccapture.js/build"),

- path.resolve(__dirname, "node_modules"),
+ path.resolve(process.cwd(), "node_modules"),

- loader: path.resolve(__dirname, "node_modules/ts-loader"),
+ loader: path.resolve(process.cwd(), "node_modules/ts-loader"),

字体显示问题

如图所示
图片
代码:

import * as mo from "movy";

let text = mo.addText("如图所示", {
    y: 0,
}).fadeIn();

另外Movy会支持自定义字体吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.