Documentation ¶
Index ¶
- type AmbientLight
- type BasicGeometry
- func (bg *BasicGeometry) AddFace(a, b, c int)
- func (bg *BasicGeometry) AddVertice(x, y, z float64)
- func (g BasicGeometry) ApplyMatrix(matrix *Matrix4)
- func (g BasicGeometry) Center()
- func (g BasicGeometry) ComputeBoundingBox()
- func (g BasicGeometry) ComputeBoundingSphere()
- func (g BasicGeometry) ComputeFaceNormals()
- func (g BasicGeometry) ComputeFlatVertexNormals()
- func (g BasicGeometry) ComputeLineDistances()
- func (g BasicGeometry) ComputeMorphNormals()
- func (g BasicGeometry) ComputeVertexNormals(areaWeighted bool)
- func (g BasicGeometry) Copy(source Object3D, recursive bool) *BasicGeometry
- func (g BasicGeometry) Dispose()
- func (g BasicGeometry) FromBufferGeometry(geometry Geometry)
- func (g BasicGeometry) LookAt()
- func (g BasicGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
- func (g BasicGeometry) MergeMesh(mesh Mesh)
- func (g BasicGeometry) MergeVertices()
- func (g BasicGeometry) Normalize() BasicGeometry
- func (g BasicGeometry) RotateX()
- func (g BasicGeometry) RotateY()
- func (g BasicGeometry) RotateZ()
- func (g BasicGeometry) Scale()
- func (g BasicGeometry) SortFacesByMaterialIndex()
- func (g BasicGeometry) ToJSON() interface{}
- func (g BasicGeometry) Translate()
- type BasicGeometryParams
- type BoxGeometry
- func (g BoxGeometry) ApplyMatrix(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() interface{}
- func (g BoxGeometry) Translate()
- type BoxGeometryParameters
- type BufferAttribute
- type BufferGeometry
- func (bg *BufferGeometry) AddAttribute(name string, attr *BufferAttribute)
- func (bg *BufferGeometry) AddFace(a, b, c int)
- func (bg *BufferGeometry) AddVertice(x, y, z float64)
- func (g BufferGeometry) ApplyMatrix(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 (g BufferGeometry) SortFacesByMaterialIndex()
- func (g BufferGeometry) ToJSON() interface{}
- func (g BufferGeometry) Translate()
- type CircleGeometry
- func (g CircleGeometry) ApplyMatrix(matrix *Matrix4)
- func (g CircleGeometry) Center()
- func (g CircleGeometry) ComputeBoundingBox()
- func (g CircleGeometry) ComputeBoundingSphere()
- func (g CircleGeometry) ComputeFaceNormals()
- func (g CircleGeometry) ComputeFlatVertexNormals()
- func (g CircleGeometry) ComputeLineDistances()
- func (g CircleGeometry) ComputeMorphNormals()
- func (g CircleGeometry) ComputeVertexNormals(areaWeighted bool)
- func (g CircleGeometry) Copy(source Object3D, recursive bool) *CircleGeometry
- func (g CircleGeometry) Dispose()
- func (g CircleGeometry) FromBufferGeometry(geometry Geometry)
- func (g CircleGeometry) LookAt()
- func (g CircleGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
- func (g CircleGeometry) MergeMesh(mesh Mesh)
- func (g CircleGeometry) MergeVertices()
- func (g CircleGeometry) Normalize() CircleGeometry
- func (g CircleGeometry) RotateX()
- func (g CircleGeometry) RotateY()
- func (g CircleGeometry) RotateZ()
- func (g CircleGeometry) Scale()
- func (g CircleGeometry) SortFacesByMaterialIndex()
- func (g CircleGeometry) ToJSON() interface{}
- func (g CircleGeometry) Translate()
- type CircleGeometryParameters
- type Color
- type DirectionalLight
- func (obj *DirectionalLight) Add(m Object3D)
- func (obj *DirectionalLight) ApplyMatrix(matrix *Matrix4)
- func (obj *DirectionalLight) GetObjectById(id int) *js.Object
- func (obj *DirectionalLight) Remove(m *js.Object)
- func (obj *DirectionalLight) ToJSON() interface{}
- func (obj *DirectionalLight) UpdateMatrix()
- type Euler
- type Face3
- type Fog
- type Geometry
- type Group
- type Line
- type LineBasicMaterial
- type LineSegments
- type Material
- type MaterialParameters
- type Matrix4
- type Mesh
- func (obj *Mesh) Add(m Object3D)
- func (obj *Mesh) ApplyMatrix(matrix *Matrix4)
- func (obj *Mesh) GetObjectById(id int) *js.Object
- func (obj *Mesh) Remove(m *js.Object)
- func (m Mesh) RotateX()
- func (m Mesh) SetRotationFromAxisAngle(axis string, angle float64)
- func (obj *Mesh) ToJSON() interface{}
- func (obj *Mesh) UpdateMatrix()
- 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{}) interface{}
- type MeshPhongMaterial
- type Object3D
- type PerspectiveCamera
- func (c PerspectiveCamera) ClearViewOffset()
- func (c PerspectiveCamera) Copy() PerspectiveCamera
- func (c PerspectiveCamera) GetEffectiveFOV() float64
- func (c PerspectiveCamera) GetFilmHeight() float64
- func (c PerspectiveCamera) GetFilmWidth() float64
- func (c PerspectiveCamera) GetFocalLength() float64
- func (c PerspectiveCamera) LookAt(x, y, z float64)
- func (c PerspectiveCamera) SetFocalLength(focalLength float64)
- func (c PerspectiveCamera) SetViewOffset(fullWidth, fullHeight, x, y, width, height float64)
- func (c PerspectiveCamera) ToJSON(meta interface{}) interface{}
- func (c PerspectiveCamera) UpdateProjectionMatrix()
- type PerspectiveCameraPosition
- type Quaternion
- type Raycaster
- type Scene
- type Shading
- type Side
- type SphereGeometry
- func (g SphereGeometry) ApplyMatrix(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() interface{}
- func (g SphereGeometry) Translate()
- type SphereGeometryParameters
- type Sprite
- type SpriteMaterial
- type TextSprite
- type TextSpriteMaterial
- type TextSpriteParameters
- type TextTextureParams
- type TextureLoader
- type Vector2
- type Vector3
- type WebGLRenderer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmbientLight ¶
type AmbientLight struct { *js.Object Position *Vector3 `js:"position"` MatrixAutoUpdate bool `js:"matrixAutoUpdate"` }
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)
func (*AmbientLight) ApplyMatrix ¶
func (obj *AmbientLight) ApplyMatrix(matrix *Matrix4)
func (*AmbientLight) GetObjectById ¶
func (obj *AmbientLight) GetObjectById(id int) *js.Object
func (*AmbientLight) Remove ¶
func (obj *AmbientLight) Remove(m *js.Object)
func (*AmbientLight) ToJSON ¶
func (obj *AmbientLight) ToJSON() interface{}
func (*AmbientLight) UpdateMatrix ¶
func (obj *AmbientLight) UpdateMatrix()
type BasicGeometry ¶
BasicGeometry is the basic primitive geometry class. It's a counterpart of three.js' core/Geometry object.
func NewBasicGeometry ¶
func NewBasicGeometry(params BasicGeometryParams) BasicGeometry
NewBasicGeometry creates a new Basic Geometry.
func (*BasicGeometry) AddFace ¶
func (bg *BasicGeometry) AddFace(a, b, c int)
AddFace adds new Face3 (triangle) to the geometry, specified by its vertice indicies.
func (*BasicGeometry) AddVertice ¶
func (bg *BasicGeometry) AddVertice(x, y, z float64)
AddVertice adds new vertice to the geometry, specified by its coordinates.
func (BasicGeometry) ApplyMatrix ¶
func (g BasicGeometry) ApplyMatrix(matrix *Matrix4)
func (BasicGeometry) Center ¶
func (g BasicGeometry) Center()
func (BasicGeometry) ComputeBoundingBox ¶
func (g BasicGeometry) ComputeBoundingBox()
func (BasicGeometry) ComputeBoundingSphere ¶
func (g BasicGeometry) ComputeBoundingSphere()
func (BasicGeometry) ComputeFaceNormals ¶
func (g BasicGeometry) ComputeFaceNormals()
func (BasicGeometry) ComputeFlatVertexNormals ¶
func (g BasicGeometry) ComputeFlatVertexNormals()
func (BasicGeometry) ComputeLineDistances ¶
func (g BasicGeometry) ComputeLineDistances()
func (BasicGeometry) ComputeMorphNormals ¶
func (g BasicGeometry) ComputeMorphNormals()
func (BasicGeometry) ComputeVertexNormals ¶
func (g BasicGeometry) ComputeVertexNormals(areaWeighted bool)
func (BasicGeometry) Copy ¶
func (g BasicGeometry) Copy(source Object3D, recursive bool) *BasicGeometry
func (BasicGeometry) Dispose ¶
func (g BasicGeometry) Dispose()
func (BasicGeometry) FromBufferGeometry ¶
func (g BasicGeometry) FromBufferGeometry(geometry Geometry)
func (BasicGeometry) LookAt ¶
func (g BasicGeometry) LookAt()
func (BasicGeometry) Merge ¶
func (g BasicGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
func (BasicGeometry) MergeMesh ¶
func (g BasicGeometry) MergeMesh(mesh Mesh)
func (BasicGeometry) MergeVertices ¶
func (g BasicGeometry) MergeVertices()
func (BasicGeometry) Normalize ¶
func (g BasicGeometry) Normalize() BasicGeometry
func (BasicGeometry) RotateX ¶
func (g BasicGeometry) RotateX()
func (BasicGeometry) RotateY ¶
func (g BasicGeometry) RotateY()
func (BasicGeometry) RotateZ ¶
func (g BasicGeometry) RotateZ()
func (BasicGeometry) Scale ¶
func (g BasicGeometry) Scale()
func (BasicGeometry) SortFacesByMaterialIndex ¶
func (g BasicGeometry) SortFacesByMaterialIndex()
func (BasicGeometry) ToJSON ¶
func (g BasicGeometry) ToJSON() interface{}
func (BasicGeometry) Translate ¶
func (g BasicGeometry) Translate()
type BasicGeometryParams ¶
type BasicGeometryParams struct { }
type BoxGeometry ¶
type BoxGeometry struct { *js.Object Width float64 `js:"width"` Height float64 `js:"height"` Depth float64 `js:"depth"` WidthSegments float64 `js:"widthSegments"` HeightSegments float64 `js:"heightSegments"` DepthSegments float64 `js:"depthSegments"` }
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) ApplyMatrix ¶
func (g BoxGeometry) ApplyMatrix(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() interface{}
func (BoxGeometry) Translate ¶
func (g BoxGeometry) Translate()
type BoxGeometryParameters ¶
type BoxGeometryParameters struct { Width float64 Height float64 Depth float64 WidthSegments float64 HeightSegments float64 DepthSegments float64 }
BoxGeometryParameters .
type BufferAttribute ¶
type BufferAttribute struct { *js.Object Array []int `js:"array"` Count int `js:"count"` IsDynamic bool `js:"dynamic"` ItemSize int `js:"itemSize"` NeedsUpdate bool `js:"needsUpdate"` Normalized bool `js:"normalized"` }
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 { *js.Object Vertices []Vector3 `js:"vertices"` Attributes *BufferAttribute `js:"attributes"` }
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) AddAttribute ¶
func (bg *BufferGeometry) AddAttribute(name string, attr *BufferAttribute)
AddAttribute adds a new attribute like 'position' to the BufferGeometry.
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) AddVertice ¶
func (bg *BufferGeometry) AddVertice(x, y, z float64)
AddVertice adds new vertice to the geometry, specified by its coordinates.
func (BufferGeometry) ApplyMatrix ¶
func (g BufferGeometry) ApplyMatrix(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) SortFacesByMaterialIndex ¶
func (g BufferGeometry) SortFacesByMaterialIndex()
func (BufferGeometry) ToJSON ¶
func (g BufferGeometry) ToJSON() interface{}
func (BufferGeometry) Translate ¶
func (g BufferGeometry) Translate()
type CircleGeometry ¶
type CircleGeometry struct { *js.Object Radius float64 `js:"radius"` Segments float64 `js:"segments"` ThetaStart float64 `js:"thetaStart"` ThetaLength float64 `js:"thetaLength"` }
func NewCircleGeometry ¶
func NewCircleGeometry(params CircleGeometryParameters) CircleGeometry
NewBoxGeometry creates a new BoxGeometry.
func (CircleGeometry) ApplyMatrix ¶
func (g CircleGeometry) ApplyMatrix(matrix *Matrix4)
func (CircleGeometry) Center ¶
func (g CircleGeometry) Center()
func (CircleGeometry) ComputeBoundingBox ¶
func (g CircleGeometry) ComputeBoundingBox()
func (CircleGeometry) ComputeBoundingSphere ¶
func (g CircleGeometry) ComputeBoundingSphere()
func (CircleGeometry) ComputeFaceNormals ¶
func (g CircleGeometry) ComputeFaceNormals()
func (CircleGeometry) ComputeFlatVertexNormals ¶
func (g CircleGeometry) ComputeFlatVertexNormals()
func (CircleGeometry) ComputeLineDistances ¶
func (g CircleGeometry) ComputeLineDistances()
func (CircleGeometry) ComputeMorphNormals ¶
func (g CircleGeometry) ComputeMorphNormals()
func (CircleGeometry) ComputeVertexNormals ¶
func (g CircleGeometry) ComputeVertexNormals(areaWeighted bool)
func (CircleGeometry) Copy ¶
func (g CircleGeometry) Copy(source Object3D, recursive bool) *CircleGeometry
func (CircleGeometry) Dispose ¶
func (g CircleGeometry) Dispose()
func (CircleGeometry) FromBufferGeometry ¶
func (g CircleGeometry) FromBufferGeometry(geometry Geometry)
func (CircleGeometry) LookAt ¶
func (g CircleGeometry) LookAt()
func (CircleGeometry) Merge ¶
func (g CircleGeometry) Merge(geometry Geometry, matrix Matrix4, materialIndexOffset float64)
func (CircleGeometry) MergeMesh ¶
func (g CircleGeometry) MergeMesh(mesh Mesh)
func (CircleGeometry) MergeVertices ¶
func (g CircleGeometry) MergeVertices()
func (CircleGeometry) Normalize ¶
func (g CircleGeometry) Normalize() CircleGeometry
func (CircleGeometry) RotateX ¶
func (g CircleGeometry) RotateX()
func (CircleGeometry) RotateY ¶
func (g CircleGeometry) RotateY()
func (CircleGeometry) RotateZ ¶
func (g CircleGeometry) RotateZ()
func (CircleGeometry) Scale ¶
func (g CircleGeometry) Scale()
func (CircleGeometry) SortFacesByMaterialIndex ¶
func (g CircleGeometry) SortFacesByMaterialIndex()
func (CircleGeometry) ToJSON ¶
func (g CircleGeometry) ToJSON() interface{}
func (CircleGeometry) Translate ¶
func (g CircleGeometry) 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.
type DirectionalLight ¶
type DirectionalLight struct { *js.Object Position *Vector3 `js:"position"` MatrixAutoUpdate bool `js:"matrixAutoUpdate"` }
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)
func (*DirectionalLight) ApplyMatrix ¶
func (obj *DirectionalLight) ApplyMatrix(matrix *Matrix4)
func (*DirectionalLight) GetObjectById ¶
func (obj *DirectionalLight) GetObjectById(id int) *js.Object
func (*DirectionalLight) Remove ¶
func (obj *DirectionalLight) Remove(m *js.Object)
func (*DirectionalLight) ToJSON ¶
func (obj *DirectionalLight) ToJSON() interface{}
func (*DirectionalLight) UpdateMatrix ¶
func (obj *DirectionalLight) UpdateMatrix()
type Euler ¶
type Euler struct { *js.Object X float64 `js:"x"` Y float64 `js:"y"` Z float64 `js:"z"` Order float64 `js:"order"` }
Euler - represents a Euler.
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 { *js.Object Color string `js:"color"` Near float64 `js:"near"` Far float64 `js:"far"` }
func (*Fog) ApplyMatrix ¶
func (*Fog) UpdateMatrix ¶
func (obj *Fog) UpdateMatrix()
type Geometry ¶
type Geometry interface { ApplyMatrix(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() interface{} // Clone() // Copy(source Object3D) Dispose() // contains filtered or unexported methods }
type Group ¶
type Group struct { *js.Object 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"` }
Group is almost identical to an Object3D. Its purpose is to make working with groups of objects syntactically clearer.
func (*Group) ApplyMatrix ¶
func (*Group) UpdateMatrix ¶
func (obj *Group) UpdateMatrix()
type Line ¶
type Line struct { *js.Object 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"` }
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) ApplyMatrix ¶
func (*Line) UpdateMatrix ¶
func (obj *Line) UpdateMatrix()
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{}) interface{}
type LineSegments ¶
type LineSegments struct { *js.Object 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"` }
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)
func (*LineSegments) ApplyMatrix ¶
func (obj *LineSegments) ApplyMatrix(matrix *Matrix4)
func (*LineSegments) GetObjectById ¶
func (obj *LineSegments) GetObjectById(id int) *js.Object
func (*LineSegments) Remove ¶
func (obj *LineSegments) Remove(m *js.Object)
func (*LineSegments) ToJSON ¶
func (obj *LineSegments) ToJSON() interface{}
func (*LineSegments) UpdateMatrix ¶
func (obj *LineSegments) UpdateMatrix()
type Material ¶
type Material interface { OnBeforeCompile() SetValues(values MaterialParameters) ToJSON(meta interface{}) interface{} Clone() Copy(source Object3D) Dispose() // contains filtered or unexported methods }
type MaterialParameters ¶
type MaterialParameters struct { *js.Object Color *Color `js:"color"` Shading Shading `js:"shading"` Side Side `js:"side"` Transparent bool `js:"transparent"` Opacity float64 `js:"opacity"` Map *js.Object `js:"map"` }
func NewMaterialParameters ¶
func NewMaterialParameters() *MaterialParameters
type Mesh ¶
type Mesh struct { *js.Object ID int `js:"id"` Position *Vector3 `js:"position"` Rotation *Euler `js:"rotation"` Geometry Geometry `js:"geometry"` Material Material `js:"material"` MatrixAutoUpdate bool `js:"matrixAutoUpdate"` }
func (*Mesh) ApplyMatrix ¶
func (Mesh) SetRotationFromAxisAngle ¶
func (*Mesh) UpdateMatrix ¶
func (obj *Mesh) UpdateMatrix()
type MeshBasicMaterial ¶
func NewMeshBasicMaterial ¶
func NewMeshBasicMaterial(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{}) interface{}
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{}) interface{}
type MeshPhongMaterial ¶
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{}) interface{}
type PerspectiveCamera ¶
type PerspectiveCamera struct { *js.Object Position Vector3 `js:"position"` MatrixAutoUpdate bool `js:"matrixAutoUpdate"` Aspect float64 `js:"aspect"` }
func NewPerspectiveCamera ¶
func NewPerspectiveCamera(fov, aspect, near, far float64) PerspectiveCamera
func (PerspectiveCamera) ClearViewOffset ¶
func (c PerspectiveCamera) ClearViewOffset()
func (PerspectiveCamera) Copy ¶
func (c PerspectiveCamera) Copy() PerspectiveCamera
func (PerspectiveCamera) GetEffectiveFOV ¶
func (c PerspectiveCamera) GetEffectiveFOV() float64
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) LookAt ¶
func (c PerspectiveCamera) LookAt(x, y, z float64)
func (PerspectiveCamera) SetFocalLength ¶
func (c PerspectiveCamera) SetFocalLength(focalLength float64)
func (PerspectiveCamera) SetViewOffset ¶
func (c PerspectiveCamera) SetViewOffset(fullWidth, fullHeight, x, y, width, height float64)
func (PerspectiveCamera) ToJSON ¶
func (c PerspectiveCamera) ToJSON(meta interface{}) interface{}
func (PerspectiveCamera) UpdateProjectionMatrix ¶
func (c PerspectiveCamera) UpdateProjectionMatrix()
type PerspectiveCameraPosition ¶
type PerspectiveCameraPosition struct {
Z int
}
type Quaternion ¶
Quaternion - represents a Quaternion.
func NewQuaternion ¶
func NewQuaternion() Quaternion
type Raycaster ¶
type Raycaster struct { *js.Object Far float64 `js:"far"` Near float64 `js:"near"` LinePrecision float64 `js:"linePrecision"` }
Raycaster assists with raycasting (used for mouse picking) See https://threejs.org/docs/#api/en/core/Raycaster
func (Raycaster) IntersectObjects ¶
func (Raycaster) SetFromCamera ¶
func (r Raycaster) SetFromCamera(coords Vector2, camera PerspectiveCamera)
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 TODO(divan): abstract camera away
type Scene ¶
type Scene struct { *js.Object AutoUpdate bool `js:"autoUpdate"` Background *Color `js:"background"` }
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) ApplyMatrix ¶
func (*Scene) UpdateMatrix ¶
func (obj *Scene) UpdateMatrix()
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 { *js.Object Radius float64 `js:"radius"` Segments float64 `js:"segments"` ThetaStart float64 `js:"thetaStart"` ThetaLength float64 `js:"thetaLength"` }
func NewSphereGeometry ¶
func NewSphereGeometry(params SphereGeometryParameters) SphereGeometry
NewSphereGeometry creates a new BoxGeometry.
func (SphereGeometry) ApplyMatrix ¶
func (g SphereGeometry) ApplyMatrix(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() interface{}
func (SphereGeometry) Translate ¶
func (g SphereGeometry) Translate()
type Sprite ¶
type Sprite struct { *js.Object 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"` }
Sprite is a plane that always faces towards the camera, generally with a partially transparent texture applied.
func (*Sprite) ApplyMatrix ¶
func (*Sprite) UpdateMatrix ¶
func (obj *Sprite) UpdateMatrix()
type SpriteMaterial ¶
func NewSpriteMaterial ¶
func NewSpriteMaterial(texture *js.Object) *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{}) interface{}
type TextSprite ¶
type TextSprite struct { *js.Object 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"` }
func NewTextSprite ¶
func NewTextSprite(text, align string, textSize int, color *Color) *TextSprite
func (*TextSprite) Add ¶
func (obj *TextSprite) Add(m Object3D)
func (*TextSprite) ApplyMatrix ¶
func (obj *TextSprite) ApplyMatrix(matrix *Matrix4)
func (*TextSprite) GetObjectById ¶
func (obj *TextSprite) GetObjectById(id int) *js.Object
func (*TextSprite) Remove ¶
func (obj *TextSprite) Remove(m *js.Object)
func (*TextSprite) ToJSON ¶
func (obj *TextSprite) ToJSON() interface{}
func (*TextSprite) UpdateMatrix ¶
func (obj *TextSprite) UpdateMatrix()
type TextSpriteMaterial ¶
type TextSpriteParameters ¶
type TextSpriteParameters struct { *js.Object TextSize int `js:"textSize"` RedrawInterval int `js:"redrawInterval"` Material *TextSpriteMaterial `js:"material"` Texture *TextTextureParams `js:"texture"` }
type TextTextureParams ¶
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 WebGLRenderer ¶
The WebGLRenderer displays your beautifully crafted scenes using WebGL.
func NewWebGLRenderer ¶
func NewWebGLRenderer() WebGLRenderer
WebGLRenderer creates an WebGLRenderer instance.
func (WebGLRenderer) Render ¶
func (r WebGLRenderer) Render(scene *Scene, camera PerspectiveCamera)
func (WebGLRenderer) SetPixelRatio ¶
func (r WebGLRenderer) SetPixelRatio(ratio float64)
Source Files ¶
- buffer_attrbiute.go
- cameras_perspective_camera.go
- core_face3.go
- core_geometry.go
- core_object3d.go
- gen_geometry_basic_geometry.go
- gen_geometry_box_geometry.go
- gen_geometry_buffer_geometry.go
- gen_geometry_circle_geometry.go
- gen_geometry_sphere_geometry.go
- gen_material_line_basic_material.go
- gen_material_mesh_basic_material.go
- gen_material_mesh_lambert_material.go
- gen_material_mesh_phong_material.go
- gen_material_sprite_material.go
- gen_object3d_ambient_light.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_scene.go
- gen_object3d_sprite.go
- gen_object3d_text_sprite.go
- geometries_basic_geometry.go
- geometries_box_geometry.go
- geometries_buffer_geometry.go
- geometries_circle_geometry.go
- geometries_sphere_geometry.go
- lights_ambient_light.go
- lights_directional_light.go
- main.go
- materials_line_basic_material.go
- materials_material.go
- materials_mesh_basic_material.go
- materials_mesh_lambert_material.go
- materials_mesh_phong_material.go
- materials_sprite_material.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_sprite.go
- objects_text_sprite.go
- raycaster.go
- renderers_webgl_renderer.go
- scenes_fog.go
- scenes_scene.go
- texture_loader.go