rossning92 / movy Goto Github PK
View Code? Open in Web Editor NEWmovy.js is a client-side JS animation engine for creating explanatory videos.
Home Page: https://rossning92.github.io/movy/
License: MIT License
movy.js is a client-side JS animation engine for creating explanatory videos.
Home Page: https://rossning92.github.io/movy/
License: MIT License
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. :)
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的错误
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,
as stated above.
thanks in advance. 😎
如标题所说
浏览器:108.0.5359.124 (正式版本) (arm64)
movy:0.0.17
使用实例文件,点击render无效
在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.
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.
➜ movy hello.js
env: node\r: No such file or directory
as you could see in the shell output below, when i run movy test.js
it show me like that. please check it out.
[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
抓取论坛标题的时候,报错
UnhandledPromiseRejectionWarning: TimeoutError: Navigation timeout of 30000 ms exceeded
在console里测试selector是正确的。。求助
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;
}
改成这样?不然一开始不会显示质数,有点水(
Will movy.js add a button in controls to easier replay the 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
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"),
不过,我手动把 txt 改成 webm 后,可以正常播放
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.