ThreePipe
    Preparing search index...

    Function copyUserData

    • Deep copy/clone from source to dest, assuming both are userData objects for three.js objects/materials/textures etc. This will clone any property that can be cloned (apart from Object3D, Texture, Material) and deep copy the objects and arrays. Keys that start with privatePrefix are skipped at every depth.

      Parameters

      • dest: any
      • source: any
      • ignoredKeysInRoot: (string | symbol)[] = []

        keys to ignore in the root object

      • privatePrefix: string = '__'

        keys that start with this are not copied. Default '__' (the keys that are not kept on clone or in JSON). '_' also skips the _ keys, as in glTF, see copyPublicUserData.

      Returns any

      Keep synced with copyMaterialUserData in three.js -> Material.js todo: merge these functions? by putting this inside three.js?