@guilhermebkel/scenec 0.1.2 → 0.2.0
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/README.md +15 -22
- package/dist/Adapters/FileReaderAdapter.d.ts +4 -0
- package/dist/Adapters/FileReaderAdapter.js +21 -0
- package/dist/Adapters/FontAdapter.d.ts +5 -0
- package/dist/Adapters/FontAdapter.js +9 -0
- package/dist/Adapters/ResvgAdapter.d.ts +11 -0
- package/dist/Adapters/ResvgAdapter.js +18 -0
- package/dist/Commands/BaseCommand.d.ts +11 -0
- package/dist/Commands/BaseCommand.js +13 -0
- package/dist/Commands/CatalogCommand.d.ts +6 -0
- package/dist/Commands/CatalogCommand.js +24 -0
- package/dist/Commands/CheckCommand.d.ts +5 -0
- package/dist/Commands/CheckCommand.js +8 -0
- package/dist/Commands/RenderCommand.d.ts +5 -0
- package/dist/Commands/RenderCommand.js +8 -0
- package/dist/Commands/SceneCommand.d.ts +11 -0
- package/dist/Commands/SceneCommand.js +70 -0
- package/dist/Commands/SchemaCommand.d.ts +5 -0
- package/dist/Commands/SchemaCommand.js +12 -0
- package/dist/Data/cities.json +312 -0
- package/dist/Data/europe.json +1 -0
- package/dist/Errors/SceneError.d.ts +4 -0
- package/dist/Errors/SceneError.js +11 -0
- package/dist/Errors/UnsafeSvgError.d.ts +3 -0
- package/dist/Errors/UnsafeSvgError.js +9 -0
- package/dist/Modules/CheckModule.d.ts +8 -0
- package/dist/Modules/CheckModule.js +16 -0
- package/dist/Modules/CompilationModule.d.ts +18 -0
- package/dist/Modules/CompilationModule.js +137 -0
- package/dist/Modules/CritiqueModule.d.ts +6 -0
- package/dist/Modules/CritiqueModule.js +43 -0
- package/dist/Modules/MapModule.d.ts +24 -0
- package/dist/Modules/MapModule.js +99 -0
- package/dist/Modules/ParsingModule.d.ts +17 -0
- package/dist/Modules/ParsingModule.js +88 -0
- package/dist/Modules/PlaneModule.d.ts +19 -0
- package/dist/Modules/PlaneModule.js +98 -0
- package/dist/Protocols/AssetProtocol.d.ts +62 -0
- package/dist/Protocols/AssetProtocol.js +93 -0
- package/dist/Protocols/CommandProtocol.d.ts +6 -0
- package/dist/Protocols/CommandProtocol.js +0 -0
- package/dist/Protocols/CompilationProtocol.d.ts +110 -0
- package/dist/Protocols/CompilationProtocol.js +0 -0
- package/dist/Protocols/CritiqueProtocol.d.ts +42 -0
- package/dist/Protocols/CritiqueProtocol.js +4 -0
- package/dist/Protocols/CustomAssetProtocol.d.ts +24 -0
- package/dist/Protocols/CustomAssetProtocol.js +0 -0
- package/dist/Protocols/GroupProtocol.d.ts +17 -0
- package/dist/Protocols/GroupProtocol.js +12 -0
- package/dist/Protocols/KitProtocol.d.ts +26 -0
- package/dist/Protocols/KitProtocol.js +17 -0
- package/dist/Protocols/MapProtocol.d.ts +77 -0
- package/dist/Protocols/MapProtocol.js +4 -0
- package/dist/Protocols/OptionsProtocol.js +0 -0
- package/dist/Protocols/PersonProtocol.d.ts +64 -0
- package/dist/Protocols/PersonProtocol.js +40 -0
- package/dist/Protocols/PlaneProtocol.d.ts +140 -0
- package/dist/Protocols/PlaneProtocol.js +4 -0
- package/dist/{pipeline/index.d.ts → Protocols/ResultProtocol.d.ts} +0 -2
- package/dist/Protocols/ResultProtocol.js +0 -0
- package/dist/Protocols/SceneProtocol.d.ts +625 -0
- package/dist/Protocols/SceneProtocol.js +304 -0
- package/dist/{protocols/theme.d.ts → Protocols/ThemeProtocol.d.ts} +4 -0
- package/dist/Protocols/ThemeProtocol.js +28 -0
- package/dist/Resources/Assets/BackpackAsset.d.ts +10 -0
- package/dist/Resources/Assets/BackpackAsset.js +31 -0
- package/dist/Resources/Assets/BallAsset.d.ts +10 -0
- package/dist/Resources/Assets/BallAsset.js +15 -0
- package/dist/Resources/Assets/BalloonsAsset.d.ts +10 -0
- package/dist/Resources/Assets/BalloonsAsset.js +26 -0
- package/dist/Resources/Assets/BaseAsset.d.ts +16 -0
- package/dist/Resources/Assets/BaseAsset.js +10 -0
- package/dist/Resources/Assets/BeachTowelAsset.d.ts +10 -0
- package/dist/Resources/Assets/BeachTowelAsset.js +14 -0
- package/dist/Resources/Assets/BedAsset.d.ts +12 -0
- package/dist/Resources/Assets/BedAsset.js +25 -0
- package/dist/Resources/Assets/BenchAsset.d.ts +11 -0
- package/dist/Resources/Assets/BenchAsset.js +24 -0
- package/dist/Resources/Assets/BicycleAsset.d.ts +10 -0
- package/dist/Resources/Assets/BicycleAsset.js +18 -0
- package/dist/Resources/Assets/BigPlantAsset.d.ts +10 -0
- package/dist/Resources/Assets/BigPlantAsset.js +19 -0
- package/dist/Resources/Assets/BirdAsset.d.ts +10 -0
- package/dist/Resources/Assets/BirdAsset.js +14 -0
- package/dist/Resources/Assets/BoardAsset.d.ts +12 -0
- package/dist/Resources/Assets/BoardAsset.js +44 -0
- package/dist/Resources/Assets/BoatAsset.d.ts +10 -0
- package/dist/Resources/Assets/BoatAsset.js +15 -0
- package/dist/Resources/Assets/BooksAsset.d.ts +10 -0
- package/dist/Resources/Assets/BooksAsset.js +35 -0
- package/dist/Resources/Assets/BookshelfAsset.d.ts +10 -0
- package/dist/Resources/Assets/BookshelfAsset.js +33 -0
- package/dist/Resources/Assets/BuildingAsset.d.ts +14 -0
- package/dist/Resources/Assets/BuildingAsset.js +34 -0
- package/dist/Resources/Assets/BurgerAsset.d.ts +9 -0
- package/dist/Resources/Assets/BurgerAsset.js +23 -0
- package/dist/Resources/Assets/BushAsset.d.ts +10 -0
- package/dist/Resources/Assets/BushAsset.js +17 -0
- package/dist/Resources/Assets/CabinetAsset.d.ts +14 -0
- package/dist/Resources/Assets/CabinetAsset.js +49 -0
- package/dist/Resources/Assets/CablesAsset.d.ts +10 -0
- package/dist/Resources/Assets/CablesAsset.js +16 -0
- package/dist/Resources/Assets/CakeAsset.d.ts +10 -0
- package/dist/Resources/Assets/CakeAsset.js +29 -0
- package/dist/Resources/Assets/CapAsset.d.ts +10 -0
- package/dist/Resources/Assets/CapAsset.js +18 -0
- package/dist/Resources/Assets/CarAsset.d.ts +10 -0
- package/dist/Resources/Assets/CarAsset.js +29 -0
- package/dist/Resources/Assets/CatAsset.d.ts +10 -0
- package/dist/Resources/Assets/CatAsset.js +17 -0
- package/dist/Resources/Assets/ChairAsset.d.ts +11 -0
- package/dist/Resources/Assets/ChairAsset.js +32 -0
- package/dist/Resources/Assets/ClockAsset.d.ts +11 -0
- package/dist/Resources/Assets/ClockAsset.js +22 -0
- package/dist/Resources/Assets/CloudAsset.d.ts +10 -0
- package/dist/Resources/Assets/CloudAsset.js +15 -0
- package/dist/Resources/Assets/CoffeeMachineAsset.d.ts +10 -0
- package/dist/Resources/Assets/CoffeeMachineAsset.js +23 -0
- package/dist/Resources/Assets/CounterAsset.d.ts +11 -0
- package/dist/Resources/Assets/CounterAsset.js +29 -0
- package/dist/Resources/Assets/CupAsset.d.ts +10 -0
- package/dist/Resources/Assets/CupAsset.js +17 -0
- package/dist/Resources/Assets/CustomAsset.d.ts +25 -0
- package/dist/Resources/Assets/CustomAsset.js +58 -0
- package/dist/Resources/Assets/DeskAsset.d.ts +11 -0
- package/dist/Resources/Assets/DeskAsset.js +35 -0
- package/dist/Resources/Assets/DeskSlabAsset.d.ts +18 -0
- package/dist/Resources/Assets/DeskSlabAsset.js +43 -0
- package/dist/Resources/Assets/DiplomaAsset.d.ts +10 -0
- package/dist/Resources/Assets/DiplomaAsset.js +23 -0
- package/dist/Resources/Assets/DogAsset.d.ts +10 -0
- package/dist/Resources/Assets/DogAsset.js +24 -0
- package/dist/Resources/Assets/DrawerUnitAsset.d.ts +14 -0
- package/dist/Resources/Assets/DrawerUnitAsset.js +35 -0
- package/dist/Resources/Assets/FenceAsset.d.ts +10 -0
- package/dist/Resources/Assets/FenceAsset.js +26 -0
- package/dist/Resources/Assets/FigurineAsset.d.ts +10 -0
- package/dist/Resources/Assets/FigurineAsset.js +24 -0
- package/dist/Resources/Assets/FinishFlagAsset.d.ts +10 -0
- package/dist/Resources/Assets/FinishFlagAsset.js +21 -0
- package/dist/Resources/Assets/FloorLampAsset.d.ts +10 -0
- package/dist/Resources/Assets/FloorLampAsset.js +22 -0
- package/dist/Resources/Assets/FlowersAsset.d.ts +10 -0
- package/dist/Resources/Assets/FlowersAsset.js +37 -0
- package/dist/Resources/Assets/FrameAsset.d.ts +11 -0
- package/dist/Resources/Assets/FrameAsset.js +24 -0
- package/dist/Resources/Assets/FruitBowlAsset.d.ts +10 -0
- package/dist/Resources/Assets/FruitBowlAsset.js +16 -0
- package/dist/Resources/Assets/GlassShelfAsset.d.ts +17 -0
- package/dist/Resources/Assets/GlassShelfAsset.js +25 -0
- package/dist/Resources/Assets/HeadphonesAsset.d.ts +10 -0
- package/dist/Resources/Assets/HeadphonesAsset.js +23 -0
- package/dist/Resources/Assets/HouseAsset.d.ts +10 -0
- package/dist/Resources/Assets/HouseAsset.js +42 -0
- package/dist/Resources/Assets/LabAsset.d.ts +10 -0
- package/dist/Resources/Assets/LabAsset.js +52 -0
- package/dist/Resources/Assets/LampAsset.d.ts +10 -0
- package/dist/Resources/Assets/LampAsset.js +16 -0
- package/dist/Resources/Assets/LaptopAsset.d.ts +10 -0
- package/dist/Resources/Assets/LaptopAsset.js +23 -0
- package/dist/Resources/Assets/LaptopOpenAsset.d.ts +10 -0
- package/dist/Resources/Assets/LaptopOpenAsset.js +29 -0
- package/dist/Resources/Assets/LightSwitchAsset.d.ts +11 -0
- package/dist/Resources/Assets/LightSwitchAsset.js +24 -0
- package/dist/Resources/Assets/MonitorAsset.d.ts +10 -0
- package/dist/Resources/Assets/MonitorAsset.js +40 -0
- package/dist/Resources/Assets/MoonAsset.d.ts +10 -0
- package/dist/Resources/Assets/MoonAsset.js +16 -0
- package/dist/Resources/Assets/MountainAsset.d.ts +10 -0
- package/dist/Resources/Assets/MountainAsset.js +15 -0
- package/dist/Resources/Assets/OfficeChairAsset.d.ts +10 -0
- package/dist/Resources/Assets/OfficeChairAsset.js +45 -0
- package/dist/Resources/Assets/PalmAsset.d.ts +10 -0
- package/dist/Resources/Assets/PalmAsset.js +32 -0
- package/dist/Resources/Assets/PaperCupAsset.d.ts +10 -0
- package/dist/Resources/Assets/PaperCupAsset.js +17 -0
- package/dist/Resources/Assets/PendantLampAsset.d.ts +10 -0
- package/dist/Resources/Assets/PendantLampAsset.js +16 -0
- package/dist/Resources/Assets/PennantAsset.d.ts +10 -0
- package/dist/Resources/Assets/PennantAsset.js +15 -0
- package/dist/Resources/Assets/PersonAsset.d.ts +10 -0
- package/dist/Resources/Assets/PersonAsset.js +15 -0
- package/dist/Resources/Assets/PhotoFrameAsset.d.ts +15 -0
- package/dist/Resources/Assets/PhotoFrameAsset.js +68 -0
- package/dist/Resources/Assets/PineAsset.d.ts +10 -0
- package/dist/Resources/Assets/PineAsset.js +21 -0
- package/dist/Resources/Assets/PizzaAsset.d.ts +10 -0
- package/dist/Resources/Assets/PizzaAsset.js +17 -0
- package/dist/Resources/Assets/PlantAsset.d.ts +10 -0
- package/dist/Resources/Assets/PlantAsset.js +17 -0
- package/dist/Resources/Assets/PlasticBagAsset.d.ts +10 -0
- package/dist/Resources/Assets/PlasticBagAsset.js +15 -0
- package/dist/Resources/Assets/PlateAsset.d.ts +10 -0
- package/dist/Resources/Assets/PlateAsset.js +17 -0
- package/dist/Resources/Assets/RollingCartAsset.d.ts +11 -0
- package/dist/Resources/Assets/RollingCartAsset.js +34 -0
- package/dist/Resources/Assets/RugAsset.d.ts +10 -0
- package/dist/Resources/Assets/RugAsset.js +19 -0
- package/dist/Resources/Assets/SandcastleAsset.d.ts +10 -0
- package/dist/Resources/Assets/SandcastleAsset.js +30 -0
- package/dist/Resources/Assets/SchoolAsset.d.ts +10 -0
- package/dist/Resources/Assets/SchoolAsset.js +32 -0
- package/dist/Resources/Assets/ShelfWallAsset.d.ts +11 -0
- package/dist/Resources/Assets/ShelfWallAsset.js +23 -0
- package/dist/Resources/Assets/SofaAsset.d.ts +11 -0
- package/dist/Resources/Assets/SofaAsset.js +38 -0
- package/dist/Resources/Assets/StageAsset.d.ts +10 -0
- package/dist/Resources/Assets/StageAsset.js +44 -0
- package/dist/Resources/Assets/StarAsset.d.ts +10 -0
- package/dist/Resources/Assets/StarAsset.js +14 -0
- package/dist/Resources/Assets/StarsAsset.d.ts +11 -0
- package/dist/Resources/Assets/StarsAsset.js +42 -0
- package/dist/Resources/Assets/StreetlightAsset.d.ts +10 -0
- package/dist/Resources/Assets/StreetlightAsset.js +20 -0
- package/dist/Resources/Assets/SuitcaseAsset.d.ts +10 -0
- package/dist/Resources/Assets/SuitcaseAsset.js +42 -0
- package/dist/Resources/Assets/SunAsset.d.ts +10 -0
- package/dist/Resources/Assets/SunAsset.js +22 -0
- package/dist/Resources/Assets/TableAsset.d.ts +15 -0
- package/dist/Resources/Assets/TableAsset.js +21 -0
- package/dist/Resources/Assets/TrashCanAsset.d.ts +10 -0
- package/dist/Resources/Assets/TrashCanAsset.js +31 -0
- package/dist/Resources/Assets/TreeAsset.d.ts +10 -0
- package/dist/Resources/Assets/TreeAsset.js +23 -0
- package/dist/Resources/Assets/TrophyAsset.d.ts +10 -0
- package/dist/Resources/Assets/TrophyAsset.js +16 -0
- package/dist/Resources/Assets/TumblerAsset.d.ts +10 -0
- package/dist/Resources/Assets/TumblerAsset.js +17 -0
- package/dist/Resources/Assets/TvAsset.d.ts +10 -0
- package/dist/Resources/Assets/TvAsset.js +29 -0
- package/dist/Resources/Assets/TvStandAsset.d.ts +11 -0
- package/dist/Resources/Assets/TvStandAsset.js +34 -0
- package/dist/Resources/Assets/UmbrellaAsset.d.ts +10 -0
- package/dist/Resources/Assets/UmbrellaAsset.js +17 -0
- package/dist/Resources/Assets/UniversityAsset.d.ts +10 -0
- package/dist/Resources/Assets/UniversityAsset.js +22 -0
- package/dist/Resources/Assets/VaseFlowersAsset.d.ts +10 -0
- package/dist/Resources/Assets/VaseFlowersAsset.js +16 -0
- package/dist/Resources/Assets/WindowAsset.d.ts +11 -0
- package/dist/Resources/Assets/WindowAsset.js +32 -0
- package/dist/Resources/Groups/BaseGroup.d.ts +7 -0
- package/dist/Resources/Groups/BaseGroup.js +5 -0
- package/dist/Resources/Groups/CelebrationGroup.d.ts +8 -0
- package/dist/Resources/Groups/CelebrationGroup.js +19 -0
- package/dist/Resources/Groups/ConversationGroup.d.ts +9 -0
- package/dist/Resources/Groups/ConversationGroup.js +17 -0
- package/dist/Resources/Groups/DiningGroup.d.ts +8 -0
- package/dist/Resources/Groups/DiningGroup.js +21 -0
- package/dist/Resources/Groups/MeetingGroup.d.ts +8 -0
- package/dist/Resources/Groups/MeetingGroup.js +22 -0
- package/dist/Resources/Groups/ParkBenchGroup.d.ts +8 -0
- package/dist/Resources/Groups/ParkBenchGroup.js +17 -0
- package/dist/Resources/Groups/ReadingCornerGroup.d.ts +8 -0
- package/dist/Resources/Groups/ReadingCornerGroup.js +17 -0
- package/dist/Resources/Groups/WorkspaceGroup.d.ts +10 -0
- package/dist/Resources/Groups/WorkspaceGroup.js +25 -0
- package/dist/Resources/Kits/BaseKit.d.ts +12 -0
- package/dist/Resources/Kits/BaseKit.js +11 -0
- package/dist/Resources/Kits/FlatKit.d.ts +5 -0
- package/dist/Resources/Kits/FlatKit.js +8 -0
- package/dist/Resources/Kits/HatchKit.d.ts +15 -0
- package/dist/Resources/Kits/HatchKit.js +12 -0
- package/dist/Resources/Kits/OutlineKit.d.ts +12 -0
- package/dist/Resources/Kits/OutlineKit.js +10 -0
- package/dist/Resources/Kits/PaperKit.d.ts +11 -0
- package/dist/Resources/Kits/PaperKit.js +11 -0
- package/dist/Resources/Kits/RisoKit.d.ts +16 -0
- package/dist/Resources/Kits/RisoKit.js +11 -0
- package/dist/Resources/Kits/SketchKit.d.ts +9 -0
- package/dist/Resources/Kits/SketchKit.js +11 -0
- package/dist/Resources/Themes/BaseTheme.d.ts +5 -0
- package/dist/Resources/Themes/BaseTheme.js +5 -0
- package/dist/Resources/Themes/BeachTheme.d.ts +6 -0
- package/dist/Resources/Themes/BeachTheme.js +31 -0
- package/dist/Resources/Themes/FlatAutumnTheme.d.ts +6 -0
- package/dist/Resources/Themes/FlatAutumnTheme.js +29 -0
- package/dist/Resources/Themes/FlatCoolTheme.d.ts +6 -0
- package/dist/Resources/Themes/FlatCoolTheme.js +29 -0
- package/dist/Resources/Themes/NightTheme.d.ts +6 -0
- package/dist/Resources/Themes/NightTheme.js +29 -0
- package/dist/Resources/Themes/WarmCafeTheme.d.ts +6 -0
- package/dist/Resources/Themes/WarmCafeTheme.js +29 -0
- package/dist/Services/AssetService.d.ts +12 -0
- package/dist/Services/AssetService.js +204 -0
- package/dist/Services/BackgroundService.d.ts +33 -0
- package/dist/Services/BackgroundService.js +136 -0
- package/dist/Services/BalanceCritiqueService.d.ts +13 -0
- package/dist/Services/BalanceCritiqueService.js +64 -0
- package/dist/Services/CameraService.d.ts +21 -0
- package/dist/Services/CameraService.js +121 -0
- package/dist/Services/CatalogService.d.ts +29 -0
- package/dist/Services/CatalogService.js +51 -0
- package/dist/Services/ContactCritiqueService.d.ts +19 -0
- package/dist/Services/ContactCritiqueService.js +101 -0
- package/dist/Services/ContextService.d.ts +21 -0
- package/dist/Services/ContextService.js +94 -0
- package/dist/Services/CoverageCritiqueService.d.ts +16 -0
- package/dist/Services/CoverageCritiqueService.js +84 -0
- package/dist/Services/CustomAssetService.d.ts +31 -0
- package/dist/Services/CustomAssetService.js +184 -0
- package/dist/Services/DependencyOrderService.d.ts +12 -0
- package/dist/Services/DependencyOrderService.js +73 -0
- package/dist/Services/DescriptionService.d.ts +9 -0
- package/dist/Services/DescriptionService.js +27 -0
- package/dist/Services/FramingCheckService.d.ts +15 -0
- package/dist/Services/FramingCheckService.js +93 -0
- package/dist/Services/GazeService.d.ts +6 -0
- package/dist/Services/GazeService.js +43 -0
- package/dist/Services/GroupService.d.ts +17 -0
- package/dist/Services/GroupService.js +152 -0
- package/dist/Services/KitService.d.ts +23 -0
- package/dist/Services/KitService.js +96 -0
- package/dist/Services/LightingService.d.ts +24 -0
- package/dist/Services/LightingService.js +119 -0
- package/dist/Services/MapBaseService.d.ts +24 -0
- package/dist/Services/MapBaseService.js +104 -0
- package/dist/Services/MapLabelService.d.ts +26 -0
- package/dist/Services/MapLabelService.js +185 -0
- package/dist/Services/MapLegService.d.ts +23 -0
- package/dist/Services/MapLegService.js +87 -0
- package/dist/Services/MapPanelService.d.ts +16 -0
- package/dist/Services/MapPanelService.js +89 -0
- package/dist/Services/MapPinService.d.ts +11 -0
- package/dist/Services/MapPinService.js +56 -0
- package/dist/Services/MapProjectionService.d.ts +14 -0
- package/dist/Services/MapProjectionService.js +70 -0
- package/dist/Services/MapRouteService.d.ts +17 -0
- package/dist/Services/MapRouteService.js +79 -0
- package/dist/Services/PieceService.d.ts +43 -0
- package/dist/Services/PieceService.js +154 -0
- package/dist/Services/PlacementService.d.ts +60 -0
- package/dist/Services/PlacementService.js +415 -0
- package/dist/Services/PlaneBackgroundService.d.ts +24 -0
- package/dist/Services/PlaneBackgroundService.js +170 -0
- package/dist/Services/PlaneBoxService.d.ts +27 -0
- package/dist/Services/PlaneBoxService.js +209 -0
- package/dist/Services/PlaneDepthService.d.ts +18 -0
- package/dist/Services/PlaneDepthService.js +146 -0
- package/dist/Services/PlaneLabelService.d.ts +13 -0
- package/dist/Services/PlaneLabelService.js +115 -0
- package/dist/Services/PlaneObjectService.d.ts +17 -0
- package/dist/Services/PlaneObjectService.js +147 -0
- package/dist/Services/PlanePathService.d.ts +15 -0
- package/dist/Services/PlanePathService.js +98 -0
- package/dist/Services/PlaneProjectionService.d.ts +16 -0
- package/dist/Services/PlaneProjectionService.js +90 -0
- package/dist/Services/PlaneRoadService.d.ts +13 -0
- package/dist/Services/PlaneRoadService.js +105 -0
- package/dist/Services/PlaneScatterService.d.ts +11 -0
- package/dist/Services/PlaneScatterService.js +48 -0
- package/dist/Services/PlaneSpaceService.d.ts +27 -0
- package/dist/Services/PlaneSpaceService.js +96 -0
- package/dist/Services/PlaneSpriteService.d.ts +29 -0
- package/dist/Services/PlaneSpriteService.js +95 -0
- package/dist/Services/PlaneTitleService.d.ts +17 -0
- package/dist/Services/PlaneTitleService.js +126 -0
- package/dist/Services/PlaneZoneService.d.ts +20 -0
- package/dist/Services/PlaneZoneService.js +121 -0
- package/dist/Services/RasterService.d.ts +10 -0
- package/dist/Services/RasterService.js +68 -0
- package/dist/Services/SchemaService.d.ts +3 -0
- package/dist/Services/SchemaService.js +10 -0
- package/dist/Services/SilhouetteCritiqueService.d.ts +32 -0
- package/dist/Services/SilhouetteCritiqueService.js +155 -0
- package/dist/Services/TextService.d.ts +47 -0
- package/dist/Services/TextService.js +178 -0
- package/dist/Services/ThemeService.d.ts +5 -0
- package/dist/Services/ThemeService.js +18 -0
- package/dist/Utils/BoxUtil.d.ts +4 -0
- package/dist/Utils/BoxUtil.js +8 -0
- package/dist/Utils/ColorUtil.d.ts +20 -0
- package/dist/Utils/ColorUtil.js +51 -0
- package/dist/Utils/CurveUtil.d.ts +6 -0
- package/dist/Utils/CurveUtil.js +35 -0
- package/dist/Utils/FallbackUtil.d.ts +3 -0
- package/dist/Utils/FallbackUtil.js +8 -0
- package/dist/Utils/FormatUtil.d.ts +4 -0
- package/dist/Utils/FormatUtil.js +9 -0
- package/dist/Utils/IdUtil.d.ts +4 -0
- package/dist/Utils/IdUtil.js +11 -0
- package/dist/Utils/NormalizeUtil.d.ts +4 -0
- package/dist/Utils/NormalizeUtil.js +9 -0
- package/dist/Utils/OklabUtil.d.ts +23 -0
- package/dist/Utils/OklabUtil.js +62 -0
- package/dist/Utils/PersonArmUtil.d.ts +19 -0
- package/dist/Utils/PersonArmUtil.js +84 -0
- package/dist/Utils/PersonHeadUtil.d.ts +31 -0
- package/dist/Utils/PersonHeadUtil.js +154 -0
- package/dist/Utils/PersonOutfitUtil.d.ts +48 -0
- package/dist/Utils/PersonOutfitUtil.js +178 -0
- package/dist/Utils/PersonUtil.d.ts +39 -0
- package/dist/Utils/PersonUtil.js +206 -0
- package/dist/Utils/PixelUtil.d.ts +3 -0
- package/dist/Utils/PixelUtil.js +8 -0
- package/dist/Utils/RecolorUtil.d.ts +40 -0
- package/dist/Utils/RecolorUtil.js +155 -0
- package/dist/Utils/RegistryUtil.d.ts +8 -0
- package/dist/Utils/RegistryUtil.js +19 -0
- package/dist/Utils/RequireUtil.d.ts +3 -0
- package/dist/Utils/RequireUtil.js +11 -0
- package/dist/Utils/SanitizeUtil.d.ts +25 -0
- package/dist/Utils/SanitizeUtil.js +210 -0
- package/dist/Utils/SeedUtil.d.ts +6 -0
- package/dist/Utils/SeedUtil.js +15 -0
- package/dist/Utils/ShapeUtil.d.ts +31 -0
- package/dist/Utils/ShapeUtil.js +47 -0
- package/dist/Utils/SuggestUtil.d.ts +7 -0
- package/dist/Utils/SuggestUtil.js +25 -0
- package/dist/Utils/SvgUtil.d.ts +9 -0
- package/dist/Utils/SvgUtil.js +21 -0
- package/dist/Utils/ThemeUtil.d.ts +4 -0
- package/dist/Utils/ThemeUtil.js +13 -0
- package/dist/Utils/TransportUtil.d.ts +24 -0
- package/dist/Utils/TransportUtil.js +108 -0
- package/dist/cli.js +24 -97
- package/dist/index.d.ts +10 -6
- package/dist/index.js +14 -2
- package/dist/render.d.ts +8 -5
- package/dist/render.js +21 -3
- package/dist/schema.d.ts +9 -2
- package/dist/schema.js +29 -5
- package/package.json +3 -2
- package/skills/{scenec → draw-scene}/SKILL.md +15 -19
- package/skills/{scenec → draw-scene}/references/catalog.md +14 -14
- package/skills/{scenec → draw-scene}/references/dsl.md +9 -3
- package/dist/catalog.d.ts +0 -21
- package/dist/catalog.js +0 -35
- package/dist/data/europe.json +0 -1
- package/dist/drawing/assets.d.ts +0 -8
- package/dist/drawing/assets.js +0 -612
- package/dist/drawing/kits.d.ts +0 -7
- package/dist/drawing/kits.js +0 -92
- package/dist/drawing/person.d.ts +0 -18
- package/dist/drawing/person.js +0 -287
- package/dist/drawing/themes.d.ts +0 -4
- package/dist/drawing/themes.js +0 -45
- package/dist/modes/map.d.ts +0 -5
- package/dist/modes/map.js +0 -365
- package/dist/modes/plane.d.ts +0 -5
- package/dist/modes/plane.js +0 -716
- package/dist/pipeline/compile.d.ts +0 -2
- package/dist/pipeline/compile.js +0 -581
- package/dist/pipeline/custom.d.ts +0 -2
- package/dist/pipeline/custom.js +0 -120
- package/dist/pipeline/groups.d.ts +0 -2
- package/dist/pipeline/groups.js +0 -189
- package/dist/pipeline/index.js +0 -7
- package/dist/pipeline/parse.d.ts +0 -10
- package/dist/pipeline/parse.js +0 -80
- package/dist/protocols/options.js +0 -1
- package/dist/protocols/scene.d.ts +0 -299
- package/dist/protocols/scene.js +0 -118
- package/dist/protocols/theme.js +0 -1
- package/dist/render/check.d.ts +0 -6
- package/dist/render/check.js +0 -10
- package/dist/render/critic.d.ts +0 -1
- package/dist/render/critic.js +0 -235
- package/dist/render/files.d.ts +0 -2
- package/dist/render/files.js +0 -16
- package/dist/render/fonts.d.ts +0 -2
- package/dist/render/fonts.js +0 -4
- package/dist/render/png.d.ts +0 -9
- package/dist/render/png.js +0 -13
- package/dist/utils/color.d.ts +0 -5
- package/dist/utils/color.js +0 -35
- package/dist/utils/recolor.d.ts +0 -1
- package/dist/utils/recolor.js +0 -56
- package/dist/utils/sanitize.d.ts +0 -5
- package/dist/utils/sanitize.js +0 -169
- package/dist/utils/suggest.d.ts +0 -1
- package/dist/utils/suggest.js +0 -22
- package/dist/utils/svg.d.ts +0 -2
- package/dist/utils/svg.js +0 -11
- package/skills/scenec/references/fontes.md +0 -8
- /package/dist/{protocols/options.d.ts → Protocols/OptionsProtocol.d.ts} +0 -0
- /package/skills/{scenec/recipes/anuncios-variacoes.yaml → draw-scene/recipes/ad-variations.yaml} +0 -0
- /package/skills/{scenec/recipes/carrossel.yaml → draw-scene/recipes/carousel.yaml} +0 -0
- /package/skills/{scenec/recipes/elearning.yaml → draw-scene/recipes/e-learning.yaml} +0 -0
- /package/skills/{scenec/recipes/reels-explicativo.yaml → draw-scene/recipes/explainer-reel.yaml} +0 -0
- /package/skills/{scenec/recipes/historia-ilustrada.yaml → draw-scene/recipes/illustrated-story.yaml} +0 -0
- /package/skills/{scenec/recipes/mapas-jornadas.yaml → draw-scene/recipes/journey-map.yaml} +0 -0
- /package/skills/{scenec/recipes/wrapped-personalizado.yaml → draw-scene/recipes/personalized-wrapped.yaml} +0 -0
- /package/skills/{scenec/recipes/ilustracoes-produto.yaml → draw-scene/recipes/product-illustration.yaml} +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ColorUtil } from "../../Utils/ColorUtil.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
class CloudAsset extends BaseAsset {
|
|
4
|
+
id = "cloud";
|
|
5
|
+
kind = "sky";
|
|
6
|
+
width = 110;
|
|
7
|
+
height = 50;
|
|
8
|
+
tags = ["nuvem"];
|
|
9
|
+
draw(params, theme) {
|
|
10
|
+
return `<g fill="${theme.paper}" opacity="0.94"><circle cx="-28" cy="-15" r="15"/><circle cx="0" cy="-26" r="22"/><circle cx="28" cy="-15" r="15"/><rect x="-43" y="-15" width="86" height="15" rx="7"/></g><path d="M-43 -8 Q-43 0 -36 0 L36 0 Q43 0 43 -8 Z" fill="${ColorUtil.sh(theme.paper, -0.08)}" opacity="0.9"/>`;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
CloudAsset
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class CoffeeMachineAsset extends BaseAsset {
|
|
4
|
+
readonly id = "coffee_machine";
|
|
5
|
+
readonly kind = "surface";
|
|
6
|
+
readonly width = 34;
|
|
7
|
+
readonly height = 40;
|
|
8
|
+
readonly tags: string[];
|
|
9
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ColorUtil } from "../../Utils/ColorUtil.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
4
|
+
class CoffeeMachineAsset extends BaseAsset {
|
|
5
|
+
id = "coffee_machine";
|
|
6
|
+
kind = "surface";
|
|
7
|
+
width = 34;
|
|
8
|
+
height = 40;
|
|
9
|
+
tags = ["m\xE1quina de caf\xE9", "espresso"];
|
|
10
|
+
draw(params, theme) {
|
|
11
|
+
return ShapeUtil.rect(-17, -40, 34, 40, theme.metal, { rx: 4 }) + ShapeUtil.rect(6, -40, 11, 40, ColorUtil.sh(theme.metal, -0.18), { rx: 4 }) + ShapeUtil.rect(
|
|
12
|
+
-12,
|
|
13
|
+
-34,
|
|
14
|
+
24,
|
|
15
|
+
9,
|
|
16
|
+
theme.ink,
|
|
17
|
+
{ rx: 2 }
|
|
18
|
+
) + ShapeUtil.circle(-6, -30, 1.8, theme.accent) + ShapeUtil.rect(-6, -20, 12, 4, theme.ink) + ShapeUtil.rect(-5, -10, 10, 10, theme.paper, { rx: 1 });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
CoffeeMachineAsset
|
|
23
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class CounterAsset extends BaseAsset {
|
|
4
|
+
readonly id = "counter";
|
|
5
|
+
readonly kind = "ground";
|
|
6
|
+
readonly width = 220;
|
|
7
|
+
readonly height = 62;
|
|
8
|
+
readonly top = 62;
|
|
9
|
+
readonly tags: string[];
|
|
10
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ColorUtil } from "../../Utils/ColorUtil.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
4
|
+
class CounterAsset extends BaseAsset {
|
|
5
|
+
id = "counter";
|
|
6
|
+
kind = "ground";
|
|
7
|
+
width = 220;
|
|
8
|
+
height = 62;
|
|
9
|
+
top = 62;
|
|
10
|
+
tags = ["balc\xE3o", "balcao", "bar", "kitchen_counter"];
|
|
11
|
+
draw(params, theme) {
|
|
12
|
+
return ShapeUtil.shadow(theme, 112, 4) + ShapeUtil.rect(-104, -54, 208, 54, theme.wood) + ShapeUtil.rect(
|
|
13
|
+
-104,
|
|
14
|
+
-54,
|
|
15
|
+
208,
|
|
16
|
+
6,
|
|
17
|
+
ColorUtil.sh(theme.wood, -0.22)
|
|
18
|
+
) + [-70, 0, 70].map((posX) => ShapeUtil.rect(posX - 28, -44, 56, 38, ColorUtil.sh(theme.wood, -0.12), { rx: 3 }) + ShapeUtil.rect(posX - 8, -40, 16, 2.5, theme.metal, { rx: 1 })).join("") + ShapeUtil.rect(-110, -62, 220, 8, theme.woodDark, { rx: 2 }) + ShapeUtil.rect(
|
|
19
|
+
-108,
|
|
20
|
+
-62,
|
|
21
|
+
216,
|
|
22
|
+
1.5,
|
|
23
|
+
ColorUtil.sh(theme.woodDark, 0.25)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
CounterAsset
|
|
29
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class CupAsset extends BaseAsset {
|
|
4
|
+
readonly id = "cup";
|
|
5
|
+
readonly kind = "surface";
|
|
6
|
+
readonly width = 16;
|
|
7
|
+
readonly height = 22;
|
|
8
|
+
readonly tags: string[];
|
|
9
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ColorUtil } from "../../Utils/ColorUtil.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
4
|
+
class CupAsset extends BaseAsset {
|
|
5
|
+
id = "cup";
|
|
6
|
+
kind = "surface";
|
|
7
|
+
width = 16;
|
|
8
|
+
height = 22;
|
|
9
|
+
tags = ["x\xEDcara", "xicara", "caneca", "mug", "coffee"];
|
|
10
|
+
draw(params, theme) {
|
|
11
|
+
const mainColor = ShapeUtil.color(theme, params.color, theme.paper);
|
|
12
|
+
return ShapeUtil.ellipse(0, 0, 9, 1.6, ColorUtil.sh(mainColor, -0.2)) + `<path d="M-6 -12 L6 -12 L5 0 L-5 0 Z" fill="${mainColor}"/><path d="M1 -12 L6 -12 L5 0 L1 0 Z" fill="${ColorUtil.sh(mainColor, -0.12)}"/>` + ShapeUtil.ellipse(0, -12, 6, 1.4, theme.woodDark) + `<path d="M6 -10 Q11 -9 10 -5 Q9 -3 5.5 -3" stroke="${mainColor}" stroke-width="2" fill="none"/>` + (params.steam === false ? "" : `<path d="M-2 -15 Q-5 -19 -2 -22 Q1 -25 -2 -28 M3 -15 Q0 -19 3 -22" stroke="${theme.metal}" stroke-width="1.3" fill="none" opacity="0.6" stroke-linecap="round"/>`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
CupAsset
|
|
17
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AssetDrawing, AssetKind, AssetParams, LibraryAsset } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import type { CustomArtwork, CustomAssetDefinition } from "../../Protocols/CustomAssetProtocol.js";
|
|
3
|
+
import type { Theme } from "../../Protocols/ThemeProtocol.js";
|
|
4
|
+
export declare class CustomAsset implements LibraryAsset {
|
|
5
|
+
readonly kind: AssetKind;
|
|
6
|
+
readonly height: number;
|
|
7
|
+
private readonly definition;
|
|
8
|
+
private readonly artwork;
|
|
9
|
+
private static readonly DEFAULT_RECOLOR_STRENGTH;
|
|
10
|
+
private static readonly KIND_TO_DEFAULT_ELEVATION;
|
|
11
|
+
private static readonly FACING_TO_SIGN;
|
|
12
|
+
private static readonly SHADOW_WIDTH;
|
|
13
|
+
private static readonly SHADOW_HEIGHT_RATIO;
|
|
14
|
+
private static readonly SHADOW_MAX_HEIGHT;
|
|
15
|
+
private static readonly GROUNDED_KINDS;
|
|
16
|
+
readonly width: number;
|
|
17
|
+
readonly top?: number;
|
|
18
|
+
readonly seat?: number;
|
|
19
|
+
readonly elevation?: number;
|
|
20
|
+
readonly tags: readonly string[];
|
|
21
|
+
private readonly scale;
|
|
22
|
+
constructor(kind: AssetKind, height: number, definition: CustomAssetDefinition, artwork: CustomArtwork);
|
|
23
|
+
draw(params: AssetParams, theme: Theme): AssetDrawing;
|
|
24
|
+
private shadow;
|
|
25
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { IdUtil } from "../../Utils/IdUtil.js";
|
|
2
|
+
import { RecolorUtil } from "../../Utils/RecolorUtil.js";
|
|
3
|
+
class CustomAsset {
|
|
4
|
+
constructor(kind, height, definition, artwork) {
|
|
5
|
+
this.kind = kind;
|
|
6
|
+
this.height = height;
|
|
7
|
+
this.definition = definition;
|
|
8
|
+
this.artwork = artwork;
|
|
9
|
+
this.scale = height / artwork.box.height;
|
|
10
|
+
this.width = artwork.box.width * this.scale;
|
|
11
|
+
this.top = definition.top;
|
|
12
|
+
this.seat = definition.seat;
|
|
13
|
+
this.elevation = definition.elevation ?? IdUtil.lookup(CustomAsset.KIND_TO_DEFAULT_ELEVATION, kind);
|
|
14
|
+
this.tags = definition.tags ?? [];
|
|
15
|
+
}
|
|
16
|
+
kind;
|
|
17
|
+
height;
|
|
18
|
+
definition;
|
|
19
|
+
artwork;
|
|
20
|
+
static DEFAULT_RECOLOR_STRENGTH = 0.75;
|
|
21
|
+
static KIND_TO_DEFAULT_ELEVATION = { wall: 80 };
|
|
22
|
+
static FACING_TO_SIGN = { left: -1, right: 1 };
|
|
23
|
+
static SHADOW_WIDTH = 0.45;
|
|
24
|
+
static SHADOW_HEIGHT_RATIO = 0.05;
|
|
25
|
+
static SHADOW_MAX_HEIGHT = 4;
|
|
26
|
+
static GROUNDED_KINDS = ["ground", "any"];
|
|
27
|
+
width;
|
|
28
|
+
top;
|
|
29
|
+
seat;
|
|
30
|
+
elevation;
|
|
31
|
+
tags;
|
|
32
|
+
scale;
|
|
33
|
+
draw(params, theme) {
|
|
34
|
+
const { definition, artwork, scale } = this;
|
|
35
|
+
const { box } = artwork;
|
|
36
|
+
const drawnSign = IdUtil.lookup(CustomAsset.FACING_TO_SIGN, definition.facing) ?? 1;
|
|
37
|
+
const wantedSign = params.facing ? CustomAsset.FACING_TO_SIGN[params.facing] : drawnSign;
|
|
38
|
+
const isFlipped = wantedSign !== drawnSign;
|
|
39
|
+
const strength = typeof definition.recolor === "number" ? definition.recolor : CustomAsset.DEFAULT_RECOLOR_STRENGTH;
|
|
40
|
+
const art = definition.recolor ? RecolorUtil.makeRecolor(theme, strength)(artwork.inner) : artwork.inner;
|
|
41
|
+
const offsetX = (-(box.x + box.width / 2) * scale).toFixed(3);
|
|
42
|
+
const offsetY = (-(box.y + box.height) * scale).toFixed(3);
|
|
43
|
+
const transform = `scale(${isFlipped ? -1 : 1} 1) translate(${offsetX} ${offsetY}) scale(${scale.toFixed(5)})`;
|
|
44
|
+
return this.shadow(params, theme) + `<g transform="${transform}">${art}</g>`;
|
|
45
|
+
}
|
|
46
|
+
shadow(params, theme) {
|
|
47
|
+
const isShadowOff = this.definition.shadow === false || params.shadow === false;
|
|
48
|
+
if (!CustomAsset.GROUNDED_KINDS.includes(this.kind) || isShadowOff) {
|
|
49
|
+
return "";
|
|
50
|
+
}
|
|
51
|
+
const radiusX = (this.width * CustomAsset.SHADOW_WIDTH).toFixed(1);
|
|
52
|
+
const radiusY = Math.min(CustomAsset.SHADOW_MAX_HEIGHT, this.width * CustomAsset.SHADOW_HEIGHT_RATIO).toFixed(1);
|
|
53
|
+
return `<ellipse cx="0" cy="0" rx="${radiusX}" ry="${radiusY}" fill="${theme.shadow}"/>`;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
CustomAsset
|
|
58
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class DeskAsset extends BaseAsset {
|
|
4
|
+
readonly id = "desk";
|
|
5
|
+
readonly kind = "ground";
|
|
6
|
+
readonly width = 130;
|
|
7
|
+
readonly height = 46;
|
|
8
|
+
readonly top = 46;
|
|
9
|
+
readonly tags: string[];
|
|
10
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ColorUtil } from "../../Utils/ColorUtil.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
4
|
+
class DeskAsset extends BaseAsset {
|
|
5
|
+
id = "desk";
|
|
6
|
+
kind = "ground";
|
|
7
|
+
width = 130;
|
|
8
|
+
height = 46;
|
|
9
|
+
top = 46;
|
|
10
|
+
tags = ["mesa de trabalho", "escrivaninha", "table_desk"];
|
|
11
|
+
draw(params, theme) {
|
|
12
|
+
return ShapeUtil.shadow(theme, 68, 3.5) + ShapeUtil.rect(-58, -40, 6, 40, theme.woodDark) + ShapeUtil.rect(
|
|
13
|
+
52,
|
|
14
|
+
-40,
|
|
15
|
+
6,
|
|
16
|
+
40,
|
|
17
|
+
theme.woodDark
|
|
18
|
+
) + ShapeUtil.rect(18, -40, 32, 22, theme.woodDark, { rx: 2 }) + ShapeUtil.rect(
|
|
19
|
+
18,
|
|
20
|
+
-40,
|
|
21
|
+
32,
|
|
22
|
+
4,
|
|
23
|
+
ColorUtil.sh(theme.woodDark, -0.2)
|
|
24
|
+
) + ShapeUtil.rect(30, -32, 8, 2.5, theme.accent, { rx: 1 }) + ShapeUtil.rect(-65, -46, 130, 7, theme.wood, { rx: 2 }) + ShapeUtil.rect(
|
|
25
|
+
-65,
|
|
26
|
+
-41,
|
|
27
|
+
130,
|
|
28
|
+
2,
|
|
29
|
+
ColorUtil.sh(theme.wood, -0.22)
|
|
30
|
+
) + ShapeUtil.rect(-63, -46, 126, 1.5, ColorUtil.sh(theme.wood, 0.2));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
DeskAsset
|
|
35
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class DeskSlabAsset extends BaseAsset {
|
|
4
|
+
private static readonly ENDS_TO_SIDES;
|
|
5
|
+
readonly id = "desk_slab";
|
|
6
|
+
readonly kind = "ground";
|
|
7
|
+
readonly isHollow = true;
|
|
8
|
+
readonly width = 120;
|
|
9
|
+
readonly height = 46;
|
|
10
|
+
readonly top = 46;
|
|
11
|
+
readonly tags: string[];
|
|
12
|
+
size(params: AssetParams): {
|
|
13
|
+
w: number;
|
|
14
|
+
h: number;
|
|
15
|
+
};
|
|
16
|
+
topOf(params: AssetParams): number;
|
|
17
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ColorUtil } from "../../Utils/ColorUtil.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
import { IdUtil } from "../../Utils/IdUtil.js";
|
|
4
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
5
|
+
class DeskSlabAsset extends BaseAsset {
|
|
6
|
+
static ENDS_TO_SIDES = {
|
|
7
|
+
none: { hasLeft: false, hasRight: false },
|
|
8
|
+
left: { hasLeft: true, hasRight: false },
|
|
9
|
+
right: { hasLeft: false, hasRight: true },
|
|
10
|
+
both: { hasLeft: true, hasRight: true }
|
|
11
|
+
};
|
|
12
|
+
id = "desk_slab";
|
|
13
|
+
kind = "ground";
|
|
14
|
+
isHollow = true;
|
|
15
|
+
width = 120;
|
|
16
|
+
height = 46;
|
|
17
|
+
top = 46;
|
|
18
|
+
tags = ["tampo", "bancada", "desk top", "mesa planejada"];
|
|
19
|
+
size(params) {
|
|
20
|
+
return { w: params.width ?? 120, h: params.height ?? 46 };
|
|
21
|
+
}
|
|
22
|
+
topOf(params) {
|
|
23
|
+
return params.height ?? 46;
|
|
24
|
+
}
|
|
25
|
+
draw(params, theme) {
|
|
26
|
+
const wide = params.width ?? 120;
|
|
27
|
+
const tall = params.height ?? 46;
|
|
28
|
+
const th = params.thickness ?? 4;
|
|
29
|
+
const mainColor = ShapeUtil.color(theme, params.color, theme.wood);
|
|
30
|
+
let svg = ShapeUtil.rect(-wide / 2, -tall, wide, th, mainColor) + ShapeUtil.rect(-wide / 2, -tall + th - 1.2, wide, 1.2, ColorUtil.sh(mainColor, -0.18)) + ShapeUtil.rect(-wide / 2, -tall, wide, 0.8, ColorUtil.sh(mainColor, 0.25));
|
|
31
|
+
const sides = IdUtil.lookup(DeskSlabAsset.ENDS_TO_SIDES, params.ends ?? "none");
|
|
32
|
+
if (sides?.hasLeft) {
|
|
33
|
+
svg = ShapeUtil.rect(-wide / 2, -tall, 3, tall, ColorUtil.sh(mainColor, -0.06)) + ShapeUtil.rect(-wide / 2 + 2, -tall, 1, tall, ColorUtil.sh(mainColor, -0.2)) + svg;
|
|
34
|
+
}
|
|
35
|
+
if (sides?.hasRight) {
|
|
36
|
+
svg = ShapeUtil.rect(wide / 2 - 3, -tall, 3, tall, ColorUtil.sh(mainColor, -0.12)) + svg;
|
|
37
|
+
}
|
|
38
|
+
return svg;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
DeskSlabAsset
|
|
43
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class DiplomaAsset extends BaseAsset {
|
|
4
|
+
readonly id = "diploma";
|
|
5
|
+
readonly kind = "any";
|
|
6
|
+
readonly width = 26;
|
|
7
|
+
readonly height = 12;
|
|
8
|
+
readonly tags: string[];
|
|
9
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ColorUtil } from "../../Utils/ColorUtil.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
4
|
+
class DiplomaAsset extends BaseAsset {
|
|
5
|
+
id = "diploma";
|
|
6
|
+
kind = "any";
|
|
7
|
+
width = 26;
|
|
8
|
+
height = 12;
|
|
9
|
+
tags = ["diploma", "canudo", "certificado"];
|
|
10
|
+
draw(params, theme) {
|
|
11
|
+
return ShapeUtil.rect(-13, -10, 26, 10, theme.paper, { rx: 5 }) + ShapeUtil.rect(-13, -10, 26, 4, ColorUtil.sh(theme.paper, 0), { rx: 5 }) + ShapeUtil.rect(
|
|
12
|
+
-13,
|
|
13
|
+
-4,
|
|
14
|
+
26,
|
|
15
|
+
4,
|
|
16
|
+
ColorUtil.sh(theme.paper, -0.12),
|
|
17
|
+
{ rx: 2 }
|
|
18
|
+
) + ShapeUtil.rect(-2, -11, 4, 12, theme.primary) + `<path d="M0 0 L-3 6 M0 0 L3 6" stroke="${theme.primary}" stroke-width="1.6"/>`;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
DiplomaAsset
|
|
23
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class DogAsset extends BaseAsset {
|
|
4
|
+
readonly id = "dog";
|
|
5
|
+
readonly kind = "ground";
|
|
6
|
+
readonly width = 50;
|
|
7
|
+
readonly height = 36;
|
|
8
|
+
readonly tags: string[];
|
|
9
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ColorUtil } from "../../Utils/ColorUtil.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
4
|
+
class DogAsset extends BaseAsset {
|
|
5
|
+
id = "dog";
|
|
6
|
+
kind = "ground";
|
|
7
|
+
width = 50;
|
|
8
|
+
height = 36;
|
|
9
|
+
tags = ["cachorro", "c\xE3o", "cao", "puppy"];
|
|
10
|
+
draw(params, theme) {
|
|
11
|
+
const mainColor = ShapeUtil.color(theme, params.color, theme.wood), flip = ShapeUtil.directionOf(params.facing), darker = ColorUtil.sh(mainColor, -0.2);
|
|
12
|
+
return `<g transform="scale(${flip} 1)">` + ShapeUtil.shadow(theme, 24, 3) + ShapeUtil.rect(-15, -14, 5, 14, darker, { rx: 2 }) + ShapeUtil.rect(9, -14, 5, 14, darker, { rx: 2 }) + ShapeUtil.ellipse(-1, -18, 18, 9, mainColor) + `<path d="M-17 -20 Q-26 -30 -22 -34" stroke="${mainColor}" stroke-width="4" fill="none" stroke-linecap="round"/>` + ShapeUtil.rect(-11, -14, 5, 14, mainColor, { rx: 2 }) + ShapeUtil.rect(13, -14, 5, 14, mainColor, { rx: 2 }) + ShapeUtil.circle(17, -29, 9, mainColor) + ShapeUtil.ellipse(24, -26, 6, 4.5, ColorUtil.sh(mainColor, 0.25)) + ShapeUtil.circle(29, -27, 2, theme.ink) + ShapeUtil.circle(19, -31, 1.4, theme.ink) + `<path d="M11 -36 Q8 -26 14 -25 Q15 -32 11 -36 Z" fill="${darker}"/>` + ShapeUtil.rect(
|
|
13
|
+
11,
|
|
14
|
+
-22,
|
|
15
|
+
10,
|
|
16
|
+
3,
|
|
17
|
+
theme.primary,
|
|
18
|
+
{ rx: 1.5 }
|
|
19
|
+
) + `</g>`;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
DogAsset
|
|
24
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class DrawerUnitAsset extends BaseAsset {
|
|
4
|
+
readonly id = "drawer_unit";
|
|
5
|
+
readonly kind = "ground";
|
|
6
|
+
readonly width = 26;
|
|
7
|
+
readonly height = 42;
|
|
8
|
+
readonly tags: string[];
|
|
9
|
+
size(params: AssetParams): {
|
|
10
|
+
w: number;
|
|
11
|
+
h: number;
|
|
12
|
+
};
|
|
13
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ColorUtil } from "../../Utils/ColorUtil.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
4
|
+
class DrawerUnitAsset extends BaseAsset {
|
|
5
|
+
id = "drawer_unit";
|
|
6
|
+
kind = "ground";
|
|
7
|
+
width = 26;
|
|
8
|
+
height = 42;
|
|
9
|
+
tags = ["gaveteiro", "gavetas", "drawers"];
|
|
10
|
+
size(params) {
|
|
11
|
+
return { w: params.width ?? 26, h: params.height ?? 42 };
|
|
12
|
+
}
|
|
13
|
+
draw(params, theme) {
|
|
14
|
+
const wide = params.width ?? 26, tall = params.height ?? 42, count = params.drawers ?? 4, mainColor = ShapeUtil.color(theme, params.color, theme.wood), plinth = 2.5;
|
|
15
|
+
let svg = ShapeUtil.shadow(theme, wide * 0.55, 1.8) + ShapeUtil.rect(
|
|
16
|
+
-wide / 2,
|
|
17
|
+
-tall,
|
|
18
|
+
wide,
|
|
19
|
+
tall,
|
|
20
|
+
ColorUtil.sh(mainColor, -0.08)
|
|
21
|
+
) + ShapeUtil.rect(-wide / 2, -plinth, wide, plinth, ColorUtil.sh(
|
|
22
|
+
mainColor,
|
|
23
|
+
-0.25
|
|
24
|
+
));
|
|
25
|
+
const dh = (tall - plinth - 1) / count;
|
|
26
|
+
for (let index = 0; index < count; index++) {
|
|
27
|
+
const posY = -tall + 0.6 + index * dh;
|
|
28
|
+
svg += ShapeUtil.rect(-wide / 2 + 0.8, posY, wide - 1.6, dh - 0.7, mainColor, { rx: 0.6 }) + ShapeUtil.rect(-wide / 2 + 0.8, posY + dh - 1.4, wide - 1.6, 0.7, ColorUtil.sh(mainColor, -0.15)) + ShapeUtil.rect(-wide * 0.28, posY + dh * 0.42, wide * 0.56, 0.8, theme.metal, { rx: 0.4 }) + ShapeUtil.rect(-wide * 0.28, posY + dh * 0.42 + 0.6, wide * 0.56, 0.35, ColorUtil.sh(theme.metal, -0.3));
|
|
29
|
+
}
|
|
30
|
+
return svg;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
DrawerUnitAsset
|
|
35
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class FenceAsset extends BaseAsset {
|
|
4
|
+
readonly id = "fence";
|
|
5
|
+
readonly kind = "ground";
|
|
6
|
+
readonly width = 160;
|
|
7
|
+
readonly height = 40;
|
|
8
|
+
readonly tags: string[];
|
|
9
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ColorUtil } from "../../Utils/ColorUtil.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
4
|
+
class FenceAsset extends BaseAsset {
|
|
5
|
+
id = "fence";
|
|
6
|
+
kind = "ground";
|
|
7
|
+
width = 160;
|
|
8
|
+
height = 40;
|
|
9
|
+
tags = ["cerca"];
|
|
10
|
+
draw(params, theme) {
|
|
11
|
+
let svg = ShapeUtil.rect(-80, -30, 160, 5, theme.paper) + ShapeUtil.rect(-80, -15, 160, 5, theme.paper) + ShapeUtil.rect(-80, -25, 160, 2, ColorUtil.sh(theme.paper, -0.15)) + ShapeUtil.rect(
|
|
12
|
+
-80,
|
|
13
|
+
-10,
|
|
14
|
+
160,
|
|
15
|
+
2,
|
|
16
|
+
ColorUtil.sh(theme.paper, -0.15)
|
|
17
|
+
);
|
|
18
|
+
for (let posX = -76; posX <= 70; posX += 18) {
|
|
19
|
+
svg += `<path d="M${posX} 0 L${posX} -34 L${posX + 5} -40 L${posX + 10} -34 L${posX + 10} 0 Z" fill="${theme.paper}"/><path d="M${posX + 6} 0 L${posX + 6} -38 L${posX + 10} -34 L${posX + 10} 0 Z" fill="${ColorUtil.sh(theme.paper, -0.12)}"/>`;
|
|
20
|
+
}
|
|
21
|
+
return svg;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
FenceAsset
|
|
26
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class FigurineAsset extends BaseAsset {
|
|
4
|
+
readonly id = "figurine";
|
|
5
|
+
readonly kind = "surface";
|
|
6
|
+
readonly width = 4;
|
|
7
|
+
readonly height = 6;
|
|
8
|
+
readonly tags: string[];
|
|
9
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ColorUtil } from "../../Utils/ColorUtil.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
4
|
+
class FigurineAsset extends BaseAsset {
|
|
5
|
+
id = "figurine";
|
|
6
|
+
kind = "surface";
|
|
7
|
+
width = 4;
|
|
8
|
+
height = 6;
|
|
9
|
+
tags = ["boneco", "miniatura", "action figure", "toy"];
|
|
10
|
+
draw(params, theme) {
|
|
11
|
+
const mainColor = ShapeUtil.color(theme, params.color, theme.primary);
|
|
12
|
+
return ShapeUtil.ellipse(0, -0.4, 2, 0.6, ColorUtil.sh(mainColor, -0.3)) + ShapeUtil.rect(
|
|
13
|
+
-1.4,
|
|
14
|
+
-3.6,
|
|
15
|
+
2.8,
|
|
16
|
+
3.2,
|
|
17
|
+
mainColor,
|
|
18
|
+
{ rx: 1 }
|
|
19
|
+
) + ShapeUtil.circle(0, -4.9, 1.7, "#F0C8A0") + `<path d="M-1.8 -5.2 Q0 -7.4 1.8 -5.2 Z" fill="${ShapeUtil.color(theme, params.hair, theme.ink)}"/>` + ShapeUtil.rect(-1.9, -3.4, 0.7, 2, ColorUtil.sh(mainColor, -0.2), { rx: 0.3 });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
FigurineAsset
|
|
24
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class FinishFlagAsset extends BaseAsset {
|
|
4
|
+
readonly id = "finish_flag";
|
|
5
|
+
readonly kind = "ground";
|
|
6
|
+
readonly width = 50;
|
|
7
|
+
readonly height = 90;
|
|
8
|
+
readonly tags: string[];
|
|
9
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
2
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
3
|
+
class FinishFlagAsset extends BaseAsset {
|
|
4
|
+
id = "finish_flag";
|
|
5
|
+
kind = "ground";
|
|
6
|
+
width = 50;
|
|
7
|
+
height = 90;
|
|
8
|
+
tags = ["bandeira de chegada", "chegada", "finish", "bandeira quadriculada"];
|
|
9
|
+
draw(params, theme) {
|
|
10
|
+
let svg = ShapeUtil.shadow(theme, 10, 2) + `<path d="M0 0 L0 -90" stroke="${theme.ink}" stroke-width="3.5" stroke-linecap="round"/>`;
|
|
11
|
+
for (let index = 0; index < 4; index++) {
|
|
12
|
+
for (let innerIndex = 0; innerIndex < 3; innerIndex++) {
|
|
13
|
+
svg += ShapeUtil.rect(2 + index * 10, -88 + innerIndex * 10 + (index % 2 ? 1 : 0), 10, 10, (index + innerIndex) % 2 ? theme.ink : theme.paper);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return svg + ShapeUtil.rect(2, -88, 40, 30, "none", { rx: 0, extra: `stroke="${theme.ink}" stroke-width="1.2"` });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
FinishFlagAsset
|
|
21
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class FloorLampAsset extends BaseAsset {
|
|
4
|
+
readonly id = "floor_lamp";
|
|
5
|
+
readonly kind = "ground";
|
|
6
|
+
readonly width = 40;
|
|
7
|
+
readonly height = 150;
|
|
8
|
+
readonly tags: string[];
|
|
9
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ColorUtil } from "../../Utils/ColorUtil.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
4
|
+
class FloorLampAsset extends BaseAsset {
|
|
5
|
+
id = "floor_lamp";
|
|
6
|
+
kind = "ground";
|
|
7
|
+
width = 40;
|
|
8
|
+
height = 150;
|
|
9
|
+
tags = ["abajur de ch\xE3o", "lumin\xE1ria de ch\xE3o", "luminaria de chao", "floor lamp"];
|
|
10
|
+
draw(params, theme) {
|
|
11
|
+
return ShapeUtil.shadow(theme, 14, 2.5) + ShapeUtil.ellipse(0, -2, 13, 3, theme.ink) + ShapeUtil.rect(
|
|
12
|
+
-1.5,
|
|
13
|
+
-125,
|
|
14
|
+
3,
|
|
15
|
+
123,
|
|
16
|
+
theme.ink
|
|
17
|
+
) + `<path d="M-16 -122 L-11 -150 L11 -150 L16 -122 Z" fill="${theme.accent}"/><path d="M2 -150 L11 -150 L16 -122 L4 -122 Z" fill="${ColorUtil.sh(theme.accent, -0.15)}"/><path d="M-16 -122 L-40 -20 L40 -20 L16 -122 Z" fill="#FFE9A8" opacity="0.12"/>`;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
FloorLampAsset
|
|
22
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class FlowersAsset extends BaseAsset {
|
|
4
|
+
readonly id = "flowers";
|
|
5
|
+
readonly kind = "ground";
|
|
6
|
+
readonly width = 50;
|
|
7
|
+
readonly height = 30;
|
|
8
|
+
readonly tags: string[];
|
|
9
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
2
|
+
import { ShapeUtil } from "../../Utils/ShapeUtil.js";
|
|
3
|
+
class FlowersAsset extends BaseAsset {
|
|
4
|
+
id = "flowers";
|
|
5
|
+
kind = "ground";
|
|
6
|
+
width = 50;
|
|
7
|
+
height = 30;
|
|
8
|
+
tags = ["flores", "canteiro", "flower_bed"];
|
|
9
|
+
draw(params, theme) {
|
|
10
|
+
const [first, second] = theme.foliage;
|
|
11
|
+
let svg = ShapeUtil.shadow(theme, 24, 2.5);
|
|
12
|
+
const blooms = [
|
|
13
|
+
[-16, -16, theme.primary],
|
|
14
|
+
[-4, -24, theme.accent],
|
|
15
|
+
[9, -18, theme.paper],
|
|
16
|
+
[19, -12, theme.primary],
|
|
17
|
+
[-20, -8, theme.accent]
|
|
18
|
+
];
|
|
19
|
+
blooms.forEach(([posX, posY, color]) => {
|
|
20
|
+
svg += `<path d="M${posX} 0 Q${posX + 1} ${posY / 2} ${posX} ${posY}" stroke="${second}" stroke-width="2" fill="none"/>` + [0, 72, 144, 216, 288].map((angle) => ShapeUtil.circle(
|
|
21
|
+
posX + Math.cos(ShapeUtil.toRadians(angle)) * 3,
|
|
22
|
+
posY + Math.sin(ShapeUtil.toRadians(angle)) * 3,
|
|
23
|
+
2.6,
|
|
24
|
+
color
|
|
25
|
+
)).join("") + ShapeUtil.circle(
|
|
26
|
+
posX,
|
|
27
|
+
posY,
|
|
28
|
+
1.8,
|
|
29
|
+
theme.accent === color ? theme.paper : theme.accent
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
return svg + ShapeUtil.ellipse(0, -2, 24, 4, first);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
FlowersAsset
|
|
37
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AssetParams, Theme } from "../../Protocols/AssetProtocol.js";
|
|
2
|
+
import { BaseAsset } from "./BaseAsset.js";
|
|
3
|
+
export declare class FrameAsset extends BaseAsset {
|
|
4
|
+
readonly id = "frame";
|
|
5
|
+
readonly kind = "wall";
|
|
6
|
+
readonly width = 60;
|
|
7
|
+
readonly height = 46;
|
|
8
|
+
readonly elevation = 95;
|
|
9
|
+
readonly tags: string[];
|
|
10
|
+
draw(params: AssetParams, theme: Theme): string;
|
|
11
|
+
}
|