new Tile( [width] [, height] [, widthSegments] [, heightSegments] [, forceDirection] [, forceAxis] [, forceAngle])
Creates a tile with bent capability
Parameters:
| Name | Type | Argument | Default | Description |
|---|---|---|---|---|
width |
number |
<optional> |
10 | Width along the X axis |
height |
number |
<optional> |
5 | Height along the Y axis |
widthSegments |
number |
<optional> |
20 | Width segments |
heightSegments |
number |
<optional> |
20 | Height segments |
forceDirection |
THREE.Vector3 |
<optional> |
THREE.Vector3( 0, 0, 1 ) | Force direction |
forceAxis |
THREE.Vector3 |
<optional> |
THREE.Vector3( 0, 1, 0 ) | Along this axis |
forceAngle |
number |
<optional> |
Math.PI/12 | Angle to bend in radians |
- Source:
Methods
-
bend(direction, axis, angle)
-
Bend panel with direction, axis, and angle
Parameters:
Name Type Description directionTHREE.Vector3 Force direction axisTHREE.Vector3 Along this axis anglenumber Angle to bend in radians - Source:
-
ripple(scale, duration, easing)
-
Short-hand for displaying a single ripple effect by duplicating itself and fadeout
Parameters:
Name Type Description scalenumber The duplicated self fadeout scale durationnumber Effect duration easingTWEEN.Easing Easing function - Source:
-
setEntity(entity)
-
Set entity if multiple objects are considered as one entity
Parameters:
Name Type Description entityobject Entity represents whole group structure - Source:
-
tween(name, object, toState, duration, easing, delay, onStart, onUpdate, onComplete)
-
Create a tween object for animation based on - https://github.com/tweenjs/tween.js
Parameters:
Name Type Description namestring Name of the tween animation objectobject Object to be tweened toStateobject Final state of the object's properties durationnumber Tweening duration easingTWEEN.Easing Easing function delaynumber Animation delay time onStartfunction On start function onUpdatefunction On update function onCompletefunction On complete function - Source:
Returns:
- Tween object- Type
- TWEEN.Tween
-
unbend()
-
Restore geometry back to initial state
- Source: