Skip to content
Merged
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
79 changes: 79 additions & 0 deletions .github/workflows/processing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Processing 4

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
verify:
name: Java 17 / Processing 4.5.6
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Java 17
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
with:
distribution: temurin
java-version: "17.0.20+101"
cache: maven

- name: Compile library; run parser tests; regenerate API documentation
run: mvn --batch-mode --no-transfer-progress clean verify javadoc:javadoc

- name: Verify bundled library and documentation are current
run: |
cmp target/BVHParser.jar p5f_sample/code/BVHParser.jar
find target/reports/apidocs -type f \( -name '*.html' -o -name '*.css' -o -name '*.js' \
-o -name 'ADDITIONAL_LICENSE_INFO' \) \
-exec perl -pi -e 's/[ \t]+$//' {} +
diff --recursive --brief target/reports/apidocs p5f_sample/lib/doc

- name: Restore Processing 4.5.6 cache
id: processing-cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ runner.temp }}/processing-4.5.6
key: processing-4.5.6-linux-x64-ddb816ca

- name: Download Processing 4.5.6
if: steps.processing-cache.outputs.cache-hit != 'true'
env:
PROCESSING_URL: https://github.com/processing/processing4/releases/download/processing-1434-4.5.6/processing-4.5.6-linux-x64-portable.zip
PROCESSING_SHA256: ddb816ca2c02e862a5dcf22b96bb4f81f412c4878673752b36837a7770970a6c
run: |
curl --fail --location --retry 3 --output "${RUNNER_TEMP}/processing.zip" "${PROCESSING_URL}"
echo "${PROCESSING_SHA256} ${RUNNER_TEMP}/processing.zip" | sha256sum --check
mkdir -p "${RUNNER_TEMP}/processing-4.5.6"
unzip -q "${RUNNER_TEMP}/processing.zip" -d "${RUNNER_TEMP}/processing-4.5.6"

- name: Compile the PDE sketch with Processing 4.5.6
run: |
PROCESSING_BIN=$(find "${RUNNER_TEMP}/processing-4.5.6" -type f \( -name processing -o -name Processing \) -print -quit)
test -n "${PROCESSING_BIN}"
chmod +x "${PROCESSING_BIN}"
"${PROCESSING_BIN}" cli \
--sketch="${GITHUB_WORKSPACE}/p5f_sample" \
--output="${RUNNER_TEMP}/p5f-sample-build" \
--force \
--build

- name: Run a ten-frame P3D smoke test
run: |
set -o pipefail
PROCESSING_BIN=$(find "${RUNNER_TEMP}/processing-4.5.6" -type f \( -name processing -o -name Processing \) -print -quit)
timeout 30s xvfb-run --auto-servernum "${PROCESSING_BIN}" cli \
--sketch="${GITHUB_WORKSPACE}/p5f_sample" \
--output="${RUNNER_TEMP}/p5f-sample-run" \
--force \
--run \
--smoke-test | tee "${RUNNER_TEMP}/p5f-sample-smoke.log"
grep -q "SMOKE_TEST_OK" "${RUNNER_TEMP}/p5f-sample-smoke.log"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target/
.DS_Store
*.class
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Perfume Global Site Project — Processing example

[![Processing 4](https://github.com/perfume-dev/example-processing/actions/workflows/processing.yml/badge.svg)](https://github.com/perfume-dev/example-processing/actions/workflows/processing.yml)

A Processing sketch that visualizes the three bundled BVH motion-capture files as animated point skeletons. This repository originated with the 2012 Perfume Global Site Project and is preserved as a small, runnable creative-coding example.

## Compatibility

- [Processing 4.5.6](https://processing.org/download/) (Java mode)
- macOS, Windows, or Linux with OpenGL support for the `P3D` renderer
- No separately installed Processing libraries

The bundled `p5f_sample/code/BVHParser.jar` is built from the source in `p5f_sample/lib/src` against Processing Core 4.5.6 and Java 17.

## Run the sketch

1. Install Processing 4.5.6.
2. Open `p5f_sample/p5f_sample.pde` in Processing.
3. Press **Run**.

The sketch loads `A_test.bvh`, `B_test.bvh`, and `C_test.bvh` from its `data` directory and plays all three motions in a continuously orbiting 3D view.

## Development and verification

The library and its parser tests require a Java 17 JDK and are checked against Processing Core 4.5.6:

```sh
mvn -B clean verify
```

After changing the Java library source, rebuild the bundled Processing JAR and its API documentation:

```sh
mvn -B package javadoc:javadoc
cp target/BVHParser.jar p5f_sample/code/BVHParser.jar
rm -rf p5f_sample/lib/doc
cp -R target/reports/apidocs p5f_sample/lib/doc
find p5f_sample/lib/doc -type f \( -name '*.html' -o -name '*.css' -o -name '*.js' \
-o -name 'ADDITIONAL_LICENSE_INFO' \) \
-exec perl -pi -e 's/[ \t]+$//' {} +
```

CI additionally compiles the complete PDE sketch with the official Processing 4.5.6 command-line tool and verifies that the committed JAR is identical to the reproducible Maven build.

## Project stewardship and credits

The [`perfume-dev` project](https://github.com/perfume-dev) and its repositories were established by [Daito Manabe](https://github.com/daitomanabe), who continues to maintain and administer them. [Perfume](https://www.perfume-web.jp/profile/) is a Japanese artist group; Manabe's documented collaborations with Perfume date to [2010](https://www.daito.ws/en/archive/perfume_12345678910/), and his credited roles across projects include [programming](https://www.bunka.go.jp/j-mediaarts-festival/award/single/perfume_global_site_project/index.html) as well as [creative direction, technical direction, and sound-effect design](https://www.daito.ws/archive/perfume-imaginary-museum-time-warp/). The 2012 project background and credits are documented by Japan's [Agency for Cultural Affairs](https://www.bunka.go.jp/j-mediaarts-festival/award/single/perfume_global_site_project/index.html) and in the [Daito Manabe archive](https://www.daito.ws/en/archive/perfume_globalsiteproject/).

The repository history credits [Satoru Higa](https://github.com/satoruhiga) for the original 2012 import and Hiroyuki at Rhizomatiks for the subsequent parser and library work. Their original source and authorship history are retained.

## License

No license file was included in the original repository. Unless and until the maintainers add one, the source and bundled motion data remain subject to their respective owners' copyright; public availability does not by itself grant reuse rights.
43 changes: 20 additions & 23 deletions p5f_sample/PBvh.pde
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
public class PBvh
{
public BvhParser parser;
class PBvh {
final BvhParser parser;

PBvh(String[] data) {
if (data == null) {
throw new IllegalArgumentException("BVH data could not be loaded");
}

public PBvh(String[] data)
{
parser = new BvhParser();
parser.init();
parser.parse( data );
parser.parse(data);
}

public void update( int ms )
{
parser.moveMsTo( ms );//30-sec loop

void update(int ms) {
parser.moveMsTo(ms);
parser.update();
}

public void draw()
{
fill(color(255));

for( BvhBone b : parser.getBones())
{

void draw() {
fill(255);

for (BvhBone bone : parser.getBones()) {
pushMatrix();
translate(b.absPos.x, b.absPos.y, b.absPos.z);
translate(bone.absPos.x, bone.absPos.y, bone.absPos.z);
ellipse(0, 0, 2, 2);
popMatrix();
if (!b.hasChildren())
{

if (!bone.hasChildren()) {
pushMatrix();
translate( b.absEndPos.x, b.absEndPos.y, b.absEndPos.z);
translate(bone.absEndPos.x, bone.absEndPos.y, bone.absEndPos.z);
ellipse(0, 0, 10, 10);
popMatrix();
}

}
}
}
Binary file modified p5f_sample/code/BVHParser.jar
Binary file not shown.
33 changes: 0 additions & 33 deletions p5f_sample/lib/doc/allclasses-frame.html

This file was deleted.

71 changes: 71 additions & 0 deletions p5f_sample/lib/doc/allclasses-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!DOCTYPE HTML>
<html lang>
<head>
<!-- Generated by javadoc (17) -->
<title>All Classes and Interfaces (BVHParser for example-processing 1.0-SNAPSHOT API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="class index">
<meta name="generator" content="javadoc/AllClassesIndexWriter">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript" src="script-dir/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
</head>
<body class="all-classes-index-page">
<script type="text/javascript">var pathtoroot = "./";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="com/rhizomatiks/bvh/package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html#all-classes">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<div class="header">
<h1 title="All Classes and Interfaces" class="title">All Classes and Interfaces</h1>
</div>
<div id="all-classes-table">
<div class="caption"><span>Classes</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="com/rhizomatiks/bvh/BvhBone.html" title="class in com.rhizomatiks.bvh">BvhBone</a></div>
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">&nbsp;</div>
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="com/rhizomatiks/bvh/BvhParser.html" title="class in com.rhizomatiks.bvh">BvhParser</a></div>
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">&nbsp;</div>
</div>
</div>
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>BVHParser API documentation.</small></p>
</footer>
</div>
</div>
</body>
</html>
33 changes: 0 additions & 33 deletions p5f_sample/lib/doc/allclasses-noframe.html

This file was deleted.

Loading