-
Notifications
You must be signed in to change notification settings - Fork 17
/
core.R
430 lines (377 loc) · 11.9 KB
/
core.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
import(rprocessing.RLangPApplet)
import(processing.core.PVector)
import(processing.data.Table)
alpha = processing$alpha
ambient = processing$ambient
ambientLight = processing$ambientLight
applyMatrix = processing$applyMatrix
arc = processing$arc
background = processing$background
beginCamera = processing$beginCamera
beginContour = processing$beginContour
beginRaw = processing$beginRaw
beginRecord = processing$beginRecord
beginShape = processing$beginShape
bezier = processing$bezier
bezierDetail = processing$bezierDetail
bezierPoint = processing$bezierPoint
bezierTangent = processing$bezierTangent
bezierVertex = processing$bezierVertex
blend = processing$blend
blendMode = processing$blendMode
blue = processing$blue
box = processing$box
brightness = processing$brightness
camera = processing$camera
clear = processing$clear
clip = processing$clip
color = processing$color
colorMode = processing$colorMode
copy = processing$copy
createFont = processing$createFont
createGraphics = processing$createGraphics
createImage = processing$createImage
createInput = processing$createInput
createOutput = processing$createOutput
createReader = processing$createReader
createShape = processing$createShape
createWriter = processing$createWriter
cursor = processing$cursor
curve = processing$curve
curveDetail = processing$curveDetail
curvePoint = processing$curvePoint
curveTangent = processing$curveTangent
curveTightness = processing$curveTightness
curveVertex = processing$curveVertex
delay = processing$delay
directionalLight = processing$directionalLight
displayDensity = processing$displayDensity
# draw = processing$draw
ellipse = processing$ellipse
ellipseMode = processing$ellipseMode
emissive = processing$emissive
endCamera = processing$endCamera
endContour = processing$endContour
endRaw = processing$endRaw
endRecord = processing$endRecord
endShape = processing$endShape
exit = processing$exit
fill = processing$fill
filter = processing$filter
frameRate = processing$frameRate
frustum = processing$frustum
fullScreen = processing$fullScreen
get = processing$get
green = processing$green
hue = processing$hue
image = processing$image
imageMode = processing$imageMode
lerpColor = processing$lerpColor
lightFalloff = processing$lightFalloff
lightSpecular = processing$lightSpecular
lights = processing$lights
line = processing$line
loadBytes = processing$loadBytes
loadFont = processing$loadFont
loadImage = processing$loadImage
loadJSONArray = processing$loadJSONArray
loadJSONObject = processing$loadJSONObject
loadPixels = processing$loadPixels
loadShader = processing$loadShader
loadShape = processing$loadShape
loadStrings = processing$loadStrings
loadTable = processing$loadTable
loadXML = processing$loadXML
loop = processing$loop
millis = processing$millis
modelX = processing$modelX
modelY = processing$modelY
modelZ = processing$modelZ
noClip = processing$noClip
noCursor = processing$noCursor
noFill = processing$noFill
noLights = processing$noLights
noLoop = processing$noLoop
noSmooth = processing$noSmooth
noStroke = processing$noStroke
noTint = processing$noTint
noise = processing$noise
noiseDetail = processing$noiseDetail
noiseSeed = processing$noiseSeed
normal = processing$normal
ortho = processing$ortho
parseJSONArray = processing$parseJSONArray
parseJSONObject = processing$parseJSONObject
parseXML = processing$parseXML
perspective = processing$perspective
pixelDensity = processing$pixelDensity
point = processing$point
pointLight = processing$pointLight
popMatrix = processing$popMatrix
popStyle = processing$popStyle
printCamera = processing$printCamera
printMatrix = processing$printMatrix
printProjection = processing$printProjection
pushMatrix = processing$pushMatrix
pushStyle = processing$pushStyle
quad = processing$quad
quadraticVertex = processing$quadraticVertex
random = processing$random
randomGaussian = processing$randomGaussian
randomSeed = processing$randomSeed
rect = processing$rect
rectMode = processing$rectMode
red = processing$red
redraw = processing$redraw
requestImage = processing$requestImage
resetMatrix = processing$resetMatrix
resetShader = processing$resetShader
rotate = processing$rotate
rotateX = processing$rotateX
rotateY = processing$rotateY
rotateZ = processing$rotateZ
saturation = processing$saturation
save = processing$save
saveBytes = processing$saveBytes
saveFrame = processing$saveFrame
saveJSONArray = processing$saveJSONArray
saveJSONObject = processing$saveJSONObject
saveStream = processing$saveStream
saveStrings = processing$saveStrings
saveTable = processing$saveTable
saveXML = processing$saveXML
scale = processing$scale
screenX = processing$screenX
screenY = processing$screenY
screenZ = processing$screenZ
selectFolder = processing$selectFolder
selectInput = processing$selectInput
selectOutput = processing$selectOutput
set = processing$set
# settings = processing$settings
# setup = processing$setup
shader = processing$shader
shape = processing$shape
shapeMode = processing$shapeMode
shearX = processing$shearX
shearY = processing$shearY
shininess = processing$shininess
size = processing$size
smooth = processing$smooth
specular = processing$specular
sphere = processing$sphere
sphereDetail = processing$sphereDetail
spotLight = processing$spotLight
stroke = processing$stroke
strokeCap = processing$strokeCap
strokeJoin = processing$strokeJoin
strokeWeight = processing$strokeWeight
text = processing$text
textAlign = processing$textAlign
textAscent = processing$textAscent
textDescent = processing$textDescent
textFont = processing$textFont
textLeading = processing$textLeading
textMode = processing$textMode
textSize = processing$textSize
textWidth = processing$textWidth
texture = processing$texture
textureMode = processing$textureMode
textureWrap = processing$textureWrap
thread = processing$thread
tint = processing$tint
translate = processing$translate
triangle = processing$triangle
updatePixels = processing$updatePixels
vertex = processing$vertex
# For static functions
import(rprocessing.RLangPApplet)
ceil = RLangPApplet$ceil
constrain = RLangPApplet$constrain
day = RLangPApplet$day
hour = RLangPApplet$hour
degrees = RLangPApplet$degrees
hex = RLangPApplet$hex
launch = RLangPApplet$launch
mag = RLangPApplet$mag
lerp = RLangPApplet$lerp
print = RLangPApplet$print
dist = RLangPApplet$dist
month = RLangPApplet$month
minute = RLangPApplet$minute
norm = RLangPApplet$norm
pow = RLangPApplet$pow
second = RLangPApplet$second
radians = RLangPApplet$radians
println = RLangPApplet$println
sq = RLangPApplet$sq
unbinary = RLangPApplet$unbinary
unhex = RLangPApplet$unhex
year = RLangPApplet$year
map = RLangPApplet$map
# For built-in constants
JAVA2D = RLangPApplet$JAVA2D
P2D = RLangPApplet$P2D
P3D = RLangPApplet$P3D
OPENGL = RLangPApplet$P3D
FX2D = RLangPApplet$FX2D
PDF = RLangPApplet$PDF
SVG = RLangPApplet$SVG
DXF = RLangPApplet$DXF
OTHER = RLangPApplet$OTHER
WINDOWS = RLangPApplet$WINDOWS
MACOSX = RLangPApplet$MACOSX
LINUX = RLangPApplet$LINUX
EPSILON = RLangPApplet$EPSILON
MAX_FLOAT = RLangPApplet$MAX_FLOAT
MIN_FLOAT = RLangPApplet$MIN_FLOAT
MAX_INT = RLangPApplet$MAX_INT
MIN_INT = RLangPApplet$MIN_INT
VERTEX = RLangPApplet$VERTEX
BEZIER_VERTEX = RLangPApplet$BEZIER_VERTEX
QUADRATIC_VERTEX = RLangPApplet$QUADRATIC_VERTEX
CURVE_VERTEX = RLangPApplet$CURVE_VERTEX
BREAK = RLangPApplet$BREAK
PI = RLangPApplet$PI
HALF_PI = RLangPApplet$HALF_PI
THIRD_PI = RLangPApplet$THIRD_PI
QUARTER_PI = RLangPApplet$QUARTER_PI
TWO_PI = RLangPApplet$TWO_PI
TAU = RLangPApplet$TAU
DEG_TO_RAD = RLangPApplet$DEG_TO_RAD
RAD_TO_DEG = RLangPApplet$RAD_TO_DEG
WHITESPACE = RLangPApplet$WHITESPACE
RGB = RLangPApplet$RGB
ARGB = RLangPApplet$ARGB
HSB = RLangPApplet$HSB
ALPHA = RLangPApplet$ALPHA
TIFF = RLangPApplet$TIFF
TARGA = RLangPApplet$TARGA
JPEG = RLangPApplet$JPEG
GIF = RLangPApplet$GIF
BLUR = RLangPApplet$BLUR
GRAY = RLangPApplet$GRAY
INVERT = RLangPApplet$INVERT
OPAQUE = RLangPApplet$OPAQUE
POSTERIZE = RLangPApplet$POSTERIZE
THRESHOLD = RLangPApplet$THRESHOLD
ERODE = RLangPApplet$ERODE
DILATE = RLangPApplet$DILATE
REPLACE = RLangPApplet$REPLACE
BLEND = RLangPApplet$BLEND
ADD = RLangPApplet$ADD
SUBTRACT = RLangPApplet$SUBTRACT
LIGHTEST = RLangPApplet$LIGHTEST
DARKEST = RLangPApplet$DARKEST
DIFFERENCE = RLangPApplet$DIFFERENCE
EXCLUSION = RLangPApplet$EXCLUSION
MULTIPLY = RLangPApplet$MULTIPLY
SCREEN = RLangPApplet$SCREEN
OVERLAY = RLangPApplet$OVERLAY
HARD_LIGHT = RLangPApplet$HARD_LIGHT
SOFT_LIGHT = RLangPApplet$SOFT_LIGHT
DODGE = RLangPApplet$DODGE
BURN = RLangPApplet$BURN
CHATTER = RLangPApplet$CHATTER
COMPLAINT = RLangPApplet$COMPLAINT
PROBLEM = RLangPApplet$PROBLEM
PROJECTION = RLangPApplet$PROJECTION
MODELVIEW = RLangPApplet$MODELVIEW
CUSTOM = RLangPApplet$CUSTOM
ORTHOGRAPHIC = RLangPApplet$ORTHOGRAPHIC
PERSPECTIVE = RLangPApplet$PERSPECTIVE
GROUP = RLangPApplet$GROUP
POINT = RLangPApplet$POINT
POINTS = RLangPApplet$POINTS
LINE = RLangPApplet$LINE
LINES = RLangPApplet$LINES
LINE_STRIP = RLangPApplet$LINE_STRIP
LINE_LOOP = RLangPApplet$LINE_LOOP
TRIANGLE = RLangPApplet$TRIANGLE
TRIANGLES = RLangPApplet$TRIANGLES
TRIANGLE_STRIP = RLangPApplet$TRIANGLE_STRIP
TRIANGLE_FAN = RLangPApplet$TRIANGLE_FAN
QUAD = RLangPApplet$QUAD
QUADS = RLangPApplet$QUADS
QUAD_STRIP = RLangPApplet$QUAD_STRIP
POLYGON = RLangPApplet$POLYGON
PATH = RLangPApplet$PATH
RECT = RLangPApplet$RECT
ELLIPSE = RLangPApplet$ELLIPSE
ARC = RLangPApplet$ARC
SPHERE = RLangPApplet$SPHERE
BOX = RLangPApplet$BOX
OPEN = RLangPApplet$OPEN
CLOSE = RLangPApplet$CLOSE
CORNER = RLangPApplet$CORNER
CORNERS = RLangPApplet$CORNERS
RADIUS = RLangPApplet$RADIUS
CENTER = RLangPApplet$CENTER
DIAMETER = RLangPApplet$DIAMETER
CHORD = RLangPApplet$CHORD
PIE = RLangPApplet$PIE
BASELINE = RLangPApplet$BASELINE
TOP = RLangPApplet$TOP
BOTTOM = RLangPApplet$BOTTOM
NORMAL = RLangPApplet$NORMAL
IMAGE = RLangPApplet$IMAGE
CLAMP = RLangPApplet$CLAMP
REPEAT = RLangPApplet$REPEAT
MODEL = RLangPApplet$MODEL
SHAPE = RLangPApplet$SHAPE
SQUARE = RLangPApplet$SQUARE
ROUND = RLangPApplet$ROUND
PROJECT = RLangPApplet$PROJECT
MITER = RLangPApplet$MITER
BEVEL = RLangPApplet$BEVEL
AMBIENT = RLangPApplet$AMBIENT
DIRECTIONAL = RLangPApplet$DIRECTIONAL
SPOT = RLangPApplet$SPOT
BACKSPACE = RLangPApplet$BACKSPACE
TAB = RLangPApplet$TAB
ENTER = RLangPApplet$ENTER
RETURN = RLangPApplet$RETURN
ESC = RLangPApplet$ESC
DELETE = RLangPApplet$DELETE
CODED = RLangPApplet$CODED
UP = RLangPApplet$UP
DOWN = RLangPApplet$DOWN
LEFT = RLangPApplet$LEFT
RIGHT = RLangPApplet$RIGHT
ALT = RLangPApplet$ALT
CONTROL = RLangPApplet$CONTROL
SHIFT = RLangPApplet$SHIFT
PORTRAIT = RLangPApplet$PORTRAIT
LANDSCAPE = RLangPApplet$LANDSCAPE
SPAN = RLangPApplet$SPAN
ARROW = RLangPApplet$ARROW
CROSS = RLangPApplet$CROSS
HAND = RLangPApplet$HAND
MOVE = RLangPApplet$MOVE
TEXT = RLangPApplet$TEXT
WAIT = RLangPApplet$WAIT
DISABLE_DEPTH_TEST = RLangPApplet$DISABLE_DEPTH_TEST
ENABLE_DEPTH_TEST = RLangPApplet$ENABLE_DEPTH_TEST
ENABLE_DEPTH_SORT = RLangPApplet$ENABLE_DEPTH_SORT
DISABLE_DEPTH_SORT = RLangPApplet$DISABLE_DEPTH_SORT
DISABLE_OPENGL_ERRORS = RLangPApplet$DISABLE_OPENGL_ERRORS
ENABLE_OPENGL_ERRORS = RLangPApplet$ENABLE_OPENGL_ERRORS
DISABLE_DEPTH_MASK = RLangPApplet$DISABLE_DEPTH_MASK
ENABLE_DEPTH_MASK = RLangPApplet$ENABLE_DEPTH_MASK
DISABLE_OPTIMIZED_STROKE = RLangPApplet$DISABLE_OPTIMIZED_STROKE
ENABLE_OPTIMIZED_STROKE = RLangPApplet$ENABLE_OPTIMIZED_STROKE
ENABLE_STROKE_PERSPECTIVE = RLangPApplet$ENABLE_STROKE_PERSPECTIVE
DISABLE_STROKE_PERSPECTIVE = RLangPApplet$DISABLE_STROKE_PERSPECTIVE
DISABLE_TEXTURE_MIPMAPS = RLangPApplet$DISABLE_TEXTURE_MIPMAPS
ENABLE_TEXTURE_MIPMAPS = RLangPApplet$ENABLE_TEXTURE_MIPMAPS
ENABLE_STROKE_PURE = RLangPApplet$ENABLE_STROKE_PURE
DISABLE_STROKE_PURE = RLangPApplet$DISABLE_STROKE_PURE
ENABLE_BUFFER_READING = RLangPApplet$ENABLE_BUFFER_READING
DISABLE_BUFFER_READING = RLangPApplet$DISABLE_BUFFER_READING
DISABLE_KEY_REPEAT = RLangPApplet$DISABLE_KEY_REPEAT
ENABLE_KEY_REPEAT = RLangPApplet$ENABLE_KEY_REPEAT
DISABLE_ASYNC_SAVEFRAME = RLangPApplet$DISABLE_ASYNC_SAVEFRAME
ENABLE_ASYNC_SAVEFRAME = RLangPApplet$ENABLE_ASYNC_SAVEFRAME
HINT_COUNT = RLangPApplet$HINT_COUNT
print = stdout$print
println = stdout$println