Code Monkey home page Code Monkey logo

dcl-cannon-colliders-example's Introduction

Cannon Colliders: blender to decentraland example

DCL Cannon Colliders Test Scene

Overview

This repository is an example Decentraland SDK7 scene with Cannon physics, with colliders loaded from JSON files generated by the Blender plugin "Cannon Colliders".

It contains a test scene, sample JSON collider files, Blender files used to create them, as well as TypeScript examples.

Blender plugin

You can download the Blender plugin here: Decentraland Toolkit: Cannon Colliders.

Examples:

TypeScript

See func.collidersFromJSON.ts for the TypeScript example of loading the JSON and creating the different types of collider. The following collider types are supported: BOX, SPHERE, and MESH.

Blender

The blend files used to generate the collider JSON are also included.

  • assets/basic-colliders.blend - a simple example of the basic supported shapes

  • assets/skate-park.blend - a low-poly skatepark which contains a number of more complex colliders. Note that MESH colliders are computationally expensive, so simpler BOX colliders are used where possible for optimisation

Previewing the scene

  1. Download this repository.

  2. Open a Visual Studio Code window on this scene's root folder.

  3. Open the Decentraland Editor tab, and press Run Scene

Alternatively, you can use the command line. Inside this scene root directory run:

npm run start

Previewing the skatepark

WIP: be nice to add in the skateboard character movement from bences example, but might be beyond the scope of this demo repo

dcl-cannon-colliders-example's People

Contributors

stom66 avatar

Watchers

 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.