ObjectOptions: {
    castShadow?: boolean;
    color?: ColorRepresentation;
    material?: Material;
    name?: string;
    parent?: Object3D;
    position?: Vec3 | [number, number, number];
    receiveShadow?: boolean;
    rotation?: Vec3 | [number, number, number];
    scale?: Vec3 | number | [number, number, number];
    texture?: Texture;
}

Options to create an object. Used by ObjectUtils.createPrimitive

Type declaration

  • OptionalcastShadow?: boolean

    If the object should cast shadows

    true
    
  • Optionalcolor?: ColorRepresentation

    The color of the object. This color will only be used if no material is provided

  • Optionalmaterial?: Material

    The material to apply to the object

  • Optionalname?: string

    The name of the object

  • Optionalparent?: Object3D

    The parent object to add the created object to

  • Optionalposition?: Vec3 | [number, number, number]

    The position of the object in local space

  • OptionalreceiveShadow?: boolean

    If the object should receive shadows

    true
    
  • Optionalrotation?: Vec3 | [number, number, number]

    The rotation of the object in local space

  • Optionalscale?: Vec3 | number | [number, number, number]

    The scale of the object in local space

  • Optionaltexture?: Texture

    The texture will applied to the material's main texture slot e.g. material.map if any is passed in