@bitbybit-dev/base
Version:
Bit By Bit Developers Base CAD Library to Program Geometry
112 lines (111 loc) • 3.5 kB
JavaScript
/* eslint-disable @typescript-eslint/no-namespace */
// tslint:disable-next-line: no-namespace
export var Logic;
(function (Logic) {
let BooleanOperatorsEnum;
(function (BooleanOperatorsEnum) {
BooleanOperatorsEnum["less"] = "<";
BooleanOperatorsEnum["lessOrEqual"] = "<=";
BooleanOperatorsEnum["greater"] = ">";
BooleanOperatorsEnum["greaterOrEqual"] = ">=";
BooleanOperatorsEnum["tripleEqual"] = "===";
BooleanOperatorsEnum["tripleNotEqual"] = "!==";
BooleanOperatorsEnum["equal"] = "==";
BooleanOperatorsEnum["notEqual"] = "!=";
})(BooleanOperatorsEnum = Logic.BooleanOperatorsEnum || (Logic.BooleanOperatorsEnum = {}));
class ComparisonDto {
constructor(first, second, operator) {
if (first !== undefined) {
this.first = first;
}
if (second !== undefined) {
this.second = second;
}
if (operator !== undefined) {
this.operator = operator;
}
}
}
Logic.ComparisonDto = ComparisonDto;
class BooleanDto {
constructor(boolean) {
/**
* Boolean value
* @default false
*/
this.boolean = false;
if (boolean !== undefined) {
this.boolean = boolean;
}
}
}
Logic.BooleanDto = BooleanDto;
class BooleanListDto {
constructor(booleans) {
if (booleans !== undefined) {
this.booleans = booleans;
}
}
}
Logic.BooleanListDto = BooleanListDto;
class ValueGateDto {
constructor(value, boolean) {
/**
* Boolean value to release the gate
* @default false
*/
this.boolean = false;
if (value !== undefined) {
this.value = value;
}
if (boolean !== undefined) {
this.boolean = boolean;
}
}
}
Logic.ValueGateDto = ValueGateDto;
class TwoValueGateDto {
constructor(value1, value2) {
if (value1 !== undefined) {
this.value1 = value1;
}
if (value2 !== undefined) {
this.value2 = value2;
}
}
}
Logic.TwoValueGateDto = TwoValueGateDto;
class RandomBooleansDto {
constructor(length) {
/**
* Length of the list
* @default 10
* @minimum 1
* @maximum Infinity
* @step 1
*/
this.length = 10;
/**
* Threshold for true value between 0 and 1. The closer the value is to 1 the more true values there will be in the list.
* @default 0.5
* @minimum 0
* @maximum 1
* @step 0.1
*/
this.trueThreshold = 0.5;
if (length !== undefined) {
this.length = length;
}
}
}
Logic.RandomBooleansDto = RandomBooleansDto;
class TwoThresholdRandomGradientDto {
}
Logic.TwoThresholdRandomGradientDto = TwoThresholdRandomGradientDto;
class ThresholdBooleanListDto {
}
Logic.ThresholdBooleanListDto = ThresholdBooleanListDto;
class ThresholdGapsBooleanListDto {
}
Logic.ThresholdGapsBooleanListDto = ThresholdGapsBooleanListDto;
})(Logic || (Logic = {}));