From 148200cdca4645c88bae9fb3d9476f571a721239 Mon Sep 17 00:00:00 2001 From: monodyle Date: Tue, 9 Aug 2022 14:16:27 +0700 Subject: [PATCH] fix: fix summer body wrong variant --- components/axie-figure/AxieFigure.tsx | 19 +++++---- components/axie-figure/PlaygroundGame.ts | 7 ++-- components/axie-figure/constants.ts | 53 ++++++++++++++++++++++-- 3 files changed, 62 insertions(+), 17 deletions(-) diff --git a/components/axie-figure/AxieFigure.tsx b/components/axie-figure/AxieFigure.tsx index 72ec1e9..41a9e8e 100644 --- a/components/axie-figure/AxieFigure.tsx +++ b/components/axie-figure/AxieFigure.tsx @@ -1,17 +1,18 @@ +import { getSpineFromAdultCombo } from '@axieinfinity/mixer' import * as PIXI from 'pixi.js' -import 'pixi-spine' import React, { useEffect, useRef, useState } from 'react' -import { getSpineFromAdultCombo } from '@axieinfinity/mixer' import { PuffLoading } from '../puff-loading/PuffLoading' +import { BodyOrAnimationDropdown } from './body-or-animation-dropdown/BodyOrAnimationDropdown' +import { ColorDropdown } from './color-dropdown/ColorDropdown' +import { animationList, colorsArray, summerColors } from './constants' import key from './key.json' -import s from './styles.module.css' -import { colorsArray, animationList } from './constants' -import { Part, Color } from './types' -import { PlaygroundGame } from './PlaygroundGame' import { PartsDropdown } from './parts-dropdown/PartsDropdown' -import { ColorDropdown } from './color-dropdown/ColorDropdown' -import { BodyOrAnimationDropdown } from './body-or-animation-dropdown/BodyOrAnimationDropdown' +import { PlaygroundGame } from './PlaygroundGame' +import s from './styles.module.css' +import { Color, Part } from './types' + +import 'pixi-spine' interface AxieParts { ears: Part @@ -235,7 +236,7 @@ export const AxieFigure = () => { show={showHelperTextStatus.body} /> { const currentFigure = new CurrentFigure(); - const figure = await Figure.fromAxieId(this.loader, "150"); + const figure = await Figure.fromAxieId(this.loader, "11390642"); currentFigure.currentSpine = figure; currentFigure.addChild(figure); currentFigure.changeCurrentAnimation("action/idle/normal", true); @@ -48,7 +48,6 @@ export class PlaygroundGame extends PIXI.Application { this.stage?.addChild(currentFigure); this.currentFigure = currentFigure; this.currentFigure.registerKeyBoardController(); - }); this.stage?.on("pointerdown", () => { diff --git a/components/axie-figure/constants.ts b/components/axie-figure/constants.ts index ef5e957..c88272a 100644 --- a/components/axie-figure/constants.ts +++ b/components/axie-figure/constants.ts @@ -1,11 +1,56 @@ import animations from "../../node_modules/@axieinfinity/mixer/dist/data/axie-2d-v3-stuff-animations.json"; - -import { Color } from "./types"; import key from "./key.json"; - +import { Color } from "./types"; export const animationList: string[] = animations.items.header .map((obj) => obj.name) .filter((obj) => obj.substring(0, 10) !== "action/mix"); -export const colorsArray: Color[] = key.items.colors; \ No newline at end of file +export const colorsArray: Color[] = key.items.colors; +export const summerColors: Color[] = [ + { + key: "aquatic-summer", + primary1: "Aquatic", + primary2: "", + }, + { + key: "bird-summer", + primary1: "Bird", + primary2: "", + }, + { + key: "dawn-summer", + primary1: "Dawn", + primary2: "", + }, + { + key: "mech-summer", + primary1: "Mech", + primary2: "", + }, + { + key: "reptile-summer", + primary1: "Reptile", + primary2: "", + }, + { + key: "beast-summer", + primary1: "Beast", + primary2: "", + }, + { + key: "bug-summer", + primary1: "Bug", + primary2: "", + }, + { + key: "dusk-summer", + primary1: "Dusk", + primary2: "", + }, + { + key: "plant-summer", + primary1: "Plant", + primary2: "", + }, +];