Skip to content

Commit

Permalink
optimized html build
Browse files Browse the repository at this point in the history
  • Loading branch information
CircleCI committed Sep 21, 2022
1 parent 8892c9d commit a7a107d
Show file tree
Hide file tree
Showing 19 changed files with 126 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# command: bash .circleci/deploy-heroku.sh
- run: godot --export "Windows Desktop" ./build/windows/cluennector.exe
- run: godot --export "Linux/X11" ./build/linux/cluennector
- run: godot --export "Mac OSX" ./build/macos/cluennector.dmg
- run: godot --export "Mac OSX" ./build/macos/cluennector.app
- run:
name: Github release
command: bash .circleci/release.sh
Expand Down
2 changes: 1 addition & 1 deletion .circleci/deploy-cloudflare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ nvm use --lts

branch=$(git rev-parse --abbrev-ref HEAD)
name=$(basename $(git config remote.origin.url |sed "s/\.git$//") | sed "s/ /-/g" | tr '[:upper:]' '[:lower:]')
npx wrangler pages project create unborn --production-branch "$branch" || true
npx wrangler pages project create "$name" --production-branch "$branch" || true
npx wrangler pages publish build/html --project-name "$name"
Binary file added assets/bgclose.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions assets/bgfar.png.import → assets/bgclose.jpeg.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

importer="texture"
type="StreamTexture"
path="res://.import/bgfar.png-7fd62260446e80fd6d39fa5eb51c278a.stex"
path="res://.import/bgclose.jpeg-366b66971fa080928ae95c6e75b306c9.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/bgfar.png"
dest_files=[ "res://.import/bgfar.png-7fd62260446e80fd6d39fa5eb51c278a.stex" ]
source_file="res://assets/bgclose.jpeg"
dest_files=[ "res://.import/bgclose.jpeg-366b66971fa080928ae95c6e75b306c9.stex" ]

[params]

Expand All @@ -19,7 +19,7 @@ compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/repeat=1
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
Expand Down
Binary file added assets/bgfar.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions assets/bgbig.png.import → assets/bgfar.jpeg.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

importer="texture"
type="StreamTexture"
path="res://.import/bgbig.png-5ecf0050e0a566f784bc1beac35afc5d.stex"
path="res://.import/bgfar.jpeg-acece484428bd3d719ff1cf2e443925c.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/bgbig.png"
dest_files=[ "res://.import/bgbig.png-5ecf0050e0a566f784bc1beac35afc5d.stex" ]
source_file="res://assets/bgfar.jpeg"
dest_files=[ "res://.import/bgfar.jpeg-acece484428bd3d719ff1cf2e443925c.stex" ]

[params]

Expand All @@ -19,7 +19,7 @@ compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/repeat=1
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
Expand Down
Binary file added assets/bgmedium.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions assets/bgmedium.png.import → assets/bgmedium.jpeg.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

importer="texture"
type="StreamTexture"
path="res://.import/bgmedium.png-414d83a50461da3c082ce09c4dc16195.stex"
path="res://.import/bgmedium.jpeg-7034170847a4cda6ac66d239e5fb9d8c.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/bgmedium.png"
dest_files=[ "res://.import/bgmedium.png-414d83a50461da3c082ce09c4dc16195.stex" ]
source_file="res://assets/bgmedium.jpeg"
dest_files=[ "res://.import/bgmedium.jpeg-7034170847a4cda6ac66d239e5fb9d8c.stex" ]

[params]

Expand All @@ -19,7 +19,7 @@ compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/repeat=1
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
Expand Down
35 changes: 0 additions & 35 deletions assets/bgmiddle.png.import

This file was deleted.

35 changes: 0 additions & 35 deletions assets/bgsmall.png.import

This file was deleted.

8 changes: 4 additions & 4 deletions assets/nebula.jpg.import
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ dest_files=[ "res://.import/nebula.jpg-dd1844ba804a91a284ad58583e357691.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/mode=1
compress/lossy_quality=1.0
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/normal_map=2
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
flags/srgb=0
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
Expand Down
Binary file modified assets/ship.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/ship.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ dest_files=[ "res://.import/ship.png-0b2a8e7064d2d88a0149f9491a8ea676.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/mode=1
compress/lossy_quality=1.0
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
Expand Down
62 changes: 53 additions & 9 deletions export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ texture_format/etc=false
texture_format/etc2=false
texture_format/no_bptc_fallbacks=true
codesign/enable=false
codesign/identity_type=0
codesign/identity=""
codesign/password=""
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PoolStringArray( )
application/modify_resources=true
application/icon=""
application/file_version=""
application/product_version=""
Expand Down Expand Up @@ -70,10 +72,11 @@ name="HTML5"
platform="HTML5"
runnable=true
custom_features=""
export_filter="all_resources"
export_filter="resources"
export_files=PoolStringArray( "res://assets/Black.png", "res://assets/SeratUltra-1GE24.ttf", "res://assets/SpaceMono-Regular.ttf", "res://assets/White.png", "res://assets/arrow.png", "res://assets/bgclose.jpeg", "res://assets/bgfar.jpeg", "res://assets/bgmedium.jpeg", "res://assets/flame.png", "res://assets/flamegrow.png", "res://assets/front.png", "res://assets/nebula.jpg", "res://assets/ship.png", "res://assets/st1.png", "res://assets/st2.png", "res://assets/st3.png", "res://assets/st4.png", "res://default_env.tres", "res://effects/Effect.gd", "res://effects/Effect.tscn", "res://effects/Explosion.tscn", "res://effects/ExplosionRefuel.tscn", "res://effects/ExplosionWithWave.tscn", "res://effects/ShockWave.tscn", "res://effects/Wave.gd", "res://effects/WaveEmitter.gd", "res://effects/WaveEmitter.tscn", "res://global/GlobalState.gd", "res://global/PlayerState.gd", "res://global/Utils.gd", "res://icon.png", "res://objects/BlackHole.tscn", "res://objects/Body.gd", "res://objects/Camera.gd", "res://objects/Camera.tscn", "res://objects/KBody.gd", "res://objects/KBody.tscn", "res://objects/Player.gd", "res://objects/Player.tscn", "res://objects/Refuel.gd", "res://objects/Refuel.tscn", "res://objects/Stars/BlueGiant.tscn", "res://objects/Stars/BrownDwarf.tscn", "res://objects/Stars/RedDwarf.tscn", "res://objects/Stars/RedGiant.tscn", "res://objects/Stars/RedSuperGiant.tscn", "res://objects/Stars/WhiteDwarf.tscn", "res://objects/Stars/YellowDwarf.tscn", "res://objects/Stars/star1.tscn", "res://objects/Stars/star2.tscn", "res://objects/Stars/star3.tscn", "res://objects/Stars/star4.tscn", "res://objects/Stars/sun.tscn", "res://objects/blackhole.gd", "res://objects/star_shader.shader", "res://objects/sun.gd", "res://scenes/DrawingCanvas.gd", "res://scenes/HUD.gd", "res://scenes/HUD.tres", "res://scenes/HUD.tscn", "res://scenes/World.gd", "res://scenes/World.tscn", "res://shaders/bloom.shader", "res://shaders/color.shader", "res://shaders/distort.shader", "res://shaders/edge_dissolve.shader", "res://shaders/fog.shader", "res://shaders/glow.shader", "res://shaders/saturation.shader", "res://shaders/shockwave.shader", "res://shaders/sun.shader" )
include_filter=""
exclude_filter=""
export_path=""
exclude_filter="*.exr"
export_path="../../tmp/GravityDemo.html"
script_export_mode=1
script_encryption_key=""

Expand Down Expand Up @@ -116,8 +119,10 @@ script_encryption_key=""

custom_template/debug=""
custom_template/release=""
custom_template/use_custom_build=false
custom_template/export_format=0
custom_build/use_custom_build=false
custom_build/export_format=0
custom_build/min_sdk=""
custom_build/target_sdk=""
architectures/armeabi-v7a=true
architectures/arm64-v8a=true
architectures/x86=false
Expand All @@ -131,8 +136,6 @@ keystore/release_password=""
one_click_deploy/clear_previous_install=false
version/code=1
version/name="1.0"
version/min_sdk=19
version/target_sdk=30
package/unique_name="org.godotengine.$genname"
package/name=""
package/signed=true
Expand All @@ -142,7 +145,6 @@ package/exclude_from_recents=false
launcher_icons/main_192x192=""
launcher_icons/adaptive_foreground_432x432=""
launcher_icons/adaptive_background_432x432=""
graphics/32_bits_framebuffer=true
graphics/opengl_debug=false
xr_features/xr_mode=0
xr_features/hand_tracking=0
Expand Down Expand Up @@ -231,6 +233,7 @@ permissions/location_hardware=false
permissions/manage_accounts=false
permissions/manage_app_tokens=false
permissions/manage_documents=false
permissions/manage_external_storage=false
permissions/master_clear=false
permissions/media_content_control=false
permissions/modify_audio_settings=false
Expand Down Expand Up @@ -332,8 +335,49 @@ application/short_version="1.0"
application/version="1.0"
application/copyright=""
display/high_res=false
privacy/camera_usage_description=""
privacy/microphone_usage_description=""
privacy/camera_usage_description=""
privacy/location_usage_description=""
privacy/address_book_usage_description=""
privacy/calendar_usage_description=""
privacy/photos_library_usage_description=""
privacy/desktop_folder_usage_description=""
privacy/documents_folder_usage_description=""
privacy/downloads_folder_usage_description=""
privacy/network_volumes_usage_description=""
privacy/removable_volumes_usage_description=""
codesign/enable=true
codesign/identity=""
codesign/timestamp=true
codesign/hardened_runtime=true
codesign/replace_existing_signature=true
codesign/entitlements/custom_file=""
codesign/entitlements/allow_jit_code_execution=false
codesign/entitlements/allow_unsigned_executable_memory=false
codesign/entitlements/allow_dyld_environment_variables=false
codesign/entitlements/disable_library_validation=false
codesign/entitlements/audio_input=false
codesign/entitlements/camera=false
codesign/entitlements/location=false
codesign/entitlements/address_book=false
codesign/entitlements/calendars=false
codesign/entitlements/photos_library=false
codesign/entitlements/apple_events=false
codesign/entitlements/debugging=false
codesign/entitlements/app_sandbox/enabled=false
codesign/entitlements/app_sandbox/network_server=false
codesign/entitlements/app_sandbox/network_client=false
codesign/entitlements/app_sandbox/device_usb=false
codesign/entitlements/app_sandbox/device_bluetooth=false
codesign/entitlements/app_sandbox/files_downloads=0
codesign/entitlements/app_sandbox/files_pictures=0
codesign/entitlements/app_sandbox/files_music=0
codesign/entitlements/app_sandbox/files_movies=0
codesign/custom_options=PoolStringArray( )
notarization/enable=false
notarization/apple_id_name=""
notarization/apple_id_password=""
notarization/apple_team_id=""
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions objects/Camera.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export var keyboard_zoom_multiplier = 1.01
export var scroll_wheel_zoom_multiplier = 1.08
export var drag_multiplier = 0.05

onready var far_sprite = $ParallaxBackground/Far/Sprite
onready var mid_sprite = $ParallaxBackground/Mid/Sprite
onready var close_sprite = $ParallaxBackground/Close/Sprite

onready var current_scene = get_tree().get_current_scene()
onready var player = current_scene.get_node("Player")
onready var hud = current_scene.get_node("HUD")
Expand All @@ -15,14 +19,26 @@ var drags = PoolVector2Array()
var attached = true
var paralax_layers = []


func _ready():

# Change textures for some exports
match OS.get_name():
# "Android":
"HTML5":
far_sprite.texture = load("res://assets/bgfar.jpeg")
mid_sprite.texture = load("res://assets/bgmedium.jpeg")
close_sprite.texture = load("res://assets/bgclose.jpeg")

for layer in Utils.get_children_with_type(self, ParallaxLayer):
paralax_layers.append([layer, layer.motion_scale])


func scale_click_areas():
for body in GlobalState.kbodies:
body.scale_click_area(zoom)


func update_paralax():
"""Change paralax on zooming"""
for layer in paralax_layers:
Expand All @@ -32,6 +48,7 @@ func update_paralax():
# HACK This is so the paralax doesn't disappear when detached
global_position += Vector2(0, -10)


func _process(delta):
var input_vector = Vector2.ZERO
input_vector.x = Input.get_action_strength("cam_right") - Input.get_action_strength("cam_left")
Expand Down Expand Up @@ -89,6 +106,7 @@ func _process(delta):
global_position = track_object.global_position
hud.set_tracking(track_object)


func _unhandled_input(event):
if event is InputEventScreenDrag:
var input_vector = Vector2(event.relative[0], event.relative[1])
Expand Down
Loading

0 comments on commit a7a107d

Please sign in to comment.