Giter VIP home page Giter VIP logo

Comments (6)

robiningelbrecht avatar robiningelbrecht commented on August 18, 2024 2

FYI: I started porting this library to PHP. I finished the basic cube functionality, but still need to add all other puzzle types, masks and arrows

First of all, thanks for the great work you did, the maths, clean code. Great job!

Second, I hope you don't mind me porting this to PHP? I'll definitly reference this GitHub repo ofcourse.

Third, If you want to take a look at the code: https://github.com/robiningelbrecht/puzzle-generator. Still need to add docs though. But the idea is to be able to generate cubes by navigating to http://localhost:9090/cube?cube[algorithm]=B U R'&cube[size]=4&size=300 for example

from puzzle-gen.

tdecker91 avatar tdecker91 commented on August 18, 2024

@robiningelbrecht I don't have any plans to build out a php port. You're more than welcome to give it a go. The good news is that there are no third party dependencies used so porting should be trivial.

If you're looking to run this serverside instead of in the web client my intention was to make this runnable in node.js It's possible now by providing a node canvas renderer to the visualizer class as show here. Using that it's possible to build a server application that outputs images much like visualcube did.

from puzzle-gen.

robiningelbrecht avatar robiningelbrecht commented on August 18, 2024

@tdecker91 That server side rendering is indeed what I was looking for, thanks for the tip! Is there a full working example of this in the repo?

from puzzle-gen.

tdecker91 avatar tdecker91 commented on August 18, 2024

nothing in the repo so far.
The only thing I wrote was that example in the custom renderers section of the docs to give an idea of what was possible.

There is an implementation for the drawArrow function in the html canvas renderer here

With those that'd be what my first implementation of the "node canvas renderer" would be.

I intentionally left it out since it added a node dependency for canvas and I was at first focused on working in the client. Plus I didn't want to think about managing builds of the library for node/web 😅. In that case it would be good to separate the core puzzle rendering away from the web and/or node library.

from puzzle-gen.

tdecker91 avatar tdecker91 commented on August 18, 2024

yeah go for it 👍
Looks really good so far.

from puzzle-gen.

tdecker91 avatar tdecker91 commented on August 18, 2024

closing this, as there are no plans to port this to PHP in this repo.

from puzzle-gen.

Related Issues (5)

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.