Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
0.1.5版本,MOV与序列导出功能正常
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloento committed Jan 7, 2021
1 parent 85c85ee commit a982227
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SuperSpineViewer
一个拿来加载与导出Spine动画的工具
至少需要Java15才能运行
当前版本:0.1.4 快照测试版
当前版本:0.1.5 快照测试版

## 关于这个工具
它本质上是我学习Java和OpenJFX的练习作品
Expand Down
6 changes: 1 addition & 5 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.QYun</groupId>
<artifactId>SuperSpineViewer</artifactId>
<name>SuperSpineViewer</name>
<version>0.1.4</version>
<version>0.1.5</version>
<url>https://github.com/soarteam/SuperSpineViewer</url>
<developers>
<developer>
Expand Down Expand Up @@ -35,10 +35,6 @@
<version>3.8.1</version>
<configuration>
<compilerArgs>
<arg>--module-path</arg>
<arg>C:\Users\SoarT\scoop\apps\gluon-openjfx-sdk\current\lib</arg>
<arg>--add-modules</arg>
<arg>javafx.controls,javafx.fxml</arg>
<arg>--add-reads</arg>
<arg>javafx.graphics=ALL-UNNAMED</arg>
<arg>--add-exports</arg>
Expand Down
23 changes: 8 additions & 15 deletions src/main/java/com/QYun/JavaFX/RecordFX.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public RecordFX(Node node) {
if (waiting > 3 && !exporting) {
waiting = 0;
exporting = true;
new Thread("Saving") {
new Thread("RecordFX_Saving") {
@Override
public void run() {
new File(rootPath + "Sequence/").mkdirs();
Expand Down Expand Up @@ -182,21 +182,14 @@ private void encodeFX() {
@Override
protected Void call() {
new File(rootPath + "Sequence/").mkdirs();
if (!saveSequence) {
System.out.println("用ffmpeg编码");
while (exporting)
Thread.onSpinWait();
while (recordFrames.size() != 0) {
saveToArray(recordFrames.get(0));
recordFrames.remove(0);
}
ffmpegFX();
} else {
System.out.println("导出序列");
for (Image recordFrame : recordFrames)
saveToArray(recordFrame);
while (exporting)
Thread.onSpinWait();
while (recordFrames.size() != 0) {
saveToArray(recordFrames.get(0));
recordFrames.remove(0);
}
recordFrames.clear();
if (!saveSequence)
ffmpegFX();
System.gc();
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ void B_Export() {
sequence = true;
RecordFX recordFX = new RecordFX(Objects.requireNonNull(spineRender));
spine.setIsLoop(false);
spine.setSpeed(1);
recordFX.startRecording(path, spine.getProjectName(), spine.getDuration(), 60f, sequence);
spine.setSpeed(0.5f);
recordFX.startRecording(path, spine.getProjectName(), spine.getDuration(), 120f, sequence);
spine.setIsPlay(true);
}
}
Expand Down

0 comments on commit a982227

Please sign in to comment.