AR: add bra

This commit is contained in:
yuni 2024-10-11 03:30:40 +02:00
parent 7f2568be0f
commit cd7aef8f37
6 changed files with 365 additions and 0 deletions

BIN
assets/models/ar_bra.bin Normal file

Binary file not shown.

361
assets/models/ar_bra.gltf Normal file
View file

@ -0,0 +1,361 @@
{
"asset":{
"generator":"Khronos glTF Blender I/O v4.2.60",
"version":"2.0"
},
"extensionsUsed":[
"KHR_materials_clearcoat"
],
"scene":0,
"scenes":[
{
"name":"Scene",
"nodes":[
0,
1,
2
]
}
],
"nodes":[
{
"mesh":0,
"name":"Cube",
"rotation":[
0.3221524953842163,
0,
0,
0.9466878175735474
],
"scale":[
0.21445758640766144,
0.16819974780082703,
0.12596197426319122
],
"translation":[
0,
0.4095976650714874,
-0.02326078712940216
]
},
{
"mesh":1,
"name":"Cube.001",
"rotation":[
0.0796840488910675,
-0.04253033548593521,
0.12269081920385361,
0.9883262515068054
],
"scale":[
0.02726696990430355,
0.014289390295743942,
0.10526275634765625
],
"translation":[
0.03264089673757553,
0.6200276017189026,
0.0923658087849617
]
},
{
"mesh":2,
"name":"Torus",
"rotation":[
-0.5483814477920532,
0,
0,
0.8362283110618591
],
"scale":[
0.02308047190308571,
0.02308047190308571,
0.02308047190308571
],
"translation":[
0,
0.46213942766189575,
0.1213059052824974
]
}
],
"materials":[
{
"doubleSided":true,
"name":"Denim",
"pbrMetallicRoughness":{
"baseColorTexture":{
"index":0
},
"metallicFactor":0.5158730149269104,
"roughnessFactor":0.841269850730896
}
},
{
"doubleSided":true,
"extensions":{
"KHR_materials_clearcoat":{
"clearcoatFactor":0.8174603581428528
}
},
"name":"Glass",
"pbrMetallicRoughness":{
"baseColorFactor":[
0.4082057476043701,
0.6817594766616821,
1,
1
],
"metallicFactor":0.7467532753944397,
"roughnessFactor":0.2922077775001526
}
}
],
"meshes":[
{
"name":"Mesh",
"primitives":[
{
"attributes":{
"POSITION":0,
"NORMAL":1,
"TEXCOORD_0":2
},
"indices":3,
"material":0
}
]
},
{
"name":"Cube.002",
"primitives":[
{
"attributes":{
"POSITION":4,
"NORMAL":5,
"TEXCOORD_0":6
},
"indices":7,
"material":0
}
]
},
{
"name":"Mesh",
"primitives":[
{
"attributes":{
"POSITION":8,
"NORMAL":9,
"TEXCOORD_0":10
},
"indices":11,
"material":1
}
]
}
],
"textures":[
{
"sampler":0,
"source":0
}
],
"images":[
{
"mimeType":"image/jpeg",
"name":"denim",
"uri":"textures/denim.jpg"
}
],
"accessors":[
{
"bufferView":0,
"componentType":5126,
"count":4479,
"max":[
0.9440339207649231,
0.7542769312858582,
1.6505589485168457
],
"min":[
-0.9440339207649231,
-1.0000001192092896,
-1.0103389024734497
],
"type":"VEC3"
},
{
"bufferView":1,
"componentType":5126,
"count":4479,
"type":"VEC3"
},
{
"bufferView":2,
"componentType":5126,
"count":4479,
"type":"VEC2"
},
{
"bufferView":3,
"componentType":5123,
"count":24576,
"type":"SCALAR"
},
{
"bufferView":4,
"componentType":5126,
"count":724,
"max":[
3.9384336471557617,
1.069407343864441,
0.8153983950614929
],
"min":[
-7.350427150726318,
-11.600038528442383,
-1.1095283031463623
],
"type":"VEC3"
},
{
"bufferView":5,
"componentType":5126,
"count":724,
"type":"VEC3"
},
{
"bufferView":6,
"componentType":5126,
"count":724,
"type":"VEC2"
},
{
"bufferView":7,
"componentType":5123,
"count":3456,
"type":"SCALAR"
},
{
"bufferView":8,
"componentType":5126,
"count":975,
"max":[
6.169865131378174,
0.10589449852705002,
1.1446871757507324
],
"min":[
-6.169864654541016,
-0.939924955368042,
-1.0986886024475098
],
"type":"VEC3"
},
{
"bufferView":9,
"componentType":5126,
"count":975,
"type":"VEC3"
},
{
"bufferView":10,
"componentType":5126,
"count":975,
"type":"VEC2"
},
{
"bufferView":11,
"componentType":5123,
"count":4608,
"type":"SCALAR"
}
],
"bufferViews":[
{
"buffer":0,
"byteLength":53748,
"byteOffset":0,
"target":34962
},
{
"buffer":0,
"byteLength":53748,
"byteOffset":53748,
"target":34962
},
{
"buffer":0,
"byteLength":35832,
"byteOffset":107496,
"target":34962
},
{
"buffer":0,
"byteLength":49152,
"byteOffset":143328,
"target":34963
},
{
"buffer":0,
"byteLength":8688,
"byteOffset":192480,
"target":34962
},
{
"buffer":0,
"byteLength":8688,
"byteOffset":201168,
"target":34962
},
{
"buffer":0,
"byteLength":5792,
"byteOffset":209856,
"target":34962
},
{
"buffer":0,
"byteLength":6912,
"byteOffset":215648,
"target":34963
},
{
"buffer":0,
"byteLength":11700,
"byteOffset":222560,
"target":34962
},
{
"buffer":0,
"byteLength":11700,
"byteOffset":234260,
"target":34962
},
{
"buffer":0,
"byteLength":7800,
"byteOffset":245960,
"target":34962
},
{
"buffer":0,
"byteLength":9216,
"byteOffset":253760,
"target":34963
}
],
"samplers":[
{
"magFilter":9729,
"minFilter":9987
}
],
"buffers":[
{
"byteLength":262976,
"uri":"ar_bra.bin"
}
]
}

BIN
src/blender/ar_bra.blend Normal file

Binary file not shown.

View file

@ -411,6 +411,7 @@ actor 13200 300 -3000 hollow_asteroid
name "River" name "River"
chatid River chatid River
armodel suit_ar_skirt armodel suit_ar_skirt
armodel_secondary suit_ar_bra
rotationy 54 rotationy 54
rotationx -90 rotationx -90
pronoun she pronoun she

View file

@ -51,6 +51,7 @@ pub const PLAYER_AR_AVATARS: &[(Avatar, &str, f32, &str)] = &[
(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::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::Bra, "bra", 1.3, "Bra"),
(Avatar::Asteroid, "metis", 1.3, "Asteroid"), (Avatar::Asteroid, "metis", 1.3, "Asteroid"),
]; ];
@ -186,6 +187,7 @@ pub enum Avatar {
Skirt, Skirt,
Wings, Wings,
Asteroid, Asteroid,
Bra,
} }
pub enum LogLevel { pub enum LogLevel {

View file

@ -29,6 +29,7 @@ impl Plugin for LoadPlugin {
pub fn asset_name_to_path(name: &str) -> &'static str { 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_bra" => "models/ar_bra.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_nekomimi" => "models/ar_nekomimi.gltf#Scene0",
"suit_ar_hoodie" => "models/ar_hoodie.gltf#Scene0", "suit_ar_hoodie" => "models/ar_hoodie.gltf#Scene0",