Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
node-version: [20.x, 22.x]
node-version: [22.x, 24.x]

env:
CI: true
Expand Down
2 changes: 1 addition & 1 deletion docs/Player/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</head>
<body>
<!-- pixi.jsの読込 -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/8.10.1/pixi.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/8.12.0/pixi.min.js"></script>
<!-- ss6player -->
<script src="./ss6player-pixi.min.js"></script>
<!-- ユーザープログラムの読込 -->
Expand Down
4 changes: 2 additions & 2 deletions docs/Player/ss6player-pixi.min.js

Large diffs are not rendered by default.

106 changes: 97 additions & 9 deletions docs/Player/ss6player-pixi.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/Player6/ss6player-pixi6.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Player6/ss6player-pixi6.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ViewerPlayer/player.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<meta http-equiv=”Cache-Control” content=”no-cache”>
<title>SpriteStudio Web Player</title>
<!-- pixi.jsの読込 -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/8.10.1/pixi.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/8.12.0/pixi.min.js"></script>
<script src="./ss6player-viewer.min.js"></script>
<link rel="stylesheet" href="./player.css">

Expand Down
8 changes: 4 additions & 4 deletions docs/ViewerPlayer/ss6player-viewer.min.js

Large diffs are not rendered by default.

106 changes: 97 additions & 9 deletions docs/ViewerPlayer/ss6player-viewer.umd.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* -----------------------------------------------------------
* SS6Player For Viewer v1.5.3
* SS6Player For Viewer v1.6.0
*
* Copyright(C) CRI Middleware Co., Ltd.
* https://www.webtech.co.jp/
Expand Down Expand Up @@ -3134,6 +3134,8 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
this.prevCellID = [];
this.prevPartObject = [];
this.changeCellID = [];
this.changeVisible = [];
this.changeTint = [];
this.substituteOverWrite = [];
this.substituteKeyParam = [];
this.alphaBlendType = [];
Expand Down Expand Up @@ -3200,13 +3202,17 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
this.prevCellID = new Array(partsLength);
this.prevPartObject = new Array(partsLength);
this.changeCellID = new Array(partsLength);
this.changeVisible = new Array(partsLength);
this.changeTint = new Array(partsLength);
this.substituteOverWrite = new Array(partsLength);
this.substituteKeyParam = new Array(partsLength);
for (let j = 0; j < partsLength; j++) {
const index = animePackData.parts(j).index();
this.prevCellID[index] = -1;
this.prevPartObject[index] = null;
this.changeCellID[index] = -1;
this.changeVisible[index] = true;
this.changeTint[index] = null;
this.substituteOverWrite[index] = null;
this.substituteKeyParam[index] = null;
}
Expand Down Expand Up @@ -3485,7 +3491,13 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
}
return changeCellIndex;
}
getPartIndexFromName(partsname) {
/**
* Retrieves the index of a part based on its name from the anime pack data.
*
* @param {string} partsname - The name of the part to search for.
* @return {number} The index of the part if found, or -1 if the part is not found.
*/
GetPartIndexFromName(partsname) {
const animePackData = this.playerLib.animePackData;
const partsLength = animePackData.partsLength();
let partIndex = -1;
Expand All @@ -3507,16 +3519,87 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
* @param {string} sscename - セルマップ名
* @param {string} cellname - 表示させたいセル名
*
* @return {void}
* @return {[number, number]} [パーツ名の index, セル名 index] のタプルを返します。見つからない場合は -1 を返します。
*/
SetPartCell(partsname, sscename, cellname) {
let changeCellIndex = -1;
let partIndex = -1;
if (this.playerLib.animationData) {
const changeCellIndex = this.getCellIndex(sscename, cellname);
const partIndex = this.getPartIndexFromName(partsname);
if (partIndex !== -1) {
this.changeCellID[partIndex] = changeCellIndex;
}
changeCellIndex = this.getCellIndex(sscename, cellname);
partIndex = this.GetPartIndexFromName(partsname);
this.SetPartCellByIndex(partIndex, changeCellIndex);
}
return [partIndex, changeCellIndex];
}
/**
* パーツに割り当たるセルをインデックスで指定して変更します。
*
* @param {number} partIndex - The index of the part to be updated. Must not be -1 to perform the update.
* @param {number} changeCellIndex - The new cell index to set for the specified partIndex.
* @return {void} This method does not return a value.
*/
SetPartCellByIndex(partIndex, changeCellIndex) {
if (partIndex !== -1) {
this.changeCellID[partIndex] = changeCellIndex;
return true;
}
return false;
}
/**
* Sets the visibility of a specific part by its name.
*
* @param {string} partsname - The name of the part whose visibility is to be set.
* @param {boolean} visible - A boolean indicating whether the part should be visible (true) or hidden (false).
* @return {boolean} Returns true if the operation was successful, false otherwise.
*/
SetPartVisible(partsname, visible) {
if (this.playerLib.animationData) {
const partIndex = this.GetPartIndexFromName(partsname);
return this.SetPartVisibleByIndex(partIndex, visible);
}
return false;
}
/**
* Sets the visibility of a part identified by its index.
*
* @param {number} partIndex - The index of the part to update. Must not be -1.
* @param {boolean} visible - A boolean indicating whether the part should be visible (true) or hidden (false).
* @return {boolean} Returns true if the visibility was successfully updated, otherwise returns false.
*/
SetPartVisibleByIndex(partIndex, visible) {
if (partIndex !== -1) {
this.changeVisible[partIndex] = visible;
return true;
}
return false;
}
/**
* Sets the tint color for a specific part of the player's animation.
*
* @param {string} partName - The name of the part to apply the tint to.
* @param {number} tint - The tint value to apply, represented as a number.
* @return {boolean} Returns true if the tint was successfully applied; otherwise, returns false.
*/
SetPartTint(partName, tint) {
if (this.playerLib.animationData) {
const partIndex = this.GetPartIndexFromName(partName);
return this.SetPartTintByIndex(partIndex, tint);
}
return false;
}
/**
* Updates the tint color of a specific part identified by its index.
*
* @param {number} partIndex - The index of the part for which the tint needs to be set. A value of -1 indicates no part is targeted.
* @param {number} tint - The tint value to be applied to the specified part.
* @return {boolean} Returns true if the tint is successfully applied, otherwise returns false.
*/
SetPartTintByIndex(partIndex, tint) {
if (partIndex !== -1) {
this.changeTint[partIndex] = tint;
return true;
}
return false;
}
/**
* パーツの描画モードを取得する
Expand Down Expand Up @@ -3685,6 +3768,9 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
const l = fd.length;
for (let ii = 0; ii < l; ii = ii + 1 | 0) {
const i = this.playerLib.prio2index[ii];
if (!this.changeVisible[i]) {
continue;
}
const data = fd[i];
const origCellID = data.cellIndex;
const cellID = this.changeCellID[i] !== -1 ? this.changeCellID[i] : origCellID;
Expand Down Expand Up @@ -3928,7 +4014,9 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
const colorMatrix = this.GetColorMatrixFilter(data.colorBlendType, data.colorRate, data.colorArgb32);
mesh.filters = [colorMatrix];
}
if (data.tint) {
if (this.changeTint[i] !== null) {
mesh.tint = this.changeTint[i];
} else if (data.tint) {
mesh.tint = data.tint;
const ca = ((data.partsColorARGB & 4278190080) >>> 24) / 255;
mesh.alpha = mesh.alpha * ca;
Expand Down
4 changes: 2 additions & 2 deletions docs/mz/SampleProject/js/plugins/ss6player-rpgmakermz.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* -----------------------------------------------------------
* SS6Player For RPG Maker MZ v0.8.4
* SS6Player For RPG Maker MZ v0.8.5
*
* Copyright(C) CRI Middleware Co., Ltd.
* https://www.webtech.co.jp/
Expand All @@ -14,7 +14,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
/*:ja
* @target MZ
* @plugindesc SpriteStudio 7.0 & 6 アニメーション再生プラグイン
* @version 0.8.4
* @version 0.8.5
* @author CRI Middleware Co., Ltd.
* @url https://github.com/SpriteStudio/SS6PlayerForWeb/tree/master/packages/ss6player-rpgmakermz
* @help SS6Player for RPG Maker MZ
Expand Down
4 changes: 2 additions & 2 deletions docs/mz/ss6player-rpgmakermz.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* -----------------------------------------------------------
* SS6Player For RPG Maker MZ v0.8.4
* SS6Player For RPG Maker MZ v0.8.5
*
* Copyright(C) CRI Middleware Co., Ltd.
* https://www.webtech.co.jp/
Expand All @@ -14,7 +14,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
/*:ja
* @target MZ
* @plugindesc SpriteStudio 7.0 & 6 アニメーション再生プラグイン
* @version 0.8.4
* @version 0.8.5
* @author CRI Middleware Co., Ltd.
* @url https://github.com/SpriteStudio/SS6PlayerForWeb/tree/master/packages/ss6player-rpgmakermz
* @help SS6Player for RPG Maker MZ
Expand Down
Loading
Loading