TorusKnotGeometry class
Creates a torus knot, the particular shape of which is defined by a pair of coprime integers, p and q. If p and q are not coprime, the result will be a torus link.
final geometry = TorusKnotGeometry( 10, 3, 100, 16 );
final material = MeshBasicMaterial( { MaterialProperty.color: 0xffff00});
final circle = Mesh(geometry, material);
scene.add(circle);
- Inheritance
-
- Object
- BufferGeometry
- TorusKnotGeometry
Constructors
Properties
-
attributes
↔ Map<
String, dynamic> -
getter/setter pairinherited
- boundingBox ↔ BoundingBox?
-
getter/setter pairinherited
- boundingSphere ↔ BoundingSphere?
-
getter/setter pairinherited
-
colors
↔ List<
Color> -
getter/setter pairinherited
- colorsNeedUpdate ↔ bool
-
getter/setter pairinherited
- curveSegments ↔ int
-
getter/setter pairinherited
- directGeometry ↔ BufferGeometry?
-
getter/setter pairinherited
- disposed ↔ bool
-
getter/setter pairinherited
-
drawRange
↔ Map<
String, int> -
getter/setter pairinherited
- elementsNeedUpdate ↔ bool
-
getter/setter pairinherited
-
groups
↔ List<
Map< String, dynamic> > -
getter/setter pairinherited
- groupsNeedUpdate ↔ bool
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ int
-
getter/setter pairinherited
-
index
↔ BufferAttribute<
NativeArray< ?num> > -
getter/setter pairinherited
- instanceCount ↔ int?
-
getter/setter pairinherited
-
lineDistances
↔ List<
double> -
getter/setter pairinherited
- lineDistancesNeedUpdate ↔ bool
-
getter/setter pairinherited
- maxInstanceCount ↔ int?
-
getter/setter pairinherited
-
morphAttributes
↔ Map<
String, List< BufferAttribute< >NativeArray< >num> > -
getter/setter pairinherited
-
morphTargets
↔ List<
MorphTarget> -
getter/setter pairinherited
- morphTargetsRelative ↔ bool
-
getter/setter pairinherited
- name ↔ String
-
getter/setter pairinherited
- normalsNeedUpdate ↔ bool
-
getter/setter pairinherited
-
parameters
↔ Map<
String, dynamic> ? -
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type ↔ String
-
getter/setter pairinherited
-
userData
↔ Map<
String, dynamic> -
getter/setter pairinherited
- uuid ↔ String
-
getter/setter pairinherited
- uvsNeedUpdate ↔ bool
-
getter/setter pairinherited
- verticesNeedUpdate ↔ bool
-
getter/setter pairinherited
Methods
-
addEventListener(
String type, Function listener) → void -
type
- The type of event to listen to.inherited -
addGroup(
int start, int count, [int materialIndex = 0]) → void -
Adds a group to this geometry; see the
groups
property for details.inherited -
applyMatrix4(
Matrix4 matrix) → void -
Applies the matrix transform to the geometry.
inherited
-
applyQuaternion(
Quaternion q) → BufferGeometry -
Applies the rotation represented by the quaternion to the geometry.
inherited
-
center(
) → void -
Center the geometry based on the bounding box.
inherited
-
clearGroups(
) → void -
Clears all groups.
inherited
-
clearListeners(
) → void -
Remove all Listeners.
inherited
-
clone(
) → BufferGeometry -
Creates a clone of this BufferGeometry.
inherited
-
computeBoundingBox(
) → void -
inherited
-
computeBoundingSphere(
) → void -
Computes the bounding sphere of the geometry, and updates the
boundingSphere
attribute.inherited -
computeFaceNormals(
) → void -
inherited
-
computeTangents(
) → void -
Calculates and adds a tangent attribute to this geometry.
inherited
-
computeVertexNormals(
) → void -
Computes vertex normals for the given vertex data. For indexed geometries,
the method sets each vertex normal to be the average of the face normals of the faces that share that vertex.
inherited
-
copy(
BufferGeometry source) → BufferGeometry -
inherited
-
deleteAttribute(
Attribute type) → BufferGeometry -
Deletes the
type
with the specified Attribute.inherited -
deleteAttributeFromString(
String type) → BufferGeometry -
Deletes the
type
with the specified string name.inherited -
dispatchEvent(
Event event) → void -
event
- The event that gets fired.inherited -
dispose(
) → void -
Frees the GPU-related resources allocated by this instance. Call this
method whenever this instance is no longer used in your app.
inherited
-
getAttribute(
Attribute type) → dynamic -
Returns the
type
with the specified Attribute.inherited -
getAttributeFromString(
String type) → dynamic -
Returns the
type
with the specified string name.inherited -
getIndex(
) → BufferAttribute< NativeArray< ?num> > -
Return the
index
buffer.inherited -
hasAttribute(
Attribute type) → bool -
Returns
true
if the attribute with the specified name exists.inherited -
hasAttributeFromString(
String type) → bool -
Returns
true
if the attribute with the specified name exists.inherited -
hasEventListener(
String type, Function listener) → bool -
type
- The type of event to listen to.inherited -
lookAt(
Vector3 vector) → BufferGeometry -
vector - A world vector to look at.
inherited
-
merge(
BufferGeometry geometry, [int? offset]) → BufferGeometry -
inherited
-
normalizeNormals(
) → void -
Every normal vector in a geometry will have a magnitude of
1
. This will correct lighting on the geometry surfaces.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeEventListener(
String type, Function listener) → void -
type - The type of the listener that gets removed.
inherited
-
rotateX(
double angle) → BufferGeometry -
Rotate the geometry about the X axis. This is typically done as a one time
operation, and not during a loop. Use
rotation
for typical real-time mesh rotation.inherited -
rotateY(
double angle) → BufferGeometry -
Rotate the geometry about the Y axis. This is typically done as a one time
operation, and not during a loop. Use
rotation
for typical real-time mesh rotation.inherited -
rotateZ(
double angle) → BufferGeometry -
Rotate the geometry about the Z axis. This is typically done as a one time
operation, and not during a loop. Use
rotation
for typical real-time mesh rotation.inherited -
scale(
double x, double y, double z) → BufferGeometry -
Scale the geometry data. This is typically done as a one time operation,
and not during a loop. Use
scale
for typical real-time mesh scaling.inherited -
setAttribute(
Attribute type, dynamic attribute) → BufferGeometry -
Sets an attribute to this geometry. Use this rather than the attributes
property, because an internal hashmap of
attributes
is maintained to speed up iterating over attributes.inherited -
setAttributeFromString(
String type, dynamic source) → BufferGeometry -
Sets an attribute to this geometry. Use this rather than the attributes
property, because an internal hashmap of
attributes
is maintained to speed up iterating over attributes.inherited -
setDrawRange(
int start, int count) → void -
Set the
drawRange
property. For non-indexed BufferGeometry, count is the number of vertices to render. For indexed BufferGeometry, count is the number of indices to render.inherited -
setFromPoints(
dynamic points) → BufferGeometry -
Sets the attributes for this BufferGeometry from an array of points.
inherited
-
setIndex(
dynamic index) → void -
inherited
-
toJson(
{Object3dMeta? meta}) → Map< String, dynamic> -
Convert the buffer geometry to three.js
JSON Object/Scene format.
inherited
-
toNonIndexed(
) → BufferGeometry -
Return a non-index version of an indexed BufferGeometry.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
translate(
double x, double y, double z) → BufferGeometry -
Translate the geometry by
x,y,z
. This is typically done as a one time operation, and not during a loop. Useposition
for typical real-time mesh translation.inherited -
translateWithVector3(
Vector3 v3) → BufferGeometry -
Translate the geometry by Vecotr3. This is typically done as a one time operation,
and not during a loop. Use
position
for typical real-time mesh translation.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited