Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renamed to be underscores, made LOT_NR var #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions generator/effects/protocell_labs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { addAuthorRoyalties } from "../royalties.js";
import { features } from "../generate.js";

const AUTHOR_TEZOS_ADDRESS = "tz1dUQZNCe18p9wMEqAyXvY5GocKWGsUfZHn"; // protocell.tez

export const LOT_NR = '001';

/*
My amazing effect
Expand Down Expand Up @@ -275,7 +275,7 @@ export async function animateMonochromeDither(img, image_border, sketch, frameNu
sketch.background(0);
applyMonochromeDither(frame, image_border, new_brightness, contrast, pix_scaling, pix_scaling_dark, nr_of_levels, dither_params_1, dither_params_2, dither_params_3, mask_contrast, light_treshold, dark_treshold, invert_mask, tint_palette, layer_shift, sketch);
// draw lot nr. symbol in the bottom right corner of the image, based on Fu Xi Bagua trigrams, binary numbering
addLotSymbol('001', frame, image_border, tint_palette, rgb, sketch);
addLotSymbol(LOT_NR, frame, image_border, tint_palette, rgb, sketch);
// draw quote from Neuromancer encoded in binary - only for those who have 'signal' feature
if (signal_recieved) { addBinaryCode(rand_quote_string, img, image_border, tint_palette, rgb, frameNum, sketch); }
}
Expand Down Expand Up @@ -327,7 +327,7 @@ export async function animateTintedDither(img, image_border, sketch, frameNum) {
sketch.background(0);
applyTintedDither(frame, image_border, new_brightness, contrast, pix_scaling, nr_of_levels, dither_params_1, dither_params_2, mask_contrast, light_treshold, invert_mask, tint_palette, layer_shift, sketch);
// draw lot nr. symbol in the bottom right corner of the image, based on Fu Xi Bagua trigrams, binary numbering
addLotSymbol('001', frame, image_border, tint_palette, rgb, sketch);
addLotSymbol(LOT_NR, frame, image_border, tint_palette, rgb, sketch);
// draw quote from Neuromancer encoded in binary - only for those who have 'signal' feature
if (signal_recieved) { addBinaryCode(rand_quote_string, img, image_border, tint_palette, rgb, frameNum, sketch); }
}
Expand Down Expand Up @@ -391,7 +391,7 @@ export async function animateDitherSorting(img, image_border, sketch, frameNum)
sketch.background(0);
applyDitherSorting(frame, image_border, new_brightness, contrast, pix_scaling, nr_of_levels, dither_params_1, dither_params_2, mask_contrast, light_treshold, invert_mask, blackValue, brigthnessValue, whiteValue, sorting_mode, sorting_type, sorting_order, color_noise_density, color_noise_bias, color_noise_variation, tint_palette_key, tint_palette, layer_shift, sketch);
// draw lot nr. symbol in the bottom right corner of the image, based on Fu Xi Bagua trigrams, binary numbering
addLotSymbol('001', frame, image_border, tint_palette, rgb, sketch);
addLotSymbol(LOT_NR, frame, image_border, tint_palette, rgb, sketch);
// draw quote from Neuromancer encoded in binary - only for those who have 'signal' feature
if (signal_recieved) { addBinaryCode(rand_quote_string, img, image_border, tint_palette, rgb, frameNum, sketch); }
}
Expand Down Expand Up @@ -455,7 +455,7 @@ export async function animateSortingDither(img, image_border, sketch, frameNum)
sketch.background(0);
applySortingDither(frame, image_border, new_brightness, contrast, pix_scaling, nr_of_levels, dither_params_1, dither_params_2, mask_contrast, light_treshold, invert_mask, blackValue, brigthnessValue, whiteValue, sorting_mode, sorting_type, sorting_order, color_noise_density, color_noise_bias, color_noise_variation, tint_palette_key, tint_palette, layer_shift, sketch);
// draw lot nr. symbol in the bottom right corner of the image, based on Fu Xi Bagua trigrams, binary numbering
addLotSymbol('001', frame, image_border, tint_palette, rgb, sketch);
addLotSymbol(LOT_NR, frame, image_border, tint_palette, rgb, sketch);
// draw quote from Neuromancer encoded in binary - only for those who have 'signal' feature
if (signal_recieved) { addBinaryCode(rand_quote_string, img, image_border, tint_palette, rgb, frameNum, sketch); }
}
Expand Down Expand Up @@ -536,7 +536,7 @@ export async function animateAbstractDither(img, image_border, sketch, frameNum)
// looks like frame changes size after we run it through effects above, so we need to recreate a temp object just to hold original frame dimensions
let fakeFrame = {width:900, height:900};
// draw lot nr. symbol in the bottom right corner of the image, based on Fu Xi Bagua trigrams, binary numbering
addLotSymbol('001', fakeFrame, image_border, tint_palette, rgb, sketch);
addLotSymbol(LOT_NR, fakeFrame, image_border, tint_palette, rgb, sketch);
// draw quote from Neuromancer encoded in binary - only for those who have 'signal' feature
if (signal_recieved) { addBinaryCode(rand_quote_string, img, image_border, tint_palette, rgb, frameNum, sketch); }
}
Expand Down
6 changes: 3 additions & 3 deletions generator/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ for Glitch Forge, 2022
import { getRandomImagePath } from "./util.js";
import { calculateRoyalties } from "./royalties.js";
import { sliceFrame, init as eInit } from "./effects/tartaria.js";
import { weightedChoice, animateMonochromeDither, animateTintedDither, animateDitherSorting, animateSortingDither, animateAbstractDither } from "./effects/protocell_labs.js";
import { LOT_NR, weightedChoice, animateMonochromeDither, animateTintedDither, animateDitherSorting, animateSortingDither, animateAbstractDither } from "./effects/protocell_labs.js";

var r; //assign random hash access
var WIDTH; var HEIGHT;
Expand Down Expand Up @@ -90,7 +90,7 @@ export function getGeneratorConfig(assets) {

// SELECTION OF SOURCE THEME
//let source_themes = ['citizen', 'cityscape', 'covers', 'encounters']; // lot nr. 000
let source_themes = ['governor', 'organic', 'capital district', 'factory', 'cosmos neo geographic', 'eldritch pulp fiction', 'tech noir', 'zealot'];
let source_themes = ['governor', 'organic', 'capital_district', 'factory', 'cosmos_neo_geographic', 'eldritch_pulp_fiction', 'tech_noir', 'zealot'];
let source_theme_weights = [ [0, 24], [1, 24], [2, 24], [3, 24], [4, 1], [5, 1], [6, 1], [7, 1] ]; // these represent probabilities for choosing a source theme number [element, probability]
let source_theme_nr = weightedChoice(source_theme_weights, fakeSketch); // 0 -> governors, 1 -> organics, 2 -> capital district, 3 -> factories
// source_theme_nr = 1; // override for the source theme
Expand All @@ -103,7 +103,7 @@ export function getGeneratorConfig(assets) {
let imagePath = getRandomImagePath(assets, source_theme);

// add features
features['lot nr.'] = '001'; // binary number 0-7, there will be 8 lots in total, 32*8 = 256, so the lot numbers will be 000, 001, 010, 011, 100, 101, 110, 111
features['lot nr.'] = LOT_NR; // binary number 0-7, there will be 8 lots in total, 32*8 = 256, so the lot numbers will be 000, 001, 010, 011, 100, 101, 110, 111
features['theme'] = source_theme;
features['effect'] = effects_stack_name;

Expand Down