It basically fetches JSON data, parses image and video sources, embedded players or templated content and turns it into optimized React components. The design is minimalistic and based entirely on Semantic UI.
With iframes, video players and heavy GIFs mixing over infinite scrolling, the main idea was to mount and unmount components depending on their visibility. And it was just too easy with react-lazyload.
I had some fun setting the volume of videos in relation to their position on the viewport. It works pretty well, try it out !
When deploying React Router builds without a backend, a .htaccess file can delegate all the routing logic to our index.html.
It’s not exactly “work in progress” since I don’t really plan on improving any of it from here, so just consider this work bare and unfinished. You can try it out here : battle-royale.webmaestro.fr.
The 3D models used, such as the trees and stones, are from Poly by Google.
Controls are the classic W, A, S, D and mouse. I had to adapt the “third-person” logic to rotate rather than translate over space.
There is a day and night cycle that depends on where the player is positionned on the globe. The sun and the moon are casting light on opposite sides while turning around.
The water is… just ugly. There is no collision detection. And the character is a simple cone.
Oh, and there is no server to make it a multi-player shooter, even though that was the ispiration. The idea came when a friend showed me the very entertaining Fortnite. We thought it would be fun to turn this “Battle Royale” island into a planet. Instead of a “storm” shrinking toward the gathered players, we could simply reduce the radius of the spherical terrain… That was the concept.
Maybe I could post details about the code if whoever is interested. In the meantime I have other things to focus on !
Configuration of the plugin is optional, but you should at least register your variables if you are using a CSS framework.
Paths to Sass files are relative to the theme directory.
Use the filter 'sass_configuration' to return your configurations array.
In order to list and edit your Sass variables on the plugin dedicated page, it is necessary to register their “definition” file(s). It is assumed that those files’ only role is to declare variables and their values.
It will prepend the code to compile with an @import directive for each listed file. Useful to compile dependencies, and to “hide” them from the Compiler page. It is necessary to hit the “Compile” button once for these imports to be compiled.
Allows you to define the path to your cache directory. This directory has to be writable (0755). The default cache directory path is wp-content/cache.
Wether or not to display the “Search Variables” filter box. It can come handy if you have a lot of variables. Default is true.
Once registered, you can access any variables with the function sass_get( 'my-variable' );, or override its value (upon what has been set on the Variables page) with sass_set( 'my-variable', 'my-value' ).
It is also possible to use @import directives, as well as any Sass language features, straight from the Compiler page.
It will be compared to the cached version, compiled if changes occurred, and the resulting stylesheet will be enqueued.
Don’t forget to set the main Sass stylesheet handle 'wm-sass' as a dependency (… if it is one).