Git Product home page Git Product logo

the-cube's Issues

Would it be possible to add images instead of colours?

I tried to Use a texture map like this:

// Cube.js -> line 212
if (edge.name === "R") {
    var texture = new THREE.TextureLoader().load('/assets/icons/android-chrome-192x192.png');
    edge.material.map = texture;
}

Screenshot 2020-07-16 at 19 36 53

Based on the visual outcome, it does indeed load something onto the piece, though I believe it could be done smarter. This way will require a background image per piece.

I really like this repo, and could use it for a party coming up this autumn.. If you have some thoughts on how to achieve the image thingy, I would appreciate you sharing..

Where is the dependences?

It seems this project use three.js, but I look through the package.json and could not find the dependences.

I tried to build the project, however some warnings/errors appeared.

D:\code\node\the-cube>yarn build
yarn run v1.22.17
$ rollup -c rollup.config.build.js && cp upup.min.js export/ && cp upup.sw.min.js export/ && cp index.html export/ && cp -R assets export/
(!) You have passed an unrecognized option
Unknown output options: sourceMap. Allowed options: amd, assetFileNames, banner, chunkFileNames, compact, dir, dynamicImportFunction, entryFileNames, esModule, exports, extend, externalLiveBindings, file, footer, format, freeze, generatedCode, globals, hoistTransitiveImports, indent, inlineDynamicImports, interop, intro, manualChunks, minifyInternalExports, name, namespaceToStringTag, noConflict, outro, paths, plugins, preferConst, preserveModules, preserveModulesRoot, sanitizeFileName, sourcemap, sourcemapExcludeSources, sourcemapFile, sourcemapPathTransform, strict, systemNullSetters, validate

./src/js/Game.js โ†’ ./assets/js/cube.js...
created ./assets/js/cube.js in 345ms
Done in 1.89s.

D:\code\node\the-cube>

Maybe the code need to refactor or update to use the modern build/bundler tools.

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.