Compare commits

...

4 commits

Author SHA1 Message Date
yuni d9dee1b48e LICENSE: add exhaust.png 2024-10-10 07:53:46 +02:00
yuni e91dd8d995 move yuni back into the shadow 2024-10-10 07:12:58 +02:00
yuni a27036461a allow multiple avatars on NPCs, give Luna skirt+nekomimi 2024-10-10 06:56:25 +02:00
yuni 192fdd0cba add nekomimi avatar 2024-10-10 06:47:09 +02:00
8 changed files with 241 additions and 4 deletions

View file

@ -23,10 +23,11 @@
- Uranus: [By Askaniy, CC BY-SA 3.0](https://www.deviantart.com/askaniy/art/Uranus-Texture-Map-763551816) - Uranus: [By Askaniy, CC BY-SA 3.0](https://www.deviantart.com/askaniy/art/Uranus-Texture-Map-763551816)
- Neptune: [By Solar System Scope, CC BY 4.0](https://www.solarsystemscope.com/textures/) - Neptune: [By Solar System Scope, CC BY 4.0](https://www.solarsystemscope.com/textures/)
- Textures: - Textures:
- metal.jpg: ["Seamless metal texture" by hhh316, CC BY 3.0](https://www.deviantart.com/hhh316/art/Seamless-metal-texture-182943398)
- solarpanel.jpg: ["Solar panel-Texture 1" by Conquestus, CC BY 3.0](https://www.deviantart.com/conquestus/art/Solar-panel-Texture-1-703900580)
- plant.jpg: [OTF_Macro_Leaf_19 by Brent Leimenstoll, CC BY-SA 2.0](https://www.flickr.com/photos/brentleimenstoll/9117089591)
- denim.jpg: ["Seamless Denim" by fotogrph, CC BY 3.0](https://www.deviantart.com/fotogrph/art/Seamless-Denim-301565637) - denim.jpg: ["Seamless Denim" by fotogrph, CC BY 3.0](https://www.deviantart.com/fotogrph/art/Seamless-Denim-301565637)
- exhaust.png: By Yuni, CC0 License
- metal.jpg: ["Seamless metal texture" by hhh316, CC BY 3.0](https://www.deviantart.com/hhh316/art/Seamless-metal-texture-182943398)
- plant.jpg: [OTF_Macro_Leaf_19 by Brent Leimenstoll, CC BY-SA 2.0](https://www.flickr.com/photos/brentleimenstoll/9117089591)
- solarpanel.jpg: ["Solar panel-Texture 1" by Conquestus, CC BY 3.0](https://www.deviantart.com/conquestus/art/Solar-panel-Texture-1-703900580)
- suit.jpg: By Yuni, CC0 License - suit.jpg: By Yuni, CC0 License
- Icon: By Yuni, CC0 License - Icon: By Yuni, CC0 License
- Sounds by Yuni, CC0 License: - Sounds by Yuni, CC0 License:

Binary file not shown.

View file

@ -0,0 +1,208 @@
{
"asset":{
"generator":"Khronos glTF Blender I/O v4.2.60",
"version":"2.0"
},
"scene":0,
"scenes":[
{
"name":"Scene",
"nodes":[
0
]
}
],
"nodes":[
{
"mesh":0,
"name":"Cube",
"rotation":[
0.02528117410838604,
0.1163245439529419,
0.2057507038116455,
0.9713373780250549
],
"scale":[
0.4183187484741211,
0.4183187484741211,
0.08126619458198547
],
"translation":[
-0.11588791012763977,
0.9098548889160156,
0.18442729115486145
]
}
],
"materials":[
{
"doubleSided":true,
"name":"SuitV2_white",
"pbrMetallicRoughness":{
"baseColorTexture":{
"index":0
},
"metallicFactor":0.648099422454834,
"roughnessFactor":0.75
}
},
{
"doubleSided":true,
"name":"SuitV2_black",
"pbrMetallicRoughness":{
"baseColorFactor":[
0.026928085833787918,
0.026928085833787918,
0.026928085833787918,
1
],
"metallicFactor":0.3655180037021637,
"roughnessFactor":0.7267752289772034
}
}
],
"meshes":[
{
"name":"Cube",
"primitives":[
{
"attributes":{
"POSITION":0,
"TEXCOORD_0":1
},
"indices":2,
"material":0
},
{
"attributes":{
"POSITION":3,
"TEXCOORD_0":4
},
"indices":5,
"material":1
}
]
}
],
"textures":[
{
"sampler":0,
"source":0
}
],
"images":[
{
"mimeType":"image/jpeg",
"name":"suit",
"uri":"textures/suit.jpg"
}
],
"accessors":[
{
"bufferView":0,
"componentType":5126,
"count":16,
"max":[
0.5989817976951599,
0.08483065664768219,
0.8132073879241943
],
"min":[
-0.14874723553657532,
-0.5023269653320312,
-0.3295954763889313
],
"type":"VEC3"
},
{
"bufferView":1,
"componentType":5126,
"count":16,
"type":"VEC2"
},
{
"bufferView":2,
"componentType":5123,
"count":60,
"type":"SCALAR"
},
{
"bufferView":3,
"componentType":5126,
"count":8,
"max":[
0.5835986137390137,
0.06933381408452988,
0.8132073879241943
],
"min":[
-0.14856749773025513,
-0.5023269653320312,
-0.07371209561824799
],
"type":"VEC3"
},
{
"bufferView":4,
"componentType":5126,
"count":8,
"type":"VEC2"
},
{
"bufferView":5,
"componentType":5123,
"count":12,
"type":"SCALAR"
}
],
"bufferViews":[
{
"buffer":0,
"byteLength":192,
"byteOffset":0,
"target":34962
},
{
"buffer":0,
"byteLength":128,
"byteOffset":192,
"target":34962
},
{
"buffer":0,
"byteLength":120,
"byteOffset":320,
"target":34963
},
{
"buffer":0,
"byteLength":96,
"byteOffset":440,
"target":34962
},
{
"buffer":0,
"byteLength":64,
"byteOffset":536,
"target":34962
},
{
"buffer":0,
"byteLength":24,
"byteOffset":600,
"target":34963
}
],
"samplers":[
{
"magFilter":9729,
"minFilter":9987
}
],
"buffers":[
{
"byteLength":624,
"uri":"ar_nekomimi.bin"
}
]
}

Binary file not shown.

View file

@ -125,6 +125,7 @@ struct ParserState {
light_brightness: f32, light_brightness: f32,
light_color: Option<Color>, light_color: Option<Color>,
ar_model: Option<String>, ar_model: Option<String>,
ar_model2: Option<String>,
show_only_in_map_at_distance: Option<(f64, String)>, show_only_in_map_at_distance: Option<(f64, String)>,
} }
impl Default for ParserState { impl Default for ParserState {
@ -186,6 +187,7 @@ impl Default for ParserState {
light_brightness: 0.0, light_brightness: 0.0,
light_color: None, light_color: None,
ar_model: None, ar_model: None,
ar_model2: None,
show_only_in_map_at_distance: None, show_only_in_map_at_distance: None,
} }
} }
@ -685,6 +687,9 @@ pub fn load_defs(mut ew_spawn: EventWriter<SpawnEvent>) {
["armodel", asset_name] => { ["armodel", asset_name] => {
state.ar_model = Some(asset_name.to_string()); state.ar_model = Some(asset_name.to_string());
} }
["armodel_secondary", asset_name] => {
state.ar_model2 = Some(asset_name.to_string());
}
["targeted", "yes"] => { ["targeted", "yes"] => {
state.is_targeted_on_startup = true; state.is_targeted_on_startup = true;
} }
@ -1182,6 +1187,23 @@ fn spawn_entities(
load_asset(ar_asset_name, &mut entitycmd, &*asset_server); load_asset(ar_asset_name, &mut entitycmd, &*asset_server);
} }
if let Some(ar_asset_name) = &state.ar_model2 {
let mut entitycmd = commands.spawn((
hud::AugmentedRealityOverlay {
owner: actor_entity,
scale: 1.0,
},
world::DespawnOnPlayerDeath,
SpatialBundle {
visibility: Visibility::Hidden,
..default()
},
NotShadowCaster,
NotShadowReceiver,
));
load_asset(ar_asset_name, &mut entitycmd, &*asset_server);
}
if state.is_point_of_interest || state.is_moon || state.is_planet { if state.is_point_of_interest || state.is_moon || state.is_planet {
let mut entitycmd = commands.spawn(( let mut entitycmd = commands.spawn((
hud::PointOfInterestMarker(actor_entity), hud::PointOfInterestMarker(actor_entity),

View file

@ -315,6 +315,7 @@ actor 700 -100 -1100 suitv2
id Luna id Luna
chatid Luna chatid Luna
armodel suit_ar_skirt armodel suit_ar_skirt
armodel_secondary suit_ar_nekomimi
angularmomentum 0 0 0 angularmomentum 0 0 0
wants maxrotation 0 wants maxrotation 0
wants maxvelocity none wants maxvelocity none
@ -349,13 +350,15 @@ actor 700 -100 -1100 suitv2
scale 0.25 scale 0.25
light FF8F4A 4000000 light FF8F4A 4000000
actor -55e3 44e3 0 suitv2 actor -55e3 31e3 0 suitv2
template person template person
relativeto thebe relativeto thebe
id yuni id yuni
name "Yuni" name "Yuni"
chatid Yuni chatid Yuni
armodel suit_ar_skirt
rotationx 180 rotationx 180
rotationy 90
wants matchvelocitywith thebe wants matchvelocitywith thebe
actor 5000 0 -3000 metis actor 5000 0 -3000 metis

View file

@ -47,6 +47,7 @@ pub const PLAYER_AR_AVATARS: &[(Avatar, &str, f32, &str)] = &[
(Avatar::None, "", 1.0, "No Avatar"), (Avatar::None, "", 1.0, "No Avatar"),
(Avatar::ChefHat, "suit_ar_chefhat", 1.0, "Chef Hat"), (Avatar::ChefHat, "suit_ar_chefhat", 1.0, "Chef Hat"),
(Avatar::Skirt, "suit_ar_skirt", 1.0, "Skirt"), (Avatar::Skirt, "suit_ar_skirt", 1.0, "Skirt"),
(Avatar::Nekomimi, "suit_ar_nekomimi", 1.0, "Cat Ears"),
(Avatar::Wings, "suit_ar_wings", 1.0, "Wings"), (Avatar::Wings, "suit_ar_wings", 1.0, "Wings"),
(Avatar::Asteroid, "asteroid2", 1.2, "Asteroid"), (Avatar::Asteroid, "asteroid2", 1.2, "Asteroid"),
]; ];
@ -177,6 +178,7 @@ struct FPSUpdateTimer(Timer);
pub enum Avatar { pub enum Avatar {
None, None,
ChefHat, ChefHat,
Nekomimi,
Skirt, Skirt,
Wings, Wings,
Asteroid, Asteroid,

View file

@ -30,6 +30,7 @@ pub fn asset_name_to_path(name: &str) -> &'static str {
match name { match name {
"suitv2" => "models/suit_v2.gltf#Scene0", "suitv2" => "models/suit_v2.gltf#Scene0",
"suit_ar_chefhat" => "models/suit_v2/ar_chefhat.glb#Scene0", "suit_ar_chefhat" => "models/suit_v2/ar_chefhat.glb#Scene0",
"suit_ar_nekomimi" => "models/ar_nekomimi.gltf#Scene0",
"suit_ar_skirt" => "models/ar_skirt.gltf#Scene0", "suit_ar_skirt" => "models/ar_skirt.gltf#Scene0",
"suit_ar_wings" => "models/suit_v2/ar_wings.glb#Scene0", "suit_ar_wings" => "models/suit_v2/ar_wings.glb#Scene0",
"sus" => "models/sus.glb#Scene0", "sus" => "models/sus.glb#Scene0",