Basics
Guides
API Reference
Basics
Guides
API Reference
[38:7] extends: MeshView
Wraps an AussomCustomShape3D (subclass of FXGL's abstract CustomShape3D) so Aussom code can build custom mesh-backed 3D shapes. CustomShape3D extends JavaFX MeshView, so the wrapper extends the fx Node base. Aussom users register an onCreateMesh callback that must return a Mesh AussomJavaObject (typically a TriangleMesh filled in from Aussom). After wiring the callback (and again whenever the inputs change) call updateMesh to apply it. Example: cs = new CustomShape3D(); cs.onCreateMesh(::buildMesh); cs.updateMesh(); cs.setPhongMaterial(redColor); public buildMesh() { m = aji.newObj("javafx.scene.shape.TriangleMesh"); // ...fill points / texCoords / faces via m... return m; } For the built-in CustomShape3D subclasses (Cuboid, Torus, Prism, Cylinder, Pyramid, Cone) the createMesh hook is internal; use those wrappers directly instead of subclassing this one.
CustomShape3D ()
Creates a new AussomCustomShape3D bridge. Wire onCreateMesh and call updateMesh before adding the shape to the scene.
adopt (object Ajo)
Wraps an existing AussomCustomShape3D AussomJavaObject.
Ajo is an AussomJavaObject around an AussomCustomShape3D.A new CustomShape3D wrapper.onCreateMesh (callback Cb)
Registers the createMesh callback. The callback takes no arguments and must return a Mesh AussomJavaObject (typically a TriangleMesh). Returning null produces an empty TriangleMesh.
Cb is a callback () -> Mesh AJO.this objectupdateMesh ()
Re-invokes the createMesh callback and installs the result as this shape's mesh. Call after wiring onCreateMesh and again whenever the inputs to the mesh change.
this objectsetMaterial (object MaterialObj)
Sets the shape's material.
MaterialObj is a Material wrapper.this objectsetPhongMaterial (object ColorObj)
Sets a PhongMaterial directly from a Color.
ColorObj is a Color wrapper.this objectgetTranslation ()
Returns the (x, y, z) translation as a Point3D AJO.
setTranslation (double X, double Y, double Z)
Sets the (x, y, z) translation in one call.
getVertices ()
Returns the mesh vertex list for direct deformation.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.