Coder Social home page Coder Social logo

dawntools's Introduction

dawntools

dawntools 是基于 Nextjs 开发的一系列常用工具集合网站,主要是方便自己平日使用,也是作为练习使用 React 的一个项目。

环境变量、端口号

开发环境默认端口号是 10001, 在 .env 文件中定义的,若需自定义端口号,在项目根目录下创建文件 .env.development 设置 PORT值即可。

.env.development 文件不会被提交至代码仓库

环境变量文件优先级如下: .env.local > .env.development/.env.production > .env

This is a starter template for Learn Next.js.

正式环境访问链接

https://dawntools.vercel.app/

通过 vercel(通过github账号登录) 部署

avatar

https://dawntools.vercel.app/api/avatar/?text=helloworld&variant=flower

fish

可用API:

生成鱼的代码使用的是 https://github.com/LingDong-/fishdraw

const { main, draw_svg } = require('/serverComponents/fish');

let seed = undefined;
let format = 'svg'; // json/smil/csv/ps
let speed = 0.005;

for (let i = 2; i < process.argv.length; i++){
  let a = process.argv[i];
  if (a == '--seed'){
    seed = process.argv[i+1];
  }else if (a == '--format'){
    format = process.argv[i+1];
  }else if (a == '--speed'){
    if (process.argv[i+1] > 0)
      speed = speed / process.argv[i+1];
  }
}
let polylines = main(seed);
if (format == 'svg'){
  console.log(draw_svg(polylines));
}else if (format == 'json'){
  console.log(JSON.stringify(polylines));
}else if (format == 'smil'){
  console.log(draw_svg_anim(polylines,speed));
}else if (format == 'csv'){
  console.log(polylines.map(x=>x.flat().join(',')).join('\n'));
}else if (format == 'ps'){
  console.log(draw_ps(polylines));
}

dawntools's People

Watchers

 avatar  avatar

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.