Documentation
¶
Overview ¶
Generate an axis-aligned box graphics.gd/classdb/PrimitiveMesh.
The box's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to Vector3(3, 2, 1). This is equivalent to adding UV *= vec2(3.0, 2.0) in a vertex shader.
Note: When using a large textured graphics.gd/classdb/BoxMesh (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase Instance.SubdivideDepth, Instance.SubdivideHeight and Instance.SubdivideWidth until you no longer notice UV jittering.
Index ¶
- type Advanced
- type Any
- type Extension
- func (self *Extension[T]) AsBoxMesh() Instance
- func (self *Extension[T]) AsMesh() Mesh.Instance
- func (self *Extension[T]) AsObject() [1]gd.Object
- func (self *Extension[T]) AsPrimitiveMesh() PrimitiveMesh.Instance
- func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
- func (self *Extension[T]) AsResource() Resource.Instance
- type ID
- type Instance
- func (self Instance) AsBoxMesh() Instance
- func (self Instance) AsMesh() Mesh.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsPrimitiveMesh() PrimitiveMesh.Instance
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) ID() ID
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetSize(value Vector3.XYZ)
- func (self Instance) SetSubdivideDepth(value int)
- func (self Instance) SetSubdivideHeight(value int)
- func (self Instance) SetSubdivideWidth(value int)
- func (self Instance) Size() Vector3.XYZ
- func (self Instance) SubdivideDepth() int
- func (self Instance) SubdivideHeight() int
- func (self Instance) SubdivideWidth() int
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsPrimitiveMesh ¶
func (self *Extension[T]) AsPrimitiveMesh() PrimitiveMesh.Instance
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsPrimitiveMesh ¶
func (self Instance) AsPrimitiveMesh() PrimitiveMesh.Instance
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted