# Viralution Viewer 2.0

## Coordination from revit to threejs

        this array have a structure
        [11, 12, 13 , 14, 21, 22, 23, 24, 31, 32, 33, 34, 41, 42, 43, 44]

         then it will be converted to matrix4 like structure below:
         [11, 21, 31, 41]
         [12, 22, 32, 42]
         [13, 23, 33, 43]
         [14, 24, 34, 44]
        41, 42, 43 is translation from main origin

        Explain about axis, in revit axis follow x,y,z structure. but in threejs follow x,z,y structure, which y stand for height
         IMPORTANT: x direction in threejs is opposite with x direction in revit
        `let numbers = [
            transform.BasisX.X, -transform.BasisX.Z, -transform.BasisX.Y,
            0, -transform.BasisZ.X,
            transform.BasisZ.Z,
            transform.BasisZ.Y,
            0, -transform.BasisY.X,
            transform.BasisY.Z,
            transform.BasisY.Y,
            0, -transform.Offset.X,
            transform.Offset.Z,
            transform.Offset.Y,
            1,
        ];`

## We should use bundler to bundle our lib:

### Webpack
we can use webpack:
`npm install webpack webpack-cli --save-dev`
we should install typescript loader too
`npm install ts-loader --save-dev`

### Vite
or vite:
`npm install --save-dev vite`

