From 5116d62fb6834c11e283ab8774b7b7c7bb28e127 Mon Sep 17 00:00:00 2001 From: circle-gon <97845741+circle-gon@users.noreply.github.com> Date: Thu, 15 Dec 2022 15:07:08 +0000 Subject: [PATCH] some stuff done --- package-lock.json | 20 ++++++++++++++++++++ package.json | 1 + src/data/layers/factory.tsx | 11 +++++++++-- src/data/projEntry.tsx | 2 +- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 48e2b15..975dd88 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "@pixi/constants": "~6.3.2", "@pixi/core": "~6.3.2", "@pixi/display": "~6.3.2", + "@pixi/graphics": "^6.3.2", "@pixi/math": "~6.3.2", "@pixi/particle-emitter": "^5.0.7", "@pixi/sprite": "~6.3.2", @@ -1860,6 +1861,19 @@ "@pixi/utils": "6.3.2" } }, + "node_modules/@pixi/graphics": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/@pixi/graphics/-/graphics-6.3.2.tgz", + "integrity": "sha512-GaykoXJr0pV0e9TB1yOcgvJf9i/fIF/cgT+DnGz82uninWMo31aFJSvhLbZOcEPQRfdHXdFfUkQAAMTICAp7+Q==", + "peerDependencies": { + "@pixi/constants": "6.3.2", + "@pixi/core": "6.3.2", + "@pixi/display": "6.3.2", + "@pixi/math": "6.3.2", + "@pixi/sprite": "6.3.2", + "@pixi/utils": "6.3.2" + } + }, "node_modules/@pixi/math": { "version": "6.3.2", "resolved": "https://registry.npmjs.org/@pixi/math/-/math-6.3.2.tgz", @@ -8486,6 +8500,12 @@ "integrity": "sha512-D+WiM0BcyPK91RYxl7TXXVNz/5lOGs8Q6jtCMcWgTHwCXxWPOHFnNZ4KPJZpUQ7me8Tl2u+c9hfB5Oh1+17r/Q==", "requires": {} }, + "@pixi/graphics": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/@pixi/graphics/-/graphics-6.3.2.tgz", + "integrity": "sha512-GaykoXJr0pV0e9TB1yOcgvJf9i/fIF/cgT+DnGz82uninWMo31aFJSvhLbZOcEPQRfdHXdFfUkQAAMTICAp7+Q==", + "requires": {} + }, "@pixi/math": { "version": "6.3.2", "resolved": "https://registry.npmjs.org/@pixi/math/-/math-6.3.2.tgz", diff --git a/package.json b/package.json index d31fe6a..099db1a 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@pixi/constants": "~6.3.2", "@pixi/core": "~6.3.2", "@pixi/display": "~6.3.2", + "@pixi/graphics": "^6.3.2", "@pixi/math": "~6.3.2", "@pixi/particle-emitter": "^5.0.7", "@pixi/sprite": "~6.3.2", diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 1115514..b3b4667 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1,5 +1,7 @@ import { jsx } from "features/feature"; import { createLayer } from "game/layers"; +import { Application } from "@pixi/app"; +import { Graphics } from "@pixi/graphics"; const id = "elves"; @@ -8,11 +10,16 @@ const day = 20; const factory = createLayer(id, () => { const name = "The Factory"; const color = "grey"; + const app = new Application(); + const graphics = new Graphics(); + graphics.beginFill(0xff0000); + graphics.drawRect(0, 0, 200, 100); + app.stage.addChild(graphics); return { name, day, color, - display: jsx(() => <>testing testing 1 2 3) + display: jsx(() => <>{app.view}) }; -}) +}); export default factory; diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index 7a4c53b..f697486 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -333,7 +333,7 @@ export const main = createLayer("main", function (this: BaseLayer) { day: 20, shouldNotify: false, layer: "factory", // "presents" - symbol: "", + symbol: wrappingPaperSymbol, story: "", completedStory: "" })),