5A high performance linear algebra library using
6native JS arrays. Geared towards 3D graphics
7and use with Graphics.WebGL.
9Both vectors and matrices are immutable.
20v3 : Float -> Float -> Float -> V3
23toTuple3 : V3 -> (Float,Float,Float)
24toTuple3 = Native.MJS.toTuple3
35{- The normalized direction from v1 to v2 -}
36direction : V3 -> V3 -> V3
37direction = Native.MJS.v3direction
40length = Native.MJS.v3length
42lengthSquared : V3 -> Float
43lengthSquared = Native.MJS.v3lengthSquared
46normalize = Native.MJS.v3normalize
48scale : V3 -> Float -> V3
49scale = Native.MJS.v3scale
51dot : V3 -> V3 -> Float
55cross = Native.MJS.v3cross
57mul4x4 : M4x4 -> V3 -> V3
58mul4x4 = Native.MJS.v3mul4x4
60--m4x4 : V3[16] -> M4x4 ?
63identity = Native.MJS.m4x4identity
65--topLeft3x3 : M4x4 -> M3x3 ?
67{- Assumes that m is orthonormal -}
68inverseOrthonormal : M4x4 -> M4x4
69inverseOrthonormal = Native.MJS.m4x4inverseOrthonormal
71--inverseTo3x3 : M4x4 -> M3x3 ?
73makeFrustrum : Float -> Float -> Float -> Float -> Float -> Float -> Float -> M4x4
74makeFrustrum = Native.MJS.m4x4makeFrustrum
76makePerspective : Float -> Float -> Float -> Float -> M4x4
77makePerspective = Native.MJS.m4x4makePerspective
79makeOrtho : Float -> Float -> Float -> Float -> Float -> Float -> Float -> M4x4
80makeOrtho = Native.MJS.m4x4makeOrtho
82makeOrtho2D : Float -> Float -> Float -> Float -> M4x4
83makeOrtho2D = Native.MJS.m4x4makeOrtho2D
85mul : M4x4 -> M4x4 -> M4x4
86mul = Native.MJS.m4x4mul
88mulAffine : M4x4 -> M4x4 -> M4x4
89mulAffine = Native.MJS.m4x4mulAffine
91makeRotate : Float -> V3 -> M4x4
92makeRotate = Native.MJS.m4x4makeRotate
94rotate : Float -> V3 -> M4x4 -> M4x4
95rotate = Native.MJS.m4x4rotate
97makeScale3 : Float -> Float -> Float -> M4x4
98makeScale3 = Native.MJS.m4x4makeScale3
100makeScale : V3 -> M4x4
101makeScale = Native.MJS.m4x4makeScale
103scaleM3 : Float -> Float -> Float -> M4x4 -> M4x4
104scaleM3 = Native.MJS.m4x4scale3
106scaleM : V3 -> M4x4 -> M4x4
107scaleM = Native.MJS.m4x4scale
109makeTranslate3 : Float -> Float -> Float -> M4x4
110makeTranslate3 = Native.MJS.m4x4makeTranslate3
112makeTranslate : V3 -> M4x4
113makeTranslate = Native.MJS.m4x4makeTranslate
115translate3 : Float -> Float -> Float -> M4x4 -> M4x4
116translate3 = Native.MJS.m4x4translate3
118translate : V3 -> M4x4 -> M4x4
119translate = Native.MJS.m4x4translate
121makeLookAt : V3 -> V3 -> V3 -> M4x4
122makeLookAt = Native.MJS.m4x4makeLookAt
124transpose : M4x4 -> M4x4
125transpose = Native.MJS.m4x4transpose
127{- Custom constructor for supplying arbitrary x,y,z axis -}
128makeBasis : V3 -> V3 -> V3 -> M4x4
129makeBasis = Native.MJS.m4x4makeBasis
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list