Skip to content

Commit

Permalink
Lots of work done on clocks and clock keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunomiac committed Dec 10, 2023
1 parent 17b493d commit c90b5c9
Show file tree
Hide file tree
Showing 105 changed files with 1,263 additions and 1,018 deletions.
Binary file removed assets/progressclocks-png/blue/12/12clock_0.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/12/12clock_1.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/12/12clock_10.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/12/12clock_11.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/12/12clock_12.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/12/12clock_2.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/12/12clock_3.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/12/12clock_4.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/12/12clock_5.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/12/12clock_6.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/12/12clock_7.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/12/12clock_8.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/12/12clock_9.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/4/4clock_0.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/4/4clock_1.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/4/4clock_2.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/4/4clock_3.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/4/4clock_4.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/6/6clock_0.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/6/6clock_1.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/6/6clock_2.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/6/6clock_3.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/6/6clock_4.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/6/6clock_5.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/6/6clock_6.png
Binary file not shown.
Binary file removed assets/progressclocks-png/blue/8/8clock_0.png
Diff not rendered.
Binary file removed assets/progressclocks-png/blue/8/8clock_1.png
Diff not rendered.
Binary file removed assets/progressclocks-png/blue/8/8clock_2.png
Diff not rendered.
Binary file removed assets/progressclocks-png/blue/8/8clock_3.png
Diff not rendered.
Binary file removed assets/progressclocks-png/blue/8/8clock_4.png
Diff not rendered.
Binary file removed assets/progressclocks-png/blue/8/8clock_5.png
Diff not rendered.
Binary file removed assets/progressclocks-png/blue/8/8clock_6.png
Diff not rendered.
Binary file removed assets/progressclocks-png/blue/8/8clock_7.png
Diff not rendered.
Binary file removed assets/progressclocks-png/blue/8/8clock_8.png
Diff not rendered.
Binary file removed assets/progressclocks-png/test-clock.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_0.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_1.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_10.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_11.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_12.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_2.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_3.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_4.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_5.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_6.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_7.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_8.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/12/12clock_9.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/4/4clock_0.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/4/4clock_1.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/4/4clock_2.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/4/4clock_3.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/4/4clock_4.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/6/6clock_0.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/6/6clock_1.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/6/6clock_2.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/6/6clock_3.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/6/6clock_4.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/6/6clock_5.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/6/6clock_6.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/8/8clock_0.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/8/8clock_1.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/8/8clock_2.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/8/8clock_3.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/8/8clock_4.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/8/8clock_5.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/8/8clock_6.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/8/8clock_7.png
Diff not rendered.
Binary file removed assets/progressclocks-png/yellow/8/8clock_8.png
Diff not rendered.
848 changes: 326 additions & 522 deletions css/style.min.css

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions module/core/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,14 @@ export var ClockKeyDisplayMode;
ClockKeyDisplayMode["full"] = "full";
ClockKeyDisplayMode["clocks"] = "clocks";
ClockKeyDisplayMode["currentClock"] = "currentClock";
ClockKeyDisplayMode["presentCurrentClock"] = "presentCurrentClock";
ClockKeyDisplayMode["present0"] = "present0";
ClockKeyDisplayMode["present1"] = "present1";
ClockKeyDisplayMode["present2"] = "present2";
ClockKeyDisplayMode["present3"] = "present3";
ClockKeyDisplayMode["present4"] = "present4";
ClockKeyDisplayMode["present5"] = "present5";
ClockKeyDisplayMode["present6"] = "present6";
})(ClockKeyDisplayMode || (ClockKeyDisplayMode = {}));
const C = {
SYSTEM_ID: "eunos-blades",
Expand Down
20 changes: 19 additions & 1 deletion module/core/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,24 @@ const pFloat = (ref, sigDigits, isStrict = false) => {
return isStrict ? NaN : 0;
};
const pInt = (ref, isStrict = false) => (isNaN(pFloat(ref, 0, isStrict)) ? NaN : Math.round(pFloat(ref, 0, isStrict)));
const pBool = (ref) => {
if (typeof ref === "boolean") {
return ref;
}
if ([0, null, undefined, ""].includes(ref)) {
return false;
}
if (typeof ref === "string") {
return !["0", "false", "null", "undefined", ""].includes(ref);
}
if (isArray(ref) && ref.length === 0) {
return false;
}
if (isList(ref) && isEmpty(ref)) {
return false;
}
return true;
};
const radToDeg = (rad, isConstrained = true) => {
rad = isConstrained ? rad % (2 * Math.PI) : rad;
rad *= 180 / Math.PI;
Expand Down Expand Up @@ -1617,7 +1635,7 @@ export default {
isHTMLCode, isRGBColor, isHexColor,
isUndefined, isDefined, isEmpty, hasItems, isInstance, isNullish,
areEqual, areFuzzyEqual,
pFloat, pInt, radToDeg, degToRad,
pFloat, pInt, pBool, radToDeg, degToRad,
getKey,
assertNonNullType,
FILTERS,
Expand Down
309 changes: 243 additions & 66 deletions module/documents/items/BladesClock.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions module/sheets/item/BladesItemSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@ class BladesItemSheet extends ItemSheet {
if (!(this.item instanceof BladesProject)) {
return undefined;
}
if (this.item.clockKey) {
this.item.clockKey.isShowingControls = game.user.isGM;
}
// if (this.item.clockKey) {
// this.item.clockKey.isShowingControls = game.user.isGM;
// }
const sheetData = {};
return {
...context,
Expand Down
19 changes: 11 additions & 8 deletions scss/components/_clocks-overlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ $label-positions: (
&, & * {
--top-shift: 50px;
--left-shift: 75px;
--key-scale: 0.6;
--key-scale: 0.8;
--alternating-top-shift: 120px;
--clock-frame-size: 108px;
--clock-glow-size: calc(var(--clock-frame-size) * 3);
Expand All @@ -104,22 +104,25 @@ $label-positions: (
// height: calc((100% / var(--key-scale)) - var(--top-shift));
width: 100%;
height: 100%;
// top: var(--top-shift);
// left: var(--left-shift);
top: 0;
left: 0;
top: var(--top-shift);
left: var(--left-shift);
pointer-events: none;
z-index: 50;

.svg-defs { position: absolute; }

.clock-key:nth-child(2n+1) { top: var(--alternating-top-shift) }
.clock-key-container:nth-child(2n+1) { top: var(--alternating-top-shift) }

@import './clocks';

.clock-key-container {
height: 300px;
width: calc(0.6 * var(--key-width));
height: calc(0.7 * var(--key-height));
width: calc(0.7 * var(--key-width));
min-width: 200px;
margin-right: calc(-0.25 * 0.7 * var(--key-width));

// background: rgba(255, 255, 0, 0.25);
// outline: 2px dotted rgb(255, 255, 0);

// --clock-size: 110px;
}
Expand Down
Loading

0 comments on commit c90b5c9

Please sign in to comment.