A port of the Processing visualization language to JavaScript.

Overview

⚠️ This project has been archived ⚠️

With the development of p5js and the API advances in Processing itself, as well as Processing.js itself having been in maintenance mode for quite a few years now, this project has been archived as of December 2018.

Processing.js would like to thank everyone who contributed over the years: it's been an amazing project! The code will still be available in read-only mode, no releases will be pulled from any of the places it was distributed through, but the last version is, and will forever be, v1.6.6.

Thank you for your support, and happy coding (with newer solutions)!

Comments
  • Processing.instances is empty

    Processing.instances is empty

    Either something is broken, or the information at http://processingjs.org/articles/jsQuickStart.html#accessingprocessingfromjs is not accurate.

    It says:

    By default, when a <canvas> has a data-processing-sources attribute, its id is used as a unique identifier for the Processing instance. If no id attribute is provided, you can use Processing.instances[0]

    The second statement is untrue. I have tried Processing.instances and it always return an empty array (whether or not the canvas has an id); Processing.instances[0] is undefined.

    bug 
    opened by teo1978 37
  • random(low, high) can return high.

    random(low, high) can return high.

    Due to the default behavior of the floating point unit sometimes rounding upward, random(low, high) can return high when the interval low .. high is sufficiently small. Simply retrying in that case neither invalidates the uniformity of the resulting numbers, nor will it take very long (probabilistically) to produce a valid result.

    The proposed fixed with assertion checking can be found here

    opened by lgto4 28
  • Memory leak in createGraphics

    Memory leak in createGraphics

    If createGraphics is used in draw then it leaks memory quite heavily. I assume it saves graphics object somewhere in global object. It might be expected behaviour, I don't know, but documentation says nothing about it. I think it either should be fixed or documentation updated to state that createGraphics should be used only in setup.

    opened by nbeloglazov 25
  • Write up a

    Write up a "how to contribute what, where", to clear up misunderstandings about what code would be accepted.

    There is clearly a lot of misunderstanding about what is and is not accepted in processing.js as a project, and a document that clearly states how the project falls apart (e.g. core vs. extensions) and "how to contribute what kind of code, where" will go a long way towards clearing those up.

    Recent bugs that touch this subject are #140 and #145, starting with the text in those and creating a new document on the repo (and possibly the site) will be an important first step.

    enhancement 
    opened by Pomax 22
  • img.copy fails silently

    img.copy fails silently

    My sketch pre-loads an image and later, during run-time, requests another one asynchronously. When I copy the new image into the old image, nothing happens - This used to work in java processing.

    Here an example - http://myzel.net/js/requestImage.html - After five seconds the display should alternate between showing an A and showing a B.

    Did I miss something? Have I found a bug? Please share!

    opened by hungerburg 18
  • [processingjs.org] param() incorrectly marked as not implemented

    [processingjs.org] param() incorrectly marked as not implemented

    I'm reporting this here because https://github.com/processing-js/processing-js.github.io doesn't seem to have an issue tracker.

    At http://processingjs.org/reference/ param() is marked as "not yet implemented" (and consistently, its documentation page is missing). But the method is implemented and it works.

    I hope you're not planning to remove it.

    opened by matteosistisette 18
  • need a way to use loadImage with runtime-determined url - @pjs preload directive is no solution

    need a way to use loadImage with runtime-determined url - @pjs preload directive is no solution

    The @pjs preload directive may be an acceptable solution for loading images which url is static and known at compile time, but any Processing sketch that loads images whose urls are determined at runtime will miserably break in Processing js and this cannot be solved with a @pjs preload directive.

    I'm pretty sure there's a way to fix this. Basically by building into processing some of the hacky workarounds that people use in their sketches to have our sketches work in Processing.js.

    I understand the downsides of having such workarounds bult-in (one that comes to my mind is to use a while loop to block execution until the image is really loaded, and that may trigger the unresponsive script warning), so perhaps another @pjs may be introduced to turn on or off "synchronous image loading" or "full Processing loadImage compatibility" mode or whatever you'd like to call it

    opened by teo1978 16
  • XML toString fix for null textcontent/CData

    XML toString fix for null textcontent/CData

    plus unit test - note that it appears there is a bug in jsdom (or the version currently used for building Pjs) that prevents testing against <root><a/><b/><root> as input. For some reason, this is treated as unterminated elements a/ and b/...

    opened by Pomax 14
  • Issue #99 : withTouch() touchstart event was relying on direct access to...

    Issue #99 : withTouch() touchstart event was relying on direct access to...

    Issue #99 : the withTouch() touchstart event handler was relying on direct access to the Processing.eventHandlers array to remove any existing mouse event handlers.

    Instead of exposing Processing.eventHandlers array directly, this change exposes a method called detachEventHandlersByTypeMatch() which takes a regex of event types, iterates through the list of existing event handlers, and detaches the handlers that match.

    The withTouch() touchstart handler then calls detachEventHandlersByTypeMatch() with a regex that matches the desired mouse events.

    PR needs review 
    opened by uofajillian 14
  • adding and subtracting for 2D vectors

    adding and subtracting for 2D vectors

    Lets 2D vectors add and subtract without worrying about the z-axis. Currently, the behavior is as follows, which is a little confusing.

    var v = new PVector(3, 4);
    v.add(2, 4); // v is now (5, 8, NaN), and this happens without any errors
    v.limit(5); // limit, and other methods that operate on the vector, now don't work
    

    Although the docs only suggest support for 3D adding and subtracting, since PVectors can be 2D as well, it'd be nice to handle this as well. Currently, it will do v.z += undefined, which causes errors for most of the other PVector methods, such as limit. If you had defined a 2D vector, you might expect to be able to perform operations on it as a 2D vector without considering the implicit z-axis.

    This came up through an issue on another project.

    opened by jjwon0 13
  • Noise has always the same seed

    Noise has always the same seed

    I always get the same pattern, even though I'm applying random numbers to noiseSeed each time mouse is pressed. Even without calling the noiseSeed function the pattern is always the same each time I run the sketch. It seems that it's not a problem with the sketch, noiseSeed works as expected on Java mode.

    Link for more information and code: http://forum.processing.org/two/discussion/8858/does-noiseseed-work-on-javascript-mode#Item_2

    opened by BarbaraAlmeida 13
  • I’d like to help out

    I’d like to help out

    My skillset/background is mainly with JS/Node and Swift/iOS, but I have some experience using Processing (and processing.js!).

    Any good spots to jump in currently?

    opened by sheminusminus 1
  • I would love to see this project continue

    I would love to see this project continue

    I was doing some part time development work for myself ( which if it was not for the Processing I would never have had the skill to do ) and would like to contribute back.

    What can I do to get this gear turning again?

    opened by ghost 5
  • Deprecated packages and other npm install warnings

    Deprecated packages and other npm install warnings

    npm install gives the following warnings indicated that some packages should be updated or installed differently

    npm WARN deprecated [email protected]: please don't use. see readme (https://github.com/fizker/minifier) for details
    npm WARN deprecated [email protected]: potential XSS vulnerability in autoescape mode, and with escape filter was fixed in v2.4.3
    npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN deprecated [email protected]: connect 2.x series is deprecated
    npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
    npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
    npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN prefer global [email protected] should be installed with -g
    npm WARN prefer global [email protected] should be installed with -g
    
    opened by ojcm 1
  • The error occurs when the last line is comment out of close block token

    The error occurs when the last line is comment out of close block token

    this processing program occurs the error because of the last line is commented out with close block token.

    void setup() {
      any process ...
    }
    // }
    
    

    But, next program doesn't occur the error.

    void setup() {
      any process ...
    }
    // }
    // hogehoge
    
    
    bug good first bug Help wanted 
    opened by Gamu2059 4
  • pixelDensity and displayDensity

    pixelDensity and displayDensity

    The following API endpoints are missing and would allow for sharper images on retina screens.

    displayDensity()

    pixelDensity()

    • should set canvas.style.width = width (same for height)
    • should set canvas.width = width*density (same for height)
    • should set mouseX = mouseX * density (same for Y)
    • should scale drawing coords by density
    opened by shaunlebron 1
Processing Foundation 18.6k Jan 1, 2023
A port of Phoenix LiveView to Typescript/Javascript

LiveViewJS Front-end framework for back-end developers Credit ?? This is a backend implementation of Phoenix LiveView in Typescript. What the Phoenix

Donnie Flood 512 Jan 9, 2023
Banana for Solr - A Port of Kibana

Banana The Banana project was forked from Kibana, and works with all kinds of time series (and non-time series) data stored in Apache Solr. It uses Ki

Lucidworks 668 Dec 13, 2022
Cubism.js: A JavaScript library for time series visualization.

Cubism.js Cubism.js is a D3 plugin for visualizing time series. Use Cubism to construct better realtime dashboards, pulling data from Graphite, Cube a

Square 4.9k Jan 3, 2023
Render echarts in obsidian,Apache ECharts,An Open Source JavaScript Visualization Library

obsidian-echarts Render echarts in obsidian,Apache ECharts,An Open Source JavaScript Visualization Library

null 23 Dec 26, 2022
Apache ECharts is a powerful, interactive charting and data visualization library for browser

Apache ECharts Apache ECharts is a free, powerful charting and visualization library offering an easy way of adding intuitive, interactive, and highly

The Apache Software Foundation 53.8k Jan 9, 2023
Data Visualization Components

react-vis | Demos | Docs A COMPOSABLE VISUALIZATION SYSTEM Overview A collection of react components to render common data visualization charts, such

Uber Open Source 8.4k Jan 2, 2023
📊 A highly interactive data-driven visualization grammar for statistical charts.

English | 简体中文 G2 A highly interactive data-driven visualization grammar for statistical charts. Website • Tutorial Docs • Blog • G2Plot G2 is a visua

AntV team 11.5k Dec 30, 2022
A visualization grammar.

Vega: A Visualization Grammar Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization design

Vega 10.1k Dec 30, 2022
A general purpose, real-time visualization library.

Epoch By Ryan Sandor Richards Epoch is a general purpose charting library for application developers and visualization designers. It focuses on two di

Epoch 5k Dec 30, 2022
a graph visualization library using web workers and jQuery

arbor.js -------- Arbor is a graph visualization library built with web workers and jQuery. Rather than trying to be an all-encompassing framework, a

Christian Swinehart 2.6k Dec 19, 2022
Dynamic HTML5 visualization

Envision.js Fast interactive HTML5 charts. http://groups.google.com/group/envisionjs/ Features Modern Browsers, IE 6+ Mobile / Touch Support Pre-built

HumbleSoftware 1.6k Dec 3, 2022
vizflow is an ES6 interactive visualization engine

Vizflow vizflow.js - a render-loop library written using EcmaScript.6 (ES6) with no other external dependencies. Vizflow is a relatively small library

Vizflow 332 Oct 27, 2022
Data visualization library for depicting quantities as animated liquid blobs

liquidity.js A data visualization library for depicting quantities as animated liquid blobs. For a demonstration of what the final product can look li

N Halloran 91 Sep 20, 2022
Powerful data visualization library based on G2 and React.

BizCharts New charting and visualization library has been released: http://bizcharts.net/products/bizCharts. More details about BizCharts Features Rea

Alibaba 6k Jan 3, 2023
🍞📊 Beautiful chart for data visualization.

?? ?? Spread your data on TOAST UI Chart. TOAST UI Chart is Beautiful Statistical Data Visualization library. ?? Packages The functionality of TOAST U

NHN 5.2k Jan 2, 2023
A data visualization framework combining React & D3

Semiotic is a data visualization framework combining React & D3 Interactive Documentation API Docs on the wiki Examples Installation npm i semiotic E

nteract 2.3k Dec 29, 2022
🌏 A Declarative 3D Globe Data Visualization Library built with Three.js

Gio.js English | 中文 React Version: react-giojs Wechat minigame: wechat usage Gio.js is an open source library for web 3D globe data visualization buil

syt123450 1.6k Dec 29, 2022
A React toolkit for graph visualization based on G6

Graphin A React toolkit for graph analysis based on G6 English | 简体中文 ✨ Features ?? Good-looking elements, standardized style configuration Graphin st

AntV team 823 Jan 7, 2023