Defines volume on a PBR Material. See MaterialsVolume.

Hierarchy

  • ExtensionProperty
    • Volume

Properties

parentTypes: PropertyType[] = ...
propertyType: "Transmission" = 'Transmission'

Methods

  • dispose(): void
  • getAttenuationColor(): vec3
  • getAttenuationColorHex(): number
  • getAttenuationDistance(): number
  • getExtras(): Record<string, unknown>
  • Returns a reference to the Extras object, containing application-specific data for this Property. Extras should be an Object, not a primitive value, for best portability.

  • getName(): string
  • Returns the name of this property. While names are not required to be unique, this is encouraged, and non-unique names will be overwritten in some tools. For custom data about a property, prefer to use Extras.

  • getThicknessFactor(): number
  • Thickness of the volume beneath the surface in meters in the local coordinate system of the node. If the value is 0 the material is thin-walled. Otherwise the material is a volume boundary. The doubleSided property has no effect on volume boundaries.

  • getThicknessTexture(): Texture
  • getThicknessTextureInfo(): TextureInfo
  • isDisposed(): boolean
  • Returns true if the node has been permanently removed from the graph.

  • listParents(): Property[]
  • Returns a list of all properties that hold a reference to this property. For example, a material may hold references to various textures, but a texture does not hold references to the materials that use it.

    It is often necessary to filter the results for a particular type: some resources, like Accessors, may be referenced by different types of properties. Most properties include the Root as a parent, which is usually not of interest.

    Usage:

    const materials = texture
        .listParents()
        .filter((p) => p instanceof Material)
    
  • setAttenuationColor(attenuationColor: vec3): Volume
  • setAttenuationColorHex(hex: number): Volume
  • setAttenuationDistance(attenuationDistance: number): Volume
  • setExtras(extras: Record<string, unknown>): Volume
  • Updates the Extras object, containing application-specific data for this Property. Extras should be an Object, not a primitive value, for best portability.

  • setName(name: string): Volume
  • Sets the name of this property. While names are not required to be unique, this is encouraged, and non-unique names will be overwritten in some tools. For custom data about a property, prefer to use Extras.

  • setThicknessFactor(thicknessFactor: number): Volume
  • Thickness of the volume beneath the surface in meters in the local coordinate system of the node. If the value is 0 the material is thin-walled. Otherwise the material is a volume boundary. The doubleSided property has no effect on volume boundaries.

  • setThicknessTexture(texture: Texture): Volume
Function symbol, f(📦) → 📦, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy TypeDoc documentation Copyright 2021 under MIT license