Browse Source

[godot] Normal map support + example.

badlogic 3 năm trước cách đây
mục cha
commit
33ea04646a
24 tập tin đã thay đổi với 1219 bổ sung1550 xóa
  1. 32 0
      examples/export/runtimes.sh
  2. BIN
      examples/raptor/manual-maps/light-sprite.png
  3. BIN
      spine-godot/example-v4/assets/raptor/light-sprite.png
  4. BIN
      spine-godot/example-v4/assets/raptor/n_raptor.png
  5. 539 769
      spine-godot/example-v4/assets/spineboy/spineboy-pro.json
  6. BIN
      spine-godot/example/assets/raptor/light-sprite.png
  7. 35 0
      spine-godot/example/assets/raptor/light-sprite.png.import
  8. BIN
      spine-godot/example/assets/raptor/n_raptor.png
  9. 35 0
      spine-godot/example/assets/raptor/n_raptor.png.import
  10. 0 0
      spine-godot/example/assets/raptor/raptor-data.tres
  11. 0 0
      spine-godot/example/assets/spineboy/spineboy-data-res.tres
  12. 539 769
      spine-godot/example/assets/spineboy/spineboy-pro.json
  13. 1 1
      spine-godot/example/examples/01-helloworld/helloworld.tscn
  14. 1 1
      spine-godot/example/examples/02-animation-state-listeners/animation-state-listeners.tscn
  15. 1 1
      spine-godot/example/examples/04-simple-input/simple-input.tscn
  16. 1 1
      spine-godot/example/examples/05-mouse-following/mouse-following.tscn
  17. 1 1
      spine-godot/example/examples/06-bone-following/bone-following.tscn
  18. 2 2
      spine-godot/example/examples/07-slot-node/slot-node.tscn
  19. 2 2
      spine-godot/example/examples/08-animation-player/animation-player.tscn
  20. 1 1
      spine-godot/example/examples/09-custom-material/custom-material.tscn
  21. 4 0
      spine-godot/example/examples/10-2d-lighting/2d-lighting.gd
  22. 23 0
      spine-godot/example/examples/10-2d-lighting/2d-lighting.tscn
  23. 1 1
      spine-godot/example/tests/batch-test.tscn
  24. 1 1
      spine-godot/example/tests/unit-tests.tscn

+ 32 - 0
examples/export/runtimes.sh

@@ -87,11 +87,14 @@ cp -f ../mix-and-match/export/mix-and-match.png "$ROOT/spine-cocos2dx/example/Re
 
 echo "spine-godot"
 rm -f "$ROOT"/spine-godot/example/assets/spineboy/*.atlas
+rm -f "$ROOT"/spine-godot/example/assets/spineboy/*.png
 rm -f "$ROOT"/spine-godot/example/assets/spineboy/*.json
 rm -f "$ROOT"/spine-godot/example/assets/spineboy/*.skel
 rm -f "$ROOT"/spine-godot/example/assets/raptor/*.atlas
+rm -f "$ROOT"/spine-godot/example/assets/raptor/*.png
 rm -f "$ROOT"/spine-godot/example/assets/raptor/*.skel
 rm -f "$ROOT"/spine-godot/example/assets/mix-and-match/*.atlas
+rm -f "$ROOT"/spine-godot/example/assets/mix-and-match/*.png
 rm -f "$ROOT"/spine-godot/example/assets/mix-and-match/*.json
 rm -f "$ROOT"/spine-godot/example/assets/mix-and-match/*.skel
 
@@ -107,6 +110,35 @@ cp -f ../mix-and-match/export/mix-and-match.png "$ROOT/spine-godot/example/asset
 cp -f ../raptor/export/raptor-pro.skel "$ROOT/spine-godot/example/assets/raptor/"
 cp -f ../raptor/export/raptor.atlas "$ROOT/spine-godot/example/assets/raptor/"
 cp -f ../raptor/export/raptor.png "$ROOT/spine-godot/example/assets/raptor/"
+cp -f ../raptor/manual-maps/raptor-normals.png "$ROOT/spine-godot/example/assets/raptor/n_raptor.png"
+cp -f ../raptor/manual-maps/light-sprite.png "$ROOT/spine-godot/example/assets/raptor/light-sprite.png"
+
+rm -f "$ROOT"/spine-godot/example-v4/assets/spineboy/*.atlas
+rm -f "$ROOT"/spine-godot/example-v4/assets/spineboy/*.png
+rm -f "$ROOT"/spine-godot/example-v4/assets/spineboy/*.json
+rm -f "$ROOT"/spine-godot/example-v4/assets/spineboy/*.skel
+rm -f "$ROOT"/spine-godot/example-v4/assets/raptor/*.atlas
+rm -f "$ROOT"/spine-godot/example-v4/assets/raptor/*.png
+rm -f "$ROOT"/spine-godot/example-v4/assets/raptor/*.skel
+rm -f "$ROOT"/spine-godot/example-v4/assets/mix-and-match/*.atlas
+rm -f "$ROOT"/spine-godot/example-v4/assets/mix-and-match/*.png
+rm -f "$ROOT"/spine-godot/example-v4/assets/mix-and-match/*.json
+rm -f "$ROOT"/spine-godot/example-v4/assets/mix-and-match/*.skel
+
+cp -f ../spineboy/export/spineboy-pro.json "$ROOT/spine-godot/example-v4/assets/spineboy/"
+cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-godot/example-v4/assets/spineboy/"
+cp -f ../spineboy/export/spineboy.atlas "$ROOT/spine-godot/example-v4/assets/spineboy/"
+cp -f ../spineboy/export/spineboy.png "$ROOT/spine-godot/example-v4/assets/spineboy/"
+
+cp -f ../mix-and-match/export/mix-and-match-pro.json "$ROOT/spine-godot/example-v4/assets/mix-and-match/"
+cp -f ../mix-and-match/export/mix-and-match.atlas "$ROOT/spine-godot/example-v4/assets/mix-and-match/"
+cp -f ../mix-and-match/export/mix-and-match.png "$ROOT/spine-godot/example-v4/assets/mix-and-match/"
+
+cp -f ../raptor/export/raptor-pro.skel "$ROOT/spine-godot/example-v4/assets/raptor/"
+cp -f ../raptor/export/raptor.atlas "$ROOT/spine-godot/example-v4/assets/raptor/"
+cp -f ../raptor/export/raptor.png "$ROOT/spine-godot/example-v4/assets/raptor/"
+cp -f ../raptor/manual-maps/raptor-normals.png "$ROOT/spine-godot/example-v4/assets/raptor/n_raptor.png"
+cp -f ../raptor/manual-maps/light-sprite.png "$ROOT/spine-godot/example-v4/assets/raptor/light-sprite.png"
 
 echo "spine-sfml-c"
 rm "$ROOT/spine-sfml/c/data/"*

BIN
examples/raptor/manual-maps/light-sprite.png


BIN
spine-godot/example-v4/assets/raptor/light-sprite.png


BIN
spine-godot/example-v4/assets/raptor/n_raptor.png


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 539 - 769
spine-godot/example-v4/assets/spineboy/spineboy-pro.json


BIN
spine-godot/example/assets/raptor/light-sprite.png


+ 35 - 0
spine-godot/example/assets/raptor/light-sprite.png.import

@@ -0,0 +1,35 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/light-sprite.png-346e910021b52658f1de723e4c80e05e.stex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/raptor/light-sprite.png"
+dest_files=[ "res://.import/light-sprite.png-346e910021b52658f1de723e4c80e05e.stex" ]
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+process/invert_color=false
+process/normal_map_invert_y=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0

BIN
spine-godot/example/assets/raptor/n_raptor.png


+ 35 - 0
spine-godot/example/assets/raptor/n_raptor.png.import

@@ -0,0 +1,35 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/n_raptor.png-d9af68b4a56af2b4319bb485e366dc90.stex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/raptor/n_raptor.png"
+dest_files=[ "res://.import/n_raptor.png-d9af68b4a56af2b4319bb485e366dc90.stex" ]
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+process/invert_color=false
+process/normal_map_invert_y=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0

+ 0 - 0
spine-godot/example/assets/raptor/raprot-data.tres → spine-godot/example/assets/raptor/raptor-data.tres


+ 0 - 0
spine-godot/example/assets/spineboy/spinebody-data-res.tres → spine-godot/example/assets/spineboy/spineboy-data-res.tres


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 539 - 769
spine-godot/example/assets/spineboy/spineboy-pro.json


+ 1 - 1
spine-godot/example/examples/01-helloworld/helloworld.tscn

@@ -1,7 +1,7 @@
 [gd_scene load_steps=3 format=2]
 
 [ext_resource path="res://examples/01-helloworld/spineboy-helloworld.gd" type="Script" id=1]
-[ext_resource path="res://assets/spineboy/spinebody-data-res.tres" type="SpineSkeletonDataResource" id=3]
+[ext_resource path="res://assets/spineboy/spineboy-data-res.tres" type="SpineSkeletonDataResource" id=3]
 
 [node name="Node2D" type="Node2D"]
 

+ 1 - 1
spine-godot/example/examples/02-animation-state-listeners/animation-state-listeners.tscn

@@ -1,7 +1,7 @@
 [gd_scene load_steps=4 format=2]
 
 [ext_resource path="res://examples/02-animation-state-listeners/animation-state-listeners.gd" type="Script" id=1]
-[ext_resource path="res://assets/spineboy/spinebody-data-res.tres" type="SpineSkeletonDataResource" id=2]
+[ext_resource path="res://assets/spineboy/spineboy-data-res.tres" type="SpineSkeletonDataResource" id=2]
 [ext_resource path="res://assets/footstep.ogg" type="AudioStream" id=3]
 
 [node name="Node2D" type="Node2D"]

+ 1 - 1
spine-godot/example/examples/04-simple-input/simple-input.tscn

@@ -1,6 +1,6 @@
 [gd_scene load_steps=3 format=2]
 
-[ext_resource path="res://assets/spineboy/spinebody-data-res.tres" type="SpineSkeletonDataResource" id=1]
+[ext_resource path="res://assets/spineboy/spineboy-data-res.tres" type="SpineSkeletonDataResource" id=1]
 [ext_resource path="res://examples/04-simple-input/spineboy-simple-input.gd" type="Script" id=2]
 
 [node name="Node2D" type="Node2D"]

+ 1 - 1
spine-godot/example/examples/05-mouse-following/mouse-following.tscn

@@ -1,7 +1,7 @@
 [gd_scene load_steps=3 format=2]
 
 [ext_resource path="res://examples/05-mouse-following/mouse-following.gd" type="Script" id=1]
-[ext_resource path="res://assets/spineboy/spinebody-data-res.tres" type="SpineSkeletonDataResource" id=2]
+[ext_resource path="res://assets/spineboy/spineboy-data-res.tres" type="SpineSkeletonDataResource" id=2]
 
 [node name="Node2D" type="Node2D"]
 script = ExtResource( 1 )

+ 1 - 1
spine-godot/example/examples/06-bone-following/bone-following.tscn

@@ -1,6 +1,6 @@
 [gd_scene load_steps=4 format=2]
 
-[ext_resource path="res://assets/spineboy/spinebody-data-res.tres" type="SpineSkeletonDataResource" id=1]
+[ext_resource path="res://assets/spineboy/spineboy-data-res.tres" type="SpineSkeletonDataResource" id=1]
 [ext_resource path="res://examples/06-bone-following/bone-following.gd" type="Script" id=2]
 [ext_resource path="res://icon.png" type="Texture" id=3]
 

+ 2 - 2
spine-godot/example/examples/07-slot-node/slot-node.tscn

@@ -1,8 +1,8 @@
 [gd_scene load_steps=5 format=2]
 
 [ext_resource path="res://examples/07-slot-node/slot-node.gd" type="Script" id=1]
-[ext_resource path="res://assets/spineboy/spinebody-data-res.tres" type="SpineSkeletonDataResource" id=2]
-[ext_resource path="res://assets/raptor/raprot-data.tres" type="SpineSkeletonDataResource" id=3]
+[ext_resource path="res://assets/spineboy/spineboy-data-res.tres" type="SpineSkeletonDataResource" id=2]
+[ext_resource path="res://assets/raptor/raptor-data.tres" type="SpineSkeletonDataResource" id=3]
 [ext_resource path="res://icon.png" type="Texture" id=4]
 
 [node name="Node2D" type="Node2D"]

+ 2 - 2
spine-godot/example/examples/08-animation-player/animation-player.tscn

@@ -1,8 +1,8 @@
 [gd_scene load_steps=64 format=2]
 
-[ext_resource path="res://assets/spineboy/spinebody-data-res.tres" type="SpineSkeletonDataResource" id=1]
+[ext_resource path="res://assets/spineboy/spineboy-data-res.tres" type="SpineSkeletonDataResource" id=1]
 [ext_resource path="res://examples/08-animation-player/animation-player.gd" type="Script" id=2]
-[ext_resource path="res://assets/raptor/raprot-data.tres" type="SpineSkeletonDataResource" id=3]
+[ext_resource path="res://assets/raptor/raptor-data.tres" type="SpineSkeletonDataResource" id=3]
 
 [sub_resource type="Animation" id=84]
 resource_name = "RESET"

+ 1 - 1
spine-godot/example/examples/09-custom-material/custom-material.tscn

@@ -1,6 +1,6 @@
 [gd_scene load_steps=6 format=2]
 
-[ext_resource path="res://assets/spineboy/spinebody-data-res.tres" type="SpineSkeletonDataResource" id=1]
+[ext_resource path="res://assets/spineboy/spineboy-data-res.tres" type="SpineSkeletonDataResource" id=1]
 
 [sub_resource type="Shader" id=1]
 code = "shader_type canvas_item;

+ 4 - 0
spine-godot/example/examples/10-2d-lighting/2d-lighting.gd

@@ -0,0 +1,4 @@
+extends Node2D
+
+func _ready():
+	$SpineSprite.get_animation_state().set_animation("walk");

+ 23 - 0
spine-godot/example/examples/10-2d-lighting/2d-lighting.tscn

@@ -0,0 +1,23 @@
+[gd_scene load_steps=4 format=2]
+
+[ext_resource path="res://assets/raptor/raptor-data.tres" type="SpineSkeletonDataResource" id=1]
+[ext_resource path="res://assets/raptor/light-sprite.png" type="Texture" id=2]
+[ext_resource path="res://examples/10-2d-lighting/2d-lighting.gd" type="Script" id=3]
+
+[node name="Node2D" type="Node2D"]
+script = ExtResource( 3 )
+
+[node name="SpineSprite" type="SpineSprite" parent="."]
+position = Vector2( 576, 506 )
+scale = Vector2( 0.458967, 0.458967 )
+skeleton_data_res = ExtResource( 1 )
+
+[node name="Light2D" type="Light2D" parent="."]
+position = Vector2( 822, 270 )
+scale = Vector2( 1.51563, 1.51563 )
+texture = ExtResource( 2 )
+color = Color( 1, 0.0117647, 0.0117647, 1 )
+range_height = 41.5
+
+[node name="CanvasModulate" type="CanvasModulate" parent="."]
+color = Color( 0.145098, 0.0980392, 0.0980392, 1 )

+ 1 - 1
spine-godot/example/tests/batch-test.tscn

@@ -1,6 +1,6 @@
 [gd_scene load_steps=3 format=2]
 
-[ext_resource path="res://assets/spineboy/spinebody-data-res.tres" type="SpineSkeletonDataResource" id=1]
+[ext_resource path="res://assets/spineboy/spineboy-data-res.tres" type="SpineSkeletonDataResource" id=1]
 [ext_resource path="res://tests/batch-test.gd" type="Script" id=2]
 
 [node name="Node2D" type="Node2D"]

+ 1 - 1
spine-godot/example/tests/unit-tests.tscn

@@ -1,7 +1,7 @@
 [gd_scene load_steps=3 format=2]
 
 [ext_resource path="res://tests/unit-tests.gd" type="Script" id=1]
-[ext_resource path="res://assets/spineboy/spinebody-data-res.tres" type="SpineSkeletonDataResource" id=2]
+[ext_resource path="res://assets/spineboy/spineboy-data-res.tres" type="SpineSkeletonDataResource" id=2]
 
 [node name="Node2D" type="Node2D"]
 position = Vector2( 496.659, 431.634 )

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác