Skip to content

Commit

Permalink
Merge pull request #200 from SpriteStudio/feature/replace_meshcell
Browse files Browse the repository at this point in the history
feature/replace meshcell
  • Loading branch information
SpriteStudio authored Aug 5, 2024
2 parents fd3cf0f + 3e6ba73 commit 7828c94
Show file tree
Hide file tree
Showing 9 changed files with 2,198 additions and 38 deletions.
Binary file added TestData/SimpleMeshParts/common_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
680 changes: 680 additions & 0 deletions TestData/SimpleMeshParts/common_1.ssce

Large diffs are not rendered by default.

Binary file added TestData/SimpleMeshParts/common_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
680 changes: 680 additions & 0 deletions TestData/SimpleMeshParts/common_2.ssce

Large diffs are not rendered by default.

519 changes: 519 additions & 0 deletions TestData/SimpleMeshParts/mesh_parts.ssae

Large diffs are not rendered by default.

Binary file not shown.
247 changes: 247 additions & 0 deletions TestData/SimpleMeshParts/simple_mesh_parts.sspj
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<SpriteStudioProject version="2.01.02" editorVersion="7.2.3">
<name>simple_mesh_parts</name>
<exportPath></exportPath>
<settings>
<animeBaseDirectory></animeBaseDirectory>
<cellMapBaseDirectory></cellMapBaseDirectory>
<imageBaseDirectory></imageBaseDirectory>
<effectBaseDirectory></effectBaseDirectory>
<exportBaseDirectory>Export</exportBaseDirectory>
<queryExportBaseDirectory>1</queryExportBaseDirectory>
<copyWhenImportImageIsOutside>1</copyWhenImportImageIsOutside>
<exportAnimeFileFormat>SSAX</exportAnimeFileFormat>
<exportCellMapFileFormat>invalid</exportCellMapFileFormat>
<exportCellMap>0</exportCellMap>
<copyImageWhenExportCellmap>1</copyImageWhenExportCellmap>
<ssConverterOptions></ssConverterOptions>
<player>any</player>
<signal></signal>
<strictVer4>0</strictVer4>
<dontUseMatrixForTransform>0</dontUseMatrixForTransform>
<rootPartFunctionAsVer4>0</rootPartFunctionAsVer4>
<interpolateColorBlendAsVer4>1</interpolateColorBlendAsVer4>
<interpolateVertexOffsetAsVer4>1</interpolateVertexOffsetAsVer4>
<restrictXYAsInteger>0</restrictXYAsInteger>
<inheritRatesNoKeySave>1</inheritRatesNoKeySave>
<availableInterpolationTypes>
<item>none</item>
<item>linear</item>
<item>hermite</item>
<item>bezier</item>
<item>acceleration</item>
<item>deceleration</item>
<item>easeIn</item>
<item>easeOut</item>
<item>easeInOut</item>
<item>easeExponentialIn</item>
<item>easeExponentialOut</item>
<item>easeExponentialInOut</item>
<item>easeSineIn</item>
<item>easeSineOut</item>
<item>easeSineInOut</item>
<item>easeElasticIn</item>
<item>easeElasticOut</item>
<item>easeElasticInOut</item>
<item>easeBounceIn</item>
<item>easeBounceOut</item>
<item>easeBounceInOut</item>
<item>easeBackIn</item>
<item>easeBackOut</item>
<item>easeBackInOut</item>
</availableInterpolationTypes>
<availableAttributes>
<item>CELL</item>
<item>POSX</item>
<item>POSY</item>
<item>POSZ</item>
<item>ROTX</item>
<item>ROTY</item>
<item>ROTZ</item>
<item>SCLX</item>
<item>SCLY</item>
<item>LSCX</item>
<item>LSCY</item>
<item>ALPH</item>
<item>LALP</item>
<item>PRIO</item>
<item>IFLH</item>
<item>IFLV</item>
<item>HIDE</item>
<item>PCOL</item>
<item>SHDR</item>
<item>VERT</item>
<item>PVTX</item>
<item>PVTY</item>
<item>SIZX</item>
<item>SIZY</item>
<item>UVTX</item>
<item>UVTY</item>
<item>UVRZ</item>
<item>UVSX</item>
<item>UVSY</item>
<item>BNDR</item>
<item>MASK</item>
<item>USER</item>
<item>SIGN</item>
<item>IPRM</item>
<item>EFCT</item>
<item>DEFM</item>
<item>ADIO</item>
<item>TCHG</item>
</availableAttributes>
<availableFeatures>
<value>bone</value>
<value>effect</value>
<value>mask</value>
<value>mesh</value>
<value>nines</value>
<value>shape</value>
<value>sound</value>
<value>text</value>
<value>v6mask</value>
</availableFeatures>
<defaultSetAttributes>
<item>POSX</item>
<item>POSY</item>
<item>ROTZ</item>
<item>PRIO</item>
<item>HIDE</item>
</defaultSetAttributes>
<wrapMode>clamp</wrapMode>
<filterMode>linear</filterMode>
<interpolationType>linear</interpolationType>
<coordUnit>rate</coordUnit>
<renderingSettings>
<outputFolder>D:/Downloads/SS_RenderingTest/721</outputFolder>
<outputType>MP4</outputType>
<outStartNum>0</outStartNum>
<frameInterval>1</frameInterval>
<loopCount>0</loopCount>
<bgColor>FF00FBFF</bgColor>
<addAnimeName>0</addAnimeName>
<addTimeStamp>0</addTimeStamp>
<addAlphaChanel>0</addAlphaChanel>
<outputPreviewHTML>0</outputPreviewHTML>
<imageSizeRatioW>50</imageSizeRatioW>
<imageSizeRatioH>25</imageSizeRatioH>
<imageSizeRatioFix>1</imageSizeRatioFix>
<imageSizeIsPixcel>1</imageSizeIsPixcel>
<imageSizeExpansion0>0</imageSizeExpansion0>
<imageSizeExpansion1>0</imageSizeExpansion1>
<imageSizeExpansion2>0</imageSizeExpansion2>
<imageSizeExpansion3>0</imageSizeExpansion3>
<webpSettings>
<lossyType>lossless</lossyType>
<qualityFactor>75</qualityFactor>
<compMethod>4</compMethod>
<useLoselessPreset>1</useLoselessPreset>
<losslessPreset>0</losslessPreset>
</webpSettings>
<mp4Settings>
<bitrate>1536000</bitrate>
</mp4Settings>
<ssSettings>
<width>4096</width>
<height>4096</height>
<square>0</square>
<samecell>0</samecell>
</ssSettings>
</renderingSettings>
<effectSettings>
<gridSize>50</gridSize>
</effectSettings>
<cellTags />
<useDecimalDigit>2</useDecimalDigit>
<opacifyOutsideCanvasFrame>1</opacifyOutsideCanvasFrame>
<convertImageToPMA>0</convertImageToPMA>
<blendImageAsPMA>0</blendImageAsPMA>
<unpremultiplyAlpha>0</unpremultiplyAlpha>
<vertexAnimeFloat>1</vertexAnimeFloat>
<allowNPOT>0</allowNPOT>
<maxLoadableImageWidth>8192</maxLoadableImageWidth>
<maxLoadableImageHeight>8192</maxLoadableImageHeight>
<maxLoadableImageFileSize>73400320</maxLoadableImageFileSize>
<instanceStackMax>100</instanceStackMax>
<selectedAttrSelPreset>0</selectedAttrSelPreset>
<attrSelPresetNameA></attrSelPresetNameA>
<attrSelPresetA />
<attrSelPresetNameB></attrSelPresetNameB>
<attrSelPresetB />
<attrSelPresetNameC></attrSelPresetNameC>
<attrSelPresetC />
<attrSelPresetNameD></attrSelPresetNameD>
<attrSelPresetD />
<attrSelPresetNameE></attrSelPresetNameE>
<attrSelPresetE />
<attrSelPresetNameF></attrSelPresetNameF>
<attrSelPresetF />
<attrSelPresetNameG></attrSelPresetNameG>
<attrSelPresetG />
<attrSelPresetNameH></attrSelPresetNameH>
<attrSelPresetH />
<attrSelPresetNameI></attrSelPresetNameI>
<attrSelPresetI />
<attrSelPresetNameJ></attrSelPresetNameJ>
<attrSelPresetJ />
</settings>
<animeSettings>
<fps>30</fps>
<frameCount>11</frameCount>
<sortMode>prio</sortMode>
<canvasSize>320 320</canvasSize>
<pivot>0 0</pivot>
<bgColor>FF323232</bgColor>
<gridSize>32</gridSize>
<gridColor>FF808080</gridColor>
<ik_depth>3</ik_depth>
<startFrame>0</startFrame>
<endFrame>10</endFrame>
<bgSettings>
<value>
<imagePath></imagePath>
<imageDisp>1</imageDisp>
<imageOffset>0 0</imageOffset>
<imageCanvas>0 0</imageCanvas>
<imagePivot>0 0</imagePivot>
</value>
<value>
<imagePath></imagePath>
<imageDisp>1</imageDisp>
<imageOffset>0 0</imageOffset>
<imageCanvas>0 0</imageCanvas>
<imagePivot>0 0</imagePivot>
</value>
</bgSettings>
<playArea.isON>0</playArea.isON>
<playArea.start>0</playArea.start>
<playArea.end>0</playArea.end>
</animeSettings>
<texPackSettings>
<maxSize>4096 4096</maxSize>
<forcePo2>1</forcePo2>
<forceSquare>0</forceSquare>
<margin>0</margin>
<padding>1</padding>
</texPackSettings>
<cellmapNames>
<value>common_1.ssce</value>
<value>common_2.ssce</value>
</cellmapNames>
<animepackNames>
<value>mesh_parts.ssae</value>
</animepackNames>
<ExternalTextures>
<files />
</ExternalTextures>
<lastAnimeFile>mesh_parts.ssae</lastAnimeFile>
<lastAnimeName>anime_1</lastAnimeName>
<lastPart>mesh_deform</lastPart>
<lastCellMapFile>common_1.ssce</lastCellMapFile>
<lastCell>Arrow_mesh</lastCell>
<lastCharMapFile></lastCharMapFile>
<lastEffectFile></lastEffectFile>
<setupmode>0</setupmode>
<expandAnimation />
<expandSequence />
</SpriteStudioProject>
18 changes: 18 additions & 0 deletions packages/ss6player-pixi/Player/sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
//const testVersion = "sampleAnimation2";
const testVersion = "sampleAnimation3";
//const testVersion = "sampleReplaceTexture";
//const testVersion = "sampleReplaceMeshTexture";

(async () => {
PIXI.sayHello();
Expand Down Expand Up @@ -50,6 +51,11 @@ const testVersion = "sampleAnimation3";
"sampleReplaceTexture": {
"ssfbFile": "../../../TestData/MeshBone/Knight.ssfb",
"func": Play_sampleReplaceTexture
},

"sampleReplaceMeshTexture": {
"ssfbFile": "../../../TestData/SimpleMeshParts/simple_mesh_parts.ssfb",
"func": Play_sampleReplaceMeshTexture
}
};

Expand Down Expand Up @@ -133,4 +139,16 @@ const testVersion = "sampleAnimation3";
// 再生開始
mySS6Player.Play();
}

function Play_sampleReplaceMeshTexture() {
let mySS6Player = new ss6PlayerPixi.SS6Player(mySS6Project);
mySS6Player.Setup('mesh_parts', 'anime_1');
mySS6Player.position = new PIXI.Point(320, 480);
mySS6Player.SetPartCell('mesh_skinned', 'common_1', 'Red');
app.stage.addChild(mySS6Player);

// 再生開始
mySS6Player.Play();
}

})();
Loading

0 comments on commit 7828c94

Please sign in to comment.