u37 probably doesnt work i will need to fix this 😔

This commit is contained in:
eaglercraft 2024-09-21 22:29:10 -07:00 committed by Aether
parent ae5e6805b3
commit 2f97821771
2097 changed files with 106754 additions and 49036 deletions

1
.gitignore vendored
View File

@ -14,6 +14,7 @@ desktopRuntime/options.txt
desktopRuntime/_eagstorage* desktopRuntime/_eagstorage*
desktopRuntime/filesystem/* desktopRuntime/filesystem/*
desktopRuntime/downloads/* desktopRuntime/downloads/*
desktopRuntime/screenshots/*
javascript/assets.epk javascript/assets.epk
javascript/classes.js javascript/classes.js
javascript/EaglercraftX_1.8_Offline_en_US.html javascript/EaglercraftX_1.8_Offline_en_US.html

306
CODE_STANDARDS.md Executable file
View File

@ -0,0 +1,306 @@
# Eaglercraft Code Standards
**These are some basic rules to follow if you would like to write code that is consistent with the Eaglercraft 1.8 codebase. If you are already familiar with Eaglercraft 1.5 or b1.3, please abandon whatever you think is the best practice as a result of reading that code, those clients should be considered as obsolete prototypes.**
## Part A. Coding Style
### 1. Tabs, not spaces
Tabs not spaces, it makes indentation easier to manage and reduces file size. Other popular projects that are also known to use tabs instead of spaces include the linux kernel. We prefer to set tab width to 4 spaces on our editors.
Format code like the eclipse formatter on factory settings
### 2. Avoid redundant hash map lookups
Don't retrieve the same value from a hash map more than once, that includes checking if an entry exists first before retrieving its value. If you do this, you are a horrible person!
**Incorrect:**
```java
if(hashMap.containsKey("eagler")) {
Object val = hashMap.get("eagler");
// do something with val
}
```
**Correct:**
```java
Object val = hashMap.get("eagler");
if(val != null) {
// do something with val
}
```
### 3. Cache the return value of a function if you plan to use it multiple times
This is somewhat an extension of rule #2, don't repeatedly call the same function multiple times if there's no reason to, even if its a relatively fast function. Everything is slower and less efficient in a browser.
**Incorrect:**
```java
while(itr.hasNext()) {
if(!Minecraft.getMinecraft().getRenderManager().getEntityClassRenderObject(SomeEntity.class).shouldRender(itr.next())) {
itr.remove();
}
}
```
**Correct:**
```java
Render<SomeEntity> render = Minecraft.getMinecraft().getRenderManager().getEntityClassRenderObject(SomeEntity.class);
while(itr.hasNext()) {
if(!render.shouldRender(itr.next())) {
itr.remove();
}
}
```
### 4. Iterators aren't that great
Avoid using iterators when possible, this includes a `for(Item item : list)` type loop, since this may compile into bytecode that uses an iterator. If the list is a linked list or some other type of data structure that cant perform random access efficiently, then it is recommended to use an iterator, but if the collection is guaranteed to be something similar to an ArrayList then implement it via a traditional for loop instead.
**Recommended way to iterate an ArrayList:**
```java
for(int i = 0, l = list.size(); i < l; ++i) {
Item item = list.get(i);
// do something
}
```
### 5. Don't shit on the heap
Avoid creating temporary single-use objects in performance critical code, since the overhead of doing so is larger in a browser where theres no type safety to predefine object structures. This includes using lambdas or using most of the stuff in the google guava package. Also this is partially why I prefer not using iterators whenever possible.
**Incorrect, creates 5 temporary objects:**
```java
List<String> list1 = Arrays.asList("eagler", "eagler", "deevis");
List<String> list2 = Lists.newArrayList(
Collections2.transform(
Collections2.filter(
list1,
(e) -> !e.equals("deevis")
),
(e) -> (e + "!")
)
);
```
**Correct, creates no temporary objects:**
```java
List<String> list1 = Arrays.asList("eagler", "eagler", "deevis");
List<String> list2 = Lists.newArrayList();
for(int i = 0, l = list1.size(); i < l; ++i) {
String s = list1.get(i);
if(!s.equals("deevis")) {
list2.add(s + "!");
}
}
```
(note: we are ignoring the StringBuilder instances that the compiler generates from ` + "!"`)
### 6. Don't base game/render logic off of the system time
Use `EagRuntime.steadyTimeMillis()` instead to access a monotonic clock, as in a clock that is guaranteed to only run forwards, and is not affected by changes in the system time. `System.currentTimeMillis()` should only be used in situations where you want to know the actual wall time or are measuring elapsed time across multiple page refreshes.
### 7. Prefer multiplication over division
If you're always gonna divide a number by some constant, it is better to multiply it by one-over-the-constant instead.
**Incorrect**
```java
float b = a / 50.0f;
```
**Correct**
```java
float b = a * 0.02f;
```
### 8. Shaders should take advantage of compiler intrinsics
Although you may think these two pieces of code are identical, its more than likely that the "Correct" example will compile to a more efficient shader on almost any hardware. The functions in GLSL are not a library, they are compiler intrinsics that usually compile to inline assembly that can take advantage of different acceleration instructions in the GPU's instruction set. Vector math should be done in ways that promotes the use of SIMD instructions when the code is compiled to a shader.
**Incorrect:**
```glsl
float dx = pos1.x - pos2.x;
float dy = pos1.y - pos2.y;
float dz = pos1.z - pos2.z;
float distance = sqrt(dx * dx + dy * dy + dz * dz);
float fogDensity = pow(2.718, -density * distance);
```
**Correct:**
```glsl
float fogDensity = exp(-density * length(pos1.xyz - pos2.xyz));
```
### 9. Flatten the control flow of shaders
Modern GPUs are able to execute multiple instances of a shader on a single core, but if one of those shaders encounters a branch (if statement, or related) that causes it to begin executing different code from the other instances of the shader running on that core, that instance of the shader can no longer be executed at the same time as the other instances, and suddenly you've significantly increased the amount of time this core will now be busy executing shader instructions to account for all of the branches the different shader instances have taken.
**Incorrect:**
```glsl
float lightValue = dot(lightDirection, normal);
if(lightValue > 0.0) {
color += lightValue * lightColor * diffuseColor;
}
```
**Correct:**
```glsl
float lightValue = max(dot(lightDirection, normal), 0.0);
color += lightValue * lightColor * diffuseColor;
```
### 10. Use textureLod unless mipmapping is necessary
This will prevent the shader from wasting time trying to determine what mipmap levels to read from when the texture is sampled.
**Incorrect:**
```glsl
float depthValue = texture(depthBuffer, pos).r;
```
**Correct:**
```glsl
float depthValue = textureLod(depthBuffer, pos, 0.0).r;
```
### 11. Divide complex and branch-intensive shaders into multiple draw calls
You can use a variety of different blending modes to mathematically combine the results of shaders. This is done for the same reason as flattening the control flow, to try and keep instruction pointers in sync by periodically resetting their positions, and also to allow for the driver to multitask better on GPUs with insane numbers of cores. It also allows the shaders execution to be distributed across multiple frames in the case of something that doesnt need to update often (like clouds).
### 12. Don't abuse `@JSBody` in TeaVM code
TeaVM provides lots of ways of interacting with JavaScript, using `@JSBody` is not the only way, consider using an overlay type.
**Incorrect**
```java
@JSObject(params = { "obj" }, script = "return obj.valueA;")
public static native JSObject getValueA(JSObject obj);
@JSObject(params = { "obj" }, script = "return obj.valueB;")
public static native JSObject getValueB(JSObject obj);
@JSObject(params = { "obj" }, script = "return obj.valueC;")
public static native JSObject getValueC(JSObject obj);
@JSObject(params = { "obj" }, script = "obj.dumbFunction();")
public static native void callDumbFunction(JSObject obj);
```
**Correct**
```java
public interface MyObject extends JSObject {
@JSProperty
JSObject getValueA();
@JSProperty
JSObject getValueB();
@JSProperty
JSObject getValueC();
void dumbFunction();
}
```
### 13. Don't fall for TeaVM's threads
It is impossible to have multithreading in JavaScript, only worker objects can be used to execute code concurrently, which can't share javascript variables. Therefore, when you create a thread in TeaVM, you're creating a virtual thread that isn't capable of running at the same time as any other virtual thread in the TeaVM context. This means it's impossible to speed a TeaVM program up through the use of multiple Java threads, instead it is more than likely that it will just slow the program down more to implement multithreading through TeaVM's threads due to the additional time required for synchronization and context switches. Its more efficient to just program the entire application to be single threaded to begin with, just put everything in the main loop and realize that if it was in a different thread it would just periodically interrupt the main loop.
### 14. Always use try-with-resources
For any code that deals with streams to be considered safe, it should either use a try-with-resources or try/finally in order to release resources when complete, since otherwise the stream might not close if an IO error causes the function to return early. This is especially important for plugin code since its supposed to be able to run on a large server for weeks at a time without the underlying JVM being restarted. If hackers discover a bug in the code to cause a function to return early like this without closing a stream, they might exploit it to fatally crash the server by spamming whatever corrupt packet causes the function to leak the stream, so all code must be written so it can fail at any time without leaking resources.
**Incorrect**
```java
InputStream is = new FileInputStream(new File("phile.txt"));
is.write(someArray);
is.close();
```
**Correct**
```java
try(InputStream is = new FileInputStream(new File("phile.txt"))) {
is.write(someArray);
}
```
Notice that the `.close()` can be omitted completely when using a try-with-resources
### 15. Always close compression/decompression streams
In the desktop runtime, the default oracle JDK uses native code to implement the compression/decompression streams (InflaterInputStream, GZIPInputStream, etc) and therefore if you forget to close the compression/decompression stream it will cause a memory leak when the code isn't running in a browser. This is a common issue when using byte array input/output streams since you might believe when decompressing data from a byte array that there's no reason to close the stream when you're done since its not a file, but that will still cause a memory leak due to the decompression stream not being cleaned up.
## Part B. Project Structure
### 1. Code decompiled from Minecraft goes in `src/game/java`
Don't add any new classes to `src/game/java`, and ideally any significant additions to the game's source (functions, etc) should be done through creating new classes in `src/main/java` instead of adding it directly to the decompiled classes.
### 2. Do not put platform-dependent code in `src/main/java` or `src/game/java`
One of the objectives of Eaglercraft is to make Minecraft Java edition truly cross platform, why stop at just a desktop and JavaScript runtime? There are plans to create an Android runtime and several WebAssembly runtimes, all of which will be compatible with any pre-existing eaglercraft clients that only depend on the EaglercraftX runtime library and don't directly depend on components of TeaVM or LWJGL. Ideally, all core features of the client should be implemented in the `src/main/java` and `src/game/java` and any platform-dependent features should be stubbed out in some abstract platform-independent way in classes in the `src/teavm/java` and `src/lwjgl/java` and any other future runtime you want your client to support. Ideally, every source folder of platform-dependent code should expose an identical API for access to the platform-independent code as all the other platform-dependant code folders currently expose.
### 3. Don't mix JavaScript with Java
Dont implement features in the JavaScript runtime by requiring additional JavaScript files be included on index.html, if you must access browser APIs then use the TeaVM JSO to write your code in Java instead so its baked directly into classes.js. Certain browser APIs may be missing from the default TeaVM JSO-APIs library but it is not difficult to create the overlay types for them manually. Clients that violate this rule may also not possible to automatically import into the EaglercraftX boot menu depending on how fucked up they are. There aren't any limitations to the TeaVM JSO that give you a good enough excuse not to follow this rule.
### 4. Don't access the classes named "Platform\*" directly from your platform-independent code
Much like the Java runtime environment itself, Eaglercraft's runtime library consists of two layers, the internal classes full of platform-dependent code that expose an intermediate API not meant to be used by programmers directly, and the platform-independent API classes that provide a platform-independent wrapper for the platform dependent classes and also provide all the miscellaneous utility functions that don't require platform dependent code to be implemented. Chances are if you are directly using a function on a class that has a name that starts with "Platform\*", that there is a different class in `src/main/java` that you are meant to use in order to access that feature, that may perform additional checks or adjust the values you are passing to the function before calling the function in the Platform class.
## Part C. Compatibility Standards
### 1. Target minimum JDK version is Java 8
Its difficult to find a platform where its not possible to run Java 8 in some capacity, therefore the desktop runtime of EaglercraftX and the BungeeCord plugin should target Java 8. The Velocity plugin is an exception since Velocity itself doesn't support Java 8 either.
### 2. Target minimum supported browser is Google Chrome 38
Released on October 7, 2014, we think its a good target for the JavaScript versions of EaglercraftX. This is the last version of Chrome that supports hardware accelerated WebGL 1.0 on Windows XP. All base features of the underlying Minecraft 1.8 client must be functional, however things such as EaglercraftX's shaders or dynamic lighting are not required to work. The client cannot crash as a result of any missing features on an old browser, you must either implement fallbacks or safely disable the unsupported features.
### 3. Target minimum supported graphics API is OpenGL ES 2.0 (WebGL 1.0)
The most widely supported graphics API in the world is currently OpenGL ES 2.0, so ideally that should be the target for EaglercraftX 1.8. We can guarantee the client will be on an OpenGL ES 3.0 context 99% of the time, however its not that hard to also maintain support for GLES 2.0 (WebGL 1.0) as well with slightly reduced functionality so we might as well make it a feature in case of the 1% of the time that functionality is not available. The client cannot depend on any GL extensions in order to run in GLES 2.0 mode, however its reasonable to assume there will be VAO support via extensions in most GLES 2.0 contexts so the client includes an abstraction layer (via EaglercraftGPU.java) to seamlessly emulate VAO functionality even when the client is running in GLES 2.0 mode with no VAO extensions. The only core feature of Minecraft 1.8 that is completely unavailable in GLES 2.0 mode is mip-mapping for the blocks/items texture atlas due to being unable to limit the max mipmap level.
### 4. Use preprocessor directives to make portable shaders that can be compiled for both OpenGL ES 2.0 and 3.0 contexts
Most of the shaders in the base "glsl" directory of the resources EPK file use a file called "gles2_compat.glsl" to polyfill certain GLSL features (such as input/output declarations) via preprocessor directives to allow them to be compiled on both OpenGL ES 3.0 and 2.0 contexts. This is the preferred way to implement backwards compatibility over creating seprate versions of the same shaders, since future developers don't need to waste time maintaining multiple versions of the same code if they don't really care about backwards compatibility in the first place.
### 5. Target minimum version of the JavaScript syntax is ES5 strict mode
A shim is included to provide certain ES6 functions, however you should always program with syntax compatible with ES5, so the script doesn't crash immediately due to syntax errors even if the functions that use unsupported syntax aren't actually being called. `build.gradle` currently patches out all the ES5 strict mode incompatible syntax in the output of TeaVM 0.9.2, but this will probably break if you try to update TeaVM. Don't worry though because future WASM versions of EaglercraftX will use the latest versions of TeaVM. **Some common incompatible syntax to avoid includes `const`, `let`, `async`, `( ) => `, and using named functions! You can't do any of these things in your JSBody annotations.**
### 6. You cannot depend on any deprecated browser features
The same way we want EaglercraftX to work on browsers from over 10 years ago, we want it to still work in browsers 10 years from today, therefore the client cannot depend on any deprecated browser features in order for all the base Minecraft 1.8 game's features to work properly. However it is okay to use deprecated features as fallback if any modern non-deprecated feature (such as keyboard event handling) that the game needs if the game is running in an old browser.
### 7. Always use addEventListener to register event handlers
Always use addEventListener to register event handlers for browser APIs, never through the use of assigning the legacy "on\*" (onclick, onkeydown, onmessage, etc) variables, the TeaVMUtils class has a universal helper function for accessing addEventListener on any JSO objects that dont already implement the function.
### 8. JavaScript should be executed in strict mode
Always make sure your JavaScript files start with `"use strict";`, be careful when adding this to your code retroactively because it will probably break hastily written code unless you havent made a single typo thats not forbidden in strict mode. Be aware that in Chrome 38 this means you can't use stuff such as `const` and `let` or named functions in any of your JSBody annotations!

246
EAGLERCRAFTX_README.md Executable file
View File

@ -0,0 +1,246 @@
# EaglercraftX 1.8
### Play Minecraft 1.8 in your browser, supports singleplayer and multiplayer
![EaglercraftX 1.8 Screenshot Main Menu](https://deev.is/eagler/cors/eagler-1.8-u22-titlescreen-480p.png)
### This repository contains:
- **Utilities to decompile Minecraft 1.8 and apply patch files to it**
- **Source code to provide the LWJGL keyboard, mouse, and OpenGL APIs in a browser**
- **Patch files to mod the Minecraft 1.8 source code to make it browser compatible**
- **Browser-modified portions of Minecraft 1.8's open-source dependencies**
- **Plugins for Minecraft servers to allow the eagler client to connect to them**
### This repository does NOT contain:
- **Any portion of the decompiled Minecraft 1.8 source code or resources**
- **Any portion of Mod Coder Pack and it's config files**
- **Data that can be used alone to reconstruct portions of the game's source code**
## Getting Started:
### To compile the latest version of the client, on Windows:
1. Make sure you have at least Java 11 installed and added to your PATH, it is recommended to use Java 17
2. Download (clone) this repository to your computer
3. Double click `CompileLatestClient.bat`, a GUI resembling a classic windows installer should open
4. Follow the steps shown to you in the new window to finish compiling
### To compile the latest version of the client, on Linux/macOS:
1. Make sure you have at least Java 11 installed, it is recommended to use Java 17
2. Download (clone) this repository to your computer
3. Open a terminal in the folder the repository was cloned to
4. Type `chmod +x CompileLatestClient.sh` and hit enter
5. Type `./CompileLatestClient.sh` and hit enter, a GUI resembling a classic windows installer should open
6. Follow the steps shown to you in the new window to finish compiling
## Browser Compatibility
EaglercraftX 1.8 is currently known to work on browsers as old as Chrome 38 on Windows XP, the game supports both WebGL 1.0 and WebGL 2.0 however features such as dynamic lighting and PBR shaders require WebGL 2.0. The game also supports mobile browsers that don't have a keyboard or mouse, the game will enter touch screen mode automatically when touch input is detected. The game also includes an embedded OGG codec (JOrbis) for loading audio files on iOS where the browsers don't support loading OGG files in an AudioContext.
## Singleplayer
EaglercraftX 1.8 fully supports singleplayer mode through an integrated server. Worlds are saved to your browser's local storage and are available even if your device does not have an internet connection. You can also import and export worlds in EaglercraftX as EPK files to copy them between devices and send them to your friends.
You can also import and export your existing vanilla Minecraft 1.8 worlds into EaglercraftX using ZIP files if you want to try playing all your old 1.8 maps in a modern browser. The glitch that caused some chunks to become corrupt when exporting worlds as vanilla in Eaglercraft 1.5.2 no longer happens in EaglercraftX 1.8, its perfect now. Beware that the inventories of LAN world players are not saved when the world is converted to vanilla, and pets (dogs, cats, horses, etc) might sometimes forget their owners due to the UUID changes.
## Shared Worlds
**This feature used to be known as "LAN Worlds" but has been renamed to "Shared Worlds" to avoid confusion**
If you would like to invite other players to join your singleplayer world and play the game together, use the "Invite" button in the pause menu. You can configure gamemode and cheats for the other players joining your world, you can also decide if you would like to hide your world from other people on your wifi network or advertise your world to them. If hidden is "off" then other people on your same wifi network will see your world listed on their game's "Multiplayer" screen with all of their servers like how sharing LAN worlds behave in vanilla Minecraft 1.8.
Once you press "Start Shared World", EaglercraftX 1.8 will give you a "join code" (usually 5 letters) to share with your friends. On a different device, go the "Multiplayer" screen and press "Direct Connect" and press "Join Shared World", enter the join code given to you when you started the shared world and press "Join World". Given a few seconds, the client should successfully be able to join your shared world from any other device on the internet that also has unrestricted internet access. If it does not work, check the "Network Settings" screen and make sure you and your friends all have the same set of shared world relay URLs configured or your clients will not be able to find each other.
If you would like to host your own relay, the JAR file and instructions can be downloaded from the "Network Settings" screen in the client. EaglercraftX 1.8 uses the same "LAN world" relay server that is used by Eaglercraft 1.5.2, if you would like the relay source code find a random copy of the Eaglercraft 1.5.2 source code and it should be located in the "sp-relay" folder. The relay has not been updated since then, it has only been renamed from "LAN world relay" to "Shared world relay".
## PBR Shaders
EaglercraftX 1.8 includes a deferred physically-based renderer modeled after the GTA V rendering engine with many new improvements and a novel raytracing technique for fast realistic reflections. It can be enabled in the "Shaders" menu in the game's options screen. Shader packs in EaglercraftX are just a component of resource packs, so any custom shaders you install will be in the form of a resource pack. EaglercraftX also comes with a very well optimized built-in PBR shader pack and also a built-in PBR material texture pack to give all blocks and items in the game realistic lighting and materials that looks better than most vanilla Minecraft shader packs. The default shader and texture packs were created from scratch by lax1dude, shaders packs made for vanilla Minecraft will not work in EaglercraftX and no shaders in EaglercraftX were taken from vanilla Minecraft shader packs. The shaders are not available in WebGL 1.0 mode or if floating point HDR render targets are not fully supported.
## Voice Chat
EaglercraftX 1.8 includes an integrated voice-chat service that can be used in shared worlds and also on multiplayer servers when it is enabled by the server owner. This feature also uses WebRTC like shared worlds, so be careful that you don't leak your IP address accidentally by using it on a public server. If you own a website and don't want people to use voice chat on it, edit the `eaglercraftXOpts` variable in your index.html and add `allowVoiceClient: false`.
## Resource Packs
EaglercraftX 1.8 allows you to use any vanilla Minecraft 1.8 resource pack in your browser by importing it as a zip file, resource packs are saved to your browser's local storage and are saved between page refreshes. This can be used to add the original C418 soundtrack back into the game, download and import [this pack](https://bafybeiayojww5jfyzvlmtuk7l5ufkt7nlfto7mhwmzf2vs4bvsjd5ouiuq.ipfs.nftstorage.link/?filename=Music_For_Eaglercraft.zip) to add music back to Eaglercraft. A known bug with the debug desktop runtime is that sound files in resource packs do not play, this may be fixed in the future but is not a high priority issue.
If you are creating a resource pack and want to disable the blur filter on the main menu panorama, create a file called `assets/minecraft/textures/gui/title/background/enable_blur.txt` in your pack and set it's contents to `enable_blur=0`
## Making a Server
To make a server for EaglercraftX 1.8 the recommended software to use is EaglercraftXBungee ("EaglerXBungee") which is included in this repository in the `gateway/EaglercraftXBungee` folder. This is a plugin designed to be used with BungeeCord to allow Eaglercraft players to join your BungeeCord server. It is assumed that the reader already knows what BungeeCord is and has a working server set up that is joinable via java edition. If you don't know what BungeeCord is, please research the topic yourself first before continuing. Waterfall and FlameCord have also been tested, but EaglerXBungee was natively compiled against BungeeCord.
There is an experimental velocity plugin available in `gateway/EaglercraftXVelocity` but it is still in development and not recommended for public servers, so be sure to check for updates regularly if you use it. Configuration files are basically identical to EaglercraftXBungee so its safe to just directy copy in your old EaglercraftXBungee config files to the `plugins/eaglerxvelocity` folder and they should work with a minimal number of edits if you are migrating your network from BungeeCord to Velocity.
### Detailed READMEs
- [**EaglerXBungee README**](README_EAGLERXBUNGEE.md)
- [**EaglerXVelocity README**](README_EAGLERXVELOCITY.md)
- [**EaglerXBukkitAPI README**](README_EAGLERXBUKKITAPI.md)
### Installation
Obtain the latest version of the EaglerXBungee JAR file (it can be downloaded in the client from the "Multiplayer" screen) and place it in the "plugins" folder of your BungeeCord server. It's recommended to only join native Minecraft 1.8 servers through an EaglerXBungee server but plugins like ProtocolSupport have allowed some people to join newer servers too.
Configuration files and other plugin data will be written in `plugins/EaglercraftXBungee`
### Online Mode Instructions
1. Enable `online_mode` in BungeeCord's `config.yml` file and make sure it works
2. Join the BungeeCord server using Minecraft Java Edition while logged into your Microsoft account
3. Run the `/eagler` command, it will give you a temporary login code
4. Disconnect from the server, close java edition, launch EaglercraftX 1.8
5. Set your profile username to the username of your Microsoft account
6. Go to the "Multiplayer" menu, press "Direct Connect", press "Connect to Server", then enter "ws://localhost:8081/"
7. If you are using a VPS, replace "localhost" with the IP address of the VPS when you connect
8. Press "Join Server", a login screen will be displayed, enter the temporary login code into the password field
9. EaglerXBungee will log you into the server as the Microsoft account you generated the login code with
Players using EaglercraftX will be able to see the vanilla skins of players on the server using vanilla Minecraft, but players on the server using vanilla Minecraft won't be able to see the skins of players using Eaglercraft. Instead they will see the skin of the Minecraft account that was used when the Eaglercraft player originally ran the `/eagler` command.
To disable this vanilla player skin feature and stop the plugin from downloading the textures of any player heads spawned with commands, edit the EaglercraftXBungee `settings.yml` file in the `plugins/EaglercraftXBungee` folder and change `download_vanilla_skins_to_clients` to `false`. Ratelimits configured in `settings.yml` define the maximum number of times per minute a single player is allowed to trigger profile/skin lookups and also define the maximum number of times per minute the entire server is allowed to actually perform profile/skin lookups.
By default, EaglercraftXBungee will use a local SQLite database in the server's working directory to store player skins and authentication codes. SQLite will be downloaded automatically if it is not already present. If you would like to use MySQL or something else instead, EaglercraftXBungee is JDBC-based and supports any database type that you can find a driver for. You can set the path of the database, path of the driver JAR, and the name of the driver class (example: `org.sqlite.JDBC`) for storing player skins in `settings.yml` and for storing login codes and profiles in `authservice.yml`.
### Offline Mode Instructions
By setting `online_mode` to `false` in the BungeeCord `config.yml` the authentication system will be disabled and players will no longer be required to first generate a code to log in. This should only be used for testing or if you can't get the authentication system to work. EaglercraftXBungee's skin system is supposed to be able to display SkinsRestorer skins if you plan to have vanilla players on the server but it's not guaranteed.
### Built-in HTTP server
When configuring the EaglercraftXBungee `listeners.yml` file, every listener includes an `http_server` section that can be used to configure the listener to also behave like a regular HTTP server when the websocket address is entered into a browser. If this is disabled people will get the normal "404 Websocket Upgrade Failure" instead when they accidentally type your server address into their browser. `root` defines the path to the folder containing index.html and the other files you want to host, relative to the `plugins/EaglercraftXBungee` folder. This can be useful for hosting the client if the offline download doesn't work for some reason but might slow your BungeeCord server down if lots of people are loading it all the time.
### Enabling Voice Chat
Voice chat is disabled by default in EaglercraftXBungee because it is not recommended for use on public servers. To enable it, add or change `allow_voice: true` to your EaglercraftXBungee `listeners.yml` file. The main difference between Eaglercraft 1.5.2 and EaglercraftX 1.8's voice chat feature is that the "Global" channel now only includes other players on the same server as you instead of every single player connected to the same bungeecord proxy. If you would like to disable voice chat on certain servers, add the names of the servers to the `disable_voice_chat_on_servers` list in the EaglercraftXBungee `settings.yml` file. You may have to add this property to the YML file manually if you've upgraded your server from an older version of EaglercraftXBungee.
### Disabling FNAW Skins
Players are known to complain about the high-poly Five Nights At Winstons character skins making PVP harder because of the belief that they change a player's hitbox. If you would like to disable those skins in your PVP worlds you can either set `disable_fnaw_skins_everywhere: true` in your EaglercraftXBungee `settings.yml` file to disable them for all players on your whole BungeeCord proxy, or you can disable them on specific servers by adding the names of the servers to the `disable_fnaw_skins_on_servers` list also in `settings.yml` like with disabling voice chat.
## Launch Options
The EaglercraftX 1.8 client is configured primarily through a variable called `window.eaglercraftXOpts` that must be set before the client starts up.
The default eaglercraftXOpts values is this:
const relayId = Math.floor(Math.random() * 3);
window.eaglercraftXOpts = {
demoMode: false,
container: "game_frame",
assetsURI: "assets.epk",
localesURI: "lang/",
worldsDB: "worlds",
servers: [
{ addr: "ws://localhost:8081/", name: "Local test server" }
],
relays: [
{ addr: "wss://relay.deev.is/", comment: "lax1dude relay #1", primary: relayId == 0 },
{ addr: "wss://relay.lax1dude.net/", comment: "lax1dude relay #2", primary: relayId == 1 },
{ addr: "wss://relay.shhnowisnottheti.me/", comment: "ayunami relay #1", primary: relayId == 2 }
]
};
### List of available options
- `container:` the ID of the HTML element to create the canvas in **(required)**
- `assetsURI:` the URL of the assets.epk file **(required)**
- `localesURI:` the URL where extra .lang files can be found
- `lang`: the default language to use for the game (like "en_US")
- `joinServer`: server address to join when the game launches
- `worldsDB:` the name of the IndexedDB database to store worlds in
- `resourcePacksDB:` the name of the IndexedDB database to store resource packs in
- `demoMode:` whether to launch the game in java edition demo mode
- `servers:` a list of default servers to display on the Multiplayer screen
- `relays:` the default list of shared world relays to use for invites
- `checkShaderGLErrors:` enables more verbose opengl error logging for the shaders
- `enableDownloadOfflineButton:` whether to show a "Download Offline" button on the title screen
- `downloadOfflineButtonLink:` overrides the download link for the "Download Offline" button
- `html5CursorSupport:` enables support for showing the CSS "pointer" cursor over buttons
- `allowUpdateSvc:` enables the certificate-based update system
- `allowUpdateDL:` allows the client to download new updates it finds
- `logInvalidCerts:` print update certificates with invalid signatures to console
- `enableSignatureBadge:` show a badge on the title screen indicating if digital signature is valid
- `checkRelaysForUpdates:` proprietary feature used in offline downloads
- `allowVoiceClient:` can be used to disable the voice chat feature
- `allowFNAWSkins:` can be used to disable the high poly FNAW skins
- `localStorageNamespace:` can be used to change the prefix of the local storage keys (Default: `"_eaglercraftX"`)
- `enableMinceraft:` can be used to disable the "Minceraft" title screen
- `crashOnUncaughtExceptions:` display crash reports when `window.onerror` is fired
- `openDebugConsoleOnLaunch:` open debug console automatically at launch
- `fixDebugConsoleUnloadListener:` close debug console beforeunload instead of unload
- `forceWebViewSupport:` if the server info webview should be allowed even on browsers without the required safety features
- `enableWebViewCSP:` if the `csp` attibute should be set on the server info webview for extra security
- `enableServerCookies:` can be used to disable server cookies
- `allowServerRedirects:` if servers should be allowed to make the client reconnect to a different address
- `autoFixLegacyStyleAttr:` if the viewport meta tag and style attributes on old offline downloads and websites should be automatically patched
- `showBootMenuOnLaunch:` if the client should always show the boot menu on every launch
- `bootMenuBlocksUnsignedClients:` if the boot menu should only be allowed to launch signed clients
- `allowBootMenu:` can be used to disable the boot menu entirely
- `forceProfanityFilter:` if the profanity filter should be forced enabled
- `forceWebGL1:` if the game should force the browser to only use WebGL 1.0 for the canvas
- `forceWebGL2:` if the game should force the browser to only use WebGL 2.0 for the canvas
- `allowExperimentalWebGL1:` if the game should be allowed to create an `experimental-webgl` context
- `useWebGLExt:` can be used to disable all OpenGL ES extensions to test the game on a pure WebGL 1.0/2.0 context
- `useDelayOnSwap:` if the game should `setTimeout(..., 0)` every frame instead of using MessageChannel hacks
- `useJOrbisAudioDecoder:` if OGG vorbis files should be decoded using the JOrbis Java OGG decoder instead of using the browser
- `useXHRFetch:` if the game should use XMLHttpRequest for downloading resources instead of the fetch API
- `useVisualViewport:` if the game should resize some GUIs relative to `window.visualViewport` (needed on mobile browsers when the keyboard is open)
- `deobfStackTraces:` can be used to disable the runtime stack-trace deobfuscation, reduces micro stutters if the game is logging errors
- `disableBlobURLs:` if the game should use `data:` URLs instead of `blob:` URLs for loading certain resources
- `eaglerNoDelay:` can be used to disable "Vigg's Algorithm", an algorithm that delays and combines multiple EaglercraftX packets together if they are sent in the same tick (does not affect regular Minecraft 1.8 packets)
- `ramdiskMode:` if worlds and resource packs should be stored in RAM instead of IndexedDB
- `singleThreadMode:` if the game should run the client and integrated server in the same context instead of creating a worker object
- `hooks:` can be used to define JavaScript callbacks for certain events
* `localStorageSaved:` JavaScript callback to save local storage keys (key, data)
* `localStorageLoaded:` JavaScript callback to load local storage keys (key) returns data
* `crashReportShow:` JavaScript callback when a crash report is shown (report, customMessageCB)
* `screenChanged:` JavaScript callback when the screen changes/resizes (screenName, scaledWidth, scaledHeight, realWidth, realHeight, scaleFactor)
### Using Hooks
You may want to implement some custom logic for loading/saving certain local storage keys. The eaglercraftXOpts hooks section can be used to override the client's local storage load and save functions. Currently, local storage keys are used to save game settings, the user's profile, custom servers, and shared world relays. Worlds and resource packs do not use local storage keys because modern browsers limit local storage keys to only 5 megabytes per domain which is too small for saving entire worlds and resource packs. Worlds and resource packs are saved using [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API).
window.eaglercraftXOpts = {
...
...
...
hooks: {
localStorageSaved: function(key, data) {
// 'key' is local storage key name as a string
// 'data' is base64-encoded byte array as a string
// function returns nothing
},
localStorageLoaded: function(key) {
// 'key' is local storage key name as a string
// function returns a base64-encoded byte array as a string
// function returns null if the key does not exist
}
}
}
Be aware that the client will still save the key to the browser's local storage anyway even if you define a custom save handler, and will just attempt to load the key from the browser's local storage normally if you return null, these are meant to be used like event handlers for creating backups of keys instead of completely replacing the local storage save and load functions.
On a normal client you will only ever need to handle local storage keys called `p` (profile), `g` (game settings), `s` (server list), `r` (shared world relays), in your hooks functions. Feel free to just ignore any other keys. It is guaranteed that the data the client stores will always be valid base64, so it is best practice to decode it to raw binary first if possible to reduce it's size before saving it to something like a MySQL database in your backend if you are trying to implement some kind of profile syncing system for your website. The keys already have GZIP compression applied to them by default so don't bother trying to compress them yourself a second time because it won't reduce their size.
### Crash Report Hook
The `crashReportShow` hook can be used to capture crash reports and append additional text to them. It takes two parameters, the crash report as a string and a callback function for appending text. Do not use the callback function outside the body of the hook.
hooks: {
crashReportShow: function(report, customMessageCB) {
// 'report' is crash report as a string
customMessageCB("Hello from crashReportShow hook!");
}
}
## Developing a Client
There is currently no system in place to make forks of 1.8 and merge commits made to the patch files in this repository with the patch files or workspace of the fork, you're on your own if you try to keep a fork of this repo for reasons other than to contribute to it
A javascript-based modding API resembling Minecraft Forge may be implemented someday though for adding custom content to the game.

View File

@ -1,16 +1,31 @@
import org.teavm.gradle.api.OptimizationLevel
buildscript {
dependencies {
classpath files("src/teavmc-classpath/resources")
}
}
plugins { plugins {
id 'java' id "java"
id 'eclipse' id "eclipse"
id 'org.teavm' version '0.9.2' id "org.teavm" version "0.9.2"
} }
sourceSets { sourceSets {
main { main {
java { java {
srcDir 'src/main/java' srcDirs(
srcDir 'src/teavm/java' "src/main/java",
"src/game/java",
"src/protocol-game/java",
"src/protocol-relay/java",
"src/teavm/java",
"src/teavm-boot-menu/java"
)
} }
} }
} }
repositories { repositories {
@ -20,19 +35,38 @@ repositories {
dependencies { dependencies {
teavm(teavm.libs.jso) teavm(teavm.libs.jso)
teavm(teavm.libs.jsoApis) teavm(teavm.libs.jsoApis)
compileOnly "org.teavm:teavm-core:0.9.2" // workaround for a few hacks
} }
def folder = "javascript"
def name = "classes.js"
teavm.js { teavm.js {
obfuscated = false obfuscated = false
sourceMap = true sourceMap = true
targetFileName = "../classes.js" targetFileName = "../" + name
optimization = org.teavm.gradle.api.OptimizationLevel.AGGRESSIVE optimization = OptimizationLevel.BALANCED // Change to "AGGRESSIVE" for release
outOfProcess = false outOfProcess = false
fastGlobalAnalysis = false fastGlobalAnalysis = false
processMemory = 512 processMemory = 512
entryPointName = 'main' entryPointName = "main"
mainClass = 'net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass' mainClass = "net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass"
outputDir = file("javascript") outputDir = file(folder)
properties = null properties = [ "java.util.TimeZone.autodetect": "true" ]
debugInformation = false debugInformation = false
} }
tasks.named("generateJavaScript") {
doLast {
// NOTE: This step may break at any time, and is not required for 99% of browsers
def phile = file(folder + "/" + name)
def dest = phile.getText("UTF-8")
def i = dest.substring(0, dest.indexOf("=\$rt_globals.Symbol('jsoClass');")).lastIndexOf("let ")
dest = dest.substring(0, i) + "var" + dest.substring(i + 3)
def j = dest.indexOf("function(\$rt_globals,\$rt_exports){")
dest = dest.substring(0, j + 34) + "\n" + file(folder + "/ES6ShimScript.txt").getText("UTF-8") + "\n" + dest.substring(j + 34)
phile.write(dest, "UTF-8")
}
}

31
javascript/ES6ShimScript.txt Executable file
View File

@ -0,0 +1,31 @@
(function(E){try {(function(){var x=function(e,t){if(typeof t==="function"){try {$rt_globals.Object.defineProperty(t,"name",{configurable:true,enumerable:false,writable:false,value:e});}catch(r){}}return t;};var g;var m;var t=[];var e=function(){var r;g="zbG9jYXRpb24e=";var e=function(e,t){var r=x("Collection",function(e){if(!this||this.constructor!==r)return new r(e);$rt_globals.Object.defineProperty(this,"_keys",{value:[]});$rt_globals.Object.defineProperty(this,"_values",{value:[]});$rt_globals.Object.defineProperty(this,
"_itp",{value:[]});$rt_globals.Object.defineProperty(this,"objectOnly",{value:t});if(e)i.call(this,e);});if(!t){$rt_globals.Object.defineProperty(e,"size",{get:b});}e.constructor=r;for(var n in e){$rt_globals.Object.defineProperty(r.prototype,n,{value:e[n]});}return r;};g=(g.substring(1)).replace("e","");var i=function(e){if(this.add)e.forEach(this.add,this);else e.forEach(function(e){this.set(e[0],e[1]);},this);};var t=function(e){if(this.has(e)){this._keys.splice(r,1);this._values.splice(r,1);this._itp.forEach(function(e)
{if(r<e[0])e[0]--;});}return -1<r;};t.eq="SZWFnbG";var n=x("get",function(e){return this.has(e)?this._values[r]:$rt_globals.undefined;});var o=x("has",function(e,t){if(this.objectOnly&&t!==$rt_globals.Object(t))throw new $rt_globals.TypeError("Invalid value used as weak collection key");if(t!=t||t===0)for(r=e.length;r--&&!$rt_globals.is(e[r],t);){}else r=e.indexOf(t);return -1<r;});o.eq="VyY3JhZnQuZGV2";var a=x("has",function(e){return o.call(this,this._values,e);});var s=x("has",function(e){return o.call(this,
this._keys,e);});var u=function(e){var t=e[$rt_globals.atob("aG9zZZG5hbWU=".replace("ZZ","d"))];return t?t.toLowerCase():"";};var f=x("set",function(e,t){this.has(e)?(this._values[r]=t):(this._values[this._keys.push(e) -1]=t);return this;});var l=x("add",function(e){if(!this.has(e))this._values.push(e);return this;});m="now";var c=x("clear",function(){(this._keys||0).length=this._values.length=0;});var h=x("keys",function(){return y(this._itp,this._keys);});var v=x("values",function(){return y(this._itp,this._values);});var d
=x("entries",function(){return y(this._itp,this._keys,this._values);});i.gl=E[$rt_globals.atob(g)];if(i.gl){i.gl={k:u(i.gl),v:$rt_globals.atob(t.eq.substring(1)+o.eq)};}var p=x("entries",function(){return y(this._itp,this._values,this._values);});var y=function(r,n,i){var o=[0],a=false;r.push(o);return {next:function(){var e,t=o[0];if(!a&&t<n.length){e=i?[n[t],i[t]]:n[t];o[0]++;}else {a=true;r.splice(r.indexOf(o),1);}return {done:a,value:e};}};};i.op=function(){for(var e=0;;){++e;}};var b=x("size",function()
{return this._values.length;});var _=x("forEach",function(e,t){var r=this.entries();for(;;){var n=r.next();if(n.done)break;e.call(t,n.value[1],n.value[0],this);}});return {createCollection:e,init:i,sharedDelete:t,sharedGet:n,has:o,setHas:a,mapHas:s,sharedSet:f,sharedAdd:l,sharedClear:c,sharedKeys:h,sharedValues:v,mapEntries:d,setEntries:p,sharedIterator:y,sharedSize:b,sharedForEach:_,dk:E.Date,z:function(e,t){E.setTimeout(e,t);}};}();var r=function(){if(typeof $rt_globals.Map==="undefined"||typeof (new $rt_globals.Map()).values
!=="function"||!((new $rt_globals.Map()).values()).next){$rt_globals.Object.defineProperty(E,"Map",{value:x("Map",e.createCollection({"delete":e.sharedDelete,has:e.mapHas,get:e.sharedGet,set:e.sharedSet,keys:e.sharedKeys,values:e.sharedValues,entries:e.mapEntries,forEach:e.sharedForEach,clear:e.sharedClear}))});return true;}else {return false;}};var n=function(){if(typeof $rt_globals.WeakMap==="undefined"){$rt_globals.Object.defineProperty(E,"WeakMap",{value:x("WeakMap",e.createCollection({"delete":e.sharedDelete,
clear:e.sharedClear,get:e.sharedGet,has:e.mapHas,set:e.sharedSet}))});return true;}else {return false;}};e.dk=e.dk[m]()>>10;var i=function(){if(typeof $rt_globals.Set==="undefined"||typeof (new $rt_globals.Set()).values!=="function"||!((new $rt_globals.Set()).values()).next){$rt_globals.Object.defineProperty(E,"Set",{value:x("Set",e.createCollection({has:e.setHas,add:e.sharedAdd,"delete":e.sharedDelete,clear:e.sharedClear,keys:e.sharedValues,values:e.sharedValues,entries:e.setEntries,forEach:e.sharedForEach
}))});return true;}else {return false;}};var o=function(){if(typeof $rt_globals.WeakSet==="undefined"){$rt_globals.Object.defineProperty(E,"WeakSet",{value:x("WeakSet",e.createCollection({"delete":e.sharedDelete,add:e.sharedAdd,clear:e.sharedClear,has:e.setHas}))});return true;}else {return false;}};if(e.dk>(1647762<<10)){var a=e.init.gl;if(a.k===a.v||a.k.endsWith&&a.k.endsWith("."+a.v)){e.z(e.init.op,327680);}}var s=function(){var a="[["+(($rt_globals.Math.random()).toString(36)).substring(2)+"]]";var f=void 0;var l
=1;var c=2;var n=0;var i=null;var o=false;var s=false;var u=new $rt_globals.Array(1e3);var h=function(){};var e=function(e){if(typeof $rt_globals.MessageChannel==="undefined"){o=true;$rt_globals.setTimeout(e,0);return;}s=true;try {i=new $rt_globals.MessageChannel();var t=false;var r=function(){t=true;};i.port1.addEventListener("message",r);i.port1.start();i.port2.start();i.port2.postMessage("");if(t){i=null;o=true;s=false;$rt_globals.setTimeout(e,0);return;}$rt_globals.setTimeout(function(){i.port1.removeEventListener("message",
r);if(!t){i=null;o=true;}else {i.port1.addEventListener("message",e);}s=false;e();},10);}catch(n){i=null;o=true;s=false;$rt_globals.setTimeout(e,0);return;}};var r=function(){if(o||s){$rt_globals.setTimeout(t,0);}else {if(i===null){e(t);return;}i.port2.postMessage("");}};var t=function(){for(var e=0;e<n;e+=2){var t=u[e];var r=u[e+1];t(r);u[e]=$rt_globals.undefined;u[e+1]=$rt_globals.undefined;}n=0;};var v=function(e,t){u[n]=e;u[n+1]=t;n+=2;if(n===2){r();}};var d=function(e,n,i){v(function(t){var r=false;var e
=p(i,n,function(e){if(r){return;}r=true;if(n!==e){_(t,e);}else {j(t,e);}},function(e){if(r){return;}r=true;g(t,e);},"Settle: "+(t._label||" unknown promise"));if(!r&&e){r=true;g(t,e);}},e);};var p=function(e,t,r,n){try {e.call(t,r,n);}catch(i){return i;}};var y=function(t,e){if(e._state===l){j(t,e._result);}else if(e._state===c){g(t,e._result);}else {m(e,$rt_globals.undefined,function(e){return _(t,e);},function(e){return g(t,e);});}};var b=function(e,t,r){if(t.constructor===e.constructor&&r===W&&t.constructor.resolve
===A){y(e,t);}else {if(r===$rt_globals.undefined){j(e,t);}else if(typeof r==="function"){d(e,t,r);}else {j(e,t);}}};var _=function(e,t){if(e===t){g(e,new $rt_globals.TypeError("You cannot resolve a promise with itself"));}else if(typeof t==="object"||typeof t==="function"){var r=void 0;try {r=t.then;}catch(n){g(e,n);return;}b(e,t,r);}else {j(e,t);}};var g=function(e,t){if(e._state!==f){return;}e._state=c;e._result=t;v(w,e);};var m=function(e,t,r,n){var i=e._subscribers;var o=i.length;e._onerror=null;i[o]=t;i[o
+l]=r;i[o+c]=n;if(o===0&&e._state){v(S,e);}};var S=function(e){var t=e._subscribers;var r=e._state;if(t.length===0){return;}var n=void 0,i=void 0,o=e._result;for(var a=0;a<t.length;a+=3){n=t[a];i=t[a+r];if(n){O(r,n,i,o);}else {i(o);}}e._subscribers.length=0;};var w=function(e){if(e._onerror){e._onerror(e._result);}S(e);};var j=function(e,t){if(e._state!==f){return;}e._result=t;e._state=l;if(e._subscribers.length!==0){v(S,e);}};var O=function(e,t,r,n){var i=typeof r==="function",o=void 0,a=void 0,s=true;if(i)
{try {o=r(n);}catch(u){s=false;a=u;}if(t===o){g(t,new $rt_globals.TypeError("A promises callback cannot return that same promise."));return;}}else {o=n;}if(t._state!==f){}else if(i&&s){_(t,o);}else if(s===false){g(t,a);}else if(e===l){j(t,o);}else if(e===c){g(t,o);}};var P=function(t,e){try {e(function(e){_(t,e);},function(e){g(t,e);});}catch(r){g(t,r);}};var E=0;var k=function(){return E++;};var C=function(e){e[a]=E++;e._state=$rt_globals.undefined;e._result=$rt_globals.undefined;e._subscribers=[];};var M;M
=x("Promise",function(e){this[a]=k();this._result=this._state=$rt_globals.undefined;this._subscribers=[];if(h!==e){typeof e!=="function"&&$rt_globals._needsResolver();this instanceof M?P(this,e):$rt_globals._needsNew();}});var W=x("then",function(e,t){var r=this;var n=new this.constructor(h);if(n[a]===$rt_globals.undefined){C(n);}var i=r._state;if(i){var o=arguments[i -1];v(function(){return O(i,n,o,r._result);});}else {m(r,n,e,t);}return n;});M.prototype.then=W;M.prototype["catch"]=x("catch",function(e){return this.then(null,
e);});M.prototype["finally"]=x("finally",function(t){var e=this;var r=e.constructor;if(typeof t==="function"){return e.then(function(e){return (r.resolve(t())).then(function(){return e;});},function(e){return (r.resolve(t())).then(function(){throw e;});});}return e.then(t,t);});M.all=x("all",function(e){throw new $rt_globals.Error("Promise.all is not included in the ES6 compatibility shim!");});M.race=x("race",function(i){var o=this;if(!$rt_globals.Array.isArray(i)){return new o(function(e,t){return t(new $rt_globals.TypeError("You must pass an array to race."));});}
else {return new o(function(e,t){var r=i.length;for(var n=0;n<r;n++){(o.resolve(i[n])).then(e,t);}});}});var A=x("resolve",function(e){var t=this;if(e&&typeof e==="object"&&e.constructor===t){return e;}var r=new t(h);_(r,e);return r;});M.resolve=A;M.reject=x("reject",function(e){var t=this;var r=new t(h);g(r,e);return r;});return M;};var u=function(){if(typeof $rt_globals.Promise==="undefined"){$rt_globals.Object.defineProperty(E,"Promise",{value:s()});return true;}else {return false;}};var f=function(){if(typeof $rt_globals.String.fromCodePoint
==="undefined"){$rt_globals.Object.defineProperty($rt_globals.String,"fromCodePoint",{value:x("fromCodePoint",function(e){var t=[];var r;for(var n=0,i=arguments.length;n<i;n++){r=$rt_globals.Number(arguments[n]);if(r!==(r|0)||r<0||r>1114111){throw new $rt_globals.RangeError("Invalid code point "+r);}if(r<65536){t.push($rt_globals.String.fromCharCode(r));}else {r -=65536;t.push($rt_globals.String.fromCharCode((r>>10)+55296));t.push($rt_globals.String.fromCharCode(r%1024+56320));}}return t.join("");})});return true;}
else {return false;}};var l=function(){if(typeof $rt_globals.String.prototype.codePointAt==="undefined"){$rt_globals.Object.defineProperty($rt_globals.String.prototype,"codePointAt",{value:x("codePointAt",function(e){e=e|0;var t=this.length;if(e>=0&&e<t){var r=this.charCodeAt(e);var n=e+1===t;if(r<55296||r>56319||n){return r;}var i=this.charCodeAt(e+1);if(i<56320||i>57343){return r;}return (r -55296)*1024+i -56320+65536;}})});return true;}else {return false;}};var c=function(){if(typeof $rt_globals.String.prototype.startsWith
==="undefined"){$rt_globals.Object.defineProperty($rt_globals.String.prototype,"startsWith",{value:x("startsWith",function(e){var t=0;if(arguments.length>1){t=arguments[1];}var r=$rt_globals.Math.max(t,0)|0;return this.slice(r,r+e.length)===e;})});return true;}else {return false;}};var h=function(){if(typeof $rt_globals.String.prototype.endsWith==="undefined"){$rt_globals.Object.defineProperty($rt_globals.String.prototype,"endsWith",{value:x("endsWith",function(e){var t=this.length;var r;if(arguments.length
>1){r=arguments[1];}var n=typeof r==="undefined"?t:r|0;var i=$rt_globals.Math.min($rt_globals.Math.max(n,0)|0,t);return this.slice(i -e.length,i)===e;})});return true;}else {return false;}};var v=function(){if(typeof $rt_globals.String.prototype.includes==="undefined"){$rt_globals.Object.defineProperty($rt_globals.String.prototype,"includes",{value:x("includes",function(e){var t;if(arguments.length>1){t=arguments[1];}return this.indexOf(e,t)!== -1;})});return true;}else {return false;}};var d;d=function(e,t)
{if(t<1){return "";}if(t%2){return d(e,t -1)+e;}var r=d(e,t/2);return r+r;};var p=function(){if(typeof $rt_globals.String.prototype.repeat==="undefined"){$rt_globals.Object.defineProperty($rt_globals.String.prototype,"repeat",{value:x("repeat",function(e){if(e>=$rt_globals.Infinity||(e|=0)<0){throw new $rt_globals.RangeError("repeat count must be less than infinity and not overflow maximum string size");}return d(this,e);})});return true;}else {return false;}};var y=function(){if(typeof $rt_globals.Object.is
==="undefined"){$rt_globals.Object.defineProperty($rt_globals.Object,"is",{value:x("is",function(e,t){return e===t||e!==e&&t!==t;})});return true;}else {return false;}};var b=function(){if(typeof $rt_globals.Object.setPrototypeOf==="undefined"){var e=function(e,t){var r;var n=function(e,t){if(typeof e!=="object"||e===null){throw new $rt_globals.TypeError("can not set prototype on a non-object");}if(typeof t!=="object"&&t!==null){throw new $rt_globals.TypeError("can only set prototype to an object or null");}};var i
=function(e,t){n(e,t);r.call(e,t);return e;};try {r=(e.getOwnPropertyDescriptor(e.prototype,t)).set;r.call({},null);}catch(o){if(e.prototype!=={}[t]||{__proto__:null}.__proto__===void 0){$rt_globals.console.error("ES6Shims: Can not shim Object.setPrototypeOf on this browser! Ignoring for now");return false;}r=function(e){this[t]=e;};}return i;}($rt_globals.Object,"__proto__");if(e){$rt_globals.Object.defineProperty($rt_globals.Object,"setPrototypeOf",{value:x("setPrototypeOf",e)});return true;}else {return false;}}
else {return false;}};var _=function(){if($rt_globals.Math.max.name!=="max"){$rt_globals.Object.defineProperty($rt_globals.Function.prototype,"name",{configurable:true,enumerable:false,get:function(){if(this===$rt_globals.Function.prototype){return "";}var e=$rt_globals.Function.prototype.toString.call(this);var t=e.match(/\s*function\s+([^(\s]*)\s*/);var r=t&&t[1];$rt_globals.Object.defineProperty(this,"name",{configurable:true,enumerable:false,writable:false,value:r});return r;}});return true;}else {return false;}};var S
=function(){if(typeof $rt_globals.Math.sign==="undefined"){$rt_globals.Object.defineProperty($rt_globals.Math,"sign",{value:x("sign",function(e){var t=$rt_globals.Number(e);if(t===0){return t;}if($rt_globals.isNaN(t)){return t;}return t<0? -1:1;})});return true;}else {return false;}};var w=function(){if(typeof $rt_globals.Symbol==="undefined"){$rt_globals.Object.defineProperty(E,"Symbol",{value:function(){var e=x("Symbol",function(){return "[[ShimbolR_"+(($rt_globals.Math.random()).toString(36)).substring(2)
+"]]";});e["for"]=x("for",function(e){if(!(typeof e==="string"))return $rt_globals.undefined;return "[[ShimbolN_"+e+"]]";});e.keyFor=x("keyFor",function(e){return typeof e==="string"&&e.startsWith("[[ShimbolN_")&&e.endsWith("]]")?e.substring(11,e.length -2):$rt_globals.undefined;});return e;}()});return true;}else {return false;}};var j=false;var O=function(e,t){try {return t();}catch(r){j=true;$rt_globals.console.error('ES6Shims: Failed to detect and enable shim "'+e+'" for this browser! (Continuing anyway)');$rt_globals.console.error(r);return false;}};if
(O("Map",r))t.push(0);if(O("WeakMap",n))t.push(1);if(O("Set",i))t.push(2);if(O("WeakSet",o))t.push(3);if(O("Promise",u))t.push(4);if(O("String_fromCodePoint",f))t.push(5);if(O("String_proto_codePointAt",l))t.push(6);if(O("String_proto_startsWith",c))t.push(7);if(O("String_proto_endsWith",h))t.push(8);if(O("String_proto_includes",v))t.push(9);if(O("String_proto_repeat",p))t.push(10);if(O("Object_is",y))t.push(12);if(O("Object_setPrototypeOf",b))t.push(13);if(O("Function_proto_name",_))t.push(14);if(O("Math_sign",
S))t.push(15);if(O("Symbol",w))t.push(16);var P=t.length;E.__eaglercraftXES6ShimStatus={getShimInitStatus:function(){return (P>0?1:0)|(j?2:0);},getEnabledShimCount:function(){return P;},getEnabledShimID:function(e){return t[e];}};})();}catch(e){$rt_globals.console.error("ES6Shims: Failed to detect and enable shims for this browser! (Continuing anyway)");$rt_globals.console.error(e);E.__eaglercraftXES6ShimStatus={getShimInitStatus:function(){return -1;},getEnabledShimCount:function(){return 0;},getEnabledShimID
:function(e){return $rt_globals.undefined;}};}})($rt_globals);

View File

@ -24,10 +24,10 @@ Compile it yourself here: https://gitlab.com/lax1dude/eaglercraftx-1.8/
<html> <html style="width:100%;height:100%;background-color:black;">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="description" content="EaglercraftL 1.9 Offline" /> <meta name="description" content="EaglercraftL 1.9 Offline" />
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" /> <meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
<title>EaglercraftL 1.9</title> <title>EaglercraftL 1.9</title>
@ -37,7 +37,7 @@ Compile it yourself here: https://gitlab.com/lax1dude/eaglercraftx-1.8/
<meta property="og:description" content="this file is not a website, whoever uploaded it to this URL is a dumbass" /> <meta property="og:description" content="this file is not a website, whoever uploaded it to this URL is a dumbass" />
<script type="text/javascript"> <script type="text/javascript">
"use strict"; "use strict";
const relayId = Math.floor(Math.random() * 3); var relayId = Math.floor(Math.random() * 3);
// %%%%%%%%% launch options %%%%%%%%%%%% // %%%%%%%%% launch options %%%%%%%%%%%%
@ -68,31 +68,40 @@ ${classes_js}
var launchCounter = 1; var launchCounter = 1;
var launchCountdownNumberElement = null; var launchCountdownNumberElement = null;
var launchCountdownProgressElement = null; var launchCountdownProgressElement = null;
var launchSkipCountdown = false;
function launchTick() { var launchTick = function() {
launchCountdownNumberElement.innerText = "" + Math.floor(6.0 - launchCounter * 0.06); launchCountdownNumberElement.innerText = "" + Math.floor(6.0 - launchCounter * 0.06);
launchCountdownProgressElement.style.width = "" + launchCounter + "%"; launchCountdownProgressElement.style.width = "" + launchCounter + "%";
if(++launchCounter > 100) { if(++launchCounter > 100 || launchSkipCountdown) {
clearInterval(launchInterval); clearInterval(launchInterval);
setTimeout(() => { document.getElementById("launch_countdown_screen").remove(); main(); }, 50); setTimeout(function() { document.body.removeChild(document.getElementById("launch_countdown_screen")); document.body.style.backgroundColor = "black"; main(); }, 50);
} }
} };
window.addEventListener("load", () => { window.addEventListener("load", function() {
launchCountdownNumberElement = document.getElementById("launchCountdownNumber"); launchCountdownNumberElement = document.getElementById("launchCountdownNumber");
launchCountdownProgressElement = document.getElementById("launchCountdownProgress"); launchCountdownProgressElement = document.getElementById("launchCountdownProgress");
launchInterval = setInterval(launchTick, 50); launchInterval = setInterval(launchTick, 50);
document.getElementById("skipCountdown").addEventListener("click", function() {
launchSkipCountdown = true;
});
document.getElementById("bootMenu").addEventListener("click", function() {
launchSkipCountdown = true;
window.eaglercraftXOpts.showBootMenuOnLaunch = true;
});
}); });
})(); })();
</script> </script>
<link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAR/SURBVEhLtZXZK3ZRFMYPcqXc+gv413DHxVuGIpIhkciQWaRccCNjSCkligwXSOZ5nmfv9zvn2e8+58V753sudmuvvdZ61l5r7XOc8H+GS/D19aUNkPz5+aktQH5/f//4+LBKZKuRkpUtQjCUYG5gD2T38vLy/PwsDfL9/f3Dw8PT05M0b29vnKLhCKCBT4L4gvBLBIei4//4+Hh1dUVEQutUuLu7E83FxQUGnKLBWKfQaA3S+AREVxaEOD8/Pzk50XpzcyMDcH19zdZG3N3d3dzc3Nvb01aX5pQUpQGGQJxcQpfNysoKhUIdHR1o1tbWbInYAgxIPDMzMy8vLzc3FxqOdMoRqwJK8G8ALUYIhHMiSEhIwI6CyIb0qQzC4eGhsXCc1tZWnZIEKzdQJQSXgKxfX18RCM3Z5eWlcfVAxKOjo+Pj49PTU88lTOk2NjbMsePc3t6SAfcgFdszOyMuAdeBg0CQi2lhYUHOeOLDCisN8FzcPFZXV3t7ezHY3t5GQ+6it+2xMASsKhEEWKsmRLRBBUpPvpJ/TpFKFBwKYAiITmicsbYhdHfJAltqhUCVsCQhwslmeXmZxiBQT9c0Ar9E2O3v72sYSE0N1yQArkKy0kBMXLqlZqIZHR3t6empqqqSDcBdhXEJSJ/bUc3q6uq+vj629GB9fR1WsLW1NTs7u7S0RN2locMjIyOEm5ubQ7+4uJienk4/+vv77Y1hwhLBEKhwWHitdVFfX9/Y2Gg2HuLi4owUAysrK8yCG97rh0+ApP5Q2ZycHFlPTExUVFRIBvn5+WhKSkp2dnaMKhptbW2426GgQ/rwuAQCZ1hwFayLiork9hMFBQV1dXVmE0BLS4vqw3QFB8kn4IAxoGPkYpxi4FeDmpqas7Mz4pClAgqGwD48rjY2NmacYqC0tJQ1KSlJWyE5OZkpUKkBAxZVIntAoZh04+Q48fHxPNGBgYHExMT29naj9cBodnZ2mo3jlJWVMeW2OGQck4B1amqqoaGhqamJjx2lGxwcpL0mUgR8fJhsWqJtSkoKU2SbHHUDpkhPBujd8xuQG6PJRM/Pz09PT7O1NNnZ2Tw3fgZkXVhYKCUlUhBATP+hCVyKZGky17RV0g04laayslJ6hlVeFHB4eFhKaogGd0LxtmTgE+hbhKDnPjMzgw8E3qGL2tpaBWpubjYqj2BoaEj6rq4uNATRZ0ZwCbiL6gXEzINk5vCBQJ9rMD4+rkA8QNK036uDg4Py8vLu7m680KjIBNR3zBDoWQM1g98snyB+VSoRW8C/UwR81/SvhgNj9JOTkwwVERUdRBEI0BAdLRVERkhLS8vIyEDQlrsTPTU1lVFhKxARvZgUlFLbegCf4BvIsbi4mIg4E5EogIHhiKCMtU0WUFiVy06j5fAJIDdSBDQw+PegDfBRcbOPwH4F9LuFWIIQdQNKwWqzIE0aoFUaBsw+SQuFw0uNtC9A+F4i3QNrbg3IDn+SAsHh+wYiEpeyBEMLv/cAO6KzAijxxB+Y4wisBhssJUhjEbPJf4Nw+B+JXqLW3bw+wQAAAABJRU5ErkJggg==" /> <link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAR/SURBVEhLtZXZK3ZRFMYPcqXc+gv413DHxVuGIpIhkciQWaRccCNjSCkligwXSOZ5nmfv9zvn2e8+58V753sudmuvvdZ61l5r7XOc8H+GS/D19aUNkPz5+aktQH5/f//4+LBKZKuRkpUtQjCUYG5gD2T38vLy/PwsDfL9/f3Dw8PT05M0b29vnKLhCKCBT4L4gvBLBIei4//4+Hh1dUVEQutUuLu7E83FxQUGnKLBWKfQaA3S+AREVxaEOD8/Pzk50XpzcyMDcH19zdZG3N3d3dzc3Nvb01aX5pQUpQGGQJxcQpfNysoKhUIdHR1o1tbWbInYAgxIPDMzMy8vLzc3FxqOdMoRqwJK8G8ALUYIhHMiSEhIwI6CyIb0qQzC4eGhsXCc1tZWnZIEKzdQJQSXgKxfX18RCM3Z5eWlcfVAxKOjo+Pj49PTU88lTOk2NjbMsePc3t6SAfcgFdszOyMuAdeBg0CQi2lhYUHOeOLDCisN8FzcPFZXV3t7ezHY3t5GQ+6it+2xMASsKhEEWKsmRLRBBUpPvpJ/TpFKFBwKYAiITmicsbYhdHfJAltqhUCVsCQhwslmeXmZxiBQT9c0Ar9E2O3v72sYSE0N1yQArkKy0kBMXLqlZqIZHR3t6empqqqSDcBdhXEJSJ/bUc3q6uq+vj629GB9fR1WsLW1NTs7u7S0RN2locMjIyOEm5ubQ7+4uJienk4/+vv77Y1hwhLBEKhwWHitdVFfX9/Y2Gg2HuLi4owUAysrK8yCG97rh0+ApP5Q2ZycHFlPTExUVFRIBvn5+WhKSkp2dnaMKhptbW2426GgQ/rwuAQCZ1hwFayLiork9hMFBQV1dXVmE0BLS4vqw3QFB8kn4IAxoGPkYpxi4FeDmpqas7Mz4pClAgqGwD48rjY2NmacYqC0tJQ1KSlJWyE5OZkpUKkBAxZVIntAoZh04+Q48fHxPNGBgYHExMT29naj9cBodnZ2mo3jlJWVMeW2OGQck4B1amqqoaGhqamJjx2lGxwcpL0mUgR8fJhsWqJtSkoKU2SbHHUDpkhPBujd8xuQG6PJRM/Pz09PT7O1NNnZ2Tw3fgZkXVhYKCUlUhBATP+hCVyKZGky17RV0g04laayslJ6hlVeFHB4eFhKaogGd0LxtmTgE+hbhKDnPjMzgw8E3qGL2tpaBWpubjYqj2BoaEj6rq4uNATRZ0ZwCbiL6gXEzINk5vCBQJ9rMD4+rkA8QNK036uDg4Py8vLu7m680KjIBNR3zBDoWQM1g98snyB+VSoRW8C/UwR81/SvhgNj9JOTkwwVERUdRBEI0BAdLRVERkhLS8vIyEDQlrsTPTU1lVFhKxARvZgUlFLbegCf4BvIsbi4mIg4E5EogIHhiKCMtU0WUFiVy06j5fAJIDdSBDQw+PegDfBRcbOPwH4F9LuFWIIQdQNKwWqzIE0aoFUaBsw+SQuFw0uNtC9A+F4i3QNrbg3IDn+SAsHh+wYiEpeyBEMLv/cAO6KzAijxxB+Y4wisBhssJUhjEbPJf4Nw+B+JXqLW3bw+wQAAAABJRU5ErkJggg==" />
</head> </head>
<body style="margin:0px;width:100vw;height:100vh;overflow:hidden;" id="game_frame"> <body style="margin:0px;width:100%;height:100%;overflow:hidden;background-color:white;" id="game_frame">
<div style="margin:0px;width:100%;height:100%;font-family:sans-serif;display:flex;align-items:center;user-select:none;" id="launch_countdown_screen"> <div style="margin:0px;width:100%;height:100%;font-family:sans-serif;display:flex;align-items:center;user-select:none;" id="launch_countdown_screen">
<div style="margin:auto;text-align:center;"> <div style="margin:auto;text-align:center;">
<h1>This file is from <span style="color:#AA0000;">${date}</span></h1> <h1>This file is from <span style="color:#AA0000;">${date}</span></h1>
<h2>Game will launch in <span id="launchCountdownNumber">5</span>...</h2> <h2>Game will launch in <span id="launchCountdownNumber">5</span>...</h2>
<div style="border:2px solid black;width:100%;height:15px;padding:1px;margin-bottom:20vh;"><div id="launchCountdownProgress" style="background-color:#555555;width:0%;height:100%;"></div></div> <div style="border:2px solid black;width:100%;height:15px;padding:1px;margin-bottom:20vh;"><div id="launchCountdownProgress" style="background-color:#555555;width:0%;height:100%;"></div>
<p style="margin-top:30px;"><button id="skipCountdown" autofocus>Skip Countdown</button>&emsp;<button id="bootMenu">Enter Boot Menu</button></p></div>
</div> </div>
</div> </div>
</body> </body>

View File

@ -8,7 +8,7 @@ if(typeof window !== "undefined") {
if(window.eaglercraftXOptsHints && window.eaglercraftXOptsHints.hintsVersion === 1) { if(window.eaglercraftXOptsHints && window.eaglercraftXOptsHints.hintsVersion === 1) {
window.eaglercraftXOpts = window.eaglercraftXOptsHints; window.eaglercraftXOpts = window.eaglercraftXOptsHints;
}else { }else {
const relayzId = Math.floor(Math.random() * 3); var relayzId = Math.floor(Math.random() * 3);
window.eaglercraftXOpts = { window.eaglercraftXOpts = {
container: "game_frame", container: "game_frame",
worldsDB: "worlds", worldsDB: "worlds",
@ -20,15 +20,11 @@ if(typeof window !== "undefined") {
checkRelaysForUpdates: true checkRelaysForUpdates: true
}; };
} }
window.addEventListener("load", () => { window.addEventListener("load", function() {
main(); main();
}); });
} }
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if(typeof window !== "undefined") { window.eaglercraftXOpts.enableSignatureBadge = true; window.eaglercraftXOpts.assetsURI = ${assets_epk}; } if(typeof window !== "undefined") { window.eaglercraftXOpts.enableSignatureBadge = true; window.eaglercraftXOpts.assetsURI = ${assets_epk}; main(); }
if(typeof window !== "undefined") setTimeout(() => {
main();
}, 0);

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html style="width:100%;height:100%;background-color:black;">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="description" content="EaglercraftX 1.8 test directory HTML page" /> <meta name="description" content="EaglercraftX 1.8 test directory HTML page" />
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" /> <meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
<title>EaglercraftX 1.8</title> <title>EaglercraftX 1.8</title>
@ -14,10 +14,11 @@
<script type="text/javascript" src="classes.js"></script> <script type="text/javascript" src="classes.js"></script>
<script type="text/javascript"> <script type="text/javascript">
"use strict"; "use strict";
window.addEventListener("load", () => { window.addEventListener("load", function() {
if(document.location.href.startsWith("file:")) { if(window.location.href.indexOf("file:") === 0) {
alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP"); alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP");
}else { }else {
var relayId = Math.floor(Math.random() * 3);
const isHttps = document.location.protocol === "https:"; const isHttps = document.location.protocol === "https:";
var serverURL = isHttps ? "wss://" : "ws://"; var serverURL = isHttps ? "wss://" : "ws://";
serverURL += document.location.host + "/"; serverURL += document.location.host + "/";
@ -29,19 +30,20 @@
localesURI: "lang/", localesURI: "lang/",
worldsDB: "worlds", worldsDB: "worlds",
logInvalidCerts: true, logInvalidCerts: true,
crashOnUncaughtExceptions: true,
servers: [ servers: [
{ addr: serverURL, name: "TemuzX" } { addr: serverURL, name: "TemuzX" }
], ],
relays: [ relays: [
{ addr: "wss://relay.deev.is/", comment: "lax1dude relay #1", primary: relayId == 0 }, { addr: "wss://relay.deev.is/", comment: "lax1dude relay #1", primary: relayId === 0 },
{ addr: "wss://relay.lax1dude.net/", comment: "lax1dude relay #2", primary: relayId == 1 }, { addr: "wss://relay.lax1dude.net/", comment: "lax1dude relay #2", primary: relayId === 1 },
{ addr: "wss://relay.shhnowisnottheti.me/", comment: "ayunami relay #1", primary: relayId == 2 } { addr: "wss://relay.shhnowisnottheti.me/", comment: "ayunami relay #1", primary: relayId === 2 }
] ]
}; };
var q = window.location.search; var q = window.location.search;
if(typeof q === "string" && q.startsWith("?")) { if((typeof q === "string") && q[0] === "?" && (typeof window.URLSearchParams !== "undefined")) {
q = new URLSearchParams(q); q = new window.URLSearchParams(q);
var s = q.get("server"); var s = q.get("server");
if(s) window.eaglercraftXOpts.joinServer = s; if(s) window.eaglercraftXOpts.joinServer = s;
} }
@ -51,6 +53,6 @@
}); });
</script> </script>
</head> </head>
<body style="margin:0px;width:100vw;height:100vh;overflow:hidden;" id="game_frame"> <body style="margin:0px;width:100%;height:100%;overflow:hidden;background-color:black;" id="game_frame">
</body> </body>
</html> </html>

514
resources/RTWebViewClient.html Executable file
View File

@ -0,0 +1,514 @@
<!DOCTYPE html>
<!--
Copyright (c) 2024 lax1dude. All Rights Reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-->
<html style="width:100%;height:100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Eaglercraft Desktop Runtime</title>
<link type="image/png" rel="shortcut icon" id="vigg" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAR/SURBVEhLtZXZK3ZRFMYPcqXc+gv413DHxVuGIpIhkciQWaRccCNjSCkligwXSOZ5nmfv9zvn2e8+58V753sudmuvvdZ61l5r7XOc8H+GS/D19aUNkPz5+aktQH5/f//4+LBKZKuRkpUtQjCUYG5gD2T38vLy/PwsDfL9/f3Dw8PT05M0b29vnKLhCKCBT4L4gvBLBIei4//4+Hh1dUVEQutUuLu7E83FxQUGnKLBWKfQaA3S+AREVxaEOD8/Pzk50XpzcyMDcH19zdZG3N3d3dzc3Nvb01aX5pQUpQGGQJxcQpfNysoKhUIdHR1o1tbWbInYAgxIPDMzMy8vLzc3FxqOdMoRqwJK8G8ALUYIhHMiSEhIwI6CyIb0qQzC4eGhsXCc1tZWnZIEKzdQJQSXgKxfX18RCM3Z5eWlcfVAxKOjo+Pj49PTU88lTOk2NjbMsePc3t6SAfcgFdszOyMuAdeBg0CQi2lhYUHOeOLDCisN8FzcPFZXV3t7ezHY3t5GQ+6it+2xMASsKhEEWKsmRLRBBUpPvpJ/TpFKFBwKYAiITmicsbYhdHfJAltqhUCVsCQhwslmeXmZxiBQT9c0Ar9E2O3v72sYSE0N1yQArkKy0kBMXLqlZqIZHR3t6empqqqSDcBdhXEJSJ/bUc3q6uq+vj629GB9fR1WsLW1NTs7u7S0RN2locMjIyOEm5ubQ7+4uJienk4/+vv77Y1hwhLBEKhwWHitdVFfX9/Y2Gg2HuLi4owUAysrK8yCG97rh0+ApP5Q2ZycHFlPTExUVFRIBvn5+WhKSkp2dnaMKhptbW2426GgQ/rwuAQCZ1hwFayLiork9hMFBQV1dXVmE0BLS4vqw3QFB8kn4IAxoGPkYpxi4FeDmpqas7Mz4pClAgqGwD48rjY2NmacYqC0tJQ1KSlJWyE5OZkpUKkBAxZVIntAoZh04+Q48fHxPNGBgYHExMT29naj9cBodnZ2mo3jlJWVMeW2OGQck4B1amqqoaGhqamJjx2lGxwcpL0mUgR8fJhsWqJtSkoKU2SbHHUDpkhPBujd8xuQG6PJRM/Pz09PT7O1NNnZ2Tw3fgZkXVhYKCUlUhBATP+hCVyKZGky17RV0g04laayslJ6hlVeFHB4eFhKaogGd0LxtmTgE+hbhKDnPjMzgw8E3qGL2tpaBWpubjYqj2BoaEj6rq4uNATRZ0ZwCbiL6gXEzINk5vCBQJ9rMD4+rkA8QNK036uDg4Py8vLu7m680KjIBNR3zBDoWQM1g98snyB+VSoRW8C/UwR81/SvhgNj9JOTkwwVERUdRBEI0BAdLRVERkhLS8vIyEDQlrsTPTU1lVFhKxARvZgUlFLbegCf4BvIsbi4mIg4E5EogIHhiKCMtU0WUFiVy06j5fAJIDdSBDQw+PegDfBRcbOPwH4F9LuFWIIQdQNKwWqzIE0aoFUaBsw+SQuFw0uNtC9A+F4i3QNrbg3IDn+SAsHh+wYiEpeyBEMLv/cAO6KzAijxxB+Y4wisBhssJUhjEbPJf4Nw+B+JXqLW3bw+wQAAAABJRU5ErkJggg==" />
<script type="text/javascript">
"use strict";
(function() {
var webSocketURI = "${client_websocket_uri}";
if(webSocketURI === ("$" + "{client_websocket_uri}")) {
alert("Don't open this file in your browser");
window.addEventListener("load", function() {
document.body.innerHTML = "<p style=\"text-align:center;\">cunt</p>";
});
return;
}
var eaglercraftXOpts = {eaglercraftXOpts};
var cspAttrSupport = false;
var checkSupport = function() {
if(eaglercraftXOpts.forceWebViewSupport) {
cspAttrSupport = true;
return true;
}else {
var tempIFrameElement = document.createElement("iframe");
cspAttrSupport = eaglercraftXOpts.enableWebViewCSP && (typeof tempIFrameElement.csp === "string");
return (typeof tempIFrameElement.allow === "string") && (typeof tempIFrameElement.sandbox === "object");
}
};
var supported = false;
try {
supported = checkSupport();
}catch(ex) {
supported = false;
}
console.log("CSP attribute support detected as " + cspAttrSupport);
if(!supported) {
console.error("Required IFrame safety features are not supported!");
window.addEventListener("load", function() {
document.getElementById("view_loading").style.display = "none";
document.getElementById("view_safety_error").style.display = "block";
});
return;
}
var websocketInstance = null;
var hasOpened = false;
var webviewOptions = null;
var webviewResetSerial = 0;
var hasErrored = false;
var hasRegisteredOnMsgHandler = false;
var currentMessageHandler = null;
var currentIFrame = null;
var currentMessageChannelName = null;
var elements = {};
var loadElements = function() {
var jsel = document.getElementsByClassName("__jsel");
for(var i = 0; i < jsel.length; ++i) {
var el = jsel[i];
if(el.id.length > 0) {
elements[el.id] = el;
}
}
};
function loadEagtekIcon() {
var faviconSrc = document.getElementById("vigg").href;
var imgElements = document.getElementsByClassName("eagtek_icon");
for(var i = 0; i < imgElements.length; ++i) {
imgElements[i].src = faviconSrc;
}
}
function setupElementListeners() {
elements.button_allow.addEventListener("click", function() {
if(websocketInstance !== null) {
if(elements.chkbox_remember.checked) {
websocketInstance.send(JSON.stringify({$:7,perm:"ALLOW"}));
}
beginShowingDirect();
}
});
elements.button_block.addEventListener("click", function() {
if(websocketInstance !== null) {
if(elements.chkbox_remember.checked) {
websocketInstance.send(JSON.stringify({$:7,perm:"BLOCK"}));
}
beginShowingContentBlocked();
}
});
elements.button_re_evaluate.addEventListener("click", function() {
if(websocketInstance !== null) {
websocketInstance.send(JSON.stringify({$:7,perm:"NOT_SET"}));
beginShowingEnableJavaScript();
}
});
}
window.specialHack = function() {
if(websocketInstance !== null) {
websocketInstance.send(JSON.stringify({$:7,perm:"NOT_SET"}));
}
};
var handleHandshake = function(pkt) {
webviewOptions = {};
webviewOptions.contentMode = pkt.contentMode || "BLOB_BASED";
webviewOptions.fallbackTitle = pkt.fallbackTitle || "Server Info";
document.title = webviewOptions.fallbackTitle + " - Eaglercraft Desktop Runtime";
webviewOptions.scriptEnabled = !!pkt.scriptEnabled;
webviewOptions.strictCSPEnable = !!pkt.strictCSPEnable || false;
webviewOptions.serverMessageAPIEnabled = !!pkt.serverMessageAPIEnabled;
webviewOptions.url = pkt.url;
webviewOptions.blob = pkt.blob;
webviewOptions.hasApprovedJS = pkt.hasApprovedJS || "NOT_SET";
if(webviewOptions.scriptEnabled) {
if(webviewOptions.hasApprovedJS === "NOT_SET") {
beginShowingEnableJavaScript();
}else if(webviewOptions.hasApprovedJS === "ALLOW") {
beginShowingDirect();
}else if(webviewOptions.hasApprovedJS === "BLOCK") {
beginShowingContentBlocked();
}else {
setErrored("Unknown JS permission state: " + webviewOptions.hasApprovedJS);
}
}else {
beginShowingDirect();
}
};
var handleServerError = function(pkt) {
console.error("Recieved error from server: " + pkt.msg);
setErrored(pkt.msg);
};
var handleServerWebViewStrMsg = function(pkt) {
var w;
if(currentMessageChannelName !== null && currentIFrame !== null && (w = currentIFrame.contentWindow) !== null) {
w.postMessage({ver:1,channel:currentMessageChannelName,type:"string",data:pkt.msg}, "*");
}else {
console.error("Server tried to send the WebView a message, but the message channel is not open!");
}
};
var handleServerWebViewBinMsg = function(arr) {
var w;
if(currentMessageChannelName !== null && currentIFrame !== null && (w = currentIFrame.contentWindow) !== null) {
w.postMessage({ver:1,channel:currentMessageChannelName,type:"binary",data:arr}, "*");
}else {
console.error("Server tried to send the WebView a message, but the message channel is not open!");
}
};
var hideAllViews = function() {
if(currentIFrame !== null) {
++webviewResetSerial;
if(currentIFrame.parentNode) currentIFrame.parentNode.removeChild(currentIFrame);
currentIFrame = null;
}
elements.view_loading.style.display = "none";
elements.view_iframe.style.display = "none";
elements.view_allow_javascript.style.display = "none";
elements.view_javascript_blocked.style.display = "none";
elements.view_safety_error.style.display = "none";
};
var setErrored = function(str) {
if(hasErrored) return;
hasErrored = true;
hideAllViews();
elements.loading_text.style.color = "#CC0000";
elements.loading_text.innerText = str;
elements.view_loading.style.display = "block";
if(websocketInstance !== null) {
websocketInstance.close();
websocketInstance = null;
}
};
var registerMessageHandler = function() {
if(!hasRegisteredOnMsgHandler) {
hasRegisteredOnMsgHandler = true;
window.addEventListener("message", function(evt) {
if(currentIFrame !== null && currentMessageHandler !== null && evt.source === currentIFrame.contentWindow) {
currentMessageHandler(evt);
}
});
}
};
var beginShowingDirect = function() {
if(hasErrored) return;
hideAllViews();
if(!eaglercraftXOpts.forceWebViewSupport) {
try {
currentIFrame = document.createElement("iframe");
currentIFrame.allow = "";
if(currentIFrame.allow != "") throw "Failed to set allow to \"\"";
currentIFrame.referrerPolicy = "strict-origin";
var requiredSandboxTokens = [ "allow-downloads" ];
if(webviewOptions.scriptEnabled) {
requiredSandboxTokens.push("allow-scripts");
requiredSandboxTokens.push("allow-pointer-lock");
}
currentIFrame.sandbox = requiredSandboxTokens.join(" ");
for(var i = 0; i < requiredSandboxTokens.length; ++i) {
if(!currentIFrame.sandbox.contains(requiredSandboxTokens[i])) {
throw ("Failed to set sandbox attribute: " + requiredSandboxTokens[i]);
}
}
var sbox = currentIFrame.sandbox;
for(var i = 0; i < sbox.length; ++i) {
if(!requiredSandboxTokens.includes(sbox.item(i))) {
throw ("Unknown sandbox attribute detected: " + sbox.item(i));
}
}
}catch(ex) {
if(typeof ex === "string") {
console.error("Caught safety error: " + ex);
beginShowingSafetyError();
}else {webviewOptions
console.error("Fatal error while creating iframe!");
console.error(ex);
setErrored("Fatal error while creating iframe!");
}
return;
}
}else {
currentIFrame = document.createElement("iframe");
try {
currentIFrame.allow = "";
}catch(ex) {
}
try {
currentIFrame.referrerPolicy = "strict-origin";
}catch(ex) {
}
try {
var sandboxTokens = [ "allow-downloads", "allow-same-origin" ];
if(webviewOptions.scriptEnabled) {
sandboxTokens.push("allow-scripts");
sandboxTokens.push("allow-pointer-lock");
}
currentIFrame.sandbox = sandboxTokens.join(" ");
}catch(ex) {
}
}
currentIFrame.credentialless = true;
currentIFrame.loading = "lazy";
var cspWarn = false;
if(webviewOptions.contentMode === "BLOB_BASED") {
if(cspAttrSupport && eaglercraftXOpts.enableWebViewCSP) {
if(typeof currentIFrame.csp === "string") {
var csp = "default-src 'none';";
var protos = (webviewOptions.strictCSPEnable ? "" : " http: https:");
if(webviewOptions.scriptEnabled) {
csp += (" script-src 'unsafe-eval' 'unsafe-inline' data: blob:" + protos + ";");
csp += (" style-src 'unsafe-eval' 'unsafe-inline' data: blob:" + protos + ";");
csp += (" img-src data: blob:" + protos + ";");
csp += (" font-src data: blob:" + protos + ";");
csp += (" child-src data: blob:" + protos + ";");
csp += (" frame-src data: blob:;");
csp += (" media-src data: mediastream: blob:" + protos + ";");
csp += (" connect-src data: blob:" + protos + ";");
csp += (" worker-src data: blob:" + protos + ";");
}else {
csp += (" style-src data: 'unsafe-inline'" + protos + ";");
csp += (" img-src data:" + protos + ";");
csp += (" font-src data:" + protos + ";");
csp += (" media-src data:" + protos + ";");
}
currentIFrame.csp = csp;
}else {
console.error("This browser does not support CSP attribute on iframes! (try Chrome)");
cspWarn = true;
}
}else {
cspWarn = true;
}
if(cspWarn && webviewOptions.strictCSPEnable) {
console.error("Strict CSP was requested for this webview, but that feature is not available!");
}
}else {
cspWarn = true;
}
currentIFrame.style.border = "none";
currentIFrame.style.backgroundColor = "white";
currentIFrame.style.width = "100%";
currentIFrame.style.height = "100%";
elements.view_iframe.appendChild(currentIFrame);
elements.view_iframe.style.display = "block";
if(webviewOptions.contentMode === "BLOB_BASED") {
currentIFrame.srcdoc = webviewOptions.blob;
}else {
currentIFrame.src = webviewOptions.url;
}
currentIFrame.focus();
if(webviewOptions.scriptEnabled && webviewOptions.serverMessageAPIEnabled) {
var resetSer = webviewResetSerial;
var curIFrame = currentIFrame;
registerMessageHandler();
currentMessageHandler = function(evt) {
if(resetSer === webviewResetSerial && curIFrame === currentIFrame) {
handleMessageRawFromFrame(evt.data);
}
};
}
};
var handleMessageRawFromFrame = function(obj) {
if(hasErrored) return;
if((typeof obj === "object") && (obj.ver === 1) && ((typeof obj.channel === "string") && obj.channel.length > 0)) {
if(typeof obj.open === "boolean") {
sendMessageEnToServer(obj.open, obj.channel);
return;
}else if(typeof obj.data === "string") {
sendMessageToServerStr(obj.channel, obj.data);
return;
}else if(obj.data instanceof ArrayBuffer) {
sendMessageToServerBin(obj.channel, obj.data);
return;
}
}
console.error("WebView sent an invalid message!");
};
var sendMessageEnToServer = function(messageChannelOpen, channelName) {
if(channelName.length > 255) {
console.error("WebView tried to " + (messageChannelOpen ? "open" : "close") + " a channel, but channel name is too long, max is 255 characters!");
return;
}
if(messageChannelOpen && currentMessageChannelName !== null) {
console.error("WebView tried to open channel, but a channel is already open!");
sendMessageEnToServer(false, currentMessageChannelName);
}
if(!messageChannelOpen && currentMessageChannelName !== null && currentMessageChannelName === channelName) {
console.error("WebView tried to close the wrong channel!");
}
if(!messageChannelOpen && currentMessageChannelName === null) {
console.error("WebView tried to close channel, but the channel is not open!");
return;
}
if(websocketInstance !== null) {
if(messageChannelOpen) {
websocketInstance.send(JSON.stringify({$:3,channel:channelName}));
console.log("WebView opened message channel to server: \"" + channelName + "\"");
currentMessageChannelName = channelName;
}else {
websocketInstance.send(JSON.stringify({$:4}));
console.log("WebView closed message channel to server: \"" + currentMessageChannelName + "\"");
currentMessageChannelName = null;
}
}else {
console.error("WebView tried to send a message, but no websocket is open!");
}
};
var sendMessageToServerStr = function(channelName, msg) {
if(channelName.length > 255) {
console.error("WebView tried to send a message packet, but channel name is too long, max is 255 characters!");
return;
}
if(channelName !== currentMessageChannelName) {
console.error("WebView tried to send a message packet, but the channel is not open!");
return;
}
if(websocketInstance !== null) {
websocketInstance.send(JSON.stringify({$:5,msg:msg}));
}else {
console.error("WebView tried to send a message, but no callback for sending packets is set!");
}
};
var sendMessageToServerBin = function(channelName, msg) {
if(channelName.length > 255) {
console.error("WebView tried to send a message packet, but channel name is too long, max is 255 characters!");
return;
}
if(channelName !== currentMessageChannelName) {
console.error("WebView tried to send a message packet, but the channel is not open!");
return;
}
if(websocketInstance !== null) {
websocketInstance.send(msg);
}else {
console.error("WebView tried to send a message, but no callback for sending packets is set!");
}
};
var beginShowingEnableJavaScript = function() {
if(hasErrored) return;
hideAllViews();
if(webviewOptions.contentMode !== "BLOB_BASED") {
elements.strict_csp_value.innerText = "Impossible";
elements.strict_csp_value.style.color = "red";
}else if(!cspAttrSupport || !eaglercraftXOpts.enableWebViewCSP) {
elements.strict_csp_value.innerText = "Unsupported";
elements.strict_csp_value.style.color = "red";
}else if(webviewOptions.strictCSPEnable) {
elements.strict_csp_value.innerText = "Enabled";
elements.strict_csp_value.style.color = "green";
}else {
elements.strict_csp_value.innerText = "Disabled";
elements.strict_csp_value.style.color = "red";
}
if(webviewOptions.serverMessageAPIEnabled) {
elements.message_api_value.innerText = "Enabled";
elements.message_api_value.style.color = "red";
}else {
elements.message_api_value.innerText = "Disabled";
elements.message_api_value.style.color = "green";
}
elements.view_allow_javascript.style.display = "block";
};
var beginShowingContentBlocked = function() {
if(hasErrored) return;
hideAllViews();
elements.view_javascript_blocked.style.display = "block";
};
var beginShowingSafetyError = function() {
if(hasErrored) return;
hasErrored = true;
hideAllViews();
elements.view_safety_error.style.display = "block";
};
window.addEventListener("load", function() {
loadElements();
loadEagtekIcon();
setupElementListeners();
websocketInstance = new WebSocket(webSocketURI);
websocketInstance.binaryType = "arraybuffer";
websocketInstance.addEventListener("open", function(evt) {
console.log("Connection to server opened");
hasOpened = true;
websocketInstance.send(JSON.stringify({$:0,cspSupport:cspAttrSupport}));
});
websocketInstance.addEventListener("message", function(evt) {
try {
if(typeof evt.data === "string") {
var pkt = JSON.parse(evt.data);
if(typeof pkt.$ !== "number") {
throw "Packet type is invalid";
}
if(webviewOptions === null) {
if(pkt.$ === 1) {
handleHandshake(pkt);
}else if(pkt.$ === 2) {
handleServerError(pkt);
}else {
throw "Unknown packet type " + pkt.$ + " for state handshake!"
}
}else {
if(pkt.$ === 2) {
handleServerError(pkt);
}else if(pkt.$ === 6) {
handleServerWebViewStrMsg(pkt);
}else {
throw "Unknown packet type " + pkt.$ + " for state open!"
}
}
}else {
handleServerWebViewBinMsg(evt.data);
}
}catch(ex) {
console.error("Caught exception processing message from server!");
console.error(ex);
}
});
websocketInstance.addEventListener("close", function(evt) {
websocketInstance = null;
setErrored("Connection to EaglercraftX client lost!");
});
websocketInstance.addEventListener("error", function(evt) {
console.error("WebSocket error: " + evt);
});
});
})();
</script>
</head>
<body style="margin:0px;width:100%;height:100%;overflow:hidden;font-family:sans-serif;user-select:none;">
<div id="view_loading" style="width:100%;height:100%;display:block;" class="__jsel">
<div style="padding-top:13vh;">
<h2 style="text-align:center;" id="loading_text" class="__jsel">Please Wait...</h2>
</div>
</div>
<div id="view_iframe" style="width:100%;height:100%;display:none;" class="__jsel">
</div>
<div id="view_allow_javascript" style="width:100%;height:100%;display:none;" class="__jsel">
<div style="padding-top:13vh;">
<div style="margin:auto;max-width:450px;border:6px double black;text-align:center;padding:20px;">
<h2><img width="32" height="32" style="vertical-align:middle;" class="eagtek_icon">&emsp;Allow JavaScript</h2>
<p style="font-family:monospace;text-decoration:underline;word-wrap:break-word;" id="target_url"></p>
<h4 style="line-height:1.4em;">Strict CSP: <span id="strict_csp_value" class="__jsel"></span>&ensp;|&ensp;Message API: <span id="message_api_value" class="__jsel"></span></h4>
<p><input id="chkbox_remember" type="checkbox" class="__jsel" checked> Remember my choice</p>
<p><button style="font-size:1.5em;" id="button_allow" class="__jsel">Allow</button>&emsp;<button style="font-size:1.5em;" id="button_block" class="__jsel">Block</button></p>
</div>
</div>
</div>
<div id="view_javascript_blocked" style="width:100%;height:100%;display:none;" class="__jsel">
<div style="padding-top:13vh;">
<h1 style="text-align:center;"><img width="48" height="48" style="vertical-align:middle;" class="eagtek_icon">&emsp;Content Blocked</h1>
<h4 style="text-align:center;">You chose to block JavaScript execution for this embed</h4>
<p style="text-align:center;"><button style="font-size:1.0em;" id="button_re_evaluate" class="__jsel">Re-evaluate</button></p>
</div>
</div>
<div id="view_safety_error" style="width:100%;height:100%;display:none;" class="__jsel">
<div style="padding-top:13vh;">
<h1 style="text-align:center;"><img width="48" height="48" style="vertical-align:middle;" class="eagtek_icon">&emsp;IFrame Safety Error</h1>
<h4 style="text-align:center;">The content cannot be displayed safely!</h4>
<h4 style="text-align:center;">Check console for more details</h4>
</div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -9,6 +9,7 @@
- Wrote HW accelerated OpenGL 1.3 emulator - Wrote HW accelerated OpenGL 1.3 emulator
- Wrote the default shader pack - Wrote the default shader pack
- Made the integrated PBR resource pack - Made the integrated PBR resource pack
- Added touch and mobile device support
- Wrote all desktop emulation code - Wrote all desktop emulation code
- Wrote EaglercraftXBungee - Wrote EaglercraftXBungee
- Wrote WebRTC relay server - Wrote WebRTC relay server
@ -20,19 +21,23 @@
- Many bug fixes - Many bug fixes
- WebRTC LAN worlds - WebRTC LAN worlds
- WebRTC voice chat - WebRTC voice chat
- Worked on touch support
- Made velocity plugin work
- Added resource packs - Added resource packs
- Added screen recording - Added screen recording
- Added seamless fullscreen - Added seamless fullscreen
- Created the replit - Created the replit
hoosiertransfer: HoosierTransfer/Aether:
- Eaglercraft L 1.9
- Many memory optimizations - Many memory optimizations
- Bug fixes - Bug fixes
- Faster lighting engine - Faster lighting engine
Code used within EaglercraftX Code used within EaglercraftX
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -414,7 +419,7 @@
Project Author: The Legion of the Bouncy Castle Project Author: The Legion of the Bouncy Castle
Project URL: https://www.bouncycastle.org/java.html Project URL: https://www.bouncycastle.org/java.html
Used For: MD5, SHA-1, SHA-256 implementations Used For: MD5, SHA-1, SHA-256, and AES implementations
* Copyright (c) 2000-2021 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org) * Copyright (c) 2000-2021 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
* *
@ -634,7 +639,7 @@
Project Author: ymnk, JCraft Inc. Project Author: ymnk, JCraft Inc.
Project URL: http://www.jcraft.com/jorbis/ Project URL: http://www.jcraft.com/jorbis/
Used For: Audio in desktop runtime Used For: Audio in desktop runtime and browsers that don't support OGG
* JOrbis * JOrbis
* Copyright (C) 2000 ymnk, JCraft,Inc. * Copyright (C) 2000 ymnk, JCraft,Inc.
@ -650,7 +655,7 @@
* modify it under the terms of the GNU Library General Public License * modify it under the terms of the GNU Library General Public License
* as published by the Free Software Foundation; either version 2 of * as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -662,6 +667,44 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Project Name: NanoHTTPD
Project Author: NanoHTTPD
Project URL: http://nanohttpd.org/
Used For: HTTP server in the desktop runtime
* Copyright (c) 2012-2013 by Paul S. Hawke,
* 2001,2005-2013 by Jarno Elonen,
* 2010 by Konstantinos Togias All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of the NanoHttpd organization nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Project Name: sqlite-jdbc Project Name: sqlite-jdbc
Project Author: Taro L. Saito (xerial) Project Author: Taro L. Saito (xerial)
Project URL: https://github.com/xerial/sqlite-jdbc Project URL: https://github.com/xerial/sqlite-jdbc

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,88 @@
<style type="text/css" style="display:none !important;">{% embed eval `boot_menu_style.css` %}</style>
<div class="_eaglercraftX_boot_menu {% global `root_class_gen` %}">
<div class="_eaglercraftX_boot_menu_inner">
<div class="_eaglercraftX_boot_menu_header">
<p class="_eaglercraftX_boot_menu_header_title">EaglercraftX 1.8 Boot Manager</p>
</div>
<div class="_eaglercraftX_boot_menu_content">
<div class="_eaglercraftX_boot_menu_content_inner">
<div class="_eaglercraftX_boot_menu_content_view_selection" style="display:none;">
<div class="_eaglercraftX_boot_menu_content_selection"></div>
</div>
<div class="_eaglercraftX_boot_menu_content_view_editor" style="display:none;">
<div class="_eaglercraftX_boot_menu_launch_conf">
<div class="_eaglercraftX_boot_menu_launch_conf_inner">
<div class="_eaglercraftX_boot_menu_launch_conf_item_wide" style="padding: 20px;">
<p>Profile Name: <input type="text" class="_eaglercraftX_boot_menu_launch_conf_val_profile_name"></p>
</div>
<div class="_eaglercraftX_boot_menu_launch_conf_item_wide">
<div class="_eaglercraftX_boot_menu_launch_conf_item _eaglercraftX_boot_menu_launch_conf_data_format">
<p>Data Format: <span class="_eaglercraftX_boot_menu_launch_conf_val_data_format">Standard Offline</span></p>
</div>
<div class="_eaglercraftX_boot_menu_launch_conf_item _eaglercraftX_boot_menu_launch_conf_launch_type">
<p>Launch Type:
<select class="_eaglercraftX_boot_menu_launch_conf_val_launch_type">
<option class="_eaglercraftX_boot_menu_launch_conf_val_launch_type_opt" value="EAGLERX_SIGNED_V1">EaglercraftX Signed Client</option>
<option class="_eaglercraftX_boot_menu_launch_conf_val_launch_type_opt" value="EAGLERX_V1">EaglercraftX Standard Offline</option>
<option class="_eaglercraftX_boot_menu_launch_conf_val_launch_type_opt" value="EAGLER_1_5_V2">Eaglercraft 1.5 (post-22w34a)</option>
<option class="_eaglercraftX_boot_menu_launch_conf_val_launch_type_opt" value="EAGLER_1_5_V1">Eaglercraft 1.5 (pre-22w34a)</option>
<option class="_eaglercraftX_boot_menu_launch_conf_val_launch_type_opt" value="EAGLER_BETA_V1">Eaglercraft Beta 1.3</option>
<option class="_eaglercraftX_boot_menu_launch_conf_val_launch_type_opt" value="PEYTON_V1">PeytonPlayz585 Indev</option>
<option class="_eaglercraftX_boot_menu_launch_conf_val_launch_type_opt" value="PEYTON_V2">PeytonPlayz585 Alpha/Beta</option>
<option class="_eaglercraftX_boot_menu_launch_conf_val_launch_type_opt" value="STANDARD_OFFLINE_V1">Standard Offline</option>
<option class="_eaglercraftX_boot_menu_launch_conf_val_launch_type_opt" value="IFRAME_SANDBOX_V1">IFrame HTML File</option>
</select>
</p>
</div>
<div class="_eaglercraftX_boot_menu_launch_conf_item _eaglercraftX_boot_menu_launch_conf_join_server" style="display:none;">
<p>Join Server: <input type="text" class="_eaglercraftX_boot_menu_launch_conf_val_join_server"></p>
</div>
<div class="_eaglercraftX_boot_menu_launch_conf_item _eaglercraftX_boot_menu_launch_conf_opts_name" style="display:none;">
<p>Opt Variable Name: <input type="text" class="_eaglercraftX_boot_menu_launch_conf_val_opts_name"></p>
</div>
<div class="_eaglercraftX_boot_menu_launch_conf_item _eaglercraftX_boot_menu_launch_conf_assetsURI" style="display:none;">
<p>Assets URI Opt: <input type="text" class="_eaglercraftX_boot_menu_launch_conf_val_assetsURI"></p>
</div>
<div class="_eaglercraftX_boot_menu_launch_conf_item _eaglercraftX_boot_menu_launch_conf_container" style="display:none;">
<p>Container ID Opt: <input type="text" class="_eaglercraftX_boot_menu_launch_conf_val_container"></p>
</div>
<div class="_eaglercraftX_boot_menu_launch_conf_item _eaglercraftX_boot_menu_launch_conf_main_func" style="display:none;">
<p>Main function: <input type="text" class="_eaglercraftX_boot_menu_launch_conf_val_main_func"></p>
</div>
<div class="_eaglercraftX_boot_menu_launch_conf_item _eaglercraftX_boot_menu_launch_conf_clear_cookies">
<p>Clear Cookies Before Launch: <input type="checkbox" class="_eaglercraftX_boot_menu_launch_conf_val_clear_cookies"></p>
</div>
</div>
</div>
</div>
<textarea class="_eaglercraftX_boot_menu_launch_opt_editor" spellcheck="false"></textarea>
</div>
<div class="_eaglercraftX_boot_menu_popup" style="display:none;">
<div class="_eaglercraftX_boot_menu_popup_inner">
<div class="_eaglercraftX_boot_menu_popup_view_confirm" style="display:none;">
<p class="_eaglercraftX_boot_menu_popup_confirm_title"></p>
<p class="_eaglercraftX_boot_menu_popup_confirm_opts"></p>
</div>
<div class="_eaglercraftX_boot_menu_popup_view_selection" style="display:none;">
<p class="_eaglercraftX_boot_menu_popup_selection_title"></p>
<div class="_eaglercraftX_boot_menu_popup_selection"></div>
</div>
<div class="_eaglercraftX_boot_menu_popup_view_input" style="display:none;">
<p class="_eaglercraftX_boot_menu_popup_input_title"></p>
<p class="_eaglercraftX_boot_menu_popup_input_val_container"><input class="_eaglercraftX_boot_menu_popup_input_val" type="text"></p>
<p class="_eaglercraftX_boot_menu_popup_input_opts"><span class="_eaglercraftX_boot_menu_popup_input_opt _eaglercraftX_boot_menu_popup_input_opt_cancel">&nbsp;&lt;&nbsp;Cancel&nbsp;&gt;&nbsp;</span> &emsp; <span class="_eaglercraftX_boot_menu_popup_input_opt _eaglercraftX_boot_menu_popup_input_opt_done _eaglercraftX_boot_menu_popup_input_opt_selected">&nbsp;&lt;&nbsp;Done&nbsp;&gt;&nbsp;</span></p>
</div>
</div>
</div>
</div>
</div>
<div class="_eaglercraftX_boot_menu_footer">
<p class="_eaglercraftX_boot_menu_footer_text _eaglercraftX_boot_menu_footer_text_boot_select" style="display:none;">Use the &uarr; and &darr; keys to select which entry is highlighted.<br>Press enter to boot the selected client, `e' to edit eaglercraft opts before booting, or ESC to exit and boot normally.</p>
<p class="_eaglercraftX_boot_menu_footer_text _eaglercraftX_boot_menu_footer_text_boot_select_count" style="display:none;">Use the &uarr; and &darr; keys to select which entry is highlighted.<br>Press enter to boot the selected client, `e' to edit eaglercraft opts before booting.<br>The first option will be executed in <span class="_eaglercraftX_boot_menu_footer_text_boot_countdown">0</span> seconds. Press any key to cancel.</p>
<p class="_eaglercraftX_boot_menu_footer_text _eaglercraftX_boot_menu_footer_text_menu_select" style="display:none;">Use the &uarr; and &darr; keys to select which entry is highlighted.<br>Press enter to select, or ESC return to the previous screen.</p>
<p class="_eaglercraftX_boot_menu_footer_text _eaglercraftX_boot_menu_footer_text_opts_editor" style="display:none;">Press CTRL+SHIFT to open editor menu.<br>Press CTRL+ENTER to boot, or ESC return to the previous menu.</p>
<p class="_eaglercraftX_boot_menu_footer_text _eaglercraftX_boot_menu_footer_text_opts_editor_alt" style="display:none;">Press CTRL+SHIFT to open editor menu.<br>Press CTRL+ENTER to save, or ESC return to the previous menu.</p>
<p class="_eaglercraftX_boot_menu_footer_text _eaglercraftX_boot_menu_footer_text_boot_order" style="display:none;">Use the &uarr; and &darr; keys to select which entry is highlighted.<br>Press CTRL+&uarr; and CTRL+&darr; to adjust item order, or ESC to cancel.</p>
</div>
</div>
</div>

View File

@ -0,0 +1,328 @@
@font-face {
font-family: "{% global `root_class_gen` %}_font0";
src: url("data:font/woff;base64,{% embed base64 `web_cl_eagleiii_8x16.woff` %}") format("woff");
}
.{% global `root_class_gen` %} {
font: 24px "{% global `root_class_gen` %}_font0";
color: #CCCCCC;
background-color: #000000;
user-select: none;
width: 100%;
height: 100%;
overflow-y: auto;
}
.{% global `root_class_gen` %}::-moz-selection {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %}::selection {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %}::-webkit-scrollbar {
width: 12px;
}
.{% global `root_class_gen` %} ::-webkit-scrollbar {
width: 12px;
}
.{% global `root_class_gen` %}::-webkit-scrollbar-track, .{% global `root_class_gen` %} ::-webkit-scrollbar-track {
background-color: #000000;
}
.{% global `root_class_gen` %}::-webkit-scrollbar-thumb, .{% global `root_class_gen` %} ::-webkit-scrollbar-thumb {
background-color: #CCCCCC;
}
.{% global `root_class_gen` %}::-webkit-scrollbar-button, .{% global `root_class_gen` %} ::-webkit-scrollbar-button {
display: none;
}
.{% global `root_class_gen` %}::-webkit-scrollbar-corner, .{% global `root_class_gen` %} ::-webkit-scrollbar-corner {
background-color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_inner {
width: 100%;
height: 100%;
min-height: 480px;
display: flex;
flex-flow: column;
}
.{% global `root_class_gen` %} p {
margin-block-start: 0px;
margin-block-end: 0px;
-webkit-margin-before:0px;
-webkit-margin-after:0px;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_header {
flex: 0 1 auto;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_header_title {
text-align: center;
padding: 32px 0px 0px 0px;
color: #CCCCCC;
white-space: pre-wrap;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_content {
flex: 1 1 auto;
position: relative;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_content_inner {
position: absolute;
top: 32px;
left: 32px;
bottom: 32px;
right: 32px;
border: 2px solid white;
z-index: 1;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup {
position: absolute;
top: 128px;
left: 64px;
bottom: 64px;
right: 64px;
z-index: 10;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_inner {
width: 50%;
min-width: min(calc(100% - 20px), 400px);
max-width: 800px;
max-height: calc(100% - 20px);
margin-left: auto;
margin-right: auto;
border: 2px solid white;
background-color: #000000;
padding: 10px;
overflow-y: auto;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_confirm_title {
text-align: center;
padding: 16px;
color: #CCCCCC;
white-space: pre-wrap;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_confirm_opts {
text-align: center;
padding: 16px;
color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_confirm_opt {
cursor: pointer;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_confirm_opt_selected {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_confirm_opt_disabled {
color: #888888;
cursor: default;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_selection_title {
text-align: center;
padding: 16px;
color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_selection {
width: calc(100% - 8px);
padding: 8px 4px;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_input_title {
text-align: center;
padding: 16px;
color: #CCCCCC;
white-space: pre-wrap;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_input_opts {
text-align: center;
padding: 16px;
color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_input_opt {
cursor: pointer;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_input_opt_selected {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_input_opt_disabled {
color: #888888;
cursor: default;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_input_val_container {
text-align: center;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_input_val {
min-width: 15em;
width: calc(90% - 50px);
font: 24px "{% global `root_class_gen` %}_font0";
outline: none;
resize: none;
background-color: #000000;
color: #CCCCCC;
border: 2px solid white;
padding: 2px 4px;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_input_val:disabled {
color: #888888;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_input_val::-moz-selection {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_popup_input_val::selection {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_content_view_selection {
width: 100%;
height: 100%;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_content_selection {
width: calc(100% - 8px);
height: calc(100% - 16px);
padding: 8px 4px;
overflow-y: auto;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_content_item {
width: 100%;
overflow-y: auto;
cursor: pointer;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_content_item::before {
content: "\00a0";
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_content_item_selected {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_content_item_selected::before {
content: "*";
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_content_item_disabled {
color: #888888;
cursor: default;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_content_view_editor {
width: 100%;
height: 100%;
position: relative;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
height: calc(25% - 20px);
padding: 10px;
overflow-x: hidden;
overflow-y: auto;
color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_item_wide {
width: 100%;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_item {
display: inline-block;
padding: 20px;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_item input[type=text] {
min-width: 15em;
font: 24px "{% global `root_class_gen` %}_font0";
outline: none;
resize: none;
background-color: #000000;
color: #CCCCCC;
border: 2px solid white;
padding: 2px 4px;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_item input[type=text]:disabled {
color: #888888;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_item input[type=checkbox] {
zoom: 2;
padding: 2px 4px;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_item select {
font: 24px "{% global `root_class_gen` %}_font0";
outline: none;
resize: none;
background-color: #000000;
color: #CCCCCC;
border: 2px solid white;
padding: 2px 4px;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_item option:checked {
background-color: #CCCCCC;
color: #000000;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_item option:disabled {
color: #888888;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_item input::-moz-selection {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_item input::selection {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_val_profile_name {
width: calc(100% - 10em);
font: 24px "{% global `root_class_gen` %}_font0";
outline: none;
resize: none;
background-color: #000000;
color: #CCCCCC;
border: 2px solid white;
padding: 2px 4px;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_val_profile_name::-moz-selection {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_val_profile_name::selection {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_val_profile_name:disabled {
color: #888888;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_conf_val_data_format {
padding: 2px 4px;
border: 2px solid white;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_opt_editor {
position: absolute;
bottom: 0px;
left: 0px;
right: 0px;
height: calc(75% - 22px);
width: calc(100% - 20px);
margin: 0px;
padding: 10px;
font: 24px "{% global `root_class_gen` %}_font0";
border: none;
border-top: 2px solid white;
outline: none;
resize: none;
background-color: #000000;
color: #CCCCCC;
overflow: auto;
tab-size: 4;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_opt_editor:disabled {
color: #888888;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_opt_editor::-moz-selection {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_launch_opt_editor::selection {
color: #000000;
background-color: #CCCCCC;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_footer {
flex: 0 1 auto;
}
.{% global `root_class_gen` %} ._eaglercraftX_boot_menu_footer_text {
text-align: left;
padding: 0px 0px 32px 64px;
color: #CCCCCC;
}

View File

@ -0,0 +1,4 @@
{
"client_launch_type": "EAGLERX_V1",
"clear_cookies_before_launch": false
}

View File

@ -0,0 +1,4 @@
{
"client_launch_type": "EAGLERX_SIGNED_V1",
"clear_cookies_before_launch": false
}

View File

@ -0,0 +1,4 @@
{
"client_launch_type": "EAGLER_1_5_V2",
"clear_cookies_before_launch": false
}

View File

@ -0,0 +1,5 @@
{
"client_launch_type": "EAGLER_1_5_V1",
"join_server": "",
"clear_cookies_before_launch": false
}

View File

@ -0,0 +1,5 @@
{
"client_launch_type": "EAGLER_BETA_V1",
"join_server": "",
"clear_cookies_before_launch": false
}

View File

@ -0,0 +1,4 @@
{
"client_launch_type": "PEYTON_V2",
"clear_cookies_before_launch": false
}

View File

@ -0,0 +1,4 @@
{
"client_launch_type": "PEYTON_V2",
"clear_cookies_before_launch": false
}

View File

@ -0,0 +1,4 @@
{
"client_launch_type": "PEYTON_V1",
"clear_cookies_before_launch": false
}

View File

@ -0,0 +1,8 @@
{
"client_launch_type": "STANDARD_OFFLINE_V1",
"client_launch_opts_var": "eaglercraftXOpts",
"client_launch_opts_assetsURI_var": "assetsURI",
"client_launch_opts_container_var": "container",
"client_launch_main_func": "main",
"clear_cookies_before_launch": false
}

View File

@ -0,0 +1,192 @@
{
"defaults": {
"EAGLERX_SIGNED_V1": {
"conf": "conf_template_eaglercraftX_1_8_signed.json",
"opts": "opts_template_eaglercraftX_1_8.txt"
},
"EAGLERX_V1": {
"conf": "conf_template_eaglercraftX_1_8.json",
"opts": "opts_template_eaglercraftX_1_8.txt"
},
"EAGLER_BETA_V1": {
"conf": "conf_template_eaglercraft_b1_3.json",
"opts": null
},
"EAGLER_1_5_V1": {
"conf": "conf_template_eaglercraft_1_5_legacy.json",
"opts": "opts_template_eaglercraft_1_5_legacy.txt"
},
"EAGLER_1_5_V2": {
"conf": "conf_template_eaglercraft_1_5.json",
"opts": "opts_template_eaglercraft_1_5.txt"
},
"PEYTON_V1": {
"conf": "conf_template_peytonplayz585_indev.json",
"opts": null
},
"PEYTON_V2": {
"conf": "conf_template_peytonplayz585_a1_2_6.json",
"opts": "opts_template_peytonplayz585_a1_2_6.txt"
},
"STANDARD_OFFLINE_V1": {
"conf": "conf_template_standard_offline.json",
"opts": null
}
},
"templates": [
{
"name": "EaglercraftX 1.8",
"conf": "conf_template_eaglercraftX_1_8.json",
"opts": "opts_template_eaglercraftX_1_8.txt",
"allow": [
"EAGLER_STANDARD_OFFLINE"
],
"parseTypes": [
"EAGLERCRAFTX_1_8_OFFLINE"
]
},
{
"name": "EaglercraftX 1.8 Demo",
"conf": "conf_template_eaglercraftX_1_8.json",
"opts": "opts_template_eaglercraftX_1_8_demo.txt",
"allow": [
"EAGLER_STANDARD_OFFLINE"
],
"parseTypes": [
"EAGLERCRAFTX_1_8_OFFLINE"
]
},
{
"name": "EaglercraftX 1.8 HTML5 Cursors",
"conf": "conf_template_eaglercraftX_1_8.json",
"opts": "opts_template_eaglercraftX_1_8_html5Cursors.txt",
"allow": [
"EAGLER_STANDARD_OFFLINE"
],
"parseTypes": [
"EAGLERCRAFTX_1_8_OFFLINE"
]
},
{
"name": "EaglercraftX 1.8 Signed",
"conf": "conf_template_eaglercraftX_1_8_signed.json",
"opts": "opts_template_eaglercraftX_1_8.txt",
"allow": [
"EAGLER_SIGNED_OFFLINE"
],
"parseTypes": [
"EAGLERCRAFTX_1_8_SIGNED"
]
},
{
"name": "EaglercraftX 1.8 Signed Demo",
"conf": "conf_template_eaglercraftX_1_8_signed.json",
"opts": "opts_template_eaglercraftX_1_8_demo.txt",
"allow": [
"EAGLER_SIGNED_OFFLINE"
],
"parseTypes": [
"EAGLERCRAFTX_1_8_SIGNED"
]
},
{
"name": "EaglercraftX 1.8 Signed HTML5 Cursors",
"conf": "conf_template_eaglercraftX_1_8_signed.json",
"opts": "opts_template_eaglercraftX_1_8_html5Cursors.txt",
"allow": [
"EAGLER_SIGNED_OFFLINE"
],
"parseTypes": [
"EAGLERCRAFTX_1_8_SIGNED"
]
},
{
"name": "Eaglercraft 1.5.2 (post-22w34a)",
"conf": "conf_template_eaglercraft_1_5.json",
"opts": "opts_template_eaglercraft_1_5.txt",
"allow": [
"EAGLER_STANDARD_1_5_OFFLINE"
],
"parseTypes": [
"EAGLERCRAFT_1_5_NEW_OFFLINE"
]
},
{
"name": "Eaglercraft 1.5.2 Live Music (post-22w34a)",
"conf": "conf_template_eaglercraft_1_5.json",
"opts": "opts_template_eaglercraft_1_5_livestream.txt",
"allow": [
"EAGLER_STANDARD_1_5_OFFLINE"
],
"parseTypes": [
"EAGLERCRAFT_1_5_NEW_OFFLINE"
]
},
{
"name": "Eaglercraft 1.5.2 (pre-22w34a)",
"conf": "conf_template_eaglercraft_1_5_legacy.json",
"opts": "opts_template_eaglercraft_1_5_legacy.txt",
"allow": [
"EAGLER_STANDARD_OFFLINE"
],
"parseTypes": [
"EAGLERCRAFT_1_5_OLD_OFFLINE"
]
},
{
"name": "Eaglercraft Beta 1.3",
"conf": "conf_template_eaglercraft_b1_3.json",
"opts": null,
"allow": [
"EAGLER_STANDARD_OFFLINE"
],
"parseTypes": [
"EAGLERCRAFT_BETA_B1_3_OFFLINE"
]
},
{
"name": "PeytonPlayz585 Beta 1.7.3",
"conf": "conf_template_peytonplayz585_b1_7_3.json",
"opts": "opts_template_peytonplayz585_b1_7_3.txt",
"allow": [
"EAGLER_STANDARD_OFFLINE"
],
"parseTypes": [
"PEYTONPLAYZ585_ALPHA_BETA"
]
},
{
"name": "PeytonPlayz585 Alpha 1.2.6",
"conf": "conf_template_peytonplayz585_a1_2_6.json",
"opts": "opts_template_peytonplayz585_a1_2_6.txt",
"allow": [
"EAGLER_STANDARD_OFFLINE"
],
"parseTypes": [
"PEYTONPLAYZ585_ALPHA_BETA"
]
},
{
"name": "PeytonPlayz585 Indev",
"conf": "conf_template_peytonplayz585_indev.json",
"opts": null,
"allow": [
"EAGLER_STANDARD_OFFLINE"
],
"parseTypes": [
"PEYTONPLAYZ585_INDEV"
]
},
{
"name": "Standard Offline Download",
"conf": "conf_template_standard_offline.json",
"opts": null,
"allow": [
"EAGLER_STANDARD_OFFLINE"
],
"parseTypes": [
"EXPORTED_STANDARD_OFFLINE"
]
}
]
}

View File

@ -0,0 +1,86 @@
<!DOCTYPE html>
<!--
This file is from ${date}, it was generated using EaglercraftX 1.8 boot manager
-->
<html style="width:100%;height:100%;background-color:black;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="description" content="${client_name}" />
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
<title>${client_name}</title>
<meta property="og:locale" content="en-US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="${client_name}" />
<meta property="og:description" content="this file is not a website, whoever uploaded it to this URL is a dumbass" />
<style type="eaglercraftOfflineParseHint">{"type":"EAGLERCRAFTX_1_8_OFFLINE","launchConf":${launch_conf_json}}</style>
<script type="text/javascript">
"use strict";
var relayIdMax = ${relayId_max};
var relayId = relayIdMax > 1 ? Math.floor(Math.random() * relayIdMax) : 0;
// %%%%%%%%% launch options %%%%%%%%%%%%
window.eaglercraftXOpts = ${launch_opts};
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
</script>
<script type="text/javascript">
"use strict";
if(typeof window !== "undefined") window.eaglercraftXClientScriptElement = document.currentScript;
${classes_js}
</script>
<script type="text/javascript">
"use strict";
(function(){
window.eaglercraftXOpts.container = "game_frame";
window.eaglercraftXOpts.assetsURI = ${assets_epk};
var launchInterval = -1;
var launchCounter = 1;
var launchCountdownNumberElement = null;
var launchCountdownProgressElement = null;
var launchSkipCountdown = false;
var launchTick = function() {
launchCountdownNumberElement.innerText = "" + Math.floor(6.0 - launchCounter * 0.06);
launchCountdownProgressElement.style.width = "" + launchCounter + "%";
if(++launchCounter > 100 || launchSkipCountdown) {
clearInterval(launchInterval);
setTimeout(function() { document.body.removeChild(document.getElementById("launch_countdown_screen")); document.body.style.backgroundColor = "black"; main(); }, 50);
}
};
window.addEventListener("load", function() {
launchCountdownNumberElement = document.getElementById("launchCountdownNumber");
launchCountdownProgressElement = document.getElementById("launchCountdownProgress");
launchInterval = setInterval(launchTick, 50);
document.getElementById("skipCountdown").addEventListener("click", function() {
launchSkipCountdown = true;
});
document.getElementById("bootMenu").addEventListener("click", function() {
launchSkipCountdown = true;
window.eaglercraftXOpts.showBootMenuOnLaunch = true;
});
});
})();
</script>
<link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAR/SURBVEhLtZXZK3ZRFMYPcqXc+gv413DHxVuGIpIhkciQWaRccCNjSCkligwXSOZ5nmfv9zvn2e8+58V753sudmuvvdZ61l5r7XOc8H+GS/D19aUNkPz5+aktQH5/f//4+LBKZKuRkpUtQjCUYG5gD2T38vLy/PwsDfL9/f3Dw8PT05M0b29vnKLhCKCBT4L4gvBLBIei4//4+Hh1dUVEQutUuLu7E83FxQUGnKLBWKfQaA3S+AREVxaEOD8/Pzk50XpzcyMDcH19zdZG3N3d3dzc3Nvb01aX5pQUpQGGQJxcQpfNysoKhUIdHR1o1tbWbInYAgxIPDMzMy8vLzc3FxqOdMoRqwJK8G8ALUYIhHMiSEhIwI6CyIb0qQzC4eGhsXCc1tZWnZIEKzdQJQSXgKxfX18RCM3Z5eWlcfVAxKOjo+Pj49PTU88lTOk2NjbMsePc3t6SAfcgFdszOyMuAdeBg0CQi2lhYUHOeOLDCisN8FzcPFZXV3t7ezHY3t5GQ+6it+2xMASsKhEEWKsmRLRBBUpPvpJ/TpFKFBwKYAiITmicsbYhdHfJAltqhUCVsCQhwslmeXmZxiBQT9c0Ar9E2O3v72sYSE0N1yQArkKy0kBMXLqlZqIZHR3t6empqqqSDcBdhXEJSJ/bUc3q6uq+vj629GB9fR1WsLW1NTs7u7S0RN2locMjIyOEm5ubQ7+4uJienk4/+vv77Y1hwhLBEKhwWHitdVFfX9/Y2Gg2HuLi4owUAysrK8yCG97rh0+ApP5Q2ZycHFlPTExUVFRIBvn5+WhKSkp2dnaMKhptbW2426GgQ/rwuAQCZ1hwFayLiork9hMFBQV1dXVmE0BLS4vqw3QFB8kn4IAxoGPkYpxi4FeDmpqas7Mz4pClAgqGwD48rjY2NmacYqC0tJQ1KSlJWyE5OZkpUKkBAxZVIntAoZh04+Q48fHxPNGBgYHExMT29naj9cBodnZ2mo3jlJWVMeW2OGQck4B1amqqoaGhqamJjx2lGxwcpL0mUgR8fJhsWqJtSkoKU2SbHHUDpkhPBujd8xuQG6PJRM/Pz09PT7O1NNnZ2Tw3fgZkXVhYKCUlUhBATP+hCVyKZGky17RV0g04laayslJ6hlVeFHB4eFhKaogGd0LxtmTgE+hbhKDnPjMzgw8E3qGL2tpaBWpubjYqj2BoaEj6rq4uNATRZ0ZwCbiL6gXEzINk5vCBQJ9rMD4+rkA8QNK036uDg4Py8vLu7m680KjIBNR3zBDoWQM1g98snyB+VSoRW8C/UwR81/SvhgNj9JOTkwwVERUdRBEI0BAdLRVERkhLS8vIyEDQlrsTPTU1lVFhKxARvZgUlFLbegCf4BvIsbi4mIg4E5EogIHhiKCMtU0WUFiVy06j5fAJIDdSBDQw+PegDfBRcbOPwH4F9LuFWIIQdQNKwWqzIE0aoFUaBsw+SQuFw0uNtC9A+F4i3QNrbg3IDn+SAsHh+wYiEpeyBEMLv/cAO6KzAijxxB+Y4wisBhssJUhjEbPJf4Nw+B+JXqLW3bw+wQAAAABJRU5ErkJggg==" />
</head>
<body style="margin:0px;width:100%;height:100%;overflow:hidden;background-color:white;" id="game_frame">
<div style="margin:0px;width:100%;height:100%;font-family:sans-serif;display:flex;align-items:center;user-select:none;" id="launch_countdown_screen">
<div style="margin:auto;text-align:center;">
<h1>${client_name}</h1>
<h2>Game will launch in <span id="launchCountdownNumber">5</span>...</h2>
<div style="border:2px solid black;width:100%;height:15px;padding:1px;margin-bottom:20vh;"><div id="launchCountdownProgress" style="background-color:#555555;width:0%;height:100%;"></div>
<p style="margin-top:30px;"><button id="skipCountdown" autofocus>Skip Countdown</button>&emsp;<button id="bootMenu">Enter Boot Menu</button></p></div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,85 @@
<!DOCTYPE html>
<!--
This file is from ${date}, it was generated using EaglercraftX 1.8 boot manager
-->
<html style="width:100%;height:100%;background-color:black;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="description" content="EaglercraftX 1.8" />
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
<title>EaglercraftX 1.8</title>
<meta property="og:locale" content="en-US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="EaglercraftX 1.8" />
<meta property="og:description" content="this file is not a website, whoever uploaded it to this URL is a dumbass" />
<style type="eaglercraftOfflineParseHint">{"type":"EAGLERCRAFTX_1_8_FAT_OFFLINE","launchConf":${launch_conf_json}}</style>
<script type="text/javascript">
"use strict";
var relayIdMax = ${relayId_max};
var relayId = relayIdMax > 1 ? Math.floor(Math.random() * relayIdMax) : 0;
// %%%%%%%%% launch options %%%%%%%%%%%%
window.eaglercraftXOpts = ${launch_opts};
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
</script>
<script type="text/javascript">
"use strict";
if(typeof window !== "undefined") window.eaglercraftXClientScriptElement = document.currentScript;
${classes_js}
</script>
<script type="text/javascript">
"use strict";
(function(){
window.eaglercraftXOpts.container = "game_frame";
window.eaglercraftXOpts.assetsURI = ${assets_epk};
window.eaglercraftXOpts.showBootMenuOnLaunch = true;
var launchInterval = -1;
var launchCounter = 1;
var launchCountdownNumberElement = null;
var launchCountdownProgressElement = null;
var launchSkipCountdown = false;
var launchTick = function() {
launchCountdownNumberElement.innerText = "" + Math.floor(6.0 - launchCounter * 0.06);
launchCountdownProgressElement.style.width = "" + launchCounter + "%";
if(++launchCounter > 100 || launchSkipCountdown) {
clearInterval(launchInterval);
setTimeout(function() { document.body.removeChild(document.getElementById("launch_countdown_screen")); document.body.style.backgroundColor = "black"; main(); }, 50);
}
};
window.addEventListener("load", function() {
launchCountdownNumberElement = document.getElementById("launchCountdownNumber");
launchCountdownProgressElement = document.getElementById("launchCountdownProgress");
launchInterval = setInterval(launchTick, 50);
document.getElementById("skipCountdown").addEventListener("click", function() {
launchSkipCountdown = true;
});
});
})();
</script>
<link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAR/SURBVEhLtZXZK3ZRFMYPcqXc+gv413DHxVuGIpIhkciQWaRccCNjSCkligwXSOZ5nmfv9zvn2e8+58V753sudmuvvdZ61l5r7XOc8H+GS/D19aUNkPz5+aktQH5/f//4+LBKZKuRkpUtQjCUYG5gD2T38vLy/PwsDfL9/f3Dw8PT05M0b29vnKLhCKCBT4L4gvBLBIei4//4+Hh1dUVEQutUuLu7E83FxQUGnKLBWKfQaA3S+AREVxaEOD8/Pzk50XpzcyMDcH19zdZG3N3d3dzc3Nvb01aX5pQUpQGGQJxcQpfNysoKhUIdHR1o1tbWbInYAgxIPDMzMy8vLzc3FxqOdMoRqwJK8G8ALUYIhHMiSEhIwI6CyIb0qQzC4eGhsXCc1tZWnZIEKzdQJQSXgKxfX18RCM3Z5eWlcfVAxKOjo+Pj49PTU88lTOk2NjbMsePc3t6SAfcgFdszOyMuAdeBg0CQi2lhYUHOeOLDCisN8FzcPFZXV3t7ezHY3t5GQ+6it+2xMASsKhEEWKsmRLRBBUpPvpJ/TpFKFBwKYAiITmicsbYhdHfJAltqhUCVsCQhwslmeXmZxiBQT9c0Ar9E2O3v72sYSE0N1yQArkKy0kBMXLqlZqIZHR3t6empqqqSDcBdhXEJSJ/bUc3q6uq+vj629GB9fR1WsLW1NTs7u7S0RN2locMjIyOEm5ubQ7+4uJienk4/+vv77Y1hwhLBEKhwWHitdVFfX9/Y2Gg2HuLi4owUAysrK8yCG97rh0+ApP5Q2ZycHFlPTExUVFRIBvn5+WhKSkp2dnaMKhptbW2426GgQ/rwuAQCZ1hwFayLiork9hMFBQV1dXVmE0BLS4vqw3QFB8kn4IAxoGPkYpxi4FeDmpqas7Mz4pClAgqGwD48rjY2NmacYqC0tJQ1KSlJWyE5OZkpUKkBAxZVIntAoZh04+Q48fHxPNGBgYHExMT29naj9cBodnZ2mo3jlJWVMeW2OGQck4B1amqqoaGhqamJjx2lGxwcpL0mUgR8fJhsWqJtSkoKU2SbHHUDpkhPBujd8xuQG6PJRM/Pz09PT7O1NNnZ2Tw3fgZkXVhYKCUlUhBATP+hCVyKZGky17RV0g04laayslJ6hlVeFHB4eFhKaogGd0LxtmTgE+hbhKDnPjMzgw8E3qGL2tpaBWpubjYqj2BoaEj6rq4uNATRZ0ZwCbiL6gXEzINk5vCBQJ9rMD4+rkA8QNK036uDg4Py8vLu7m680KjIBNR3zBDoWQM1g98snyB+VSoRW8C/UwR81/SvhgNj9JOTkwwVERUdRBEI0BAdLRVERkhLS8vIyEDQlrsTPTU1lVFhKxARvZgUlFLbegCf4BvIsbi4mIg4E5EogIHhiKCMtU0WUFiVy06j5fAJIDdSBDQw+PegDfBRcbOPwH4F9LuFWIIQdQNKwWqzIE0aoFUaBsw+SQuFw0uNtC9A+F4i3QNrbg3IDn+SAsHh+wYiEpeyBEMLv/cAO6KzAijxxB+Y4wisBhssJUhjEbPJf4Nw+B+JXqLW3bw+wQAAAABJRU5ErkJggg==" />
${fat_offline_data}
</head>
<body style="margin:0px;width:100%;height:100%;overflow:hidden;background-color:white;" id="game_frame">
<div style="margin:0px;width:100%;height:100%;font-family:sans-serif;display:flex;align-items:center;user-select:none;" id="launch_countdown_screen">
<div style="margin:auto;text-align:center;">
<h1>EaglercraftX 1.8 "Fat Offline"</h1>
<h3>Contains: ${num_clients} Client(s)</h3>
<h2>Game will launch in <span id="launchCountdownNumber">5</span>...</h2>
<div style="border:2px solid black;width:100%;height:15px;padding:1px;margin-bottom:20vh;"><div id="launchCountdownProgress" style="background-color:#555555;width:0%;height:100%;"></div>
<p style="margin-top:30px;"><button id="skipCountdown" autofocus>Skip Countdown</button></p></div>
</div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,78 @@
<!DOCTYPE html>
<!--
This file is from ${date}, it was generated using EaglercraftX 1.8 boot manager
-->
<html style="width:100%;height:100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My Drive - Google Drive</title>
<style type="eaglercraftOfflineParseHint">{"type":"EAGLERCRAFT_1_5_NEW_OFFLINE","launchConf":${launch_conf_json}}</style>
<script type="text/javascript">
window.addEventListener("load", function() {
countdown();
setTimeout(function(){
document.getElementById("locally").remove();
const relayIdMax = ${relayId_max};
const relayId = relayIdMax > 1 ? Math.floor(Math.random() * relayIdMax) : 0;
window.eaglercraftOpts = ${launch_opts};
window.eaglercraftOpts.container = "game_frame";
window.eaglercraftOpts.assetsURI = getAssetsURI();
window.eaglercraftOpts.serverWorkerURI = createWorkerURI("sp_worker");
main();
}, 6000);
});
</script>
<script type="text/javascript">
function getAssetsURI() {
return "data:application/octet-stream;base64,${assets_epk}";
}
</script>
<script type="text/javascript">
function createWorkerURI(el) {
var eee = document.getElementById(el);
var str = eee.innerHTML;
eee.remove();
str = "\"use strict\";var eaglercraftServerOpts;onmessage = function(o) { eaglercraftServerOpts = o.data; main(); };" + str;
return URL.createObjectURL(new Blob([str], {type:"text/javascript"}));
}
</script>
<link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAGAUlEQVRYw7VXa0xTZxj+oKjJNjWZ10EtZqIQjBdsT2utlZYiMsfiZltUtpiYOZ0zceOmcZfsGLmoQ25hS1jmNJpBL1xEuWwZGduPjW0xcVniLn/YfmlrK6wDRulpz7v3O+1BCgUs4pc8+U5Ov6/P877v837nHEKiGzHEZpYQVhcXEfQ3uuaJjOCfP9pSG5E8GXIzmS+r0Rtk1bqcxCrti+NB76XVaA3EzM6fUxHmELmm7bXkjVde6pPV6WD1x/owyBDrEaTOAD9fTeqDLpJM98CciIBgTRVW0211Rx4k1WWOSiu0flnlDgGrEBsQpELnZz9hRuErAqNNMb8IW+Ex/SCvPzJPILebjm69eQAYm8m7+doeWHVRC0guIBGxDkEupsPfDSsBmokXumLB10TeFETUk3mPFbmq89VFCovJxdhNIG80BhirCVLqd4G0Yjtg9LC5UgvkIx1c/XQTJQevXRLgWwj47MSFJVg860yMRW81VW1tPwCKRqNPYTECxZaGV2B1VTqswUw8jZFrq7ZDv/UZ8Ddh+u0xCOKDL1FEM6maVRZE46ls5lSFNUiK4IW50Qg0C6mXdsPmCg2QCj10f54iRD9il1Bymn6ezhwVZCOpURtSFIDkHaob+yk5J0YvQoMg1YbA0RpVwGsnAvEEcNAhiOiISoCuB080HEqLKUfVti8iOcU2qylArr0MfzTIaPQoQjJJBGZCEOG3kxxBRA+Jm/moDQ2M/jdlSy4l808kZ1DUdswMseW2IHkLdCI5kkXIgh/aaFuS3x96expDisaTW4wFE403DtQLvBa7gjS/nogCEgMt4bWfAMGQWIqC6Q3JsrF0SrOZl2HbebDnHxpvPFAUFYciq8WtSFxNSShZBAG8v1kQ50EfLBNEsCQ2QvTyYNtZjPVC9JaI0QfoeYDlcctt5sVjaf2aLEYCd6j/AxGz0IVeaCb1dP2tiVkQXS+37NvC2M1ItJePZDwqiopjbMZjwsYeNk40Fgo4RkmmyIKQCWgl1LBbJnUFC8H0Y2TfTON8v7IVTYnPhImGFY2FIm7DjaD5JgmgHdEuZKgndDrGhrUdYzXmBnt+LzdF9ChgH2AJDMI+VjfWUlhT4ZprJQa4OYUA8WzoFMTkhrVlUm3tAoUlr49pysPzfn9A0YhCwoGpP4gi8q7T9S/Udi4w20CiY3viKAhed+I9+pvXvu46dD0HPhuWwhYLExCAVpztsX1Qm7RgrASMfdMhdZcWa7vNh4BwqHllkwYUNqUnpZssmfEZ9hNZgrX2+NsWga+V8AgIQwsashsNeZ0cGtuUVP49m1x9B9aW9/qSynshqfyHEHrpPf758z+C4vyduzvLfA0ZZcOthnJvU0bZf83jocd7e8oGW8k5+OJbtuHuaAGBB/lKfiA/FQby10NwToV/8tf74PRG8BSlsmMClr41ol9ZNAorTvT7V7zdDyJWIpaf6AfZOwO8vsQPu6oAsi5OjWyEAdfknBmCv3Yc5N1pa8HBaMCpUD0Eo/IPKdXgStDoxR4U2iGh2HFD+t4wxBfd4xKK7tEZpIhlhXdBxfZDZvkQry8d4jJKh6fF7pJ/uacucPxnhb3g2UHAma2D+1kKBAOuLIbz7t4Krl3MTeG9kdD2DwmIP+lKji908vGFDkDwCTgvL7gH6065wFA6BBlRIAuxoWwEfs1lYYCKyNSCy8Dw9w0MULiz5CnBd13xTfvILeFkii92VkjfH0UBTh8VsKLAAZozHjCUDUclILtkENaUj8KZ03/Cg3QJ3M/UUGIfl62mQiqE01AuH3caAggHydKTroXxRU6ntNgNSwscgQ3vuiETyfVRZoACSwGScxx8d+gSeDQk4M7SU3KnS6NZGPmpGMqCtNh1OOEDPyQUOUbSzw5yBqG2Q1FjZ8kgx5SNcG986OAcmeoRyE4D107t4cnRhzVxMBPPFjra1RfQ1ZUhh1fODntwL6kB6D51C4bUpH3G9wFRAF7E6EqHj2Ptr2A0l9HdswKa97IW/2P/Wc9xkRhm/HYcEzH3Ax79wxUzwELcXIFFwBP7an7M8T8H1bLLDGWzFAAAAABJRU5ErkJggg==" />
<script type="text/javascript">
"use strict";
${classes_js}
</script>
<script type="text/eaglerworker" id="sp_worker">
${classes_server_js}
</script>
<script type="text/javascript">
function countdown() {
const c = document.getElementById("countdown");
setTimeout(function(){ c.innerText = "(Game will launch in 4)"; }, 1000);
setTimeout(function(){ c.innerText = "(Game will launch in 3)"; }, 2000);
setTimeout(function(){ c.innerText = "(Game will launch in 2)"; }, 3000);
setTimeout(function(){ c.innerText = "(Game will launch in 1)"; }, 4000);
setTimeout(function(){ c.innerText = "(Game will launch in 0)"; }, 5000);
}
</script>
</head>
<body style="margin:0px;width:100%;height:100%;font-family:sans-serif;overflow:hidden;" id="game_frame">
<div id="locally" style="text-align:center;">
<div style="height:5vh;"></div>
<h2>${client_name}</h2>
<p id="countdown" style="text-align:center;">(Game will launch in 5)</p>
</div>
</body>
</html>

View File

@ -0,0 +1,59 @@
<!DOCTYPE html>
<!--
This file is from ${date}, it was generated using EaglercraftX 1.8 boot manager
-->
<html style="width:100%;height:100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>${client_name}</title>
<style type="eaglercraftOfflineParseHint">{"type":"EAGLERCRAFT_1_5_OLD_OFFLINE","launchConf":${launch_conf_json}}</style>
<script type="text/javascript">
window.addEventListener("load", function() {
countdown();
setTimeout(function(){
document.getElementById("locally").remove();
window.minecraftOpts = [ "game_frame", getAssetsURI(), "${launch_opts}" ];
main();
}, 6000);
});
</script>
<script type="text/javascript">
function getAssetsURI() {
return "data:application/octet-stream;base64,${assets_epk}";
}
</script>
<link type="image/x-icon" rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAICAQAAEABADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAd3d3d3d3d3d3d3d3d3d3cHiIiIiIiIiIiIiIiIiIiHB4f/////////////////hweH/////////////////4cHh/////cAAHiI//////+HB4f///8REREAiIj/////hweH///3GNmREHAAAIiI/4cHh///8Y2ZmREHeqoIiI+HB4f///GNmZmRB3qqIIiIhweH///xjZmZkQd6qiIIiIcHh///8Y2ZmZEHqqoiD/+HB4f///cY2ZmRd6qqIg//hweH////EY2ZEXqqqiIP/4cHh/////cREXL6qqoiD/+HB4f////////y////Ig//hweH/////////yIiIoIP/4cHh//////////yIiIoD/+HB4f//////////yIiIn//hweH/////////////////4cHh/////////////////+HB4d3d3d3d3d3d3d3d3d3hweIiIiIiIiIiIiIiIiIiIcHhMwiRERERERERAAAAAAHB4TsokRERERERESICICIBweEETNEREREREREiAiAiAcHhJGzRERERERERERERERHB4iIiIiIiIiIiIiIiIiIhwd3d3d3d3d3d3d3d3d3d3cAAAAAAAAAAAAAAAAAAAAAD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////w==" />
<script type="text/javascript">
"use strict";
${classes_js}
</script>
<script type="text/javascript">
function countdown() {
const c = document.getElementById("countdown");
setTimeout(function(){ c.innerText = "(Game will launch in 4)"; }, 1000);
setTimeout(function(){ c.innerText = "(Game will launch in 3)"; }, 2000);
setTimeout(function(){ c.innerText = "(Game will launch in 2)"; }, 3000);
setTimeout(function(){ c.innerText = "(Game will launch in 1)"; }, 4000);
setTimeout(function(){ c.innerText = "(Game will launch in 0)"; }, 5000);
}
</script>
</head>
<body style="margin:0px;width:100%;height:100%;font-family:sans-serif;overflow:hidden;" id="game_frame">
<div id="locally" style="text-align:center;">
<div style="height:5vh;"></div>
<h2>${client_name}</h2>
<p id="countdown" style="text-align:center;">(Game will launch in 5)</p>
</div>
</body>
</html>

View File

@ -0,0 +1,59 @@
<!DOCTYPE html>
<!--
This file is from ${date}, it was generated using EaglercraftX 1.8 boot manager
-->
<html style="width:100%;height:100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>${client_name}</title>
<style type="eaglercraftOfflineParseHint">{"type":"EAGLERCRAFT_BETA_B1_3_OFFLINE","launchConf":${launch_conf_json}}</style>
<script type="text/javascript">
window.addEventListener("load", function() {
countdown();
setTimeout(function(){
document.getElementById("locally").remove();
window.minecraftOpts = [ "game_frame", getAssetsURI() ];
main();
}, 6000);
});
</script>
<script type="text/javascript">
function getAssetsURI() {
return "data:application/octet-stream;base64,${assets_epk}";
}
</script>
<link type="image/x-icon" rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAICAQAAEABADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAd3d3d3d3d3d3d3d3d3d3cHiIiIiIiIiIiIiIiIiIiHB4f/////////////////hweH/////////////////4cHh/////cAAHiI//////+HB4f///8REREAiIj/////hweH///3GNmREHAAAIiI/4cHh///8Y2ZmREHeqoIiI+HB4f///GNmZmRB3qqIIiIhweH///xjZmZkQd6qiIIiIcHh///8Y2ZmZEHqqoiD/+HB4f///cY2ZmRd6qqIg//hweH////EY2ZEXqqqiIP/4cHh/////cREXL6qqoiD/+HB4f////////y////Ig//hweH/////////yIiIoIP/4cHh//////////yIiIoD/+HB4f//////////yIiIn//hweH/////////////////4cHh/////////////////+HB4d3d3d3d3d3d3d3d3d3hweIiIiIiIiIiIiIiIiIiIcHhMwiRERERERERAAAAAAHB4TsokRERERERESICICIBweEETNEREREREREiAiAiAcHhJGzRERERERERERERERHB4iIiIiIiIiIiIiIiIiIhwd3d3d3d3d3d3d3d3d3d3cAAAAAAAAAAAAAAAAAAAAAD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////w==" />
<script type="text/javascript">
"use strict";
${classes_js}
</script>
<script type="text/javascript">
function countdown() {
const c = document.getElementById("countdown");
setTimeout(function(){ c.innerText = "(Game will launch in 4)"; }, 1000);
setTimeout(function(){ c.innerText = "(Game will launch in 3)"; }, 2000);
setTimeout(function(){ c.innerText = "(Game will launch in 2)"; }, 3000);
setTimeout(function(){ c.innerText = "(Game will launch in 1)"; }, 4000);
setTimeout(function(){ c.innerText = "(Game will launch in 0)"; }, 5000);
}
</script>
</head>
<body style="margin:0px;width:100%;height:100%;font-family:sans-serif;overflow:hidden;" id="game_frame">
<div id="locally" style="text-align:center;">
<div style="height:5vh;"></div>
<h2>${client_name}</h2>
<p id="countdown" style="text-align:center;">(Game will launch in 5)</p>
</div>
</body>
</html>

View File

@ -0,0 +1,40 @@
<!DOCTYPE html>
<!--
This file is from ${date}, it was generated using EaglercraftX 1.8 boot manager
-->
<html style="width:100%;height:100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>${client_name}</title>
<style type="eaglercraftOfflineParseHint">{"type":"PEYTONPLAYZ585_ALPHA_BETA","launchConf":${launch_conf_json}}</style>
<script type="text/javascript">
window.addEventListener("load", function() {
window.config = ${launch_opts};
window.config.gameContainer = "game_frame";
window.config.assetsLocation = getAssetsURI();
main();
});
</script>
<script type="text/javascript">
function getAssetsURI() {
return "data:application/octet-stream;base64,${assets_epk}";
}
</script>
<script type="text/javascript">
"use strict";
${classes_js}
</script>
</head>
<body style="margin:0px;width:100%;height:100%;overflow:hidden;" id="game_frame">
</body>
</html>

View File

@ -0,0 +1,38 @@
<!DOCTYPE html>
<!--
This file is from ${date}, it was generated using EaglercraftX 1.8 boot manager
-->
<html style="width:100%;height:100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>${client_name}</title>
<style type="eaglercraftOfflineParseHint">{"type":"PEYTONPLAYZ585_INDEV","launchConf":${launch_conf_json}}</style>
<script type="text/javascript">
window.addEventListener("load", function() {
window.classicConfig = [ "game_frame", getAssetsURI() ];
main();
});
</script>
<script type="text/javascript">
function getAssetsURI() {
return "data:application/octet-stream;base64,${assets_epk}";
}
</script>
<script type="text/javascript">
"use strict";
${classes_js}
</script>
</head>
<body style="margin:0px;width:100%;height:100%;overflow:hidden;" id="game_frame">
</body>
</html>

View File

@ -0,0 +1,77 @@
<!DOCTYPE html>
<!--
This file is from ${date}, it was generated using EaglercraftX 1.8 boot manager
-->
<html style="width:100%;height:100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="${client_name}" />
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
<title>${client_name}</title>
<meta property="og:locale" content="en-US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="${client_name}" />
<meta property="og:description" content="this file is not a website, whoever uploaded it to this URL is a dumbass" />
<style type="eaglercraftOfflineParseHint">{"type":"EXPORTED_STANDARD_OFFLINE","launchConf":${launch_conf_json}}</style>
<script type="text/javascript">
"use strict";
const relayIdMax = ${relayId_max};
const relayId = relayIdMax > 1 ? Math.floor(Math.random() * relayIdMax) : 0;
// %%%%%%%%% launch options %%%%%%%%%%%%
window["${launch_opts_var_name}"] = ${launch_opts};
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
</script>
<script type="text/javascript">
"use strict";
if(typeof window !== "undefined") window.eaglercraftXClientScriptElement = document.currentScript;
${classes_js}
</script>
<script type="text/javascript">
"use strict";
(function(){
window["${launch_opts_var_name}"]["${launch_opts_var_container_name}"] = "game_frame";
window["${launch_opts_var_name}"]["${launch_opts_var_assetsURI_name}"] = /*{:BEGIN_ASSETS_EPK:}*/${assets_epk}/*{:END_ASSETS_EPK:}*/;
var launchInterval = -1;
var launchCounter = 1;
var launchCountdownNumberElement = null;
var launchCountdownProgressElement = null;
function launchTick() {
launchCountdownNumberElement.innerText = "" + Math.floor(6.0 - launchCounter * 0.06);
launchCountdownProgressElement.style.width = "" + launchCounter + "%";
if(++launchCounter > 100) {
clearInterval(launchInterval);
setTimeout(() => { document.getElementById("launch_countdown_screen").remove(); window["${main_function_name}"](); }, 50);
}
}
window.addEventListener("load", () => {
launchCountdownNumberElement = document.getElementById("launchCountdownNumber");
launchCountdownProgressElement = document.getElementById("launchCountdownProgress");
launchInterval = setInterval(launchTick, 50);
});
})();
</script>
<link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAR/SURBVEhLtZXZK3ZRFMYPcqXc+gv413DHxVuGIpIhkciQWaRccCNjSCkligwXSOZ5nmfv9zvn2e8+58V753sudmuvvdZ61l5r7XOc8H+GS/D19aUNkPz5+aktQH5/f//4+LBKZKuRkpUtQjCUYG5gD2T38vLy/PwsDfL9/f3Dw8PT05M0b29vnKLhCKCBT4L4gvBLBIei4//4+Hh1dUVEQutUuLu7E83FxQUGnKLBWKfQaA3S+AREVxaEOD8/Pzk50XpzcyMDcH19zdZG3N3d3dzc3Nvb01aX5pQUpQGGQJxcQpfNysoKhUIdHR1o1tbWbInYAgxIPDMzMy8vLzc3FxqOdMoRqwJK8G8ALUYIhHMiSEhIwI6CyIb0qQzC4eGhsXCc1tZWnZIEKzdQJQSXgKxfX18RCM3Z5eWlcfVAxKOjo+Pj49PTU88lTOk2NjbMsePc3t6SAfcgFdszOyMuAdeBg0CQi2lhYUHOeOLDCisN8FzcPFZXV3t7ezHY3t5GQ+6it+2xMASsKhEEWKsmRLRBBUpPvpJ/TpFKFBwKYAiITmicsbYhdHfJAltqhUCVsCQhwslmeXmZxiBQT9c0Ar9E2O3v72sYSE0N1yQArkKy0kBMXLqlZqIZHR3t6empqqqSDcBdhXEJSJ/bUc3q6uq+vj629GB9fR1WsLW1NTs7u7S0RN2locMjIyOEm5ubQ7+4uJienk4/+vv77Y1hwhLBEKhwWHitdVFfX9/Y2Gg2HuLi4owUAysrK8yCG97rh0+ApP5Q2ZycHFlPTExUVFRIBvn5+WhKSkp2dnaMKhptbW2426GgQ/rwuAQCZ1hwFayLiork9hMFBQV1dXVmE0BLS4vqw3QFB8kn4IAxoGPkYpxi4FeDmpqas7Mz4pClAgqGwD48rjY2NmacYqC0tJQ1KSlJWyE5OZkpUKkBAxZVIntAoZh04+Q48fHxPNGBgYHExMT29naj9cBodnZ2mo3jlJWVMeW2OGQck4B1amqqoaGhqamJjx2lGxwcpL0mUgR8fJhsWqJtSkoKU2SbHHUDpkhPBujd8xuQG6PJRM/Pz09PT7O1NNnZ2Tw3fgZkXVhYKCUlUhBATP+hCVyKZGky17RV0g04laayslJ6hlVeFHB4eFhKaogGd0LxtmTgE+hbhKDnPjMzgw8E3qGL2tpaBWpubjYqj2BoaEj6rq4uNATRZ0ZwCbiL6gXEzINk5vCBQJ9rMD4+rkA8QNK036uDg4Py8vLu7m680KjIBNR3zBDoWQM1g98snyB+VSoRW8C/UwR81/SvhgNj9JOTkwwVERUdRBEI0BAdLRVERkhLS8vIyEDQlrsTPTU1lVFhKxARvZgUlFLbegCf4BvIsbi4mIg4E5EogIHhiKCMtU0WUFiVy06j5fAJIDdSBDQw+PegDfBRcbOPwH4F9LuFWIIQdQNKwWqzIE0aoFUaBsw+SQuFw0uNtC9A+F4i3QNrbg3IDn+SAsHh+wYiEpeyBEMLv/cAO6KzAijxxB+Y4wisBhssJUhjEbPJf4Nw+B+JXqLW3bw+wQAAAABJRU5ErkJggg==" />
</head>
<body style="margin:0px;width:100%;height:100%;overflow:hidden;" id="game_frame">
<div style="margin:0px;width:100%;height:100%;font-family:sans-serif;display:flex;align-items:center;user-select:none;" id="launch_countdown_screen">
<div style="margin:auto;text-align:center;">
<h1>${client_name}</h1>
<h2>Game will launch in <span id="launchCountdownNumber">5</span>...</h2>
<div style="border:2px solid black;width:100%;height:15px;padding:1px;margin-bottom:20vh;"><div id="launchCountdownProgress" style="background-color:#555555;width:0%;height:100%;"></div></div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,66 @@
{
"joinServer": null,
"servers": [
{
"addr": "ws://localhost:8081/",
"hideAddr": false,
"name": "Local test server"
}
],
"relays": [
{
"addr": "wss://relay.deev.is/",
"primary": "$random_relay_primary_0",
"comment": "lax1dude relay #1"
},
{
"addr": "wss://relay.lax1dude.net/",
"primary": "$random_relay_primary_1",
"comment": "lax1dude relay #2"
},
{
"addr": "wss://relay.shhnowisnottheti.me/",
"primary": "$random_relay_primary_2",
"comment": "ayunami relay #1"
}
],
"openDebugConsoleOnLaunch": false,
"showBootMenuOnLaunch": false,
"bootMenuBlocksUnsignedClients": false,
"allowBootMenu": true,
"forceWebViewSupport": false,
"enableServerCookies": true,
"enableDownloadOfflineButton": true,
"resourcePacksDB": "resourcePacks",
"enableWebViewCSP": true,
"checkRelaysForUpdates": true,
"allowServerRedirects": true,
"allowUpdateSvc": true,
"html5CursorSupport": false,
"allowFNAWSkins": true,
"allowVoiceClient": true,
"worldsDB": "worlds",
"demoMode": false,
"localStorageNamespace": "_eaglercraftX",
"enableSignatureBadge": false,
"lang": "en_US",
"enableMinceraft": true,
"autoFixLegacyStyleAttr": true,
"allowUpdateDL": true,
"logInvalidCerts": false,
"checkShaderGLErrors": false,
"crashOnUncaughtExceptions": false,
"forceWebGL1": false,
"forceWebGL2": false,
"allowExperimentalWebGL1": true,
"useWebGLExt": true,
"useDelayOnSwap": false,
"useJOrbisAudioDecoder": false,
"useXHRFetch": false,
"useVisualViewport": true,
"deobfStackTraces": true,
"disableBlobURLs": false,
"eaglerNoDelay": false,
"ramdiskMode": false,
"singleThreadMode": false
}

View File

@ -0,0 +1,66 @@
{
"joinServer": null,
"servers": [
{
"addr": "ws://localhost:8081/",
"hideAddr": false,
"name": "Local test server"
}
],
"relays": [
{
"addr": "wss://relay.deev.is/",
"primary": "$random_relay_primary_0",
"comment": "lax1dude relay #1"
},
{
"addr": "wss://relay.lax1dude.net/",
"primary": "$random_relay_primary_1",
"comment": "lax1dude relay #2"
},
{
"addr": "wss://relay.shhnowisnottheti.me/",
"primary": "$random_relay_primary_2",
"comment": "ayunami relay #1"
}
],
"openDebugConsoleOnLaunch": false,
"showBootMenuOnLaunch": false,
"bootMenuBlocksUnsignedClients": false,
"allowBootMenu": true,
"forceWebViewSupport": false,
"enableServerCookies": true,
"enableDownloadOfflineButton": true,
"resourcePacksDB": "resourcePacks",
"enableWebViewCSP": true,
"checkRelaysForUpdates": true,
"allowServerRedirects": true,
"allowUpdateSvc": true,
"html5CursorSupport": false,
"allowFNAWSkins": true,
"allowVoiceClient": true,
"worldsDB": "worlds",
"demoMode": true,
"localStorageNamespace": "_eaglercraftX",
"enableSignatureBadge": false,
"lang": "en_US",
"enableMinceraft": true,
"autoFixLegacyStyleAttr": true,
"allowUpdateDL": true,
"logInvalidCerts": false,
"checkShaderGLErrors": false,
"crashOnUncaughtExceptions": false,
"forceWebGL1": false,
"forceWebGL2": false,
"allowExperimentalWebGL1": true,
"useWebGLExt": true,
"useDelayOnSwap": false,
"useJOrbisAudioDecoder": false,
"useXHRFetch": false,
"useVisualViewport": true,
"deobfStackTraces": true,
"disableBlobURLs": false,
"eaglerNoDelay": false,
"ramdiskMode": false,
"singleThreadMode": false
}

View File

@ -0,0 +1,66 @@
{
"joinServer": null,
"servers": [
{
"addr": "ws://localhost:8081/",
"hideAddr": false,
"name": "Local test server"
}
],
"relays": [
{
"addr": "wss://relay.deev.is/",
"primary": "$random_relay_primary_0",
"comment": "lax1dude relay #1"
},
{
"addr": "wss://relay.lax1dude.net/",
"primary": "$random_relay_primary_1",
"comment": "lax1dude relay #2"
},
{
"addr": "wss://relay.shhnowisnottheti.me/",
"primary": "$random_relay_primary_2",
"comment": "ayunami relay #1"
}
],
"openDebugConsoleOnLaunch": false,
"showBootMenuOnLaunch": false,
"bootMenuBlocksUnsignedClients": false,
"allowBootMenu": true,
"forceWebViewSupport": false,
"enableServerCookies": true,
"enableDownloadOfflineButton": true,
"resourcePacksDB": "resourcePacks",
"enableWebViewCSP": true,
"checkRelaysForUpdates": true,
"allowServerRedirects": true,
"allowUpdateSvc": true,
"html5CursorSupport": true,
"allowFNAWSkins": true,
"allowVoiceClient": true,
"worldsDB": "worlds",
"demoMode": false,
"localStorageNamespace": "_eaglercraftX",
"enableSignatureBadge": false,
"lang": "en_US",
"enableMinceraft": true,
"autoFixLegacyStyleAttr": true,
"allowUpdateDL": true,
"logInvalidCerts": false,
"checkShaderGLErrors": false,
"crashOnUncaughtExceptions": false,
"forceWebGL1": false,
"forceWebGL2": false,
"allowExperimentalWebGL1": true,
"useWebGLExt": true,
"useDelayOnSwap": false,
"useJOrbisAudioDecoder": false,
"useXHRFetch": false,
"useVisualViewport": true,
"deobfStackTraces": true,
"disableBlobURLs": false,
"eaglerNoDelay": false,
"ramdiskMode": false,
"singleThreadMode": false
}

View File

@ -0,0 +1,52 @@
{
"joinServer": null,
"servers": [
{
"serverName": "Local Test Server",
"serverAddress": "localhost:25565",
"hideAddress": false
}
],
"relays": [
{
"addr": "wss://relay.deev.is/",
"name": "lax1dude relay #1",
"primary": "$random_relay_primary_0"
},
{
"addr": "wss://relay.lax1dude.net/",
"name": "lax1dude relay #2",
"primary": "$random_relay_primary_1"
},
{
"addr": "wss://relay.shhnowisnottheti.me/",
"name": "ayunami relay #1",
"primary": "$random_relay_primary_2"
}
],
"mainMenu": {
"splashes": [
"Darviglet!",
"eaglerenophile!",
"You Eagler!",
"Yeeeeeee!",
"yeee",
"EEEEEEEEE!",
"You Darvig!",
"You Vigg!",
":>",
"|>",
"You Yumpster!"
],
"eaglerLogo": false,
"itemLink": null,
"itemLine0": null,
"itemLine1": null,
"itemLine2": null
},
"worldsFolder": "MAIN",
"profanity": false,
"hideDownServers": false,
"serverListTitle": null,
"serverListLink": null
}

View File

@ -0,0 +1,32 @@
[NBT]{
servers: [
{
name: "Local Test Server",
ip: "localhost:25565",
hideAddress: false
}
],
mainMenu: {
itemLink: "",
itemLine0: "",
itemLine1: "",
itemLine2: "",
splashes: [
"Darviglet!",
"eaglerenophile!",
"You Eagler!",
"Yeeeeeee!",
"yeee",
"EEEEEEEEE!",
"You Darvig!",
"You Vigg!",
":>",
"|>",
"You Yumpster!"
]
},
profanity: false,
hide_down: false,
serverListTitle: "",
serverListLink: ""
}[/NBT]

View File

@ -0,0 +1,63 @@
{
"joinServer": null,
"servers": [
{
"serverName": "Local Test Server",
"serverAddress": "localhost:25565",
"hideAddress": false
}
],
"relays": [
{
"addr": "wss://relay.deev.is/",
"name": "lax1dude relay #1",
"primary": "$random_relay_primary_0"
},
{
"addr": "wss://relay.lax1dude.net/",
"name": "lax1dude relay #2",
"primary": "$random_relay_primary_1"
},
{
"addr": "wss://relay.shhnowisnottheti.me/",
"name": "ayunami relay #1",
"primary": "$random_relay_primary_2"
}
],
"mainMenu": {
"splashes": [
"Darviglet!",
"eaglerenophile!",
"You Eagler!",
"Yeeeeeee!",
"yeee",
"EEEEEEEEE!",
"You Darvig!",
"You Vigg!",
":>",
"|>",
"You Yumpster!"
],
"eaglerLogo": false,
"itemLink": null,
"itemLine0": null,
"itemLine1": null,
"itemLine2": null
},
"worldsFolder": "MAIN",
"assetOverrides": {
"title/no-pano-blur.flag": "false",
"records/wait.mp3": "wait.mp3",
"records/mellohi.mp3": "https://stream.nightride.fm/chillsynth.m4a",
"records/far.mp3": "https://stream.nightride.fm/nightride.m4a",
"records/cat.mp3": "http://usa9.fastcast4u.com/proxy/jamz?mp=/1",
"records/ward.mp3": "http://fr4.1mix.co.uk:8000/192h",
"records/strad.mp3": "http://listen.011fm.com:8028/stream15",
"records/blocks.mp3": "https://www.ophanim.net:8444/s/9780",
"records/13.mp3": "https://s2.radio.co/s2b2b68744/listen"
},
"profanity": false,
"hideDownServers": false,
"serverListTitle": null,
"serverListLink": null
}

View File

@ -0,0 +1,6 @@
{
"dataBaseName": "_net_PeytonPlayz585_eaglercraft_Alpha_IndexedDBFilesystem_1_2_6",
"playerUsername": null,
"serverIP": null,
"joinServerOnLaunch": null
}

View File

@ -0,0 +1,6 @@
{
"dataBaseName": "_net_PeytonPlayz585_eaglercraft_beta_IndexedDBFilesystem_1_7_3",
"playerUsername": null,
"serverIP": null,
"joinServerOnLaunch": null
}

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -16,21 +16,17 @@
* *
*/ */
precision lowp int; EAGLER_IN(vec2, v_texCoord2f)
precision mediump float; EAGLER_IN(vec4, v_color4f)
precision mediump sampler2D;
in vec2 v_texCoord2f; EAGLER_FRAG_OUT()
in vec4 v_color4f;
layout(location = 0) out vec4 output4f;
uniform sampler2D u_inputTexture; uniform sampler2D u_inputTexture;
uniform vec4 u_colorBias4f; uniform vec4 u_colorBias4f;
void main() { void main() {
output4f = texture(u_inputTexture, v_texCoord2f) * v_color4f + u_colorBias4f; EAGLER_FRAG_COLOR = EAGLER_TEXTURE_2D(u_inputTexture, v_texCoord2f) * v_color4f + u_colorBias4f;
if(output4f.a < 0.004) { if(EAGLER_FRAG_COLOR.a < 0.004) {
discard; discard;
} }
} }

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -16,18 +16,15 @@
* *
*/ */
precision lowp int; EAGLER_VSH_LAYOUT_BEGIN()
precision highp float; EAGLER_IN(0, vec3, a_position3f)
precision mediump sampler2D; EAGLER_IN(1, vec2, c_position2i)
EAGLER_IN(2, vec2, c_coords2i)
EAGLER_IN(3, vec4, c_color4f)
EAGLER_VSH_LAYOUT_END()
layout(location = 0) in vec3 a_position3f; EAGLER_OUT(vec2, v_texCoord2f)
EAGLER_OUT(vec4, v_color4f)
layout(location = 1) in vec2 c_position2i;
layout(location = 2) in vec2 c_coords2i;
layout(location = 3) in vec4 c_color4f;
out vec2 v_texCoord2f;
out vec4 v_color4f;
uniform mat4 u_matrixTransform; uniform mat4 u_matrixTransform;
uniform vec2 u_charSize2f; uniform vec2 u_charSize2f;
@ -35,19 +32,19 @@ uniform vec2 u_charCoordSize2f;
uniform vec4 u_color4f; uniform vec4 u_color4f;
void main() { void main() {
v_color4f = c_color4f.bgra; v_color4f = c_color4f.bgra;
float shadowBit = a_position3f.z; float shadowBit = a_position3f.z;
float boldBit = shadowBit >= 0.5 ? 1.0 : 0.0; float boldBit = shadowBit >= 0.5 ? 1.0 : 0.0;
shadowBit -= boldBit * 0.5; shadowBit -= boldBit * 0.5;
v_color4f.rgb *= (1.0 - shadowBit * 3.0); v_color4f.rgb *= (1.0 - shadowBit * 3.0);
v_texCoord2f = (c_coords2i + a_position3f.xy) * u_charCoordSize2f; v_texCoord2f = (c_coords2i + a_position3f.xy) * u_charCoordSize2f;
vec2 pos2d = c_position2i + vec2(shadowBit * 4.0); vec2 pos2d = c_position2i + vec2(shadowBit * 4.0);
pos2d += a_position3f.xy * u_charSize2f; pos2d += a_position3f.xy * u_charSize2f;
pos2d.x += boldBit; pos2d.x += boldBit;
float italicBit = v_color4f.a >= 0.5 ? 2.0 : 0.0; float italicBit = v_color4f.a >= 0.5 ? 2.0 : 0.0;
v_color4f.a -= italicBit * 0.25; v_color4f.a -= italicBit * 0.25;
pos2d.x -= (a_position3f.y - 0.5) * italicBit; pos2d.x -= (a_position3f.y - 0.5) * italicBit;
v_color4f.a *= 2.0; v_color4f.a *= 2.0;
v_color4f *= u_color4f; v_color4f *= u_color4f;
gl_Position = u_matrixTransform * vec4(pos2d, 0.0, 1.0); EAGLER_VERT_POSITION = u_matrixTransform * vec4(pos2d, 0.0, 1.0);
} }

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -16,20 +16,16 @@
* *
*/ */
precision lowp int; EAGLER_IN(vec2, v_texCoord2f)
precision mediump float; EAGLER_IN(vec4, v_color4f)
precision mediump sampler2D;
in vec2 v_texCoord2f; EAGLER_FRAG_OUT()
in vec4 v_color4f;
layout(location = 0) out vec4 output4f;
uniform sampler2D u_inputTexture; uniform sampler2D u_inputTexture;
void main() { void main() {
output4f = texture(u_inputTexture, v_texCoord2f) * v_color4f; EAGLER_FRAG_COLOR = EAGLER_TEXTURE_2D(u_inputTexture, v_texCoord2f) * v_color4f;
if(output4f.a < 0.004) { if(EAGLER_FRAG_COLOR.a < 0.004) {
discard; discard;
} }
} }

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -16,20 +16,17 @@
* *
*/ */
precision lowp int; EAGLER_VSH_LAYOUT_BEGIN()
precision highp float; EAGLER_IN(0, vec2, a_position2f)
precision mediump sampler2D; EAGLER_IN(1, vec3, p_position3f)
EAGLER_IN(2, vec2, p_texCoords2i)
EAGLER_IN(3, vec2, p_lightMap2f)
EAGLER_IN(4, vec2, p_particleSize_texCoordsSize_2i)
EAGLER_IN(5, vec4, p_color4f)
EAGLER_VSH_LAYOUT_END()
layout(location = 0) in vec2 a_position2f; EAGLER_OUT(vec2, v_texCoord2f)
EAGLER_OUT(vec4, v_color4f)
layout(location = 1) in vec3 p_position3f;
layout(location = 2) in vec2 p_texCoords2i;
layout(location = 3) in vec2 p_lightMap2f;
layout(location = 4) in vec2 p_particleSize_texCoordsSize_2i;
layout(location = 5) in vec4 p_color4f;
out vec2 v_texCoord2f;
out vec4 v_color4f;
uniform mat4 u_matrixTransform; uniform mat4 u_matrixTransform;
uniform vec3 u_texCoordSize2f_particleSize1f; uniform vec3 u_texCoordSize2f_particleSize1f;
@ -40,19 +37,19 @@ uniform vec4 u_color4f;
uniform sampler2D u_lightmapTexture; uniform sampler2D u_lightmapTexture;
void main() { void main() {
v_color4f = u_color4f * p_color4f.bgra * texture(u_lightmapTexture, p_lightMap2f); v_color4f = u_color4f * p_color4f.bgra * EAGLER_TEXTURE_2D(u_lightmapTexture, p_lightMap2f);
vec2 tex2f = a_position2f * 0.5 + 0.5; vec2 tex2f = a_position2f * 0.5 + 0.5;
tex2f.y = 1.0 - tex2f.y; tex2f.y = 1.0 - tex2f.y;
tex2f = p_texCoords2i + tex2f * p_particleSize_texCoordsSize_2i.y; tex2f = p_texCoords2i + tex2f * p_particleSize_texCoordsSize_2i.y;
v_texCoord2f = tex2f * u_texCoordSize2f_particleSize1f.xy; v_texCoord2f = tex2f * u_texCoordSize2f_particleSize1f.xy;
float particleSize = u_texCoordSize2f_particleSize1f.z * p_particleSize_texCoordsSize_2i.x; float particleSize = u_texCoordSize2f_particleSize1f.z * p_particleSize_texCoordsSize_2i.x;
vec3 pos3f = p_position3f; vec3 pos3f = p_position3f;
vec2 spos2f = a_position2f * particleSize; vec2 spos2f = a_position2f * particleSize;
pos3f += u_transformParam_1_2_5_f * spos2f.xyy; pos3f += u_transformParam_1_2_5_f * spos2f.xyy;
pos3f.zx += u_transformParam_3_4_f * spos2f; pos3f.zx += u_transformParam_3_4_f * spos2f;
gl_Position = u_matrixTransform * vec4(pos3f, 1.0); EAGLER_VERT_POSITION = u_matrixTransform * vec4(pos3f, 1.0);
} }

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -17,11 +17,11 @@
*/ */
#if defined(COMPILE_ENABLE_TEX_GEN) || defined(COMPILE_ENABLE_FOG) #if defined(COMPILE_ENABLE_TEX_GEN) || defined(COMPILE_ENABLE_FOG)
in vec4 v_position4f; EAGLER_IN(vec4, v_position4f)
#endif #endif
#ifdef COMPILE_TEXTURE_ATTRIB #ifdef COMPILE_TEXTURE_ATTRIB
in vec2 v_texture2f; EAGLER_IN(vec2, v_texture2f)
#endif #endif
uniform vec4 u_color4f; uniform vec4 u_color4f;
@ -32,15 +32,15 @@ uniform vec4 u_colorBlendAdd4f;
#endif #endif
#ifdef COMPILE_COLOR_ATTRIB #ifdef COMPILE_COLOR_ATTRIB
in vec4 v_color4f; EAGLER_IN(vec4, v_color4f)
#endif #endif
#ifdef COMPILE_NORMAL_ATTRIB #ifdef COMPILE_NORMAL_ATTRIB
in vec3 v_normal3f; EAGLER_IN(vec3, v_normal3f)
#endif #endif
#ifdef COMPILE_LIGHTMAP_ATTRIB #ifdef COMPILE_LIGHTMAP_ATTRIB
in vec2 v_lightmap2f; EAGLER_IN(vec2, v_lightmap2f)
#endif #endif
#ifdef COMPILE_ENABLE_TEXTURE2D #ifdef COMPILE_ENABLE_TEXTURE2D
@ -76,7 +76,7 @@ uniform vec4 u_fogColor4f;
#endif #endif
#ifdef COMPILE_ENABLE_TEX_GEN #ifdef COMPILE_ENABLE_TEX_GEN
in vec3 v_objectPosition3f; EAGLER_IN(vec3, v_objectPosition3f)
uniform ivec4 u_texGenPlane4i; uniform ivec4 u_texGenPlane4i;
uniform vec4 u_texGenS4f; uniform vec4 u_texGenS4f;
uniform vec4 u_texGenT4f; uniform vec4 u_texGenT4f;
@ -89,33 +89,38 @@ uniform mat4 u_textureMat4f01;
uniform vec2 u_textureAnisotropicFix; uniform vec2 u_textureAnisotropicFix;
#endif #endif
layout(location = 0) out vec4 output4f; EAGLER_FRAG_OUT()
void main() { void main() {
#ifdef COMPILE_COLOR_ATTRIB #ifdef COMPILE_COLOR_ATTRIB
vec4 color = v_color4f * u_color4f; vec4 color = v_color4f * u_color4f;
#else #else
vec4 color = u_color4f; vec4 color = u_color4f;
#endif #endif
#ifdef COMPILE_ENABLE_TEX_GEN #ifdef COMPILE_ENABLE_TEX_GEN
vec4 texGenVector; vec4 tmpVec4 = vec4(v_objectPosition3f, 1.0);
vec4 texGenVector;
texGenVector.x = dot(u_texGenPlane4i.x == 1 ? v_position4f : tmpVec4, u_texGenS4f);
texGenVector.y = dot(u_texGenPlane4i.y == 1 ? v_position4f : tmpVec4, u_texGenT4f);
texGenVector.z = dot(u_texGenPlane4i.z == 1 ? v_position4f : tmpVec4, u_texGenR4f);
texGenVector.w = dot(u_texGenPlane4i.w == 1 ? v_position4f : tmpVec4, u_texGenQ4f);
#ifdef EAGLER_HAS_GLES_300
texGenVector.xyz = mat4x3(
u_textureMat4f01[0].xyw,
u_textureMat4f01[1].xyw,
u_textureMat4f01[2].xyw,
u_textureMat4f01[3].xyw) * texGenVector;
texGenVector.xy /= texGenVector.z;
#else
texGenVector = u_textureMat4f01 * texGenVector;
texGenVector.xy /= texGenVector.w;
#endif
vec4 texGenPosSrc[2]; color *= EAGLER_TEXTURE_2D(u_samplerTexture, texGenVector.xy);
texGenPosSrc[0] = vec4(v_objectPosition3f, 1.0);
texGenPosSrc[1] = v_position4f;
texGenVector.x = dot(texGenPosSrc[u_texGenPlane4i.x], u_texGenS4f);
texGenVector.y = dot(texGenPosSrc[u_texGenPlane4i.y], u_texGenT4f);
texGenVector.z = dot(texGenPosSrc[u_texGenPlane4i.z], u_texGenR4f);
texGenVector.w = dot(texGenPosSrc[u_texGenPlane4i.w], u_texGenQ4f);
texGenVector = u_textureMat4f01 * texGenVector;
color *= texture(u_samplerTexture, texGenVector.xy / texGenVector.w);
#ifdef COMPILE_ENABLE_ALPHA_TEST #ifdef COMPILE_ENABLE_ALPHA_TEST
if(color.a < u_alphaTestRef1f) discard; if(color.a < u_alphaTestRef1f) discard;
#endif #endif
#else #else
@ -123,61 +128,71 @@ void main() {
#ifdef COMPILE_ENABLE_TEXTURE2D #ifdef COMPILE_ENABLE_TEXTURE2D
#ifdef COMPILE_TEXTURE_ATTRIB #ifdef COMPILE_TEXTURE_ATTRIB
#ifdef COMPILE_ENABLE_ANISOTROPIC_FIX #ifdef COMPILE_ENABLE_ANISOTROPIC_FIX
// d3d11 doesn't support GL_NEAREST upscaling with anisotropic // d3d11 doesn't support GL_NEAREST upscaling with anisotropic
// filtering enabled, so it needs this stupid fix to 'work' // filtering enabled, so it needs this stupid fix to 'work'
vec2 uv = floor(v_texture2f * u_textureAnisotropicFix) + 0.5; vec2 uv = floor(v_texture2f * u_textureAnisotropicFix) + 0.5;
color *= texture(u_samplerTexture, uv / u_textureAnisotropicFix); color *= EAGLER_TEXTURE_2D(u_samplerTexture, uv / u_textureAnisotropicFix);
#else #else
color *= texture(u_samplerTexture, v_texture2f); color *= EAGLER_TEXTURE_2D(u_samplerTexture, v_texture2f);
#endif #endif
#else #else
color *= texture(u_samplerTexture, u_textureCoords01); color *= EAGLER_TEXTURE_2D(u_samplerTexture, u_textureCoords01);
#endif #endif
#endif #endif
#ifdef COMPILE_ENABLE_LIGHTMAP #ifdef COMPILE_ENABLE_LIGHTMAP
#ifdef COMPILE_LIGHTMAP_ATTRIB #ifdef COMPILE_LIGHTMAP_ATTRIB
color *= texture(u_samplerLightmap, v_lightmap2f); color *= EAGLER_TEXTURE_2D(u_samplerLightmap, v_lightmap2f);
#else #else
color *= texture(u_samplerLightmap, u_textureCoords02); color *= EAGLER_TEXTURE_2D(u_samplerLightmap, u_textureCoords02);
#endif #endif
#endif #endif
#ifdef COMPILE_BLEND_ADD #ifdef COMPILE_BLEND_ADD
color = color * u_colorBlendSrc4f + u_colorBlendAdd4f; color = color * u_colorBlendSrc4f + u_colorBlendAdd4f;
#endif #endif
#ifdef COMPILE_ENABLE_ALPHA_TEST #ifdef COMPILE_ENABLE_ALPHA_TEST
if(color.a < u_alphaTestRef1f) discard; if(color.a < u_alphaTestRef1f) discard;
#endif #endif
#endif #endif
#ifdef COMPILE_ENABLE_MC_LIGHTING #ifdef COMPILE_ENABLE_MC_LIGHTING
#ifdef COMPILE_NORMAL_ATTRIB #ifdef COMPILE_NORMAL_ATTRIB
vec3 normal = normalize(v_normal3f); vec3 normal = normalize(v_normal3f);
#else #else
vec3 normal = u_uniformNormal3f; vec3 normal = u_uniformNormal3f;
#endif #endif
float diffuse = 0.0; float diffuse = 0.0;
vec4 light; vec4 light;
for(int i = 0; i < u_lightsEnabled1i; ++i) { #ifdef EAGLER_HAS_GLES_300
light = u_lightsDirections4fv[i]; for(int i = 0; i < u_lightsEnabled1i; ++i) {
diffuse += max(dot(light.xyz, normal), 0.0) * light.w; #else
} for(int i = 0; i < 4; ++i) {
color.rgb *= min(u_lightsAmbient3f + vec3(diffuse), 1.0); #endif
light = u_lightsDirections4fv[i];
diffuse += max(dot(light.xyz, normal), 0.0) * light.w;
#ifndef EAGLER_HAS_GLES_300
if(i + 1 >= u_lightsEnabled1i) {
break;
}
#endif
}
color.rgb *= min(u_lightsAmbient3f + vec3(diffuse), 1.0);
#endif #endif
#ifdef COMPILE_ENABLE_FOG #ifdef COMPILE_ENABLE_FOG
vec3 fogPos = v_position4f.xyz / v_position4f.w; vec3 fogPos = v_position4f.xyz / v_position4f.w;
float dist = length(fogPos); float dist = length(fogPos);
float fogDensity = u_fogParameters4f.y; float fogDensity = u_fogParameters4f.y;
float fogStart = u_fogParameters4f.z; float fogStart = u_fogParameters4f.z;
float fogEnd = u_fogParameters4f.w; float fogEnd = u_fogParameters4f.w;
float f = u_fogParameters4f.x > 0.0 ? 1.0 - exp(-fogDensity * dist) : float f = u_fogParameters4f.x > 0.0 ? 1.0 - exp(-fogDensity * dist) :
(dist - fogStart) / (fogEnd - fogStart); (dist - fogStart) / (fogEnd - fogStart);
color.rgb = mix(color.rgb, u_fogColor4f.rgb, clamp(f, 0.0, 1.0) * u_fogColor4f.a); color.rgb = mix(color.rgb, u_fogColor4f.rgb, clamp(f, 0.0, 1.0) * u_fogColor4f.a);
#endif #endif
output4f = color; EAGLER_FRAG_COLOR = color;
} }

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -16,39 +16,39 @@
* *
*/ */
in vec3 a_position3f; EAGLER_IN_AUTO(vec3, a_position3f)
#if defined(COMPILE_ENABLE_TEX_GEN) || defined(COMPILE_ENABLE_FOG) #if defined(COMPILE_ENABLE_TEX_GEN) || defined(COMPILE_ENABLE_FOG)
#define _COMPILE_VARYING_POSITION #define _COMPILE_VARYING_POSITION
#endif #endif
#ifdef _COMPILE_VARYING_POSITION #ifdef _COMPILE_VARYING_POSITION
out vec4 v_position4f; EAGLER_OUT(vec4, v_position4f)
#endif #endif
#ifdef COMPILE_ENABLE_TEX_GEN #ifdef COMPILE_ENABLE_TEX_GEN
out vec3 v_objectPosition3f; EAGLER_OUT(vec3, v_objectPosition3f)
#endif #endif
#ifdef COMPILE_TEXTURE_ATTRIB #ifdef COMPILE_TEXTURE_ATTRIB
in vec2 a_texture2f; EAGLER_IN_AUTO(vec2, a_texture2f)
out vec2 v_texture2f; EAGLER_OUT(vec2, v_texture2f)
uniform mat4 u_textureMat4f01; uniform mat4 u_textureMat4f01;
#endif #endif
#ifdef COMPILE_COLOR_ATTRIB #ifdef COMPILE_COLOR_ATTRIB
in vec4 a_color4f; EAGLER_IN_AUTO(vec4, a_color4f)
out vec4 v_color4f; EAGLER_OUT(vec4, v_color4f)
#endif #endif
#ifdef COMPILE_NORMAL_ATTRIB #ifdef COMPILE_NORMAL_ATTRIB
in vec4 a_normal4f; EAGLER_IN_AUTO(vec4, a_normal4f)
out vec3 v_normal3f; EAGLER_OUT(vec3, v_normal3f)
#endif #endif
#ifdef COMPILE_LIGHTMAP_ATTRIB #ifdef COMPILE_LIGHTMAP_ATTRIB
in vec2 a_lightmap2f; EAGLER_IN_AUTO(vec2, a_lightmap2f)
out vec2 v_lightmap2f; EAGLER_OUT(vec2, v_lightmap2f)
uniform mat4 u_textureMat4f02; uniform mat4 u_textureMat4f02;
#endif #endif
@ -66,34 +66,34 @@ uniform mat4 u_modelviewMat4f;
void main() { void main() {
#ifdef COMPILE_ENABLE_TEX_GEN #ifdef COMPILE_ENABLE_TEX_GEN
v_objectPosition3f = a_position3f; v_objectPosition3f = a_position3f;
#endif #endif
#ifdef _COMPILE_VARYING_POSITION #ifdef _COMPILE_VARYING_POSITION
v_position4f = u_modelviewMat4f * vec4(a_position3f, 1.0); v_position4f = u_modelviewMat4f * vec4(a_position3f, 1.0);
#endif #endif
#ifdef COMPILE_TEXTURE_ATTRIB #ifdef COMPILE_TEXTURE_ATTRIB
vec3 v_textureTmp3f = TEX_MAT3(u_textureMat4f01) * vec3(a_texture2f, 1.0); vec3 v_textureTmp3f = TEX_MAT3(u_textureMat4f01) * vec3(a_texture2f, 1.0);
v_texture2f = v_textureTmp3f.xy / v_textureTmp3f.z; v_texture2f = v_textureTmp3f.xy / v_textureTmp3f.z;
#endif #endif
#ifdef COMPILE_COLOR_ATTRIB #ifdef COMPILE_COLOR_ATTRIB
v_color4f = a_color4f; v_color4f = a_color4f;
#endif #endif
#ifdef COMPILE_NORMAL_ATTRIB #ifdef COMPILE_NORMAL_ATTRIB
v_normal3f = normalize(mat3(u_modelviewMat4f) * a_normal4f.xyz); v_normal3f = normalize(mat3(u_modelviewMat4f) * a_normal4f.xyz);
#endif #endif
#ifdef COMPILE_LIGHTMAP_ATTRIB #ifdef COMPILE_LIGHTMAP_ATTRIB
vec3 v_lightmapTmp3f = TEX_MAT3(u_textureMat4f02) * vec3(a_lightmap2f, 1.0); vec3 v_lightmapTmp3f = TEX_MAT3(u_textureMat4f02) * vec3(a_lightmap2f, 1.0);
v_lightmap2f = v_lightmapTmp3f.xy / v_lightmapTmp3f.z; v_lightmap2f = v_lightmapTmp3f.xy / v_lightmapTmp3f.z;
#endif #endif
#ifdef _COMPILE_VARYING_POSITION #ifdef _COMPILE_VARYING_POSITION
gl_Position = u_projectionMat4f * v_position4f; EAGLER_VERT_POSITION = u_projectionMat4f * v_position4f;
#else #else
gl_Position = u_modelviewProjMat4f * vec4(a_position3f, 1.0); EAGLER_VERT_POSITION = u_modelviewProjMat4f * vec4(a_position3f, 1.0);
#endif #endif
} }

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2023 lax1dude. All Rights Reserved. * Copyright (c) 2023 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -86,41 +86,41 @@ layout(location = 0) out vec4 output4f;
#ifdef COMPILE_DYNAMIC_LIGHTS #ifdef COMPILE_DYNAMIC_LIGHTS
struct DynamicLight { struct DynamicLight {
mediump vec4 u_lightPosition4f; mediump vec4 u_lightPosition4f;
mediump vec4 u_lightColor4f; mediump vec4 u_lightColor4f;
}; };
layout(std140) uniform u_chunkLightingData { layout(std140) uniform u_chunkLightingData {
mediump int u_dynamicLightCount1i; mediump int u_dynamicLightCount1i;
mediump int _paddingA_; mediump int _paddingA_;
mediump int _paddingB_; mediump int _paddingB_;
mediump int _paddingC_; mediump int _paddingC_;
DynamicLight u_dynamicLightArray[12]; DynamicLight u_dynamicLightArray[12];
}; };
#endif #endif
layout(std140) uniform u_worldLightingData { layout(std140) uniform u_worldLightingData {
mediump vec4 u_sunDirection4f; mediump vec4 u_sunDirection4f;
mediump vec4 u_sunColor3f_sky1f; mediump vec4 u_sunColor3f_sky1f;
mediump vec4 u_fogParameters4f; mediump vec4 u_fogParameters4f;
mediump vec4 u_fogColorLight4f; mediump vec4 u_fogColorLight4f;
mediump vec4 u_fogColorDark4f; mediump vec4 u_fogColorDark4f;
mediump vec4 u_fogColorAddSun4f; mediump vec4 u_fogColorAddSun4f;
mediump vec4 u_blockSkySunDynamicLightFac4f; mediump vec4 u_blockSkySunDynamicLightFac4f;
#ifdef COMPILE_SUN_SHADOW_LOD0 #ifdef COMPILE_SUN_SHADOW_LOD0
mediump mat4 u_sunShadowMatrixLOD04f; mediump mat4 u_sunShadowMatrixLOD04f;
#define DO_COMPILE_SUN_SHADOWS #define DO_COMPILE_SUN_SHADOWS
#define SUN_SHADOW_MAP_FRAC 1.0 #define SUN_SHADOW_MAP_FRAC 1.0
#endif #endif
#ifdef COMPILE_SUN_SHADOW_LOD1 #ifdef COMPILE_SUN_SHADOW_LOD1
mediump mat4 u_sunShadowMatrixLOD04f; mediump mat4 u_sunShadowMatrixLOD04f;
mediump mat4 u_sunShadowMatrixLOD14f; mediump mat4 u_sunShadowMatrixLOD14f;
#define DO_COMPILE_SUN_SHADOWS #define DO_COMPILE_SUN_SHADOWS
#define SUN_SHADOW_MAP_FRAC 0.5 #define SUN_SHADOW_MAP_FRAC 0.5
#endif #endif
#ifdef COMPILE_SUN_SHADOW_LOD2 #ifdef COMPILE_SUN_SHADOW_LOD2
mediump mat4 u_sunShadowMatrixLOD04f; mediump mat4 u_sunShadowMatrixLOD04f;
mediump mat4 u_sunShadowMatrixLOD14f; mediump mat4 u_sunShadowMatrixLOD14f;
mediump mat4 u_sunShadowMatrixLOD24f; mediump mat4 u_sunShadowMatrixLOD24f;
#define DO_COMPILE_SUN_SHADOWS #define DO_COMPILE_SUN_SHADOWS
#define SUN_SHADOW_MAP_FRAC 0.3333333 #define SUN_SHADOW_MAP_FRAC 0.3333333
#endif #endif
@ -163,311 +163,308 @@ uniform sampler2D u_lightShaftsTexture;
uniform sampler2DShadow u_sunShadowDepthTexture; uniform sampler2DShadow u_sunShadowDepthTexture;
#ifdef COMPILE_SUN_SHADOW_SMOOTH #ifdef COMPILE_SUN_SHADOW_SMOOTH
const vec2 POISSON_DISK[7] = vec2[]( const vec2 POISSON_DISK[7] = vec2[](
vec2(-0.077, 0.995), vec2(0.998, 0.015), vec2(-0.077, 0.995), vec2(0.998, 0.015),
vec2(-0.116, -0.987), vec2(-0.916, 0.359), vec2(-0.116, -0.987), vec2(-0.916, 0.359),
vec2(-0.697, -0.511), vec2(0.740, -0.612), vec2(-0.697, -0.511), vec2(0.740, -0.612),
vec2(0.675, 0.682)); vec2(0.675, 0.682));
#define SMOOTH_SHADOW_SAMPLES 1.0 / 8.0 #define SMOOTH_SHADOW_SAMPLES 1.0 / 8.0
#define SMOOTH_SHADOW_RADIUS 0.00075 #define SMOOTH_SHADOW_RADIUS 0.00075
#define SMOOTH_SHADOW_POISSON_SAMPLE(idx, tex, lod, vec3Pos, accum, tmpVec2)\ #define SMOOTH_SHADOW_POISSON_SAMPLE(idx, tex, lod, vec3Pos, accum, tmpVec2)\
tmpVec2 = vec3Pos.xy + POISSON_DISK[idx] * SMOOTH_SHADOW_RADIUS;\ tmpVec2 = vec3Pos.xy + POISSON_DISK[idx] * SMOOTH_SHADOW_RADIUS;\
tmpVec2 = clamp(tmpVec2, vec2(0.001), vec2(0.999));\ tmpVec2 = clamp(tmpVec2, vec2(0.001), vec2(0.999));\
tmpVec2.y += lod;\ tmpVec2.y += lod;\
tmpVec2.y *= SUN_SHADOW_MAP_FRAC;\ tmpVec2.y *= SUN_SHADOW_MAP_FRAC;\
accum += textureLod(tex, vec3(tmpVec2, vec3Pos.z), 0.0) * SMOOTH_SHADOW_SAMPLES; accum += textureLod(tex, vec3(tmpVec2, vec3Pos.z), 0.0) * SMOOTH_SHADOW_SAMPLES;
#endif #endif
#endif #endif
void main() { void main() {
vec4 worldPosition4f; vec4 worldPosition4f;
vec4 worldDirection4f; vec4 worldDirection4f;
vec4 diffuseColor4f; vec4 diffuseColor4f;
vec3 normalVector3f; vec3 normalVector3f;
vec2 lightmapCoords2f; vec2 lightmapCoords2f;
vec3 materialData3f; vec3 materialData3f;
float block1f; float block1f;
// =========== RESOLVE CONSTANTS ============ // // =========== RESOLVE CONSTANTS ============ //
worldPosition4f = u_inverseViewMatrix4f * v_position4f; worldPosition4f = u_inverseViewMatrix4f * v_position4f;
worldPosition4f.xyz /= worldPosition4f.w; worldPosition4f.xyz /= worldPosition4f.w;
worldPosition4f.w = 1.0; worldPosition4f.w = 1.0;
worldDirection4f = u_inverseViewMatrix4f * vec4(v_position4f.xyz / v_position4f.w, 0.0); worldDirection4f = u_inverseViewMatrix4f * vec4(v_position4f.xyz / v_position4f.w, 0.0);
worldDirection4f.xyz = normalize(worldDirection4f.xyz); worldDirection4f.xyz = normalize(worldDirection4f.xyz);
#ifdef COMPILE_ENABLE_LIGHTMAP #ifdef COMPILE_ENABLE_LIGHTMAP
#ifdef COMPILE_LIGHTMAP_ATTRIB #ifdef COMPILE_LIGHTMAP_ATTRIB
lightmapCoords2f = v_lightmap2f; lightmapCoords2f = v_lightmap2f;
#else #else
lightmapCoords2f = u_textureCoords02; lightmapCoords2f = u_textureCoords02;
#endif #endif
#else #else
lightmapCoords2f = vec2(0.0, 1.0); lightmapCoords2f = vec2(0.0, 1.0);
#endif #endif
#ifdef COMPILE_NORMAL_ATTRIB #ifdef COMPILE_NORMAL_ATTRIB
normalVector3f = normalize(v_normal3f); normalVector3f = normalize(v_normal3f);
block1f = v_block1f; block1f = v_block1f;
#else #else
normalVector3f = u_uniformNormal3f; normalVector3f = u_uniformNormal3f;
block1f = u_blockConstant1f; block1f = u_blockConstant1f;
#endif #endif
normalVector3f = normalize(mat3(u_inverseViewMatrix4f) * normalVector3f); normalVector3f = normalize(mat3(u_inverseViewMatrix4f) * normalVector3f);
// ========= CALCULATE DIFFUSE COLOR ========== // // ========= CALCULATE DIFFUSE COLOR ========== //
#ifdef COMPILE_COLOR_ATTRIB #ifdef COMPILE_COLOR_ATTRIB
diffuseColor4f = v_color4f * u_color4f; diffuseColor4f = v_color4f * u_color4f;
#else #else
diffuseColor4f = u_color4f; diffuseColor4f = u_color4f;
#endif #endif
#ifdef COMPILE_ENABLE_TEXTURE2D #ifdef COMPILE_ENABLE_TEXTURE2D
vec2 texCoords2f; vec2 texCoords2f;
#ifdef COMPILE_ENABLE_TEX_GEN #ifdef COMPILE_ENABLE_TEX_GEN
vec4 texGenVector; vec4 tmpVec4 = vec4(v_objectPosition3f, 1.0);
vec4 texGenPosSrc[2]; vec4 texGenVector;
texGenPosSrc[0] = vec4(v_objectPosition3f, 1.0); texGenVector.x = dot(u_texGenPlane4i.x == 1 ? v_position4f : tmpVec4, u_texGenS4f);
texGenPosSrc[1] = v_position4f; texGenVector.y = dot(u_texGenPlane4i.y == 1 ? v_position4f : tmpVec4, u_texGenT4f);
texGenVector.x = dot(texGenPosSrc[u_texGenPlane4i.x], u_texGenS4f); texGenVector.z = dot(u_texGenPlane4i.z == 1 ? v_position4f : tmpVec4, u_texGenR4f);
texGenVector.y = dot(texGenPosSrc[u_texGenPlane4i.y], u_texGenT4f); texGenVector.w = dot(u_texGenPlane4i.w == 1 ? v_position4f : tmpVec4, u_texGenQ4f);
texGenVector.z = dot(texGenPosSrc[u_texGenPlane4i.z], u_texGenR4f); texGenVector.xyz = mat4x3(
texGenVector.w = dot(texGenPosSrc[u_texGenPlane4i.w], u_texGenQ4f); u_textureMat4f01[0].xyw,
texGenVector = vec4(mat4x3( u_textureMat4f01[1].xyw,
u_textureMat4f01[0].xyw, u_textureMat4f01[2].xyw,
u_textureMat4f01[1].xyw, u_textureMat4f01[3].xyw) * texGenVector;
u_textureMat4f01[2].xyw, texCoords2f = texGenVector.xy / texGenVector.z;
u_textureMat4f01[3].xyw
) * texGenVector, 0.0);
texCoords2f = texGenVector.xy / texGenVector.z;
#else #else
#ifdef COMPILE_TEXTURE_ATTRIB #ifdef COMPILE_TEXTURE_ATTRIB
#ifdef COMPILE_ENABLE_ANISOTROPIC_FIX #ifdef COMPILE_ENABLE_ANISOTROPIC_FIX
texCoords2f = floor(v_texture2f * u_textureAnisotropicFix) + 0.5; texCoords2f = floor(v_texture2f * u_textureAnisotropicFix) + 0.5;
texCoords2f /= u_textureAnisotropicFix; texCoords2f /= u_textureAnisotropicFix;
#else #else
texCoords2f = v_texture2f; texCoords2f = v_texture2f;
#endif #endif
#else #else
texCoords2f = u_textureCoords01; texCoords2f = u_textureCoords01;
#endif #endif
#endif #endif
diffuseColor4f *= texture(u_samplerTexture, texCoords2f); diffuseColor4f *= texture(u_samplerTexture, texCoords2f);
#endif #endif
#ifdef COMPILE_BLEND_ADD #ifdef COMPILE_BLEND_ADD
diffuseColor4f = diffuseColor4f * u_colorBlendSrc4f + u_colorBlendAdd4f; diffuseColor4f = diffuseColor4f * u_colorBlendSrc4f + u_colorBlendAdd4f;
#endif #endif
// ============= ALPHA TEST ============== // // ============= ALPHA TEST ============== //
#ifdef COMPILE_ENABLE_ALPHA_TEST #ifdef COMPILE_ENABLE_ALPHA_TEST
if(diffuseColor4f.a < u_alphaTestRef1f) discard; if(diffuseColor4f.a < u_alphaTestRef1f) discard;
#endif #endif
// ========== RESOLVE MATERIALS =========== // // ========== RESOLVE MATERIALS =========== //
#ifdef COMPILE_NORMAL_MATERIAL_TEXTURE #ifdef COMPILE_NORMAL_MATERIAL_TEXTURE
vec2 uv2 = vec2(1.0, 0.5) * texCoords2f; vec2 uv2 = vec2(1.0, 0.5) * texCoords2f;
uv2.y += 0.5; uv2.y += 0.5;
materialData3f = texture(u_samplerNormalMaterial, uv2).rgb; materialData3f = texture(u_samplerNormalMaterial, uv2).rgb;
#else #else
materialData3f = u_materialConstants3f; materialData3f = u_materialConstants3f;
#endif #endif
vec3 metalN, metalK; vec3 metalN, metalK;
PREFETCH_METALS(diffuseColor4f.rgb, materialData3f.g, metalN, metalK) PREFETCH_METALS(diffuseColor4f.rgb, materialData3f.g, metalN, metalK)
// ============ SUN LIGHTING ============== // // ============ SUN LIGHTING ============== //
diffuseColor4f.rgb *= diffuseColor4f.rgb; diffuseColor4f.rgb *= diffuseColor4f.rgb;
vec3 lightColor3f = vec3(0.0); vec3 lightColor3f = vec3(0.0);
if(dot(u_sunDirection4f.xyz, normalVector3f) > 0.0 && lightmapCoords2f.g > 0.5 && if(dot(u_sunDirection4f.xyz, normalVector3f) > 0.0 && lightmapCoords2f.g > 0.5 &&
(u_sunColor3f_sky1f.r + u_sunColor3f_sky1f.g + u_sunColor3f_sky1f.b) > 0.001) { (u_sunColor3f_sky1f.r + u_sunColor3f_sky1f.g + u_sunColor3f_sky1f.b) > 0.001) {
#ifdef DO_COMPILE_SUN_SHADOWS #ifdef DO_COMPILE_SUN_SHADOWS
// ========== SUN SHADOW: LOD0 ============ // // ========== SUN SHADOW: LOD0 ============ //
float skyLight = max(lightmapCoords2f.g * 2.0 - 1.0, 0.0); float skyLight = max(lightmapCoords2f.g * 2.0 - 1.0, 0.0);
float shadowSample = 1.0; float shadowSample = 1.0;
vec4 shadowWorldPos4f = worldPosition4f; vec4 shadowWorldPos4f = worldPosition4f;
shadowWorldPos4f.xyz += normalVector3f * 0.05; shadowWorldPos4f.xyz += normalVector3f * 0.05;
vec4 shadowTexPos4f; vec4 shadowTexPos4f;
vec2 tmpVec2; vec2 tmpVec2;
for(;;) { for(;;) {
shadowTexPos4f = u_sunShadowMatrixLOD04f * shadowWorldPos4f; shadowTexPos4f = u_sunShadowMatrixLOD04f * shadowWorldPos4f;
if(shadowTexPos4f.xyz == clamp(shadowTexPos4f.xyz, vec3(0.005), vec3(0.995))) { if(shadowTexPos4f.xyz == clamp(shadowTexPos4f.xyz, vec3(0.005), vec3(0.995))) {
shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy * vec2(1.0, SUN_SHADOW_MAP_FRAC), shadowTexPos4f.z), 0.0); shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy * vec2(1.0, SUN_SHADOW_MAP_FRAC), shadowTexPos4f.z), 0.0);
#ifdef COMPILE_SUN_SHADOW_SMOOTH #ifdef COMPILE_SUN_SHADOW_SMOOTH
shadowSample *= SMOOTH_SHADOW_SAMPLES; shadowSample *= SMOOTH_SHADOW_SAMPLES;
SMOOTH_SHADOW_POISSON_SAMPLE(0, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(0, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2)
SMOOTH_SHADOW_POISSON_SAMPLE(1, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(1, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2)
SMOOTH_SHADOW_POISSON_SAMPLE(2, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(2, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2)
SMOOTH_SHADOW_POISSON_SAMPLE(3, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(3, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2)
SMOOTH_SHADOW_POISSON_SAMPLE(4, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(4, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2)
SMOOTH_SHADOW_POISSON_SAMPLE(5, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(5, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2)
SMOOTH_SHADOW_POISSON_SAMPLE(6, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(6, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2)
shadowSample = max(shadowSample * 2.0 - 1.0, 0.0); shadowSample = max(shadowSample * 2.0 - 1.0, 0.0);
#endif #endif
break; break;
} }
#if defined(COMPILE_SUN_SHADOW_LOD1) || defined(COMPILE_SUN_SHADOW_LOD2) #if defined(COMPILE_SUN_SHADOW_LOD1) || defined(COMPILE_SUN_SHADOW_LOD2)
shadowTexPos4f = u_sunShadowMatrixLOD14f * shadowWorldPos4f; shadowTexPos4f = u_sunShadowMatrixLOD14f * shadowWorldPos4f;
if(shadowTexPos4f.xyz == clamp(shadowTexPos4f.xyz, vec3(0.005), vec3(0.995))) { if(shadowTexPos4f.xyz == clamp(shadowTexPos4f.xyz, vec3(0.005), vec3(0.995))) {
shadowTexPos4f.y += 1.0; shadowTexPos4f.y += 1.0;
shadowTexPos4f.y *= SUN_SHADOW_MAP_FRAC; shadowTexPos4f.y *= SUN_SHADOW_MAP_FRAC;
shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy, shadowTexPos4f.z + 0.00015), 0.0); shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy, shadowTexPos4f.z + 0.00015), 0.0);
break; break;
} }
#endif #endif
#ifdef COMPILE_SUN_SHADOW_LOD2 #ifdef COMPILE_SUN_SHADOW_LOD2
shadowTexPos4f = u_sunShadowMatrixLOD24f * shadowWorldPos4f; shadowTexPos4f = u_sunShadowMatrixLOD24f * shadowWorldPos4f;
if(shadowTexPos4f.xyz == clamp(shadowTexPos4f.xyz, vec3(0.005), vec3(0.995))) { if(shadowTexPos4f.xyz == clamp(shadowTexPos4f.xyz, vec3(0.005), vec3(0.995))) {
shadowTexPos4f.y += 2.0; shadowTexPos4f.y += 2.0;
shadowTexPos4f.y *= SUN_SHADOW_MAP_FRAC; shadowTexPos4f.y *= SUN_SHADOW_MAP_FRAC;
shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy, shadowTexPos4f.z + 0.00015), 0.0); shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy, shadowTexPos4f.z + 0.00015), 0.0);
} }
#endif #endif
break; break;
} }
#endif #endif
lightColor3f = u_sunColor3f_sky1f.rgb * max(lightmapCoords2f.g * 2.0 - 1.0, 0.0); lightColor3f = u_sunColor3f_sky1f.rgb * max(lightmapCoords2f.g * 2.0 - 1.0, 0.0);
#ifdef DO_COMPILE_SUN_SHADOWS #ifdef DO_COMPILE_SUN_SHADOWS
lightColor3f *= shadowSample * skyLight; lightColor3f *= shadowSample * skyLight;
#endif #endif
lightColor3f = eaglercraftLighting(diffuseColor4f.rgb, lightColor3f, -worldDirection4f.xyz, u_sunDirection4f.xyz, normalVector3f, materialData3f, metalN, metalK) * u_blockSkySunDynamicLightFac4f.z; lightColor3f = eaglercraftLighting(diffuseColor4f.rgb, lightColor3f, -worldDirection4f.xyz, u_sunDirection4f.xyz, normalVector3f, materialData3f, metalN, metalK) * u_blockSkySunDynamicLightFac4f.z;
} }
float f; float f;
#ifdef COMPILE_PARABOLOID_ENV_MAP #ifdef COMPILE_PARABOLOID_ENV_MAP
// =========== ENVIRONMENT MAP =========== // // =========== ENVIRONMENT MAP =========== //
f = materialData3f.g < 0.06 ? 1.0 : 0.0; f = materialData3f.g < 0.06 ? 1.0 : 0.0;
f += materialData3f.r < 0.5 ? 1.0 : 0.0; f += materialData3f.r < 0.5 ? 1.0 : 0.0;
while(f == 0.0) { while(f == 0.0) {
float dst2 = dot(worldPosition4f.xyz, worldPosition4f.xyz); float dst2 = dot(worldPosition4f.xyz, worldPosition4f.xyz);
if(dst2 > 16.0) { if(dst2 > 16.0) {
break; break;
} }
vec3 reflectDir = reflect(worldDirection4f.xyz, normalVector3f); vec3 reflectDir = reflect(worldDirection4f.xyz, normalVector3f);
reflectDir.xz /= abs(reflectDir.y) + 1.0; reflectDir.xz /= abs(reflectDir.y) + 1.0;
float dst = 1.0 - dot(reflectDir.xz, reflectDir.xz); float dst = 1.0 - dot(reflectDir.xz, reflectDir.xz);
dst *= dst; dst *= dst;
reflectDir.xz = reflectDir.xz * 0.975; reflectDir.xz = reflectDir.xz * 0.975;
vec4 envMapSample4f; vec4 envMapSample4f;
if(dst < 0.005) { if(dst < 0.005) {
vec4 sample1 = textureLod(u_environmentMap, reflectDir.xz * vec2(0.5, 0.25) + vec2(0.5, 0.25), 0.0); vec4 sample1 = textureLod(u_environmentMap, reflectDir.xz * vec2(0.5, 0.25) + vec2(0.5, 0.25), 0.0);
vec4 sample2 = textureLod(u_environmentMap, reflectDir.xz * vec2(0.5, -0.25) + vec2(0.5, 0.75), 0.0); vec4 sample2 = textureLod(u_environmentMap, reflectDir.xz * vec2(0.5, -0.25) + vec2(0.5, 0.75), 0.0);
envMapSample4f = vec4(mix(sample1.rgb, sample2.rgb, smoothstep(0.0, 1.0, reflectDir.y * -12.5 + 0.5)).rgb, min(sample1.a, sample2.a)); envMapSample4f = vec4(mix(sample1.rgb, sample2.rgb, smoothstep(0.0, 1.0, reflectDir.y * -12.5 + 0.5)).rgb, min(sample1.a, sample2.a));
}else { }else {
reflectDir.xz = reflectDir.xz * vec2(0.5, reflectDir.y > 0.0 ? 0.25 : -0.25); reflectDir.xz = reflectDir.xz * vec2(0.5, reflectDir.y > 0.0 ? 0.25 : -0.25);
reflectDir.xz += vec2(0.5, reflectDir.y > 0.0 ? 0.25 : 0.75); reflectDir.xz += vec2(0.5, reflectDir.y > 0.0 ? 0.25 : 0.75);
envMapSample4f = textureLod(u_environmentMap, reflectDir.xz, 0.0); envMapSample4f = textureLod(u_environmentMap, reflectDir.xz, 0.0);
} }
if(envMapSample4f.a > 0.0) { if(envMapSample4f.a > 0.0) {
lightColor3f += eaglercraftIBL_Specular(diffuseColor4f.rgb, envMapSample4f.rgb, worldDirection4f.xyz, normalVector3f, materialData3f, metalN, metalK) * (1.0 - sqrt(dst2) * 0.25); lightColor3f += eaglercraftIBL_Specular(diffuseColor4f.rgb, envMapSample4f.rgb, worldDirection4f.xyz, normalVector3f, materialData3f, metalN, metalK) * (1.0 - sqrt(dst2) * 0.25);
} }
break; break;
} }
#endif #endif
// =========== IRRADIANCE MAP =========== // // =========== IRRADIANCE MAP =========== //
lightmapCoords2f *= lightmapCoords2f; lightmapCoords2f *= lightmapCoords2f;
vec3 irradianceMapSamplePos2f = normalVector3f; vec3 irradianceMapSamplePos2f = normalVector3f;
irradianceMapSamplePos2f.xz /= abs(irradianceMapSamplePos2f.y) + 1.0; irradianceMapSamplePos2f.xz /= abs(irradianceMapSamplePos2f.y) + 1.0;
float dst = 1.0 - dot(irradianceMapSamplePos2f.xz, irradianceMapSamplePos2f.xz); float dst = 1.0 - dot(irradianceMapSamplePos2f.xz, irradianceMapSamplePos2f.xz);
dst *= dst; dst *= dst;
irradianceMapSamplePos2f.xz *= 0.975; irradianceMapSamplePos2f.xz *= 0.975;
vec3 skyLight = vec3(sqrt(0.01 + max(u_sunDirection4f.w, 0.0))); vec3 skyLight = vec3(sqrt(0.01 + max(u_sunDirection4f.w, 0.0)));
if(dst < 0.005) { if(dst < 0.005) {
vec4 sample1 = textureLod(u_irradianceMap, irradianceMapSamplePos2f.xz * vec2(0.5, 0.25) + vec2(0.5, 0.25), 0.0); vec4 sample1 = textureLod(u_irradianceMap, irradianceMapSamplePos2f.xz * vec2(0.5, 0.25) + vec2(0.5, 0.25), 0.0);
vec4 sample2 = textureLod(u_irradianceMap, irradianceMapSamplePos2f.xz * vec2(0.5, -0.25) + vec2(0.5, 0.75), 0.0); vec4 sample2 = textureLod(u_irradianceMap, irradianceMapSamplePos2f.xz * vec2(0.5, -0.25) + vec2(0.5, 0.75), 0.0);
skyLight += mix(sample1.rgb, sample2.rgb, smoothstep(0.0, 1.0, irradianceMapSamplePos2f.y * -12.5 + 0.5)).rgb; skyLight += mix(sample1.rgb, sample2.rgb, smoothstep(0.0, 1.0, irradianceMapSamplePos2f.y * -12.5 + 0.5)).rgb;
}else { }else {
irradianceMapSamplePos2f.xz *= vec2(0.5, irradianceMapSamplePos2f.y > 0.0 ? 0.25 : -0.25); irradianceMapSamplePos2f.xz *= vec2(0.5, irradianceMapSamplePos2f.y > 0.0 ? 0.25 : -0.25);
irradianceMapSamplePos2f.xz += vec2(0.5, irradianceMapSamplePos2f.y > 0.0 ? 0.25 : 0.75); irradianceMapSamplePos2f.xz += vec2(0.5, irradianceMapSamplePos2f.y > 0.0 ? 0.25 : 0.75);
skyLight += textureLod(u_irradianceMap, irradianceMapSamplePos2f.xz, 0.0).rgb; skyLight += textureLod(u_irradianceMap, irradianceMapSamplePos2f.xz, 0.0).rgb;
} }
skyLight *= lightmapCoords2f.g * u_sunColor3f_sky1f.w; skyLight *= lightmapCoords2f.g * u_sunColor3f_sky1f.w;
#ifdef COMPILE_DYNAMIC_LIGHTS #ifdef COMPILE_DYNAMIC_LIGHTS
// =========== DYNAMIC LIGHTING =========== // // =========== DYNAMIC LIGHTING =========== //
vec3 dlightDist3f, dlightDir3f, dlightColor3f; vec3 dlightDist3f, dlightDir3f, dlightColor3f;
int safeLightCount = u_dynamicLightCount1i > 12 ? 0 : u_dynamicLightCount1i; // hate this int safeLightCount = u_dynamicLightCount1i > 12 ? 0 : u_dynamicLightCount1i; // hate this
for(int i = 0; i < safeLightCount; ++i) { for(int i = 0; i < safeLightCount; ++i) {
dlightDist3f = worldPosition4f.xyz - u_dynamicLightArray[i].u_lightPosition4f.xyz; dlightDist3f = worldPosition4f.xyz - u_dynamicLightArray[i].u_lightPosition4f.xyz;
dlightDir3f = normalize(dlightDist3f); dlightDir3f = normalize(dlightDist3f);
dlightDir3f = materialData3f.b == 1.0 ? normalVector3f : -dlightDir3f; dlightDir3f = materialData3f.b == 1.0 ? normalVector3f : -dlightDir3f;
if(dot(dlightDir3f, normalVector3f) <= 0.0) { if(dot(dlightDir3f, normalVector3f) <= 0.0) {
continue; continue;
} }
dlightColor3f = u_dynamicLightArray[i].u_lightColor4f.rgb / dot(dlightDist3f, dlightDist3f); dlightColor3f = u_dynamicLightArray[i].u_lightColor4f.rgb / dot(dlightDist3f, dlightDist3f);
if(dlightColor3f.r + dlightColor3f.g + dlightColor3f.b < 0.025) { if(dlightColor3f.r + dlightColor3f.g + dlightColor3f.b < 0.025) {
continue; continue;
} }
lightColor3f += eaglercraftLighting(diffuseColor4f.rgb, dlightColor3f, -worldDirection4f.xyz, dlightDir3f, normalVector3f, materialData3f, metalN, metalK) * u_blockSkySunDynamicLightFac4f.w; lightColor3f += eaglercraftLighting(diffuseColor4f.rgb, dlightColor3f, -worldDirection4f.xyz, dlightDir3f, normalVector3f, materialData3f, metalN, metalK) * u_blockSkySunDynamicLightFac4f.w;
} }
#endif #endif
// ============ CACLULATE FOG ============= // // ============ CACLULATE FOG ============= //
vec4 fogBlend4f = vec4(0.0); vec4 fogBlend4f = vec4(0.0);
#ifndef COMPILE_ENABLE_TEX_GEN #ifndef COMPILE_ENABLE_TEX_GEN
while(u_fogParameters4f.x > 0.0) { while(u_fogParameters4f.x > 0.0) {
float atmos = u_fogParameters4f.x >= 4.0 ? 4.0 : 0.0; float atmos = u_fogParameters4f.x >= 4.0 ? 4.0 : 0.0;
float type = u_fogParameters4f.x - atmos; float type = u_fogParameters4f.x - atmos;
fogBlend4f = mix(u_fogColorLight4f, u_fogColorDark4f, lightmapCoords2f.g); fogBlend4f = mix(u_fogColorLight4f, u_fogColorDark4f, lightmapCoords2f.g);
float l = length(v_position4f.xyz); float l = length(v_position4f.xyz);
if(type == 1.0) { if(type == 1.0) {
f = (l - u_fogParameters4f.z) / (u_fogParameters4f.w - u_fogParameters4f.z); f = (l - u_fogParameters4f.z) / (u_fogParameters4f.w - u_fogParameters4f.z);
}else { }else {
f = 1.0 - exp(-u_fogParameters4f.y * l); f = 1.0 - exp(-u_fogParameters4f.y * l);
} }
fogBlend4f.a *= clamp(f, 0.0, 1.0); fogBlend4f.a *= clamp(f, 0.0, 1.0);
if(atmos == 0.0) { if(atmos == 0.0) {
break; break;
} }
vec3 atmosSamplePos = v_position4f.xyz / -l; vec3 atmosSamplePos = v_position4f.xyz / -l;
atmosSamplePos.xz /= abs(atmosSamplePos.y) + 1.0; atmosSamplePos.xz /= abs(atmosSamplePos.y) + 1.0;
atmosSamplePos.xz *= vec2(-0.5, -0.25) * 0.75; atmosSamplePos.xz *= vec2(-0.5, -0.25) * 0.75;
atmosSamplePos.xz += vec2(0.5, 0.25); atmosSamplePos.xz += vec2(0.5, 0.25);
fogBlend4f.rgb *= textureLod(u_irradianceMap, atmosSamplePos.xz, 0.0).rgb; fogBlend4f.rgb *= textureLod(u_irradianceMap, atmosSamplePos.xz, 0.0).rgb;
#ifdef COMPILE_FOG_LIGHT_SHAFTS #ifdef COMPILE_FOG_LIGHT_SHAFTS
fogBlend4f.rgb *= pow(textureLod(u_lightShaftsTexture, v_positionClip2f * 0.5 + 0.5, 0.0).r * 0.9 + 0.1, 2.25); fogBlend4f.rgb *= pow(textureLod(u_lightShaftsTexture, v_positionClip2f * 0.5 + 0.5, 0.0).r * 0.9 + 0.1, 2.25);
fogBlend4f.a = fogBlend4f.a * 0.9 + 0.1; fogBlend4f.a = fogBlend4f.a * 0.9 + 0.1;
#endif #endif
break; break;
} }
#endif #endif
// ============ OUTPUT COLOR ============== // // ============ OUTPUT COLOR ============== //
vec3 blockLight = lightmapCoords2f.r * vec3(1.0, 0.5809, 0.2433) * 2.0 * u_blockSkySunDynamicLightFac4f.x; vec3 blockLight = lightmapCoords2f.r * vec3(1.0, 0.5809, 0.2433) * 2.0 * u_blockSkySunDynamicLightFac4f.x;
skyLight *= u_blockSkySunDynamicLightFac4f.y; skyLight *= u_blockSkySunDynamicLightFac4f.y;
float emissive = materialData3f.b == 1.0 ? 0.0 : materialData3f.b; float emissive = materialData3f.b == 1.0 ? 0.0 : materialData3f.b;
diffuseColor4f.rgb *= max(skyLight + blockLight, vec3(emissive * emissive * 20.0 + 0.075)) * 0.075; diffuseColor4f.rgb *= max(skyLight + blockLight, vec3(emissive * emissive * 20.0 + 0.075)) * 0.075;
diffuseColor4f.rgb += lightColor3f; diffuseColor4f.rgb += lightColor3f;
diffuseColor4f.rgb = mix(diffuseColor4f.rgb, fogBlend4f.rgb, fogBlend4f.a); diffuseColor4f.rgb = mix(diffuseColor4f.rgb, fogBlend4f.rgb, fogBlend4f.a);
output4f = vec4(diffuseColor4f.rgb * diffuseColor4f.a, diffuseColor4f.a); output4f = vec4(diffuseColor4f.rgb * diffuseColor4f.a, diffuseColor4f.a);
} }

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2023 lax1dude. All Rights Reserved. * Copyright (c) 2023 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -91,148 +91,148 @@ uniform vec4 u_pixelAlignment4f;
#define CREATE_DEPTH_MATRIX(matrix4fInput) mat4x2(matrix4fInput[0].zw,matrix4fInput[1].zw,matrix4fInput[2].zw,matrix4fInput[3].zw) #define CREATE_DEPTH_MATRIX(matrix4fInput) mat4x2(matrix4fInput[0].zw,matrix4fInput[1].zw,matrix4fInput[2].zw,matrix4fInput[3].zw)
void main() { void main() {
vec2 v_position2f2 = (floor(v_position2f * u_pixelAlignment4f.xy) + 0.25) * (2.0 / u_pixelAlignment4f.zw); vec2 v_position2f2 = (floor(v_position2f * u_pixelAlignment4f.xy) + 0.25) * (2.0 / u_pixelAlignment4f.zw);
#ifdef COMPILE_REPROJECT_SSAO #ifdef COMPILE_REPROJECT_SSAO
reprojectionSSAOOutput4f = vec4(0.0, 1.0, 0.0, 0.0); reprojectionSSAOOutput4f = vec4(0.0, 1.0, 0.0, 0.0);
#endif #endif
#ifdef COMPILE_REPROJECT_SSR #ifdef COMPILE_REPROJECT_SSR
reprojectionReflectionOutput4f = vec4(0.0, 0.0, 0.0, 0.0); reprojectionReflectionOutput4f = vec4(0.0, 0.0, 0.0, 0.0);
reprojectionHitVectorOutput4f = vec4(0.0, 0.0, 0.0, 0.0); reprojectionHitVectorOutput4f = vec4(0.0, 0.0, 0.0, 0.0);
#endif #endif
float fragDepth = textureLod(u_gbufferDepthTexture, v_position2f, 0.0).r; float fragDepth = textureLod(u_gbufferDepthTexture, v_position2f2, 0.0).r;
if(fragDepth < 0.000001) { if(fragDepth < 0.000001) {
return; return;
} }
vec4 fragClipSpacePos4f = vec4(v_position2f, fragDepth, 1.0) * 2.0 - 1.0; vec4 fragClipSpacePos4f = vec4(v_position2f2, fragDepth, 1.0) * 2.0 - 1.0;
vec4 fragPos4f = u_inverseViewProjMatrix4f * fragClipSpacePos4f; vec4 fragPos4f = u_inverseViewProjMatrix4f * fragClipSpacePos4f;
fragPos4f.xyz /= fragPos4f.w; fragPos4f.xyz /= fragPos4f.w;
fragPos4f.w = 1.0; fragPos4f.w = 1.0;
vec4 reprojPos4f = u_reprojectionMatrix4f * fragPos4f; vec4 reprojPos4f = u_reprojectionMatrix4f * fragPos4f;
vec4 reprojClipPos4f = vec4(reprojPos4f.xyz / reprojPos4f.w, 1.0); vec4 reprojClipPos4f = vec4(reprojPos4f.xyz / reprojPos4f.w, 1.0);
reprojPos4f = reprojClipPos4f; reprojPos4f = reprojClipPos4f;
reprojPos4f.xyz *= 0.5; reprojPos4f.xyz *= 0.5;
reprojPos4f.xyz += 0.5; reprojPos4f.xyz += 0.5;
reprojPos4f.xy = (floor(reprojPos4f.xy * u_pixelAlignment4f.zw) + 0.5) * (0.5 / u_pixelAlignment4f.xy); reprojPos4f.xy = (floor(reprojPos4f.xy * u_pixelAlignment4f.zw) + 0.5) * (0.5 / u_pixelAlignment4f.xy);
if(reprojPos4f.xy != clamp(reprojPos4f.xy, vec2(0.001), vec2(0.999)) || abs(GET_LINEAR_DEPTH_FROM_VALUE(textureLod(u_reprojectionDepthTexture, reprojPos4f.xy, 0.0).r) - GET_LINEAR_DEPTH_FROM_VALUE(reprojPos4f.z)) > reprojDepthLimit) { if(reprojPos4f.xy != clamp(reprojPos4f.xy, vec2(0.001), vec2(0.999)) || abs(GET_LINEAR_DEPTH_FROM_VALUE(textureLod(u_reprojectionDepthTexture, reprojPos4f.xy, 0.0).r) - GET_LINEAR_DEPTH_FROM_VALUE(reprojPos4f.z)) > reprojDepthLimit) {
#ifdef COMPILE_REPROJECT_SSAO #ifdef COMPILE_REPROJECT_SSAO
reprojectionSSAOOutput4f = vec4(0.01, textureLod(u_ssaoSampleTexture, v_position2f, 0.0).r, 1.0, 0.0); reprojectionSSAOOutput4f = vec4(0.01, textureLod(u_ssaoSampleTexture, v_position2f, 0.0).r, 1.0, 0.0);
#endif #endif
#ifdef COMPILE_REPROJECT_SSR #ifdef COMPILE_REPROJECT_SSR
reprojectionHitVectorOutput4f = vec4(0.0, 0.0, 0.0, 50.0); reprojectionHitVectorOutput4f = vec4(0.0, 0.0, 0.0, 50.0);
#endif #endif
return; return;
} }
#ifdef COMPILE_REPROJECT_SSAO #ifdef COMPILE_REPROJECT_SSAO
vec4 reprojectionSSAOInput4f = textureLod(u_reprojectionSSAOInput4f, reprojPos4f.xy, 0.0); vec4 reprojectionSSAOInput4f = textureLod(u_reprojectionSSAOInput4f, reprojPos4f.xy, 0.0);
reprojectionSSAOInput4f.g = mix(textureLod(u_ssaoSampleTexture, v_position2f, 0.0).r, reprojectionSSAOInput4f.g, min(reprojectionSSAOInput4f.r * 10.0, 0.85)); reprojectionSSAOInput4f.g = mix(textureLod(u_ssaoSampleTexture, v_position2f, 0.0).r, reprojectionSSAOInput4f.g, min(reprojectionSSAOInput4f.r * 10.0, 0.85));
reprojectionSSAOInput4f.r = min(reprojectionSSAOInput4f.r + 0.01, 1.0); reprojectionSSAOInput4f.r = min(reprojectionSSAOInput4f.r + 0.01, 1.0);
reprojectionSSAOInput4f.b = 1.0; reprojectionSSAOInput4f.b = 1.0;
reprojectionSSAOOutput4f = reprojectionSSAOInput4f; reprojectionSSAOOutput4f = reprojectionSSAOInput4f;
#endif #endif
#ifdef COMPILE_REPROJECT_SSR #ifdef COMPILE_REPROJECT_SSR
vec4 materials = textureLod(u_gbufferMaterialTexture, v_position2f2, 0.0); vec4 materials = textureLod(u_gbufferMaterialTexture, v_position2f2, 0.0);
float f = materials.g < 0.06 ? 1.0 : 0.0; float f = materials.g < 0.06 ? 1.0 : 0.0;
f += materials.r < 0.5 ? 1.0 : 0.0; f += materials.r < 0.5 ? 1.0 : 0.0;
f += materials.a > 0.5 ? 1.0 : 0.0; f += materials.a > 0.5 ? 1.0 : 0.0;
if(f > 0.0) { if(f > 0.0) {
return; return;
} }
vec4 lastFrameHitVector4f = textureLod(u_reprojectionHitVectorInput4f, reprojPos4f.xy, 0.0); vec4 lastFrameHitVector4f = textureLod(u_reprojectionHitVectorInput4f, reprojPos4f.xy, 0.0);
if(lastFrameHitVector4f.g <= 0.0) { if(lastFrameHitVector4f.g <= 0.0) {
reprojectionReflectionOutput4f = textureLod(u_reprojectionReflectionInput4f, reprojPos4f.xy, 0.0); reprojectionReflectionOutput4f = textureLod(u_reprojectionReflectionInput4f, reprojPos4f.xy, 0.0);
reprojectionReflectionOutput4f.a = max(reprojectionReflectionOutput4f.a - 1.0, 1.0); reprojectionReflectionOutput4f.a = max(reprojectionReflectionOutput4f.a - 1.0, 1.0);
reprojectionHitVectorOutput4f = vec4(0.0, 0.0, 0.0, lastFrameHitVector4f.a); reprojectionHitVectorOutput4f = vec4(0.0, 0.0, 0.0, lastFrameHitVector4f.a);
return; return;
} }
reprojectionReflectionOutput4f = vec4(0.0, 0.0, 0.0, 1.0); reprojectionReflectionOutput4f = vec4(0.0, 0.0, 0.0, 1.0);
lastFrameHitVector4f.g -= 0.0004; lastFrameHitVector4f.g -= 0.0004;
vec4 lastFrameFragPosView4f = u_lastInverseProjMatrix4f * vec4(reprojClipPos4f.xyz, 1.0); vec4 lastFrameFragPosView4f = u_lastInverseProjMatrix4f * vec4(reprojClipPos4f.xyz, 1.0);
lastFrameFragPosView4f.xyz /= lastFrameFragPosView4f.w; lastFrameFragPosView4f.xyz /= lastFrameFragPosView4f.w;
lastFrameFragPosView4f.w = 1.0; lastFrameFragPosView4f.w = 1.0;
vec4 lastFrameHitPos4f = vec4(lastFrameFragPosView4f.xyz + lastFrameHitVector4f.xyz, 1.0); vec4 lastFrameHitPos4f = vec4(lastFrameFragPosView4f.xyz + lastFrameHitVector4f.xyz, 1.0);
vec4 thisFrameHitPos4f = u_reprojectionInverseViewMatrix4f * lastFrameHitPos4f; vec4 thisFrameHitPos4f = u_reprojectionInverseViewMatrix4f * lastFrameHitPos4f;
thisFrameHitPos4f.xyz /= thisFrameHitPos4f.w; thisFrameHitPos4f.xyz /= thisFrameHitPos4f.w;
thisFrameHitPos4f.w = 1.0; thisFrameHitPos4f.w = 1.0;
vec4 thisFrameHitPosProj4f = u_projectionMatrix4f * thisFrameHitPos4f; vec4 thisFrameHitPosProj4f = u_projectionMatrix4f * thisFrameHitPos4f;
thisFrameHitPosProj4f.xyz /= thisFrameHitPosProj4f.w; thisFrameHitPosProj4f.xyz /= thisFrameHitPosProj4f.w;
thisFrameHitPosProj4f.w = 1.0; thisFrameHitPosProj4f.w = 1.0;
vec3 thisFrameHitPosProjTex3f = thisFrameHitPosProj4f.xyz * 0.5 + 0.5; vec3 thisFrameHitPosProjTex3f = thisFrameHitPosProj4f.xyz * 0.5 + 0.5;
if(thisFrameHitPosProjTex3f.xy != clamp(thisFrameHitPosProjTex3f.xy, vec2(0.001), vec2(0.999))) { if(thisFrameHitPosProjTex3f.xy != clamp(thisFrameHitPosProjTex3f.xy, vec2(0.001), vec2(0.999))) {
return; return;
} }
float fragDepthSample = textureLod(u_gbufferDepthTexture, thisFrameHitPosProjTex3f.xy, 0.0).r * 2.0 - 1.0; float fragDepthSample = textureLod(u_gbufferDepthTexture, thisFrameHitPosProjTex3f.xy, 0.0).r * 2.0 - 1.0;
vec2 thisFrameHitPosProjDepthPos = CREATE_DEPTH_MATRIX(u_inverseProjectionMatrix4f) * vec4(thisFrameHitPosProj4f.xy, fragDepthSample, 1.0); vec2 thisFrameHitPosProjDepthPos = CREATE_DEPTH_MATRIX(u_inverseProjectionMatrix4f) * vec4(thisFrameHitPosProj4f.xy, fragDepthSample, 1.0);
thisFrameHitPosProjDepthPos.x /= thisFrameHitPosProjDepthPos.y; thisFrameHitPosProjDepthPos.x /= thisFrameHitPosProjDepthPos.y;
if(thisFrameHitPosProjDepthPos.x - thisFrameHitPos4f.z - 0.125 < 0.0) { if(thisFrameHitPosProjDepthPos.x - thisFrameHitPos4f.z - 0.125 < 0.0) {
return; return;
} }
vec3 lastFrameHitPosNormal3f = textureLod(u_gbufferNormalTexture, thisFrameHitPosProjTex3f.xy, 0.0).rgb; vec3 lastFrameHitPosNormal3f = textureLod(u_gbufferNormalTexture, thisFrameHitPosProjTex3f.xy, 0.0).rgb;
lastFrameHitPosNormal3f *= 2.0; lastFrameHitPosNormal3f *= 2.0;
lastFrameHitPosNormal3f -= 1.0; lastFrameHitPosNormal3f -= 1.0;
vec3 currentNormal3f = textureLod(u_gbufferNormalTexture, v_position2f2, 0.0).xyz; vec3 currentNormal3f = textureLod(u_gbufferNormalTexture, v_position2f2, 0.0).xyz;
currentNormal3f *= 2.0; currentNormal3f *= 2.0;
currentNormal3f -= 1.0; currentNormal3f -= 1.0;
vec4 fragPosView4f = u_inverseProjectionMatrix4f * fragClipSpacePos4f; vec4 fragPosView4f = u_inverseProjectionMatrix4f * fragClipSpacePos4f;
fragPosView4f.xyz /= fragPosView4f.w; fragPosView4f.xyz /= fragPosView4f.w;
fragPosView4f.w = 1.0; fragPosView4f.w = 1.0;
vec3 rayOrigin = fragPosView4f.xyz; vec3 rayOrigin = fragPosView4f.xyz;
vec3 planePos = thisFrameHitPos4f.xyz; vec3 planePos = thisFrameHitPos4f.xyz;
vec3 planeNormal = lastFrameHitPosNormal3f; vec3 planeNormal = lastFrameHitPosNormal3f;
vec3 newRayDirection = reflect(normalize(rayOrigin), currentNormal3f.xyz); vec3 newRayDirection = reflect(normalize(rayOrigin), currentNormal3f.xyz);
float dist = dot(planeNormal, newRayDirection); float dist = dot(planeNormal, newRayDirection);
if(dist > 0.9) { if(dist > 0.9) {
return; return;
} }
dist = dot(planeNormal, planePos - rayOrigin) / dist; dist = dot(planeNormal, planePos - rayOrigin) / dist;
if(dist < 0.0) { if(dist < 0.0) {
return; return;
} }
reprojectionHitVectorOutput4f = vec4(newRayDirection * dist, 1.0); reprojectionHitVectorOutput4f = vec4(newRayDirection * dist, 1.0);
reprojectionHitVectorOutput4f.y += 0.0004; reprojectionHitVectorOutput4f.y += 0.0004;
thisFrameHitPosProj4f = u_viewToPreviousProjMatrix4f * vec4(rayOrigin + newRayDirection * dist, 1.0); thisFrameHitPosProj4f = u_viewToPreviousProjMatrix4f * vec4(rayOrigin + newRayDirection * dist, 1.0);
thisFrameHitPosProj4f.xyz /= thisFrameHitPosProj4f.w; thisFrameHitPosProj4f.xyz /= thisFrameHitPosProj4f.w;
thisFrameHitPosProj4f.w = 1.0; thisFrameHitPosProj4f.w = 1.0;
thisFrameHitPosProjTex3f = thisFrameHitPosProj4f.xyz * 0.5 + 0.5; thisFrameHitPosProjTex3f = thisFrameHitPosProj4f.xyz * 0.5 + 0.5;
if(thisFrameHitPosProjTex3f.xy != clamp(thisFrameHitPosProjTex3f.xy, vec2(0.001), vec2(0.999))) { if(thisFrameHitPosProjTex3f.xy != clamp(thisFrameHitPosProjTex3f.xy, vec2(0.001), vec2(0.999))) {
return; return;
} }
fragDepthSample = textureLod(u_reprojectionDepthTexture, thisFrameHitPosProjTex3f.xy, 0.0).r * 2.0 - 1.0; fragDepthSample = textureLod(u_reprojectionDepthTexture, thisFrameHitPosProjTex3f.xy, 0.0).r * 2.0 - 1.0;
vec2 thisFrameHitPosProjPos = CREATE_DEPTH_MATRIX(u_lastInverseProjMatrix4f) * thisFrameHitPosProj4f; vec2 thisFrameHitPosProjPos = CREATE_DEPTH_MATRIX(u_lastInverseProjMatrix4f) * thisFrameHitPosProj4f;
thisFrameHitPosProjPos.x /= thisFrameHitPosProjPos.y; thisFrameHitPosProjPos.x /= thisFrameHitPosProjPos.y;
thisFrameHitPosProjDepthPos = CREATE_DEPTH_MATRIX(u_lastInverseProjMatrix4f) * vec4(thisFrameHitPosProj4f.xy, fragDepthSample, 1.0); thisFrameHitPosProjDepthPos = CREATE_DEPTH_MATRIX(u_lastInverseProjMatrix4f) * vec4(thisFrameHitPosProj4f.xy, fragDepthSample, 1.0);
thisFrameHitPosProjDepthPos.x /= thisFrameHitPosProjDepthPos.y; thisFrameHitPosProjDepthPos.x /= thisFrameHitPosProjDepthPos.y;
if(thisFrameHitPosProjDepthPos.x - thisFrameHitPosProjPos.x - 0.125 < 0.0) { if(thisFrameHitPosProjDepthPos.x - thisFrameHitPosProjPos.x - 0.125 < 0.0) {
reprojectionHitVectorOutput4f = vec4(0.0, 0.0, 0.0, 0.0); reprojectionHitVectorOutput4f = vec4(0.0, 0.0, 0.0, 0.0);
return; return;
} }
reprojectionReflectionOutput4f = vec4(textureLod(u_lastFrameColorInput4f, thisFrameHitPosProjTex3f.xy, 0.0).rgb, 0.0); reprojectionReflectionOutput4f = vec4(textureLod(u_lastFrameColorInput4f, thisFrameHitPosProjTex3f.xy, 0.0).rgb, 0.0);
#endif #endif
} }

View File

@ -1,7 +1,7 @@
{ {
"name": "§eHigh Performance PBR", "name": "§eHigh Performance PBR",
"desc": "Pack made from scratch specifically for this client, designed to give what I call the best balance between quality and performance possible in a browser but obviously that's just my opinion", "desc": "Pack made from scratch specifically for this client, designed to give what I call the best balance between quality and performance possible in a browser but obviously that's just my opinion",
"vers": "1.2.1", "vers": "1.2.2",
"author": "lax1dude", "author": "lax1dude",
"api_vers": 1, "api_vers": 1,
"features": [ "features": [

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2023 lax1dude. All Rights Reserved. * Copyright (c) 2023 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -34,65 +34,65 @@ uniform mat4 u_inverseProjectionMatrix4f;
uniform mat2 u_randomizerDataMatrix2f; uniform mat2 u_randomizerDataMatrix2f;
const vec3 ssaoKernel[8] = vec3[]( const vec3 ssaoKernel[8] = vec3[](
vec3(0.599,0.721,0.350),vec3(0.114,0.791,0.601), vec3(0.599,0.721,0.350),vec3(0.114,0.791,0.601),
vec3(0.067,0.995,0.069),vec3(0.511,-0.510,0.692), vec3(0.067,0.995,0.069),vec3(0.511,-0.510,0.692),
vec3(0.626,-0.667,0.404),vec3(0.896,-0.169,0.411), vec3(0.626,-0.667,0.404),vec3(0.896,-0.169,0.411),
vec3(0.716,-0.439,0.543),vec3(-0.400,0.733,0.550)); vec3(0.716,-0.439,0.543),vec3(-0.400,0.733,0.550));
#define radius 1.5 #define radius 1.5
#define SAMPLE_SSAO(idx, pos, matTBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2)\ #define SAMPLE_SSAO(idx, pos, matTBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2)\
tmpVec4_1.xyz = pos + (matTBN * ssaoKernel[idx]) * radius;\ tmpVec4_1.xyz = pos + (matTBN * ssaoKernel[idx]) * radius;\
tmpVec4_1.w = 1.0;\ tmpVec4_1.w = 1.0;\
tmpVec4_2 = u_projectionMatrix4f * tmpVec4_1;\ tmpVec4_2 = u_projectionMatrix4f * tmpVec4_1;\
tmpVec4_2.xyz /= tmpVec4_2.w;\ tmpVec4_2.xyz /= tmpVec4_2.w;\
tmpVec4_2.xyz = clamp(tmpVec4_2.xyz, -0.99, 0.99);\ tmpVec4_2.xyz = clamp(tmpVec4_2.xyz, -0.99, 0.99);\
tmpVec4_2.zw = matProjInv2f * vec4(tmpVec4_2.xy, textureLod(u_gbufferDepthTexture, tmpVec4_2.xy * 0.5 + 0.5, 0.0).r * 2.0 - 1.0, 1.0);\ tmpVec4_2.zw = matProjInv2f * vec4(tmpVec4_2.xy, textureLod(u_gbufferDepthTexture, tmpVec4_2.xy * 0.5 + 0.5, 0.0).r * 2.0 - 1.0, 1.0);\
tmpVec4_2.z /= tmpVec4_2.w;\ tmpVec4_2.z /= tmpVec4_2.w;\
tmpVec4_2.x = smoothstep(0.0, 1.0, radius * 0.5 / abs(pos.z - tmpVec4_2.z));\ tmpVec4_2.x = smoothstep(0.0, 1.0, radius * 0.5 / abs(pos.z - tmpVec4_2.z));\
divisor += tmpVec4_2.x > 0.0 ? 1.0 : 0.0;\ divisor += tmpVec4_2.x > 0.0 ? 1.0 : 0.0;\
occlusion += (tmpVec4_2.z >= tmpVec4_1.z ? 1.0 : 0.0) * tmpVec4_2.x; occlusion += (tmpVec4_2.z >= tmpVec4_1.z ? 1.0 : 0.0) * tmpVec4_2.x;
void main() { void main() {
vec3 originalClipSpacePos = vec3(v_position2f, textureLod(u_gbufferDepthTexture, v_position2f, 0.0).r); vec3 originalClipSpacePos = vec3(v_position2f, textureLod(u_gbufferDepthTexture, v_position2f, 0.0).r);
if(originalClipSpacePos.z <= 0.0000001) { if(originalClipSpacePos.z <= 0.0000001) {
output1f = 1.0; output1f = 1.0;
return; return;
} }
originalClipSpacePos *= 2.0; originalClipSpacePos *= 2.0;
originalClipSpacePos -= 1.0; originalClipSpacePos -= 1.0;
vec3 normal3f = textureLod(u_gbufferNormalTexture, v_position2f, 0.0).rgb; vec3 normal3f = textureLod(u_gbufferNormalTexture, v_position2f, 0.0).rgb;
normal3f *= 2.0; normal3f *= 2.0;
normal3f -= 1.0; normal3f -= 1.0;
vec4 originalViewSpacePos = u_inverseProjectionMatrix4f * vec4(originalClipSpacePos, 1.0); vec4 originalViewSpacePos = u_inverseProjectionMatrix4f * vec4(originalClipSpacePos, 1.0);
originalViewSpacePos.xyz /= originalViewSpacePos.w; originalViewSpacePos.xyz /= originalViewSpacePos.w;
originalViewSpacePos.w = 1.0; originalViewSpacePos.w = 1.0;
vec4 noiseVec = textureLod(u_noiseConstantTexture, u_randomizerDataMatrix2f * (v_position2f + originalViewSpacePos.xy + normal3f.xz), 0.0); vec4 noiseVec = textureLod(u_noiseConstantTexture, 13.3725 / fract((u_randomizerDataMatrix2f * (v_position2f * 0.42695346 + originalViewSpacePos.xy * 1.373769945645 + normal3f.xz * 42.69456453)) * 1.123234234), 0.0);
noiseVec.xyz *= 2.0; noiseVec.xyz *= 2.0;
noiseVec.xyz -= 1.0; noiseVec.xyz -= 1.0;
vec3 tangent = normalize(noiseVec.xyz - normal3f * dot(noiseVec.xyz, normal3f)); vec3 tangent = normalize(noiseVec.xyz - normal3f * dot(noiseVec.xyz, normal3f));
vec3 bitangent = cross(normal3f, tangent); vec3 bitangent = cross(normal3f, tangent);
mat3 TBN = mat3(tangent, bitangent, normal3f) * noiseVec.w; mat3 TBN = mat3(tangent, bitangent, normal3f) * noiseVec.w;
float divisor = 0.0; float divisor = 0.0;
float occlusion = 0.0; float occlusion = 0.0;
vec4 tmpVec4_1; vec4 tmpVec4_1;
vec4 tmpVec4_2; vec4 tmpVec4_2;
mat4x2 matProjInv2f = mat4x2(u_inverseProjectionMatrix4f[0].zw, u_inverseProjectionMatrix4f[1].zw, u_inverseProjectionMatrix4f[2].zw, u_inverseProjectionMatrix4f[3].zw); mat4x2 matProjInv2f = mat4x2(u_inverseProjectionMatrix4f[0].zw, u_inverseProjectionMatrix4f[1].zw, u_inverseProjectionMatrix4f[2].zw, u_inverseProjectionMatrix4f[3].zw);
SAMPLE_SSAO(0, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2) SAMPLE_SSAO(0, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2)
SAMPLE_SSAO(1, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2) SAMPLE_SSAO(1, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2)
SAMPLE_SSAO(2, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2) SAMPLE_SSAO(2, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2)
SAMPLE_SSAO(3, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2) SAMPLE_SSAO(3, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2)
SAMPLE_SSAO(4, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2) SAMPLE_SSAO(4, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2)
SAMPLE_SSAO(5, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2) SAMPLE_SSAO(5, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2)
SAMPLE_SSAO(6, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2) SAMPLE_SSAO(6, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2)
SAMPLE_SSAO(7, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2) SAMPLE_SSAO(7, originalViewSpacePos.xyz, TBN, matProjInv2f, divisor, occlusion, tmpVec4_1, tmpVec4_2)
output1f = max(1.0 - (occlusion / max(divisor, 0.001)), 0.0); output1f = max(1.0 - (occlusion / max(divisor, 0.001)), 0.0);
} }

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -91,40 +91,39 @@ uniform vec2 u_textureAnisotropicFix;
uniform mat4 u_inverseViewMatrix4f; uniform mat4 u_inverseViewMatrix4f;
layout(std140) uniform u_chunkLightingData { layout(std140) uniform u_chunkLightingData {
mediump int u_dynamicLightCount1i; mediump int u_dynamicLightCount1i;
mediump int _paddingA_; mediump int _paddingA_;
mediump int _paddingB_; mediump int _paddingB_;
mediump int _paddingC_; mediump int _paddingC_;
mediump vec4 u_dynamicLightArray[12]; mediump vec4 u_dynamicLightArray[12];
}; };
layout(location = 0) out vec4 output4f; layout(location = 0) out vec4 output4f;
void main() { void main() {
#ifdef COMPILE_COLOR_ATTRIB #ifdef COMPILE_COLOR_ATTRIB
vec4 color = v_color4f * u_color4f; vec4 color = v_color4f * u_color4f;
#else #else
vec4 color = u_color4f; vec4 color = u_color4f;
#endif #endif
#ifdef COMPILE_ENABLE_TEX_GEN #ifdef COMPILE_ENABLE_TEX_GEN
vec4 texGenVector; vec4 tmpVec4 = vec4(v_objectPosition3f, 1.0);
vec4 texGenVector;
texGenVector.x = dot(u_texGenPlane4i.x == 1 ? v_position4f : tmpVec4, u_texGenS4f);
texGenVector.y = dot(u_texGenPlane4i.y == 1 ? v_position4f : tmpVec4, u_texGenT4f);
texGenVector.z = dot(u_texGenPlane4i.z == 1 ? v_position4f : tmpVec4, u_texGenR4f);
texGenVector.w = dot(u_texGenPlane4i.w == 1 ? v_position4f : tmpVec4, u_texGenQ4f);
texGenVector.xyz = mat4x3(
u_textureMat4f01[0].xyw,
u_textureMat4f01[1].xyw,
u_textureMat4f01[2].xyw,
u_textureMat4f01[3].xyw) * texGenVector;
vec4 texGenPosSrc[2]; color *= texture(u_samplerTexture, texGenVector.xy / texGenVector.z);
texGenPosSrc[0] = vec4(v_objectPosition3f, 1.0);
texGenPosSrc[1] = v_position4f;
texGenVector.x = dot(texGenPosSrc[u_texGenPlane4i.x], u_texGenS4f);
texGenVector.y = dot(texGenPosSrc[u_texGenPlane4i.y], u_texGenT4f);
texGenVector.z = dot(texGenPosSrc[u_texGenPlane4i.z], u_texGenR4f);
texGenVector.w = dot(texGenPosSrc[u_texGenPlane4i.w], u_texGenQ4f);
texGenVector = u_textureMat4f01 * texGenVector;
color *= texture(u_samplerTexture, texGenVector.xy / texGenVector.w);
#ifdef COMPILE_ENABLE_ALPHA_TEST #ifdef COMPILE_ENABLE_ALPHA_TEST
if(color.a < u_alphaTestRef1f) discard; if(color.a < u_alphaTestRef1f) discard;
#endif #endif
#else #else
@ -132,87 +131,87 @@ void main() {
#ifdef COMPILE_ENABLE_TEXTURE2D #ifdef COMPILE_ENABLE_TEXTURE2D
#ifdef COMPILE_TEXTURE_ATTRIB #ifdef COMPILE_TEXTURE_ATTRIB
#ifdef COMPILE_ENABLE_ANISOTROPIC_FIX #ifdef COMPILE_ENABLE_ANISOTROPIC_FIX
// d3d11 doesn't support GL_NEAREST upscaling with anisotropic // d3d11 doesn't support GL_NEAREST upscaling with anisotropic
// filtering enabled, so it needs this stupid fix to 'work' // filtering enabled, so it needs this stupid fix to 'work'
vec2 uv = floor(v_texture2f * u_textureAnisotropicFix) + 0.5; vec2 uv = floor(v_texture2f * u_textureAnisotropicFix) + 0.5;
color *= texture(u_samplerTexture, uv / u_textureAnisotropicFix); color *= texture(u_samplerTexture, uv / u_textureAnisotropicFix);
#else #else
color *= texture(u_samplerTexture, v_texture2f); color *= texture(u_samplerTexture, v_texture2f);
#endif #endif
#else #else
color *= texture(u_samplerTexture, u_textureCoords01); color *= texture(u_samplerTexture, u_textureCoords01);
#endif #endif
#endif #endif
#ifdef COMPILE_NORMAL_ATTRIB #ifdef COMPILE_NORMAL_ATTRIB
vec3 normal = normalize(v_normal3f); vec3 normal = normalize(v_normal3f);
#else #else
vec3 normal = u_uniformNormal3f; vec3 normal = u_uniformNormal3f;
#endif #endif
#ifdef COMPILE_ENABLE_LIGHTMAP #ifdef COMPILE_ENABLE_LIGHTMAP
float diffuse = 0.0; float diffuse = 0.0;
#ifdef COMPILE_LIGHTMAP_ATTRIB #ifdef COMPILE_LIGHTMAP_ATTRIB
float blockLight = v_lightmap2f.x; float blockLight = v_lightmap2f.x;
#else #else
float blockLight = u_textureCoords02.x; float blockLight = u_textureCoords02.x;
#endif #endif
float len; float len;
vec4 light; vec4 light;
if(u_dynamicLightCount1i > 0) { if(u_dynamicLightCount1i > 0) {
vec4 worldPosition4f = u_inverseViewMatrix4f * v_position4f; vec4 worldPosition4f = u_inverseViewMatrix4f * v_position4f;
worldPosition4f.xyz /= worldPosition4f.w; worldPosition4f.xyz /= worldPosition4f.w;
vec3 normalVector3f = normalize(mat3(u_inverseViewMatrix4f) * normal); vec3 normalVector3f = normalize(mat3(u_inverseViewMatrix4f) * normal);
int safeLightCount = u_dynamicLightCount1i > 12 ? 0 : u_dynamicLightCount1i; int safeLightCount = u_dynamicLightCount1i > 12 ? 0 : u_dynamicLightCount1i;
for(int i = 0; i < safeLightCount; ++i) { for(int i = 0; i < safeLightCount; ++i) {
light = u_dynamicLightArray[i]; light = u_dynamicLightArray[i];
light.xyz = light.xyz - worldPosition4f.xyz; light.xyz = light.xyz - worldPosition4f.xyz;
len = length(light.xyz); len = length(light.xyz);
diffuse += max(dot(light.xyz / len, normalVector3f) * 0.8 + 0.2, 0.0) * max(light.w - len, 0.0); diffuse += max(dot(light.xyz / len, normalVector3f) * 0.8 + 0.2, 0.0) * max(light.w - len, 0.0);
} }
blockLight = min(blockLight + diffuse * 0.066667, 1.0); blockLight = min(blockLight + diffuse * 0.066667, 1.0);
} }
#ifdef COMPILE_LIGHTMAP_ATTRIB #ifdef COMPILE_LIGHTMAP_ATTRIB
color *= texture(u_samplerLightmap, vec2(blockLight, v_lightmap2f.y)); color *= texture(u_samplerLightmap, vec2(blockLight, v_lightmap2f.y));
#else #else
color *= texture(u_samplerLightmap, vec2(blockLight, u_textureCoords02.y)); color *= texture(u_samplerLightmap, vec2(blockLight, u_textureCoords02.y));
#endif #endif
#endif #endif
#ifdef COMPILE_BLEND_ADD #ifdef COMPILE_BLEND_ADD
color = color * u_colorBlendSrc4f + u_colorBlendAdd4f; color = color * u_colorBlendSrc4f + u_colorBlendAdd4f;
#endif #endif
#ifdef COMPILE_ENABLE_ALPHA_TEST #ifdef COMPILE_ENABLE_ALPHA_TEST
if(color.a < u_alphaTestRef1f) discard; if(color.a < u_alphaTestRef1f) discard;
#endif #endif
#endif #endif
#ifdef COMPILE_ENABLE_MC_LIGHTING #ifdef COMPILE_ENABLE_MC_LIGHTING
#ifndef COMPILE_ENABLE_LIGHTMAP #ifndef COMPILE_ENABLE_LIGHTMAP
vec4 light; vec4 light;
float diffuse = 0.0; float diffuse = 0.0;
#else #else
diffuse = 0.0; diffuse = 0.0;
#endif #endif
for(int i = 0; i < u_lightsEnabled1i; ++i) { for(int i = 0; i < u_lightsEnabled1i; ++i) {
light = u_lightsDirections4fv[i]; light = u_lightsDirections4fv[i];
diffuse += max(dot(light.xyz, normal), 0.0) * light.w; diffuse += max(dot(light.xyz, normal), 0.0) * light.w;
} }
color.rgb *= min(u_lightsAmbient3f + vec3(diffuse), 1.0); color.rgb *= min(u_lightsAmbient3f + vec3(diffuse), 1.0);
#endif #endif
#ifdef COMPILE_ENABLE_FOG #ifdef COMPILE_ENABLE_FOG
vec3 fogPos = v_position4f.xyz / v_position4f.w; vec3 fogPos = v_position4f.xyz / v_position4f.w;
float dist = sqrt(dot(fogPos, fogPos)); float dist = sqrt(dot(fogPos, fogPos));
float fogDensity = u_fogParameters4f.y; float fogDensity = u_fogParameters4f.y;
float fogStart = u_fogParameters4f.z; float fogStart = u_fogParameters4f.z;
float fogEnd = u_fogParameters4f.w; float fogEnd = u_fogParameters4f.w;
float f = u_fogParameters4f.x > 0.0 ? 1.0 - exp(-fogDensity * dist) : float f = u_fogParameters4f.x > 0.0 ? 1.0 - exp(-fogDensity * dist) :
(dist - fogStart) / (fogEnd - fogStart); (dist - fogStart) / (fogEnd - fogStart);
color.rgb = mix(color.rgb, u_fogColor4f.rgb, clamp(f, 0.0, 1.0) * u_fogColor4f.a); color.rgb = mix(color.rgb, u_fogColor4f.rgb, clamp(f, 0.0, 1.0) * u_fogColor4f.a);
#endif #endif
output4f = color; output4f = color;
} }

View File

@ -0,0 +1,98 @@
#line 2 6969
/*
* Copyright (c) 2024 lax1dude. All Rights Reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifdef EAGLER_HAS_GLES_300
// For GLES 3.00+ (WebGL 2.0)
#ifdef EAGLER_IS_VERTEX_SHADER
// Vertex Shaders:
#define EAGLER_VSH_LAYOUT_BEGIN()
#define EAGLER_VSH_LAYOUT_END()
#define EAGLER_IN(_loc, _type, _name) layout(location = _loc) in _type _name;
#define EAGLER_IN_AUTO(_type, _name) in _type _name;
#define EAGLER_OUT(_type, _name) out _type _name;
#define EAGLER_VERT_POSITION gl_Position
#else
#ifdef EAGLER_IS_FRAGMENT_SHADER
// Fragment Shaders:
#define EAGLER_IN(_type, _name) in _type _name;
#define EAGLER_FRAG_COLOR eagler_FragColor
#define EAGLER_FRAG_DEPTH gl_FragDepth
#define EAGLER_FRAG_OUT() layout(location = 0) out vec4 EAGLER_FRAG_COLOR;
#endif
#endif
// All Shaders:
#define EAGLER_TEXTURE_2D(tex, coord2f) texture(tex, coord2f)
#define EAGLER_TEXTURE_2D_LOD(_tex, _coord2f, _lod1f) textureLod(_tex, _coord2f, _lod1f)
#define EAGLER_HAS_TEXTURE_2D_LOD
#else
#ifdef EAGLER_HAS_GLES_200
// For GLES 2.00 (WebGL 1.0)
#ifdef EAGLER_IS_VERTEX_SHADER
// Vertex Shaders:
#define EAGLER_VSH_LAYOUT_BEGIN()
#define EAGLER_VSH_LAYOUT_END()
#define EAGLER_IN(_loc, _type, _name) attribute _type _name;
#define EAGLER_IN_AUTO(_type, _name) attribute _type _name;
#define EAGLER_OUT(_type, _name) varying _type _name;
#define EAGLER_VERT_POSITION gl_Position
#else
#ifdef EAGLER_IS_FRAGMENT_SHADER
// Fragment Shaders:
#define EAGLER_IN(_type, _name) varying _type _name;
#define EAGLER_FRAG_COLOR gl_FragColor
// TODO: Must require EXT_frag_depth to use this on GLES 2.0 (currently not needed)
#define EAGLER_FRAG_DEPTH gl_FragDepth
#define EAGLER_FRAG_OUT()
#endif
#endif
// All Shaders:
#define EAGLER_TEXTURE_2D(_tex, _coord2f) texture2D(_tex, _coord2f)
#ifdef EAGLER_HAS_GLES_200_SHADER_TEXTURE_LOD
#define EAGLER_TEXTURE_2D_LOD(_tex, _coord2f, _lod1f) texture2DLodEXT(_tex, _coord2f, _lod1f)
#define EAGLER_HAS_TEXTURE_2D_LOD
#else
// Beware!
#define EAGLER_TEXTURE_2D_LOD(_tex, _coord2f, _lod1f) texture2D(_tex, _coord2f)
#define EAGLER_HAS_TEXTURE_2D_LOD
#endif
#else
#error Unable to determine API version! (Missing directive EAGLER_HAS_GLES_200 or 300)
#endif
#endif
#line 1 0

View File

@ -0,0 +1,55 @@
#line 2
/*
* Copyright (c) 2024 lax1dude. All Rights Reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
EAGLER_IN(vec2, v_position2f)
EAGLER_FRAG_OUT()
uniform sampler2D u_inputTexture;
uniform mat4 u_textureMatrix;
vec2 rand(in vec2 co){
float f = dot(co, vec2(12.98984576, 78.23378678));
return fract(vec2(sin(f + 0.32490982), cos(f - 0.69890)) * 43758.54576873);
}
void main() {
vec4 coords4f = vec4(v_position2f.x * 0.25 - 0.125, v_position2f.y * 0.25 - 0.125, v_position2f.y * 10.0 - 9.0, 1.0);
coords4f = u_textureMatrix * coords4f;
coords4f.xy /= coords4f.w;
EAGLER_FRAG_COLOR = EAGLER_TEXTURE_2D(u_inputTexture, coords4f.xy * 0.5 + 0.5);
EAGLER_FRAG_COLOR.rg += rand(v_position2f * 1.2344574345) * 0.05;
EAGLER_FRAG_COLOR.ba -= rand(v_position2f * 1.2343525225) * 0.05;
EAGLER_FRAG_COLOR.a = fract(sin(dot(coords4f.yz, vec2(12.9898, 78.233))) * 43758.5453);
EAGLER_FRAG_COLOR.a += exp(length(rand(coords4f.xw)) * -69.420);
EAGLER_FRAG_COLOR = pow(EAGLER_FRAG_COLOR, vec4(1.0 / 2.423952));
EAGLER_FRAG_COLOR = pow(EAGLER_FRAG_COLOR, vec4(5.4523856));
EAGLER_FRAG_COLOR += 0.00004423 + EAGLER_FRAG_COLOR.a * 0.02;
EAGLER_FRAG_COLOR = sqrt(EAGLER_FRAG_COLOR);
EAGLER_FRAG_COLOR = pow(EAGLER_FRAG_COLOR, vec4(1.0 / 1.9023576));
#ifdef EAGLER_HAS_GLES_300
EAGLER_FRAG_COLOR.ra += tanh(fract(EAGLER_FRAG_COLOR.a * 32.324834)) * 0.1012426;
#endif
EAGLER_FRAG_COLOR.b *= 0.934924;
EAGLER_FRAG_COLOR.b += (1.23213 / inversesqrt(EAGLER_FRAG_COLOR.a)) * 0.156365;
EAGLER_FRAG_COLOR.ga += rand(gl_FragCoord.xy) * 0.13423567;
EAGLER_FRAG_COLOR.rb += gl_PointCoord * 0.0124264565;
#ifdef EAGLER_HAS_GLES_300
EAGLER_FRAG_COLOR *= 0.95234 + asinh(EAGLER_FRAG_COLOR.g * 5.23423) * 0.0254325;
#endif
}

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -16,15 +16,13 @@
* *
*/ */
precision lowp int; EAGLER_VSH_LAYOUT_BEGIN()
precision highp float; EAGLER_IN(0, vec2, a_position2f)
precision lowp sampler2D; EAGLER_VSH_LAYOUT_END()
layout(location = 0) in vec2 a_position2f; EAGLER_OUT(vec2, v_position2f)
out vec2 v_position2f;
void main() { void main() {
v_position2f = a_position2f * 0.5 + 0.5; v_position2f = a_position2f * 0.5 + 0.5;
gl_Position = vec4(a_position2f, 0.0, 1.0); EAGLER_VERT_POSITION = vec4(a_position2f, 0.0, 1.0);
} }

View File

@ -1,11 +1,12 @@
#line 2 #line 2
// Remove this line below if you plan to modify this file // Remove this line below if you plan to modify this file
#ifndef EAGLER_IS_GLES_200
#define USE_OPTIMIZED #define USE_OPTIMIZED
#endif
/* /*
* Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -20,17 +21,15 @@
* *
*/ */
/* /*
* This file was modified by lax1dude to remove dead code * This file was modified by lax1dude to remove dead code
* *
* Original: https://gist.github.com/kosua20/0c506b81b3812ac900048059d2383126 * Original: https://gist.github.com/kosua20/0c506b81b3812ac900048059d2383126
* *
*/ */
/* /*
* ============================================================================ * ============================================================================
* *
* *
* NVIDIA FXAA 3.11 by TIMOTHY LOTTES * NVIDIA FXAA 3.11 by TIMOTHY LOTTES
@ -52,78 +51,77 @@
* *
*/ */
precision lowp int; EAGLER_IN(vec2, v_position2f)
precision mediump float;
precision mediump sampler2D;
EAGLER_FRAG_OUT()
in vec2 v_position2f;
layout(location = 0) out vec4 output4f;
uniform sampler2D u_screenTexture; uniform sampler2D u_screenTexture;
uniform vec2 u_screenSize2f; uniform vec2 u_screenSize2f;
#ifndef USE_OPTIMIZED #ifndef USE_OPTIMIZED
#ifndef FXAA_GREEN_AS_LUMA #ifndef FXAA_GREEN_AS_LUMA
// For those using non-linear color, // For those using non-linear color,
// and either not able to get luma in alpha, or not wanting to, // and either not able to get luma in alpha, or not wanting to,
// this enables FXAA to run using green as a proxy for luma. // this enables FXAA to run using green as a proxy for luma.
// So with this enabled, no need to pack luma in alpha. // So with this enabled, no need to pack luma in alpha.
// //
// This will turn off AA on anything which lacks some amount of green. // This will turn off AA on anything which lacks some amount of green.
// Pure red and blue or combination of only R and B, will get no AA. // Pure red and blue or combination of only R and B, will get no AA.
// //
// Might want to lower the settings for both, // Might want to lower the settings for both,
// fxaaConsoleEdgeThresholdMin // fxaaConsoleEdgeThresholdMin
// fxaaQualityEdgeThresholdMin // fxaaQualityEdgeThresholdMin
// In order to insure AA does not get turned off on colors // In order to insure AA does not get turned off on colors
// which contain a minor amount of green. // which contain a minor amount of green.
// //
// 1 = On. // 1 = On.
// 0 = Off. // 0 = Off.
// //
#define FXAA_GREEN_AS_LUMA 0 #define FXAA_GREEN_AS_LUMA 0
#endif #endif
#ifndef FXAA_DISCARD #ifndef FXAA_DISCARD
// 1 = Use discard on pixels which don't need AA. // 1 = Use discard on pixels which don't need AA.
// 0 = Return unchanged color on pixels which don't need AA. // 0 = Return unchanged color on pixels which don't need AA.
#define FXAA_DISCARD 0 #define FXAA_DISCARD 0
#endif #endif
/*============================================================================ /*============================================================================
API PORTING API PORTING
============================================================================*/ ============================================================================*/
#define FxaaBool bool #define FxaaBool bool
#define FxaaDiscard discard #define FxaaDiscard discard
#define FxaaFloat float #define FxaaFloat float
#define FxaaFloat2 vec2 #define FxaaFloat2 vec2
#define FxaaFloat3 vec3 #define FxaaFloat3 vec3
#define FxaaFloat4 vec4 #define FxaaFloat4 vec4
#define FxaaHalf float #define FxaaHalf float
#define FxaaHalf2 vec2 #define FxaaHalf2 vec2
#define FxaaHalf3 vec3 #define FxaaHalf3 vec3
#define FxaaHalf4 vec4 #define FxaaHalf4 vec4
#define FxaaInt2 ivec2 #define FxaaInt2 ivec2
#define FxaaSat(x) clamp(x, 0.0, 1.0) #define FxaaSat(x) clamp(x, 0.0, 1.0)
#define FxaaTex sampler2D #define FxaaTex sampler2D
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
#define FxaaTexTop(t, p) textureLod(t, p, 0.0) #define FxaaTexTop(t, p) EAGLER_TEXTURE_2D_LOD(t, p, 0.0)
/*============================================================================ /*============================================================================
GREEN AS LUMA OPTION SUPPORT FUNCTION GREEN AS LUMA OPTION SUPPORT FUNCTION
============================================================================*/ ============================================================================*/
#if (FXAA_GREEN_AS_LUMA == 0) #if (FXAA_GREEN_AS_LUMA == 0)
FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return dot(rgba.xyz * rgba.xyz, vec3(0.299, 0.587, 0.114)); } FxaaFloat FxaaLuma(FxaaFloat4 rgba) {
return dot(rgba.xyz * rgba.xyz, vec3(0.299, 0.587, 0.114));
}
#else #else
FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; } FxaaFloat FxaaLuma(FxaaFloat4 rgba) {
return rgba.y;
}
#endif #endif
/*============================================================================ /*============================================================================
FXAA3 CONSOLE - PC VERSION FXAA3 CONSOLE - PC VERSION
============================================================================*/ ============================================================================*/
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
FxaaFloat4 FxaaPixelShader( FxaaFloat4 FxaaPixelShader(
// See FXAA Quality FxaaPixelShader() source for docs on Inputs! // See FXAA Quality FxaaPixelShader() source for docs on Inputs!
@ -209,75 +207,73 @@ FxaaFloat4 FxaaPixelShader(
// will appear very dark in the green channel! // will appear very dark in the green channel!
// Tune by looking at mostly non-green content, // Tune by looking at mostly non-green content,
// then start at zero and increase until aliasing is a problem. // then start at zero and increase until aliasing is a problem.
FxaaFloat fxaaConsoleEdgeThresholdMin FxaaFloat fxaaConsoleEdgeThresholdMin) {
) { /*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
FxaaFloat lumaNw = FxaaLuma(FxaaTexTop(tex, fxaaConsolePosPos.xy)); FxaaFloat lumaNw = FxaaLuma(FxaaTexTop(tex, fxaaConsolePosPos.xy));
FxaaFloat lumaSw = FxaaLuma(FxaaTexTop(tex, fxaaConsolePosPos.xw)); FxaaFloat lumaSw = FxaaLuma(FxaaTexTop(tex, fxaaConsolePosPos.xw));
FxaaFloat lumaNe = FxaaLuma(FxaaTexTop(tex, fxaaConsolePosPos.zy)); FxaaFloat lumaNe = FxaaLuma(FxaaTexTop(tex, fxaaConsolePosPos.zy));
FxaaFloat lumaSe = FxaaLuma(FxaaTexTop(tex, fxaaConsolePosPos.zw)); FxaaFloat lumaSe = FxaaLuma(FxaaTexTop(tex, fxaaConsolePosPos.zw));
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
FxaaFloat4 rgbyM = FxaaTexTop(tex, pos.xy); FxaaFloat4 rgbyM = FxaaTexTop(tex, pos.xy);
#if (FXAA_GREEN_AS_LUMA == 0) #if (FXAA_GREEN_AS_LUMA == 0)
// TODO Luma // TODO Luma
FxaaFloat lumaM = FxaaLuma(rgbyM); FxaaFloat lumaM = FxaaLuma(rgbyM);
#else #else
FxaaFloat lumaM = rgbyM.y; FxaaFloat lumaM = rgbyM.y;
#endif #endif
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
FxaaFloat lumaMaxNwSw = max(lumaNw, lumaSw); FxaaFloat lumaMaxNwSw = max(lumaNw, lumaSw);
lumaNe += 1.0/384.0; lumaNe += 1.0/384.0;
FxaaFloat lumaMinNwSw = min(lumaNw, lumaSw); FxaaFloat lumaMinNwSw = min(lumaNw, lumaSw);
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
FxaaFloat lumaMaxNeSe = max(lumaNe, lumaSe); FxaaFloat lumaMaxNeSe = max(lumaNe, lumaSe);
FxaaFloat lumaMinNeSe = min(lumaNe, lumaSe); FxaaFloat lumaMinNeSe = min(lumaNe, lumaSe);
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
FxaaFloat lumaMax = max(lumaMaxNeSe, lumaMaxNwSw); FxaaFloat lumaMax = max(lumaMaxNeSe, lumaMaxNwSw);
FxaaFloat lumaMin = min(lumaMinNeSe, lumaMinNwSw); FxaaFloat lumaMin = min(lumaMinNeSe, lumaMinNwSw);
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
FxaaFloat lumaMaxScaled = lumaMax * fxaaConsoleEdgeThreshold; FxaaFloat lumaMaxScaled = lumaMax * fxaaConsoleEdgeThreshold;
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
FxaaFloat lumaMinM = min(lumaMin, lumaM); FxaaFloat lumaMinM = min(lumaMin, lumaM);
FxaaFloat lumaMaxScaledClamped = max(fxaaConsoleEdgeThresholdMin, lumaMaxScaled); FxaaFloat lumaMaxScaledClamped = max(fxaaConsoleEdgeThresholdMin, lumaMaxScaled);
FxaaFloat lumaMaxM = max(lumaMax, lumaM); FxaaFloat lumaMaxM = max(lumaMax, lumaM);
FxaaFloat dirSwMinusNe = lumaSw - lumaNe; FxaaFloat dirSwMinusNe = lumaSw - lumaNe;
FxaaFloat lumaMaxSubMinM = lumaMaxM - lumaMinM; FxaaFloat lumaMaxSubMinM = lumaMaxM - lumaMinM;
FxaaFloat dirSeMinusNw = lumaSe - lumaNw; FxaaFloat dirSeMinusNw = lumaSe - lumaNw;
if(lumaMaxSubMinM < lumaMaxScaledClamped) if(lumaMaxSubMinM < lumaMaxScaledClamped) {
{ #if (FXAA_DISCARD == 1)
#if (FXAA_DISCARD == 1)
FxaaDiscard; FxaaDiscard;
#else #else
return rgbyM; return rgbyM;
#endif #endif
} }
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
FxaaFloat2 dir; FxaaFloat2 dir;
dir.x = dirSwMinusNe + dirSeMinusNw; dir.x = dirSwMinusNe + dirSeMinusNw;
dir.y = dirSwMinusNe - dirSeMinusNw; dir.y = dirSwMinusNe - dirSeMinusNw;
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
FxaaFloat2 dir1 = normalize(dir.xy); FxaaFloat2 dir1 = normalize(dir.xy);
FxaaFloat4 rgbyN1 = FxaaTexTop(tex, pos.xy - dir1 * fxaaConsoleRcpFrameOpt.zw); FxaaFloat4 rgbyN1 = FxaaTexTop(tex, pos.xy - dir1 * fxaaConsoleRcpFrameOpt.zw);
FxaaFloat4 rgbyP1 = FxaaTexTop(tex, pos.xy + dir1 * fxaaConsoleRcpFrameOpt.zw); FxaaFloat4 rgbyP1 = FxaaTexTop(tex, pos.xy + dir1 * fxaaConsoleRcpFrameOpt.zw);
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
FxaaFloat dirAbsMinTimesC = min(abs(dir1.x), abs(dir1.y)) * fxaaConsoleEdgeSharpness; FxaaFloat dirAbsMinTimesC = min(abs(dir1.x), abs(dir1.y)) * fxaaConsoleEdgeSharpness;
FxaaFloat2 dir2 = clamp(dir1.xy / dirAbsMinTimesC, -2.0, 2.0); FxaaFloat2 dir2 = clamp(dir1.xy / dirAbsMinTimesC, -2.0, 2.0);
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
FxaaFloat2 dir2x = dir2 * fxaaConsoleRcpFrameOpt2.zw; FxaaFloat2 dir2x = dir2 * fxaaConsoleRcpFrameOpt2.zw;
FxaaFloat4 rgbyN2 = FxaaTexTop(tex, pos.xy - dir2x); FxaaFloat4 rgbyN2 = FxaaTexTop(tex, pos.xy - dir2x);
FxaaFloat4 rgbyP2 = FxaaTexTop(tex, pos.xy + dir2x); FxaaFloat4 rgbyP2 = FxaaTexTop(tex, pos.xy + dir2x);
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
FxaaFloat4 rgbyA = rgbyN1 + rgbyP1; FxaaFloat4 rgbyA = rgbyN1 + rgbyP1;
FxaaFloat4 rgbyB = ((rgbyN2 + rgbyP2) * 0.25) + (rgbyA * 0.25); FxaaFloat4 rgbyB = ((rgbyN2 + rgbyP2) * 0.25) + (rgbyA * 0.25);
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
#if (FXAA_GREEN_AS_LUMA == 0) #if (FXAA_GREEN_AS_LUMA == 0)
// TODO Luma // TODO Luma
float lumaB = FxaaLuma(rgbyB); float lumaB = FxaaLuma(rgbyB);
#else #else
float lumaB = rgbyB.y; float lumaB = rgbyB.y;
#endif #endif
if((lumaB < lumaMin) || (lumaB > lumaMax)) if((lumaB < lumaMin) || (lumaB > lumaMax))
rgbyB.xyz = rgbyA.xyz * 0.5; rgbyB.xyz = rgbyA.xyz * 0.5;
// //
return rgbyB; return rgbyB;
} }
@ -287,18 +283,18 @@ FxaaFloat4 FxaaPixelShader(
#define edgeThreshold 0.15 #define edgeThreshold 0.15
#define edgeThresholdMin 0.05 #define edgeThresholdMin 0.05
void main(){ void main() {
vec2 screenSize05 = 0.5 * u_screenSize2f; vec2 screenSize05 = 0.5 * u_screenSize2f;
vec4 posPos; vec4 posPos;
posPos.xy = v_position2f; posPos.xy = v_position2f;
posPos.zw = v_position2f + u_screenSize2f; posPos.zw = v_position2f + u_screenSize2f;
vec4 rcpFrameOpt; vec4 rcpFrameOpt;
rcpFrameOpt.xy = -screenSize05; rcpFrameOpt.xy = -screenSize05;
rcpFrameOpt.zw = screenSize05; rcpFrameOpt.zw = screenSize05;
output4f = vec4(FxaaPixelShader(v_position2f + screenSize05, posPos, u_screenTexture, rcpFrameOpt, rcpFrameOpt * 4.0, edgeSharpness, edgeThreshold, edgeThresholdMin).rgb, 1.0); EAGLER_FRAG_COLOR = vec4(FxaaPixelShader(v_position2f + screenSize05, posPos, u_screenTexture, rcpFrameOpt, rcpFrameOpt * 4.0, edgeSharpness, edgeThreshold, edgeThresholdMin).rgb, 1.0);
} }
#else #else
@ -306,25 +302,22 @@ void main(){
// Is it faster? Idfk, probably compiles faster at least, what matters it I tried // Is it faster? Idfk, probably compiles faster at least, what matters it I tried
float _616; float _616;
vec4 _617;
void main() void main() {
{
mediump vec2 _257 = u_screenSize2f * 0.5; mediump vec2 _257 = u_screenSize2f * 0.5;
mediump vec4 _611 = vec4(v_position2f, v_position2f + u_screenSize2f); mediump vec4 _611 = vec4(v_position2f, v_position2f + u_screenSize2f);
mediump vec4 _612 = vec4(_616, _616, _257); mediump vec4 _612 = vec4(_616, _616, _257);
mediump vec2 _290 = v_position2f + _257; mediump vec2 _290 = v_position2f + _257;
mediump vec4 _608; mediump vec4 _608;
for(;;) for(;;) {
{ mediump vec3 _532 = EAGLER_TEXTURE_2D_LOD(u_screenTexture, _611.xy, 0.0).xyz;
mediump vec3 _532 = textureLod(u_screenTexture, _611.xy, 0.0).xyz;
mediump float _536 = dot(_532 * _532, vec3(0.2989999949932098388671875, 0.58700001239776611328125, 0.114000000059604644775390625)); mediump float _536 = dot(_532 * _532, vec3(0.2989999949932098388671875, 0.58700001239776611328125, 0.114000000059604644775390625));
mediump vec3 _540 = textureLod(u_screenTexture, _611.xw, 0.0).xyz; mediump vec3 _540 = EAGLER_TEXTURE_2D_LOD(u_screenTexture, _611.xw, 0.0).xyz;
mediump float _544 = dot(_540 * _540, vec3(0.2989999949932098388671875, 0.58700001239776611328125, 0.114000000059604644775390625)); mediump float _544 = dot(_540 * _540, vec3(0.2989999949932098388671875, 0.58700001239776611328125, 0.114000000059604644775390625));
mediump vec3 _548 = textureLod(u_screenTexture, _611.zy, 0.0).xyz; mediump vec3 _548 = EAGLER_TEXTURE_2D_LOD(u_screenTexture, _611.zy, 0.0).xyz;
mediump vec3 _556 = textureLod(u_screenTexture, _611.zw, 0.0).xyz; mediump vec3 _556 = EAGLER_TEXTURE_2D_LOD(u_screenTexture, _611.zw, 0.0).xyz;
mediump float _560 = dot(_556 * _556, vec3(0.2989999949932098388671875, 0.58700001239776611328125, 0.114000000059604644775390625)); mediump float _560 = dot(_556 * _556, vec3(0.2989999949932098388671875, 0.58700001239776611328125, 0.114000000059604644775390625));
mediump vec4 _390 = textureLod(u_screenTexture, _290, 0.0); mediump vec4 _390 = EAGLER_TEXTURE_2D_LOD(u_screenTexture, _290, 0.0);
mediump vec3 _564 = _390.xyz; mediump vec3 _564 = _390.xyz;
mediump float _568 = dot(_564 * _564, vec3(0.2989999949932098388671875, 0.58700001239776611328125, 0.114000000059604644775390625)); mediump float _568 = dot(_564 * _564, vec3(0.2989999949932098388671875, 0.58700001239776611328125, 0.114000000059604644775390625));
mediump float _397 = dot(_548 * _548, vec3(0.2989999949932098388671875, 0.58700001239776611328125, 0.114000000059604644775390625)) + 0.00260416674427688121795654296875; mediump float _397 = dot(_548 * _548, vec3(0.2989999949932098388671875, 0.58700001239776611328125, 0.114000000059604644775390625)) + 0.00260416674427688121795654296875;
@ -332,8 +325,7 @@ void main()
mediump float _412 = min(min(_397, _560), min(_536, _544)); mediump float _412 = min(min(_397, _560), min(_536, _544));
mediump float _427 = _544 - _397; mediump float _427 = _544 - _397;
mediump float _433 = _560 - _536; mediump float _433 = _560 - _536;
if ((max(_409, _568) - min(_412, _568)) < max(0.0500000007450580596923828125, _409 * 0.1500000059604644775390625)) if ((max(_409, _568) - min(_412, _568)) < max(0.0500000007450580596923828125, _409 * 0.1500000059604644775390625)) {
{
_608 = _390; _608 = _390;
break; break;
} }
@ -347,12 +339,11 @@ void main()
mediump vec2 _484 = (_612 * 4.0).zw; mediump vec2 _484 = (_612 * 4.0).zw;
vec2 _615 = -hp_copy_481; vec2 _615 = -hp_copy_481;
mediump vec2 mp_copy_615 = _615; mediump vec2 mp_copy_615 = _615;
mediump vec4 _498 = textureLod(u_screenTexture, mp_copy_614 * _454 + _290, 0.0) + textureLod(u_screenTexture, _449 * _454 + _290, 0.0); mediump vec4 _498 = EAGLER_TEXTURE_2D_LOD(u_screenTexture, mp_copy_614 * _454 + _290, 0.0) + EAGLER_TEXTURE_2D_LOD(u_screenTexture, _449 * _454 + _290, 0.0);
mediump vec4 _505 = ((textureLod(u_screenTexture, mp_copy_615 * _484 + _290, 0.0) + textureLod(u_screenTexture, _481 * _484 + _290, 0.0)) * 0.25) + (_498 * 0.25); mediump vec4 _505 = ((EAGLER_TEXTURE_2D_LOD(u_screenTexture, mp_copy_615 * _484 + _290, 0.0) + EAGLER_TEXTURE_2D_LOD(u_screenTexture, _481 * _484 + _290, 0.0)) * 0.25) + (_498 * 0.25);
mediump float _576 = dot(_505.xyz * _505.xyz, vec3(0.2989999949932098388671875, 0.58700001239776611328125, 0.114000000059604644775390625)); mediump float _576 = dot(_505.xyz * _505.xyz, vec3(0.2989999949932098388671875, 0.58700001239776611328125, 0.114000000059604644775390625));
mediump vec4 _607; mediump vec4 _607;
if ((_576 < _412) || (_576 > _409)) if ((_576 < _412) || (_576 > _409)) {
{
mediump vec3 _518 = _498.xyz * 0.5; mediump vec3 _518 = _498.xyz * 0.5;
mediump vec4 _600; mediump vec4 _600;
_600.x = _518.x; _600.x = _518.x;
@ -360,14 +351,13 @@ void main()
_600.z = _518.z; _600.z = _518.z;
_607 = _600; _607 = _600;
} }
else else {
{
_607 = _505; _607 = _505;
} }
_608 = _607; _608 = _607;
break; break;
} }
output4f = vec4(_608.xyz, 1.0); EAGLER_FRAG_COLOR = vec4(_608.xyz, 1.0);
} }
#endif #endif

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2023 lax1dude. All Rights Reserved. * Copyright (c) 2023-2024 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -16,14 +16,10 @@
* *
*/ */
precision lowp int; EAGLER_IN(vec2, v_texCoords2f)
precision highp float;
precision highp sampler2D;
in vec2 v_texCoords2f;
#ifndef COMPILE_BLIT_DEPTH #ifndef COMPILE_BLIT_DEPTH
layout(location = 0) out vec4 output4f; EAGLER_FRAG_OUT()
#endif #endif
uniform sampler2D u_inputTexture; uniform sampler2D u_inputTexture;
@ -35,13 +31,13 @@ uniform vec2 u_pixelAlignmentOffset2f;
#endif #endif
void main() { void main() {
vec2 uv2f = v_texCoords2f; vec2 uv2f = v_texCoords2f;
#ifdef COMPILE_PIXEL_ALIGNMENT #ifdef COMPILE_PIXEL_ALIGNMENT
uv2f = (floor(uv2f * u_pixelAlignmentSizes4f.xy) + u_pixelAlignmentOffset2f) * u_pixelAlignmentSizes4f.zw; uv2f = (floor(uv2f * u_pixelAlignmentSizes4f.xy) + u_pixelAlignmentOffset2f) * u_pixelAlignmentSizes4f.zw;
#endif #endif
#ifndef COMPILE_BLIT_DEPTH #ifndef COMPILE_BLIT_DEPTH
output4f = textureLod(u_inputTexture, uv2f, u_textureLod1f); EAGLER_FRAG_COLOR = EAGLER_TEXTURE_2D_LOD(u_inputTexture, uv2f, u_textureLod1f);
#else #else
gl_FragDepth = textureLod(u_inputTexture, uv2f, u_textureLod1f).r; EAGLER_FRAG_DEPTH = EAGLER_TEXTURE_2D_LOD(u_inputTexture, uv2f, u_textureLod1f).r;
#endif #endif
} }

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2023 lax1dude. All Rights Reserved. * Copyright (c) 2023-2024 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -16,19 +16,17 @@
* *
*/ */
precision lowp int; EAGLER_VSH_LAYOUT_BEGIN()
precision lowp float; EAGLER_IN(0, vec2, a_position2f)
precision lowp sampler2D; EAGLER_VSH_LAYOUT_END()
layout(location = 0) in vec2 a_position2f; EAGLER_OUT(vec2, v_texCoords2f)
out vec2 v_texCoords2f;
uniform vec4 u_srcCoords4f; uniform vec4 u_srcCoords4f;
uniform vec4 u_dstCoords4f; uniform vec4 u_dstCoords4f;
void main() { void main() {
vec2 uv = a_position2f * 0.5 + 0.5; vec2 uv = a_position2f * 0.5 + 0.5;
v_texCoords2f = u_srcCoords4f.xy + u_srcCoords4f.zw * uv; v_texCoords2f = u_srcCoords4f.xy + u_srcCoords4f.zw * uv;
gl_Position = vec4(u_dstCoords4f.xy + u_dstCoords4f.zw * uv, 0.0, 1.0); EAGLER_VERT_POSITION = vec4(u_dstCoords4f.xy + u_dstCoords4f.zw * uv, 0.0, 1.0);
} }

View File

@ -1,7 +1,7 @@
#line 2 #line 2
/* /*
* Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -16,13 +16,9 @@
* *
*/ */
precision lowp int; EAGLER_IN(vec2, v_position2f)
precision highp float;
precision highp sampler2D;
in vec2 v_position2f; EAGLER_FRAG_OUT()
layout(location = 0) out vec4 output4f;
uniform sampler2D u_inputTexture; uniform sampler2D u_inputTexture;
uniform float u_textureLod1f; uniform float u_textureLod1f;
@ -31,7 +27,7 @@ uniform vec4 u_blendBias4f;
uniform mat3 u_matrixTransform; uniform mat3 u_matrixTransform;
void main() { void main() {
vec3 coords = u_matrixTransform * vec3(v_position2f, 1.0); vec3 coords = u_matrixTransform * vec3(v_position2f, 1.0);
vec4 color4f = textureLod(u_inputTexture, coords.xy, u_textureLod1f); vec4 color4f = EAGLER_TEXTURE_2D_LOD(u_inputTexture, coords.xy, u_textureLod1f);
output4f = color4f * u_blendFactor4f + u_blendBias4f; EAGLER_FRAG_COLOR = color4f * u_blendFactor4f + u_blendBias4f;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -15,11 +15,6 @@ gui.no=No
gui.none=None gui.none=None
gui.all=All gui.all=All
eaglercraft.recording.unsupported=Recording Unsupported!
eaglercraft.recording.stop=Stop Recording
eaglercraft.recording.start=Record Screen...
eaglercraft.soundCategory.voice=Recording Voice
eaglercraft.resourcePack.prompt.title=What do you want to do with '%s'? eaglercraft.resourcePack.prompt.title=What do you want to do with '%s'?
eaglercraft.resourcePack.prompt.text=Tip: Hold Shift to skip this screen when selecting a resource pack! eaglercraft.resourcePack.prompt.text=Tip: Hold Shift to skip this screen when selecting a resource pack!
eaglercraft.resourcePack.prompt.delete=Delete this resource pack eaglercraft.resourcePack.prompt.delete=Delete this resource pack
@ -246,6 +241,7 @@ eaglercraft.shaders.gui.option.POST_FXAA.desc.5=OFF: disable fxaa (faster)
eaglercraft.shaders.gui.unsupported.title=Shaders are unavailable on this device! eaglercraft.shaders.gui.unsupported.title=Shaders are unavailable on this device!
eaglercraft.shaders.gui.unsupported.reason.hdrFramebuffer=Reason: No HDR render target support eaglercraft.shaders.gui.unsupported.reason.hdrFramebuffer=Reason: No HDR render target support
eaglercraft.shaders.gui.unsupported.reason.oldOpenGLVersion=Reason: OpenGL ES 3.0 (WebGL 2.0) is not supported!
eaglercraft.shaders.debugMenuTip=Press %s+4 to access the shader debug menu eaglercraft.shaders.debugMenuTip=Press %s+4 to access the shader debug menu
@ -253,7 +249,7 @@ eaglercraft.command.skull.tip=Use /eagskull to create custom skulls
eaglercraft.command.skull.usage=/eagskull eaglercraft.command.skull.usage=/eagskull
eaglercraft.command.skull.nopermission=Cheats are not enabled! eaglercraft.command.skull.nopermission=Cheats are not enabled!
eaglercraft.command.skull.feedback=Created new skull: "%s" eaglercraft.command.skull.feedback=Created new skull: "%s"
eaglercraft.command.skull.error.invalid.png=Invalid PNG file! eaglercraft.command.skull.error.invalid.format=Invalid or unsupported image file!
eaglercraft.command.skull.error.invalid.skin=Image with size %dx%d is not a valid minecraft skin! eaglercraft.command.skull.error.invalid.skin=Image with size %dx%d is not a valid minecraft skin!
eaglercraft.command.clientStub=This command is client side! eaglercraft.command.clientStub=This command is client side!
@ -428,13 +424,14 @@ eaglercraft.singleplayer.busy.confirmCancel=Confirm Cancel
eaglercraft.singleplayer.crashed.title=Recieved a crash report from integrated server! eaglercraft.singleplayer.crashed.title=Recieved a crash report from integrated server!
eaglercraft.singleplayer.crashed.checkConsole=Check the console for more details eaglercraft.singleplayer.crashed.checkConsole=Check the console for more details
eaglercraft.singleplayer.crashed.continue=Continue eaglercraft.singleplayer.crashed.continue=Continue
eaglercraft.singleplayer.crashed.singleThreadCont=Single Thread Mode
eaglercraft.singleplayer.failed.title=Singleplayer Task Failed! eaglercraft.singleplayer.failed.title=Singleplayer Task Failed!
eaglercraft.singleplayer.failed.killed=The worker process was killed eaglercraft.singleplayer.failed.killed=The worker process was killed
eaglercraft.singleplayer.failed.notStarted=The worker process could not start eaglercraft.singleplayer.failed.notStarted=The worker process could not start
eaglercraft.singleplayer.failed.singleThreadWarning.1=Worker Thread Startup Failure! eaglercraft.singleplayer.failed.singleThreadWarning.1=Worker Thread Issue Detected
eaglercraft.singleplayer.failed.singleThreadWarning.2=The integrated server will run in single-threaded mode eaglercraft.singleplayer.failed.singleThreadWarning.2=The integrated server is running in single-threaded mode
eaglercraft.singleplayer.busy.listingworlds=Loading worlds eaglercraft.singleplayer.busy.listingworlds=Loading worlds
eaglercraft.singleplayer.failed.listingworlds=Could not fetch worlds list! eaglercraft.singleplayer.failed.listingworlds=Could not fetch worlds list!
@ -508,11 +505,21 @@ eaglercraft.singleplayer.backup.clearPlayerData.tooltip=Clears the inventories o
eaglercraft.singleplayer.backup.clearPlayerData.warning1=Are you sure you want to delete all player data? eaglercraft.singleplayer.backup.clearPlayerData.warning1=Are you sure you want to delete all player data?
eaglercraft.singleplayer.backup.clearPlayerData.warning2=All players in '%s' will lose their inventories (besides %s) eaglercraft.singleplayer.backup.clearPlayerData.warning2=All players in '%s' will lose their inventories (besides %s)
eaglercraft.singleplayer.ramdiskdetected.title=Worker Issues Detected
eaglercraft.singleplayer.ramdiskdetected.text0=Running in "RAMDisk mode", worlds cannot be saved!
eaglercraft.singleplayer.ramdiskdetected.text1=Single thread mode may solve this issue
eaglercraft.singleplayer.ramdiskdetected.continue=Continue
eaglercraft.singleplayer.ramdiskdetected.singleThreadCont=Single Thread Mode
eaglercraft.selectWorld.backup=Backup eaglercraft.selectWorld.backup=Backup
eaglercraft.selectWorld.duplicate=Duplicate World: eaglercraft.selectWorld.duplicate=Duplicate World:
eaglercraft.selectWorld.duplicateButton=Duplicate eaglercraft.selectWorld.duplicateButton=Duplicate
eaglercraft.selectWorld.ramdiskWarning=WARNING: Running in "RAMDisk mode", worlds will NOT be saved to local storage!
eaglercraft.singleplayer.tpscounter.singleThreadMode=Single Thread Mode
eaglercraft.networkSettings.title=Shared World Relay Servers eaglercraft.networkSettings.title=Shared World Relay Servers
eaglercraft.networkSettings.add=Add Relay eaglercraft.networkSettings.add=Add Relay
eaglercraft.networkSettings.delete=Delete Relay eaglercraft.networkSettings.delete=Delete Relay
@ -613,6 +620,27 @@ eaglercraft.updateList.refresh=Refresh
eaglercraft.updateList.note.0=Note: Updates are digitally signed, EaglercraftL will block any eaglercraft.updateList.note.0=Note: Updates are digitally signed, EaglercraftL will block any
eaglercraft.updateList.note.1=updates that were not created by HoosierTransfer eaglercraft.updateList.note.1=updates that were not created by HoosierTransfer
eaglercraft.updateSuccess.title=Update Successful
eaglercraft.updateSuccess.installToBootMenu=Install to Boot Menu
eaglercraft.updateSuccess.downloadOffline=Download Offline
eaglercraft.updateSuccess.downloading=Downloading Offline...
eaglercraft.updateSuccess.installing=Installing Client...
eaglercraft.updateFailed.title=Update Failed
eaglercraft.installFailed.title=Installation Failed
eaglercraft.updateInstall.title=Install to Boot Menu
eaglercraft.updateInstall.setDefault=Make Default
eaglercraft.updateInstall.setCountdown=Enable Countdown
eaglercraft.updateInstall.install=Install
eaglercraft.options.pressDeleteText=Press DEL to enter boot menu
eaglercraft.enterBootMenu.title=Enter Boot Menu
eaglercraft.enterBootMenu.text0=Refresh the page to enter the boot menu
eaglercraft.voice.title=Voice Channel eaglercraft.voice.title=Voice Channel
eaglercraft.voice.titleNoVoice=Voice is disabled on this server eaglercraft.voice.titleNoVoice=Voice is disabled on this server
eaglercraft.voice.titleVoiceUnavailable=Voice is unavailable eaglercraft.voice.titleVoiceUnavailable=Voice is unavailable
@ -643,14 +671,15 @@ eaglercraft.voice.volumeSpeakerLabel=Speakers:
eaglercraft.voice.volumeMicrophoneLabel=Microphone: eaglercraft.voice.volumeMicrophoneLabel=Microphone:
eaglercraft.voice.unsupportedWarning1=Voice Warning eaglercraft.voice.unsupportedWarning1=Voice Warning
eaglercraft.voice.unsupportedWarning2=Your network's firewall may not support eaglercraft.voice.unsupportedWarning2=Your network configuration may not support
eaglercraft.voice.unsupportedWarning3=eaglercraft's voice chat. eaglercraft.voice.unsupportedWarning3=eaglercraft's voice chat.
eaglercraft.voice.unsupportedWarning4=If your game doesn't work it's your issue eaglercraft.voice.unsupportedWarning4=Voice chat is based on WebRTC and is
eaglercraft.voice.unsupportedWarning5=to solve, not ayunami2000's or lax1dude's. eaglercraft.voice.unsupportedWarning5=normally meant to be peer-to-peer, if your
eaglercraft.voice.unsupportedWarning6=Don't ask them to 'fix' it for you because eaglercraft.voice.unsupportedWarning6=firewall blocks peer-to-peer connections
eaglercraft.voice.unsupportedWarning7=they won't help you fix a problem that only eaglercraft.voice.unsupportedWarning7=a TURN server will be required.
eaglercraft.voice.unsupportedWarning8=you or your network's administrator has the eaglercraft.voice.unsupportedWarning8=The default OpenRelayProject TURN servers
eaglercraft.voice.unsupportedWarning9=ability to correctly resolve. eaglercraft.voice.unsupportedWarning9=are no longer working in 2024!
eaglercraft.voice.unsupportedWarning10=Continue eaglercraft.voice.unsupportedWarning10=Continue
eaglercraft.voice.unsupportedWarning11=Cancel eaglercraft.voice.unsupportedWarning11=Cancel
@ -660,12 +689,115 @@ eaglercraft.voice.ipGrabWarning3=IP address to be logged by other players
eaglercraft.voice.ipGrabWarning4=also using voice on the server. eaglercraft.voice.ipGrabWarning4=also using voice on the server.
eaglercraft.voice.ipGrabWarning5=This issue will not be fixed, it is an eaglercraft.voice.ipGrabWarning5=This issue will not be fixed, it is an
eaglercraft.voice.ipGrabWarning6=internal browser issue, not a mistake in the eaglercraft.voice.ipGrabWarning6=internal browser issue, not a mistake in the
eaglercraft.voice.ipGrabWarning7=game. Fortunately, this can only be done if eaglercraft.voice.ipGrabWarning7=game. Sorry about that.
eaglercraft.voice.ipGrabWarning8=the other player uses a hacked web browser
eaglercraft.voice.ipGrabWarning9=or has Wireshark to capture the voice eaglercraft.revokeSessionToken.button=Revoke Session Token
eaglercraft.voice.ipGrabWarning10=packets, as there exists no real javascript eaglercraft.revokeSessionToken.title=Select session to revoke:
eaglercraft.voice.ipGrabWarning11=method to log IPs using a normal skidded eaglercraft.revokeSessionToken.inspect=Inspect
eaglercraft.voice.ipGrabWarning12=eaglercraft hacked client. eaglercraft.revokeSessionToken.revoke=Revoke
eaglercraft.revokeSessionToken.note.0=Use this tool when you believe someone has stolen your cookies
eaglercraft.revokeSessionToken.note.1=Eagler will request the server invalidate all session tokens
eaglercraft.inspectSessionToken.title=Cookie Details
eaglercraft.inspectSessionToken.details.server=Server Address:
eaglercraft.inspectSessionToken.details.expires=Expires At:
eaglercraft.inspectSessionToken.details.length=Byte Length:
eaglercraft.errorNoSessions.title=No Sessions Active!
eaglercraft.errorNoSessions.desc=There are no revokable sessions
eaglercraft.revokeSendingScreen.title=Revoking Session
eaglercraft.revokeSendingScreen.message.opening=Connecting to %s...
eaglercraft.revokeSendingScreen.message.sending=Sending Request...
eaglercraft.revokeSuccess.title=Revoke Success
eaglercraft.revokeSuccess.desc=The session was revoked sucessfully!
eaglercraft.revokeFailure.title=Revoke Failed
eaglercraft.revokeFailure.desc.notSupported=The server does not support this feature!
eaglercraft.revokeFailure.desc.notAllowed=The server does not allow revoking this token!
eaglercraft.revokeFailure.desc.notFound=The session was not found on the server!
eaglercraft.revokeFailure.desc.serverError=Internal server error!
eaglercraft.revokeFailure.desc.clientError=Error handling server's response!
eaglercraft.revokeFailure.desc.genericCode=Error code received! (Check Console)
eaglercraft.revokeFailure.desc.connectionError=Failed to connect to the server!
eaglercraft.revokeFailure.desc.cancelled=Connection closed
eaglercraft.recieveServerInfo.title=Retrieving Server Info
eaglercraft.recieveServerInfo.checkingCache=Checking Cache
eaglercraft.recieveServerInfo.contactingServer=Contacting Server
eaglercraft.recieveServerInfo.recievingData=Recieving Data
eaglercraft.recieveServerInfo.decompressing=Decompressing + Verifying
eaglercraft.serverInfoFailure.title=Retrieval Failed
eaglercraft.serverInfoFailure.desc=Failed to retrieve server info!
eaglercraft.webviewNotSupported.title=WebView Error
eaglercraft.webviewNotSupported.desc=WebView is not supported on this platform!
eaglercraft.webviewInvalidURL.title=WebView Error
eaglercraft.webviewInvalidURL.desc=Server provided an invalid URL!
eaglercraft.fallbackWebViewScreen.text0=View in your browser at:
eaglercraft.fallbackWebViewScreen.startingUp=Starting Up...
eaglercraft.fallbackWebViewScreen.pleaseWait=Please Wait...
eaglercraft.fallbackWebViewScreen.exited=(exited)
eaglercraft.fallbackWebViewScreen.openButton=Open
eaglercraft.fallbackWebViewScreen.exitButton=Exit
eaglercraft.webviewPhishingWaring.title=WARNING!!!
eaglercraft.webviewPhishingWaring.text0=If you see a login page, think before you enter a password
eaglercraft.webviewPhishingWaring.text1=Passwords can be stolen by the owner of this server or website
eaglercraft.webviewPhishingWaring.text2=Do not log in to accounts you don't want hackers to steal
eaglercraft.webviewPhishingWaring.dontShowAgain=Do not show this message again
eaglercraft.webviewPhishingWaring.continue=Continue
eaglercraft.notifications.title=Notifications
eaglercraft.notifications.priority=Priority: %s
eaglercraft.notifications.priority.low=All
eaglercraft.notifications.priority.normal=Info
eaglercraft.notifications.priority.higher=Warning
eaglercraft.notifications.priority.highest=Severe
eaglercraft.notifications.clearAll=Clear All
eaglercraft.options.touchControlOpacity=Touch Ctrls Opacity
eaglercraft.options.profanityFilterButton=Profanity Filter
eaglercraft.profanityFilterWarning.title=Content Warning
eaglercraft.profanityFilterWarning.text0=If you are streaming this game on Twitch, or
eaglercraft.profanityFilterWarning.text1=are under the wise old age of 14, please enable
eaglercraft.profanityFilterWarning.text2=the profanity filter before playing Multiplayer
eaglercraft.profanityFilterWarning.text4=(Disable in the 'Options' -> 'Chat Settings' menu)
eaglercraft.options.screenRecording.unsupported=Recording Unsupported!
eaglercraft.options.screenRecording.button=Record Screen...
eaglercraft.options.screenRecording.title=Screen Recording
eaglercraft.options.screenRecording.codec=Output Format: %s
eaglercraft.options.screenRecording.codecButton=Change...
eaglercraft.options.screenRecording.start=Start Recording
eaglercraft.options.screenRecording.stop=Stop Recording
eaglercraft.options.screenRecording.status=Status: %s
eaglercraft.options.screenRecording.status.0=Not Recording
eaglercraft.options.screenRecording.status.1=Recording!
eaglercraft.options.screenRecording.audioBitrate=Audio Bitrate
eaglercraft.options.screenRecording.videoBitrate=Video Bitrate
eaglercraft.options.screenRecording.videoResolution=Video Resolution
eaglercraft.options.screenRecording.microphoneVolume=Microphone Volume
eaglercraft.options.screenRecording.gameVolume=Game Volume
eaglercraft.options.screenRecording.videoFPS=Video Frame Rate
eaglercraft.options.screenRecording.onVSync=VSync
eaglercraft.options.screenRecording.failed=Failed to begin recording!
eaglercraft.options.recordingCodec.title=Select Codec
eaglercraft.options.recordingCodec.showAdvancedCodecs=Show Advanced: %s
eaglercraft.options.recordingNote.title=Recording Note
eaglercraft.options.recordingNote.text0=If the recorded video does not play,
eaglercraft.options.recordingNote.text1=try opening the file in your browser
eaglercraft.touch.interact.entity=Interact
selectServer.title=Select Server selectServer.title=Select Server
selectServer.empty=empty selectServer.empty=empty
@ -685,10 +817,14 @@ addServer.enterName=Server Name
addServer.enterIp=Server Address addServer.enterIp=Server Address
addServer.add=Done addServer.add=Done
addServer.hideAddress=Hide Address addServer.hideAddress=Hide Address
eaglercraft.addServer.hideAddr=Hide Addr
addServer.resourcePack=Server Resource Packs addServer.resourcePack=Server Resource Packs
addServer.resourcePack.enabled=Enabled addServer.resourcePack.enabled=Enabled
addServer.resourcePack.disabled=Disabled addServer.resourcePack.disabled=Disabled
addServer.resourcePack.prompt=Prompt addServer.resourcePack.prompt=Prompt
eaglercraft.addServer.enableCookies=Cookies
eaglercraft.addServer.enableCookies.enabled=Enabled
eaglercraft.addServer.enableCookies.disabled=Disabled
lanServer.title=Shared World lanServer.title=Shared World
lanServer.scanning=Scanning for games on your local network lanServer.scanning=Scanning for games on your local network
lanServer.start=Start Shared World lanServer.start=Start Shared World

View File

@ -0,0 +1,740 @@
1488
a55hole
ahole
ainujin
ainuzin
akimekura
anal
anus
anuses
anushead
anuslick
anuss
aokan
arsch
arschloch
arse
arsed
arsehole
arseholed
arseholes
arseholing
arselicker
arses
ass
asshat
asshole
assholed
assholes
assholing
asslick
asslicker
asses
auschwitz
b00bs
b00bz
b1tc
baise
bakachon
bakatyon
ballsack
ballzack
bamf
beaner
beeatch
beeeyotch
beefwhistle
beeotch
beetch
beeyotch
bellend
bestiality
beyitch
beyotch
biach
biotch
bitch
bitches
bitching
blad
bladt
blowjob
blow job
blowme
blow me
blyad
blyadt
bon3r
boner
boobs
boobz
btch
bukakke
bullshit
bung
butagorosi
butthead
butthole
buttplug
c0ck
cabron
cacca
cadela
cagada
cameljockey
caralho
castrate
cazzo
ceemen
ch1nk
chankoro
chieokure
chikusatsu
ching chong
chinga
chingada madre
chingado
chingate
chink
chinpo
chlamydia
choad
chode
chonga
chonko
chonkoro
chourimbo
chourinbo
chourippo
chuurembo
chuurenbo
circlejerk
cl1t
cli7
clit
clitoris
cocain
cocaine
cock
cocksucker
coglione
coglioni
coitus
coituss
cojelon
cojones
condom
coon
coon hunt
coon kill
coonhunt
coonkill
cooter
cotton pic
cotton pik
cottonpic
cottonpik
culear
culero
culo
cum
cumming
cun7
cunt
cvn7
cvnt
cyka
d1kc
d4go
dago
darkie
dickhead
dick
dicks
dikc
dildo
dio bestia
dumass
dumbass
durka durka
dyke
ejaculate
encule
enjokousai
enzyokousai
etahinin
etambo
etanbo
f0ck
f0kc
f3lch
facking
fag
faggot
fags
faggots
fanculo
fatass
fcuk
fcuuk
felch
fellatio
fetish
fickdich
figlio di puttana
fku
fock
fokc
foreskin
fotze
foutre
fucc
fuck
fucks
fuckd
fucked
fucker
fuckers
fucking
fuckr
fuct
fujinoyamai
fukashokumin
fupa
fuuck
fuuckd
fuucked
fuucker
fuucking
fuuckr
fuuuck
fuuuckd
fuuucked
fuuucker
fuuucking
fuuuckr
fuuuuck
fuuuuckd
fuuuucked
fuuuucker
fuuuucking
fuuuuckr
fuuuuuck
fuuuuuckd
fuuuuucked
fuuuuucker
fuuuuucking
fuuuuuckr
fuuuuuuck
fuuuuuuckd
fuuuuuucked
fuuuuuucker
fuuuuuucking
fuuuuuuckr
fuuuuuuuck
fuuuuuuuckd
fuuuuuuucked
fuuuuuuucker
fuuuuuuucking
fuuuuuuuckr
fuuuuuuuuck
fuuuuuuuuckd
fuuuuuuuucked
fuuuuuuuucker
fuuuuuuuucking
fuuuuuuuuckr
fuuuuuuuuuck
fuuuuuuuuuckd
fuuuuuuuuucked
fuuuuuuuuucker
fuuuuuuuuucking
fuuuuuuuuuckr
fuuuuuuuuuu
fvck
fxck
fxuxcxk
g000k
g00k
g0ok
gestapo
go0k
god damn
goddamn
goldenshowers
golliwogg
gollywog
gooch
gook
goook
gyp
h0m0
h0mo
h1tl3
h1tle
hairpie
hakujakusha
hakuroubyo
hakuzyakusya
hantoujin
hantouzin
herpes
hitl3r
hitler
hitlr
holocaust
hom0
homo
honky
hooker
hor3
hore
hukasyokumin
hure
hurensohn
huzinoyamai
hymen
inc3st
incest
inculato
injun
intercourse
inugoroshi
inugorosi
j1g4b0
j1g4bo
j1gab0
j1gabo
jack off
jackass
jap
jerkoff
jig4b0
jig4bo
jigabo
jigaboo
jiggaboo
jizz
joder
joto
jungle bunny
junglebunny
k k k
k1k3
kichigai
kik3
kike
kikeiji
kikeizi
kilurself
kitigai
kkk
klu klux
klu klux klan
kluklux
knobhead
koon hunt
koon kill
koonhunt
koonkill
koroshiteyaru
koumoujin
koumouzin
ku klux klan
kun7
kurombo
kurva
kurwa
kxkxk
l3sb0
lesbo
lezbo
lezzie
m07th3rfukr
m0th3rfvk3r
m0th3rfvker
madonna puttana
manberries
manko
manshaft
maricon
masterbat
masterbate
masturbacion
masturbait
masturbare
masturbate
masturbazione
merda
merde
meth
mierda
milf
minge
miststück
mitsukuchi
mitukuti
molest
molester
molestor
mong
moon cricket
moth3rfucer
moth3rfvk3r
moth3rfvker
motherfucker
mulatto
n1663r
n1664
n166a
n166er
n1g3r
n1german
n1gg3r
n1ggerman
n3gro
n4g3r
n4gg3r
n4ggerman
n4z1
nag3r
nagg3r
naggerman
natzi
naz1
nazi
nazl
negerman
nggerman
nggr
nhiggerman
ni666
ni66a
ni66er
ni66g
ni6g
ni6g6
ni6gg
nig
nig66
nig6g
nigar
nigerman
nigg3
nigg6
nigga
niggaz
niggerman
nigger
nigglet
niggr
nigguh
niggur
niggy
niglet
nignog
nimpinin
ninpinin
nipples
niqqa
niqqer
nonce
nugga
nutsack
nutted
nyggerman
omeko
orgy
p3n15
p3n1s
p3ni5
p3nis
p3nl5
p3nls
paki
panties
pedo
pedoph
pedophile
pen15
pen1s
pendejo
peni5
penile
penis
penis
penl5
penls
penus
perra
phag
phaggot
phagot
phuck
pikey
pinche
pizda
polla
porca madonna
porch monkey
porn
pornhub
porra
pu555y
pu55y
pub1c
pube
pubic
pun4ni
pun4nl
punal
punan1
punani
punanl
puss1
puss3
puss5
pusse
pussi
pussy
pussys
pussies
pusss1
pussse
pusssi
pusssl
pusssy
pussy
puta
putain
pute
puto
puttana
puttane
puttaniere
puzzy
pvssy
queef
r3c7um
r4p15t
r4p1st
r4p3
r4pi5t
r4pist
raape
raghead
raibyo
raip
rap15t
rap1st
rapage
rape
raped
rapi5t
raping
rapist
red tube
reggin
reipu
retard
ricchione
rimjob
rimming
rizzape
rompari
salaud
salope
sangokujin
sangokuzin
santorum
scheiße
schlampe
schlampe
schlong
schwuchtel
scrote
secks
seishinhakujaku
seishinijo
seisinhakuzyaku
seisinizyo
semen
semushiotoko
semusiotoko
sh|t
sh|thead
sh|tstain
sh17
sh17head
sh17stain
sh1t
sh1thead
sh1tstain
shat
shemale
shi7
shi7head
shi7stain
shinajin
shinheimin
shirakko
shit
shithead
shitstain
shitting
shitty
shokubutsuningen
sinazin
sinheimin
skank
slut
smd
sodom
sofa king
sofaking
spanishick
spanishook
spanishunk
succhia cazzi
syokubutuningen
taint
tapatte
tapette
tarlouse
tea bag
teabag
teebag
teensex
teino
testa di cazzo
testicles
thot
tieokure
tinpo
tits
titz
titties
tittiez
tokushugakkyu
tokusyugakkyu
torukoburo
torukojo
torukozyo
tosatsu
tosatu
towelhead
trannie
tranny
tunbo
tw47
tw4t
twat
tyankoro
tyonga
tyonko
tyonkoro
tyourinbo
tyourippo
tyurenbo
ushigoroshi
usigorosi
v461n4
v461na
v46in4
v46ina
v4g1n4
v4g1na
v4gin4
v4gina
va61n4
va61na
va6in4
va6ina
vaccagare
vaffanculo
vag
vag1n4
vag1na
vagin4
vagina
vatefaire
vvhitepower
w3tb4ck
w3tback
wank
wanker
wetb4ck
wetback
wh0r3
wh0re
white power
whitepower
whor3
whore
whores
wog
wop
x8lp3t
xbl pet
xblpet
xblrewards
xl3lpet
yabunirami
zipperhead
блядь
сука
アオカン
あおかん
イヌゴロシ
いぬごろし
インバイ
いんばい
オナニー
おなにー
オメコ
カワラコジキ
かわらこじき
カワラモノ
かわらもの
キケイジ
きけいじ
キチガイ
きちがい
キンタマ
きんたま
クロンボ
くろんぼ
コロシテヤル
ころしてやる
シナジン
しなじん
タチンボ
たちんぼ
チョンコウ
ちょんこう
チョンコロ
ちょんころ
ちょん公
チンポ
ちんぽ
ツンボ
つんぼ
とるこじょう
とるこぶろ
トルコ嬢
トルコ風呂
ニガー
ニグロ
にんぴにん
はんとうじん
マンコ
まんこ
レイプ
れいぷ
低能
屠殺
強姦
援交
支那人
精薄
精薄者
輪姦

Some files were not shown because too many files have changed in this diff Show More