@pixi/3d
    Preparing search index...

    Class ColorCubeTexture

    Makes CubeTextures of one solid colour, for a flat environment

    Channels are display (sRGB) values, as in an image. For a plain background, set View3D#background to the colour itself, which needs no texture.

    view3d.environment = ColorCubeTexture.fromRGB(40, 44, 60);
    
    Index
    • Creates a cube texture of one colour, given as a hex number

      Parameters

      • color: number

        Colour as 0xRRGGBB

      • alpha: number = 255

        Alpha, from 0 to 255

      • Optionallabel: string

        Label for the cube; each face adds its side, as in night-sky-left

      Returns CubeTexture

      A cube texture with every face set to the colour

      view3d.environment = ColorCubeTexture.from(0x202830, 255, 'night-sky');
      
    • Creates a cube texture of one colour, given as channels from 0 to 255

      Parameters

      • r: number

        Red, from 0 to 255

      • g: number

        Green, from 0 to 255

      • b: number

        Blue, from 0 to 255

      • a: number = 255

        Alpha, from 0 to 255

      • Optionallabel: string

        Label for the cube; each face adds its side, as in night-sky-left

      Returns CubeTexture

      A cube texture with every face set to the colour

      view3d.environment = ColorCubeTexture.fromRGB(255, 240, 220);