Coder Social home page Coder Social logo

dom3d's Introduction

dom3d: 3d with HTML/CSS

This code is still very much experimental. The API will certainly change quickly.

Runs in Firefox, Chrome, Safari, and Opera.

dom3d.js is where the API is exposed and interfaces between the use and the renderer.
renderer.js is where the base renderer is defined.
renderer_css.js is the CSS renderer.
renderer_raphael.js is the Raphael/SVG renderer.
dump-vertices.scm is a Scheme script to parse a .obj model into a javascript mesh that dom3d can load.

dom3d's People

Contributors

jlongster 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dom3d's Issues

dom3d : zoom in/out and identify 3d triangle on mouse pointer position

Hello James,

I am new to your dom3d API.
I have seen the examples, the teapot and the pole.
I am wondering if it is possible to zoom in/out with dom3d and if it is possible to identify a unique 3d triangle when pointing to it with the mouse pointer ?

Greetings from the Netherlands,

Barent Brouwers

fix seams via borders

I think you can get rid of seams using borders.

Obviously, not by setting all four of them but by always only any two out of four adjacent borders, and eventually none (see example below).

Your algorhithm might figure out...

  1. what color to give
    • calculated from mean of the colors resulting from the gradients of adjacent triangles
  2. which borders to draw
    • based on an adjacent triangle's existing borders
    • based on the visibility of a triangle
      • if the other side is invisible, obviously the color is the same as that of the face

...and gone are the seams.

Example

Consider a basic four faced pyramid: the last face won't need any borders as they are already produced by the other three since there are 4 triangles, 3 edges each, thus 12 edges, however only 6 edges needing a border.

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.