added 3d card
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
class_name PlayingCard
|
||||
extends StaticBody3D
|
||||
|
||||
@export var card_mesh: MeshInstance3D
|
||||
@export var front_texture: Texture
|
||||
var card_details: Card
|
||||
|
||||
func _ready() -> void:
|
||||
set_front_texture(front_texture)
|
||||
|
||||
func set_front_texture(texture: Texture) -> void:
|
||||
card_mesh.get_surface_override_material(0).albedo_texture = front_texture
|
||||
@@ -0,0 +1 @@
|
||||
uid://c2odugkbbppxn
|
||||
Binary file not shown.
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dxiv47be5dsll"
|
||||
path="res://.godot/imported/playing_card.glb-140e841cc7044d46be5ca25f58dcd6a3.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://cards/playing_card.glb"
|
||||
dest_files=["res://.godot/imported/playing_card.glb-140e841cc7044d46be5ca25f58dcd6a3.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
||||
@@ -0,0 +1,30 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://b55xpcxk7g5ph"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c2odugkbbppxn" path="res://cards/playing_card.gd" id="1_t6o5d"]
|
||||
[ext_resource type="PackedScene" uid="uid://dxiv47be5dsll" path="res://cards/playing_card.glb" id="2_enav7"]
|
||||
[ext_resource type="Texture2D" uid="uid://i0wpcxpk7g2c" path="res://cards/textures/front_test.webp" id="3_jeoeb"]
|
||||
[ext_resource type="Texture2D" uid="uid://cih4y1hskimrs" path="res://cards/textures/back_test.webp" id="4_exvuq"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nwj5s"]
|
||||
resource_local_to_scene = true
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_hel13"]
|
||||
albedo_color = Color(0, 0, 0, 1)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_auvip"]
|
||||
albedo_texture = ExtResource("4_exvuq")
|
||||
|
||||
[node name="PlayingCard" type="StaticBody3D" node_paths=PackedStringArray("card_mesh")]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
|
||||
script = ExtResource("1_t6o5d")
|
||||
card_mesh = NodePath("PlayingCard/Cube")
|
||||
front_texture = ExtResource("3_jeoeb")
|
||||
|
||||
[node name="PlayingCard" parent="." instance=ExtResource("2_enav7")]
|
||||
|
||||
[node name="Cube" parent="PlayingCard" index="0"]
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_nwj5s")
|
||||
surface_material_override/1 = SubResource("StandardMaterial3D_hel13")
|
||||
surface_material_override/2 = SubResource("StandardMaterial3D_auvip")
|
||||
|
||||
[editable path="PlayingCard"]
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cih4y1hskimrs"
|
||||
path.s3tc="res://.godot/imported/back_test.webp-f0536195b066a620ab334e50205f1339.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://cards/textures/back_test.webp"
|
||||
dest_files=["res://.godot/imported/back_test.webp-f0536195b066a620ab334e50205f1339.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://i0wpcxpk7g2c"
|
||||
path.s3tc="res://.godot/imported/front_test.webp-a2de17f4a63d651cf42c323e0081216f.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://cards/textures/front_test.webp"
|
||||
dest_files=["res://.godot/imported/front_test.webp-a2de17f4a63d651cf42c323e0081216f.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
@@ -1,13 +1,19 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://gqrdpjslr4np"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://gqrdpjslr4np"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://p5gvnyhjqe6o" path="res://components/web_client_tcp.gd" id="1_feb5d"]
|
||||
[ext_resource type="Script" uid="uid://c0cqkatyo4uj1" path="res://components/client_interface.gd" id="2_e2o6t"]
|
||||
[ext_resource type="Script" uid="uid://utt8atbh7b2a" path="res://game_client.gd" id="3_feb5d"]
|
||||
[ext_resource type="PackedScene" uid="uid://b55xpcxk7g5ph" path="res://cards/playing_card.tscn" id="4_fc0e3"]
|
||||
|
||||
[sub_resource type="SystemFont" id="SystemFont_80nbo"]
|
||||
font_names = PackedStringArray("IBM Plex Mono")
|
||||
font_weight = 500
|
||||
|
||||
[sub_resource type="Environment" id="Environment_fc0e3"]
|
||||
ambient_light_source = 2
|
||||
ambient_light_color = Color(1, 1, 1, 1)
|
||||
ambient_light_energy = 0.15
|
||||
|
||||
[node name="Game" type="Node"]
|
||||
|
||||
[node name="WebClientTCP" type="Node" parent="."]
|
||||
@@ -155,6 +161,24 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
text = "Start Game!"
|
||||
|
||||
[node name="Node3D" type="Node3D" parent="."]
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="Node3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.997882, 0.0650548, 0, -0.0650548, 0.997882, 0, 0.171315, 1.65638)
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="Node3D"]
|
||||
billboard = 1
|
||||
text = "Magician Online!"
|
||||
|
||||
[node name="PlayingCard" parent="Node3D" instance=ExtResource("4_fc0e3")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.6767)
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="Node3D"]
|
||||
transform = Transform3D(0.970511, 0, 0.241058, -0.137972, 0.820002, 0.555482, -0.197668, -0.572361, 0.795821, 2.41581, 2.80426, 0)
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="Node3D"]
|
||||
environment = SubResource("Environment_fc0e3")
|
||||
|
||||
[connection signal="client_joined_lobby" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_client_joined_lobby"]
|
||||
[connection signal="client_joined_lobby" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_client_joined_lobby"]
|
||||
[connection signal="client_left_lobby" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_client_left_lobby"]
|
||||
|
||||
Reference in New Issue
Block a user