(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
Object.defineProperty(exports, "__esModule", { value: true });
const p5Instance_1 = require("./common/p5Instance");
const common = require("./common/settings");
this.isCompleted = false;
this.startPointPosition = param.startPointPosition;
this.width = param.width || 0.9 * common.nonScaledWidth;
this.height = param.height || 0.5 * common.nonScaledHeight;
this.repetitionPerFrame = param.repetitionPerFrame || 60;
const positionNoiseScale = p5Instance_1.p.random(0.008, 0.015);
const speedNoiseScale = p5Instance_1.p.random(0.005, 0.015);
this.topPoint = new NoisePoint(this.width, 0.5 * this.height, positionNoiseScale, speedNoiseScale, 1);
this.bottomPoint = new NoisePoint(this.width, 0.5 * this.height, positionNoiseScale, speedNoiseScale, -1);
for (let i = 0; i < this.repetitionPerFrame; i += 1) {
if (this.topPoint.reachedEndPoint && this.bottomPoint.reachedEndPoint) {
const distance = this.topPoint.x - this.bottomPoint.x;
const thresholdDistance = 0.25 * this.height;
if (distance > thresholdDistance)
else if (distance < -thresholdDistance)
p5Instance_1.p.translate(this.startPointPosition.x, this.startPointPosition.y);
p5Instance_1.p.line(this.topPoint.x, this.topPoint.y, this.bottomPoint.x, this.bottomPoint.y);
p5Instance_1.p.translate(-this.startPointPosition.x, -this.startPointPosition.y);
exports.default = NoiseWave;
constructor(width, height, positionNoiseScale, speedNoiseScale, baseYFactor) {
this.reachedEndPoint = false;
this.position = p5Instance_1.p.createVector();
this.noiseParameterOffset = Math.random() * 1024;
this.positionNoiseScale = positionNoiseScale;
this.speedNoiseScale = speedNoiseScale;
this.baseYFactor = baseYFactor;
if (this.reachedEndPoint)
this.speed = 0.25 * Math.abs(0.5 - p5Instance_1.p.noise(this.noiseParameterOffset + this.speedNoiseScale * p5Instance_1.p.frameCount));
this.position.x += this.speed;
if (this.position.x > this.width) {
this.position.x = this.width;
this.reachedEndPoint = true;
const progressRatio = this.position.x / this.width;
const yFactor = this.baseYFactor * p5Instance_1.p.sqrt(Math.sin(progressRatio * Math.PI)) * this.height;
this.position.y = yFactor * 1.8 * (p5Instance_1.p.noise(this.noiseParameterOffset + this.positionNoiseScale * this.position.x) - 0.3);
},{"./common/p5Instance":4,"./common/settings":5}],2:[function(require,module,exports){
Object.defineProperty(exports, "__esModule", { value: true });
const common = require("./settings");
const p5Instance_1 = require("./p5Instance");
common.currentRenderer.stroke(this.p5Color);
common.currentRenderer.fill(this.p5Color);
common.currentRenderer.noStroke();
common.currentRenderer.noFill();
class UndefinedColorUnit {
constructor(c, alphaResolution = 256) {
for (let alphaFactor = 0; alphaFactor < alphaResolution; alphaFactor += 1) {
array.push(p5Instance_1.p.color(p5Instance_1.p.red(c), p5Instance_1.p.green(c), p5Instance_1.p.blue(c), p5Instance_1.p.alpha(c) * alphaFactor / (alphaResolution - 1)));
this.maxIndex = alphaResolution - 1;
common.currentRenderer.stroke(this.getColor(alphaValue));
common.currentRenderer.stroke(this.getColor(alphaValue));
return this.colorArray[alphaValue ? Math.floor(p5Instance_1.p.map(alphaValue, 0, 255, 0, this.maxIndex)) : this.maxIndex];
function colorUnit(p5Color, alphaEnabled, alphaResolution) {
if (p5Color === undefined)
return new UndefinedColorUnit();
return new NoColorUnit();
return new AlphaColorUnit(p5Color, alphaResolution);
return new NormalColorUnit(p5Color);
constructor(strokeColor, fillColor, alphaEnabled, alphaResolution) {
this.strokeColor = colorUnit(strokeColor, alphaEnabled, alphaResolution);
this.fillColor = colorUnit(fillColor, alphaEnabled, alphaResolution);
this.strokeColor.stroke(alphaValue);
this.fillColor.fill(alphaValue);
exports.default = ShapeColor;
},{"./p5Instance":4,"./settings":5}],3:[function(require,module,exports){
Object.defineProperty(exports, "__esModule", { value: true });
const common = require("../settings");
function createSignFunction(xMargin, yMargin, textSize, textColor, textBackgroundColor, titleText) {
const textAreaWidth = xMargin;
const textAreaHeight = yMargin + textSize * 1.1;
const leftX = common.nonScaledWidth - textAreaWidth;
const topY = common.nonScaledHeight - textAreaHeight;
const baseLineY = common.nonScaledHeight - yMargin;
const getTitleText = (typeof titleText === 'string') ? () => { return titleText; } : titleText;
textBackgroundColor.applyColor();
common.currentRenderer.rect(leftX, topY, textAreaWidth, textAreaHeight);
common.currentRenderer.text(getTitleText(), leftX, baseLineY);
exports.default = createSignFunction;
},{"../settings":5}],4:[function(require,module,exports){
Object.defineProperty(exports, "__esModule", { value: true });
function setP5Instance(pInst) {
exports.setP5Instance = setP5Instance;
},{}],5:[function(require,module,exports){
Object.defineProperty(exports, "__esModule", { value: true });
function setFrameRate(pInst, frameRate = 60) {
pInst.frameRate(frameRate);
exports.idealFrameRate = 60;
exports.unitAngleSpeed = 2 * Math.PI / exports.idealFrameRate;
exports.unitSpeed = 1 / exports.idealFrameRate;
exports.unitAccelerationMagnitude = exports.unitSpeed / exports.idealFrameRate;
exports.setFrameRate = setFrameRate;
exports.CANVAS_SHORT_SIDE_LENGTH = 640;
function updateCanvasScale(pInst) {
exports.canvasScaleFactor = Math.min(pInst.width, pInst.height) / exports.CANVAS_SHORT_SIDE_LENGTH;
exports.nonScaledWidth = pInst.width / exports.canvasScaleFactor;
exports.nonScaledHeight = pInst.height / exports.canvasScaleFactor;
exports.aspectRatio = pInst.width / pInst.height;
exports.updateCanvasScale = updateCanvasScale;
function setRenderer(renderer) {
exports.currentRenderer = renderer;
exports.setRenderer = setRenderer;
function initialize(pInst, frameRate = 60) {
updateCanvasScale(pInst);
setFrameRate(pInst, frameRate);
exports.initialize = initialize;
},{}],6:[function(require,module,exports){
Object.defineProperty(exports, "__esModule", { value: true });
const common = require("./common/settings");
const p5Instance_1 = require("./common/p5Instance");
const ShapeColor_1 = require("./common/ShapeColor");
const createSignFunction_1 = require("./common/functions/createSignFunction");
const NoiseWave_1 = require("./NoiseWave");
p5.disableFriendlyErrors = true;
const fontPath = 'Bellefair-Regular.ttf';
function getCurrentISODate() {
const dateTime = new Date().toISOString();
return dateTime.substring(0, dateTime.indexOf('T'));
p.background(backgroundColor);
noiseWaveA = new NoiseWave_1.default({
startPointPosition: p.createVector(0.05 * common.nonScaledWidth, 0.25 * common.nonScaledHeight),
noiseWaveB = new NoiseWave_1.default({
startPointPosition: p.createVector(0.05 * common.nonScaledWidth, 0.75 * common.nonScaledHeight),
currentFont = p.loadFont(fontPath);
p.createCanvas(0.95 * p.windowWidth, 0.95 * p.windowHeight);
p5Instance_1.setP5Instance(p);
backgroundColor = p.color(0, 0, 8);
waveColor = p.color(255, 6);
p.textFont(currentFont, currentFontSize);
sign = createSignFunction_1.default(240, 20, currentFontSize, new ShapeColor_1.default(null, p.color(255)), new ShapeColor_1.default(null, backgroundColor), () => { return 'Noise Wave ' + getCurrentISODate() + ' - FAL'; });
p.scale(common.canvasScaleFactor);
if (noiseWaveA.isCompleted)
},{"./NoiseWave":1,"./common/ShapeColor":2,"./common/functions/createSignFunction":3,"./common/p5Instance":4,"./common/settings":5}]},{},[6]);