Members
(constant) AffineTrans :AffineTrans
Afine transformation definition.
This is only a type declaration for generating API docs and clarifying OOP concept.
Data structure: {AffineType: para}
Where affine type is defined withAffineType
:translate: {translate: [x, y, z]}
interpos: {positions, t}, where positions is a 2 elements array of vec3
rotate: {rotate: {deg, axis: [x, y, z]}}
reflect: {reflect: xyz}
scale: {scale}
Type:
- Source:
(constant) AffineType :AffineType
Type:
- Source:
(constant) glx :string
Glsl sub functions
Type:
- string
Properties:
Name | Type | Description |
---|---|---|
u_alpha |
string | uniform float u_alpha Used for keep the name consists. |
u_whiteAlpha |
string | uniform float whiteAlpha Used for keep the name consists. |
bitTrue |
string | Is the bit is true? Reference: WebGL 1.0 API Quick Reference Card |
fractuv |
string | Get repeating uv for texture sampling. TODO doc: debug notes: uv must be continuous |
intenseAlpha |
string | Change intensity to mix argument t = : 1 - 1/(2 * intense), when x > 1 1/2 * x, when 0 <= x <= 1 0, when x < 0 |
fresnelAlpha |
string | Get alpha according to eye and normal angle, can be applied to texture. function: float fresnelAlpha(vec3 e, vec3 P, vec3 np)param: e: eye P: position np: normal return: alpha value like of fresnel effect. |
sdEllipsoid |
string | Find distance to ellipsoid |
thermalColor |
string | Mix 3 colors of interposition t |
pointFace |
string | Fragment Function. |
box2 |
string | Fragment Function.2D round box distanceparameters: function: float box2(vec2 p, vec2 size, float r) p {vec2}: varying from vertex poisition, transformed to world size {vec2}: box size r {float}: corner radius return {float}: distance |
box3 |
string | Fragment Function.3D round box distanceparameters: function: float box2(vec2 p, vec2 size, float r) p {vec3}: varying from vertex poisition, transformed to world size {vec3}: box size r {float}: corner radius return {float}: distance |
line |
string | Line Rasterize Function. https://math.stackexchange.com/questions/2213165/find-shortest-distance-between-lines-in-3d 𝐧 = 𝐞1 × 𝐞2 = (−20, −11, −26) return {float}: distance |
rotate2 |
string | Rotate in 2D for angle of radian.
function: vec2 rotate2(float radi, vec2 v)
parameters: |
rotateY |
string | |
rayPlaneInsec |
string | Ray plane intersection. function: vec4 rayPlaneInsec(vec3 l0, vec3 l, vec3 p0, vec3 n) return vec4 (pos, distance), distance > 0 iff there is one point. Reference: wikipedia |
box3Color |
string | Get color weight according to xy, yz, xz box distance. Thes function depends on glx.rotateY, glx.rayPlaneInsec, glx.box3 return colore weight |
phongLight |
string | Get phong light. vColor = vec4(Ka * ambientColor + Kd * lambertian * diffuseColor + Ks * specular * specular, u_alpha);Code Comments: lambertian: angle between normal and incident R: reflect direction V: vector to viewer External Linkx-visual doc: Morphing Phong Materialreferencing implementation @ cs.toronto.edu Lambertian Emitters and Scatters |
buildingAlpha |
string | Vertex ShaderGet building wall texture's alpha - used for transparent building like glass cube, without refrection. |
shadow |
string |
- Source:
(constant) KeyFlag :int
Key flags.
Type:
- int
Properties:
Name | Type | Description |
---|---|---|
ctrl |
int | ctrl key down |
shift |
int | shift key down |
alt |
int | alt key down |
- Source:
(constant) LayerChannel :LayerChannel
value of 0 - 31, 0 is reserved for all in xscene. (mask = 1)
For layers, see three.js doc: https://threejs.org/docs/index.html#api/en/core/Layers
NONE: all invisible
USER: the starting chennle for ChannelFilter.
ALL: show all objects
FLOWING_PATH: PathEffect
effect pass
GLOW: GlowEffect
effect pass
BLURRING: not used?
FILMING: FilmEffect
effect pass
Type:
- Source:
(constant) R
Earth Radius hold by OSM, see osm wiki: zoom level
TODO use EPSG parameters as a common module.
- Source:
x
Properties:
Name | Type | Description |
---|---|---|
x |
ECS | x-visual global data (singleton) |
- Source:
(constant) XEasing :XEasing
Tween easing function
Type:
- Source:
Methods
browserVer(log) → {object}
Get browser name and version.
Parameters:
Name | Type | Description |
---|---|---|
log |
bool | true will log with console. |
- Source:
Returns:
{name, version}
- Type
- object
getEffectPass(ecs, x) → {object}
Get effect passes. Called by super class Orthocclude
Parameters:
Name | Type | Description |
---|---|---|
ecs |
ECS | |
x |
object | TODO options |
- Source:
Returns:
{effects, layers}, where
effects: [renderPass, bloomPass, filmPass]
layers: Layers
visible through channel LayerChannel
.FLOWING_PATH.
- Type
- object
interpret(code, e) → {object}
default input events interpretor.
Parameters:
Name | Type | Description |
---|---|---|
code |
string | |
e |
MouseEvent |
- Source:
Returns:
{code, cmd, client, e}
where
code = 'key' | 'mouse'
cmd = Cmd | MouseEvent.type
client: [x, y] only for mouse event
e: MouseEvent, only for mouse event
- Type
- object
onMouse()
Kept until delete branch temp-sankey-debug1
- Source: