add frame to Luna's workshop, define lightorbs in scene

This commit is contained in:
yuni 2024-10-27 23:42:30 +01:00
parent 792e68de08
commit b69f5945af
9 changed files with 296 additions and 17 deletions

BIN
assets/models/frameflat.bin Normal file

Binary file not shown.

View file

@ -0,0 +1,244 @@
{
"asset":{
"generator":"Khronos glTF Blender I/O v4.2.60",
"version":"2.0"
},
"scene":0,
"scenes":[
{
"name":"Scene",
"nodes":[
0,
1,
2,
3,
4,
5,
6
]
}
],
"nodes":[
{
"mesh":0,
"name":"Cube",
"scale":[
0.05000000074505806,
0.05000000074505806,
0.054999999701976776
],
"translation":[
-0.949999988079071,
0,
0
]
},
{
"mesh":0,
"name":"Cube.001",
"scale":[
0.05000000074505806,
0.05000000074505806,
0.054999999701976776
],
"translation":[
0.949999988079071,
0,
0
]
},
{
"mesh":0,
"name":"Cube.002",
"scale":[
0.05000000074505806,
0.05000000074505806,
0.054999999701976776
]
},
{
"mesh":0,
"name":"Cube.003",
"scale":[
0.05000000074505806,
0.05000000074505806,
0.054999999701976776
],
"translation":[
0.4749999940395355,
0,
0
]
},
{
"mesh":0,
"name":"Cube.004",
"scale":[
0.05000000074505806,
0.05000000074505806,
0.054999999701976776
],
"translation":[
-0.4749999940395355,
0,
0
]
},
{
"mesh":0,
"name":"Cube.005",
"rotation":[
0.5,
0.5,
0.5,
0.5000000596046448
],
"scale":[
0.05000000074505806,
0.05000000074505806,
0.06499999761581421
],
"translation":[
0,
0,
0.949999988079071
]
},
{
"mesh":0,
"name":"Cube.006",
"rotation":[
0.5,
0.5,
0.5,
0.5000000596046448
],
"scale":[
0.05000000074505806,
0.05000000074505806,
0.06499999761581421
],
"translation":[
0,
0,
-0.949999988079071
]
}
],
"materials":[
{
"doubleSided":true,
"name":"Material",
"pbrMetallicRoughness":{
"baseColorTexture":{
"index":0
},
"metallicFactor":0.9920634627342224,
"roughnessFactor":0.4047618806362152
}
}
],
"meshes":[
{
"name":"Cube",
"primitives":[
{
"attributes":{
"POSITION":0,
"NORMAL":1,
"TEXCOORD_0":2
},
"indices":3,
"material":0
}
]
}
],
"textures":[
{
"sampler":0,
"source":0
}
],
"images":[
{
"mimeType":"image/jpeg",
"name":"metal",
"uri":"textures/metal.jpg"
}
],
"accessors":[
{
"bufferView":0,
"componentType":5126,
"count":88,
"max":[
1,
1,
16.200002670288086
],
"min":[
-1,
-1,
-16.200002670288086
],
"type":"VEC3"
},
{
"bufferView":1,
"componentType":5126,
"count":88,
"type":"VEC3"
},
{
"bufferView":2,
"componentType":5126,
"count":88,
"type":"VEC2"
},
{
"bufferView":3,
"componentType":5123,
"count":180,
"type":"SCALAR"
}
],
"bufferViews":[
{
"buffer":0,
"byteLength":1056,
"byteOffset":0,
"target":34962
},
{
"buffer":0,
"byteLength":1056,
"byteOffset":1056,
"target":34962
},
{
"buffer":0,
"byteLength":704,
"byteOffset":2112,
"target":34962
},
{
"buffer":0,
"byteLength":360,
"byteOffset":2816,
"target":34963
}
],
"samplers":[
{
"magFilter":9729,
"minFilter":9987
}
],
"buffers":[
{
"byteLength":3176,
"uri":"frameflat.bin"
}
]
}

BIN
src/blender/frameflat.blend Normal file

Binary file not shown.

BIN
src/blender/lightorb.blend Normal file

Binary file not shown.

Binary file not shown.

View file

@ -848,6 +848,49 @@ fn spawn_scenes(
ew_spawn.send(SpawnEvent(state));
}
"frameflat" => {
state.model = Some("frameflat".to_string());
// command: name "Frame"
state.name = Some("Frame".to_string());
// command: id lunaplatform
state.id = String::from("lunaplatform");
// command: scale 30
state.model_scale = 30.0;
// command: angularmomentum 0 0 0
state.angular_momentum = DVec3::ZERO;
// command: collider mesh
state.collider_is_one_mesh_of_scene = true;
state.collider_is_mesh = true;
// command: density 50000
state.density = 50000.0;
ew_spawn.send(SpawnEvent(state));
}
"lightorb" => {
state.model = Some("lightorb".to_string());
// command: name "Light Orb"
state.name = Some("Light Orb".to_string());
// command: collider mesh
state.collider_is_one_mesh_of_scene = true;
state.collider_is_mesh = true;
// command: scale 0.25
state.model_scale = 0.25;
// command: light FF8F4A 4000000
state.light_color = Some(Color::Srgba(Srgba::hex("FF8F4A").unwrap()));
state.light_brightness = 4000000.0;
ew_spawn.send(SpawnEvent(state));
}
_ => {
error!("Can't find template named `{template}' in cmd::spawn_scenes!");
}

View file

@ -337,11 +337,11 @@ actor 700 -100 -1100 suitv2
armodel_tertiary suit_ar_bra
angularmomentum 0 0 0
wants maxrotation 0
wants maxvelocity none
wants matchvelocitywith lunaplatform
rotationy 108
rotationx 180
pronoun she
scene 22 0 0 workshop
scene 12 0 -30 workshop
relativeto Luna
actor -20 10 -23 MeteorAceGT
name "Luna's experimental MeteorAceGT"
@ -356,18 +356,6 @@ actor 700 -100 -1100 suitv2
angularmomentum 0 0 0.2
pointofinterest yes
message_on_entry "NOT DESIGNED FOR HUMAN USE"
actor -9 4 11 lightorb
relativeto Luna
name "Light Orb"
collider mesh
scale 0.25
light FF8F4A 4000000
actor -8 1 -9 lightorb
relativeto Luna
name "Light Orb"
collider mesh
scale 0.25
light FF8F4A 4000000
actor -55e3 31e3 0 suitv2
template person

View file

@ -2,8 +2,11 @@
// DO NOT MODIFY MANUALLY, CHANGES WILL BE OVERWRITTEN!
[
("test", "cruiser", [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]),
("workshop", "fueltank", [21.074543, -2.4312592, -4.7432747], [1.609848, 0.008555692, 1.646027]),
("workshop", "shippingcontainer", [-1.6206985, 12.010283, -2.9834328], [-0.02629428, 0.00037644096, 1.7372935]),
("workshop", "frameflat", [0.0, 0.0, -21.541874], [0.0, 0.0, 0.0]),
("workshop", "fueltank", [21.074543, -2.4312592, -4.7432747], [1.2519244, -0.0, -0.6819759]),
("workshop", "lightorb", [-15.720036, -32.41476, 4.1765304], [0.0, 0.0, 0.0]),
("workshop", "lightorb", [11.5042095, -21.65356, -4.566242], [0.0, 0.0, 0.0]),
("workshop", "shippingcontainer", [-0.52376616, 12.351211, -2.6598575], [-0.11791781, -0.02345992, 1.5838965]),
("workshop", "shippingcontainer", [-13.479424, 10.191104, -8.136984], [-0.05393797, -0.013098141, 1.7229813]),
("workshop", "shippingcontainer", [10.243189, 13.829462, -4.302782], [0.061487854, 0.08236491, 1.6717931]),
("workshop", "shippingcontainer", [12.42811, 14.157182, -4.2369785], [-0.02553346, 0.042504273, 1.5108364]),
]

View file

@ -51,6 +51,7 @@ pub fn asset_name_to_path(name: &str) -> &'static str {
"MeteorAceGT" => "models/MeteorAceGT.glb#Scene0",
"cruiser" => "models/cruiser.glb#Scene0",
"shippingcontainer" => "models/shippingcontainer.glb#Scene0",
"frameflat" => "models/frameflat.gltf#Scene0",
"fueltank" => "models/fueltank.glb#Scene0",
"satellite" => "models/satellite.gltf#Scene0",
"pizzeria" => "models/pizzeria3.gltf#Scene0",