meta-meta / aztec-pong

An Aframe-React experiment
http://meta-meta.github.io/aztec-pong/
MIT License
3 stars 3 forks source link

Dont merge - Dustin's refactor part 1 #2

Closed dustingetz closed 1 year ago

dustingetz commented 8 years ago

I screwed up and did this off of master instead of networked-pong, so i will need to redo it.

In the meantime, what do you think of these changes?

To understand the changes i would just start with index.js and explore the repo from there.

The next thing to refactor would be gameTick.

meta-meta commented 8 years ago

This is really great! I like the clean boundaries this sets up.

componentDidMount is not useful in aframe

it is when we want to get at the underlying THREE object, but in general, I agree... I guess the ref callback eliminates the need though https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute

I export an entrypoint fn, rather than calling ReactDOM.render inline, because source maps need to

finish loading before we execute anything, otherwise debugging initialization is hard. I still don't totally get how source maps work. Could you explain next time we pair?

The next thing to refactor would be gameTick.

Yes, this code is kind of gross, probably due to the dissonance of attempting to stick with setState() when it wasn't really applicable.

dustingetz commented 1 year ago

hi paul!

meta-meta commented 1 year ago

Hey Dustin, what's up? Time to port Aztec Pong to Hyperfiddle?