GithubHelp home page GithubHelp logo

petitcon's Introduction

petitcon

내 데스크탑 속 펫 petitcon 입니다.

로컬에서 실행

yarn install && yarn e

윈도우 빌드

yarn build:win

맥 빌드

yarn build:osx

맥 버전 빌드는 맥OS에서만 동작합니다.

Todo List

  • 여러 마리 데려오기 (v1.0.2)
  • 싱글 인스턴스로 동작 (v1.0.3)
  • 자체 확장자 파싱(.ptc) (v1.0.4)
  • 행동 커스터마이징 (v1.0.5)
  • 커스텀 json 추가 (v1.0.5)
  • 스트리밍용 화면 구현
  • 코드 이쁘게 만들기

커스텀 캐릭터 만들기

image

  1. 위와 같은 형태의 이미지 12장 준비
  2. 각 파일의 이름 매칭
  3. 해당 파일들이 담긴 폴더 zip으로 압축
  4. zip파일 확장자를 ptc로 변경
각 이미지는 100x100 투명도가 있는 png입니다.

ptc 파일을 실행하거나 실행중인 petitcon 프로그램에 ptc 파일을 드래그&드롭 하여 적용할 수 있습니다.

커스텀 쁘띠콘 만들기

쁘띠콘 에디터(베타)

커스텀 행동 json 만들기

아래와 같은 형태로 커스텀 행동을 만들 수 있습니다.

behaviors.json

{
  "name": "mokoko",
  "author": "esllo",
  "behaviors": [
    {
      "action": "fall",
      "condition": "isNotGround",
      "duration": [15, 30],
      "durationRange": {
        "fixed": 10000
      },
      "evaluate": [
        {
          "variable": "falling",
          "value": true
        }
      ]
    }, 
    {
      "action": "climb",
      "condition": "hasNeerWall",
      "chance": 60,
      "duration": [20, 40],
      "durationRange": {
        "min": 6,
        "max": 12,
        "multiply": 40
      },
      "evaluate": [
        {
          "func": "dockToNeerWall"
        },
        {
          "variable": "velY",
          "value": -0.7
        }
      ]
    }, 
    {
      "action": "walk",
      "chance": 40 ,
      "duration": [20, 40, 60, 80],
      "durationRange": {
        "min": 2,
        "max": 12,
        "multiply": 40
      },
      "evaluate": [
        {
          "func": "setRandomDirection"
        },
        {
          "variable": "velX",
          "key": "direction"
        }
      ]
    },
    {
      "action": "sneeze",
      "chance": 30 ,
      "duration": [60, 90, 120],
      "durationRange": {
        "fixed": 120
      }
    },
    {
      "action": "sit",
      "chance": 30 ,
      "duration": [],
      "durationRange": {
        "min": 3,
        "max": 4,
        "multiply": 20
      }
    },
    {
      "action": "stand",
      "chance": 100,
      "duration": [],
      "durationRange": {
        "min": 2,
        "max": 5,
        "multiply": 30
      }
    }
  ]
}

위의 behaviors.json 파일을 .ptc 파일에 넣어 실행하면 v1.0.5 부터 커스텀 동작을 확인할 수 있습니다.

petitcon's People

Contributors

esllo avatar

Stargazers

 avatar YoungBeen Jo avatar  avatar LeeXel avatar  avatar JunSang Lee avatar

Watchers

 avatar

petitcon's Issues

QHD 해상도(2560*1440) 이상에서 FHD 해상도에 맞춰 움직임

오류보고

  1. 최초 실행시엔 해상도 크기와 상관없이 움직임 (맨 아래 부엉이)
  2. 클릭, 드래그 시 이후 FHD 해상도에 맞춰서 움직임 (위의 두 부엉이)
  3. 종료 후 재실행하면 1. 항목으로
    3-2. 종료하지 않고 중복 실행의 경우도, 1~2 재현 가능
  • QHD 모니터와 FHD 모니터를 사용중이어서 이 외의 해상도에서는 체크하지 못했음

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.