Update realm.ts
This commit is contained in:
@@ -18,8 +18,8 @@ export async function shareRealmCardData():Promise<{ name: ArrayBuffer; data: Ar
|
|||||||
const char = safeStructuredClone(getCurrentCharacter({snapshot:true})) as character
|
const char = safeStructuredClone(getCurrentCharacter({snapshot:true})) as character
|
||||||
const trimedName = char.name.replace(/[^a-zA-Z0-9]/g, '') || 'character';
|
const trimedName = char.name.replace(/[^a-zA-Z0-9]/g, '') || 'character';
|
||||||
const writer = new VirtualWriter()
|
const writer = new VirtualWriter()
|
||||||
const namebuf = new TextEncoder().encode(trimedName + '.png')
|
const namebuf = new TextEncoder().encode(trimedName + '.charx')
|
||||||
await exportCharacterCard(char, 'png', {writer: writer, spec: 'v3'})
|
await exportCharacterCard(char, 'charx', {writer: writer, spec: 'v3'})
|
||||||
alertStore.set({
|
alertStore.set({
|
||||||
type: 'none',
|
type: 'none',
|
||||||
msg: ''
|
msg: ''
|
||||||
|
|||||||
Reference in New Issue
Block a user