Constructor
new Teleportation(set, jsTest, glslTest, elt, inv, glslCreep)
- Source:
Constructor
Use instead the add
method of the class TeleportationSet
Parameters:
Name | Type | Description |
---|---|---|
set |
TeleportationSet | The set the teleportation belongs to |
jsTest |
function | A JS test saying if a teleportation is needed. The test is a function with the signature Point -> boolean. |
glslTest |
string | a chunk of GLSL performing the same test. The test should be encapsulated in a function with signature Point -> bool |
elt |
GroupElement | the isometry to apply when teleporting |
inv |
GroupElement | the inverse of the isometry (optional) If the inverse is not passed as an argument, it is computed automatically. |
glslCreep |
string | a chunk of GLSL to move to the boundary defined by the test The test should be encapsulated in a function with signature ExtVector, float, float -> float |
Classes
Members
elt :GroupElement
- Source:
The element to apply when teleporting
Type:
glslCreep :string
- Source:
Chunk of GLSL to move to the boundary defined by the test
Type:
- string
glslCreepCustom :boolean
- Source:
Say if the creeping uses a custom function of the default one The two functions do not have the same signature.
Type:
- boolean
glslCreepName :string
- Source:
Name of the GLSL function performing the test. Computed with a regular expression
Type:
- string
glslTest :string
- Source:
A GLSL test saying if a teleportation is needed The test returns true if a teleportation is needed and false otherwise.
Type:
- string
glslTestName :string
- Source:
Name of the GLSL function performing the test. Computed with a regular expression
Type:
- string
inv :GroupElement
- Source:
The inverse of the teleporting element
Type:
jsTest :function
- Source:
A JS test saying if a teleportation is needed The test is a function with the signature Point -> boolean The test returns true if a teleportation is needed and false otherwise.
Type:
- function
name :string
- Source:
The name of the item. This name is computed (from the uuid) the first time the getter is called.
Type:
- string
set :TeleportationSet
- Source:
The set the teleportation belongs to.
Type:
usesCreepingBinary :boolean
- Source:
Return true if the following conditions are satisfies
- the teleportation set uses full creeping
- no custom creeping function exists
Type:
- boolean
usesCreepingCustom :boolean
- Source:
Return true if the following conditions are satisfies
- the teleportation set uses creeping (strict or full)
- the a custom creeping function exists
Type:
- boolean
(readonly) uuid :string
- Source:
Universal unique ID. The dashes are replaced by underscored to avoid problems in the shaders
Type:
- string
Methods
shader(shaderBuilder)
- Source:
Build the GLSL code performing the associated test.
Parameters:
Name | Type | Description |
---|---|---|
shaderBuilder |
ShaderBuilder |