build: add web export, fix wasm path
This commit is contained in:
parent
742dc85414
commit
81cd6cc41d
@ -11,7 +11,7 @@ linux.release.x86_64 = "res://addons/boids/lib/boids.x86.so"
|
||||
windows.release.x86_64 = "res://addons/boids/lib/boids.x86.dll"
|
||||
macos.release = "res://addons/boids/lib/libboids.x86.dylib"
|
||||
macos.release.arm64 = "res://addons/boids/lib/libboids.arm64.dylib"
|
||||
web.debug.wasm32 = "res://rust/target/wasm32-unknown-emscripten/debug/boids.wasm"
|
||||
web.debug.wasm32 = "res://addons/boids/lib/boids.wasm"
|
||||
web.release.wasm32 = "res://addons/boids/lib/boids.wasm"
|
||||
|
||||
[icons]
|
||||
|
@ -62,3 +62,45 @@ Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorActi
|
||||
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
|
||||
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
|
||||
Remove-Item -Recurse -Force '{temp_dir}'"
|
||||
|
||||
[preset.1]
|
||||
|
||||
name="Web"
|
||||
platform="Web"
|
||||
runnable=true
|
||||
advanced_options=false
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path=""
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
encrypt_pck=false
|
||||
encrypt_directory=false
|
||||
script_export_mode=2
|
||||
|
||||
[preset.1.options]
|
||||
|
||||
custom_template/debug=""
|
||||
custom_template/release=""
|
||||
variant/extensions_support=true
|
||||
variant/thread_support=true
|
||||
vram_texture_compression/for_desktop=true
|
||||
vram_texture_compression/for_mobile=false
|
||||
html/export_icon=true
|
||||
html/custom_html_shell=""
|
||||
html/head_include=""
|
||||
html/canvas_resize_policy=2
|
||||
html/focus_canvas_on_start=true
|
||||
html/experimental_virtual_keyboard=false
|
||||
progressive_web_app/enabled=false
|
||||
progressive_web_app/ensure_cross_origin_isolation_headers=true
|
||||
progressive_web_app/offline_page=""
|
||||
progressive_web_app/display=1
|
||||
progressive_web_app/orientation=0
|
||||
progressive_web_app/icon_144x144=""
|
||||
progressive_web_app/icon_180x180=""
|
||||
progressive_web_app/icon_512x512=""
|
||||
progressive_web_app/background_color=Color(0, 0, 0, 1)
|
||||
|
@ -46,12 +46,12 @@ pub fn calculate_boid(
|
||||
boid_vel: Vec3,
|
||||
boid_props: BoidProperties,
|
||||
flock_props: FlockProperties,
|
||||
boids: Arc<Vec<(Vec3, Vec3)>>,
|
||||
other_boids: Arc<Vec<(Vec3, Vec3)>>,
|
||||
target_position: Option<Vec3>,
|
||||
) -> Vec3 {
|
||||
//godot::godot_print!("[Boids] executing from thread {:?}", rayon::current_thread_index());
|
||||
|
||||
let mut calced = boids
|
||||
let mut calced = other_boids
|
||||
.par_iter()
|
||||
.fold(CalcArgs::identity, |mut acc, (aboid_pos, aboid_vel)| {
|
||||
let dist = boid_pos.distance_squared(*aboid_pos);
|
||||
|
Loading…
Reference in New Issue
Block a user