Git Product home page Git Product logo

enable3d's Introduction

enable3d logo
3D for Web, Mobile and PC

Written in TypeScript, uses three.js and ammo.js, brings physics to your three.js project and the third dimension to your Phaser 3 game.

NPM version GitHub Workflow Status Three GitHub last commit

Website â€ĸ Packages â€ĸ License

Website

Visit the enable3d website for documentation and examples.

Upgrade to v0.20.0

ES2015

enable3d now targets es2015+. If you use TypeScript or Babel, set your target to es2015 (es6) or higher.

Dual Canvas Mode in Phaser

Since three.js r118, it is hard (impossible) to share the WebGL context with Phaser. Enable3d will therefore create a second canvas for 3d elements. It does this automatically. You do not have to make any changes manually.

Phaser Config

If you are using the Phaser 3D Extension, you have to add { transparent: true } to the Phaser game config and remove backgroundColor (if present).

const config = {
  type: Phaser.WEBGL,
  transparent: true,
  scale: {
    mode: Phaser.Scale.FIT,
    autoCenter: Phaser.Scale.CENTER_BOTH,
    width: 1280,
    height: 720
  },
  scene: [MainScene],
  ...Canvas()
}

Packages

This project is split into many separate npm packages. To better understand the structure and relationships between the packages, see the diagram.

creately-diagram

  • enable3d A standalone 3D Framework on top of three-graphics.
  • @enable3d/phaser-extension Allows to integrate the three-graphics package into your Phaser 3 Games.
  • @enable3d/ammo-physics The core Physics package. Wraps ammo.js physics.
  • @enable3d/ammo-on-nodejs Enables you to run ammo.js on your node.js server.
  • @enable3d/three-graphics The core 3D Objects package. A beautiful API for many three.js elements.
  • @enable3d/three-wrapper Wraps the three.js library and some of its examples in one package.
  • @enable3d/common Some common code used by almost every package.

Multiplayer Game

geckos.io logo

Want to make a Real-Time Multiplayer Game? Check out geckos.io.

License

The GNU General Public License v3.0 (GNU GPLv3) 2019 - Yannick Deubel. Please have a look at the LICENSE for more details.

enable3d's People

Contributors

yandeu avatar nickyvanurk avatar ithamar avatar hexafield avatar mihui 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.