Hi to everyone! It is a pleasure for me to announce the first project I made through Playcanvas.
This is the Primary Build: https://playcanv.as/e/p/O1gmmw44/
an here the same build under my own domain: https://computerinside.de/PhaseMoon/
In the second link I added a few lines to the index file to correctly add the favicon and meta tags for social networks.
I would like to take advantage of this space forum.playcanvas offers to tell my experience when facing this first project, in addition to thank both the documentation offered by the platform and the users of the forum for their doubts and their answers.
This project required about 6 weeks of work, being able to work in its development on the weekends and the little free time that the daily work offers during the week. If it is not too much trouble I would like to review the entire construction process highlighting the difficulties encountered and the gratifying successes.
Chapter 1
WHY?
Everything begins one night in which accidentally my girlfriend and I ended up watching the official video of NASA in which you could see the earthrise from the lunar surface recorded from the apollo 10 … and the doubts arose … as it was that possible? She and I theorized that if it were possible, it would have taken many hours of recording to see the whole process and we wanted to know mathematically how many hours would have been necessary. Since it was too late and I did not feel like doing trigonometric calculations, I thought the best way was to do a simulation with an application that I found on the net, playcanvas. Collect all the necessary information, exact size of earth and moon, elliptical distances, angles of rotation and inclination … everything. And finally we discovered that … that video was impossible. From the lunar surface the earth is always in the same position because its speed of translation and rotation are almost equal, you could only record an earthrise orbiting the moon, never from the surface. Shortly after I found a report from a NASA engineer claiming this event and claiming that … well … we witnessed an unusual event. Days later, I thought that the best way to use all that material I had compiled was to do something with it, why not a real-time lunar phase viewer?. And there began my climb in playcanvas.
Chapter 2
FIRST DIFFICULTIES
I already had the whole model built to scale rotating but needed two very important things:
- Something to tell me in a friendly way the current phase, as for example Waning Gibbous.
- A user interface in which to place text and use future functionalities.
For point 1. after an incipient search I found a software called SunCalc written in JavaScript. I came from studying C/C++/Java and in JavaScript I found something new to learn. To make move/rotate the whole model documentation offered by playcanvas was very helpful but understanding the operation of SunCalc took me much more time.
For point 2. I have to say that I came from Unity, I already knew WebGl and the incredible potential that it represents. Previously I had done few projects on Unity under the WebGl platform and initially the Unity canvas system was almost my home. I left Unity because of the deficiency it presents when it comes to compiling WebGl. When I started in playcanvas and inquiring about the user interface system Mr. Max recommended the use of DOM (Modifying the file font_renderer.js for UI elements). Initially I had some very basic html ideas, but I had no idea what DOM was, much less the DOM involvement it had with JS. From that moment https://www.w3schools.com/ became my new home. To this day, I still use DOM for user interfaces instead of the new UI system recently implemented by playcanvas, and I will continue to do so because of the enormous flexibility it brings me and above all because I will never get to understand and use correctly the Anchors system
Post-data: Impatiently await the new functionality to manage animations
Chapter 3
FIRST SUCCESSES
It really makes me very gratifying to see everything working, that all the effort, the passion and the dedication has had a purpose, a motive. Appreciate having a constant learning, make mistakes 20 times and rethink everything to try again. Propose small goals every day, small bricks that make strong walls. And once completed a project have the illusion of starting a new one, better and different, learn from mistakes to commit new ones. And above all to know that there is a community that right now, at this very moment is doing all this. That is the success.
ENDING
I am currently working on my fourth project under playcanvas, it is the next of many more that will come. If I have the necessary time I would like to present them to the community, although I hope to do so in a not so extensive way
Huge.prototype.Strong = function (to_all) {};