jit.world
Jitter Reference
Open Help

jit.world

Your world made easier

Description

The jit.world object encapsulates the functionality of several jitter objects, including jit.window, jit.gl.render, jit.gl.node, jit.gl.cornerpin and jit.phys.world. Physics and GL objects are automatically added to the jit.world context and video objects have their automatic output enabled, when in the same patch.

Examples

jit.world

Arguments

None.

Attributes

auto_handle [int]

Enable auto-handle mode on the internal jit.gl.handle object (default = 0).

capture [int]

Capture to the internal texture (default = 0). When enabled, all rendering is captured to texture and the texture name is output out the left outlet. The texture is also drawn to the internal jit.gl.cornerpin for display on the window. Synonym for output_texture.

enable [int]

Enable automatic rendering (default = 0). When enabled, rendering is performed automatically.

dim [2 ints]

Internal texture dimensions (default = 640 x 480). This attribute is set only if the desired texture output dimensions should differ from the window size. If no arguments are given, the texture dimensions will adapt to the window size.

displaylink [int]

Enable render draw sync to display swap (default = 1) (Mac only). When enabled, render draw calls are synced to the display swap.

drawto [symbol]

The internal jit.gl.render context name (default = UID). jit.world drawto is the parent context of the internal jit.gl.node sub-context.

floating [int]

Enable floating window style (default = 0).

fps [float]

The frames per second of automatic rendering (default = 30). Setting fps also sets interval. These attributes only have an effect if enable is 1 and displaylink is 0.

fsaa [int]

Enable full scene anti-aliasing (default = 0).

fsmenubar [int]

Enable menubar in fullscreen (default = 1).

fullscreen [int]

Enable fullscreen (default = 0).

enable_cornerpin [int]

Enable the internal jit.gl.cornerpin object (default = 0). When enabled the cornerpin's handles are visible, and mouse handler is enabled. Enabling also sets output_texture to 1. Attributes and messages of the cornerpin can be sent using sendcornerpin .

erase_color [4 floats]

Background and clear color as RGBA values (default = 0.2 0.2 0.2 1.0).

esc_fullscreen [int]

When enabled, the escape key sends the window to fullscreen (default = 1).

drawbang [symbol]

The draw bang output timing (default = prerender). Determines if the middle-outlet draw bang happens before or after rendering.

interval [int]

The millisecond interval of automatic rendering (default = 33). Setting interval also sets fps. These attributes only have an effect if enable is 1 and displaylink is 0.

high_res [int]

Enable high resolution drawing on supported Retina devices (default = 0) (Mac only).

output_matrix [int]

Output the scene as a matrix (default = 0). When enabled, all rendering is captured to texture then read back to an internal matrix, and the matrix name is output out the left outlet. The texture is also drawn to the internal jit.gl.cornerpin for display on the window.

output_texture [int]

Capture to the internal texture (default = 0). When enabled, all rendering is captured to texture and the texture name is output out the left outlet. The texture is also drawn to the internal jit.gl.cornerpin for display on the window. Synonym for capture.

name [symbol]

The drawing context name (default = UID). Jitter GL objects attach to this context through their drawto attribute. The jit.world name is actually the internal jit.gl.node sub-context name.

phys_worldname [symbol]

The internal jit.phys.world physics world name (default = UID).

position [3 floats]

The 3D origin in the form x y z (default = 0. 0. 0.). This attribute sets the internal jit.gl.node position.

ortho [int]

Orthographic projection mode (default = 0)
0 = orthographic projection off (perspective projection)
1 = orthographic projection on, using lens angle
2 = orthographic projection on, ignoring lens angle

preserve_aspect [int]

Preserve aspect ratio flag of input image (default = 1)

size [2 ints]

Window size (default = 640 480)

rect [4 ints]

The window rectangle is specified in pixels giving the left, top, right, and bottom coordinates of the window from the upper left corner.

shared [int]

Sets the window as a shared OpenGL context (default = 0).

sync [int]

The vertical sync flag sets the window to update synchronous to the monitor's refresh (default = 1).

rotate [4 floats]

The angle of rotation and the three axes about which the rotation is performed in the form rotation-angle x y z (default = 0. 0. 1. 0.). This attribute sets the internal jit.gl.node rotate.

quat [4 floats]

Specifies a quaternion orientation in 3D space (default = 0 0 0 1). This attribute sets the internal jit.gl.node quat.

rotatexyz [3 floats]

Specifies an Euler orientation in 3D space (default = 0 0 0). This attribute sets the internal jit.gl.node rotatexyz.

scale [3 floats]

The 3D scaling factor in the form x y z (default = 1. 1. 1.). This attribute sets the internal jit.gl.node scale.

windowposition [2 ints]

Window position is specified in pixels by an x and y offset value in global coordinates from the upper left corner of the screen.

visible [int]

Enable window visibility (default = 1).

Common Box Attributes

annotation [symbol]

Sets the text that will be displayed in the Clue window when the user moves the mouse over the object.

background [int] (default: 0)

Adds or removes the object from the patcher's background layer. background 1 adds the object to the background layer, background 0 removes it. Objects in the background layer are shown behind all objects in the default foreground layer.

color [4 floats]

Sets the color for the object box outline.

fontface [int]

Sets the type style used by the object. The options are:

plain
bold
italic
bold italic

Possible values:

0 = 'regular'
1 = 'bold'
2 = 'italic'
3 = 'bold italic'

fontname [symbol]

Sets the object's font.

fontsize [float]

Sets the object's font size (in points).

Possible values:

'8'
'9'
'10'
'11'
'12'
'13'
'14'
'16'
'18'
'20'
'24'
'30'
'36'
'48'
'64'
'72'

hidden [int] (default: 0)

Toggles whether an object is hidden when the patcher is locked.

hint [symbol]

Sets the text that will be displayed in as a pop-up hint when the user moves the mouse over the object in a locked patcher.

ignoreclick [int] (default: 0)

Toggles whether an object ignores mouse clicks in a locked patcher.

patching_rect [4 floats] (default: 0. 0. 100. 0.)

Sets the position and size of the object in the patcher window.

position [2 floats]

g/s(set)

Sets the object's x and y position in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its size unchanged.

presentation [int] (default: 0)

Sets whether an object belongs to the patcher's presentation.

presentation_rect [4 floats] (default: 0. 0. 0. 0.)

Sets the x and y position and width and height of the object in the patcher's presentation, leaving its patching position unchanged.

rect [4 floats]

g/s(set)

Sets the x and y position and width and height of the object in both patching and presentation modes (if the object belongs to its patcher's presentation).

size [2 floats]

g/s(set)

Sets the object's width and height in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its position unchanged.

textcolor [float]

Sets the color for the object's text in RGBA format.

textjustification [int]

Text Justification

Possible values:

0 = 'left'
1 = 'center'
2 = 'right'

varname [symbol]

Sets the patcher's scripting name, which can be used to address the object by name in pattr, scripting messages to thispatcher, and the js object.

Messages

bang

Draw and update all automatic clients and animations. Should only be called if enable is 0.

int

Set the enable attribute. When enabled frame updates are handled automatically.

(mouse)

Mouse events and double-click to bring window to front.

draw

Draw and update all automatic clients and animations. Should only be called if enable is 0.

clear

Clear the matrix or texture image from the background, replacing with the erase_color.

front

Bring window to front.

jit_gl_texture

Arguments

texture-name [symbol]
Draw the named texture to the background.

sendcornerpin

Arguments

message [symbol]
values [list]
Sends messages to the internal jit.gl.cornerpin object.

sendhandle

Arguments

message [symbol]
values [list]
Sends messages to the internal jit.gl.handle object.

sendnode

Arguments

message [symbol]
values [list]
Sends messages to the internal jit.gl.node object.

sendphys

Arguments

message [symbol]
values [list]
Sends messages to the internal jit.phys.world object.

sendrender

Arguments

message [symbol]
values [list]
Sends messages to the internal jit.gl.render object.

sendwindow

Arguments

message [symbol]
values [list]
Sends messages to the internal jit.window object.

See Also

Name Description
jit.window Display data in a window
jit.gl.render Render Jitter OpenGL objects
jit.gl.node Create hierarchical rendering groups
jit.gl.cornerpin Map textures in a window
jit.phys.world Collision detection and rigid body dynamics