Git Product home page Git Product logo

gd-com's Introduction

GM-Com gd-com

Establish communication between godot and nodejs with TCP and UDP !

API godot v2 API godot v3

Compatibility

Full compatibility with Godot v 2.1 Partial compatibility with Godot v 3.X

How to install

npm install --save gd-com

Usage

ES6

import { TCP, UDP, objects } from 'gd-com'

let wanted = 'test'

TCP.encode(wanted).then((encoded) => {
  return TCP.decode(encoded)
}).then((decoded) => {
  console.log(decoded)
})

UDP.encode(wanted).then((encoded) => {
  return UDP.decode(encoded)
}).then((decoded) => {
  console.log(decoded)
})

ES5

var gdCom = require('gd-com')
var wanted = 'test'

gdCom.TCP.encode(wanted).then((encoded) => {
  return gdCom.TCP.decode(encoded)
}).then((decoded) => {
  console.log(decoded)
})

gdCom.UDP.encode(wanted).then((encoded) => {
  return gdCom.UDP.decode(encoded)
}).then((decoded) => {
  console.log(decoded)
})

Object Godot in JS

ES6

import { Vector2, Rect2 } from 'gd-com/object'
import Vector2 from 'gd-com/object/Vector2'
import Rect2 from 'gd-com/object/Rect2'

let v2 = new Vector2(3, 2)
let r2 = new Rect2(1, 2, 3, 4)

ES5

var gdCom = require('gd-com')

var v2 = new gdCom.objects.Vector2(3, 2)
var r2 = new gdCom.objects.Rect2(1, 2, 3, 4)

Contributing

Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.

Authors

TODO & CHANGELOG

CHANGELOG

TODO

License

This project is licensed under the MIT License - see the LICENSE file for details

Thanks

  • Godot
  • Godot Social Club
  • GDQuest
  • IG-Dev

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.