PdXR is an open-source implementation of PureData for multiuser Metaverse environments. Use a PD patch with your VR or AR devices together with other people in a shared virtual environment.
PdXR is made for A-Frame
Run this in a Networked-Aframe instance: Networked-Aframe
Forks of Aframe-Super-Keyboard and Aframe-Resonance-Audio are added to this project
<a-scene>
<a-pdxr visualize="true" src="default.pd" position="0 1 0" ></a-pdxr>
</a-scene>
Property | Description | Default |
---|---|---|
src | Path and filename to the PureData patch. | default.pd |
visualize | Flag if PureData patch will be visualized. GUI objects are not affected by this | true |
<a-assets>
<template id="bang-template">
<a-entity
geometry="primitive: box"
material="wireframe: false; color: white"
bang
animation="property: material.color; from: #FFFFFF; to: #000000; dur: 50; dir: reverse; startEvents: pdbng_glow"
animation__2="property: bang.bang;from: 1; to: 0; delay: 50; dur: 1; startEvents: pdbng_false"
>
</a-entity>
</template>
<template id="num-template">
<a-entity
geometry="primitive: box"
material="wireframe: true; color: white"
num
>
</a-entity>
</template>
<template id="sym-template">
<a-entity
geometry="primitive: box"
material="wireframe: true; color: white"
sym
>
</a-entity>
</template>
<template id="toggle-template">
<a-entity
geometry="primitive: box"
material="wireframe: true; color: white"
toggle
>
</a-entity>
</template>
<template id="sld-template">
<a-entity
geometry="primitive: box; height:4"
material="wireframe:true"
scale="0.5 0.5 0.5"
>
<a-entity
geometry="primitive: box; height:0.5"
material="wireframe:false"
position="0 2.25 0"
slideup
animation="property:material.color; from: #FFFFFF; to: #000000; dur:50; dir:reverse; startEvents: pdsldup_glow"
></a-entity>
<a-entity
geometry="primitive: box; height:0.1"
material="wireframe:false"
position="0 0 0"
slider
></a-entity>
<a-entity
geometry="primitive: box; height:0.5"
material="wireframe:false"
position="0 -2.25 0"
slidedwn
animation="property:material.color; from: #FFFFFF; to: #000000; dur:50; dir:reverse; startEvents: pdslddwn_glow"
></a-entity>
</a-entity>
</template>
</a-assets>
if (!NAF.schemas.hasTemplate("#bang-template")) {
NAF.schemas.add({
template: "#bang-template",
components: [
"position",
{
component: "bang",
property: "bang",
},
],
});
}
if (!NAF.schemas.hasTemplate("#toggle-template")) {
NAF.schemas.add({
template: "#toggle-template",
components: [
"position",
{
component: "material",
property: "wireframe",
},
{
component: "toggle",
property: "toggle",
},
],
});
}
if (!NAF.schemas.hasTemplate("#sld-template")) {
NAF.schemas.add({
template: "#sld-template",
components: [
"position",
{
component: "pdsld",
property: "value",
},
],
});
}
if (!NAF.schemas.hasTemplate("#num-template")) {
NAF.schemas.add({
template: "#num-template",
components: [
"position",
{
component: "num",
property: "value",
},
],
});
}
if (!NAF.schemas.hasTemplate("#sym-template")) {
NAF.schemas.add({
template: "#sym-template",
components: [
"position",
{
component: "sym",
property: "value",
},
],
});
}
Run or remix PdXR on Glitch: PdXR Example
PdXR ist based on PdWebParty by Zack Lee, integrating the PureData programming language.