@drincs/pixi-vn-json 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes/LabelJson.cjs +1 -10
- package/dist/classes/LabelJson.d.cts +2 -6
- package/dist/classes/LabelJson.d.ts +2 -6
- package/dist/classes/LabelJson.js +2 -5
- package/dist/classes/index.cjs +1 -10
- package/dist/classes/index.d.cts +0 -4
- package/dist/classes/index.d.ts +0 -4
- package/dist/classes/index.js +2 -5
- package/dist/functions/importer.cjs +2 -12
- package/dist/functions/importer.d.cts +0 -3
- package/dist/functions/importer.d.ts +0 -3
- package/dist/functions/importer.js +3 -7
- package/dist/functions/index.cjs +1 -11
- package/dist/functions/index.d.cts +0 -3
- package/dist/functions/index.d.ts +0 -3
- package/dist/functions/index.js +2 -6
- package/dist/functions/utility.cjs +2 -9
- package/dist/functions/utility.js +3 -5
- package/dist/index.cjs +1 -11
- package/dist/index.d.cts +0 -4
- package/dist/index.d.ts +0 -4
- package/dist/index.js +2 -6
- package/dist/interface/PixiVNJson.d.cts +0 -3
- package/dist/interface/PixiVNJson.d.ts +0 -3
- package/dist/interface/PixiVNJsonLabelStep.d.cts +1 -4
- package/dist/interface/PixiVNJsonLabelStep.d.ts +1 -4
- package/dist/interface/PixiVNJsonLabels.d.cts +0 -3
- package/dist/interface/PixiVNJsonLabels.d.ts +0 -3
- package/dist/interface/PixiVNJsonMedia.d.cts +1 -3
- package/dist/interface/PixiVNJsonMedia.d.ts +1 -3
- package/dist/interface/PixiVNJsonMediaTransiotions.d.cts +1 -1
- package/dist/interface/PixiVNJsonMediaTransiotions.d.ts +1 -1
- package/dist/interface/PixiVNJsonOperations.d.cts +0 -2
- package/dist/interface/PixiVNJsonOperations.d.ts +0 -2
- package/dist/interface/index.d.cts +0 -3
- package/dist/interface/index.d.ts +0 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { narration, getFlag, storage, setFlag, ChoiceMenuOption, canvas, CanvasVideo, zoomIn, moveIn, showWithDissolveTransition, showWithFadeTransition, showVideo, showImage, sound } from '@drincs/pixi-vn';
|
|
2
|
-
import Te from '@drincs/pixi-vn/dist/classes/LabelAbstract';
|
|
3
|
-
import B from '@drincs/pixi-vn/dist/managers/NarrationManagerStatic';
|
|
4
|
-
import X from '@drincs/pixi-vn/dist/managers/StorageManagerStatic';
|
|
5
|
-
import { saveLabel } from '@drincs/pixi-vn/dist/decorators/LabelDecorator';
|
|
1
|
+
import { NarrationManagerStatic, narration, getFlag, StorageManagerStatic, storage, setFlag, LabelAbstract, ChoiceMenuOption, canvas, CanvasVideo, zoomIn, moveIn, showWithDissolveTransition, showWithFadeTransition, showVideo, showImage, sound, saveLabel } from '@drincs/pixi-vn';
|
|
6
2
|
|
|
7
|
-
var ne=Object.create;var G=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var ae=Object.getPrototypeOf,se=Object.prototype.hasOwnProperty;var j=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(i,n)=>(typeof require<"u"?require:i)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var M=(t,i)=>()=>(i||t((i={exports:{}}).exports,i),i.exports);var le=(t,i,n,e)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of oe(i))!se.call(t,o)&&o!==n&&G(t,o,{get:()=>i[o],enumerable:!(e=re(i,o))||e.enumerable});return t};var ue=(t,i,n)=>(n=t!=null?ne(ae(t)):{},le(G(n,"default",{value:t,enumerable:!0}),t));var W=M((L,z)=>{(function(t,i){typeof L=="object"?z.exports=L=i():typeof define=="function"&&define.amd?define([],i):t.CryptoJS=i();})(L,function(){var t=t||function(i,n){var e;if(typeof window<"u"&&window.crypto&&(e=window.crypto),typeof self<"u"&&self.crypto&&(e=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(e=globalThis.crypto),!e&&typeof window<"u"&&window.msCrypto&&(e=window.msCrypto),!e&&typeof global<"u"&&global.crypto&&(e=global.crypto),!e&&typeof j=="function")try{e=j("crypto");}catch{}var o=function(){if(e){if(typeof e.getRandomValues=="function")try{return e.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof e.randomBytes=="function")try{return e.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function r(){}return function(a){var g;return r.prototype=a,g=new r,r.prototype=null,g}}(),s={},p=s.lib={},x=p.Base=function(){return {extend:function(r){var a=l(this);return r&&a.mixIn(r),(!a.hasOwnProperty("init")||this.init===a.init)&&(a.init=function(){a.$super.init.apply(this,arguments);}),a.init.prototype=a,a.$super=this,a},create:function(){var r=this.extend();return r.init.apply(r,arguments),r},init:function(){},mixIn:function(r){for(var a in r)r.hasOwnProperty(a)&&(this[a]=r[a]);r.hasOwnProperty("toString")&&(this.toString=r.toString);},clone:function(){return this.init.prototype.extend(this)}}}(),m=p.WordArray=x.extend({init:function(r,a){r=this.words=r||[],a!=n?this.sigBytes=a:this.sigBytes=r.length*4;},toString:function(r){return (r||f).stringify(this)},concat:function(r){var a=this.words,g=r.words,h=this.sigBytes,T=r.sigBytes;if(this.clamp(),h%4)for(var N=0;N<T;N++){var D=g[N>>>2]>>>24-N%4*8&255;a[h+N>>>2]|=D<<24-(h+N)%4*8;}else for(var J=0;J<T;J+=4)a[h+J>>>2]=g[J>>>2];return this.sigBytes+=T,this},clamp:function(){var r=this.words,a=this.sigBytes;r[a>>>2]&=4294967295<<32-a%4*8,r.length=i.ceil(a/4);},clone:function(){var r=x.clone.call(this);return r.words=this.words.slice(0),r},random:function(r){for(var a=[],g=0;g<r;g+=4)a.push(o());return new m.init(a,r)}}),u=s.enc={},f=u.Hex={stringify:function(r){for(var a=r.words,g=r.sigBytes,h=[],T=0;T<g;T++){var N=a[T>>>2]>>>24-T%4*8&255;h.push((N>>>4).toString(16)),h.push((N&15).toString(16));}return h.join("")},parse:function(r){for(var a=r.length,g=[],h=0;h<a;h+=2)g[h>>>3]|=parseInt(r.substr(h,2),16)<<24-h%8*4;return new m.init(g,a/2)}},y=u.Latin1={stringify:function(r){for(var a=r.words,g=r.sigBytes,h=[],T=0;T<g;T++){var N=a[T>>>2]>>>24-T%4*8&255;h.push(String.fromCharCode(N));}return h.join("")},parse:function(r){for(var a=r.length,g=[],h=0;h<a;h++)g[h>>>2]|=(r.charCodeAt(h)&255)<<24-h%4*8;return new m.init(g,a)}},b=u.Utf8={stringify:function(r){try{return decodeURIComponent(escape(y.stringify(r)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(r){return y.parse(unescape(encodeURIComponent(r)))}},c=p.BufferedBlockAlgorithm=x.extend({reset:function(){this._data=new m.init,this._nDataBytes=0;},_append:function(r){typeof r=="string"&&(r=b.parse(r)),this._data.concat(r),this._nDataBytes+=r.sigBytes;},_process:function(r){var a,g=this._data,h=g.words,T=g.sigBytes,N=this.blockSize,D=N*4,J=T/D;r?J=i.ceil(J):J=i.max((J|0)-this._minBufferSize,0);var A=J*N,F=i.min(A*4,T);if(A){for(var R=0;R<A;R+=N)this._doProcessBlock(h,R);a=h.splice(0,A),g.sigBytes-=F;}return new m.init(a,F)},clone:function(){var r=x.clone.call(this);return r._data=this._data.clone(),r},_minBufferSize:0});p.Hasher=c.extend({cfg:x.extend(),init:function(r){this.cfg=this.cfg.extend(r),this.reset();},reset:function(){c.reset.call(this),this._doReset();},update:function(r){return this._append(r),this._process(),this},finalize:function(r){r&&this._append(r);var a=this._doFinalize();return a},blockSize:512/32,_createHelper:function(r){return function(a,g){return new r.init(g).finalize(a)}},_createHmacHelper:function(r){return function(a,g){return new V.HMAC.init(r,g).finalize(a)}}});var V=s.algo={};return s}(Math);return t});});var $=M((I,U)=>{(function(t,i){typeof I=="object"?U.exports=I=i(W()):typeof define=="function"&&define.amd?define(["./core"],i):i(t.CryptoJS);})(I,function(t){return function(){var i=t,n=i.lib,e=n.WordArray,o=n.Hasher,l=i.algo,s=[],p=l.SHA1=o.extend({_doReset:function(){this._hash=new e.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(x,m){for(var u=this._hash.words,f=u[0],y=u[1],b=u[2],c=u[3],v=u[4],V=0;V<80;V++){if(V<16)s[V]=x[m+V]|0;else {var r=s[V-3]^s[V-8]^s[V-14]^s[V-16];s[V]=r<<1|r>>>31;}var a=(f<<5|f>>>27)+v+s[V];V<20?a+=(y&b|~y&c)+1518500249:V<40?a+=(y^b^c)+1859775393:V<60?a+=(y&b|y&c|b&c)-1894007588:a+=(y^b^c)-899497514,v=c,c=b,b=y<<30|y>>>2,y=f,f=a;}u[0]=u[0]+f|0,u[1]=u[1]+y|0,u[2]=u[2]+b|0,u[3]=u[3]+c|0,u[4]=u[4]+v|0;},_doFinalize:function(){var x=this._data,m=x.words,u=this._nDataBytes*8,f=x.sigBytes*8;return m[f>>>5]|=128<<24-f%32,m[(f+64>>>9<<4)+14]=Math.floor(u/4294967296),m[(f+64>>>9<<4)+15]=u,x.sigBytes=m.length*4,this._process(),this._hash},clone:function(){var x=o.clone.call(this);return x._hash=this._hash.clone(),x}});i.SHA1=o._createHelper(p),i.HmacSHA1=o._createHmacHelper(p);}(),t.SHA1});});var ie=ue($());var E="___param___";function pe(t,i){return Math.floor(Math.random()*(i-t+1)+t)}function d(t,i){if(!(Array.isArray(t)||!t)){if(t&&typeof t=="object"&&"type"in t)switch(t.type){case"resulttocombine":return de(t,i);case"ifelse":return P(t.condition,i)?d(t.then,i):d(t.else,i);case"stepswitch":let e=d(t.elements,i)||[];if(e.length===0){console.error("[Pixi'VN] getValueFromConditionalStatements elements.length === 0");return}switch(t.choiceType){case"random":let o=pe(0,e.length);return d(e[o],i);case"loop":return narration.currentStepTimesCounter>e.length-1?(narration.currentStepTimesCounter=0,d(e[0],i)):d(e[B.getCurrentStepTimesCounter(t.nestedId)],i);case"sequential":let l;return t.end=="lastItem"&&(l=d(e[e.length-1],i)),narration.currentStepTimesCounter>e.length-1?l:d(e[B.getCurrentStepTimesCounter(t.nestedId)],i);case"sequentialrandom":let s=B.getRandomNumber(0,e.length-1,{nestedId:t.nestedId,onceOnly:!0});if(s==null&&t.end=="lastItem"){let p=B.getCurrentStepTimesCounterData(t.nestedId);if(!p||!p?.usedRandomNumbers)return;let x=p.usedRandomNumbers[`0-${e.length-1}`];return d(e[x[x.length-1]],i)}return s==null?void 0:d(e[s],i)}}return t}}function de(t,i){let n=t.firstItem,e=[];t.secondConditionalItem?.forEach(l=>{if(Array.isArray(l))l.forEach(s=>{let p=d(s,i);p&&e.push(p);});else {let s=d(l,i);s&&e.push(s);}});let o=n?[n,...e]:e;if(o.length!==0){if(typeof o[0]=="string")return o.join("");if(typeof o[0]=="object"){let l=o,s=l.map(c=>c.dialogue).join(""),p=l.find(c=>c.end),x=l.find(c=>c.choices),m=l.find(c=>c.glueEnabled),u=l.find(c=>c.goNextStep),f=l.find(c=>c.labelToOpen),y=l.find(c=>c.operation);return {dialogue:s,end:p?.end,choices:x?.choices,glueEnabled:m?.glueEnabled,goNextStep:u?.goNextStep,labelToOpen:f?.labelToOpen,operation:y?.operation}}}}function ge(t,i){if(!t)return !1;if(typeof t!="object"||!("type"in t))return !!t;switch(t.type){case"compare":let n=w(t.leftValue,i),e=w(t.rightValue,i);switch(t.operator){case"==":return n===e;case"!=":return n!==e;case"<":return n<e;case"<=":return n<=e;case">":return n>e;case">=":return n>=e;case"CONTAINS":return n.toString().includes(e.toString())}break;case"valueCondition":return !!w(t.value,i);case"union":return he(t,i);case"labelcondition":if("operator"in t&&"label"in t)switch(t.operator){case"started":return narration.getTimesLabelOpened(t.label)>0;case"completed":return narration.isLabelAlreadyCompleted(t.label)}break}return !!t}function w(t,i){if(t&&typeof t=="object"&&"type"in t)if(t.type==="value"&&t.storageOperationType==="get")switch(t.storageType){case"storage":return storage.getVariable(t.key);case"tempstorage":return X.getTempVariable(t.key);case"flagStorage":return getFlag(t.key);case"label":return narration.getTimesLabelOpened(t.label);case"logic":return P(t.operation,i);case"params":return i&&i.length-1>=t.key?i[t.key]:void 0}else return P(t,i);return t}function he(t,i){if(t.unionType==="not")return !P(t.condition,i);let n=t.unionType==="and";for(let e=0;e<t.conditions.length;e++)if(n=P(t.conditions[e],i)||!1,t.unionType==="and"){if(!n)return !1}else if(n)return !0;return n}function H(t,i){let n=d(t.value,i),e;switch(n&&typeof n=="object"&&"type"in n?e=P(n,i):e=n,t.storageType){case"flagStorage":setFlag(t.key,t.value);break;case"storage":storage.setVariable(t.key,e);break;case"tempstorage":X.setTempVariable(t.key,e);break;case"params":i&&i.length-1>=t.key&&(i[t.key]=e);break}}function P(t,i){let n=d(t,i);if(n&&typeof n=="object"&&"type"in n)switch(n.type){case"value":return w(n,i);case"arithmetic":case"arithmeticsingle":return ye(n,i);case"compare":case"valueCondition":case"union":case"labelcondition":return ge(n,i)}return n}function ye(t,i){let n=P(t.leftValue,i);switch(t.type){case"arithmetic":let e=P(t.rightValue,i);switch(t.operator){case"*":return n*e;case"/":return n/e;case"+":return n+e;case"-":return n-e;case"%":return n%e;case"POW":return Math.pow(n,e);case"RANDOM":return Math.floor(Math.random()*(e-n+1))+n}case"arithmeticsingle":switch(t.operator){case"INT":return parseInt(n);case"FLOOR":return Math.floor(n);case"FLOAT":return parseFloat(n)}break}}var O=class extends Te{constructor(i,n,e,o){super(i,e),this._steps=n,this.operationStringConvert=o;}_steps;get steps(){return this._steps.map(this.stepConverter)}operationStringConvert;getStepSha1(i){if(i<0||i>=this.steps.length)return;let n=this._steps[i];return (0, ie.default)(n.toString().toLocaleLowerCase()).toString()}getDialogueText(i,n){let e="";if(Array.isArray(i)){let o=[];i.forEach(l=>{if(typeof l=="string")o.push(l);else if(l&&typeof l=="object"){let s=d(l,n);s&&(s&&!Array.isArray(s)&&typeof s=="object"&&(s=w(s,n)||""),Array.isArray(s)?o=o.concat(s):o.push(s));}}),e=o;}else {let o=d(i,n)||"";o&&!Array.isArray(o)&&typeof o=="object"&&(o=w(o,n)||""),e=o;}return e}getDialogue(i,n){let e=d(i,n),o;return e&&(typeof e=="object"&&"character"in e&&"text"in e?o={character:e.character,text:this.getDialogueText(e.text,n)}:o=this.getDialogueText(e,n)),o}getChoices(i,n){let e=d(i,n);if(e)return e.map(l=>d(l,n)).filter(l=>l!==void 0)}stepConverter(i){return async n=>{let e=n[E];if(typeof i=="function"&&(i=i()),i.operation)for(let u of i.operation)await this.runOperation(u,e);let o=this.getChoices(i.choices,e),l=d(i.glueEnabled,e),s=this.getDialogue(i.dialogue,e),p=[];i.labelToOpen&&(Array.isArray(i.labelToOpen)||(i.labelToOpen=[i.labelToOpen]),i.labelToOpen.forEach(u=>{let f=d(u,e);f&&p.push(f);}));let x=d(i.goNextStep,e),m=d(i.end,e);if(o){let u=o.map(f=>{let y="";if(Array.isArray(f.text)){let b=[];f.text.forEach(c=>{if(typeof c=="string")b.push(c);else if(c&&typeof c=="object"){let v=d(c,e);v&&!Array.isArray(v)&&typeof v=="object"&&(v=w(v,e)||""),v&&(Array.isArray(v)?b=b.concat(v):b.push(v));}}),y=b.join();}else typeof f.text=="string"&&(y=f.text);return new ChoiceMenuOption(y,f.label,f.props,{type:f.type,oneTime:f.oneTime})});u=u.filter((f,y)=>{if(f.oneTime){let b=narration.alreadyCurrentStepMadeChoices;if(b&&b.includes(y))return !1}return !0}),narration.choiceMenuOptions=u;}else narration.choiceMenuOptions=void 0;l?setFlag(storage.keysSystem.ADD_NEXT_DIALOG_TEXT_INTO_THE_CURRENT_DIALOG_FLAG_KEY,!0):l===!1&&setFlag(storage.keysSystem.ADD_NEXT_DIALOG_TEXT_INTO_THE_CURRENT_DIALOG_FLAG_KEY,!1),s&&(narration.dialogue=s),p.forEach(u=>{let f=u.label;typeof f=="object"&&(f=w(f,e)||"");let y=u.params?.map(b=>P(b,e));n={...n,...u.props,[E]:y},u.type==="jump"?narration.jumpLabel(f,n):narration.callLabel(f,n);}),x&&await narration.goNext(n),m==="game_end"?(narration.closeAllLabels(),await narration.goNext(n)):m==="label_end"&&narration.closeCurrentLabel();}}async runOperation(i,n){let e=d(i,n);if(e)switch(e.type){case"sound":switch(e.operationType){case"add":sound.add(e.alias,{...e.props,url:e.url});break;case"play":sound.play(e.alias,e.props);break;case"remove":sound.remove(e.alias);break;case"pause":sound.pause(e.alias);break;case"resume":sound.resume(e.alias);break;case"volume":sound.volume(e.alias,e.value);break}break;case"image":switch(e.operationType){case"show":if(e.transition)switch(e.transition.type){case"fade":await showWithFadeTransition(e.alias,e.url,e.transition.props,e.transition.priority);break;case"dissolve":await showWithDissolveTransition(e.alias,e.url,e.transition.props,e.transition.priority);break;case"movein":case"moveout":await moveIn(e.alias,e.url,e.transition.props,e.transition.priority);break;case"zoomin":case"zoomout":await zoomIn(e.alias,e.url,e.transition.props,e.transition.priority);break}else await showImage(e.alias,e.url);break;case"edit":let o=canvas.find(e.alias);o?e.props&&(o.memory={...o.memory,...e.props}):console.error(`[Pixi'VN] Image with alias ${e.alias} not found.`);break;case"remove":canvas.remove(e.alias);break}break;case"video":switch(e.operationType){case"show":if(e.transition){let p=new CanvasVideo;switch(p.videoLink=e.url,e.transition.type){case"fade":await showWithFadeTransition(e.alias,p,e.transition.props,e.transition.priority);break;case"dissolve":await showWithDissolveTransition(e.alias,p,e.transition.props,e.transition.priority);break;case"movein":case"moveout":await moveIn(e.alias,p,e.transition.props,e.transition.priority);break;case"zoomin":case"zoomout":await zoomIn(e.alias,p,e.transition.props,e.transition.priority);break}}else await showVideo(e.alias,e.url);break;case"edit":let o=canvas.find(e.alias);o?e.props&&(o.memory={...o.memory,...e.props}):console.error(`[Pixi'VN] Video with alias ${e.alias} not found.`);break;case"remove":canvas.remove(e.alias);break;case"pause":let l=canvas.find(e.alias);l?l.paused=!0:console.error(`[Pixi'VN] Video with alias ${e.alias} not found.`);break;case"resume":let s=canvas.find(e.alias);s?s.paused=!1:console.error(`[Pixi'VN] Video with alias ${e.alias} not found.`);break}break;case"value":H(e,n);break;case"oprationtoconvert":if(this.operationStringConvert){let o="";e.values.forEach(s=>{if(typeof s=="string")o+=s;else {let p=P(s,n);p&&(o+=`${p}`);}});let l=this.operationStringConvert(o);l&&await this.runOperation(l,n);}break;case"input":switch(e.operationType){case"request":narration.requestInput({type:e.valueType});break}break}}};function ve(t,i){try{typeof t=="string"&&(t=JSON.parse(t));}catch(n){console.error("[Pixi'VN] Error parsing imported Pixi'VN JSON",n);return}if(typeof t!="object"){console.error("[Pixi'VN] Error parsing imported Pixi'VN JSON: data is not an object");return}if(t.labels){let n=t.labels;for(let e in n)try{let o=n[e],l=new O(e,o,void 0,i);saveLabel(l);}catch(o){console.error(`[Pixi'VN] Error creating JSON label ${e}`,o);}}}
|
|
3
|
+
var ne=Object.create;var G=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var ae=Object.getPrototypeOf,se=Object.prototype.hasOwnProperty;var j=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(i,n)=>(typeof require<"u"?require:i)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var M=(t,i)=>()=>(i||t((i={exports:{}}).exports,i),i.exports);var le=(t,i,n,e)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of oe(i))!se.call(t,o)&&o!==n&&G(t,o,{get:()=>i[o],enumerable:!(e=re(i,o))||e.enumerable});return t};var ue=(t,i,n)=>(n=t!=null?ne(ae(t)):{},le(G(n,"default",{value:t,enumerable:!0}),t));var W=M((L,z)=>{(function(t,i){typeof L=="object"?z.exports=L=i():typeof define=="function"&&define.amd?define([],i):t.CryptoJS=i();})(L,function(){var t=t||function(i,n){var e;if(typeof window<"u"&&window.crypto&&(e=window.crypto),typeof self<"u"&&self.crypto&&(e=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(e=globalThis.crypto),!e&&typeof window<"u"&&window.msCrypto&&(e=window.msCrypto),!e&&typeof global<"u"&&global.crypto&&(e=global.crypto),!e&&typeof j=="function")try{e=j("crypto");}catch{}var o=function(){if(e){if(typeof e.getRandomValues=="function")try{return e.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof e.randomBytes=="function")try{return e.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function r(){}return function(a){var g;return r.prototype=a,g=new r,r.prototype=null,g}}(),s={},p=s.lib={},b=p.Base=function(){return {extend:function(r){var a=l(this);return r&&a.mixIn(r),(!a.hasOwnProperty("init")||this.init===a.init)&&(a.init=function(){a.$super.init.apply(this,arguments);}),a.init.prototype=a,a.$super=this,a},create:function(){var r=this.extend();return r.init.apply(r,arguments),r},init:function(){},mixIn:function(r){for(var a in r)r.hasOwnProperty(a)&&(this[a]=r[a]);r.hasOwnProperty("toString")&&(this.toString=r.toString);},clone:function(){return this.init.prototype.extend(this)}}}(),m=p.WordArray=b.extend({init:function(r,a){r=this.words=r||[],a!=n?this.sigBytes=a:this.sigBytes=r.length*4;},toString:function(r){return (r||f).stringify(this)},concat:function(r){var a=this.words,g=r.words,h=this.sigBytes,N=r.sigBytes;if(this.clamp(),h%4)for(var T=0;T<N;T++){var D=g[T>>>2]>>>24-T%4*8&255;a[h+T>>>2]|=D<<24-(h+T)%4*8;}else for(var J=0;J<N;J+=4)a[h+J>>>2]=g[J>>>2];return this.sigBytes+=N,this},clamp:function(){var r=this.words,a=this.sigBytes;r[a>>>2]&=4294967295<<32-a%4*8,r.length=i.ceil(a/4);},clone:function(){var r=b.clone.call(this);return r.words=this.words.slice(0),r},random:function(r){for(var a=[],g=0;g<r;g+=4)a.push(o());return new m.init(a,r)}}),u=s.enc={},f=u.Hex={stringify:function(r){for(var a=r.words,g=r.sigBytes,h=[],N=0;N<g;N++){var T=a[N>>>2]>>>24-N%4*8&255;h.push((T>>>4).toString(16)),h.push((T&15).toString(16));}return h.join("")},parse:function(r){for(var a=r.length,g=[],h=0;h<a;h+=2)g[h>>>3]|=parseInt(r.substr(h,2),16)<<24-h%8*4;return new m.init(g,a/2)}},y=u.Latin1={stringify:function(r){for(var a=r.words,g=r.sigBytes,h=[],N=0;N<g;N++){var T=a[N>>>2]>>>24-N%4*8&255;h.push(String.fromCharCode(T));}return h.join("")},parse:function(r){for(var a=r.length,g=[],h=0;h<a;h++)g[h>>>2]|=(r.charCodeAt(h)&255)<<24-h%4*8;return new m.init(g,a)}},x=u.Utf8={stringify:function(r){try{return decodeURIComponent(escape(y.stringify(r)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(r){return y.parse(unescape(encodeURIComponent(r)))}},c=p.BufferedBlockAlgorithm=b.extend({reset:function(){this._data=new m.init,this._nDataBytes=0;},_append:function(r){typeof r=="string"&&(r=x.parse(r)),this._data.concat(r),this._nDataBytes+=r.sigBytes;},_process:function(r){var a,g=this._data,h=g.words,N=g.sigBytes,T=this.blockSize,D=T*4,J=N/D;r?J=i.ceil(J):J=i.max((J|0)-this._minBufferSize,0);var A=J*T,F=i.min(A*4,N);if(A){for(var R=0;R<A;R+=T)this._doProcessBlock(h,R);a=h.splice(0,A),g.sigBytes-=F;}return new m.init(a,F)},clone:function(){var r=b.clone.call(this);return r._data=this._data.clone(),r},_minBufferSize:0});p.Hasher=c.extend({cfg:b.extend(),init:function(r){this.cfg=this.cfg.extend(r),this.reset();},reset:function(){c.reset.call(this),this._doReset();},update:function(r){return this._append(r),this._process(),this},finalize:function(r){r&&this._append(r);var a=this._doFinalize();return a},blockSize:512/32,_createHelper:function(r){return function(a,g){return new r.init(g).finalize(a)}},_createHmacHelper:function(r){return function(a,g){return new V.HMAC.init(r,g).finalize(a)}}});var V=s.algo={};return s}(Math);return t});});var $=M((I,U)=>{(function(t,i){typeof I=="object"?U.exports=I=i(W()):typeof define=="function"&&define.amd?define(["./core"],i):i(t.CryptoJS);})(I,function(t){return function(){var i=t,n=i.lib,e=n.WordArray,o=n.Hasher,l=i.algo,s=[],p=l.SHA1=o.extend({_doReset:function(){this._hash=new e.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(b,m){for(var u=this._hash.words,f=u[0],y=u[1],x=u[2],c=u[3],v=u[4],V=0;V<80;V++){if(V<16)s[V]=b[m+V]|0;else {var r=s[V-3]^s[V-8]^s[V-14]^s[V-16];s[V]=r<<1|r>>>31;}var a=(f<<5|f>>>27)+v+s[V];V<20?a+=(y&x|~y&c)+1518500249:V<40?a+=(y^x^c)+1859775393:V<60?a+=(y&x|y&c|x&c)-1894007588:a+=(y^x^c)-899497514,v=c,c=x,x=y<<30|y>>>2,y=f,f=a;}u[0]=u[0]+f|0,u[1]=u[1]+y|0,u[2]=u[2]+x|0,u[3]=u[3]+c|0,u[4]=u[4]+v|0;},_doFinalize:function(){var b=this._data,m=b.words,u=this._nDataBytes*8,f=b.sigBytes*8;return m[f>>>5]|=128<<24-f%32,m[(f+64>>>9<<4)+14]=Math.floor(u/4294967296),m[(f+64>>>9<<4)+15]=u,b.sigBytes=m.length*4,this._process(),this._hash},clone:function(){var b=o.clone.call(this);return b._hash=this._hash.clone(),b}});i.SHA1=o._createHelper(p),i.HmacSHA1=o._createHmacHelper(p);}(),t.SHA1});});var ie=ue($());var E="___param___";function pe(t,i){return Math.floor(Math.random()*(i-t+1)+t)}function d(t,i){if(!(Array.isArray(t)||!t)){if(t&&typeof t=="object"&&"type"in t)switch(t.type){case"resulttocombine":return de(t,i);case"ifelse":return P(t.condition,i)?d(t.then,i):d(t.else,i);case"stepswitch":let e=d(t.elements,i)||[];if(e.length===0){console.error("[Pixi'VN] getValueFromConditionalStatements elements.length === 0");return}switch(t.choiceType){case"random":let o=pe(0,e.length);return d(e[o],i);case"loop":return narration.currentStepTimesCounter>e.length-1?(narration.currentStepTimesCounter=0,d(e[0],i)):d(e[NarrationManagerStatic.getCurrentStepTimesCounter(t.nestedId)],i);case"sequential":let l;return t.end=="lastItem"&&(l=d(e[e.length-1],i)),narration.currentStepTimesCounter>e.length-1?l:d(e[NarrationManagerStatic.getCurrentStepTimesCounter(t.nestedId)],i);case"sequentialrandom":let s=NarrationManagerStatic.getRandomNumber(0,e.length-1,{nestedId:t.nestedId,onceOnly:!0});if(s==null&&t.end=="lastItem"){let p=NarrationManagerStatic.getCurrentStepTimesCounterData(t.nestedId);if(!p||!p?.usedRandomNumbers)return;let b=p.usedRandomNumbers[`0-${e.length-1}`];return d(e[b[b.length-1]],i)}return s==null?void 0:d(e[s],i)}}return t}}function de(t,i){let n=t.firstItem,e=[];t.secondConditionalItem?.forEach(l=>{if(Array.isArray(l))l.forEach(s=>{let p=d(s,i);p&&e.push(p);});else {let s=d(l,i);s&&e.push(s);}});let o=n?[n,...e]:e;if(o.length!==0){if(typeof o[0]=="string")return o.join("");if(typeof o[0]=="object"){let l=o,s=l.map(c=>c.dialogue).join(""),p=l.find(c=>c.end),b=l.find(c=>c.choices),m=l.find(c=>c.glueEnabled),u=l.find(c=>c.goNextStep),f=l.find(c=>c.labelToOpen),y=l.find(c=>c.operation);return {dialogue:s,end:p?.end,choices:b?.choices,glueEnabled:m?.glueEnabled,goNextStep:u?.goNextStep,labelToOpen:f?.labelToOpen,operation:y?.operation}}}}function ge(t,i){if(!t)return !1;if(typeof t!="object"||!("type"in t))return !!t;switch(t.type){case"compare":let n=w(t.leftValue,i),e=w(t.rightValue,i);switch(t.operator){case"==":return n===e;case"!=":return n!==e;case"<":return n<e;case"<=":return n<=e;case">":return n>e;case">=":return n>=e;case"CONTAINS":return n.toString().includes(e.toString())}break;case"valueCondition":return !!w(t.value,i);case"union":return he(t,i);case"labelcondition":if("operator"in t&&"label"in t)switch(t.operator){case"started":return narration.getTimesLabelOpened(t.label)>0;case"completed":return narration.isLabelAlreadyCompleted(t.label)}break}return !!t}function w(t,i){if(t&&typeof t=="object"&&"type"in t)if(t.type==="value"&&t.storageOperationType==="get")switch(t.storageType){case"storage":return storage.getVariable(t.key);case"tempstorage":return StorageManagerStatic.getTempVariable(t.key);case"flagStorage":return getFlag(t.key);case"label":return narration.getTimesLabelOpened(t.label);case"logic":return P(t.operation,i);case"params":return i&&i.length-1>=t.key?i[t.key]:void 0}else return P(t,i);return t}function he(t,i){if(t.unionType==="not")return !P(t.condition,i);let n=t.unionType==="and";for(let e=0;e<t.conditions.length;e++)if(n=P(t.conditions[e],i)||!1,t.unionType==="and"){if(!n)return !1}else if(n)return !0;return n}function H(t,i){let n=d(t.value,i),e;switch(n&&typeof n=="object"&&"type"in n?e=P(n,i):e=n,t.storageType){case"flagStorage":setFlag(t.key,t.value);break;case"storage":storage.setVariable(t.key,e);break;case"tempstorage":StorageManagerStatic.setTempVariable(t.key,e);break;case"params":i&&i.length-1>=t.key&&(i[t.key]=e);break}}function P(t,i){let n=d(t,i);if(n&&typeof n=="object"&&"type"in n)switch(n.type){case"value":return w(n,i);case"arithmetic":case"arithmeticsingle":return ye(n,i);case"compare":case"valueCondition":case"union":case"labelcondition":return ge(n,i)}return n}function ye(t,i){let n=P(t.leftValue,i);switch(t.type){case"arithmetic":let e=P(t.rightValue,i);switch(t.operator){case"*":return n*e;case"/":return n/e;case"+":return n+e;case"-":return n-e;case"%":return n%e;case"POW":return Math.pow(n,e);case"RANDOM":return Math.floor(Math.random()*(e-n+1))+n}case"arithmeticsingle":switch(t.operator){case"INT":return parseInt(n);case"FLOOR":return Math.floor(n);case"FLOAT":return parseFloat(n)}break}}var O=class extends LabelAbstract{constructor(i,n,e,o){super(i,e),this._steps=n,this.operationStringConvert=o;}_steps;get steps(){return this._steps.map(this.stepConverter)}operationStringConvert;getStepSha1(i){if(i<0||i>=this.steps.length)return;let n=this._steps[i];return (0, ie.default)(n.toString().toLocaleLowerCase()).toString()}getDialogueText(i,n){let e="";if(Array.isArray(i)){let o=[];i.forEach(l=>{if(typeof l=="string")o.push(l);else if(l&&typeof l=="object"){let s=d(l,n);s&&(s&&!Array.isArray(s)&&typeof s=="object"&&(s=w(s,n)||""),Array.isArray(s)?o=o.concat(s):o.push(s));}}),e=o;}else {let o=d(i,n)||"";o&&!Array.isArray(o)&&typeof o=="object"&&(o=w(o,n)||""),e=o;}return e}getDialogue(i,n){let e=d(i,n),o;return e&&(typeof e=="object"&&"character"in e&&"text"in e?o={character:e.character,text:this.getDialogueText(e.text,n)}:o=this.getDialogueText(e,n)),o}getChoices(i,n){let e=d(i,n);if(e)return e.map(l=>d(l,n)).filter(l=>l!==void 0)}stepConverter(i){return async n=>{let e=n[E];if(typeof i=="function"&&(i=i()),i.operation)for(let u of i.operation)await this.runOperation(u,e);let o=this.getChoices(i.choices,e),l=d(i.glueEnabled,e),s=this.getDialogue(i.dialogue,e),p=[];i.labelToOpen&&(Array.isArray(i.labelToOpen)||(i.labelToOpen=[i.labelToOpen]),i.labelToOpen.forEach(u=>{let f=d(u,e);f&&p.push(f);}));let b=d(i.goNextStep,e),m=d(i.end,e);if(o){let u=o.map(f=>{let y="";if(Array.isArray(f.text)){let x=[];f.text.forEach(c=>{if(typeof c=="string")x.push(c);else if(c&&typeof c=="object"){let v=d(c,e);v&&!Array.isArray(v)&&typeof v=="object"&&(v=w(v,e)||""),v&&(Array.isArray(v)?x=x.concat(v):x.push(v));}}),y=x.join();}else typeof f.text=="string"&&(y=f.text);return new ChoiceMenuOption(y,f.label,f.props,{type:f.type,oneTime:f.oneTime})});u=u.filter((f,y)=>{if(f.oneTime){let x=narration.alreadyCurrentStepMadeChoices;if(x&&x.includes(y))return !1}return !0}),narration.choiceMenuOptions=u;}else narration.choiceMenuOptions=void 0;l?setFlag(storage.keysSystem.ADD_NEXT_DIALOG_TEXT_INTO_THE_CURRENT_DIALOG_FLAG_KEY,!0):l===!1&&setFlag(storage.keysSystem.ADD_NEXT_DIALOG_TEXT_INTO_THE_CURRENT_DIALOG_FLAG_KEY,!1),s&&(narration.dialogue=s),p.forEach(u=>{let f=u.label;typeof f=="object"&&(f=w(f,e)||"");let y=u.params?.map(x=>P(x,e));n={...n,...u.props,[E]:y},u.type==="jump"?narration.jumpLabel(f,n):narration.callLabel(f,n);}),b&&await narration.goNext(n),m==="game_end"?(narration.closeAllLabels(),await narration.goNext(n)):m==="label_end"&&narration.closeCurrentLabel();}}async runOperation(i,n){let e=d(i,n);if(e)switch(e.type){case"sound":switch(e.operationType){case"add":sound.add(e.alias,{...e.props,url:e.url});break;case"play":sound.play(e.alias,e.props);break;case"remove":sound.remove(e.alias);break;case"pause":sound.pause(e.alias);break;case"resume":sound.resume(e.alias);break;case"volume":sound.volume(e.alias,e.value);break}break;case"image":switch(e.operationType){case"show":if(e.transition)switch(e.transition.type){case"fade":await showWithFadeTransition(e.alias,e.url,e.transition.props,e.transition.priority);break;case"dissolve":await showWithDissolveTransition(e.alias,e.url,e.transition.props,e.transition.priority);break;case"movein":case"moveout":await moveIn(e.alias,e.url,e.transition.props,e.transition.priority);break;case"zoomin":case"zoomout":await zoomIn(e.alias,e.url,e.transition.props,e.transition.priority);break}else await showImage(e.alias,e.url);break;case"edit":let o=canvas.find(e.alias);o?e.props&&(o.memory={...o.memory,...e.props}):console.error(`[Pixi'VN] Image with alias ${e.alias} not found.`);break;case"remove":canvas.remove(e.alias);break}break;case"video":switch(e.operationType){case"show":if(e.transition){let p=new CanvasVideo;switch(p.videoLink=e.url,e.transition.type){case"fade":await showWithFadeTransition(e.alias,p,e.transition.props,e.transition.priority);break;case"dissolve":await showWithDissolveTransition(e.alias,p,e.transition.props,e.transition.priority);break;case"movein":case"moveout":await moveIn(e.alias,p,e.transition.props,e.transition.priority);break;case"zoomin":case"zoomout":await zoomIn(e.alias,p,e.transition.props,e.transition.priority);break}}else await showVideo(e.alias,e.url);break;case"edit":let o=canvas.find(e.alias);o?e.props&&(o.memory={...o.memory,...e.props}):console.error(`[Pixi'VN] Video with alias ${e.alias} not found.`);break;case"remove":canvas.remove(e.alias);break;case"pause":let l=canvas.find(e.alias);l?l.paused=!0:console.error(`[Pixi'VN] Video with alias ${e.alias} not found.`);break;case"resume":let s=canvas.find(e.alias);s?s.paused=!1:console.error(`[Pixi'VN] Video with alias ${e.alias} not found.`);break}break;case"value":H(e,n);break;case"oprationtoconvert":if(this.operationStringConvert){let o="";e.values.forEach(s=>{if(typeof s=="string")o+=s;else {let p=P(s,n);p&&(o+=`${p}`);}});let l=this.operationStringConvert(o);l&&await this.runOperation(l,n);}break;case"input":switch(e.operationType){case"request":narration.requestInput({type:e.valueType});break}break}}};function ve(t,i){try{typeof t=="string"&&(t=JSON.parse(t));}catch(n){console.error("[Pixi'VN] Error parsing imported Pixi'VN JSON",n);return}if(typeof t!="object"){console.error("[Pixi'VN] Error parsing imported Pixi'VN JSON: data is not an object");return}if(t.labels){let n=t.labels;for(let e in n)try{let o=n[e],l=new O(e,o,void 0,i);saveLabel(l);}catch(o){console.error(`[Pixi'VN] Error creating JSON label ${e}`,o);}}}
|
|
8
4
|
|
|
9
5
|
export { O as LabelJson, E as PIXIVNJSON_PARAM_ID, P as geLogichValue, w as getValue, d as getValueFromConditionalStatements, ve as importPixiVNJson, H as setStorageJson };
|
|
@@ -7,9 +7,6 @@ import './PixiVNJsonLabelStep.cjs';
|
|
|
7
7
|
import './PixiVNJsonMedia.cjs';
|
|
8
8
|
import './PixiVNJsonMediaTransiotions.cjs';
|
|
9
9
|
import '@drincs/pixi-vn';
|
|
10
|
-
import '@drincs/pixi-vn/dist/types/LabelIdType';
|
|
11
|
-
import '@drincs/pixi-vn/dist/interface/canvas/ICanvasVideoMemory';
|
|
12
|
-
import '@drincs/pixi-vn/dist/functions/canvas/CanvasTransition';
|
|
13
10
|
import 'pixi.js';
|
|
14
11
|
|
|
15
12
|
/**
|
|
@@ -7,9 +7,6 @@ import './PixiVNJsonLabelStep.js';
|
|
|
7
7
|
import './PixiVNJsonMedia.js';
|
|
8
8
|
import './PixiVNJsonMediaTransiotions.js';
|
|
9
9
|
import '@drincs/pixi-vn';
|
|
10
|
-
import '@drincs/pixi-vn/dist/types/LabelIdType';
|
|
11
|
-
import '@drincs/pixi-vn/dist/interface/canvas/ICanvasVideoMemory';
|
|
12
|
-
import '@drincs/pixi-vn/dist/functions/canvas/CanvasTransition';
|
|
13
10
|
import 'pixi.js';
|
|
14
11
|
|
|
15
12
|
/**
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { LabelRunModeType, StorageObjectType, StepLabelPropsType } from '@drincs/pixi-vn';
|
|
2
|
-
import { LabelIdType } from '@drincs/pixi-vn/dist/types/LabelIdType';
|
|
3
2
|
import { b as PixiVNJsonConditionalStatements, n as PixiVNJsonValueGet } from '../PixiVNJsonConditionalStatements-BBopD3ft.cjs';
|
|
4
3
|
import PixiVNJsonOperations from './PixiVNJsonOperations.cjs';
|
|
5
4
|
import './PixiVNJsonLabelCondition.cjs';
|
|
6
5
|
import './PixiVNJsonInput.cjs';
|
|
7
6
|
import './PixiVNJsonMedia.cjs';
|
|
8
|
-
import '@drincs/pixi-vn/dist/interface/canvas/ICanvasVideoMemory';
|
|
9
7
|
import './PixiVNJsonMediaTransiotions.cjs';
|
|
10
|
-
import '@drincs/pixi-vn/dist/functions/canvas/CanvasTransition';
|
|
11
8
|
import 'pixi.js';
|
|
12
9
|
|
|
13
10
|
type PixiVNJsonChoice = {
|
|
@@ -18,7 +15,7 @@ type PixiVNJsonChoice = {
|
|
|
18
15
|
/**
|
|
19
16
|
* The label id to be opened.
|
|
20
17
|
*/
|
|
21
|
-
label:
|
|
18
|
+
label: string;
|
|
22
19
|
/**
|
|
23
20
|
* Label opening mode
|
|
24
21
|
*/
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { LabelRunModeType, StorageObjectType, StepLabelPropsType } from '@drincs/pixi-vn';
|
|
2
|
-
import { LabelIdType } from '@drincs/pixi-vn/dist/types/LabelIdType';
|
|
3
2
|
import { b as PixiVNJsonConditionalStatements, n as PixiVNJsonValueGet } from '../PixiVNJsonConditionalStatements-CSzbVYiW.js';
|
|
4
3
|
import PixiVNJsonOperations from './PixiVNJsonOperations.js';
|
|
5
4
|
import './PixiVNJsonLabelCondition.js';
|
|
6
5
|
import './PixiVNJsonInput.js';
|
|
7
6
|
import './PixiVNJsonMedia.js';
|
|
8
|
-
import '@drincs/pixi-vn/dist/interface/canvas/ICanvasVideoMemory';
|
|
9
7
|
import './PixiVNJsonMediaTransiotions.js';
|
|
10
|
-
import '@drincs/pixi-vn/dist/functions/canvas/CanvasTransition';
|
|
11
8
|
import 'pixi.js';
|
|
12
9
|
|
|
13
10
|
type PixiVNJsonChoice = {
|
|
@@ -18,7 +15,7 @@ type PixiVNJsonChoice = {
|
|
|
18
15
|
/**
|
|
19
16
|
* The label id to be opened.
|
|
20
17
|
*/
|
|
21
|
-
label:
|
|
18
|
+
label: string;
|
|
22
19
|
/**
|
|
23
20
|
* Label opening mode
|
|
24
21
|
*/
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import PixiVNJsonLabelStep from './PixiVNJsonLabelStep.cjs';
|
|
2
2
|
import '@drincs/pixi-vn';
|
|
3
|
-
import '@drincs/pixi-vn/dist/types/LabelIdType';
|
|
4
3
|
import '../PixiVNJsonConditionalStatements-BBopD3ft.cjs';
|
|
5
4
|
import './PixiVNJsonLabelCondition.cjs';
|
|
6
5
|
import './PixiVNJsonOperations.cjs';
|
|
7
6
|
import './PixiVNJsonInput.cjs';
|
|
8
7
|
import './PixiVNJsonMedia.cjs';
|
|
9
|
-
import '@drincs/pixi-vn/dist/interface/canvas/ICanvasVideoMemory';
|
|
10
8
|
import './PixiVNJsonMediaTransiotions.cjs';
|
|
11
|
-
import '@drincs/pixi-vn/dist/functions/canvas/CanvasTransition';
|
|
12
9
|
import 'pixi.js';
|
|
13
10
|
|
|
14
11
|
/**
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import PixiVNJsonLabelStep from './PixiVNJsonLabelStep.js';
|
|
2
2
|
import '@drincs/pixi-vn';
|
|
3
|
-
import '@drincs/pixi-vn/dist/types/LabelIdType';
|
|
4
3
|
import '../PixiVNJsonConditionalStatements-CSzbVYiW.js';
|
|
5
4
|
import './PixiVNJsonLabelCondition.js';
|
|
6
5
|
import './PixiVNJsonOperations.js';
|
|
7
6
|
import './PixiVNJsonInput.js';
|
|
8
7
|
import './PixiVNJsonMedia.js';
|
|
9
|
-
import '@drincs/pixi-vn/dist/interface/canvas/ICanvasVideoMemory';
|
|
10
8
|
import './PixiVNJsonMediaTransiotions.js';
|
|
11
|
-
import '@drincs/pixi-vn/dist/functions/canvas/CanvasTransition';
|
|
12
9
|
import 'pixi.js';
|
|
13
10
|
|
|
14
11
|
/**
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { ICanvasImageMemory, SoundOptions, SoundPlayOptions } from '@drincs/pixi-vn';
|
|
2
|
-
import ICanvasVideoMemory from '@drincs/pixi-vn/dist/interface/canvas/ICanvasVideoMemory';
|
|
1
|
+
import { ICanvasImageMemory, ICanvasVideoMemory, SoundOptions, SoundPlayOptions } from '@drincs/pixi-vn';
|
|
3
2
|
import PixiVNJsonMediaTransiotions from './PixiVNJsonMediaTransiotions.cjs';
|
|
4
|
-
import '@drincs/pixi-vn/dist/functions/canvas/CanvasTransition';
|
|
5
3
|
import 'pixi.js';
|
|
6
4
|
|
|
7
5
|
type PixiVNJsonCanvasShow = {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { ICanvasImageMemory, SoundOptions, SoundPlayOptions } from '@drincs/pixi-vn';
|
|
2
|
-
import ICanvasVideoMemory from '@drincs/pixi-vn/dist/interface/canvas/ICanvasVideoMemory';
|
|
1
|
+
import { ICanvasImageMemory, ICanvasVideoMemory, SoundOptions, SoundPlayOptions } from '@drincs/pixi-vn';
|
|
3
2
|
import PixiVNJsonMediaTransiotions from './PixiVNJsonMediaTransiotions.js';
|
|
4
|
-
import '@drincs/pixi-vn/dist/functions/canvas/CanvasTransition';
|
|
5
3
|
import 'pixi.js';
|
|
6
4
|
|
|
7
5
|
type PixiVNJsonCanvasShow = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps } from '@drincs/pixi-vn
|
|
1
|
+
import { ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps } from '@drincs/pixi-vn';
|
|
2
2
|
import { UPDATE_PRIORITY } from 'pixi.js';
|
|
3
3
|
|
|
4
4
|
type DissolveTransition = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps } from '@drincs/pixi-vn
|
|
1
|
+
import { ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps } from '@drincs/pixi-vn';
|
|
2
2
|
import { UPDATE_PRIORITY } from 'pixi.js';
|
|
3
3
|
|
|
4
4
|
type DissolveTransition = {
|
|
@@ -3,9 +3,7 @@ import PixiVNJsonInput from './PixiVNJsonInput.cjs';
|
|
|
3
3
|
import { PixiVNJsonCanvas, PixiVNJsonSound } from './PixiVNJsonMedia.cjs';
|
|
4
4
|
import '@drincs/pixi-vn';
|
|
5
5
|
import './PixiVNJsonLabelCondition.cjs';
|
|
6
|
-
import '@drincs/pixi-vn/dist/interface/canvas/ICanvasVideoMemory';
|
|
7
6
|
import './PixiVNJsonMediaTransiotions.cjs';
|
|
8
|
-
import '@drincs/pixi-vn/dist/functions/canvas/CanvasTransition';
|
|
9
7
|
import 'pixi.js';
|
|
10
8
|
|
|
11
9
|
type PixiVNJsonOperationString = {
|
|
@@ -3,9 +3,7 @@ import PixiVNJsonInput from './PixiVNJsonInput.js';
|
|
|
3
3
|
import { PixiVNJsonCanvas, PixiVNJsonSound } from './PixiVNJsonMedia.js';
|
|
4
4
|
import '@drincs/pixi-vn';
|
|
5
5
|
import './PixiVNJsonLabelCondition.js';
|
|
6
|
-
import '@drincs/pixi-vn/dist/interface/canvas/ICanvasVideoMemory';
|
|
7
6
|
import './PixiVNJsonMediaTransiotions.js';
|
|
8
|
-
import '@drincs/pixi-vn/dist/functions/canvas/CanvasTransition';
|
|
9
7
|
import 'pixi.js';
|
|
10
8
|
|
|
11
9
|
type PixiVNJsonOperationString = {
|
|
@@ -8,7 +8,4 @@ export { PixiVNJsonCanvas, PixiVNJsonSound } from './PixiVNJsonMedia.cjs';
|
|
|
8
8
|
export { default as PixiVNJsonMediaTransiotions } from './PixiVNJsonMediaTransiotions.cjs';
|
|
9
9
|
export { PixiVNJsonOperation, PixiVNJsonOperationString, default as PixiVNJsonOperations } from './PixiVNJsonOperations.cjs';
|
|
10
10
|
import '@drincs/pixi-vn';
|
|
11
|
-
import '@drincs/pixi-vn/dist/types/LabelIdType';
|
|
12
|
-
import '@drincs/pixi-vn/dist/interface/canvas/ICanvasVideoMemory';
|
|
13
|
-
import '@drincs/pixi-vn/dist/functions/canvas/CanvasTransition';
|
|
14
11
|
import 'pixi.js';
|
|
@@ -8,7 +8,4 @@ export { PixiVNJsonCanvas, PixiVNJsonSound } from './PixiVNJsonMedia.js';
|
|
|
8
8
|
export { default as PixiVNJsonMediaTransiotions } from './PixiVNJsonMediaTransiotions.js';
|
|
9
9
|
export { PixiVNJsonOperation, PixiVNJsonOperationString, default as PixiVNJsonOperations } from './PixiVNJsonOperations.js';
|
|
10
10
|
import '@drincs/pixi-vn';
|
|
11
|
-
import '@drincs/pixi-vn/dist/types/LabelIdType';
|
|
12
|
-
import '@drincs/pixi-vn/dist/interface/canvas/ICanvasVideoMemory';
|
|
13
|
-
import '@drincs/pixi-vn/dist/functions/canvas/CanvasTransition';
|
|
14
11
|
import 'pixi.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drincs/pixi-vn-json",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Pixi'VN can be integrated with JSON files to create a visual novel.",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"typescript": "^5.6.2"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@drincs/pixi-vn": ">=0.8.
|
|
35
|
+
"@drincs/pixi-vn": ">=0.8.1"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
38
|
"game",
|