new MorphingAnim()
Change ModelSeqs into tween scripts (CmpTweens) that can be tweened by XTweener.
- Source:
Members
(static) attachShaderPosTween
Attatch a moving position with tweened animation alone the path to Obj3.mesh. The position is a THREE.Vector3 implanted into uniforms, which is supposed to be used by a shader like ShaderFlag.scaleOrb.
Design Notes: This can be decomposed to shader tweening and material creating
- the correct way of new Twenn.js design.
- Source:
(static) attachShaderPosTween
Attatch moving positions with tweened animation alone the path to Obj3.mesh. The positions are a THREE.Vector3 array implanted into uniforms, which is supposed to be used by a shader like ShaderFlag.scaleOrb. Each position in the array is added with offset configured with argument follows.
Design Notes: This can be decomposed to shader tweening and material creating
- the correct way of new Twenn.js design.
- Source:
(static) createFlowingParticles
Create a moving points with tweened animation alone path. The points is a THREE.Points with material of THREE.ShaderMaterail (ShaderFlag = blinkStar).
Design Notes: This can be decomposed to shater tweening and material creating
- the correct way of new Twenn.js design.
- Source:
(static, constant) iffModel
MorphingAnim update query - not used
- Source:
initTweens
Animize script sequences into Tweens
- Source:
startings
Get startriggerings. startriggerings are tween reference that will be started at next update, by xtweener. deprecated?
Properties:
Name | Type | Description |
---|---|---|
startings |
object | object buffer triggerring tweens on next update |
- Source:
update
Current this doesn't actually updating anything.
- Source:
Methods
(static) addAngle(seq, twidx, deg)
Helper for rotation.
The previous angle is pushed into deg[0], then deg[1] = deg.
Note This method shouldn't been called during tween is playing. Results
is unkown.
Parameters:
Name | Type | Description |
---|---|---|
seq |
array.<CmpTween> | animation sequence index |
twidx |
number | tween index in a sequence |
deg |
number | target angle, in degree |
- Source:
(static) script2uniforms(svals, uniforms) → {object}
Convert script value to THREE.Uniforms format (properties are {value} object).
If properties of svals is an array, only it's first value are used as the
uniforms value - required by Tween.
Parameters:
Name | Type | Description |
---|---|---|
svals |
object | script values |
uniforms |
Obj3 | buffer |
- Source:
Returns:
{start: svals_i[0], to: value: svals_i[1]}
uniforms for THREE.Mesh - properties are in format of name: {value}
- Type
- object
(static) set1stPos(seq, twidx, pos)
Helper for Changing AnimType.POSITION's target position - first translate
transform in the sequence. The previous position will be pushed to starting
position, i.e. pos[0] = pos[1]; pos[1] = pos
Note This method shouldn't been called during tween is playing. Results
is unkown.
Parameters:
Name | Type | Description |
---|---|---|
seq |
array.<CmpTween> | animation sequence index |
twidx |
number | tween index in a sequence |
pos |
array | vec3 | target position |
- Source:
(static) set1stPos(seq, pos)
Helper for Changing AnimType.POSITION's target position - first translate
transform in the sequence
Note This method shouldn't been called during tween is playing. Results
is unkown.
Parameters:
Name | Type | Description |
---|---|---|
seq |
array.<CmpTween> | animation sequence index |
pos |
array | vec3 | target position |
- Source:
(static) set1stScale(seq, pos)
Helper for Changing target scale - first scale transform in the sequence
Note This method shouldn't been called during tween is playing. Results
is unkown.
Parameters:
Name | Type | Description |
---|---|---|
seq |
array.<CmpTween> | animation sequence index |
pos |
array | vec3 | target position |
- Source:
(static) set1stScale(seq, twidx, scl)
Helper for Changing target scale - first scale transform in the sequence.
The previous scale is pushed into scale[0], then scale[1] = scl.
Note This method shouldn't been called during tween is playing. Results
is unkown.
Parameters:
Name | Type | Description |
---|---|---|
seq |
array.<CmpTween> | animation sequence index |
twidx |
number | tween index in a sequence |
scl |
array | vec3 | target position |
- Source:
(static) setGroupSpeed(obj3, g, speed)
Change (thermal) tiles' animation group. This method is appliable to shaders
supporting uniform morflag array, e.g. thermal morphing shader created by
xglsl.thermalTile()
.
(Animation controlled by Uniform can be changed at anytime)
Parameters:
Name | Type | Description |
---|---|---|
obj3 |
Obj3 | change the obj's mesh.material.uniforms.morflag[g] = flag |
g |
int | group index |
speed |
object.<{vert: number, frag: number}> | of vertex & fragment shader |
- Source: