Skip to content

Commit

Permalink
Added support for spine models
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Mar 5, 2018
1 parent ce7984f commit 0147602
Show file tree
Hide file tree
Showing 36 changed files with 2,576 additions and 29 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ The following tags are supported:
| i | The text should be italic | `<i>Foobar</i>` |
| size | Change text size, relative to default size | `<size="2">Twice as large</size>` |
| color | Change text color | `<color=red>Foobar</color>` |
| | | `<color=1.0,0,0,1.0>Foobar</color>` |
| | | `<color=1.0,0,0,1.0>Foobar</color>` |
| | | `<color=#ff0000>Foobar</color>` |
| | | `<color=#ff0000ff>Foobar</color>` |
| font | Change font | `<font=MyCoolFont>Foobar</font>` |
| img | Display image | `<img=texture:image/>` |
| spine | Display spine model | `<spine=scene:anim/>` |
| br | Insert a line break (see notes on linebreak) | `<br/>` |

### Line breaks
Expand Down Expand Up @@ -168,7 +169,7 @@ Truncate a text such that only a specific number of characters and images are vi


### richtext.length(text)
Get the length of a text ignoring any tags except image tags which are treated as having a length of 1.
Get the length of a text ignoring any tags except image and spine tags which are treated as having a length of 1.

**PARAMETERS**
* `text` (string|table) - The text to measure. This can either be a string or a list of words, as received by a call to `richtext.create()`.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/eye_surprised.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/eyes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/front_bracer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/front_foot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/front_shin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/front_thigh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/goggles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/gun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/head.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/mouth_grind.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/mouth_oooo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/mouth_smile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/muzzle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/neck.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/rear_bracer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/rear_foot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/rear_shin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/spineboy/rear_thigh.png
Binary file added example/assets/images/spineboy/rear_upper_arm.png
Binary file added example/assets/images/spineboy/torso.png
87 changes: 87 additions & 0 deletions example/assets/spineboy.atlas
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
images {
image: "/example/assets/images/spineboy/eye_indifferent.png"
}
images {
image: "/example/assets/images/spineboy/eye_surprised.png"
}
images {
image: "/example/assets/images/spineboy/eyes.png"
}
images {
image: "/example/assets/images/spineboy/front_bracer.png"
}
images {
image: "/example/assets/images/spineboy/front_fist_closed.png"
}
images {
image: "/example/assets/images/spineboy/front_fist_open.png"
}
images {
image: "/example/assets/images/spineboy/front_foot.png"
}
images {
image: "/example/assets/images/spineboy/front_foot_bend1.png"
}
images {
image: "/example/assets/images/spineboy/front_foot_bend2.png"
}
images {
image: "/example/assets/images/spineboy/front_shin.png"
}
images {
image: "/example/assets/images/spineboy/front_thigh.png"
}
images {
image: "/example/assets/images/spineboy/front_upper_arm.png"
}
images {
image: "/example/assets/images/spineboy/goggles.png"
}
images {
image: "/example/assets/images/spineboy/gun.png"
}
images {
image: "/example/assets/images/spineboy/head.png"
}
images {
image: "/example/assets/images/spineboy/mouth_grind.png"
}
images {
image: "/example/assets/images/spineboy/mouth_oooo.png"
}
images {
image: "/example/assets/images/spineboy/mouth_smile.png"
}
images {
image: "/example/assets/images/spineboy/muzzle.png"
}
images {
image: "/example/assets/images/spineboy/neck.png"
}
images {
image: "/example/assets/images/spineboy/rear_bracer.png"
}
images {
image: "/example/assets/images/spineboy/rear_foot.png"
}
images {
image: "/example/assets/images/spineboy/rear_foot_bend1.png"
}
images {
image: "/example/assets/images/spineboy/rear_foot_bend2.png"
}
images {
image: "/example/assets/images/spineboy/rear_shin.png"
}
images {
image: "/example/assets/images/spineboy/rear_thigh.png"
}
images {
image: "/example/assets/images/spineboy/rear_upper_arm.png"
}
images {
image: "/example/assets/images/spineboy/torso.png"
}
margin: 0
extrude_borders: 2
inner_padding: 0
Loading

0 comments on commit 0147602

Please sign in to comment.