Git Product home page Git Product logo

chrisvilches / beautiful-bridges Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 632 KB

This is a small web application for visualizing the Beautiful Bridges problem, which appeared in the ACM-ICPC World Finals 2019 (competitive programming contest).

Home Page: https://beautiful-bridges.chrisvilches.com/

JavaScript 64.24% HTML 29.37% CSS 6.38%
algorithm-visualisation algorithms backbone backbonejs computational-geometry dynamic-programming tailwindcss threejs

beautiful-bridges's People

Contributors

chrisvilches avatar

Watchers

 avatar

beautiful-bridges's Issues

Compress textures

Textures are loaded using esbuild using the Base64 loader. The lengths of the strings are:

console.log(steelTexture.length) // => 7127
console.log(groundTexture.length) // => 7011

Compress to improve loading times.

(Possible code smell) Update methods in model do not trigger 'change' events

https://github.com/ChrisVilches/Beautiful-Bridges/blob/main/src/models/InputData.js

These methods should also trigger the vanilla change event, along with the change:ground:length for the ones that modify the array length.

The reason is simply that it might become confusing as to why it's not triggering the change event when it seems like it should do so.

addGround: function () {
  this.get('ground').push({
    x: '',
    y: ''
  })
  this.trigger('change:ground:length')
},
removeGround: function (i) {
  this.get('ground').splice(i, 1)
  this.trigger('change:ground:length')
},
updateGround: function (i, type, value) {
  this.get('ground')[i][type] = value
},

In case of fixing this, note that it's better to execute the built-in set method, which triggers the event automatically, passing some other useful data related to the event (don't trigger the event manually because it will lack that information).

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.