Skip to content

P3D not working? #269

@skpai3

Description

@skpai3

Does Processing.R still work with P3D? I tried something simple like this and got no graphic window:

settings <- function() {
  size(200, 200, P3D)
}

setup <- function() {
}

draw <- function() {
  background(0)
}

I also imported peasycam to try the code below from the tutorial Processing Libraries: importLibrary().
I get error class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')

settings <- function() {
  importLibrary("peasycam")
  size(200, 200, P3D)
}

setup <- function() {
  cam = PeasyCam$new(processing, 100)
  cam$setMinimumDistance(50)
  cam$setMaximumDistance(500)
}

draw <- function() {
  rotateX(-.5)
  rotateY(-.5)
  background(0)
  fill(255, 0, 0)
  box(30)
  pushMatrix()
  translate(0, 0, 20)
  fill(0, 0, 255)
  box(5)
  popMatrix()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions