Skip to content

Commit

Permalink
normal objects values
Browse files Browse the repository at this point in the history
  • Loading branch information
Andcool-Systems committed Aug 13, 2024
1 parent e25ea62 commit c68d684
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/me/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const Main = () => {
skinViewer.loadBackground("/static/background.png").then(() => asyncImage('/static/workshop_base.png').then((base_skin) => {
Promise.all(data.map(async (el) => {
try {
const result = await generateSkin(el.base64, base_skin, Object.values(el.categories).some(val => val.id == 3))
const result = await generateSkin(el.base64, base_skin, el.categories.some(val => val.id == 3))
await skinViewer.loadSkin(result, { model: 'default' });
skinViewer.render();
const image = skinViewer.canvas.toDataURL();
Expand Down
2 changes: 1 addition & 1 deletion src/app/me/stars/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const Main = () => {
skinViewer.loadBackground("/static/background.png").then(() => asyncImage('/static/workshop_base.png').then((base_skin) => {
Promise.all(data.map(async (el) => {
try {
const result = await generateSkin(el.base64, base_skin, Object.values(el.categories).some(val => val.id == 3))
const result = await generateSkin(el.base64, base_skin, el.categories.some(val => val.id == 3))
await skinViewer.loadSkin(result, { model: 'default' });
skinViewer.render();
const image = skinViewer.canvas.toDataURL();
Expand Down
2 changes: 1 addition & 1 deletion src/app/users/[name]/client_code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const UsersClient = ({ user }: { user: Users }) => {
skinViewer.loadBackground("/static/background.png").then(() => asyncImage('/static/workshop_base.png').then((base_skin) => {
Promise.all(user.works.map(async (el) => {
try {
const result = await generateSkin(el.base64, base_skin, Object.values(el.categories).some(val => val.id == 3))
const result = await generateSkin(el.base64, base_skin, el.categories.some(val => val.id == 3))
await skinViewer.loadSkin(result, { model: 'default' });
skinViewer.render();
const image = skinViewer.canvas.toDataURL();
Expand Down
2 changes: 1 addition & 1 deletion src/app/workshop/[id]/client_code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default function Home({ data }: { data: Interfaces.Bandage }) {
client.current.lining_canvas = lining_canvas;
client.current.position = 6 - Math.floor(height / 2);
client.current.updatePositionSlider();
client.current.colorable = Object.values(data.categories).some(val => val.id.toString() === process.env.NEXT_PUBLIC_COLORABLE_ID);
client.current.colorable = data.categories.some(val => val.id.toString() === process.env.NEXT_PUBLIC_COLORABLE_ID);
const randomColor = getRandomColor();
setRandomColor(randomColor);
client.current.setParams({ color: randomColor });
Expand Down
2 changes: 1 addition & 1 deletion src/app/workshop/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default function Home() {
skinViewer.loadBackground("/static/background.png").then(() => asyncImage('/static/workshop_base.png').then((base_skin) => {
Promise.all(data.data.map(async (el) => {
try {
const result = await generateSkin(el.base64, base_skin, Object.values(el.categories).some(val => val.id == 3))
const result = await generateSkin(el.base64, base_skin, el.categories.some(val => val.id == 3))
await skinViewer.loadSkin(result, { model: 'default' });
skinViewer.render();
const image = skinViewer.canvas.toDataURL();
Expand Down

0 comments on commit c68d684

Please sign in to comment.