Giter VIP home page Giter VIP logo

threejs-ammojs-webpack-example'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

WebsitePackagesLicense

Website

Visit the enable3d website for documentation and examples.

Dependencies

Enable3d now depends on the dependencies below.

{
  "@types/matter-js": "0.17.6",
  "@types/three": "0.161.2",
  "matter-js": "0.17.1",
  "phaser": "^3.55.2",
  "poly-decomp": "^0.3.0",
  "three": "0.161.0",
  "three-csg-ts": "^3.1.10"
}

(But it also works on latest Phaser versions like 3.60 & 3.70)

Useful Packages

Some useful packages are now available on npm:

Package Description
audio 🎵 Audio library for the Web Audio API.
keyboard ⌨️ Handling of keyboard events.
tap 🖱️ Handling of user interactions such as mouse, touch and pointer events.

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.

Development Server

Are you used to use Live Server? Check out Five Server instead!

Multiplayer Game

geckos.io logo

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

License

Licensed under LGPL-3.0
Copyright (c) 2022, Yannick Deubel
Please have a look at the LICENSE for more details.

threejs-ammojs-webpack-example's People

Contributors

yandeu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

threejs-ammojs-webpack-example's Issues

Many errors

npm install went ok.
npm start generated errors:
ERROR in ./node_modules/@enable3d/three-graphics/jsm/flat/physics/physics.js 6:0-98
Module not found: Error: Can't resolve 'matter-js' in 'C:\Users\lzz\Downloads\threejs-ammojs-webpack-example-main\node_modules@enable3d\three-graphics\jsm\flat\physics'
@ ./node_modules/@enable3d/three-graphics/jsm/flat/index.js 9:0-55 9:0-55
@ ./node_modules/enable3d/dist/index.js 12:0-60 13:0-26
@ ./src/index.ts 3:19-38

ERROR in C:\Users\lzz\Downloads\threejs-ammojs-webpack-example-main\src\index.ts
./src/index.ts 50:13-21
[tsl] ERROR in C:\Users\lzz\Downloads\threejs-ammojs-webpack-example-main\src\index.ts(50,14)
TS2339: Property 'rotation' does not exist on type 'ExtendedObject3D'.

ERROR in C:\Users\lzz\Downloads\threejs-ammojs-webpack-example-main\src\index.ts
./src/index.ts 51:13-21
[tsl] ERROR in C:\Users\lzz\Downloads\threejs-ammojs-webpack-example-main\src\index.ts(51,14)
TS2339: Property 'rotation' does not exist on type 'ExtendedObject3D'.

ERROR in C:\Users\lzz\Downloads\threejs-ammojs-webpack-example-main\src\standalone.ts
50:13-21
[tsl] ERROR in C:\Users\lzz\Downloads\threejs-ammojs-webpack-example-main\src\standalone.ts(50,14)
TS2339: Property 'rotation' does not exist on type 'ExtendedObject3D'.

ERROR in C:\Users\lzz\Downloads\threejs-ammojs-webpack-example-main\src\standalone.ts
51:13-21
[tsl] ERROR in C:\Users\lzz\Downloads\threejs-ammojs-webpack-example-main\src\standalone.ts(51,14)
TS2339: Property 'rotation' does not exist on type 'ExtendedObject3D'.

1 error has detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.53.0 compiled with 5 errors in 2713 ms
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] bundle: webpack --config webpack.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] bundle script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lzz\AppData\Roaming\npm-cache_logs\2021-10-27T10_45_58_000Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: npm run bundle && npm-run-all --parallel webpack serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lzz\AppData\Roaming\npm-cache_logs\2021-10-27T10_45_58_024Z-debug.log

Can't resolve 'matter-js'

I followed the instructions, but i get: @yandeu

ERROR in ./node_modules/@enable3d/three-graphics/jsm/flat/physics/physics.js 6:0-98
Module not found: Error: Can't resolve 'matter-js' in '/Users/x/git/game/tests/enable3d-webpack/node_modules/@enable3d/three-graphics/jsm/flat/physics'

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.