-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feat-melee-weapon
# Conflicts: # src/client/core/Inventory.ts # src/client/core/RemoteItemRenderer.ts # src/server/managers/ItemManager.ts
- Loading branch information
Showing
33 changed files
with
1,365 additions
and
278 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
## Items | ||
|
||
Item ID list with implementation info | ||
| ID | Class | Item Description | Inventory | World | | ||
|----|--------------|---------------------------------------|-------------|-------| | ||
| 0 | ItemBase.ts | Base item template (freaky green cube)| ✅ | ✅ | | ||
| 1 | BananaGun.ts | Banana gun | ✅ | ✅ | | ||
| 1 | FishGun.ts | Fish gun >:) | ✅ | ✅ | | ||
|
||
| ID | Class | Item Description | Inventory | World | | ||
| -- | ------------ | -------------------------------------- | --------- | ----- | | ||
| 0 | ItemBase.ts | Base item template (freaky green cube) | ✅ | ✅ | | ||
| 1 | BananaGun.ts | Banana gun | ✅ | ✅ | | ||
| 2 | FishGun.ts | Fish gun >:) | ✅ | ✅ | | ||
| 4 | FlagItem.ts | FlagItem used in CTF | ✅ | ✅ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Reduce Texture Resolution of a Blender File | ||
|
||
The following python script reduces the resolution of all textures in a Blender file by 50%. | ||
|
||
```python | ||
import bpy | ||
|
||
def resize_image(image, scale_factor=0.5): | ||
# Calculate new dimensions | ||
new_width = int(image.size[0] * scale_factor) | ||
new_height = int(image.size[1] * scale_factor) | ||
|
||
# Ensure the image is packed or has a file path | ||
if image.packed_file: | ||
image.unpack(method='USE_ORIGINAL') | ||
|
||
# Get the file path | ||
filepath = bpy.path.abspath(image.filepath) | ||
|
||
# Skip images without a valid file path | ||
if not filepath: | ||
print(f"Skipping image '{image.name}' because it has no valid file path.") | ||
return | ||
|
||
# Scale the image | ||
image.scale(new_width, new_height) | ||
|
||
# Save the resized image | ||
image.filepath_raw = filepath | ||
image.file_format = 'PNG' # Change format if needed | ||
image.save() | ||
|
||
def main(): | ||
# Iterate over all images in the Blender file | ||
for image in bpy.data.images: | ||
if image.size[0] > 0 and image.size[1] > 0: | ||
print(f"Processing image: {image.name}") | ||
resize_image(image) | ||
|
||
if __name__ == "__main__": | ||
main() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,46 @@ | ||
# GLTF Compression | ||
|
||
### use gltf-pipeline for compression | ||
|
||
https://github.com/CesiumGS/gltf-pipeline | ||
|
||
Can be installed using npm: | ||
|
||
```bash | ||
npm install -g gltf-pipeline | ||
``` | ||
|
||
### sane person compression if it's already stylized: | ||
|
||
```bash | ||
gltf-pipeline -i input.glb -o output.glb --draco.compressionLevel 10 --texcomp.quality 50 --texcomp.powerOfTwoImage true | ||
``` | ||
|
||
This command: | ||
|
||
1. Uses Draco compression with maximum level (10) | ||
2. Reduces the precision of various attributes (position, normal, texture coordinates, color, and other generic attributes) by specifying fewer bits for each. This effectively removes data points. 3. | ||
2. Reduces the precision of various attributes (position, normal, texture coordinates, color, and other generic | ||
attributes) by specifying fewer bits for each. This effectively removes data points. 3. | ||
3. Applies the --optimize.simplify flag, which attempts to simplify the geometry while preserving the overall shape. | ||
|
||
You can adjust the quantization bits (the numbers after each quantize...Bits option) to be even lower for more aggressive simplification. For example: | ||
You can adjust the quantization bits (the numbers after each quantize...Bits option) to be even lower for more | ||
aggressive simplification. For example: | ||
|
||
```bash | ||
--draco.quantizePositionBits 8 --draco.quantizeNormalBits 6 --draco.quantizeTexcoordBits 6 --draco.quantizeColorBits 6 --draco.quantizeGenericBits 6 | ||
``` | ||
|
||
|
||
### really abysmal compression to "stylize" something normal | ||
(used for possum and banana so far)- uses 8 for quantization leading to gross blocky look sometimes unintended with holes | ||
|
||
(used for possum and banana so far)- uses 8 for quantization leading to gross blocky look sometimes unintended with | ||
holes | ||
|
||
```bash | ||
gltf-pipeline -i possum.glb -o simplified_possum.glb --draco.compressionLevel 10 --draco.quantizePositionBits 6 --draco.quantizeNormalBits 4 --draco.quantizeTexcoordBits 4 --draco.quantizeColorBits 4 --draco.quantizeGenericBits 4 --optimize.simplify | ||
``` | ||
|
||
#### not sure what this one does, added a bunch more flags might break things lmk tho | ||
|
||
```bash | ||
gltf-pipeline -i possum.glb -o simplified_possum.glb --draco.compressionLevel 10 --draco.quantizePositionBits 6 --draco.quantizeNormalBits 4 --draco.quantizeTexcoordBits 4 --draco.quantizeColorBits 4 --draco.quantizeGenericBits 4 --optimize.simplify --optimize.pruneUnused --optimize.mergeInstances --optimize.mergeMaterials --optimize.stripJoints | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version": "1.9.1"} | ||
{"version": "1.10.0"} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.