简体   繁体   中英

Drawing 3D elements with Javascript

My application returns the relative positions between two lines and I want draw this lines with Javascript. The line is defined with a director vector, a point and is .
Is there any library available which can do this? I found only Victor.js but does not help in my case

  • Three.js : "The aim of the project is to create a lightweight 3D library with a very low level of complexity — in other words, for dummies. The library provides canvas, svg, CSS3D and WebGL renderers."

  • Processing.js : "Processing.js is the sister project of the popular Processing visual programming language, designed for the web. Processing.js makes your data visualizations, digital art, interactive animations, educational graphs, video games, etc. work using web standards and without any plug-ins."

Both are very mature and have an active community. There are plenty of resources to learn from, for example three.js's Getting Started and Processing.js's Learning .

Here , you have a really easy guide to draw a 3D shape on a 2D surface (With ProcessingJS)
Its a guide by Khan Academy to make 3D shapes with ProcessingJS

You might want to read THIS too.
Its the original article, by Peter Collingridge
Draw 3d shapes on html5 canvas

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM