adamwkraft / carboncopy Goto Github PK
View Code? Open in Web Editor NEWCarbonCopy
Home Page: https://carboncopy.fun/
License: Apache License 2.0
CarbonCopy
Home Page: https://carboncopy.fun/
License: Apache License 2.0
By putting this in the body of the <Surival>
it will be run on every render, which means it will update simpleGame
, which in turn will update Survival.js
, which means it will run again in an infinite feedback loop.
You could achieve what you're going for (load a set once they've selected survival mode I presume) in a number of different ways considering our setup. The most similar to what you have currently would be this:
const loadedRef = useRef(false);
useEffect(() => {
if (!loadedRef.current) {
loadedRef.current = true;
simpleGame.handleLoadShippedMasks('set2.zip'); // TODO: Make a Survival Set.
}
}, [simpleGame]);
This way the ref keeps track of it and only runs the load function once. I'm really not happy with how I've set up the game logic, and likely a better approach will present itself as we keep building, but this should work for now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.