A
A
Alexander Kolobov2013-10-25 00:20:58
JavaScript
Alexander Kolobov, 2013-10-25 00:20:58

3D graphics engine in JS

I want to write my own analogue of the minecraft world. Only a graph engine to render the world with textures, no running and jumping, crafting and other crap, just a blocky world with textures and lighting. Objectives: to understand how to write such things in general. Where to begin? Where can I get the initial material on the topic of creating graph engines?

I understand that the result of working like this on javascript + say canvas can be very slow, but the task is to understand how to build a picture and calculate the shapes of objects and lighting. I don't need a game where you can rob cows in the end, I need experience with 3d =)

Answer the question

In order to leave comments, you need to log in

6 answer(s)
D
DrNemo, 2013-10-25
@DrNemo

threejs.org/

V
Vsevolod Rodionov, 2013-10-25
@Jabher

Start with the engine though.
three.js has a huge community, many times larger than vanilla webGL, and there are really a lot of pitfalls.
For example, only textures with a side dimension of a power of two can be repeated, otherwise the last strip of pixels will be stretched. I googled this solution for almost half a day, and found it in the discussion of three.js, the webGL community does not really exist.
And in fact, it provides just a convenient interface, it is similar to jQuery in essence. In the graphics engine, you should rather expect support for certain fabrics, tricky lighting or something else, but here it’s just a wrapper.
Get three.js. Then, if you want, go to yours. But dig it first.

J
Jonh Doe, 2013-10-25
@CodeByZen

That's right treejs. BUT this article is for you to understand . It just tells how to write what you want in 100 lines.

A
Alexander Wolf, 2013-11-02
@mannaro

theshock , for example, wrote a 3D runner on libcanvas ( http://libcanvas.github.io/games/3d/ )
I think it would be worth turning to him and finding out the intricacies :)

M
Maxim Moseychuk, 2013-10-25
@fshp

habrahabr.ru/post/112944/

P
pomeo, 2013-10-25
@pomeo

It makes sense to write from scratch when there is a good example, the code is not so big, plus modularity github.com/maxogden/voxel-engine/blob/master/index.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question