Giter VIP home page Giter VIP logo

Comments (8)

max-mapper avatar max-mapper commented on June 26, 2024

Bah sorry, the author unpublished it from NPM recently (a really bad practice as it breaks code like this) https://www.npmjs.com/package/esprima-six, https://twitter.com/mattdesl/status/676897307380576257. It's possible this module might work instead but I'm not sure https://www.npmjs.com/package/esprima

from voxel-engine.

andrewtheone avatar andrewtheone commented on June 26, 2024

What i could find out is, voxel-engine is depending on voxel-shader which has a module which depends on awts which depended on esprima-six. if i download the voxel-engine github zip, remove the voxel-shader, npm install it, then download voxel-shader, put it in voxel-engine/node_modules, npm_install the voxel-shader then i want to browserify my index.js, and the browserify stops with an error: "undefined is not a function..." and pointing at aoshader.js in voxel-shader.

any idea how to make it work?

from voxel-engine.

max-mapper avatar max-mapper commented on June 26, 2024

I just published this: https://www.npmjs.com/package/esprima-six-legacy, maybe try replacing 'esprima-six' in the awts package.json with 'esprima-six-legacy'?

from voxel-engine.

andrewtheone avatar andrewtheone commented on June 26, 2024

thats gona be a long run i believe finding the right packages, i'll report back

from voxel-engine.

andrewtheone avatar andrewtheone commented on June 26, 2024

so it finally builds with browserify, but then again, now i'm getting a more strange error when i visit index.html:

Uncaught Error: Error compiling vertex shader: ERROR: 0:18: '=' : global variable initializers must be constant expressions
createShader @ bundle.js:28004(anonymous function) @ bundle.js:27569ShaderPlugin.createAOShader @ bundle.js:27508ShaderPlugin.ginit @ bundle.js:27431EventEmitter.emit @ bundle.js:8485initGLNow @ bundle.js:18492EventEmitter.emit @ bundle.js:8467initGameShell @ bundle.js:19699
13bundle.js:27454 Uncaught Error: voxel-shader render() called before gl-init, shader=

index.js content:

var createGame = require('voxel-engine');
var game = createGame({});
var container = document.body;
game.appendTo(container);

from voxel-engine.

andrewtheone avatar andrewtheone commented on June 26, 2024

all i wanted is having some half-transparent blocks.. that was roughly 12 hours ago, and sitting here without them, dissapointing

from voxel-engine.

max-mapper avatar max-mapper commented on June 26, 2024

@andrewtheone sorry, this project has been inactive for a while so it seems some things are broken

from voxel-engine.

deathcap avatar deathcap commented on June 26, 2024

@andrewtheone I ran into both these problems and fixed them yesterday I believe:

voxel/voxel-shader#11 gl-shader: Error compling vertex shader: ERROR: 0:18: '=' : global variable initializers must be constant expressions
voxel/voxelmetaverse#60 nonexistent dependency (esprima-six unpublished)

(I too was surprised how a module could "spontaneously" break… unfortunately a weakness of NPM, where a dependency can be unpublished then break all dependent projects, not only voxel.js was affected: http://stackoverflow.com/questions/33608630/what-happened-to-the-esprima-six-npm-module - but it should be fixed now in the latest voxel-shader, voxel-decals, voxel-mesher, voxel-webview and gl-css3d 1.0.0. The global variable shader error was my fault though, appears that the code was illegal but previously accepted by browsers, either way, fixed now :)).

Can you try voxel-engine-stackgl 1.0.1, it has both these fixes (voxel-engine-stackgl replaces voxel-engine ndarray branch). Not sure if voxel-engine master branch is broken though.

from voxel-engine.

Related Issues (20)

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.