Documentation
¶
Index ¶
- func Init() error
- type AmbientLight
- func (obj AmbientLight) Add(m Object3D)
- func (obj AmbientLight) ApplyMatrix4(matrix Matrix4)
- func (obj AmbientLight) ApplyQuaternion(q Quaternion)
- func (obj AmbientLight) Attach(m Object3D)
- func (obj AmbientLight) Clear()
- func (obj AmbientLight) Clone(recursive bool) AmbientLight
- func (obj AmbientLight) Copy(m Object3D, recursive bool) AmbientLight
- func (obj AmbientLight) GetObjectById(id int) js.Value
- func (obj AmbientLight) GetPosition() Vector3
- func (obj AmbientLight) GetRotation() Euler
- func (obj AmbientLight) GetWorldDirection(dst Vector3) Vector3
- func (obj AmbientLight) GetWorldPosition(dst Vector3) Vector3
- func (obj AmbientLight) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj AmbientLight) GetWorldScale(dst Vector3) Vector3
- func (obj AmbientLight) ID() int
- func (obj AmbientLight) LocalToWorld(vec Vector3) Vector3
- func (obj AmbientLight) LookAt(target Vector3)
- func (obj AmbientLight) LookAtCoords(x, y, z float64)
- func (obj AmbientLight) Remove(m Object3D)
- func (obj AmbientLight) RemoveFromParent()
- func (obj AmbientLight) RotateOnAxis(angle float64, axis Vector3) (this AmbientLight)
- func (obj AmbientLight) RotateOnWorldAxis(angle float64, axis Vector3) (this AmbientLight)
- func (obj AmbientLight) RotateX(rad float64) (this AmbientLight)
- func (obj AmbientLight) RotateY(rad float64) (this AmbientLight)
- func (obj AmbientLight) RotateZ(rad float64) (this AmbientLight)
- func (obj AmbientLight) SetPosition(v Vector3)
- func (obj AmbientLight) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj AmbientLight) SetRotationFromEuler(euler Euler)
- func (obj AmbientLight) SetRotationFromMatrix(m Matrix4)
- func (obj AmbientLight) SetRotationFromQuaternion(q Quaternion)
- func (obj AmbientLight) ToJSON() js.Value
- func (obj AmbientLight) TranslateOnAxis(distance float64, axis Vector3)
- func (obj AmbientLight) TranslateX(distance float64)
- func (obj AmbientLight) TranslateY(distance float64)
- func (obj AmbientLight) TranslateZ(distance float64)
- func (obj AmbientLight) UpdateMatrix()
- func (obj AmbientLight) WorldToLocal(vec Vector3) Vector3
- type ArrowHeadParameters
- type ArrowHelper
- func (obj ArrowHelper) Add(m Object3D)
- func (obj ArrowHelper) ApplyMatrix4(matrix Matrix4)
- func (obj ArrowHelper) ApplyQuaternion(q Quaternion)
- func (obj ArrowHelper) Attach(m Object3D)
- func (obj ArrowHelper) Clear()
- func (obj ArrowHelper) Clone(recursive bool) ArrowHelper
- func (obj ArrowHelper) Copy(m Object3D, recursive bool) ArrowHelper
- func (obj ArrowHelper) GetObjectById(id int) js.Value
- func (obj ArrowHelper) GetPosition() Vector3
- func (obj ArrowHelper) GetRotation() Euler
- func (obj ArrowHelper) GetWorldDirection(dst Vector3) Vector3
- func (obj ArrowHelper) GetWorldPosition(dst Vector3) Vector3
- func (obj ArrowHelper) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj ArrowHelper) GetWorldScale(dst Vector3) Vector3
- func (obj ArrowHelper) ID() int
- func (obj ArrowHelper) LocalToWorld(vec Vector3) Vector3
- func (obj ArrowHelper) LookAt(target Vector3)
- func (obj ArrowHelper) LookAtCoords(x, y, z float64)
- func (obj ArrowHelper) Remove(m Object3D)
- func (obj ArrowHelper) RemoveFromParent()
- func (obj ArrowHelper) RotateOnAxis(angle float64, axis Vector3) (this ArrowHelper)
- func (obj ArrowHelper) RotateOnWorldAxis(angle float64, axis Vector3) (this ArrowHelper)
- func (obj ArrowHelper) RotateX(rad float64) (this ArrowHelper)
- func (obj ArrowHelper) RotateY(rad float64) (this ArrowHelper)
- func (obj ArrowHelper) RotateZ(rad float64) (this ArrowHelper)
- func (g ArrowHelper) SetColor(color Color)
- func (g ArrowHelper) SetDirection(dir Vector3)
- func (g ArrowHelper) SetLength(length float64, head *ArrowHeadParameters)
- func (obj ArrowHelper) SetPosition(v Vector3)
- func (obj ArrowHelper) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj ArrowHelper) SetRotationFromEuler(euler Euler)
- func (obj ArrowHelper) SetRotationFromMatrix(m Matrix4)
- func (obj ArrowHelper) SetRotationFromQuaternion(q Quaternion)
- func (obj ArrowHelper) ToJSON() js.Value
- func (obj ArrowHelper) TranslateOnAxis(distance float64, axis Vector3)
- func (obj ArrowHelper) TranslateX(distance float64)
- func (obj ArrowHelper) TranslateY(distance float64)
- func (obj ArrowHelper) TranslateZ(distance float64)
- func (obj ArrowHelper) UpdateMatrix()
- func (obj ArrowHelper) WorldToLocal(vec Vector3) Vector3
- type ArrowHelperParameters
- type AxesHelper
- func (obj AxesHelper) Add(m Object3D)
- func (obj AxesHelper) ApplyMatrix4(matrix Matrix4)
- func (obj AxesHelper) ApplyQuaternion(q Quaternion)
- func (obj AxesHelper) Attach(m Object3D)
- func (obj AxesHelper) Clear()
- func (obj AxesHelper) Clone(recursive bool) AxesHelper
- func (obj AxesHelper) Copy(m Object3D, recursive bool) AxesHelper
- func (g AxesHelper) Dispose()
- func (obj AxesHelper) GetObjectById(id int) js.Value
- func (obj AxesHelper) GetPosition() Vector3
- func (obj AxesHelper) GetRotation() Euler
- func (obj AxesHelper) GetWorldDirection(dst Vector3) Vector3
- func (obj AxesHelper) GetWorldPosition(dst Vector3) Vector3
- func (obj AxesHelper) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj AxesHelper) GetWorldScale(dst Vector3) Vector3
- func (obj AxesHelper) ID() int
- func (obj AxesHelper) LocalToWorld(vec Vector3) Vector3
- func (obj AxesHelper) LookAt(target Vector3)
- func (obj AxesHelper) LookAtCoords(x, y, z float64)
- func (obj AxesHelper) Remove(m Object3D)
- func (obj AxesHelper) RemoveFromParent()
- func (obj AxesHelper) RotateOnAxis(angle float64, axis Vector3) (this AxesHelper)
- func (obj AxesHelper) RotateOnWorldAxis(angle float64, axis Vector3) (this AxesHelper)
- func (obj AxesHelper) RotateX(rad float64) (this AxesHelper)
- func (obj AxesHelper) RotateY(rad float64) (this AxesHelper)
- func (obj AxesHelper) RotateZ(rad float64) (this AxesHelper)
- func (g AxesHelper) SetColors(xaxis, yaxis, zaxis *Color) AxesHelper
- func (obj AxesHelper) SetPosition(v Vector3)
- func (obj AxesHelper) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj AxesHelper) SetRotationFromEuler(euler Euler)
- func (obj AxesHelper) SetRotationFromMatrix(m Matrix4)
- func (obj AxesHelper) SetRotationFromQuaternion(q Quaternion)
- func (obj AxesHelper) ToJSON() js.Value
- func (obj AxesHelper) TranslateOnAxis(distance float64, axis Vector3)
- func (obj AxesHelper) TranslateX(distance float64)
- func (obj AxesHelper) TranslateY(distance float64)
- func (obj AxesHelper) TranslateZ(distance float64)
- func (obj AxesHelper) UpdateMatrix()
- func (obj AxesHelper) WorldToLocal(vec Vector3) Vector3
- type BoxGeometry
- func (g BoxGeometry) ApplyMatrix4(matrix Matrix4)
- func (g BoxGeometry) Center()
- func (g BoxGeometry) ComputeBoundingBox()
- func (g BoxGeometry) ComputeBoundingSphere()
- func (g BoxGeometry) ComputeFaceNormals()
- func (g BoxGeometry) ComputeFlatVertexNormals()
- func (g BoxGeometry) ComputeLineDistances()
- func (g BoxGeometry) ComputeMorphNormals()
- func (g BoxGeometry) ComputeVertexNormals(areaWeighted bool)
- func (g BoxGeometry) Copy(source Object3D, recursive bool) BoxGeometry
- func (g BoxGeometry) Dispose()
- func (g BoxGeometry) FromBufferGeometry(geometry Geometry)
- func (g BoxGeometry) LookAt()
- func (g BoxGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
- func (g BoxGeometry) MergeMesh(mesh Mesh)
- func (g BoxGeometry) MergeVertices()
- func (g BoxGeometry) Normalize() BoxGeometry
- func (g BoxGeometry) RotateX()
- func (g BoxGeometry) RotateY()
- func (g BoxGeometry) RotateZ()
- func (g BoxGeometry) Scale()
- func (g BoxGeometry) SortFacesByMaterialIndex()
- func (g BoxGeometry) ToJSON() js.Value
- func (g BoxGeometry) Translate()
- type BoxGeometryParameters
- type BufferAttribute
- type BufferGeometry
- func (bg BufferGeometry) AddFace(a, b, c int)
- func (g BufferGeometry) ApplyMatrix4(matrix Matrix4)
- func (g BufferGeometry) Center()
- func (g BufferGeometry) ComputeBoundingBox()
- func (g BufferGeometry) ComputeBoundingSphere()
- func (g BufferGeometry) ComputeFaceNormals()
- func (g BufferGeometry) ComputeFlatVertexNormals()
- func (g BufferGeometry) ComputeLineDistances()
- func (g BufferGeometry) ComputeMorphNormals()
- func (g BufferGeometry) ComputeVertexNormals(areaWeighted bool)
- func (g BufferGeometry) Copy(source Object3D, recursive bool) BufferGeometry
- func (g BufferGeometry) Dispose()
- func (g BufferGeometry) FromBufferGeometry(geometry Geometry)
- func (bg BufferGeometry) GetAttribute(name string) BufferAttribute
- func (g BufferGeometry) LookAt()
- func (g BufferGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
- func (g BufferGeometry) MergeMesh(mesh Mesh)
- func (g BufferGeometry) MergeVertices()
- func (g BufferGeometry) Normalize() BufferGeometry
- func (g BufferGeometry) RotateX()
- func (g BufferGeometry) RotateY()
- func (g BufferGeometry) RotateZ()
- func (g BufferGeometry) Scale()
- func (bg BufferGeometry) SetAttribute(name string, attr BufferAttribute)
- func (g BufferGeometry) SortFacesByMaterialIndex()
- func (g BufferGeometry) ToJSON() js.Value
- func (g BufferGeometry) Translate()
- type Camera
- type Color
- type ConeGeometry
- func (g ConeGeometry) ApplyMatrix4(matrix Matrix4)
- func (g ConeGeometry) Center()
- func (g ConeGeometry) ComputeBoundingBox()
- func (g ConeGeometry) ComputeBoundingSphere()
- func (g ConeGeometry) ComputeFaceNormals()
- func (g ConeGeometry) ComputeFlatVertexNormals()
- func (g ConeGeometry) ComputeLineDistances()
- func (g ConeGeometry) ComputeMorphNormals()
- func (g ConeGeometry) ComputeVertexNormals(areaWeighted bool)
- func (g ConeGeometry) Copy(source Object3D, recursive bool) ConeGeometry
- func (g ConeGeometry) Dispose()
- func (g ConeGeometry) FromBufferGeometry(geometry Geometry)
- func (g ConeGeometry) LookAt()
- func (g ConeGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
- func (g ConeGeometry) MergeMesh(mesh Mesh)
- func (g ConeGeometry) MergeVertices()
- func (g ConeGeometry) Normalize() ConeGeometry
- func (g ConeGeometry) RotateX()
- func (g ConeGeometry) RotateY()
- func (g ConeGeometry) RotateZ()
- func (g ConeGeometry) Scale()
- func (g ConeGeometry) SortFacesByMaterialIndex()
- func (g ConeGeometry) ToJSON() js.Value
- func (g ConeGeometry) Translate()
- type ConeGeometryParameters
- type CylinderGeometry
- func (g CylinderGeometry) ApplyMatrix4(matrix Matrix4)
- func (g CylinderGeometry) Center()
- func (g CylinderGeometry) ComputeBoundingBox()
- func (g CylinderGeometry) ComputeBoundingSphere()
- func (g CylinderGeometry) ComputeFaceNormals()
- func (g CylinderGeometry) ComputeFlatVertexNormals()
- func (g CylinderGeometry) ComputeLineDistances()
- func (g CylinderGeometry) ComputeMorphNormals()
- func (g CylinderGeometry) ComputeVertexNormals(areaWeighted bool)
- func (g CylinderGeometry) Copy(source Object3D, recursive bool) CylinderGeometry
- func (g CylinderGeometry) Dispose()
- func (g CylinderGeometry) FromBufferGeometry(geometry Geometry)
- func (g CylinderGeometry) LookAt()
- func (g CylinderGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
- func (g CylinderGeometry) MergeMesh(mesh Mesh)
- func (g CylinderGeometry) MergeVertices()
- func (g CylinderGeometry) Normalize() CylinderGeometry
- func (g CylinderGeometry) RotateX()
- func (g CylinderGeometry) RotateY()
- func (g CylinderGeometry) RotateZ()
- func (g CylinderGeometry) Scale()
- func (g CylinderGeometry) SortFacesByMaterialIndex()
- func (g CylinderGeometry) ToJSON() js.Value
- func (g CylinderGeometry) Translate()
- type CylinderGeometryParameters
- type DirectionalLight
- func (obj DirectionalLight) Add(m Object3D)
- func (obj DirectionalLight) ApplyMatrix4(matrix Matrix4)
- func (obj DirectionalLight) ApplyQuaternion(q Quaternion)
- func (obj DirectionalLight) Attach(m Object3D)
- func (obj DirectionalLight) Clear()
- func (obj DirectionalLight) Clone(recursive bool) DirectionalLight
- func (obj DirectionalLight) Copy(m Object3D, recursive bool) DirectionalLight
- func (obj DirectionalLight) GetObjectById(id int) js.Value
- func (obj DirectionalLight) GetPosition() Vector3
- func (obj DirectionalLight) GetRotation() Euler
- func (obj DirectionalLight) GetWorldDirection(dst Vector3) Vector3
- func (obj DirectionalLight) GetWorldPosition(dst Vector3) Vector3
- func (obj DirectionalLight) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj DirectionalLight) GetWorldScale(dst Vector3) Vector3
- func (obj DirectionalLight) ID() int
- func (obj DirectionalLight) LocalToWorld(vec Vector3) Vector3
- func (obj DirectionalLight) LookAt(target Vector3)
- func (obj DirectionalLight) LookAtCoords(x, y, z float64)
- func (obj DirectionalLight) Remove(m Object3D)
- func (obj DirectionalLight) RemoveFromParent()
- func (obj DirectionalLight) RotateOnAxis(angle float64, axis Vector3) (this DirectionalLight)
- func (obj DirectionalLight) RotateOnWorldAxis(angle float64, axis Vector3) (this DirectionalLight)
- func (obj DirectionalLight) RotateX(rad float64) (this DirectionalLight)
- func (obj DirectionalLight) RotateY(rad float64) (this DirectionalLight)
- func (obj DirectionalLight) RotateZ(rad float64) (this DirectionalLight)
- func (obj DirectionalLight) SetPosition(v Vector3)
- func (obj DirectionalLight) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj DirectionalLight) SetRotationFromEuler(euler Euler)
- func (obj DirectionalLight) SetRotationFromMatrix(m Matrix4)
- func (obj DirectionalLight) SetRotationFromQuaternion(q Quaternion)
- func (obj DirectionalLight) ToJSON() js.Value
- func (obj DirectionalLight) TranslateOnAxis(distance float64, axis Vector3)
- func (obj DirectionalLight) TranslateX(distance float64)
- func (obj DirectionalLight) TranslateY(distance float64)
- func (obj DirectionalLight) TranslateZ(distance float64)
- func (obj DirectionalLight) UpdateMatrix()
- func (obj DirectionalLight) WorldToLocal(vec Vector3) Vector3
- type Euler
- type Face3
- type Fog
- func (obj Fog) Add(m Object3D)
- func (obj Fog) ApplyMatrix4(matrix Matrix4)
- func (obj Fog) ApplyQuaternion(q Quaternion)
- func (obj Fog) Attach(m Object3D)
- func (obj Fog) Clear()
- func (obj Fog) Clone(recursive bool) Fog
- func (obj Fog) Copy(m Object3D, recursive bool) Fog
- func (obj Fog) GetObjectById(id int) js.Value
- func (obj Fog) GetPosition() Vector3
- func (obj Fog) GetRotation() Euler
- func (obj Fog) GetWorldDirection(dst Vector3) Vector3
- func (obj Fog) GetWorldPosition(dst Vector3) Vector3
- func (obj Fog) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj Fog) GetWorldScale(dst Vector3) Vector3
- func (obj Fog) ID() int
- func (obj Fog) LocalToWorld(vec Vector3) Vector3
- func (obj Fog) LookAt(target Vector3)
- func (obj Fog) LookAtCoords(x, y, z float64)
- func (obj Fog) Remove(m Object3D)
- func (obj Fog) RemoveFromParent()
- func (obj Fog) RotateOnAxis(angle float64, axis Vector3) (this Fog)
- func (obj Fog) RotateOnWorldAxis(angle float64, axis Vector3) (this Fog)
- func (obj Fog) RotateX(rad float64) (this Fog)
- func (obj Fog) RotateY(rad float64) (this Fog)
- func (obj Fog) RotateZ(rad float64) (this Fog)
- func (obj Fog) SetPosition(v Vector3)
- func (obj Fog) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj Fog) SetRotationFromEuler(euler Euler)
- func (obj Fog) SetRotationFromMatrix(m Matrix4)
- func (obj Fog) SetRotationFromQuaternion(q Quaternion)
- func (obj Fog) ToJSON() js.Value
- func (obj Fog) TranslateOnAxis(distance float64, axis Vector3)
- func (obj Fog) TranslateX(distance float64)
- func (obj Fog) TranslateY(distance float64)
- func (obj Fog) TranslateZ(distance float64)
- func (obj Fog) UpdateMatrix()
- func (obj Fog) WorldToLocal(vec Vector3) Vector3
- type Geometry
- type Group
- func (obj Group) Add(m Object3D)
- func (obj Group) ApplyMatrix4(matrix Matrix4)
- func (obj Group) ApplyQuaternion(q Quaternion)
- func (obj Group) Attach(m Object3D)
- func (obj Group) Clear()
- func (obj Group) Clone(recursive bool) Group
- func (obj Group) Copy(m Object3D, recursive bool) Group
- func (obj Group) GetObjectById(id int) js.Value
- func (obj Group) GetPosition() Vector3
- func (obj Group) GetRotation() Euler
- func (obj Group) GetWorldDirection(dst Vector3) Vector3
- func (obj Group) GetWorldPosition(dst Vector3) Vector3
- func (obj Group) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj Group) GetWorldScale(dst Vector3) Vector3
- func (obj Group) ID() int
- func (obj Group) LocalToWorld(vec Vector3) Vector3
- func (obj Group) LookAt(target Vector3)
- func (obj Group) LookAtCoords(x, y, z float64)
- func (obj Group) Remove(m Object3D)
- func (obj Group) RemoveFromParent()
- func (obj Group) RotateOnAxis(angle float64, axis Vector3) (this Group)
- func (obj Group) RotateOnWorldAxis(angle float64, axis Vector3) (this Group)
- func (obj Group) RotateX(rad float64) (this Group)
- func (obj Group) RotateY(rad float64) (this Group)
- func (obj Group) RotateZ(rad float64) (this Group)
- func (obj Group) SetPosition(v Vector3)
- func (obj Group) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj Group) SetRotationFromEuler(euler Euler)
- func (obj Group) SetRotationFromMatrix(m Matrix4)
- func (obj Group) SetRotationFromQuaternion(q Quaternion)
- func (obj Group) ToJSON() js.Value
- func (obj Group) TranslateOnAxis(distance float64, axis Vector3)
- func (obj Group) TranslateX(distance float64)
- func (obj Group) TranslateY(distance float64)
- func (obj Group) TranslateZ(distance float64)
- func (obj Group) UpdateMatrix()
- func (obj Group) WorldToLocal(vec Vector3) Vector3
- type Image
- type Line
- func (obj Line) Add(m Object3D)
- func (obj Line) ApplyMatrix4(matrix Matrix4)
- func (obj Line) ApplyQuaternion(q Quaternion)
- func (obj Line) Attach(m Object3D)
- func (obj Line) Clear()
- func (obj Line) Clone(recursive bool) Line
- func (obj Line) Copy(m Object3D, recursive bool) Line
- func (obj Line) GetObjectById(id int) js.Value
- func (obj Line) GetPosition() Vector3
- func (obj Line) GetRotation() Euler
- func (obj Line) GetWorldDirection(dst Vector3) Vector3
- func (obj Line) GetWorldPosition(dst Vector3) Vector3
- func (obj Line) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj Line) GetWorldScale(dst Vector3) Vector3
- func (obj Line) ID() int
- func (obj Line) LocalToWorld(vec Vector3) Vector3
- func (obj Line) LookAt(target Vector3)
- func (obj Line) LookAtCoords(x, y, z float64)
- func (obj Line) Raycast(rc Raycaster, intersects js.Value)
- func (obj Line) Remove(m Object3D)
- func (obj Line) RemoveFromParent()
- func (obj Line) RotateOnAxis(angle float64, axis Vector3) (this Line)
- func (obj Line) RotateOnWorldAxis(angle float64, axis Vector3) (this Line)
- func (obj Line) RotateX(rad float64) (this Line)
- func (obj Line) RotateY(rad float64) (this Line)
- func (obj Line) RotateZ(rad float64) (this Line)
- func (obj Line) SetPosition(v Vector3)
- func (obj Line) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj Line) SetRotationFromEuler(euler Euler)
- func (obj Line) SetRotationFromMatrix(m Matrix4)
- func (obj Line) SetRotationFromQuaternion(q Quaternion)
- func (obj Line) ToJSON() js.Value
- func (obj Line) TranslateOnAxis(distance float64, axis Vector3)
- func (obj Line) TranslateX(distance float64)
- func (obj Line) TranslateY(distance float64)
- func (obj Line) TranslateZ(distance float64)
- func (obj Line) UpdateMatrix()
- func (obj Line) WorldToLocal(vec Vector3) Vector3
- type LineBasicMaterial
- type LineSegments
- func (obj LineSegments) Add(m Object3D)
- func (obj LineSegments) ApplyMatrix4(matrix Matrix4)
- func (obj LineSegments) ApplyQuaternion(q Quaternion)
- func (obj LineSegments) Attach(m Object3D)
- func (obj LineSegments) Clear()
- func (obj LineSegments) Clone(recursive bool) LineSegments
- func (obj LineSegments) Copy(m Object3D, recursive bool) LineSegments
- func (obj LineSegments) GetObjectById(id int) js.Value
- func (obj LineSegments) GetPosition() Vector3
- func (obj LineSegments) GetRotation() Euler
- func (obj LineSegments) GetWorldDirection(dst Vector3) Vector3
- func (obj LineSegments) GetWorldPosition(dst Vector3) Vector3
- func (obj LineSegments) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj LineSegments) GetWorldScale(dst Vector3) Vector3
- func (obj LineSegments) ID() int
- func (obj LineSegments) LocalToWorld(vec Vector3) Vector3
- func (obj LineSegments) LookAt(target Vector3)
- func (obj LineSegments) LookAtCoords(x, y, z float64)
- func (obj LineSegments) Remove(m Object3D)
- func (obj LineSegments) RemoveFromParent()
- func (obj LineSegments) RotateOnAxis(angle float64, axis Vector3) (this LineSegments)
- func (obj LineSegments) RotateOnWorldAxis(angle float64, axis Vector3) (this LineSegments)
- func (obj LineSegments) RotateX(rad float64) (this LineSegments)
- func (obj LineSegments) RotateY(rad float64) (this LineSegments)
- func (obj LineSegments) RotateZ(rad float64) (this LineSegments)
- func (obj LineSegments) SetPosition(v Vector3)
- func (obj LineSegments) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj LineSegments) SetRotationFromEuler(euler Euler)
- func (obj LineSegments) SetRotationFromMatrix(m Matrix4)
- func (obj LineSegments) SetRotationFromQuaternion(q Quaternion)
- func (obj LineSegments) ToJSON() js.Value
- func (obj LineSegments) TranslateOnAxis(distance float64, axis Vector3)
- func (obj LineSegments) TranslateX(distance float64)
- func (obj LineSegments) TranslateY(distance float64)
- func (obj LineSegments) TranslateZ(distance float64)
- func (obj LineSegments) UpdateMatrix()
- func (obj LineSegments) WorldToLocal(vec Vector3) Vector3
- type MappingMode
- type Material
- type MaterialParameters
- type Matrix4
- func (m Matrix4) Compose(scale, position Vector3, q Quaternion) (this Matrix4)
- func (m Matrix4) Decompose(scale, position Vector3, q Quaternion)
- func (m Matrix4) Determinant() float64
- func (m Matrix4) ExtractBasis(x, y, z Vector3) (this Matrix4)
- func (m Matrix4) ExtractRotation(a Matrix4) (this Matrix4)
- func (m Matrix4) Identity() (this Matrix4)
- func (m Matrix4) Invert() (this Matrix4)
- func (m Matrix4) MakeBasis(x, y, z Vector3) (this Matrix4)
- func (m Matrix4) MakeRotationFromQuaternion(q Quaternion) (this Matrix4)
- func (m Matrix4) MakeTranslation(x, y, z float64) (this Matrix4)
- type Mesh
- func (obj Mesh) Add(m Object3D)
- func (obj Mesh) ApplyMatrix4(matrix Matrix4)
- func (obj Mesh) ApplyQuaternion(q Quaternion)
- func (obj Mesh) Attach(m Object3D)
- func (obj Mesh) Clear()
- func (obj Mesh) Clone(recursive bool) Mesh
- func (obj Mesh) Copy(m Object3D, recursive bool) Mesh
- func (obj Mesh) GetObjectById(id int) js.Value
- func (obj Mesh) GetPosition() Vector3
- func (obj Mesh) GetRotation() Euler
- func (obj Mesh) GetWorldDirection(dst Vector3) Vector3
- func (obj Mesh) GetWorldPosition(dst Vector3) Vector3
- func (obj Mesh) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj Mesh) GetWorldScale(dst Vector3) Vector3
- func (obj Mesh) ID() int
- func (obj Mesh) LocalToWorld(vec Vector3) Vector3
- func (obj Mesh) LookAt(target Vector3)
- func (obj Mesh) LookAtCoords(x, y, z float64)
- func (obj Mesh) Raycast(rc Raycaster, intersects js.Value)
- func (obj Mesh) Remove(m Object3D)
- func (obj Mesh) RemoveFromParent()
- func (obj Mesh) RotateOnAxis(angle float64, axis Vector3) (this Mesh)
- func (obj Mesh) RotateOnWorldAxis(angle float64, axis Vector3) (this Mesh)
- func (obj Mesh) RotateX(rad float64) (this Mesh)
- func (obj Mesh) RotateY(rad float64) (this Mesh)
- func (obj Mesh) RotateZ(rad float64) (this Mesh)
- func (obj Mesh) SetPosition(v Vector3)
- func (obj Mesh) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj Mesh) SetRotationFromEuler(euler Euler)
- func (obj Mesh) SetRotationFromMatrix(m Matrix4)
- func (obj Mesh) SetRotationFromQuaternion(q Quaternion)
- func (obj Mesh) ToJSON() js.Value
- func (obj Mesh) TranslateOnAxis(distance float64, axis Vector3)
- func (obj Mesh) TranslateX(distance float64)
- func (obj Mesh) TranslateY(distance float64)
- func (obj Mesh) TranslateZ(distance float64)
- func (obj Mesh) UpdateMatrix()
- func (obj Mesh) WorldToLocal(vec Vector3) Vector3
- type MeshBasicMaterial
- type MeshLambertMaterial
- func (m MeshLambertMaterial) Clone()
- func (m MeshLambertMaterial) Copy(source Object3D)
- func (m MeshLambertMaterial) Dispose()
- func (m MeshLambertMaterial) OnBeforeCompile()
- func (m MeshLambertMaterial) SetValues(values *MaterialParameters)
- func (m MeshLambertMaterial) ToJSON(meta interface{}) js.Value
- type MeshPhongMaterial
- type MeshPhysicalMaterial
- func (m MeshPhysicalMaterial) Clone()
- func (m MeshPhysicalMaterial) Copy(source Object3D)
- func (m MeshPhysicalMaterial) Dispose()
- func (m MeshPhysicalMaterial) OnBeforeCompile()
- func (m MeshPhysicalMaterial) SetValues(values *MaterialParameters)
- func (m MeshPhysicalMaterial) ToJSON(meta interface{}) js.Value
- type MinMagFilter
- type Object3D
- type PerspectiveCamera
- func (obj PerspectiveCamera) Add(m Object3D)
- func (obj PerspectiveCamera) ApplyMatrix4(matrix Matrix4)
- func (obj PerspectiveCamera) ApplyQuaternion(q Quaternion)
- func (obj PerspectiveCamera) Attach(m Object3D)
- func (obj PerspectiveCamera) Clear()
- func (c PerspectiveCamera) ClearViewOffset()
- func (obj PerspectiveCamera) Clone(recursive bool) PerspectiveCamera
- func (obj PerspectiveCamera) Copy(m Object3D, recursive bool) PerspectiveCamera
- func (obj PerspectiveCamera) GetAspect() float64
- func (c PerspectiveCamera) GetEffectiveFOV() float64
- func (obj PerspectiveCamera) GetFOV() float64
- func (obj PerspectiveCamera) GetFar() float64
- func (c PerspectiveCamera) GetFilmHeight() float64
- func (c PerspectiveCamera) GetFilmWidth() float64
- func (c PerspectiveCamera) GetFocalLength() float64
- func (obj PerspectiveCamera) GetNear() float64
- func (obj PerspectiveCamera) GetObjectById(id int) js.Value
- func (obj PerspectiveCamera) GetPosition() Vector3
- func (obj PerspectiveCamera) GetRotation() Euler
- func (obj PerspectiveCamera) GetUp() Vector3
- func (obj PerspectiveCamera) GetWorldDirection(dst Vector3) Vector3
- func (obj PerspectiveCamera) GetWorldPosition(dst Vector3) Vector3
- func (obj PerspectiveCamera) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj PerspectiveCamera) GetWorldScale(dst Vector3) Vector3
- func (obj PerspectiveCamera) GetZoom() float64
- func (obj PerspectiveCamera) ID() int
- func (obj PerspectiveCamera) LocalToWorld(vec Vector3) Vector3
- func (obj PerspectiveCamera) LookAt(target Vector3)
- func (obj PerspectiveCamera) LookAtCoords(x, y, z float64)
- func (obj PerspectiveCamera) Remove(m Object3D)
- func (obj PerspectiveCamera) RemoveFromParent()
- func (obj PerspectiveCamera) RotateOnAxis(angle float64, axis Vector3) (this PerspectiveCamera)
- func (obj PerspectiveCamera) RotateOnWorldAxis(angle float64, axis Vector3) (this PerspectiveCamera)
- func (obj PerspectiveCamera) RotateX(rad float64) (this PerspectiveCamera)
- func (obj PerspectiveCamera) RotateY(rad float64) (this PerspectiveCamera)
- func (obj PerspectiveCamera) RotateZ(rad float64) (this PerspectiveCamera)
- func (obj PerspectiveCamera) SetAspect(ratio float64)
- func (obj PerspectiveCamera) SetFOV(fov float64)
- func (obj PerspectiveCamera) SetFar(far float64)
- func (c PerspectiveCamera) SetFocalLength(focalLength float64)
- func (obj PerspectiveCamera) SetNear(near float64)
- func (obj PerspectiveCamera) SetPosition(v Vector3)
- func (obj PerspectiveCamera) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj PerspectiveCamera) SetRotationFromEuler(euler Euler)
- func (obj PerspectiveCamera) SetRotationFromMatrix(m Matrix4)
- func (obj PerspectiveCamera) SetRotationFromQuaternion(q Quaternion)
- func (obj PerspectiveCamera) SetUp(v Vector3)
- func (c PerspectiveCamera) SetViewOffset(fullWidth, fullHeight, x, y, width, height float64)
- func (obj PerspectiveCamera) SetZoom(zoom float64)
- func (obj PerspectiveCamera) ToJSON() js.Value
- func (obj PerspectiveCamera) TranslateOnAxis(distance float64, axis Vector3)
- func (obj PerspectiveCamera) TranslateX(distance float64)
- func (obj PerspectiveCamera) TranslateY(distance float64)
- func (obj PerspectiveCamera) TranslateZ(distance float64)
- func (obj PerspectiveCamera) UpdateMatrix()
- func (c PerspectiveCamera) UpdateProjectionMatrix()
- func (obj PerspectiveCamera) WorldToLocal(vec Vector3) Vector3
- type Points
- func (obj Points) Add(m Object3D)
- func (obj Points) ApplyMatrix4(matrix Matrix4)
- func (obj Points) ApplyQuaternion(q Quaternion)
- func (obj Points) Attach(m Object3D)
- func (obj Points) Clear()
- func (obj Points) Clone(recursive bool) Points
- func (obj Points) Copy(m Object3D, recursive bool) Points
- func (obj Points) GetObjectById(id int) js.Value
- func (obj Points) GetPosition() Vector3
- func (obj Points) GetRotation() Euler
- func (obj Points) GetWorldDirection(dst Vector3) Vector3
- func (obj Points) GetWorldPosition(dst Vector3) Vector3
- func (obj Points) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj Points) GetWorldScale(dst Vector3) Vector3
- func (obj Points) ID() int
- func (obj Points) LocalToWorld(vec Vector3) Vector3
- func (obj Points) LookAt(target Vector3)
- func (obj Points) LookAtCoords(x, y, z float64)
- func (p *Points) Raycast(rc Raycaster, intersects js.Value)
- func (obj Points) Remove(m Object3D)
- func (obj Points) RemoveFromParent()
- func (obj Points) RotateOnAxis(angle float64, axis Vector3) (this Points)
- func (obj Points) RotateOnWorldAxis(angle float64, axis Vector3) (this Points)
- func (obj Points) RotateX(rad float64) (this Points)
- func (obj Points) RotateY(rad float64) (this Points)
- func (obj Points) RotateZ(rad float64) (this Points)
- func (obj Points) SetPosition(v Vector3)
- func (obj Points) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj Points) SetRotationFromEuler(euler Euler)
- func (obj Points) SetRotationFromMatrix(m Matrix4)
- func (obj Points) SetRotationFromQuaternion(q Quaternion)
- func (obj Points) ToJSON() js.Value
- func (obj Points) TranslateOnAxis(distance float64, axis Vector3)
- func (obj Points) TranslateX(distance float64)
- func (obj Points) TranslateY(distance float64)
- func (obj Points) TranslateZ(distance float64)
- func (obj Points) UpdateMatrix()
- func (obj Points) WorldToLocal(vec Vector3) Vector3
- type PointsMaterial
- type PolarGridHelper
- func (obj PolarGridHelper) Add(m Object3D)
- func (obj PolarGridHelper) ApplyMatrix4(matrix Matrix4)
- func (obj PolarGridHelper) ApplyQuaternion(q Quaternion)
- func (obj PolarGridHelper) Attach(m Object3D)
- func (obj PolarGridHelper) Clear()
- func (obj PolarGridHelper) Clone(recursive bool) PolarGridHelper
- func (obj PolarGridHelper) Copy(m Object3D, recursive bool) PolarGridHelper
- func (obj PolarGridHelper) GetObjectById(id int) js.Value
- func (obj PolarGridHelper) GetPosition() Vector3
- func (obj PolarGridHelper) GetRotation() Euler
- func (obj PolarGridHelper) GetWorldDirection(dst Vector3) Vector3
- func (obj PolarGridHelper) GetWorldPosition(dst Vector3) Vector3
- func (obj PolarGridHelper) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj PolarGridHelper) GetWorldScale(dst Vector3) Vector3
- func (obj PolarGridHelper) ID() int
- func (obj PolarGridHelper) LocalToWorld(vec Vector3) Vector3
- func (obj PolarGridHelper) LookAt(target Vector3)
- func (obj PolarGridHelper) LookAtCoords(x, y, z float64)
- func (obj PolarGridHelper) Remove(m Object3D)
- func (obj PolarGridHelper) RemoveFromParent()
- func (obj PolarGridHelper) RotateOnAxis(angle float64, axis Vector3) (this PolarGridHelper)
- func (obj PolarGridHelper) RotateOnWorldAxis(angle float64, axis Vector3) (this PolarGridHelper)
- func (obj PolarGridHelper) RotateX(rad float64) (this PolarGridHelper)
- func (obj PolarGridHelper) RotateY(rad float64) (this PolarGridHelper)
- func (obj PolarGridHelper) RotateZ(rad float64) (this PolarGridHelper)
- func (obj PolarGridHelper) SetPosition(v Vector3)
- func (obj PolarGridHelper) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj PolarGridHelper) SetRotationFromEuler(euler Euler)
- func (obj PolarGridHelper) SetRotationFromMatrix(m Matrix4)
- func (obj PolarGridHelper) SetRotationFromQuaternion(q Quaternion)
- func (obj PolarGridHelper) ToJSON() js.Value
- func (obj PolarGridHelper) TranslateOnAxis(distance float64, axis Vector3)
- func (obj PolarGridHelper) TranslateX(distance float64)
- func (obj PolarGridHelper) TranslateY(distance float64)
- func (obj PolarGridHelper) TranslateZ(distance float64)
- func (obj PolarGridHelper) UpdateMatrix()
- func (obj PolarGridHelper) WorldToLocal(vec Vector3) Vector3
- type PolarGridHelperParameters
- type Quaternion
- func (q Quaternion) AngleTo(a Quaternion) float64
- func (q Quaternion) Conjugate() Quaternion
- func (q Quaternion) Copy(a Quaternion) Quaternion
- func (q Quaternion) Dot(a Quaternion) float64
- func (q Quaternion) Equals(a Quaternion) bool
- func (q Quaternion) Identity() Quaternion
- func (q Quaternion) Invert() Quaternion
- func (q Quaternion) Length() float64
- func (q Quaternion) LengthSq() float64
- func (q Quaternion) Multiply(a Quaternion) Quaternion
- func (q Quaternion) MultiplyQuaternions(a, b Quaternion) Quaternion
- func (q Quaternion) Normalize() Quaternion
- func (q Quaternion) Premultiply(a Quaternion) Quaternion
- func (q Quaternion) Random() Quaternion
- func (q Quaternion) RotateTowards(step float64, a Quaternion) Quaternion
- func (q Quaternion) Set(x, y, z, w float64) Quaternion
- func (q Quaternion) SetFromAxisAngle(angle float64, axis Vector3) Quaternion
- func (q Quaternion) SetFromEuler(euler Euler) Quaternion
- func (q Quaternion) SetFromRotationMatrix(m Matrix4) Quaternion
- func (q Quaternion) SetFromUnitVectors(vFrom, vTo Vector3) Quaternion
- func (q Quaternion) Slerp(t float64, qb Quaternion) Quaternion
- func (q Quaternion) SlerpQuaternions(t float64, qa, qb Quaternion) (this Quaternion)
- type Raycaster
- type Scene
- func (obj Scene) Add(m Object3D)
- func (obj Scene) ApplyMatrix4(matrix Matrix4)
- func (obj Scene) ApplyQuaternion(q Quaternion)
- func (obj Scene) Attach(m Object3D)
- func (obj Scene) Clear()
- func (obj Scene) Clone(recursive bool) Scene
- func (obj Scene) Copy(m Object3D, recursive bool) Scene
- func (obj Scene) GetObjectById(id int) js.Value
- func (obj Scene) GetPosition() Vector3
- func (obj Scene) GetRotation() Euler
- func (obj Scene) GetWorldDirection(dst Vector3) Vector3
- func (obj Scene) GetWorldPosition(dst Vector3) Vector3
- func (obj Scene) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj Scene) GetWorldScale(dst Vector3) Vector3
- func (obj Scene) ID() int
- func (obj Scene) LocalToWorld(vec Vector3) Vector3
- func (obj Scene) LookAt(target Vector3)
- func (obj Scene) LookAtCoords(x, y, z float64)
- func (obj Scene) Remove(m Object3D)
- func (obj Scene) RemoveFromParent()
- func (obj Scene) RotateOnAxis(angle float64, axis Vector3) (this Scene)
- func (obj Scene) RotateOnWorldAxis(angle float64, axis Vector3) (this Scene)
- func (obj Scene) RotateX(rad float64) (this Scene)
- func (obj Scene) RotateY(rad float64) (this Scene)
- func (obj Scene) RotateZ(rad float64) (this Scene)
- func (obj Scene) SetPosition(v Vector3)
- func (obj Scene) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj Scene) SetRotationFromEuler(euler Euler)
- func (obj Scene) SetRotationFromMatrix(m Matrix4)
- func (obj Scene) SetRotationFromQuaternion(q Quaternion)
- func (obj Scene) ToJSON() js.Value
- func (obj Scene) TranslateOnAxis(distance float64, axis Vector3)
- func (obj Scene) TranslateX(distance float64)
- func (obj Scene) TranslateY(distance float64)
- func (obj Scene) TranslateZ(distance float64)
- func (obj Scene) UpdateMatrix()
- func (obj Scene) WorldToLocal(vec Vector3) Vector3
- type Shading
- type Side
- type SphereGeometry
- func (g SphereGeometry) ApplyMatrix4(matrix Matrix4)
- func (g SphereGeometry) Center()
- func (g SphereGeometry) ComputeBoundingBox()
- func (g SphereGeometry) ComputeBoundingSphere()
- func (g SphereGeometry) ComputeFaceNormals()
- func (g SphereGeometry) ComputeFlatVertexNormals()
- func (g SphereGeometry) ComputeLineDistances()
- func (g SphereGeometry) ComputeMorphNormals()
- func (g SphereGeometry) ComputeVertexNormals(areaWeighted bool)
- func (g SphereGeometry) Copy(source Object3D, recursive bool) SphereGeometry
- func (g SphereGeometry) Dispose()
- func (g SphereGeometry) FromBufferGeometry(geometry Geometry)
- func (g SphereGeometry) LookAt()
- func (g SphereGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
- func (g SphereGeometry) MergeMesh(mesh Mesh)
- func (g SphereGeometry) MergeVertices()
- func (g SphereGeometry) Normalize() SphereGeometry
- func (g SphereGeometry) RotateX()
- func (g SphereGeometry) RotateY()
- func (g SphereGeometry) RotateZ()
- func (g SphereGeometry) Scale()
- func (g SphereGeometry) SortFacesByMaterialIndex()
- func (g SphereGeometry) ToJSON() js.Value
- func (g SphereGeometry) Translate()
- type SphereGeometryParameters
- type Sprite
- func (obj Sprite) Add(m Object3D)
- func (obj Sprite) ApplyMatrix4(matrix Matrix4)
- func (obj Sprite) ApplyQuaternion(q Quaternion)
- func (obj Sprite) Attach(m Object3D)
- func (obj Sprite) Clear()
- func (obj Sprite) Clone(recursive bool) Sprite
- func (obj Sprite) Copy(m Object3D, recursive bool) Sprite
- func (obj Sprite) GetObjectById(id int) js.Value
- func (obj Sprite) GetPosition() Vector3
- func (obj Sprite) GetRotation() Euler
- func (obj Sprite) GetWorldDirection(dst Vector3) Vector3
- func (obj Sprite) GetWorldPosition(dst Vector3) Vector3
- func (obj Sprite) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj Sprite) GetWorldScale(dst Vector3) Vector3
- func (obj Sprite) ID() int
- func (obj Sprite) LocalToWorld(vec Vector3) Vector3
- func (obj Sprite) LookAt(target Vector3)
- func (obj Sprite) LookAtCoords(x, y, z float64)
- func (obj Sprite) Remove(m Object3D)
- func (obj Sprite) RemoveFromParent()
- func (obj Sprite) RotateOnAxis(angle float64, axis Vector3) (this Sprite)
- func (obj Sprite) RotateOnWorldAxis(angle float64, axis Vector3) (this Sprite)
- func (obj Sprite) RotateX(rad float64) (this Sprite)
- func (obj Sprite) RotateY(rad float64) (this Sprite)
- func (obj Sprite) RotateZ(rad float64) (this Sprite)
- func (obj Sprite) SetPosition(v Vector3)
- func (obj Sprite) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj Sprite) SetRotationFromEuler(euler Euler)
- func (obj Sprite) SetRotationFromMatrix(m Matrix4)
- func (obj Sprite) SetRotationFromQuaternion(q Quaternion)
- func (obj Sprite) ToJSON() js.Value
- func (obj Sprite) TranslateOnAxis(distance float64, axis Vector3)
- func (obj Sprite) TranslateX(distance float64)
- func (obj Sprite) TranslateY(distance float64)
- func (obj Sprite) TranslateZ(distance float64)
- func (obj Sprite) UpdateMatrix()
- func (obj Sprite) WorldToLocal(vec Vector3) Vector3
- type SpriteMaterial
- type TextSprite
- func (obj TextSprite) Add(m Object3D)
- func (obj TextSprite) ApplyMatrix4(matrix Matrix4)
- func (obj TextSprite) ApplyQuaternion(q Quaternion)
- func (obj TextSprite) Attach(m Object3D)
- func (obj TextSprite) Clear()
- func (obj TextSprite) Clone(recursive bool) TextSprite
- func (obj TextSprite) Copy(m Object3D, recursive bool) TextSprite
- func (obj TextSprite) GetObjectById(id int) js.Value
- func (obj TextSprite) GetPosition() Vector3
- func (obj TextSprite) GetRotation() Euler
- func (obj TextSprite) GetWorldDirection(dst Vector3) Vector3
- func (obj TextSprite) GetWorldPosition(dst Vector3) Vector3
- func (obj TextSprite) GetWorldQuaternion(dst Quaternion) Quaternion
- func (obj TextSprite) GetWorldScale(dst Vector3) Vector3
- func (obj TextSprite) ID() int
- func (obj TextSprite) LocalToWorld(vec Vector3) Vector3
- func (obj TextSprite) LookAt(target Vector3)
- func (obj TextSprite) LookAtCoords(x, y, z float64)
- func (obj TextSprite) Remove(m Object3D)
- func (obj TextSprite) RemoveFromParent()
- func (obj TextSprite) RotateOnAxis(angle float64, axis Vector3) (this TextSprite)
- func (obj TextSprite) RotateOnWorldAxis(angle float64, axis Vector3) (this TextSprite)
- func (obj TextSprite) RotateX(rad float64) (this TextSprite)
- func (obj TextSprite) RotateY(rad float64) (this TextSprite)
- func (obj TextSprite) RotateZ(rad float64) (this TextSprite)
- func (obj TextSprite) SetPosition(v Vector3)
- func (obj TextSprite) SetRotationFromAxisAngle(angle float64, axis Vector3)
- func (obj TextSprite) SetRotationFromEuler(euler Euler)
- func (obj TextSprite) SetRotationFromMatrix(m Matrix4)
- func (obj TextSprite) SetRotationFromQuaternion(q Quaternion)
- func (obj TextSprite) ToJSON() js.Value
- func (obj TextSprite) TranslateOnAxis(distance float64, axis Vector3)
- func (obj TextSprite) TranslateX(distance float64)
- func (obj TextSprite) TranslateY(distance float64)
- func (obj TextSprite) TranslateZ(distance float64)
- func (obj TextSprite) UpdateMatrix()
- func (obj TextSprite) WorldToLocal(vec Vector3) Vector3
- type TextSpriteMaterial
- type TextSpriteParameters
- type TextTextureParams
- type Texture
- type TextureEncoding
- type TextureFormat
- type TextureLoader
- type TextureParameters
- type TextureType
- type TrackballControls
- func (t TrackballControls) CheckDistances()
- func (t TrackballControls) Dispose()
- func (t TrackballControls) HandleResizes()
- func (t TrackballControls) PanCamera()
- func (t TrackballControls) Reset()
- func (t TrackballControls) RotateCamera()
- func (t TrackballControls) SetMaxDistance(d float64)
- func (t TrackballControls) SetMinDistance(d float64)
- func (t TrackballControls) SetPanSpeed(v float64)
- func (t TrackballControls) SetRotateSpeed(v float64)
- func (t TrackballControls) SetTarget(v Vector3)
- func (t TrackballControls) SetZoomSpeed(v float64)
- func (t TrackballControls) Update()
- func (t TrackballControls) ZoomCamera()
- type Vector2
- type Vector3
- func (v Vector3) Add(a Vector3) (this Vector3)
- func (v Vector3) AddScalar(f float64) (this Vector3)
- func (v Vector3) AddScaledVector(f float64, a Vector3) (this Vector3)
- func (v Vector3) AngleTo(a Vector3) (this Vector3)
- func (v Vector3) ApplyAxisAngle(angle float64, axis Vector3) (this Vector3)
- func (v Vector3) ApplyEuler(euler Euler) (this Vector3)
- func (v Vector3) ApplyQuaternion(q Quaternion) (this Vector3)
- func (v Vector3) Ceil() (this Vector3)
- func (v Vector3) ClampLength(min, max float64) (this Vector3)
- func (v Vector3) ClampScalar(min, max float64) (this Vector3)
- func (v Vector3) Coords() (x, y, z float64)
- func (v Vector3) Cross(a Vector3) (this Vector3)
- func (v Vector3) CrossVectors(a, b Vector3) (this Vector3)
- func (v Vector3) DistanceTo(a Vector3) float64
- func (v Vector3) DistanceToSquared(a Vector3) float64
- func (v Vector3) Divide(a Vector3) (this Vector3)
- func (v Vector3) DivideScalar(f float64) (this Vector3)
- func (v Vector3) Dot(a Vector3) (this Vector3)
- func (v Vector3) Equals(a Vector3) bool
- func (v Vector3) Floor() (this Vector3)
- func (v Vector3) GetComponent(idx int) float64
- func (v Vector3) Length() float64
- func (v Vector3) LengthSq() float64
- func (v Vector3) Lerp(f float64, a Vector3) (this Vector3)
- func (v Vector3) LerpVectors(f float64, a, b Vector3) (this Vector3)
- func (v Vector3) ManhattanDistanceTo(a Vector3) float64
- func (v Vector3) ManhattanLength() float64
- func (v Vector3) Max(a Vector3) (this Vector3)
- func (v Vector3) Min(a Vector3) (this Vector3)
- func (v Vector3) Multiply(a Vector3) (this Vector3)
- func (v Vector3) MultiplyScalar(f float64) (this Vector3)
- func (v Vector3) Negate() (this Vector3)
- func (v Vector3) Normalize() Vector3
- func (v Vector3) Random() Vector3
- func (v Vector3) RandomDirection() Vector3
- func (v Vector3) SetComponent(idx int, f float64)
- func (v Vector3) SetCoords(x, y, z float64) Vector3
- func (v Vector3) SetLength(f float64) Vector3
- func (v Vector3) SetX(x float64) Vector3
- func (v Vector3) SetY(y float64) Vector3
- func (v Vector3) SetZ(z float64) Vector3
- func (v Vector3) Sub(a Vector3) Vector3
- func (v Vector3) SubVectors(a, b Vector3) Vector3
- type WebGLRenderer
- type WebGLRendererParam
- type WrappingMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AmbientLight ¶
type AmbientLight struct { // Position *Vector3 `js:"position"` // MatrixAutoUpdate bool `js:"matrixAutoUpdate"` js.Value }
AmbientLight - a light that gets emitted in a specific direction.
func NewAmbientLight ¶
func NewAmbientLight(color *Color, intensity float64) AmbientLight
func (AmbientLight) Add ¶
func (obj AmbientLight) Add(m Object3D)
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (AmbientLight) ApplyMatrix4 ¶
func (obj AmbientLight) ApplyMatrix4(matrix Matrix4)
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (AmbientLight) ApplyQuaternion ¶
func (obj AmbientLight) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (AmbientLight) Attach ¶
func (obj AmbientLight) Attach(m Object3D)
Attach adds m as a child of this, while maintaining m's world transform.
func (AmbientLight) Clone ¶
func (obj AmbientLight) Clone(recursive bool) AmbientLight
func (AmbientLight) Copy ¶
func (obj AmbientLight) Copy(m Object3D, recursive bool) AmbientLight
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (AmbientLight) GetObjectById ¶
func (obj AmbientLight) GetObjectById(id int) js.Value
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (AmbientLight) GetPosition ¶
func (obj AmbientLight) GetPosition() Vector3
func (AmbientLight) GetRotation ¶
func (obj AmbientLight) GetRotation() Euler
func (AmbientLight) GetWorldDirection ¶
func (obj AmbientLight) GetWorldDirection(dst Vector3) Vector3
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (AmbientLight) GetWorldPosition ¶
func (obj AmbientLight) GetWorldPosition(dst Vector3) Vector3
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (AmbientLight) GetWorldQuaternion ¶
func (obj AmbientLight) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (AmbientLight) GetWorldScale ¶
func (obj AmbientLight) GetWorldScale(dst Vector3) Vector3
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (AmbientLight) ID ¶
func (obj AmbientLight) ID() int
readonly – Unique number for this object instance.
func (AmbientLight) LocalToWorld ¶
func (obj AmbientLight) LocalToWorld(vec Vector3) Vector3
Converts vec from this object's local space to world space.
func (AmbientLight) LookAt ¶
func (obj AmbientLight) LookAt(target Vector3)
Rotates the object to face a point in world space.
func (AmbientLight) LookAtCoords ¶
func (obj AmbientLight) LookAtCoords(x, y, z float64)
Rotates the object to face a point in world space.
func (AmbientLight) Remove ¶
func (obj AmbientLight) Remove(m Object3D)
Remove m as child of this object. An arbitrary number of objects may be removed.
func (AmbientLight) RemoveFromParent ¶
func (obj AmbientLight) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (AmbientLight) RotateOnAxis ¶
func (obj AmbientLight) RotateOnAxis(angle float64, axis Vector3) (this AmbientLight)
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (AmbientLight) RotateOnWorldAxis ¶
func (obj AmbientLight) RotateOnWorldAxis(angle float64, axis Vector3) (this AmbientLight)
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (AmbientLight) RotateX ¶
func (obj AmbientLight) RotateX(rad float64) (this AmbientLight)
RotateX rotates object around x axis in local space.
func (AmbientLight) RotateY ¶
func (obj AmbientLight) RotateY(rad float64) (this AmbientLight)
RotateY rotates object around y axis in local space.
func (AmbientLight) RotateZ ¶
func (obj AmbientLight) RotateZ(rad float64) (this AmbientLight)
RotateZ rotates object around z axis in local space.
func (AmbientLight) SetPosition ¶
func (obj AmbientLight) SetPosition(v Vector3)
func (AmbientLight) SetRotationFromAxisAngle ¶
func (obj AmbientLight) SetRotationFromAxisAngle(angle float64, axis Vector3)
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (AmbientLight) SetRotationFromEuler ¶
func (obj AmbientLight) SetRotationFromEuler(euler Euler)
Calls setRotationFromEuler(euler) on the .quaternion.
func (AmbientLight) SetRotationFromMatrix ¶
func (obj AmbientLight) SetRotationFromMatrix(m Matrix4)
Calls setFromRotationMatrix(m) on the .quaternion.
func (AmbientLight) SetRotationFromQuaternion ¶
func (obj AmbientLight) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (AmbientLight) ToJSON ¶
func (obj AmbientLight) ToJSON() js.Value
func (AmbientLight) TranslateOnAxis ¶
func (obj AmbientLight) TranslateOnAxis(distance float64, axis Vector3)
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (AmbientLight) TranslateX ¶
func (obj AmbientLight) TranslateX(distance float64)
Translates object along x axis in object space by distance units.
func (AmbientLight) TranslateY ¶
func (obj AmbientLight) TranslateY(distance float64)
Translates object along y axis in object space by distance units.
func (AmbientLight) TranslateZ ¶
func (obj AmbientLight) TranslateZ(distance float64)
Translates object along z axis in object space by distance units.
func (AmbientLight) UpdateMatrix ¶
func (obj AmbientLight) UpdateMatrix()
Updates the local transform.
func (AmbientLight) WorldToLocal ¶
func (obj AmbientLight) WorldToLocal(vec Vector3) Vector3
Converts vec from world space to this object's local space. vec represents position in world space.
type ArrowHeadParameters ¶
type ArrowHelper ¶
type ArrowHelper struct { // Origin Vector3 `js:"position"` // Line Line `js:"line"` // // Quaternion Quaternion `js:"quaternion"` // Cone Mesh `js:"cone"` js.Value }
func NewArrowHelper ¶
func NewArrowHelper(params ArrowHelperParameters) ArrowHelper
func (ArrowHelper) Add ¶
func (obj ArrowHelper) Add(m Object3D)
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (ArrowHelper) ApplyMatrix4 ¶
func (obj ArrowHelper) ApplyMatrix4(matrix Matrix4)
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (ArrowHelper) ApplyQuaternion ¶
func (obj ArrowHelper) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (ArrowHelper) Attach ¶
func (obj ArrowHelper) Attach(m Object3D)
Attach adds m as a child of this, while maintaining m's world transform.
func (ArrowHelper) Clone ¶
func (obj ArrowHelper) Clone(recursive bool) ArrowHelper
func (ArrowHelper) Copy ¶
func (obj ArrowHelper) Copy(m Object3D, recursive bool) ArrowHelper
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (ArrowHelper) GetObjectById ¶
func (obj ArrowHelper) GetObjectById(id int) js.Value
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (ArrowHelper) GetPosition ¶
func (obj ArrowHelper) GetPosition() Vector3
func (ArrowHelper) GetRotation ¶
func (obj ArrowHelper) GetRotation() Euler
func (ArrowHelper) GetWorldDirection ¶
func (obj ArrowHelper) GetWorldDirection(dst Vector3) Vector3
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (ArrowHelper) GetWorldPosition ¶
func (obj ArrowHelper) GetWorldPosition(dst Vector3) Vector3
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (ArrowHelper) GetWorldQuaternion ¶
func (obj ArrowHelper) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (ArrowHelper) GetWorldScale ¶
func (obj ArrowHelper) GetWorldScale(dst Vector3) Vector3
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (ArrowHelper) ID ¶
func (obj ArrowHelper) ID() int
readonly – Unique number for this object instance.
func (ArrowHelper) LocalToWorld ¶
func (obj ArrowHelper) LocalToWorld(vec Vector3) Vector3
Converts vec from this object's local space to world space.
func (ArrowHelper) LookAt ¶
func (obj ArrowHelper) LookAt(target Vector3)
Rotates the object to face a point in world space.
func (ArrowHelper) LookAtCoords ¶
func (obj ArrowHelper) LookAtCoords(x, y, z float64)
Rotates the object to face a point in world space.
func (ArrowHelper) Remove ¶
func (obj ArrowHelper) Remove(m Object3D)
Remove m as child of this object. An arbitrary number of objects may be removed.
func (ArrowHelper) RemoveFromParent ¶
func (obj ArrowHelper) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (ArrowHelper) RotateOnAxis ¶
func (obj ArrowHelper) RotateOnAxis(angle float64, axis Vector3) (this ArrowHelper)
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (ArrowHelper) RotateOnWorldAxis ¶
func (obj ArrowHelper) RotateOnWorldAxis(angle float64, axis Vector3) (this ArrowHelper)
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (ArrowHelper) RotateX ¶
func (obj ArrowHelper) RotateX(rad float64) (this ArrowHelper)
RotateX rotates object around x axis in local space.
func (ArrowHelper) RotateY ¶
func (obj ArrowHelper) RotateY(rad float64) (this ArrowHelper)
RotateY rotates object around y axis in local space.
func (ArrowHelper) RotateZ ¶
func (obj ArrowHelper) RotateZ(rad float64) (this ArrowHelper)
RotateZ rotates object around z axis in local space.
func (ArrowHelper) SetColor ¶
func (g ArrowHelper) SetColor(color Color)
func (ArrowHelper) SetDirection ¶
func (g ArrowHelper) SetDirection(dir Vector3)
SetDirection Sets the desired direction. Must be a unit vector.
func (ArrowHelper) SetLength ¶
func (g ArrowHelper) SetLength(length float64, head *ArrowHeadParameters)
func (ArrowHelper) SetPosition ¶
func (obj ArrowHelper) SetPosition(v Vector3)
func (ArrowHelper) SetRotationFromAxisAngle ¶
func (obj ArrowHelper) SetRotationFromAxisAngle(angle float64, axis Vector3)
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (ArrowHelper) SetRotationFromEuler ¶
func (obj ArrowHelper) SetRotationFromEuler(euler Euler)
Calls setRotationFromEuler(euler) on the .quaternion.
func (ArrowHelper) SetRotationFromMatrix ¶
func (obj ArrowHelper) SetRotationFromMatrix(m Matrix4)
Calls setFromRotationMatrix(m) on the .quaternion.
func (ArrowHelper) SetRotationFromQuaternion ¶
func (obj ArrowHelper) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (ArrowHelper) ToJSON ¶
func (obj ArrowHelper) ToJSON() js.Value
func (ArrowHelper) TranslateOnAxis ¶
func (obj ArrowHelper) TranslateOnAxis(distance float64, axis Vector3)
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (ArrowHelper) TranslateX ¶
func (obj ArrowHelper) TranslateX(distance float64)
Translates object along x axis in object space by distance units.
func (ArrowHelper) TranslateY ¶
func (obj ArrowHelper) TranslateY(distance float64)
Translates object along y axis in object space by distance units.
func (ArrowHelper) TranslateZ ¶
func (obj ArrowHelper) TranslateZ(distance float64)
Translates object along z axis in object space by distance units.
func (ArrowHelper) UpdateMatrix ¶
func (obj ArrowHelper) UpdateMatrix()
Updates the local transform.
func (ArrowHelper) WorldToLocal ¶
func (obj ArrowHelper) WorldToLocal(vec Vector3) Vector3
Converts vec from world space to this object's local space. vec represents position in world space.
type ArrowHelperParameters ¶
type ArrowHelperParameters struct { Dir Vector3 Origin Vector3 Length float64 Color *Color ArrowHeadParameters }
type AxesHelper ¶
type AxesHelper struct { // ID int `js:"id"` // Position *Vector3 `js:"position"` // Rotation *Euler `js:"rotation"` // Geometry *BufferGeometry `js:"geometry"` // Material Material `js:"material"` // MatrixAutoUpdate bool `js:"matrixAutoUpdate"` // RenderOrder int `js:"renderOrder"` // Visible bool `js:"visible"` js.Value }
func NewAxesHelper ¶
func NewAxesHelper(size float64) AxesHelper
func (AxesHelper) Add ¶
func (obj AxesHelper) Add(m Object3D)
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (AxesHelper) ApplyMatrix4 ¶
func (obj AxesHelper) ApplyMatrix4(matrix Matrix4)
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (AxesHelper) ApplyQuaternion ¶
func (obj AxesHelper) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (AxesHelper) Attach ¶
func (obj AxesHelper) Attach(m Object3D)
Attach adds m as a child of this, while maintaining m's world transform.
func (AxesHelper) Clone ¶
func (obj AxesHelper) Clone(recursive bool) AxesHelper
func (AxesHelper) Copy ¶
func (obj AxesHelper) Copy(m Object3D, recursive bool) AxesHelper
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (AxesHelper) Dispose ¶
func (g AxesHelper) Dispose()
Disposes of the internally-created material and geometry used by this helper.
func (AxesHelper) GetObjectById ¶
func (obj AxesHelper) GetObjectById(id int) js.Value
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (AxesHelper) GetPosition ¶
func (obj AxesHelper) GetPosition() Vector3
func (AxesHelper) GetRotation ¶
func (obj AxesHelper) GetRotation() Euler
func (AxesHelper) GetWorldDirection ¶
func (obj AxesHelper) GetWorldDirection(dst Vector3) Vector3
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (AxesHelper) GetWorldPosition ¶
func (obj AxesHelper) GetWorldPosition(dst Vector3) Vector3
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (AxesHelper) GetWorldQuaternion ¶
func (obj AxesHelper) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (AxesHelper) GetWorldScale ¶
func (obj AxesHelper) GetWorldScale(dst Vector3) Vector3
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (AxesHelper) ID ¶
func (obj AxesHelper) ID() int
readonly – Unique number for this object instance.
func (AxesHelper) LocalToWorld ¶
func (obj AxesHelper) LocalToWorld(vec Vector3) Vector3
Converts vec from this object's local space to world space.
func (AxesHelper) LookAt ¶
func (obj AxesHelper) LookAt(target Vector3)
Rotates the object to face a point in world space.
func (AxesHelper) LookAtCoords ¶
func (obj AxesHelper) LookAtCoords(x, y, z float64)
Rotates the object to face a point in world space.
func (AxesHelper) Remove ¶
func (obj AxesHelper) Remove(m Object3D)
Remove m as child of this object. An arbitrary number of objects may be removed.
func (AxesHelper) RemoveFromParent ¶
func (obj AxesHelper) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (AxesHelper) RotateOnAxis ¶
func (obj AxesHelper) RotateOnAxis(angle float64, axis Vector3) (this AxesHelper)
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (AxesHelper) RotateOnWorldAxis ¶
func (obj AxesHelper) RotateOnWorldAxis(angle float64, axis Vector3) (this AxesHelper)
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (AxesHelper) RotateX ¶
func (obj AxesHelper) RotateX(rad float64) (this AxesHelper)
RotateX rotates object around x axis in local space.
func (AxesHelper) RotateY ¶
func (obj AxesHelper) RotateY(rad float64) (this AxesHelper)
RotateY rotates object around y axis in local space.
func (AxesHelper) RotateZ ¶
func (obj AxesHelper) RotateZ(rad float64) (this AxesHelper)
RotateZ rotates object around z axis in local space.
func (AxesHelper) SetColors ¶
func (g AxesHelper) SetColors(xaxis, yaxis, zaxis *Color) AxesHelper
func (AxesHelper) SetPosition ¶
func (obj AxesHelper) SetPosition(v Vector3)
func (AxesHelper) SetRotationFromAxisAngle ¶
func (obj AxesHelper) SetRotationFromAxisAngle(angle float64, axis Vector3)
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (AxesHelper) SetRotationFromEuler ¶
func (obj AxesHelper) SetRotationFromEuler(euler Euler)
Calls setRotationFromEuler(euler) on the .quaternion.
func (AxesHelper) SetRotationFromMatrix ¶
func (obj AxesHelper) SetRotationFromMatrix(m Matrix4)
Calls setFromRotationMatrix(m) on the .quaternion.
func (AxesHelper) SetRotationFromQuaternion ¶
func (obj AxesHelper) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (AxesHelper) ToJSON ¶
func (obj AxesHelper) ToJSON() js.Value
func (AxesHelper) TranslateOnAxis ¶
func (obj AxesHelper) TranslateOnAxis(distance float64, axis Vector3)
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (AxesHelper) TranslateX ¶
func (obj AxesHelper) TranslateX(distance float64)
Translates object along x axis in object space by distance units.
func (AxesHelper) TranslateY ¶
func (obj AxesHelper) TranslateY(distance float64)
Translates object along y axis in object space by distance units.
func (AxesHelper) TranslateZ ¶
func (obj AxesHelper) TranslateZ(distance float64)
Translates object along z axis in object space by distance units.
func (AxesHelper) WorldToLocal ¶
func (obj AxesHelper) WorldToLocal(vec Vector3) Vector3
Converts vec from world space to this object's local space. vec represents position in world space.
type BoxGeometry ¶
type BoxGeometry struct { // Width float64 `js:"width"` // Height float64 `js:"height"` // Depth float64 `js:"depth"` // WidthSegments int `js:"widthSegments"` // HeightSegments int `js:"heightSegments"` // DepthSegments int `js:"depthSegments"` js.Value }
BoxGeometry is the quadrilateral primitive geometry class. It is typically used for creating a cube or irregular quadrilateral of the dimensions provided with the 'width', 'height', and 'depth' constructor arguments.
func NewBoxGeometry ¶
func NewBoxGeometry(params BoxGeometryParameters) BoxGeometry
NewBoxGeometry creates a new BoxGeometry.
func (BoxGeometry) ApplyMatrix4 ¶
func (g BoxGeometry) ApplyMatrix4(matrix Matrix4)
func (BoxGeometry) Center ¶
func (g BoxGeometry) Center()
func (BoxGeometry) ComputeBoundingBox ¶
func (g BoxGeometry) ComputeBoundingBox()
func (BoxGeometry) ComputeBoundingSphere ¶
func (g BoxGeometry) ComputeBoundingSphere()
func (BoxGeometry) ComputeFaceNormals ¶
func (g BoxGeometry) ComputeFaceNormals()
func (BoxGeometry) ComputeFlatVertexNormals ¶
func (g BoxGeometry) ComputeFlatVertexNormals()
func (BoxGeometry) ComputeLineDistances ¶
func (g BoxGeometry) ComputeLineDistances()
func (BoxGeometry) ComputeMorphNormals ¶
func (g BoxGeometry) ComputeMorphNormals()
func (BoxGeometry) ComputeVertexNormals ¶
func (g BoxGeometry) ComputeVertexNormals(areaWeighted bool)
func (BoxGeometry) Copy ¶
func (g BoxGeometry) Copy(source Object3D, recursive bool) BoxGeometry
func (BoxGeometry) Dispose ¶
func (g BoxGeometry) Dispose()
func (BoxGeometry) FromBufferGeometry ¶
func (g BoxGeometry) FromBufferGeometry(geometry Geometry)
func (BoxGeometry) LookAt ¶
func (g BoxGeometry) LookAt()
func (BoxGeometry) Merge ¶
func (g BoxGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
func (BoxGeometry) MergeMesh ¶
func (g BoxGeometry) MergeMesh(mesh Mesh)
func (BoxGeometry) MergeVertices ¶
func (g BoxGeometry) MergeVertices()
func (BoxGeometry) Normalize ¶
func (g BoxGeometry) Normalize() BoxGeometry
func (BoxGeometry) RotateX ¶
func (g BoxGeometry) RotateX()
func (BoxGeometry) RotateY ¶
func (g BoxGeometry) RotateY()
func (BoxGeometry) RotateZ ¶
func (g BoxGeometry) RotateZ()
func (BoxGeometry) Scale ¶
func (g BoxGeometry) Scale()
func (BoxGeometry) SortFacesByMaterialIndex ¶
func (g BoxGeometry) SortFacesByMaterialIndex()
func (BoxGeometry) ToJSON ¶
func (g BoxGeometry) ToJSON() js.Value
func (BoxGeometry) Translate ¶
func (g BoxGeometry) Translate()
type BoxGeometryParameters ¶
type BoxGeometryParameters struct { Width float64 Height float64 Depth float64 WidthSegments int HeightSegments int DepthSegments int }
BoxGeometryParameters .
type BufferAttribute ¶
type BufferAttribute struct { // Array []int `js:"array"` // Count int `js:"count"` // IsDynamic bool `js:"dynamic"` // ItemSize int `js:"itemSize"` // NeedsUpdate bool `js:"needsUpdate"` // Normalized bool `js:"normalized"` js.Value }
BufferAttribute stores data for an attribute (such as vertex positions, face indices, normals, colors, UVs, and any custom attributes) associated with a BufferGeometry, which allows for more efficient passing of data to the GPU.
func NewBufferAttribute ¶
func NewBufferAttribute(data []float32, itemSize int) BufferAttribute
NewBufferAttribute creates a new BufferAttribute
func (BufferAttribute) GetX ¶
func (b BufferAttribute) GetX(i int) float64
func (BufferAttribute) SetXYZ ¶
func (b BufferAttribute) SetXYZ(i int, x, y, z float64)
SetXYZ sets the x, y and z components of the vector at the given index.
type BufferGeometry ¶
type BufferGeometry struct { // Vertices []Vector3 `js:"vertices"` // Attributes *BufferAttribute `js:"attributes"` js.Value }
BufferGeometry is an efficient representation of mesh, line, or point geometry. Includes vertex positions, face indices, normals, colors, UVs, and custom attributes within buffers, reducing the cost of passing all this data to the GPU. It's a counterpart of three.js' core/BufferGeometry object.
func NewBufferGeometry ¶
func NewBufferGeometry() BufferGeometry
NewBufferGeometry creates a new Buffer Geometry.
func (BufferGeometry) AddFace ¶
func (bg BufferGeometry) AddFace(a, b, c int)
AddFace adds new Face3 (triangle) to the geometry, specified by its vertice indicies.
func (BufferGeometry) ApplyMatrix4 ¶
func (g BufferGeometry) ApplyMatrix4(matrix Matrix4)
func (BufferGeometry) Center ¶
func (g BufferGeometry) Center()
func (BufferGeometry) ComputeBoundingBox ¶
func (g BufferGeometry) ComputeBoundingBox()
func (BufferGeometry) ComputeBoundingSphere ¶
func (g BufferGeometry) ComputeBoundingSphere()
func (BufferGeometry) ComputeFaceNormals ¶
func (g BufferGeometry) ComputeFaceNormals()
func (BufferGeometry) ComputeFlatVertexNormals ¶
func (g BufferGeometry) ComputeFlatVertexNormals()
func (BufferGeometry) ComputeLineDistances ¶
func (g BufferGeometry) ComputeLineDistances()
func (BufferGeometry) ComputeMorphNormals ¶
func (g BufferGeometry) ComputeMorphNormals()
func (BufferGeometry) ComputeVertexNormals ¶
func (g BufferGeometry) ComputeVertexNormals(areaWeighted bool)
func (BufferGeometry) Copy ¶
func (g BufferGeometry) Copy(source Object3D, recursive bool) BufferGeometry
func (BufferGeometry) Dispose ¶
func (g BufferGeometry) Dispose()
func (BufferGeometry) FromBufferGeometry ¶
func (g BufferGeometry) FromBufferGeometry(geometry Geometry)
func (BufferGeometry) GetAttribute ¶
func (bg BufferGeometry) GetAttribute(name string) BufferAttribute
GetAttribute retruns BufferGeometry's attribute by name (should be added first by AddAttribute call, see threejs docs for explanations.
func (BufferGeometry) LookAt ¶
func (g BufferGeometry) LookAt()
func (BufferGeometry) Merge ¶
func (g BufferGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
func (BufferGeometry) MergeMesh ¶
func (g BufferGeometry) MergeMesh(mesh Mesh)
func (BufferGeometry) MergeVertices ¶
func (g BufferGeometry) MergeVertices()
func (BufferGeometry) Normalize ¶
func (g BufferGeometry) Normalize() BufferGeometry
func (BufferGeometry) RotateX ¶
func (g BufferGeometry) RotateX()
func (BufferGeometry) RotateY ¶
func (g BufferGeometry) RotateY()
func (BufferGeometry) RotateZ ¶
func (g BufferGeometry) RotateZ()
func (BufferGeometry) Scale ¶
func (g BufferGeometry) Scale()
func (BufferGeometry) SetAttribute ¶
func (bg BufferGeometry) SetAttribute(name string, attr BufferAttribute)
AddAttribute adds a new attribute like 'position' to the BufferGeometry.
func (BufferGeometry) SortFacesByMaterialIndex ¶
func (g BufferGeometry) SortFacesByMaterialIndex()
func (BufferGeometry) ToJSON ¶
func (g BufferGeometry) ToJSON() js.Value
func (BufferGeometry) Translate ¶
func (g BufferGeometry) Translate()
type Color ¶
Color - represents a color.
func NewColor ¶
NewColor returns a new three.Color for the given string. It accepts different string color formats:
three.NewColor("rgb(255, 0, 0)") three.NewColor("rgb(100%, 0%, 0%)") three.NewColor("skyblue") // X11 color names (without CamelCase), see three.js source three.NewColor("hsl(0, 100%, 50%)")
See https://threejs.org/docs/#api/en/math/Color for additional details.
func NewColorHex ¶
NewColorHex returns a new three.Color for the given hex integer value. Example:
three.NewColorHex(0xff0000)
func NewColorRGB ¶
NewColorRGB returns a new three.Color for the given RGB values in 0..255 range.
func NewColorRGBFloat ¶
NewColorRGBFloat returns a new three.Color for the given RGB values in 0.0..0.1 range.
func (*Color) GetByteHex ¶
func (*Color) RGBA ¶
RGBA returns the alpha-premultiplied red, green, blue and alpha values for the color. Each value ranges within [0, 0xffff], but is represented by a uint32 so that multiplying by a blend factor up to 0xffff will not overflow.
An alpha-premultiplied color component c has been scaled by alpha (a), so has valid values 0 <= c <= a.
type ConeGeometry ¶
type ConeGeometry struct { // Radius float64 `js:"radius"` // Height float64 `js:"height"` // RadialSegments int `js:"radialSegments"` // HeightSegments int `js:"heightSegments"` // OpenEnded bool `js:"openEnded"` // ThetaStart float64 `js:"thetaStart"` // ThetaLength float64 `js:"thetaLength"` js.Value }
ConeGeometry a class for generating Cone geometries.
func NewConeGeometry ¶
func NewConeGeometry(params ConeGeometryParameters) ConeGeometry
NewConeGeometry creates a new BoxGeometry. Set ThetaLength to NaN to create empty geometry.
func (ConeGeometry) ApplyMatrix4 ¶
func (g ConeGeometry) ApplyMatrix4(matrix Matrix4)
func (ConeGeometry) Center ¶
func (g ConeGeometry) Center()
func (ConeGeometry) ComputeBoundingBox ¶
func (g ConeGeometry) ComputeBoundingBox()
func (ConeGeometry) ComputeBoundingSphere ¶
func (g ConeGeometry) ComputeBoundingSphere()
func (ConeGeometry) ComputeFaceNormals ¶
func (g ConeGeometry) ComputeFaceNormals()
func (ConeGeometry) ComputeFlatVertexNormals ¶
func (g ConeGeometry) ComputeFlatVertexNormals()
func (ConeGeometry) ComputeLineDistances ¶
func (g ConeGeometry) ComputeLineDistances()
func (ConeGeometry) ComputeMorphNormals ¶
func (g ConeGeometry) ComputeMorphNormals()
func (ConeGeometry) ComputeVertexNormals ¶
func (g ConeGeometry) ComputeVertexNormals(areaWeighted bool)
func (ConeGeometry) Copy ¶
func (g ConeGeometry) Copy(source Object3D, recursive bool) ConeGeometry
func (ConeGeometry) Dispose ¶
func (g ConeGeometry) Dispose()
func (ConeGeometry) FromBufferGeometry ¶
func (g ConeGeometry) FromBufferGeometry(geometry Geometry)
func (ConeGeometry) LookAt ¶
func (g ConeGeometry) LookAt()
func (ConeGeometry) Merge ¶
func (g ConeGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
func (ConeGeometry) MergeMesh ¶
func (g ConeGeometry) MergeMesh(mesh Mesh)
func (ConeGeometry) MergeVertices ¶
func (g ConeGeometry) MergeVertices()
func (ConeGeometry) Normalize ¶
func (g ConeGeometry) Normalize() ConeGeometry
func (ConeGeometry) RotateX ¶
func (g ConeGeometry) RotateX()
func (ConeGeometry) RotateY ¶
func (g ConeGeometry) RotateY()
func (ConeGeometry) RotateZ ¶
func (g ConeGeometry) RotateZ()
func (ConeGeometry) Scale ¶
func (g ConeGeometry) Scale()
func (ConeGeometry) SortFacesByMaterialIndex ¶
func (g ConeGeometry) SortFacesByMaterialIndex()
func (ConeGeometry) ToJSON ¶
func (g ConeGeometry) ToJSON() js.Value
func (ConeGeometry) Translate ¶
func (g ConeGeometry) Translate()
type ConeGeometryParameters ¶
type ConeGeometryParameters struct { // Radius of the cone base. Radius float64 // Height of the Cone. Default is 1. Height float64 // Number of segmented faces around the circumference of the Cone. Default is 8 RadialSegments int // Number of rows of faces along the height of the Cone. Default is 1. HeightSegments int // A Boolean indicating whether the ends of the Cone are open or capped. Default is false, meaning capped. OpenEnded bool // Start angle for first segment, default = 0 (three o'clock position). ThetaStart float64 // The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete Cone. ThetaLength float64 }
ConeGeometryParameters .
type CylinderGeometry ¶
type CylinderGeometry struct { // RadiusTop float64 `js:"radiusTop"` // RadiusBottom float64 `js:"radiusBottom"` // Height float64 `js:"height"` // RadialSegments int `js:"radialSegments"` // HeightSegments int `js:"heightSegments"` // OpenEnded bool `js:"openEnded"` // ThetaStart float64 `js:"thetaStart"` // ThetaLength float64 `js:"thetaLength"` js.Value }
CylinderGeometry a class for generating cylinder geometries.
func NewCylinderGeometry ¶
func NewCylinderGeometry(params CylinderGeometryParameters) CylinderGeometry
NewCylinderGeometry creates a new BoxGeometry. Set ThetaLength to NaN to create empty geometry.
func (CylinderGeometry) ApplyMatrix4 ¶
func (g CylinderGeometry) ApplyMatrix4(matrix Matrix4)
func (CylinderGeometry) Center ¶
func (g CylinderGeometry) Center()
func (CylinderGeometry) ComputeBoundingBox ¶
func (g CylinderGeometry) ComputeBoundingBox()
func (CylinderGeometry) ComputeBoundingSphere ¶
func (g CylinderGeometry) ComputeBoundingSphere()
func (CylinderGeometry) ComputeFaceNormals ¶
func (g CylinderGeometry) ComputeFaceNormals()
func (CylinderGeometry) ComputeFlatVertexNormals ¶
func (g CylinderGeometry) ComputeFlatVertexNormals()
func (CylinderGeometry) ComputeLineDistances ¶
func (g CylinderGeometry) ComputeLineDistances()
func (CylinderGeometry) ComputeMorphNormals ¶
func (g CylinderGeometry) ComputeMorphNormals()
func (CylinderGeometry) ComputeVertexNormals ¶
func (g CylinderGeometry) ComputeVertexNormals(areaWeighted bool)
func (CylinderGeometry) Copy ¶
func (g CylinderGeometry) Copy(source Object3D, recursive bool) CylinderGeometry
func (CylinderGeometry) Dispose ¶
func (g CylinderGeometry) Dispose()
func (CylinderGeometry) FromBufferGeometry ¶
func (g CylinderGeometry) FromBufferGeometry(geometry Geometry)
func (CylinderGeometry) LookAt ¶
func (g CylinderGeometry) LookAt()
func (CylinderGeometry) Merge ¶
func (g CylinderGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
func (CylinderGeometry) MergeMesh ¶
func (g CylinderGeometry) MergeMesh(mesh Mesh)
func (CylinderGeometry) MergeVertices ¶
func (g CylinderGeometry) MergeVertices()
func (CylinderGeometry) Normalize ¶
func (g CylinderGeometry) Normalize() CylinderGeometry
func (CylinderGeometry) RotateX ¶
func (g CylinderGeometry) RotateX()
func (CylinderGeometry) RotateY ¶
func (g CylinderGeometry) RotateY()
func (CylinderGeometry) RotateZ ¶
func (g CylinderGeometry) RotateZ()
func (CylinderGeometry) Scale ¶
func (g CylinderGeometry) Scale()
func (CylinderGeometry) SortFacesByMaterialIndex ¶
func (g CylinderGeometry) SortFacesByMaterialIndex()
func (CylinderGeometry) ToJSON ¶
func (g CylinderGeometry) ToJSON() js.Value
func (CylinderGeometry) Translate ¶
func (g CylinderGeometry) Translate()
type CylinderGeometryParameters ¶
type CylinderGeometryParameters struct { RadiusTop float64 // Radius of the cylinder at the bottom. Default is 1. RadiusBottom float64 // Height of the cylinder. Default is 1. Height float64 // Number of segmented faces around the circumference of the cylinder. Default is 8 RadialSegments int // Number of rows of faces along the height of the cylinder. Default is 1. HeightSegments int // A Boolean indicating whether the ends of the cylinder are open or capped. Default is false, meaning capped. OpenEnded bool // Start angle for first segment, default = 0 (three o'clock position). ThetaStart float64 // The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cylinder. ThetaLength float64 }
CylinderGeometryParameters .
type DirectionalLight ¶
type DirectionalLight struct { // Position *Vector3 `js:"position"` // MatrixAutoUpdate bool `js:"matrixAutoUpdate"` js.Value }
DirectionalLight - a light that gets emitted in a specific direction.
func NewDirectionalLight ¶
func NewDirectionalLight(color *Color, intensity float64) DirectionalLight
func (DirectionalLight) Add ¶
func (obj DirectionalLight) Add(m Object3D)
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (DirectionalLight) ApplyMatrix4 ¶
func (obj DirectionalLight) ApplyMatrix4(matrix Matrix4)
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (DirectionalLight) ApplyQuaternion ¶
func (obj DirectionalLight) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (DirectionalLight) Attach ¶
func (obj DirectionalLight) Attach(m Object3D)
Attach adds m as a child of this, while maintaining m's world transform.
func (DirectionalLight) Clear ¶
func (obj DirectionalLight) Clear()
Clear removes all child objects.
func (DirectionalLight) Clone ¶
func (obj DirectionalLight) Clone(recursive bool) DirectionalLight
func (DirectionalLight) Copy ¶
func (obj DirectionalLight) Copy(m Object3D, recursive bool) DirectionalLight
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (DirectionalLight) GetObjectById ¶
func (obj DirectionalLight) GetObjectById(id int) js.Value
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (DirectionalLight) GetPosition ¶
func (obj DirectionalLight) GetPosition() Vector3
func (DirectionalLight) GetRotation ¶
func (obj DirectionalLight) GetRotation() Euler
func (DirectionalLight) GetWorldDirection ¶
func (obj DirectionalLight) GetWorldDirection(dst Vector3) Vector3
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (DirectionalLight) GetWorldPosition ¶
func (obj DirectionalLight) GetWorldPosition(dst Vector3) Vector3
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (DirectionalLight) GetWorldQuaternion ¶
func (obj DirectionalLight) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (DirectionalLight) GetWorldScale ¶
func (obj DirectionalLight) GetWorldScale(dst Vector3) Vector3
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (DirectionalLight) ID ¶
func (obj DirectionalLight) ID() int
readonly – Unique number for this object instance.
func (DirectionalLight) LocalToWorld ¶
func (obj DirectionalLight) LocalToWorld(vec Vector3) Vector3
Converts vec from this object's local space to world space.
func (DirectionalLight) LookAt ¶
func (obj DirectionalLight) LookAt(target Vector3)
Rotates the object to face a point in world space.
func (DirectionalLight) LookAtCoords ¶
func (obj DirectionalLight) LookAtCoords(x, y, z float64)
Rotates the object to face a point in world space.
func (DirectionalLight) Remove ¶
func (obj DirectionalLight) Remove(m Object3D)
Remove m as child of this object. An arbitrary number of objects may be removed.
func (DirectionalLight) RemoveFromParent ¶
func (obj DirectionalLight) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (DirectionalLight) RotateOnAxis ¶
func (obj DirectionalLight) RotateOnAxis(angle float64, axis Vector3) (this DirectionalLight)
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (DirectionalLight) RotateOnWorldAxis ¶
func (obj DirectionalLight) RotateOnWorldAxis(angle float64, axis Vector3) (this DirectionalLight)
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (DirectionalLight) RotateX ¶
func (obj DirectionalLight) RotateX(rad float64) (this DirectionalLight)
RotateX rotates object around x axis in local space.
func (DirectionalLight) RotateY ¶
func (obj DirectionalLight) RotateY(rad float64) (this DirectionalLight)
RotateY rotates object around y axis in local space.
func (DirectionalLight) RotateZ ¶
func (obj DirectionalLight) RotateZ(rad float64) (this DirectionalLight)
RotateZ rotates object around z axis in local space.
func (DirectionalLight) SetPosition ¶
func (obj DirectionalLight) SetPosition(v Vector3)
func (DirectionalLight) SetRotationFromAxisAngle ¶
func (obj DirectionalLight) SetRotationFromAxisAngle(angle float64, axis Vector3)
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (DirectionalLight) SetRotationFromEuler ¶
func (obj DirectionalLight) SetRotationFromEuler(euler Euler)
Calls setRotationFromEuler(euler) on the .quaternion.
func (DirectionalLight) SetRotationFromMatrix ¶
func (obj DirectionalLight) SetRotationFromMatrix(m Matrix4)
Calls setFromRotationMatrix(m) on the .quaternion.
func (DirectionalLight) SetRotationFromQuaternion ¶
func (obj DirectionalLight) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (DirectionalLight) ToJSON ¶
func (obj DirectionalLight) ToJSON() js.Value
func (DirectionalLight) TranslateOnAxis ¶
func (obj DirectionalLight) TranslateOnAxis(distance float64, axis Vector3)
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (DirectionalLight) TranslateX ¶
func (obj DirectionalLight) TranslateX(distance float64)
Translates object along x axis in object space by distance units.
func (DirectionalLight) TranslateY ¶
func (obj DirectionalLight) TranslateY(distance float64)
Translates object along y axis in object space by distance units.
func (DirectionalLight) TranslateZ ¶
func (obj DirectionalLight) TranslateZ(distance float64)
Translates object along z axis in object space by distance units.
func (DirectionalLight) UpdateMatrix ¶
func (obj DirectionalLight) UpdateMatrix()
Updates the local transform.
func (DirectionalLight) WorldToLocal ¶
func (obj DirectionalLight) WorldToLocal(vec Vector3) Vector3
Converts vec from world space to this object's local space. vec represents position in world space.
type Euler ¶
type Euler struct { // X float64 `js:"x"` // Y float64 `js:"y"` // Z float64 `js:"z"` // Order string `js:"order"` js.Value }
Euler angles describe a rotational transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order.
func NewEuler ¶
Three.js uses intrinsic Tait-Bryan angles. This means that rotations are performed with respect to the local coordinate system. That is, for order 'XYZ', the rotation is first around the local-X axis (which is the same as the world-X axis), then around local-Y (which may now be different from the world Y-axis), then local-Z (which may be different from the world Z-axis).
func (Euler) SetFromQuaternion ¶
func (e Euler) SetFromQuaternion(q Quaternion, order string)
type Face3 ¶
Face3 is a triangular face used in Geometry. These are created automatically for all standard geometry types, however if you are building a custom geometry you will have to create them manually.
type Fog ¶
type Fog struct { // Color string `js:"color"` // Near float64 `js:"near"` // Far float64 `js:"far"` js.Value }
func (Fog) Add ¶
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (Fog) ApplyMatrix4 ¶
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (Fog) ApplyQuaternion ¶
func (obj Fog) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (Fog) Copy ¶
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (Fog) GetObjectById ¶
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (Fog) GetPosition ¶
func (Fog) GetRotation ¶
func (Fog) GetWorldDirection ¶
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (Fog) GetWorldPosition ¶
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (Fog) GetWorldQuaternion ¶
func (obj Fog) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (Fog) GetWorldScale ¶
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (Fog) LocalToWorld ¶
Converts vec from this object's local space to world space.
func (Fog) LookAtCoords ¶
Rotates the object to face a point in world space.
func (Fog) Remove ¶
Remove m as child of this object. An arbitrary number of objects may be removed.
func (Fog) RemoveFromParent ¶
func (obj Fog) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (Fog) RotateOnAxis ¶
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (Fog) RotateOnWorldAxis ¶
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (Fog) SetPosition ¶
func (Fog) SetRotationFromAxisAngle ¶
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (Fog) SetRotationFromEuler ¶
Calls setRotationFromEuler(euler) on the .quaternion.
func (Fog) SetRotationFromMatrix ¶
Calls setFromRotationMatrix(m) on the .quaternion.
func (Fog) SetRotationFromQuaternion ¶
func (obj Fog) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (Fog) TranslateOnAxis ¶
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (Fog) TranslateX ¶
Translates object along x axis in object space by distance units.
func (Fog) TranslateY ¶
Translates object along y axis in object space by distance units.
func (Fog) TranslateZ ¶
Translates object along z axis in object space by distance units.
func (Fog) WorldToLocal ¶
Converts vec from world space to this object's local space. vec represents position in world space.
type Geometry ¶
type Geometry interface { ApplyMatrix4(matrix Matrix4) RotateX() RotateY() RotateZ() Translate() Scale() LookAt() FromBufferGeometry(geometry Geometry) Center() // Normalize() ComputeFaceNormals() ComputeVertexNormals(areaWeighted bool) ComputeFlatVertexNormals() ComputeMorphNormals() ComputeLineDistances() ComputeBoundingBox() ComputeBoundingSphere() Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64) MergeMesh(mesh Mesh) MergeVertices() SortFacesByMaterialIndex() ToJSON() js.Value // Clone() // Copy(source Object3D) Dispose() // contains filtered or unexported methods }
type Group ¶
type Group struct { // ID int `js:"id"` // Position *Vector3 `js:"position"` // Rotation *Euler `js:"rotation"` // Children []*js.Object `js:"children"` // MatrixAutoUpdate bool `js:"matrixAutoUpdate"` // Visible bool `js:"visible"` js.Value }
Group is almost identical to an Object3D. Its purpose is to make working with groups of objects syntactically clearer.
func (Group) Add ¶
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (Group) ApplyMatrix4 ¶
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (Group) ApplyQuaternion ¶
func (obj Group) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (Group) Copy ¶
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (Group) GetObjectById ¶
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (Group) GetPosition ¶
func (Group) GetRotation ¶
func (Group) GetWorldDirection ¶
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (Group) GetWorldPosition ¶
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (Group) GetWorldQuaternion ¶
func (obj Group) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (Group) GetWorldScale ¶
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (Group) LocalToWorld ¶
Converts vec from this object's local space to world space.
func (Group) LookAtCoords ¶
Rotates the object to face a point in world space.
func (Group) Remove ¶
Remove m as child of this object. An arbitrary number of objects may be removed.
func (Group) RemoveFromParent ¶
func (obj Group) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (Group) RotateOnAxis ¶
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (Group) RotateOnWorldAxis ¶
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (Group) SetPosition ¶
func (Group) SetRotationFromAxisAngle ¶
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (Group) SetRotationFromEuler ¶
Calls setRotationFromEuler(euler) on the .quaternion.
func (Group) SetRotationFromMatrix ¶
Calls setFromRotationMatrix(m) on the .quaternion.
func (Group) SetRotationFromQuaternion ¶
func (obj Group) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (Group) TranslateOnAxis ¶
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (Group) TranslateX ¶
Translates object along x axis in object space by distance units.
func (Group) TranslateY ¶
Translates object along y axis in object space by distance units.
func (Group) TranslateZ ¶
Translates object along z axis in object space by distance units.
func (Group) WorldToLocal ¶
Converts vec from world space to this object's local space. vec represents position in world space.
type Line ¶
type Line struct { // ID int `js:"id"` // Position *Vector3 `js:"position"` // Rotation *Euler `js:"rotation"` // Geometry *BufferGeometry `js:"geometry"` // Material Material `js:"material"` // MatrixAutoUpdate bool `js:"matrixAutoUpdate"` // RenderOrder int `js:"renderOrder"` js.Value }
Line a continuous line.
func NewLine ¶
NewLine creates a new material. If Material is nil, three.js will assign a randomized material to the line o_O.
func (Line) Add ¶
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (Line) ApplyMatrix4 ¶
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (Line) ApplyQuaternion ¶
func (obj Line) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (Line) Copy ¶
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (Line) GetObjectById ¶
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (Line) GetPosition ¶
func (Line) GetRotation ¶
func (Line) GetWorldDirection ¶
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (Line) GetWorldPosition ¶
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (Line) GetWorldQuaternion ¶
func (obj Line) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (Line) GetWorldScale ¶
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (Line) LocalToWorld ¶
Converts vec from this object's local space to world space.
func (Line) LookAtCoords ¶
Rotates the object to face a point in world space.
func (Line) Raycast ¶
Abstract (empty) method to get intersections between a casted ray and this object. Subclasses such as Mesh, Line, and Points implement this method in order to use raycasting.
func (Line) Remove ¶
Remove m as child of this object. An arbitrary number of objects may be removed.
func (Line) RemoveFromParent ¶
func (obj Line) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (Line) RotateOnAxis ¶
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (Line) RotateOnWorldAxis ¶
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (Line) SetPosition ¶
func (Line) SetRotationFromAxisAngle ¶
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (Line) SetRotationFromEuler ¶
Calls setRotationFromEuler(euler) on the .quaternion.
func (Line) SetRotationFromMatrix ¶
Calls setFromRotationMatrix(m) on the .quaternion.
func (Line) SetRotationFromQuaternion ¶
func (obj Line) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (Line) TranslateOnAxis ¶
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (Line) TranslateX ¶
Translates object along x axis in object space by distance units.
func (Line) TranslateY ¶
Translates object along y axis in object space by distance units.
func (Line) TranslateZ ¶
Translates object along z axis in object space by distance units.
func (Line) WorldToLocal ¶
Converts vec from world space to this object's local space. vec represents position in world space.
type LineBasicMaterial ¶
func NewLineBasicMaterial ¶
func NewLineBasicMaterial(params *MaterialParameters) LineBasicMaterial
func (LineBasicMaterial) Clone ¶
func (m LineBasicMaterial) Clone()
func (LineBasicMaterial) Copy ¶
func (m LineBasicMaterial) Copy(source Object3D)
func (LineBasicMaterial) Dispose ¶
func (m LineBasicMaterial) Dispose()
func (LineBasicMaterial) OnBeforeCompile ¶
func (m LineBasicMaterial) OnBeforeCompile()
func (LineBasicMaterial) SetValues ¶
func (m LineBasicMaterial) SetValues(values *MaterialParameters)
func (LineBasicMaterial) ToJSON ¶
func (m LineBasicMaterial) ToJSON(meta interface{}) js.Value
type LineSegments ¶
type LineSegments struct { // ID int `js:"id"` // Position *Vector3 `js:"position"` // Rotation *Euler `js:"rotation"` // Geometry *BufferGeometry `js:"geometry"` // Material Material `js:"material"` // MatrixAutoUpdate bool `js:"matrixAutoUpdate"` // RenderOrder int `js:"renderOrder"` // Visible bool `js:"visible"` js.Value }
LineSegments represents series of lines drawn between pairs of vertices.
func NewLineSegments ¶
func NewLineSegments(geom Geometry, material Material) LineSegments
NewLineSegments creates new line segments
func (LineSegments) Add ¶
func (obj LineSegments) Add(m Object3D)
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (LineSegments) ApplyMatrix4 ¶
func (obj LineSegments) ApplyMatrix4(matrix Matrix4)
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (LineSegments) ApplyQuaternion ¶
func (obj LineSegments) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (LineSegments) Attach ¶
func (obj LineSegments) Attach(m Object3D)
Attach adds m as a child of this, while maintaining m's world transform.
func (LineSegments) Clone ¶
func (obj LineSegments) Clone(recursive bool) LineSegments
func (LineSegments) Copy ¶
func (obj LineSegments) Copy(m Object3D, recursive bool) LineSegments
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (LineSegments) GetObjectById ¶
func (obj LineSegments) GetObjectById(id int) js.Value
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (LineSegments) GetPosition ¶
func (obj LineSegments) GetPosition() Vector3
func (LineSegments) GetRotation ¶
func (obj LineSegments) GetRotation() Euler
func (LineSegments) GetWorldDirection ¶
func (obj LineSegments) GetWorldDirection(dst Vector3) Vector3
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (LineSegments) GetWorldPosition ¶
func (obj LineSegments) GetWorldPosition(dst Vector3) Vector3
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (LineSegments) GetWorldQuaternion ¶
func (obj LineSegments) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (LineSegments) GetWorldScale ¶
func (obj LineSegments) GetWorldScale(dst Vector3) Vector3
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (LineSegments) ID ¶
func (obj LineSegments) ID() int
readonly – Unique number for this object instance.
func (LineSegments) LocalToWorld ¶
func (obj LineSegments) LocalToWorld(vec Vector3) Vector3
Converts vec from this object's local space to world space.
func (LineSegments) LookAt ¶
func (obj LineSegments) LookAt(target Vector3)
Rotates the object to face a point in world space.
func (LineSegments) LookAtCoords ¶
func (obj LineSegments) LookAtCoords(x, y, z float64)
Rotates the object to face a point in world space.
func (LineSegments) Remove ¶
func (obj LineSegments) Remove(m Object3D)
Remove m as child of this object. An arbitrary number of objects may be removed.
func (LineSegments) RemoveFromParent ¶
func (obj LineSegments) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (LineSegments) RotateOnAxis ¶
func (obj LineSegments) RotateOnAxis(angle float64, axis Vector3) (this LineSegments)
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (LineSegments) RotateOnWorldAxis ¶
func (obj LineSegments) RotateOnWorldAxis(angle float64, axis Vector3) (this LineSegments)
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (LineSegments) RotateX ¶
func (obj LineSegments) RotateX(rad float64) (this LineSegments)
RotateX rotates object around x axis in local space.
func (LineSegments) RotateY ¶
func (obj LineSegments) RotateY(rad float64) (this LineSegments)
RotateY rotates object around y axis in local space.
func (LineSegments) RotateZ ¶
func (obj LineSegments) RotateZ(rad float64) (this LineSegments)
RotateZ rotates object around z axis in local space.
func (LineSegments) SetPosition ¶
func (obj LineSegments) SetPosition(v Vector3)
func (LineSegments) SetRotationFromAxisAngle ¶
func (obj LineSegments) SetRotationFromAxisAngle(angle float64, axis Vector3)
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (LineSegments) SetRotationFromEuler ¶
func (obj LineSegments) SetRotationFromEuler(euler Euler)
Calls setRotationFromEuler(euler) on the .quaternion.
func (LineSegments) SetRotationFromMatrix ¶
func (obj LineSegments) SetRotationFromMatrix(m Matrix4)
Calls setFromRotationMatrix(m) on the .quaternion.
func (LineSegments) SetRotationFromQuaternion ¶
func (obj LineSegments) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (LineSegments) ToJSON ¶
func (obj LineSegments) ToJSON() js.Value
func (LineSegments) TranslateOnAxis ¶
func (obj LineSegments) TranslateOnAxis(distance float64, axis Vector3)
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (LineSegments) TranslateX ¶
func (obj LineSegments) TranslateX(distance float64)
Translates object along x axis in object space by distance units.
func (LineSegments) TranslateY ¶
func (obj LineSegments) TranslateY(distance float64)
Translates object along y axis in object space by distance units.
func (LineSegments) TranslateZ ¶
func (obj LineSegments) TranslateZ(distance float64)
Translates object along z axis in object space by distance units.
func (LineSegments) UpdateMatrix ¶
func (obj LineSegments) UpdateMatrix()
Updates the local transform.
func (LineSegments) WorldToLocal ¶
func (obj LineSegments) WorldToLocal(vec Vector3) Vector3
Converts vec from world space to this object's local space. vec represents position in world space.
type MappingMode ¶
type MappingMode int
const ( UVMapping MappingMode = iota + 300 CubeReflectionMapping CubeRefractionMapping EquirectangularReflectionMapping EquirectangularRefractionMapping CubeUVReflectionMapping MappingMode = 306 CubeUVRefractionMapping MappingMode = 307 )
These define the texture's mapping mode. UVMapping is the default, and maps the texture using the mesh's UV coordinates. The rest define environment mapping types.
type Material ¶
type Material interface { OnBeforeCompile() SetValues(values *MaterialParameters) ToJSON(meta interface{}) js.Value Clone() Copy(source Object3D) Dispose() // contains filtered or unexported methods }
type MaterialParameters ¶
type MaterialParameters struct { Color *Color `js:"color"` Shading Shading `js:"shading"` // THREE.MeshLambertMaterial: .shading has been removed. Use the boolean .flatShading instead. FlatShading bool `js:"flatShading"` Side Side `js:"side"` Transparent bool `js:"transparent"` Opacity float64 `js:"opacity"` Map *Texture `js:"map"` LineWidth float64 `js:"linewidth"` // Points Size float64 `js:"size"` BumpMap *Texture `js:"bumpMap"` BumpScale float64 `js:"bumpScale"` SpecularMap *Texture `js:"specularMap"` Specular *Color `js:"specular"` Clearcoat float64 `js:"clearcoat"` ClearcoatMap *Texture `js:"clearcoatMap"` ClearcoatNormalMap *Texture `js:"clearcoatNormalMap"` ClearcoatNormalScale Vector2 `js:"clearcoatNormalScale"` ClearcoatRoughness float64 `js:"clearcoatRoughness"` ClearcoatRoughnessMap *Texture `js:"clearcoatRoughnessMap"` // Index of refraction IOR float64 `js:"ior"` Reflectivity float64 `js:"reflectivity"` Sheen float64 `js:"sheen"` SheenRoughness float64 `js:"sheenRoughness"` SheenRoughnessMap *Texture `js:"sheenRoughnessMap"` SheenColor *Color `js:"sheenColor"` SheenColorMap *Texture `js:"sheenColorMap"` Transmission float64 `js:"transmission"` TransmissionMap *Texture `js:"transmissionMap"` }
type Matrix4 ¶
Matrix4 - represents a Matrix4.
func NewMatrix4 ¶
func NewMatrix4() Matrix4
func (Matrix4) Compose ¶
func (m Matrix4) Compose(scale, position Vector3, q Quaternion) (this Matrix4)
Sets this matrix to the transformation composed of position, quaternion and scale.
func (Matrix4) Decompose ¶
func (m Matrix4) Decompose(scale, position Vector3, q Quaternion)
Decomposes this matrix into its position, quaternion and scale components. Note: Not all matrices are decomposable in this way. For example, if an object has a non-uniformly scaled parent, then the object's world matrix may not be decomposable, and this method may not be appropriate.
func (Matrix4) Determinant ¶
http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm
func (Matrix4) ExtractBasis ¶
Extracts the basis of this matrix into the three axis vectors provided. If this matrix is:
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p
then x,y,z will be set:
x = (a, e, i) y = (b, f, j) z = (c, g, k)
func (Matrix4) ExtractRotation ¶
func (Matrix4) Invert ¶
Inverts this matrix, using the analytic method. You can not invert with a determinant of zero. If you attempt this, the method produces a zero matrix instead.
func (Matrix4) MakeBasis ¶
Set this to the basis matrix consisting of the three provided basis vectors:
xAxis.x, yAxis.x, zAxis.x, 0, xAxis.y, yAxis.y, zAxis.y, 0, xAxis.z, yAxis.z, zAxis.z, 0, 0, 0, 0, 1
func (Matrix4) MakeRotationFromQuaternion ¶
func (m Matrix4) MakeRotationFromQuaternion(q Quaternion) (this Matrix4)
Sets the rotation component of this matrix to the rotation specified by q, as outlined here. The rest of the matrix is set to the identity. So, given q = w + xi + yj + zk, the resulting matrix will be:
1-2y²-2z² 2xy-2zw 2xz+2yw 0 2xy+2zw 1-2x²-2z² 2yz-2xw 0 2xz-2yw 2yz+2xw 1-2x²-2y² 0 0 0 0 1
func (Matrix4) MakeTranslation ¶
Sets this matrix as a translation transform:
1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1
type Mesh ¶
type Mesh struct { // ID int `js:"id"` // Position *Vector3 `js:"position"` // Rotation *Euler `js:"rotation"` // Geometry Geometry `js:"geometry"` // Material Material `js:"material"` // MatrixAutoUpdate bool `js:"matrixAutoUpdate"` js.Value }
func (Mesh) Add ¶
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (Mesh) ApplyMatrix4 ¶
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (Mesh) ApplyQuaternion ¶
func (obj Mesh) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (Mesh) Copy ¶
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (Mesh) GetObjectById ¶
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (Mesh) GetPosition ¶
func (Mesh) GetRotation ¶
func (Mesh) GetWorldDirection ¶
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (Mesh) GetWorldPosition ¶
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (Mesh) GetWorldQuaternion ¶
func (obj Mesh) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (Mesh) GetWorldScale ¶
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (Mesh) LocalToWorld ¶
Converts vec from this object's local space to world space.
func (Mesh) LookAtCoords ¶
Rotates the object to face a point in world space.
func (Mesh) Raycast ¶
Abstract (empty) method to get intersections between a casted ray and this object. Subclasses such as Mesh, Line, and Points implement this method in order to use raycasting.
func (Mesh) Remove ¶
Remove m as child of this object. An arbitrary number of objects may be removed.
func (Mesh) RemoveFromParent ¶
func (obj Mesh) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (Mesh) RotateOnAxis ¶
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (Mesh) RotateOnWorldAxis ¶
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (Mesh) SetPosition ¶
func (Mesh) SetRotationFromAxisAngle ¶
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (Mesh) SetRotationFromEuler ¶
Calls setRotationFromEuler(euler) on the .quaternion.
func (Mesh) SetRotationFromMatrix ¶
Calls setFromRotationMatrix(m) on the .quaternion.
func (Mesh) SetRotationFromQuaternion ¶
func (obj Mesh) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (Mesh) TranslateOnAxis ¶
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (Mesh) TranslateX ¶
Translates object along x axis in object space by distance units.
func (Mesh) TranslateY ¶
Translates object along y axis in object space by distance units.
func (Mesh) TranslateZ ¶
Translates object along z axis in object space by distance units.
func (Mesh) WorldToLocal ¶
Converts vec from world space to this object's local space. vec represents position in world space.
type MeshBasicMaterial ¶
func NewMeshBasicMaterial ¶
func NewMeshBasicMaterial(params *MaterialParameters) MeshBasicMaterial
func NewMeshPhysicalMaterial ¶
func NewMeshPhysicalMaterial(params *MaterialParameters) MeshBasicMaterial
func (MeshBasicMaterial) Clone ¶
func (m MeshBasicMaterial) Clone()
func (MeshBasicMaterial) Copy ¶
func (m MeshBasicMaterial) Copy(source Object3D)
func (MeshBasicMaterial) Dispose ¶
func (m MeshBasicMaterial) Dispose()
func (MeshBasicMaterial) OnBeforeCompile ¶
func (m MeshBasicMaterial) OnBeforeCompile()
func (MeshBasicMaterial) SetValues ¶
func (m MeshBasicMaterial) SetValues(values *MaterialParameters)
func (MeshBasicMaterial) ToJSON ¶
func (m MeshBasicMaterial) ToJSON(meta interface{}) js.Value
type MeshLambertMaterial ¶
func NewMeshLambertMaterial ¶
func NewMeshLambertMaterial(params *MaterialParameters) MeshLambertMaterial
func (MeshLambertMaterial) Clone ¶
func (m MeshLambertMaterial) Clone()
func (MeshLambertMaterial) Copy ¶
func (m MeshLambertMaterial) Copy(source Object3D)
func (MeshLambertMaterial) Dispose ¶
func (m MeshLambertMaterial) Dispose()
func (MeshLambertMaterial) OnBeforeCompile ¶
func (m MeshLambertMaterial) OnBeforeCompile()
func (MeshLambertMaterial) SetValues ¶
func (m MeshLambertMaterial) SetValues(values *MaterialParameters)
func (MeshLambertMaterial) ToJSON ¶
func (m MeshLambertMaterial) ToJSON(meta interface{}) js.Value
type MeshPhongMaterial ¶
type MeshPhongMaterial struct { // BumpMap *Texture `js:"bumpMap"` // BumpScale float64 `js:"bumpScale"` // SpecularMap *Texture `js:"specularMap"` // Specular *Color `js:"specular"` js.Value }
func NewMeshPhongMaterial ¶
func NewMeshPhongMaterial(params *MaterialParameters) MeshPhongMaterial
func (MeshPhongMaterial) Clone ¶
func (m MeshPhongMaterial) Clone()
func (MeshPhongMaterial) Copy ¶
func (m MeshPhongMaterial) Copy(source Object3D)
func (MeshPhongMaterial) Dispose ¶
func (m MeshPhongMaterial) Dispose()
func (MeshPhongMaterial) OnBeforeCompile ¶
func (m MeshPhongMaterial) OnBeforeCompile()
func (MeshPhongMaterial) SetValues ¶
func (m MeshPhongMaterial) SetValues(values *MaterialParameters)
func (MeshPhongMaterial) ToJSON ¶
func (m MeshPhongMaterial) ToJSON(meta interface{}) js.Value
type MeshPhysicalMaterial ¶
type MeshPhysicalMaterial struct { // Clearcoat float64 `js:"clearcoat"` // ClearcoatMap *Texture `js:"clearcoatMap"` // ClearcoatNormalMap *Texture `js:"clearcoatNormalMap"` // ClearcoatNormalScale Vector2 `js:"clearcoatNormalScale"` // ClearcoatRoughness float64 `js:"clearcoatRoughness"` // ClearcoatRoughnessMap *Texture `js:"clearcoatRoughnessMap"` // IOR float64 `js:"ior"` // Index of refraction // Reflectivity float64 `js:"reflectivity"` // Sheen float64 `js:"sheen"` // SheenRoughness float64 `js:"sheenRoughness"` // SheenRoughnessMap *Texture `js:"sheenRoughnessMap"` // SheenColor *Color `js:"sheenColor"` // SheenColorMap *Texture `js:"sheenColorMap"` // Transmission float64 `js:"transmission"` // TransmissionMap *Texture `js:"transmissionMap"` js.Value }
func (MeshPhysicalMaterial) Clone ¶
func (m MeshPhysicalMaterial) Clone()
func (MeshPhysicalMaterial) Copy ¶
func (m MeshPhysicalMaterial) Copy(source Object3D)
func (MeshPhysicalMaterial) Dispose ¶
func (m MeshPhysicalMaterial) Dispose()
func (MeshPhysicalMaterial) OnBeforeCompile ¶
func (m MeshPhysicalMaterial) OnBeforeCompile()
func (MeshPhysicalMaterial) SetValues ¶
func (m MeshPhysicalMaterial) SetValues(values *MaterialParameters)
func (MeshPhysicalMaterial) ToJSON ¶
func (m MeshPhysicalMaterial) ToJSON(meta interface{}) js.Value
type MinMagFilter ¶
type MinMagFilter int
const ( NearestFilter MinMagFilter = iota + 1003 NearestMipmapNearestFilter NearestMipmapLinearFilter LinearFilter LinearMipmapNearestFilter LinearMipmapLinearFilter )
For use with a texture's minFilter (and magfilter) property, these define the texture minifying function that is used whenever the pixel being textured maps to an area greater than one texture element (texel).
type PerspectiveCamera ¶
type PerspectiveCamera struct { // Use Set method to set up vector. // Up Vector3 `js:"up"` // Position Vector3 `js:"position"` // MatrixAutoUpdate bool `js:"matrixAutoUpdate"` // Aspect float64 `js:"aspect"` js.Value }
func NewPerspectiveCamera ¶
func NewPerspectiveCamera(fov, aspect, near, far float64) PerspectiveCamera
func (PerspectiveCamera) Add ¶
func (obj PerspectiveCamera) Add(m Object3D)
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (PerspectiveCamera) ApplyMatrix4 ¶
func (obj PerspectiveCamera) ApplyMatrix4(matrix Matrix4)
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (PerspectiveCamera) ApplyQuaternion ¶
func (obj PerspectiveCamera) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (PerspectiveCamera) Attach ¶
func (obj PerspectiveCamera) Attach(m Object3D)
Attach adds m as a child of this, while maintaining m's world transform.
func (PerspectiveCamera) Clear ¶
func (obj PerspectiveCamera) Clear()
Clear removes all child objects.
func (PerspectiveCamera) ClearViewOffset ¶
func (c PerspectiveCamera) ClearViewOffset()
func (PerspectiveCamera) Clone ¶
func (obj PerspectiveCamera) Clone(recursive bool) PerspectiveCamera
func (PerspectiveCamera) Copy ¶
func (obj PerspectiveCamera) Copy(m Object3D, recursive bool) PerspectiveCamera
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (PerspectiveCamera) GetAspect ¶
func (obj PerspectiveCamera) GetAspect() float64
GetAspect gets the camera aspect ratio. Usually the canvas width/canvas height.
func (PerspectiveCamera) GetEffectiveFOV ¶
func (c PerspectiveCamera) GetEffectiveFOV() float64
func (PerspectiveCamera) GetFOV ¶
func (obj PerspectiveCamera) GetFOV() float64
GetFOV gets Camera frustum vertical field of view, from bottom to top of view, in degrees.
func (PerspectiveCamera) GetFar ¶
func (obj PerspectiveCamera) GetFar() float64
GetFar gets frustum far plane. Default is 2000.
func (PerspectiveCamera) GetFilmHeight ¶
func (c PerspectiveCamera) GetFilmHeight() float64
func (PerspectiveCamera) GetFilmWidth ¶
func (c PerspectiveCamera) GetFilmWidth() float64
func (PerspectiveCamera) GetFocalLength ¶
func (c PerspectiveCamera) GetFocalLength() float64
func (PerspectiveCamera) GetNear ¶
func (obj PerspectiveCamera) GetNear() float64
GetNear gets frustum near plane. Default is 0.1.
func (PerspectiveCamera) GetObjectById ¶
func (obj PerspectiveCamera) GetObjectById(id int) js.Value
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (PerspectiveCamera) GetPosition ¶
func (obj PerspectiveCamera) GetPosition() Vector3
func (PerspectiveCamera) GetRotation ¶
func (obj PerspectiveCamera) GetRotation() Euler
func (PerspectiveCamera) GetUp ¶
func (obj PerspectiveCamera) GetUp() Vector3
GetUp gets the up direction for the camera.
func (PerspectiveCamera) GetWorldDirection ¶
func (obj PerspectiveCamera) GetWorldDirection(dst Vector3) Vector3
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (PerspectiveCamera) GetWorldPosition ¶
func (obj PerspectiveCamera) GetWorldPosition(dst Vector3) Vector3
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (PerspectiveCamera) GetWorldQuaternion ¶
func (obj PerspectiveCamera) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (PerspectiveCamera) GetWorldScale ¶
func (obj PerspectiveCamera) GetWorldScale(dst Vector3) Vector3
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (PerspectiveCamera) GetZoom ¶
func (obj PerspectiveCamera) GetZoom() float64
GetZoom gets the zoom factor of the camera.
func (PerspectiveCamera) ID ¶
func (obj PerspectiveCamera) ID() int
readonly – Unique number for this object instance.
func (PerspectiveCamera) LocalToWorld ¶
func (obj PerspectiveCamera) LocalToWorld(vec Vector3) Vector3
Converts vec from this object's local space to world space.
func (PerspectiveCamera) LookAt ¶
func (obj PerspectiveCamera) LookAt(target Vector3)
Rotates the object to face a point in world space.
func (PerspectiveCamera) LookAtCoords ¶
func (obj PerspectiveCamera) LookAtCoords(x, y, z float64)
Rotates the object to face a point in world space.
func (PerspectiveCamera) Remove ¶
func (obj PerspectiveCamera) Remove(m Object3D)
Remove m as child of this object. An arbitrary number of objects may be removed.
func (PerspectiveCamera) RemoveFromParent ¶
func (obj PerspectiveCamera) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (PerspectiveCamera) RotateOnAxis ¶
func (obj PerspectiveCamera) RotateOnAxis(angle float64, axis Vector3) (this PerspectiveCamera)
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (PerspectiveCamera) RotateOnWorldAxis ¶
func (obj PerspectiveCamera) RotateOnWorldAxis(angle float64, axis Vector3) (this PerspectiveCamera)
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (PerspectiveCamera) RotateX ¶
func (obj PerspectiveCamera) RotateX(rad float64) (this PerspectiveCamera)
RotateX rotates object around x axis in local space.
func (PerspectiveCamera) RotateY ¶
func (obj PerspectiveCamera) RotateY(rad float64) (this PerspectiveCamera)
RotateY rotates object around y axis in local space.
func (PerspectiveCamera) RotateZ ¶
func (obj PerspectiveCamera) RotateZ(rad float64) (this PerspectiveCamera)
RotateZ rotates object around z axis in local space.
func (PerspectiveCamera) SetAspect ¶
func (obj PerspectiveCamera) SetAspect(ratio float64)
SetAspect sets the camera aspect ratio. Usually the canvas width/canvas height. Needs call to UpdateProjectionMatrix to take effect.
func (PerspectiveCamera) SetFOV ¶
func (obj PerspectiveCamera) SetFOV(fov float64)
SetFOV sets Camera frustum vertical field of view, from bottom to top of view, in degrees. Needs call to UpdateProjectionMatrix to take effect.
func (PerspectiveCamera) SetFar ¶
func (obj PerspectiveCamera) SetFar(far float64)
SetFar sets frustum far plane. Default is 2000. Needs call to UpdateProjectionMatrix to take effect.
func (PerspectiveCamera) SetFocalLength ¶
func (c PerspectiveCamera) SetFocalLength(focalLength float64)
func (PerspectiveCamera) SetNear ¶
func (obj PerspectiveCamera) SetNear(near float64)
SetNear sets frustum near plane. Default is 0.1. Needs call to UpdateProjectionMatrix to take effect.
func (PerspectiveCamera) SetPosition ¶
func (obj PerspectiveCamera) SetPosition(v Vector3)
func (PerspectiveCamera) SetRotationFromAxisAngle ¶
func (obj PerspectiveCamera) SetRotationFromAxisAngle(angle float64, axis Vector3)
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (PerspectiveCamera) SetRotationFromEuler ¶
func (obj PerspectiveCamera) SetRotationFromEuler(euler Euler)
Calls setRotationFromEuler(euler) on the .quaternion.
func (PerspectiveCamera) SetRotationFromMatrix ¶
func (obj PerspectiveCamera) SetRotationFromMatrix(m Matrix4)
Calls setFromRotationMatrix(m) on the .quaternion.
func (PerspectiveCamera) SetRotationFromQuaternion ¶
func (obj PerspectiveCamera) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (PerspectiveCamera) SetUp ¶
func (obj PerspectiveCamera) SetUp(v Vector3)
SetUp sets the up direction for the camera.
It is the equivalent to c.Up.Set(v.X, v.Y, v.Z)
func (PerspectiveCamera) SetViewOffset ¶
func (c PerspectiveCamera) SetViewOffset(fullWidth, fullHeight, x, y, width, height float64)
func (PerspectiveCamera) SetZoom ¶
func (obj PerspectiveCamera) SetZoom(zoom float64)
Sets the zoom factor of the camera. Needs call to UpdateProjectionMatrix to take effect.
func (PerspectiveCamera) ToJSON ¶
func (obj PerspectiveCamera) ToJSON() js.Value
func (PerspectiveCamera) TranslateOnAxis ¶
func (obj PerspectiveCamera) TranslateOnAxis(distance float64, axis Vector3)
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (PerspectiveCamera) TranslateX ¶
func (obj PerspectiveCamera) TranslateX(distance float64)
Translates object along x axis in object space by distance units.
func (PerspectiveCamera) TranslateY ¶
func (obj PerspectiveCamera) TranslateY(distance float64)
Translates object along y axis in object space by distance units.
func (PerspectiveCamera) TranslateZ ¶
func (obj PerspectiveCamera) TranslateZ(distance float64)
Translates object along z axis in object space by distance units.
func (PerspectiveCamera) UpdateMatrix ¶
func (obj PerspectiveCamera) UpdateMatrix()
Updates the local transform.
func (PerspectiveCamera) UpdateProjectionMatrix ¶
func (c PerspectiveCamera) UpdateProjectionMatrix()
func (PerspectiveCamera) WorldToLocal ¶
func (obj PerspectiveCamera) WorldToLocal(vec Vector3) Vector3
Converts vec from world space to this object's local space. vec represents position in world space.
type Points ¶
type Points struct { // ID int `js:"id"` // Position *Vector3 `js:"position"` // Geometry *BufferGeometry `js:"geometry"` // Material Material `js:"material"` js.Value }
A class for displaying points. The points are rendered by the WebGLRenderer using gl.POINTS.
func NewPoints ¶
NewLine creates a new material. If Material is nil, three.js will assign a randomized material to the line o_O.
func (Points) Add ¶
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (Points) ApplyMatrix4 ¶
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (Points) ApplyQuaternion ¶
func (obj Points) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (Points) Copy ¶
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (Points) GetObjectById ¶
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (Points) GetPosition ¶
func (Points) GetRotation ¶
func (Points) GetWorldDirection ¶
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (Points) GetWorldPosition ¶
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (Points) GetWorldQuaternion ¶
func (obj Points) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (Points) GetWorldScale ¶
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (Points) LocalToWorld ¶
Converts vec from this object's local space to world space.
func (Points) LookAtCoords ¶
Rotates the object to face a point in world space.
func (*Points) Raycast ¶
Get intersections between a casted ray and this Points. Raycaster.intersectObject will call this method.
func (Points) Remove ¶
Remove m as child of this object. An arbitrary number of objects may be removed.
func (Points) RemoveFromParent ¶
func (obj Points) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (Points) RotateOnAxis ¶
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (Points) RotateOnWorldAxis ¶
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (Points) SetPosition ¶
func (Points) SetRotationFromAxisAngle ¶
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (Points) SetRotationFromEuler ¶
Calls setRotationFromEuler(euler) on the .quaternion.
func (Points) SetRotationFromMatrix ¶
Calls setFromRotationMatrix(m) on the .quaternion.
func (Points) SetRotationFromQuaternion ¶
func (obj Points) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (Points) TranslateOnAxis ¶
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (Points) TranslateX ¶
Translates object along x axis in object space by distance units.
func (Points) TranslateY ¶
Translates object along y axis in object space by distance units.
func (Points) TranslateZ ¶
Translates object along z axis in object space by distance units.
func (Points) WorldToLocal ¶
Converts vec from world space to this object's local space. vec represents position in world space.
type PointsMaterial ¶
func NewPointsMaterial ¶
func NewPointsMaterial(params MaterialParameters) PointsMaterial
func (PointsMaterial) Clone ¶
func (m PointsMaterial) Clone()
func (PointsMaterial) Copy ¶
func (m PointsMaterial) Copy(source Object3D)
func (PointsMaterial) Dispose ¶
func (m PointsMaterial) Dispose()
func (PointsMaterial) OnBeforeCompile ¶
func (m PointsMaterial) OnBeforeCompile()
func (PointsMaterial) SetValues ¶
func (m PointsMaterial) SetValues(values *MaterialParameters)
func (PointsMaterial) ToJSON ¶
func (m PointsMaterial) ToJSON(meta interface{}) js.Value
type PolarGridHelper ¶
type PolarGridHelper struct { // ID int `js:"id"` // Position *Vector3 `js:"position"` // Rotation *Euler `js:"rotation"` // Geometry *BufferGeometry `js:"geometry"` // Material Material `js:"material"` // MatrixAutoUpdate bool `js:"matrixAutoUpdate"` // RenderOrder int `js:"renderOrder"` // Visible bool `js:"visible"` js.Value }
func NewPolarGridHelper ¶
func NewPolarGridHelper(params PolarGridHelperParameters) PolarGridHelper
func (PolarGridHelper) Add ¶
func (obj PolarGridHelper) Add(m Object3D)
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (PolarGridHelper) ApplyMatrix4 ¶
func (obj PolarGridHelper) ApplyMatrix4(matrix Matrix4)
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (PolarGridHelper) ApplyQuaternion ¶
func (obj PolarGridHelper) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (PolarGridHelper) Attach ¶
func (obj PolarGridHelper) Attach(m Object3D)
Attach adds m as a child of this, while maintaining m's world transform.
func (PolarGridHelper) Clone ¶
func (obj PolarGridHelper) Clone(recursive bool) PolarGridHelper
func (PolarGridHelper) Copy ¶
func (obj PolarGridHelper) Copy(m Object3D, recursive bool) PolarGridHelper
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (PolarGridHelper) GetObjectById ¶
func (obj PolarGridHelper) GetObjectById(id int) js.Value
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (PolarGridHelper) GetPosition ¶
func (obj PolarGridHelper) GetPosition() Vector3
func (PolarGridHelper) GetRotation ¶
func (obj PolarGridHelper) GetRotation() Euler
func (PolarGridHelper) GetWorldDirection ¶
func (obj PolarGridHelper) GetWorldDirection(dst Vector3) Vector3
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (PolarGridHelper) GetWorldPosition ¶
func (obj PolarGridHelper) GetWorldPosition(dst Vector3) Vector3
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (PolarGridHelper) GetWorldQuaternion ¶
func (obj PolarGridHelper) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (PolarGridHelper) GetWorldScale ¶
func (obj PolarGridHelper) GetWorldScale(dst Vector3) Vector3
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (PolarGridHelper) ID ¶
func (obj PolarGridHelper) ID() int
readonly – Unique number for this object instance.
func (PolarGridHelper) LocalToWorld ¶
func (obj PolarGridHelper) LocalToWorld(vec Vector3) Vector3
Converts vec from this object's local space to world space.
func (PolarGridHelper) LookAt ¶
func (obj PolarGridHelper) LookAt(target Vector3)
Rotates the object to face a point in world space.
func (PolarGridHelper) LookAtCoords ¶
func (obj PolarGridHelper) LookAtCoords(x, y, z float64)
Rotates the object to face a point in world space.
func (PolarGridHelper) Remove ¶
func (obj PolarGridHelper) Remove(m Object3D)
Remove m as child of this object. An arbitrary number of objects may be removed.
func (PolarGridHelper) RemoveFromParent ¶
func (obj PolarGridHelper) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (PolarGridHelper) RotateOnAxis ¶
func (obj PolarGridHelper) RotateOnAxis(angle float64, axis Vector3) (this PolarGridHelper)
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (PolarGridHelper) RotateOnWorldAxis ¶
func (obj PolarGridHelper) RotateOnWorldAxis(angle float64, axis Vector3) (this PolarGridHelper)
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (PolarGridHelper) RotateX ¶
func (obj PolarGridHelper) RotateX(rad float64) (this PolarGridHelper)
RotateX rotates object around x axis in local space.
func (PolarGridHelper) RotateY ¶
func (obj PolarGridHelper) RotateY(rad float64) (this PolarGridHelper)
RotateY rotates object around y axis in local space.
func (PolarGridHelper) RotateZ ¶
func (obj PolarGridHelper) RotateZ(rad float64) (this PolarGridHelper)
RotateZ rotates object around z axis in local space.
func (PolarGridHelper) SetPosition ¶
func (obj PolarGridHelper) SetPosition(v Vector3)
func (PolarGridHelper) SetRotationFromAxisAngle ¶
func (obj PolarGridHelper) SetRotationFromAxisAngle(angle float64, axis Vector3)
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (PolarGridHelper) SetRotationFromEuler ¶
func (obj PolarGridHelper) SetRotationFromEuler(euler Euler)
Calls setRotationFromEuler(euler) on the .quaternion.
func (PolarGridHelper) SetRotationFromMatrix ¶
func (obj PolarGridHelper) SetRotationFromMatrix(m Matrix4)
Calls setFromRotationMatrix(m) on the .quaternion.
func (PolarGridHelper) SetRotationFromQuaternion ¶
func (obj PolarGridHelper) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (PolarGridHelper) ToJSON ¶
func (obj PolarGridHelper) ToJSON() js.Value
func (PolarGridHelper) TranslateOnAxis ¶
func (obj PolarGridHelper) TranslateOnAxis(distance float64, axis Vector3)
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (PolarGridHelper) TranslateX ¶
func (obj PolarGridHelper) TranslateX(distance float64)
Translates object along x axis in object space by distance units.
func (PolarGridHelper) TranslateY ¶
func (obj PolarGridHelper) TranslateY(distance float64)
Translates object along y axis in object space by distance units.
func (PolarGridHelper) TranslateZ ¶
func (obj PolarGridHelper) TranslateZ(distance float64)
Translates object along z axis in object space by distance units.
func (PolarGridHelper) UpdateMatrix ¶
func (obj PolarGridHelper) UpdateMatrix()
Updates the local transform.
func (PolarGridHelper) WorldToLocal ¶
func (obj PolarGridHelper) WorldToLocal(vec Vector3) Vector3
Converts vec from world space to this object's local space. vec represents position in world space.
type PolarGridHelperParameters ¶
type PolarGridHelperParameters struct { // The radius of the polar grid. This can be any positive number. Default is 10. Radius float64 // The number of radial lines. This can be any positive integer. Default is 16. Radials int // The number of circles. This can be any positive integer. Default is 8. Circles int // The number of line segments used for each circle. // This can be any positive integer that is 3 or greater. Default is 64. Divisions int // The first color used for grid elements. Color1 *Color // The second color used for grid elements. Color2 *Color }
type Quaternion ¶
type Quaternion struct { // X float64 `js:"x"` // Y float64 `js:"y"` // Z float64 `js:"z"` // W float64 `js:"w"` js.Value }
Quaternion - represents a Quaternion.
func NewQuaternion ¶
func NewQuaternion() Quaternion
func (Quaternion) AngleTo ¶
func (q Quaternion) AngleTo(a Quaternion) float64
Returns the angle between this quaternion and quaternion a in radians.
func (Quaternion) Conjugate ¶
func (q Quaternion) Conjugate() Quaternion
Returns the rotational conjugate of this quaternion. The conjugate of a quaternion represents the same rotation in the opposite direction about the rotational axis.
func (Quaternion) Copy ¶
func (q Quaternion) Copy(a Quaternion) Quaternion
func (Quaternion) Dot ¶
func (q Quaternion) Dot(a Quaternion) float64
Calculates the dot product of quaternions a and receiver.
func (Quaternion) Equals ¶
func (q Quaternion) Equals(a Quaternion) bool
Compares the x, y, z and w properties of a to the equivalent properties of this quaternion to determine if they represent the same rotation.
func (Quaternion) Identity ¶
func (q Quaternion) Identity() Quaternion
Sets this quaternion to the identity quaternion; that is, to the quaternion that represents "no rotation".
func (Quaternion) Invert ¶
func (q Quaternion) Invert() Quaternion
Inverts this quaternion - calculates the conjugate. The quaternion is assumed to have unit length.
func (Quaternion) Length ¶
func (q Quaternion) Length() float64
Length Computes the Euclidean length (straight-line length) of this quaternion, considered as a 4 dimensional vector.
func (Quaternion) LengthSq ¶
func (q Quaternion) LengthSq() float64
LengthSq Computes the squared Euclidean length (straight-line length) of this quaternion, considered as a 4 dimensional vector. This can be useful if you are comparing the lengths of two quaternions, as this is a slightly more efficient calculation than length().
func (Quaternion) Multiply ¶
func (q Quaternion) Multiply(a Quaternion) Quaternion
Multiply this quaternion by a.
func (Quaternion) MultiplyQuaternions ¶
func (q Quaternion) MultiplyQuaternions(a, b Quaternion) Quaternion
MultiplyQuaternions Sets this quaternion to a x b. Adapted from the method outlined here http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm
func (Quaternion) Normalize ¶
func (q Quaternion) Normalize() Quaternion
Normalize this quaternion - that is, calculated the quaternion that performs the same rotation as this one, but has length equal to 1.
func (Quaternion) Premultiply ¶
func (q Quaternion) Premultiply(a Quaternion) Quaternion
Premultiply Pre-multiplies this quaternion by a.
func (Quaternion) Random ¶
func (q Quaternion) Random() Quaternion
Random Sets this quaternion to a uniformly random, normalized quaternion.
func (Quaternion) RotateTowards ¶
func (q Quaternion) RotateTowards(step float64, a Quaternion) Quaternion
RotateTowards Rotates this quaternion by a given angular step to the defined quaternion a. The method ensures that the final quaternion will not overshoot a.
func (Quaternion) Set ¶
func (q Quaternion) Set(x, y, z, w float64) Quaternion
Set x, y, z, w properties of this quaternion.
func (Quaternion) SetFromAxisAngle ¶
func (q Quaternion) SetFromAxisAngle(angle float64, axis Vector3) Quaternion
SetFromAxisAngle sets this quaternion from rotation specified by axis and angle. Adapted from the method here http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm Axis is assumed to be normalized, angle is in radians.
func (Quaternion) SetFromEuler ¶
func (q Quaternion) SetFromEuler(euler Euler) Quaternion
SetFromEuler sets this quaternion from the rotation specified by Euler angle.
func (Quaternion) SetFromRotationMatrix ¶
func (q Quaternion) SetFromRotationMatrix(m Matrix4) Quaternion
SetFromRotationMatrix sets this quaternion from rotation component of m. Adapted from the method here: http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm m - a Matrix4 of which the upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled).
func (Quaternion) SetFromUnitVectors ¶
func (q Quaternion) SetFromUnitVectors(vFrom, vTo Vector3) Quaternion
Sets this quaternion to the rotation required to rotate direction vector vFrom to direction vector vTo. Adapted from the method here: http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors vFrom and vTo are assumed to be normalized.
func (Quaternion) Slerp ¶
func (q Quaternion) Slerp(t float64, qb Quaternion) Quaternion
Slerp Handles the spherical linear interpolation between quaternions. t represents the amount of rotation between this quaternion (where t is 0) and qb (where t is 1). This quaternion is set to the result. Also see the static version of the slerp below.
func (Quaternion) SlerpQuaternions ¶
func (q Quaternion) SlerpQuaternions(t float64, qa, qb Quaternion) (this Quaternion)
SlerpQuaternions Performs a spherical linear interpolation between the given quaternions and stores the result in this quaternion.
type Raycaster ¶
type Raycaster struct { // Far float64 `js:"far"` // Near float64 `js:"near"` // LinePrecision float64 `js:"linePrecision"` js.Value }
Raycaster assists with raycasting (used for mouse picking) See https://threejs.org/docs/#api/en/core/Raycaster
func (Raycaster) IntersectObjects ¶
func (Raycaster) SetFromCamera ¶
SetFromCamera updates the ray with a new origin and direction. coords - 2D coordinates of the mouse, in normalized device coordinates (NDC)---X and Y components should be between -1 and 1. camera from which the ray should originate
type Scene ¶
type Scene struct { // AutoUpdate bool `js:"autoUpdate"` // Background *Color `js:"background"` js.Value }
Scene - Allows you to set up what and where is to be rendered by three.js. This is where you place objects, lights and cameras.
func (Scene) Add ¶
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (Scene) ApplyMatrix4 ¶
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (Scene) ApplyQuaternion ¶
func (obj Scene) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (Scene) Copy ¶
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (Scene) GetObjectById ¶
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (Scene) GetPosition ¶
func (Scene) GetRotation ¶
func (Scene) GetWorldDirection ¶
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (Scene) GetWorldPosition ¶
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (Scene) GetWorldQuaternion ¶
func (obj Scene) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (Scene) GetWorldScale ¶
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (Scene) LocalToWorld ¶
Converts vec from this object's local space to world space.
func (Scene) LookAtCoords ¶
Rotates the object to face a point in world space.
func (Scene) Remove ¶
Remove m as child of this object. An arbitrary number of objects may be removed.
func (Scene) RemoveFromParent ¶
func (obj Scene) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (Scene) RotateOnAxis ¶
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (Scene) RotateOnWorldAxis ¶
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (Scene) SetPosition ¶
func (Scene) SetRotationFromAxisAngle ¶
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (Scene) SetRotationFromEuler ¶
Calls setRotationFromEuler(euler) on the .quaternion.
func (Scene) SetRotationFromMatrix ¶
Calls setFromRotationMatrix(m) on the .quaternion.
func (Scene) SetRotationFromQuaternion ¶
func (obj Scene) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (Scene) TranslateOnAxis ¶
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (Scene) TranslateX ¶
Translates object along x axis in object space by distance units.
func (Scene) TranslateY ¶
Translates object along y axis in object space by distance units.
func (Scene) TranslateZ ¶
Translates object along z axis in object space by distance units.
func (Scene) WorldToLocal ¶
Converts vec from world space to this object's local space. vec represents position in world space.
type Side ¶
type Side float64
Side defines which side of faces will be rendered - front, back or both. Default is FrontSide.
type SphereGeometry ¶
type SphereGeometry struct { // Radius float64 `js:"radius"` // // Segments int `js:"segments"` // Not sure if available. // ThetaStart float64 `js:"thetaStart"` // ThetaLength float64 `js:"thetaLength"` js.Value }
func NewSphereGeometry ¶
func NewSphereGeometry(params SphereGeometryParameters) SphereGeometry
NewSphereGeometry creates a new BoxGeometry.
func (SphereGeometry) ApplyMatrix4 ¶
func (g SphereGeometry) ApplyMatrix4(matrix Matrix4)
func (SphereGeometry) Center ¶
func (g SphereGeometry) Center()
func (SphereGeometry) ComputeBoundingBox ¶
func (g SphereGeometry) ComputeBoundingBox()
func (SphereGeometry) ComputeBoundingSphere ¶
func (g SphereGeometry) ComputeBoundingSphere()
func (SphereGeometry) ComputeFaceNormals ¶
func (g SphereGeometry) ComputeFaceNormals()
func (SphereGeometry) ComputeFlatVertexNormals ¶
func (g SphereGeometry) ComputeFlatVertexNormals()
func (SphereGeometry) ComputeLineDistances ¶
func (g SphereGeometry) ComputeLineDistances()
func (SphereGeometry) ComputeMorphNormals ¶
func (g SphereGeometry) ComputeMorphNormals()
func (SphereGeometry) ComputeVertexNormals ¶
func (g SphereGeometry) ComputeVertexNormals(areaWeighted bool)
func (SphereGeometry) Copy ¶
func (g SphereGeometry) Copy(source Object3D, recursive bool) SphereGeometry
func (SphereGeometry) Dispose ¶
func (g SphereGeometry) Dispose()
func (SphereGeometry) FromBufferGeometry ¶
func (g SphereGeometry) FromBufferGeometry(geometry Geometry)
func (SphereGeometry) LookAt ¶
func (g SphereGeometry) LookAt()
func (SphereGeometry) Merge ¶
func (g SphereGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
func (SphereGeometry) MergeMesh ¶
func (g SphereGeometry) MergeMesh(mesh Mesh)
func (SphereGeometry) MergeVertices ¶
func (g SphereGeometry) MergeVertices()
func (SphereGeometry) Normalize ¶
func (g SphereGeometry) Normalize() SphereGeometry
func (SphereGeometry) RotateX ¶
func (g SphereGeometry) RotateX()
func (SphereGeometry) RotateY ¶
func (g SphereGeometry) RotateY()
func (SphereGeometry) RotateZ ¶
func (g SphereGeometry) RotateZ()
func (SphereGeometry) Scale ¶
func (g SphereGeometry) Scale()
func (SphereGeometry) SortFacesByMaterialIndex ¶
func (g SphereGeometry) SortFacesByMaterialIndex()
func (SphereGeometry) ToJSON ¶
func (g SphereGeometry) ToJSON() js.Value
func (SphereGeometry) Translate ¶
func (g SphereGeometry) Translate()
type Sprite ¶
type Sprite struct { // ID int `js:"id"` // Position *Vector3 `js:"position"` // Scale *Vector3 `js:"scale"` // Rotation *Euler `js:"rotation"` // Geometry *BufferGeometry `js:"geometry"` // Material Material `js:"material"` // MatrixAutoUpdate bool `js:"matrixAutoUpdate"` // RenderOrder int `js:"renderOrder"` js.Value }
Sprite is a plane that always faces towards the camera, generally with a partially transparent texture applied.
func (Sprite) Add ¶
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (Sprite) ApplyMatrix4 ¶
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (Sprite) ApplyQuaternion ¶
func (obj Sprite) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (Sprite) Copy ¶
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (Sprite) GetObjectById ¶
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (Sprite) GetPosition ¶
func (Sprite) GetRotation ¶
func (Sprite) GetWorldDirection ¶
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (Sprite) GetWorldPosition ¶
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (Sprite) GetWorldQuaternion ¶
func (obj Sprite) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (Sprite) GetWorldScale ¶
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (Sprite) LocalToWorld ¶
Converts vec from this object's local space to world space.
func (Sprite) LookAtCoords ¶
Rotates the object to face a point in world space.
func (Sprite) Remove ¶
Remove m as child of this object. An arbitrary number of objects may be removed.
func (Sprite) RemoveFromParent ¶
func (obj Sprite) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (Sprite) RotateOnAxis ¶
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (Sprite) RotateOnWorldAxis ¶
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (Sprite) SetPosition ¶
func (Sprite) SetRotationFromAxisAngle ¶
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (Sprite) SetRotationFromEuler ¶
Calls setRotationFromEuler(euler) on the .quaternion.
func (Sprite) SetRotationFromMatrix ¶
Calls setFromRotationMatrix(m) on the .quaternion.
func (Sprite) SetRotationFromQuaternion ¶
func (obj Sprite) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (Sprite) TranslateOnAxis ¶
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (Sprite) TranslateX ¶
Translates object along x axis in object space by distance units.
func (Sprite) TranslateY ¶
Translates object along y axis in object space by distance units.
func (Sprite) TranslateZ ¶
Translates object along z axis in object space by distance units.
func (Sprite) WorldToLocal ¶
Converts vec from world space to this object's local space. vec represents position in world space.
type SpriteMaterial ¶
func NewSpriteMaterial ¶
func NewSpriteMaterial(texture *Texture) *SpriteMaterial
func (SpriteMaterial) Clone ¶
func (m SpriteMaterial) Clone()
func (SpriteMaterial) Copy ¶
func (m SpriteMaterial) Copy(source Object3D)
func (SpriteMaterial) Dispose ¶
func (m SpriteMaterial) Dispose()
func (SpriteMaterial) OnBeforeCompile ¶
func (m SpriteMaterial) OnBeforeCompile()
func (SpriteMaterial) SetValues ¶
func (m SpriteMaterial) SetValues(values *MaterialParameters)
func (SpriteMaterial) ToJSON ¶
func (m SpriteMaterial) ToJSON(meta interface{}) js.Value
type TextSprite ¶
type TextSprite struct { // Text string // ID int `js:"id"` // Position *Vector3 `js:"position"` // Rotation *Euler `js:"rotation"` // Geometry *BufferGeometry `js:"geometry"` // MatrixAutoUpdate bool `js:"matrixAutoUpdate"` // RenderOrder int `js:"renderOrder"` // Visible bool `js:"visible"` js.Value }
func NewTextSprite ¶
func NewTextSprite(text, align string, textSize int, color *Color) TextSprite
func (TextSprite) Add ¶
func (obj TextSprite) Add(m Object3D)
Add object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent.
func (TextSprite) ApplyMatrix4 ¶
func (obj TextSprite) ApplyMatrix4(matrix Matrix4)
ApplyMatrix4 applies the matrix transform to the object and updates the object's position, rotation and scale.
func (TextSprite) ApplyQuaternion ¶
func (obj TextSprite) ApplyQuaternion(q Quaternion)
ApplyQuaternion applies the rotation represented by q to the object.
func (TextSprite) Attach ¶
func (obj TextSprite) Attach(m Object3D)
Attach adds m as a child of this, while maintaining m's world transform.
func (TextSprite) Clone ¶
func (obj TextSprite) Clone(recursive bool) TextSprite
func (TextSprite) Copy ¶
func (obj TextSprite) Copy(m Object3D, recursive bool) TextSprite
Copy the given m into this object. Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
func (TextSprite) GetObjectById ¶
func (obj TextSprite) GetObjectById(id int) js.Value
GetObjectById searches through an object and its children, starting with the object itself, and returns the first with a matching id.
func (TextSprite) GetPosition ¶
func (obj TextSprite) GetPosition() Vector3
func (TextSprite) GetRotation ¶
func (obj TextSprite) GetRotation() Euler
func (TextSprite) GetWorldDirection ¶
func (obj TextSprite) GetWorldDirection(dst Vector3) Vector3
Returns a vector representing the direction of object's positive z-axis in world space. The result is copied into dst.
func (TextSprite) GetWorldPosition ¶
func (obj TextSprite) GetWorldPosition(dst Vector3) Vector3
Returns a vector representing the position of the object in world space. The result is copied into dst.
func (TextSprite) GetWorldQuaternion ¶
func (obj TextSprite) GetWorldQuaternion(dst Quaternion) Quaternion
Returns a quaternion representing the rotation of the object in world space. The result is copied into dst.
func (TextSprite) GetWorldScale ¶
func (obj TextSprite) GetWorldScale(dst Vector3) Vector3
Returns a vector of the scaling factors applied to the object for each axis in world space. The result is copied into dst.
func (TextSprite) ID ¶
func (obj TextSprite) ID() int
readonly – Unique number for this object instance.
func (TextSprite) LocalToWorld ¶
func (obj TextSprite) LocalToWorld(vec Vector3) Vector3
Converts vec from this object's local space to world space.
func (TextSprite) LookAt ¶
func (obj TextSprite) LookAt(target Vector3)
Rotates the object to face a point in world space.
func (TextSprite) LookAtCoords ¶
func (obj TextSprite) LookAtCoords(x, y, z float64)
Rotates the object to face a point in world space.
func (TextSprite) Remove ¶
func (obj TextSprite) Remove(m Object3D)
Remove m as child of this object. An arbitrary number of objects may be removed.
func (TextSprite) RemoveFromParent ¶
func (obj TextSprite) RemoveFromParent()
RemoveFromParent removes this object from its current parent.
func (TextSprite) RotateOnAxis ¶
func (obj TextSprite) RotateOnAxis(angle float64, axis Vector3) (this TextSprite)
Rotate an object along an axis in object space. The axis is assumed to be normalized. axis is a normalized vector in object space.
func (TextSprite) RotateOnWorldAxis ¶
func (obj TextSprite) RotateOnWorldAxis(angle float64, axis Vector3) (this TextSprite)
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. axis is a normalized vector in world space.
func (TextSprite) RotateX ¶
func (obj TextSprite) RotateX(rad float64) (this TextSprite)
RotateX rotates object around x axis in local space.
func (TextSprite) RotateY ¶
func (obj TextSprite) RotateY(rad float64) (this TextSprite)
RotateY rotates object around y axis in local space.
func (TextSprite) RotateZ ¶
func (obj TextSprite) RotateZ(rad float64) (this TextSprite)
RotateZ rotates object around z axis in local space.
func (TextSprite) SetPosition ¶
func (obj TextSprite) SetPosition(v Vector3)
func (TextSprite) SetRotationFromAxisAngle ¶
func (obj TextSprite) SetRotationFromAxisAngle(angle float64, axis Vector3)
Calls setFromAxisAngle( axis, angle ) on the .quaternion.
func (TextSprite) SetRotationFromEuler ¶
func (obj TextSprite) SetRotationFromEuler(euler Euler)
Calls setRotationFromEuler(euler) on the .quaternion.
func (TextSprite) SetRotationFromMatrix ¶
func (obj TextSprite) SetRotationFromMatrix(m Matrix4)
Calls setFromRotationMatrix(m) on the .quaternion.
func (TextSprite) SetRotationFromQuaternion ¶
func (obj TextSprite) SetRotationFromQuaternion(q Quaternion)
Copy the given quaternion into .quaternion.
func (TextSprite) ToJSON ¶
func (obj TextSprite) ToJSON() js.Value
func (TextSprite) TranslateOnAxis ¶
func (obj TextSprite) TranslateOnAxis(distance float64, axis Vector3)
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
func (TextSprite) TranslateX ¶
func (obj TextSprite) TranslateX(distance float64)
Translates object along x axis in object space by distance units.
func (TextSprite) TranslateY ¶
func (obj TextSprite) TranslateY(distance float64)
Translates object along y axis in object space by distance units.
func (TextSprite) TranslateZ ¶
func (obj TextSprite) TranslateZ(distance float64)
Translates object along z axis in object space by distance units.
func (TextSprite) WorldToLocal ¶
func (obj TextSprite) WorldToLocal(vec Vector3) Vector3
Converts vec from world space to this object's local space. vec represents position in world space.
type TextSpriteMaterial ¶
type TextSpriteParameters ¶
type TextTextureParams ¶
type Texture ¶
type Texture struct { // Id int `js:"id"` // UUID string `js:"uuid"` // Name string `js:"name"` // Image *Image `js:"image"` // // Array of user-specified mipmaps (optional). // Mipmaps *js.Object `js:"mipmaps"` // WrapS WrappingMode `js:"wrapS"` // WrapT WrappingMode `js:"wrapT"` // MagFilter MinMagFilter `js:"magFilter"` // MinFilter MinMagFilter `js:"minFilter"` // Anisotropy int `js:"anisotropy"` // Format TextureFormat `js:"format"` // InternalFormat string `js:"internalFormat"` // Type TextureType `js:"internalFormat"` // // How much a single repetition of the texture is offset from the beginning, in each direction U and V. Typical range is 0.0 to 1.0. // Offset Vector2 `js:"offset"` // // How many times the texture is repeated across the surface, in each direction U and V. If repeat is set greater than 1 in either direction, the // Repeat Vector2 `js:"repeat"` // // How much the texture is rotated around the center point, in radians. Positive values are counter-clockwise. Default is 0. // Rotation float64 `js:"rotation"` // // The point around which rotation occurs. A value of (0.5, 0.5) corresponds to the center of the texture. Default is (0, 0), the lower left. // Center Vector2 `js:"center"` // MatrixAutoUpdate bool `js:"matrixAutoUpdate"` // // Matrix Matrix3 `js:"matrix"` // GenerateMipmaps bool `js:"generateMipmaps"` // PremultiplyAlpha bool `js:"premultiplyAlpha"` // FlipY bool `js:"flipY"` // UnpackAlignment int `js:"unpackAlignment"` // Encoding TextureEncoding `js:"encoding"` // Version int `js:"version"` // NeedsUpdate bool `js:"needsUpdate"` // UserData *js.Object `js:"userData"` js.Value }
func NewTexture ¶
func NewTexture(params TextureParameters) *Texture
func (*Texture) TransformUV ¶
func (*Texture) UpdateMatrix ¶
func (t *Texture) UpdateMatrix()
Update the texture's uv-transform .matrix from the texture properties .offset, .repeat, .rotation, and .center.
type TextureEncoding ¶
type TextureEncoding int
const ( LinearEncoding TextureEncoding = 3000 GammaEncoding TextureEncoding = 3007 RGBEEncoding TextureEncoding = 3002 LogLuvEncoding TextureEncoding = 3003 RGBM7Encoding TextureEncoding = 3004 RGBM16Encoding TextureEncoding = 3005 RGBDEncoding TextureEncoding = 3006 BasicDepthPacking TextureEncoding = 3200 RGBADepthPacking TextureEncoding = 3201 )
LinearEncoding is the default. Values other than this are only valid for a material's map, envMap and emissiveMap.
type TextureFormat ¶
type TextureFormat int
const ( AlphaFormat TextureFormat = 1021 RGBFormat TextureFormat = 1022 RGBAFormat TextureFormat = 1023 LuminanceFormat TextureFormat = 1024 LuminanceAlphaFormat TextureFormat = 1025 RGBEFormat TextureFormat = RGBAFormat DepthFormat TextureFormat = 1026 DepthStencilFormat TextureFormat = 1027 RedFormat TextureFormat = 1028 RedIntegerFormat TextureFormat = 1029 RGFormat TextureFormat = 1030 RGIntegerFormat TextureFormat = 1031 RGBIntegerFormat TextureFormat = 1032 RGBAIntegerFormat TextureFormat = 1033 )
For use with a texture's format property, these define how elements of a 2d texture, or texels, are read by shaders.
type TextureLoader ¶
TextureLoader loads a texture from file. See https://threejs.org/docs/#api/en/loaders/TextureLoader
func NewTextureLoader ¶
func NewTextureLoader() *TextureLoader
NewTextureLoader creates a new texture loader.
type TextureParameters ¶
type TextureParameters struct { Image *Image // How the image is applied to the object. An object type of THREE.UVMapping is the default, where the U,V coordinates are used to apply the map. Mapping MappingMode // This defines how the texture is wrapped horizontally and corresponds to U in UV mapping. WrapS WrappingMode // This defines how the texture is wrapped vertically and corresponds to V in UV mapping. WrapT WrappingMode // How the texture is sampled when a texel covers more than one pixel. The default is THREE.LinearFilter, which takes the four closest texels and bilinearly interpolates among them. MagFilter MinMagFilter // How the texture is sampled when a texel covers less than one pixel. The default is THREE.LinearMipmapLinearFilter, which uses mipmapping and a trilinear filter. MinFilter MinMagFilter Format TextureFormat Type TextureType // The number of samples taken along the axis through the pixel that has the highest density of texels. By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used. Use renderer.getMaxAnisotropy() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2 Anisotropy int Encoding TextureEncoding }
type TextureType ¶
type TextureType int
const ( UnsignedByteType TextureType = 1009 ByteType TextureType = 1010 ShortType TextureType = 1011 UnsignedShortType TextureType = 1012 IntType TextureType = 1013 UnsignedIntType TextureType = 1014 FloatType TextureType = 1015 HalfFloatType TextureType = 1016 UnsignedShort4444Type TextureType = 1017 UnsignedShort5551Type TextureType = 1018 UnsignedShort565Type TextureType = 1019 UnsignedInt248Type TextureType = 1020 )
For use with a texture's type property, which must correspond to the correct format. See below for details.
type TrackballControls ¶
type TrackballControls struct { // DynamicDampingFactor float64 `js:"dynamicDampingFactor"` // Enabled bool `js:"enabled"` // // How far you can zoom out. Default is Infinity. // MaxDistance float64 `js:"maxDistance"` // // How far you can zoom in. Default is 0. // MinDistance float64 `js:"minDistance"` // // This object contains references to the mouse actions used by the controls. // // * LEFT is assigned with THREE.MOUSE.ROTATE // // * MIDDLE is assigned with THREE.MOUSE.ZOOM // // * RIGHT is assigned with THREE.MOUSE.PAN // MouseButtons js.Value `js:"mouseButtons"` // NoPan bool `js:"noPan"` // NoRotate bool `js:"noRotate"` // NoZoom bool `js:"noZoom"` // Camera Camera `js:"object"` // PanSpeed float64 `js:"panSpeed"` // RotateSpeed float64 `js:"rotateSpeed"` // // Whether or not damping is disabled. Default is false. // StaticMoving bool `js:"staticMoving"` // ZoomSpeed float64 `js:"zoomSpeed"` // // This array holds keycodes for controlling interactions. // // When the first defined key is pressed, all mouse interactions (left, middle, right) performs orbiting. // // When the second defined key is pressed, all mouse interactions (left, middle, right) performs zooming. // // When the third defined key is pressed, all mouse interactions (left, middle, right) performs panning. // // Default is KeyA, KeyS, KeyD which represents A, S, D. // Keys []string `js:"keys"` // // WARNING: Not part of documentation. Use to set where zoom-in focuses on. // Target Vector3 `js:"target"` // // WARNING: Not part of documentation. // Target0 Vector3 `js:"target0"` // // WARNING: Not part of documentation. Current position of camera. // Position Vector3 `js:"position"` js.Value }
func NewTrackballControls ¶
func NewTrackballControls(camera Camera, domElement js.Value) TrackballControls
NewTrackballControls instances a TrackballControls. Requires TrackballControls to be added at a global level or on THREE. See https://github.com/turban/webgl-earth for a way of doing this easily using Eberhard Graether's http://egraether.com/ version.
func (TrackballControls) CheckDistances ¶
func (t TrackballControls) CheckDistances()
Ensures the controls stay in the range [minDistance, maxDistance]. Called by update().
func (TrackballControls) Dispose ¶
func (t TrackballControls) Dispose()
Should be called if the controls is no longer required.
func (TrackballControls) HandleResizes ¶
func (t TrackballControls) HandleResizes()
Should be called if the application window is resized.
func (TrackballControls) PanCamera ¶
func (t TrackballControls) PanCamera()
Performs panning if necessary. Called by update().
func (TrackballControls) Reset ¶
func (t TrackballControls) Reset()
Resets the controls to its initial state.
func (TrackballControls) RotateCamera ¶
func (t TrackballControls) RotateCamera()
Rotates the camera if necessary. Called by update().
func (TrackballControls) SetMaxDistance ¶
func (t TrackballControls) SetMaxDistance(d float64)
func (TrackballControls) SetMinDistance ¶
func (t TrackballControls) SetMinDistance(d float64)
func (TrackballControls) SetPanSpeed ¶
func (t TrackballControls) SetPanSpeed(v float64)
func (TrackballControls) SetRotateSpeed ¶
func (t TrackballControls) SetRotateSpeed(v float64)
func (TrackballControls) SetTarget ¶
func (t TrackballControls) SetTarget(v Vector3)
func (TrackballControls) SetZoomSpeed ¶
func (t TrackballControls) SetZoomSpeed(v float64)
func (TrackballControls) Update ¶
func (t TrackballControls) Update()
Updates the controls. Usually called in the animation loop.
func (TrackballControls) ZoomCamera ¶
func (t TrackballControls) ZoomCamera()
Performs zooming if necessary. Called by update().
type Vector3 ¶
Vector3 - represents a Vector3.
func NewVector3 ¶
func (Vector3) AddScaledVector ¶
AddScaledVector Adds the multiple of a and f to this vector. this = f*a
func (Vector3) ApplyAxisAngle ¶
ApplyAxisAngle Applies a rotation specified by a normalized axis and an angle to this vector.
func (Vector3) ApplyEuler ¶
ApplyEuler transform to this vector by converting the Euler object to a Quaternion and applying.
func (Vector3) ApplyQuaternion ¶
func (v Vector3) ApplyQuaternion(q Quaternion) (this Vector3)
ApplyQuaternion transform to this vector.
func (Vector3) Ceil ¶
Ceil The x, y and z components of this vector are rounded up to the nearest integer value.
func (Vector3) ClampLength ¶
ClampLength If this vector's length is greater than the max value, the vector will be scaled down so its length is the max value.
If this vector's length is less than the min value, the vector will be scaled up so its length is the min value.
func (Vector3) ClampScalar ¶
ClampScalar clamps individual components of this vector. If this vector's x, y or z values are greater than the max value, they are replaced by the max value.
If this vector's x, y or z values are less than the min value, they are replaced by the min value.
func (Vector3) CrossVectors ¶
CrossVectors Sets this vector to cross product of a and b.
func (Vector3) DistanceTo ¶
DistanceTo Computes the distance from this vector to v.
func (Vector3) DistanceToSquared ¶
DistanceToSquared Computes the squared distance from this vector to v. If you are just comparing the distance with another distance, you should compare the distance squared instead as it is slightly more efficient to calculate.
func (Vector3) DivideScalar ¶
DivideScalar this vector by scalar f.
func (Vector3) Equals ¶
Equals Returns true if the components of this vector and v are strictly equal; false otherwise.
func (Vector3) Floor ¶
Floor The components of this vector are rounded down to the nearest integer value.
func (Vector3) GetComponent ¶
GetComponent gets X value if idx=0. Gets Y if idx=1. Gets Z if idx=2.
func (Vector3) Length ¶
Length Computes the Euclidean length (straight-line length) from (0, 0, 0) to (x, y, z).
func (Vector3) LengthSq ¶
Computes the square of the Euclidean length (straight-line length) from (0, 0, 0) to (x, y, z). If you are comparing the lengths of vectors, you should compare the length squared instead as it is slightly more efficient to calculate.
func (Vector3) Lerp ¶
Lerp Linearly interpolate between this vector and v, where alpha is the percent distance along the line - alpha = 0 will be this vector, and alpha = 1 will be a.
func (Vector3) LerpVectors ¶
LerpVectors Sets this vector to be the vector linearly interpolated between a and b where alpha is the percent distance along the line connecting the two vectors - alpha = 0 will be a, and alpha = 1 will be b.
func (Vector3) ManhattanDistanceTo ¶
ManhattanDistanceTo Computes the manhattan distance from this vector to v. https://en.wikipedia.org/wiki/Taxicab_geometry
func (Vector3) ManhattanLength ¶
ManhattanLength Computes the Manhattan length of this vector
func (Vector3) Max ¶
Max If this vector's x, y or z value is less than a's x, y or z value, replace that value with the corresponding max value.
func (Vector3) Min ¶
Min If this vector's x, y or z value is greater than a's x, y or z value, replace that value with the corresponding min value.
func (Vector3) MultiplyScalar ¶
MultiplyScalar Multiplies this vector by scalar f.
func (Vector3) Normalize ¶
Normalize Convert this vector to a unit vector - that is, sets it equal to a vector with the same direction as this one, but length 1.
func (Vector3) Random ¶
Random Sets each component of this vector to a pseudo-random value between 0 and 1, excluding 1.
func (Vector3) RandomDirection ¶
RandomDirection Sets this vector to a uniformly random point on a unit sphere.
func (Vector3) SetComponent ¶
SetComponent sets idx component to f. idx of X is 0. idx of Y is 1. idx of Z is 2.
func (Vector3) SetLength ¶
SetLength Set this vector to a vector with the same direction as this one, but length l.
func (Vector3) SubVectors ¶
SubVectors Sets this vector to a - b.
type WebGLRenderer ¶
The WebGLRenderer displays your beautifully crafted scenes using WebGL.
func NewWebGLRenderer ¶
func NewWebGLRenderer(params WebGLRendererParam) WebGLRenderer
WebGLRenderer creates an WebGLRenderer instance.
func (WebGLRenderer) DomElement ¶
func (r WebGLRenderer) DomElement() js.Value
func (WebGLRenderer) Render ¶
func (r WebGLRenderer) Render(scene Scene, camera Camera)
func (WebGLRenderer) SetPixelRatio ¶
func (r WebGLRenderer) SetPixelRatio(ratio float64)
type WebGLRendererParam ¶
type WrappingMode ¶
type WrappingMode int
const ( RepeatWrapping WrappingMode = iota + 1000 ClampToEdgeWrapping MirroredRepeatWrapping )
These define the texture's wrapS and wrapT properties, which define horizontal and vertical texture wrapping.
Source Files
¶
- buffer_attribute.go
- cameras_perspective_camera.go
- controls_trackball.go
- core_camera.go
- core_face3.go
- core_geometry.go
- core_material.go
- core_object3d.go
- gen_geometry_box.go
- gen_geometry_buffer.go
- gen_geometry_cone.go
- gen_geometry_cylinder.go
- gen_geometry_sphere.go
- gen_material_line_basic.go
- gen_material_mesh_basic.go
- gen_material_mesh_lambert.go
- gen_material_mesh_phong.go
- gen_material_mesh_physical.go
- gen_material_points.go
- gen_material_sprite.go
- gen_object3d_ambient_light.go
- gen_object3d_arrow_helper.go
- gen_object3d_axes_helper.go
- gen_object3d_directional_light.go
- gen_object3d_fog.go
- gen_object3d_group.go
- gen_object3d_line.go
- gen_object3d_line_segments.go
- gen_object3d_mesh.go
- gen_object3d_perspective_camera.go
- gen_object3d_points.go
- gen_object3d_polargrid_helper.go
- gen_object3d_scene.go
- gen_object3d_sprite.go
- gen_object3d_text_sprite.go
- geometries_box_geometry.go
- geometries_buffer_geometry.go
- geometries_cone_geometry.go
- geometries_cylinder_geometry.go
- geometries_sphere_geometry.go
- helper_arrow.go
- helper_axes.go
- helper_polargrid.go
- lights_ambient_light.go
- lights_directional_light.go
- materials_line_basic_material.go
- materials_mesh_basic_material.go
- materials_mesh_lambert_material.go
- materials_mesh_phong_material.go
- materials_mesh_physical_material.go
- materials_points_material.go
- materials_sprite_material.go
- materials_texture.go
- materials_texture_consts.go
- math_color.go
- math_euler.go
- math_matrix4.go
- math_quaternion.go
- math_vector2.go
- math_vector3.go
- objects_group.go
- objects_line.go
- objects_line_segments.go
- objects_mesh.go
- objects_points.go
- objects_sprite.go
- objects_text_sprite.go
- raycaster.go
- renderers_webgl_renderer.go
- scenes_fog.go
- scenes_scene.go
- texture_loader.go
- three.go