pygfx.objects

World Objects and Events.

Objects

WorldObject([geometry, material, visible, ...])

Base class for objects.

Group(*[, visible])

A group of objects.

Scene()

Root of the scene graph.

Background([geometry, material, render_mask])

The scene's background.

Grid([geometry, material])

A grid to help interpret spatial distances.

Points([geometry, material, visible, ...])

A point cloud.

Line([geometry, material, visible, ...])

An object representing a line using a list of vertices (3D positions).

Mesh([geometry, material, visible, ...])

A mesh.

Image([geometry, material, visible, ...])

A 2D image.

Volume([geometry, material, visible, ...])

A 3D image.

Text([geometry, material, visible, ...])

A text.

InstancedMesh(geometry, material, count, ...)

Display a mesh multiple times using instances.

Light([color, intensity, cast_shadow])

Light Base Class.

PointLight([color, intensity, cast_shadow, ...])

Radial point light source.

DirectionalLight([color, intensity, ...])

Directional light source.

AmbientLight([color, intensity])

Ambient light source.

SpotLight([color, intensity, cast_shadow, ...])

Directional point light source.

LightShadow(camera)

Shadow map utility base class.

DirectionalLightShadow()

Shadow map utility for directional lights.

SpotLightShadow()

Shadow map utility for spot light sources.

PointLightShadow()

Shadow map utility for point light sources.

Bone([name])

A bone.

Skeleton(bones[, bone_inverses])

A skeleton.

SkinnedMesh(geometry, material)

A skinned mesh.

Events

Event(type, *[, bubbles, target, root, ...])

Event base class.

EventTarget(*args, **kwargs)

Targetable object mixin.

EventType(value[, names, module, qualname, ...])

PointerEvent(*args, x, y[, button, buttons, ...])

Mouse/Touch Event.

KeyboardEvent(*args, key[, modifiers])

Keyboard button press.

RootEventHandler(*args, **kwargs)

Pygfx event handler.

WheelEvent(*args, dx, dy, **kwargs)

Scrolling of the mouse wheel.

WindowEvent(*args[, width, height, pixel_ratio])

Window resize event