Skip to content

added the library. readme.md (no caps) is the documentation file. #4

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

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
Binary file added SketchFolder/BlackHanSans-Regular.ttf
Binary file not shown.
475 changes: 475 additions & 0 deletions SketchFolder/PointTextLibrary.js

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions SketchFolder/SketchEx.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//Temporary variable used to contain the text string
var txt1;
var txt2;
var txt3;
var txt4;

//Temporary for tests
function setup()
{
canvas = createCanvas(700, 300);
txt1 = new PointText(350, 100, 'Hi, I am text', 32, 0.5, 1, 'point', '#ff0044');
txt2 = new PointText(100, 50, 'Potato', 50, 0.3, 1.5, 'square', '#0099db');
txt3 = new PointText(300, 200, 'Coding', 150, 0.1, 3, 'triangle', '#fee761');
txt4 = new PointText(550, 150, 'Prog18', 80, 0.15, 5, 'point', '#f77622');
}

//Temporary for tests
function draw()
{
background('#193c3e');
txt1.draw();
txt2.draw();
txt3.draw();
txt4.draw();
}
Binary file added SketchFolder/TTWPGOTT.ttf
Binary file not shown.
33 changes: 33 additions & 0 deletions SketchFolder/sketch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* eslint no-undef: 0 */
// Most of this is by Daniel Shiffman
// http://codingtra.in
// Steering Text Paths
// I added the functionality to make the particles change into another text and changed the positioning of the text to always be in the middle of the canvas

//Temporary variable used to contain the text string
var hello;

//Temporary for tests
function setup()
{
canvas = createCanvas(300, 300);
canvas.parent('sketch-holder');
hello = new PointText(width/2, height/2, 'Edit Me!', 80, 0.2, 3, 'point', '#FE5F55');
}

//Temporary for tests
function draw()
{
background(0);
hello.draw();
}

function changeAll()
{
hello.setText(document.getElementById('text').value);
hello.setType(document.getElementById('particleType').value);
hello.setFontSize(document.getElementById('fontSize').value*1.3);
hello.setParticleSize(document.getElementById('particleSize').value/50);
hello.setColor(document.getElementById('color').value);
hello.setParticleDensity(document.getElementById('particleDensity').value/100);
}
Loading