Giter Site home page Giter Site logo

amitmahato / graphics-project---the-ant-model Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 315 KB

Implementation of algorithms learned from the computer graphics subject to build an object from scratch and give the lighting and shading effects.

HTML 4.00% JavaScript 95.84% Shell 0.16%

graphics-project---the-ant-model's Introduction

Graphics-Project---The-Ant-Model

Implementation of algorithms learned from the computer graphics subject to build an object from scratch and give the lighting and shading effects.

This project uses the "BABYLON.js" to for the mathematics part involved which is renamed to "mathLogic.js" and the main implementation of the computer graphics algorithm is in the "myWorld.js" file. The "main.js" is where you refer to your ".babylon" file.

#How to get things ready #Blender Part The "io_export_babylon.zip" file has the code to export the babylon file from the blender so this needs to be added to blender to be able to get the ".babylon" format file. There is no need to extract the ".zip" file. The instruction is for Blender v2.79: 1. Open Blender 2. Goto File->User Preferences->Add-ons->Install Add-on from File 3. Browse and select the "io_export_babylon.zip" file and click on "Install Add-on from File" 4. Now search for babylon in the search box and tick the babylon related unticked options. 5. Now your blender is ready to export the .babylon files and hence you can model your object in blender and goto "File" and hovering over "Export" shows you "Babylon.js(.babylon)". Selecting this will provide you the .babylon file in your prefered directory.

Now that you got your .babylon file ready. Follow the steps below for rendering in the browser: 1. In the "main.js" line 17, change the name of the file to your model which is by default refering to bullet-ant.babylon, my current model. Don't forget to save the file. 2. Open the terminal and 'cd' to the root of this directory. In general, the directory containing the "index.html" and "run.sh" file. 3. Use the command "./run.sh" to run the server in localhost and using the port browse the location to get your model seen in the canvas of html file. #alternative for step 2: you can run server even from anyone of the command according to your python version: If python2 => use command : python -m SimpleHTTPServer 0 If python3 => use command : python -m http.server 0 Note: Here 0 refer to port address to be randomly allocated, you can change it to any free port address of your choice to run the server on.

#The Complete tutorial with standart code is available at: https://www.davrous.com/2013/06/13/tutorial-series-learning-how-to-write-a-3d-soft-engine-from-scratch-in-c-typescript-or-javascript/

graphics-project---the-ant-model's People

Stargazers

Amogh avatar

Watchers

James Cloos 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.