Giter VIP home page Giter VIP logo

templatemanager's Introduction

templatemanager's People

Contributors

april83c avatar happydoge avatar littleendu avatar marpfie avatar mikarific avatar miraisubject avatar raffimolero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

templatemanager's Issues

Maintain our own fork of gorilla-build

Should be possible to use github directly to install into node_modules

There are a few annoying things about gorilla-build that should be fixed:

  • apsking/gorilla#438 prevents us from using any 3rd party frameworks
  • the // Created with love using Gorilla is in the header and is considered an error by tampermonkey. Any build messages should be after the header
  • Some of the header order should be enforced - name, namespace, version, author, description should appear first and in that order

Rewrite settings and its CSS

Settings were hastily thrown into shadow DOM but now that they are there, they can have custom CSS that always works

Add how to correctly get cached purged version to template source (the .json)

There are many ways the script could do cache busting, but it seems sometimes it actually works against our best wishes. Real solution to this should be investigated, and if there's a way to fix it it should be added into the .json so that after loading it for the first time the script knows how to refresh it correctly.

This could also just include an incremental version number i.e filename part of the path is the cache bust not the uri query. For example templateManager is told to add https://littleendu.xyz/template.json as a source, and then in the .json templateManager would find "hey, we actually have updated this 45 times. You can find the templates in https://littleendu.xyz/template-v45.json and in the future, try https://littleendu.xyz/template-v46.json to see if we have an update"

Add *optional* keyboard shortcuts

They absolutely need to be optional (but maybe customizable) as to not conflict with any hotkeys the sites themselves might have.

Implement "always load these templates" into settings

  • Add "name" field to entire template. probably call it / alias it to faction
    • will be used to display settings
  • Add template url storage
    • store the embed url + jsontemplate so that wrong canvas game templates don't get loaded
  • Make it obvious that templates can be saved to be loaded later
    • maybe a label next to settings icon?
    • notification when no templates were saved?

Rework the math around dithering

The math around dithering is crazy complicated and doesn't event make sense. The slider in the settings should set a "show every Nth pixel" and the priority mask should add a percentage to that. There should be a separate slider for the automated dither part of animated frames.

The final formula for finding the dither amount could then be floor(N + N * (255-L)/100) where N is the selected dither amount and L is the value of the pixel in the priority map.

Save templates client side and add versioning

imo this would have many benefits:

  • would allow for an easy check to see if you have the latest template (that is if you know what the latest version nr is, you just check that you have the same nr)
  • would allow a rollback if the user finds that the new version doesn't work for them
  • would enable some sanity check
    • client can reject individual templates if a "newer" json hosts older template
    • client can ignore a newer json that doesn't bump the version number of a template

This would need to be opt-in and per template, that is:

  • user opts in to saving
  • template json host opts in to keeping track of versions
    • template isn't version controlled if the version key doesn't exist

Add a mission command centre

I saw some streamers having custom timers separated by birthday months, but I think we can do better than that.

The command centre could just randomly assign people to teams and in a way where the commander in charge can select the ratios of the teams. So the admin panel would have a "Create team" and then a slider for how big the team should be. The actual percentage will be this_slider_value / total_value_of_all_sliders. Then when ever the commander locks the teams in everyone connected gets a notification "You were assigned team Alpha" or something, and the admin panel starts showing cooldown estimation. When the cooldown is 0 and the commander deploys a team, that team gets a "place your pixels now" notification.

Some global offset system to support negative coords and other gimmicks

  • keep track of what was canvas' top-leftmost pixel coord when the template was uploaded
  • guess or allow the user to specify what it actually is right now so that all the templates can be shifted
  • in case of where top-leftmost isn't 0,0 (aka negative coords or shrinking canvas), allow templates to choose between UI coords or html canvas coords

this would hopefully make it less confusing to handle various expansion, contraction, 0/0 not being top-left, and other such gimmicks

Consider dropping priority mask support

It was rarely used during r/place 2023 and I would argue it wasn't successfully used at all. Dropping support for priority masks would allow us to investigate other ways to overlay the template on the canvas such as CSS masking

Display the version number

Turns out by default some script managers, like Violentmonkey, update scripts automatically. To avoid confusion, the version number should be placed somewhere. I think I'll go with the title in the settings as that's least effort to edit:

div.appendChild(createLabel(".json Template settings - v" + GM.info.script.version));

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.