GithubHelp home page GithubHelp logo

voxelengine-js's Introduction

// fixme

voxelengine-js's People

Contributors

mihailris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

codingwatching

voxelengine-js's Issues

Не работает выбор блока

Выбираю кнопками 1-9, блок не выбирается, с нумпадом тоже не сработало. Arch Linux последней версии (обновился полностью буквально вчера), сервер через python3 -m http.server, браузер Firefox

Пост в дискорде имба, к слову 💀💀💀

Оптимизация

function init_lighting() {

for (let i = 0; i < 500; i++) {
    const x = Math.floor(Math.random() * 32 * 16);
    const y = Math.floor(Math.random() * 32 * 16);
    const z = Math.floor(Math.random() * 32 * 16);
    chunks.set(x, y, z, 3);
    solverR.add(x, y, z, 15);
}

for (let i = 0; i < 10000000; i++) {
    const x = Math.floor(Math.random() * 32 * 16);
    const y = Math.floor(Math.random() * 32 * 16);
    const z = Math.floor(Math.random() * 32 * 16);
    if (chunks.get(x, y, z) === 0 && chunks.get(x, y - 1, z) === 1) {
        chunks.set(x, y, z, 4);
    }
}

for (let z = 0; z < chunks.h * CD; z++) {
    for (let x = 0; x < chunks.w * CW; x++) {
        for (let y = CH - 1; y >= 0; y--) {
            const voxel = chunks.get(x, y, z);
            if (!bricks[voxel].lightInside) {
                if (y + 1 < CH) {
                    solverS.add(x, y + 1, z, 15);
                }
                break;
            }
            solverS.add(x, y + 1, z, 15);
        }
    }
    solverS.solve();
    console.log('day-light: ', z, ' of ', chunks.h * CD, '(' + Math.ceil(z / (chunks.h * CD) * 100.0) + '%)');
}

solverR.solve();

}

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.