three

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package three provides a gopherjs binding to the JavaScript three.js library. See http://threejs.org/ for more information.

Index

Examples

Constants

View Source
const (
	CullFaceNone      = 0
	CullFaceBack      = 1
	CullFaceFront     = 2
	CullFaceFrontBack = 3

	FrontFaceDirectionCW  = 0
	FrontFaceDirectionCCW = 1

	BasicShadowMap   = 0
	PCFShadowMap     = 1
	PCFSoftShadowMap = 2

	FrontSide  = 0
	BackSide   = 1
	DoubleSide = 2

	FlatShading   = 1
	SmoothShading = 2

	NoColors     = 0
	FaceColors   = 1
	VertexColors = 2

	NoBlending          = 0
	NormalBlending      = 1
	AdditiveBlending    = 2
	SubtractiveBlending = 3
	MultiplyBlending    = 4
	CustomBlending      = 5

	AddEquation             = 100
	SubtractEquation        = 101
	ReverseSubtractEquation = 102
	MinEquation             = 103
	MaxEquation             = 104

	ZeroFactor             = 200
	OneFactor              = 201
	SrcColorFactor         = 202
	OneMinusSrcColorFactor = 203
	SrcAlphaFactor         = 204
	OneMinusSrcAlphaFactor = 205
	DstAlphaFactor         = 206
	OneMinusDstAlphaFactor = 207

	DstColorFactor         = 208
	OneMinusDstColorFactor = 209
	SrcAlphaSaturateFactor = 210

	NeverDepth        = 0
	AlwaysDepth       = 1
	LessDepth         = 2
	LessEqualDepth    = 3
	EqualDepth        = 4
	GreaterEqualDepth = 5
	GreaterDepth      = 6
	NotEqualDepth     = 7

	MultiplyOperation = 0
	MixOperation      = 1
	AddOperation      = 2

	NoToneMapping         = 0 // do not do any tone mapping, not even exposure (required for special purpose passes.)
	LinearToneMapping     = 1 // only apply exposure.
	ReinhardToneMapping   = 2
	Uncharted2ToneMapping = 3 // John Hable
	CineonToneMapping     = 4 // optimized filmic operator by Jim Hejl and Richard Burgess-Dawson

	UVMapping = 300

	CubeReflectionMapping = 301
	CubeRefractionMapping = 302

	EquirectangularReflectionMapping = 303
	EquirectangularRefractionMapping = 304

	SphericalReflectionMapping = 305
	CubeUVReflectionMapping    = 306
	CubeUVRefractionMapping    = 307

	RepeatWrapping         = 1000
	ClampToEdgeWrapping    = 1001
	MirroredRepeatWrapping = 1002

	NearestFilter              = 1003
	NearestMipMapNearestFilter = 1004
	NearestMipMapLinearFilter  = 1005
	LinearFilter               = 1006
	LinearMipMapNearestFilter  = 1007
	LinearMipMapLinearFilter   = 1008

	UnsignedByteType  = 1009
	ByteType          = 1010
	ShortType         = 1011
	UnsignedShortType = 1012
	IntType           = 1013
	UnsignedIntType   = 1014
	FloatType         = 1015
	HalfFloatType     = 1025

	UnsignedShort4444Type = 1016
	UnsignedShort5551Type = 1017
	UnsignedShort565Type  = 1018

	AlphaFormat          = 1019
	RGBFormat            = 1020
	RGBAFormat           = 1021
	LuminanceFormat      = 1022
	LuminanceAlphaFormat = 1023
	// RGBEFormat handled as RGBAFormat in shaders
	RGBEFormat = RGBAFormat //1024

	RGBS3TCDXT1Format  = 2001
	RGBAS3TCDXT1Format = 2002
	RGBAS3TCDXT3Format = 2003
	RGBAS3TCDXT5Format = 2004

	RGBPVRTC4BPPV1Format  = 2100
	RGBPVRTC2BPPV1Format  = 2101
	RGBAPVRTC4BPPV1Format = 2102
	RGBAPVRTC2BPPV1Format = 2103

	RGBETC1Format = 2151

	LoopOnce     = 2200
	LoopRepeat   = 2201
	LoopPingPong = 2202

	InterpolateDiscrete = 2300
	InterpolateLinear   = 2301
	InterpolateSmooth   = 2302

	ZeroCurvatureEnding = 2400
	ZeroSlopeEnding     = 2401
	WrapAroundEnding    = 2402

	TrianglesDrawMode     = 0
	TriangleStripDrawMode = 1
	TriangleFanDrawMode   = 2

	LinearEncoding = 3000 // No encoding at all.

	GammaEncoding = 3007 // uses GAMMA_FACTOR, for backwards compatibility with WebGLRenderer.gammaInput/gammaOutput

	RGBEEncoding   = 3002 // AKA Radiance.
	LogLuvEncoding = 3003
	RGBM7Encoding  = 3004
	RGBM16Encoding = 3005
	RGBDEncoding   = 3006 // MaxRange is 256.
)

GL Constants

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that returns a *bool.

func Float64

func Float64(v float64) *float64

Float64 is a helper routine that returns a *float64.

func Int

func Int(v int) *int

Int is a helper routine that returns a *int.

func String

func String(v string) *string

String is a helper routine that returns a *string.

Types

type AmbientLight

type AmbientLight struct{ *Light }

AmbientLight is a color light that gets applied to all the objects in the scene globally.

http://threejs.org/docs/index.html#Reference/Lights/AmbientLight

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	light := t.NewAmbientLight(0x404040, 1) // soft white light
	scene.Add(light)
}
Output:

func AmbientLightFromJSObject

func AmbientLightFromJSObject(p *js.Object) *AmbientLight

AmbientLightFromJSObject returns a wrapped AmbientLight JavaScript class.

func (*AmbientLight) JSObject

func (a *AmbientLight) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type AnimationClip

type AnimationClip struct {
	// contains filtered or unexported fields
}

AnimationClip represents an animationclip.

func AnimationClipFromJSObject

func AnimationClipFromJSObject(p *js.Object) *AnimationClip

AnimationClipFromJSObject returns a wrapped AnimationClip JavaScript class.

func (*AnimationClip) CreateClipsFromMorphTargetSequences

func (a *AnimationClip) CreateClipsFromMorphTargetSequences(morphTargets, fps float64) *AnimationClip

CreateClipsFromMorphTargetSequences TODO description.

func (*AnimationClip) CreateFromMorphTargetSequence

func (a *AnimationClip) CreateFromMorphTargetSequence(name, morphTargetSequence, fps float64) *AnimationClip

CreateFromMorphTargetSequence TODO description.

func (*AnimationClip) FindByName

func (a *AnimationClip) FindByName(clipArray, name float64) *AnimationClip

FindByName TODO description.

func (*AnimationClip) JSObject

func (a *AnimationClip) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*AnimationClip) Optimize

func (a *AnimationClip) Optimize() *AnimationClip

Optimize TODO description.

func (*AnimationClip) Parse

func (a *AnimationClip) Parse(json float64) *AnimationClip

Parse TODO description.

func (*AnimationClip) ParseAnimation

func (a *AnimationClip) ParseAnimation(animation, bones, nodeName float64) *AnimationClip

ParseAnimation TODO description.

func (*AnimationClip) ResetDuration

func (a *AnimationClip) ResetDuration() *AnimationClip

ResetDuration TODO description.

func (*AnimationClip) ToJSON

func (a *AnimationClip) ToJSON(clip float64) *AnimationClip

ToJSON TODO description.

func (*AnimationClip) Trim

func (a *AnimationClip) Trim() *AnimationClip

Trim TODO description.

type AnimationLoader

type AnimationLoader struct {
	// contains filtered or unexported fields
}

AnimationLoader represents an animationloader.

func AnimationLoaderFromJSObject

func AnimationLoaderFromJSObject(p *js.Object) *AnimationLoader

AnimationLoaderFromJSObject returns a wrapped AnimationLoader JavaScript class.

func (*AnimationLoader) JSObject

func (a *AnimationLoader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*AnimationLoader) Load

func (a *AnimationLoader) Load(url, onLoad, onProgress, onError float64) *AnimationLoader

Load TODO description.

func (*AnimationLoader) Parse

func (a *AnimationLoader) Parse(json, onLoad float64) *AnimationLoader

Parse TODO description.

type AnimationMixer

type AnimationMixer struct {
	// contains filtered or unexported fields
}

AnimationMixer represents an animationmixer.

func AnimationMixerFromJSObject

func AnimationMixerFromJSObject(p *js.Object) *AnimationMixer

AnimationMixerFromJSObject returns a wrapped AnimationMixer JavaScript class.

func (*AnimationMixer) ClipAction

func (a *AnimationMixer) ClipAction(clip, optionalRoot float64) *AnimationMixer

ClipAction TODO description.

func (*AnimationMixer) CrossFadeFrom

func (a *AnimationMixer) CrossFadeFrom(fadeOutAction, duration, warp float64) *AnimationMixer

CrossFadeFrom TODO description.

func (*AnimationMixer) CrossFadeTo

func (a *AnimationMixer) CrossFadeTo(fadeInAction, duration, warp float64) *AnimationMixer

CrossFadeTo TODO description.

func (*AnimationMixer) ExistingAction

func (a *AnimationMixer) ExistingAction(clip, optionalRoot float64) *AnimationMixer

ExistingAction TODO description.

func (*AnimationMixer) FadeIn

func (a *AnimationMixer) FadeIn(duration float64) *AnimationMixer

FadeIn TODO description.

func (*AnimationMixer) FadeOut

func (a *AnimationMixer) FadeOut(duration float64) *AnimationMixer

FadeOut TODO description.

func (*AnimationMixer) GetClip

func (a *AnimationMixer) GetClip() *AnimationMixer

GetClip TODO description.

func (*AnimationMixer) GetEffectiveTimeScale

func (a *AnimationMixer) GetEffectiveTimeScale() *AnimationMixer

GetEffectiveTimeScale TODO description.

func (*AnimationMixer) GetEffectiveWeight

func (a *AnimationMixer) GetEffectiveWeight() *AnimationMixer

GetEffectiveWeight TODO description.

func (*AnimationMixer) GetMixer

func (a *AnimationMixer) GetMixer() *AnimationMixer

GetMixer TODO description.

func (*AnimationMixer) GetRoot

func (a *AnimationMixer) GetRoot() *AnimationMixer

GetRoot TODO description.

func (*AnimationMixer) Halt

func (a *AnimationMixer) Halt(duration float64) *AnimationMixer

Halt TODO description.

func (*AnimationMixer) InUse

func (a *AnimationMixer) InUse() float64

InUse returns the inUse-component of the AnimationMixer.

func (*AnimationMixer) IsRunning

func (a *AnimationMixer) IsRunning() *AnimationMixer

IsRunning TODO description.

func (*AnimationMixer) IsScheduled

func (a *AnimationMixer) IsScheduled() *AnimationMixer

IsScheduled TODO description.

func (*AnimationMixer) JSObject

func (a *AnimationMixer) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*AnimationMixer) Play

func (a *AnimationMixer) Play() *AnimationMixer

Play TODO description.

func (*AnimationMixer) Reset

func (a *AnimationMixer) Reset() *AnimationMixer

Reset TODO description.

func (*AnimationMixer) SetDuration

func (a *AnimationMixer) SetDuration(duration float64) *AnimationMixer

SetDuration TODO description.

func (*AnimationMixer) SetEffectiveTimeScale

func (a *AnimationMixer) SetEffectiveTimeScale(timeScale float64) *AnimationMixer

SetEffectiveTimeScale TODO description.

func (*AnimationMixer) SetEffectiveWeight

func (a *AnimationMixer) SetEffectiveWeight(weight float64) *AnimationMixer

SetEffectiveWeight TODO description.

func (*AnimationMixer) SetLoop

func (a *AnimationMixer) SetLoop(mode, repetitions float64) *AnimationMixer

SetLoop TODO description.

func (*AnimationMixer) StartAt

func (a *AnimationMixer) StartAt(time float64) *AnimationMixer

StartAt TODO description.

func (*AnimationMixer) Stop

func (a *AnimationMixer) Stop() *AnimationMixer

Stop TODO description.

func (*AnimationMixer) StopAllAction

func (a *AnimationMixer) StopAllAction() *AnimationMixer

StopAllAction TODO description.

func (*AnimationMixer) StopFading

func (a *AnimationMixer) StopFading() *AnimationMixer

StopFading TODO description.

func (*AnimationMixer) StopWarping

func (a *AnimationMixer) StopWarping() *AnimationMixer

StopWarping TODO description.

func (*AnimationMixer) SyncWith

func (a *AnimationMixer) SyncWith(action float64) *AnimationMixer

SyncWith TODO description.

func (*AnimationMixer) Total

func (a *AnimationMixer) Total() float64

Total returns the total-component of the AnimationMixer.

func (*AnimationMixer) UncacheAction

func (a *AnimationMixer) UncacheAction(clip, optionalRoot float64) *AnimationMixer

UncacheAction TODO description.

func (*AnimationMixer) UncacheClip

func (a *AnimationMixer) UncacheClip(clip float64) *AnimationMixer

UncacheClip TODO description.

func (*AnimationMixer) UncacheRoot

func (a *AnimationMixer) UncacheRoot(root float64) *AnimationMixer

UncacheRoot TODO description.

func (*AnimationMixer) Update

func (a *AnimationMixer) Update(deltaTime float64) *AnimationMixer

Update TODO description.

func (*AnimationMixer) Warp

func (a *AnimationMixer) Warp(startTimeScale, endTimeScale, duration float64) *AnimationMixer

Warp TODO description.

type AnimationObjectGroup

type AnimationObjectGroup struct {
	// contains filtered or unexported fields
}

AnimationObjectGroup represents an animationobjectgroup.

func AnimationObjectGroupFromJSObject

func AnimationObjectGroupFromJSObject(p *js.Object) *AnimationObjectGroup

AnimationObjectGroupFromJSObject returns a wrapped AnimationObjectGroup JavaScript class.

func (*AnimationObjectGroup) Add

Add TODO description.

func (*AnimationObjectGroup) BindingsPerObject

func (a *AnimationObjectGroup) BindingsPerObject() float64

BindingsPerObject returns the bindingsPerObject-component of the AnimationObjectGroup.

func (*AnimationObjectGroup) InUse

func (a *AnimationObjectGroup) InUse() float64

InUse returns the inUse-component of the AnimationObjectGroup.

func (*AnimationObjectGroup) JSObject

func (a *AnimationObjectGroup) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*AnimationObjectGroup) Remove

Remove TODO description.

func (*AnimationObjectGroup) Subscribe

func (a *AnimationObjectGroup) Subscribe(path, parsedPath float64) *AnimationObjectGroup

Subscribe TODO description.

func (*AnimationObjectGroup) Total

func (a *AnimationObjectGroup) Total() float64

Total returns the total-component of the AnimationObjectGroup.

func (*AnimationObjectGroup) Uncache

func (a *AnimationObjectGroup) Uncache(varArgs JSObject) *AnimationObjectGroup

Uncache TODO description.

func (*AnimationObjectGroup) Unsubscribe

func (a *AnimationObjectGroup) Unsubscribe(path float64) *AnimationObjectGroup

Unsubscribe TODO description.

type AnimationUtils

type AnimationUtils struct {
	// contains filtered or unexported fields
}

AnimationUtils represents an animationutils.

func AnimationUtilsFromJSObject

func AnimationUtilsFromJSObject(p *js.Object) *AnimationUtils

AnimationUtilsFromJSObject returns a wrapped AnimationUtils JavaScript class.

func (*AnimationUtils) ArraySlice

func (a *AnimationUtils) ArraySlice(array, from, to float64) *AnimationUtils

ArraySlice TODO description.

func (*AnimationUtils) ConvertArray

func (a *AnimationUtils) ConvertArray(array, typ, forceClone float64) *AnimationUtils

ConvertArray TODO description.

func (*AnimationUtils) FlattenJSON

func (a *AnimationUtils) FlattenJSON(jsonKeys, times, values, valuePropertyName float64) *AnimationUtils

FlattenJSON TODO description.

func (*AnimationUtils) GetKeyframeOrder

func (a *AnimationUtils) GetKeyframeOrder(times float64) *AnimationUtils

GetKeyframeOrder TODO description.

func (*AnimationUtils) IsTypedArray

func (a *AnimationUtils) IsTypedArray(object float64) *AnimationUtils

IsTypedArray TODO description.

func (*AnimationUtils) JSObject

func (a *AnimationUtils) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*AnimationUtils) SortedArray

func (a *AnimationUtils) SortedArray(values, stride, order float64) *AnimationUtils

SortedArray TODO description.

type ArcCurve

type ArcCurve struct{ *EllipseCurve }

ArcCurve represents an arc curve which is an EllipseCurve.

http://threejs.org/docs/index.html#Reference/Extras.Curves/ArcCurve

func ArcCurveFromJSObject

func ArcCurveFromJSObject(p *js.Object) *ArcCurve

ArcCurveFromJSObject returns a wrapped ArcCurve JavaScript class.

func (*ArcCurve) JSObject

func (a *ArcCurve) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type ArrowHelper

type ArrowHelper struct{ *Object3D }

ArrowHelper represents a 3D arrow object.

http://threejs.org/docs/index.html#Reference/Extras.Helpers/ArrowHelper

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	dir := t.NewVector3(1, 0, 0)
	origin := t.NewVector3(0, 0, 0)
	opts := &three.ArrowHelperOpts{
		Length: three.Float64(1),
		Color:  t.NewColor(0xffff00),
	}
	arrowHelper := t.NewArrowHelper(dir, origin, opts)
	scene.Add(arrowHelper)
}
Output:

func ArrowHelperFromJSObject

func ArrowHelperFromJSObject(p *js.Object) *ArrowHelper

ArrowHelperFromJSObject returns a wrapped ArrowHelper JavaScript class.

func (*ArrowHelper) JSObject

func (a *ArrowHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*ArrowHelper) SetColor

func (a *ArrowHelper) SetColor(color float64) *ArrowHelper

SetColor TODO description.

func (*ArrowHelper) SetLength

func (a *ArrowHelper) SetLength(length, headLength, headWidth float64) *ArrowHelper

SetLength TODO description.

type ArrowHelperOpts

type ArrowHelperOpts struct {
	Length     *float64
	Color      *Color
	HeadLength *float64
	HeadWidth  *float64
}

ArrowHelperOpts represents optional arguments that can be passed to NewArrowHelper.

type Audio

type Audio struct {
	// contains filtered or unexported fields
}

Audio represents an audio.

func AudioFromJSObject

func AudioFromJSObject(p *js.Object) *Audio

AudioFromJSObject returns a wrapped Audio JavaScript class.

func (*Audio) JSObject

func (a *Audio) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Audio) Load

func (a *Audio) Load(file float64) *Audio

Load TODO description.

func (*Audio) SetBuffer

func (a *Audio) SetBuffer(audioBuffer float64) *Audio

SetBuffer TODO description.

func (*Audio) SetFilter

func (a *Audio) SetFilter(value float64) *Audio

SetFilter TODO description.

func (*Audio) SetLoop

func (a *Audio) SetLoop(value float64) *Audio

SetLoop TODO description.

func (*Audio) SetNodeSource

func (a *Audio) SetNodeSource(audioNode float64) *Audio

SetNodeSource TODO description.

func (*Audio) SetPlaybackRate

func (a *Audio) SetPlaybackRate(value float64) *Audio

SetPlaybackRate TODO description.

func (*Audio) SetVolume

func (a *Audio) SetVolume(value float64) *Audio

SetVolume TODO description.

type AudioAnalyser

type AudioAnalyser struct {
	// contains filtered or unexported fields
}

AudioAnalyser represents an audioanalyser.

func AudioAnalyserFromJSObject

func AudioAnalyserFromJSObject(p *js.Object) *AudioAnalyser

AudioAnalyserFromJSObject returns a wrapped AudioAnalyser JavaScript class.

func (*AudioAnalyser) GetData

func (a *AudioAnalyser) GetData() *AudioAnalyser

GetData TODO description.

func (*AudioAnalyser) JSObject

func (a *AudioAnalyser) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type AudioBuffer

type AudioBuffer struct {
	// contains filtered or unexported fields
}

AudioBuffer represents an audiobuffer.

func AudioBufferFromJSObject

func AudioBufferFromJSObject(p *js.Object) *AudioBuffer

AudioBufferFromJSObject returns a wrapped AudioBuffer JavaScript class.

func (*AudioBuffer) JSObject

func (a *AudioBuffer) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*AudioBuffer) Load

func (a *AudioBuffer) Load(file float64) *AudioBuffer

Load TODO description.

func (*AudioBuffer) OnReady

func (a *AudioBuffer) OnReady(callback float64) *AudioBuffer

OnReady TODO description.

type AudioListener

type AudioListener struct {
	// contains filtered or unexported fields
}

AudioListener represents an audiolistener.

func AudioListenerFromJSObject

func AudioListenerFromJSObject(p *js.Object) *AudioListener

AudioListenerFromJSObject returns a wrapped AudioListener JavaScript class.

func (*AudioListener) JSObject

func (a *AudioListener) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*AudioListener) RemoveFilter

func (a *AudioListener) RemoveFilter(float64) *AudioListener

RemoveFilter TODO description.

func (*AudioListener) SetFilter

func (a *AudioListener) SetFilter(value float64) *AudioListener

SetFilter TODO description.

func (*AudioListener) SetMasterVolume

func (a *AudioListener) SetMasterVolume(value float64) *AudioListener

SetMasterVolume TODO description.

type AxisHelper

type AxisHelper struct{ *LineSegments }

AxisHelper is an axis object to visualize the 3 axes in a simple way. The X axis is red. The Y axis is green. The Z axis is blue.

http://threejs.org/docs/index.html#Reference/Extras.Helpers/AxisHelper

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	axisHelper := t.NewAxisHelper(5)
	scene.Add(axisHelper)
}
Output:

func AxisHelperFromJSObject

func AxisHelperFromJSObject(p *js.Object) *AxisHelper

AxisHelperFromJSObject returns a wrapper AxisHelper JavaScript class.

func (*AxisHelper) JSObject

func (a *AxisHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type BinaryTextureLoader

type BinaryTextureLoader struct {
	// contains filtered or unexported fields
}

BinaryTextureLoader represents a binarytextureloader.

func BinaryTextureLoaderFromJSObject

func BinaryTextureLoaderFromJSObject(p *js.Object) *BinaryTextureLoader

BinaryTextureLoaderFromJSObject returns a wrapped BinaryTextureLoader JavaScript class.

func (*BinaryTextureLoader) JSObject

func (b *BinaryTextureLoader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*BinaryTextureLoader) Load

func (b *BinaryTextureLoader) Load(url, onLoad, onProgress, onError float64) *BinaryTextureLoader

Load TODO description.

type Bone

type Bone struct{ *Object3D }

Bone represents a bone which is part of a skeleton. The skeleton in turn is used by the SkinnedMesh. Bones are almost identical to a blank Object3D.

http://threejs.org/docs/index.html#Reference/Objects/Bone

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()

	root := t.NewBone(0)
	child := t.NewBone(0)

	root.Add(child)
	child.Position().SetY(5)
}
Output:

func BoneFromJSObject

func BoneFromJSObject(p *js.Object) *Bone

BoneFromJSObject returns a wrapped Bone JavaScript class.

func (*Bone) Copy

func (b *Bone) Copy(source *Bone) *Bone

Copy TODO description.

func (*Bone) JSObject

func (b *Bone) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type BooleanKeyframeTrack

type BooleanKeyframeTrack struct {
	// contains filtered or unexported fields
}

BooleanKeyframeTrack represents a booleankeyframetrack.

func BooleanKeyframeTrackFromJSObject

func BooleanKeyframeTrackFromJSObject(p *js.Object) *BooleanKeyframeTrack

BooleanKeyframeTrackFromJSObject returns a wrapped BooleanKeyframeTrack JavaScript class.

func (*BooleanKeyframeTrack) JSObject

func (b *BooleanKeyframeTrack) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type BoundingBoxHelper

type BoundingBoxHelper struct{ *Mesh }

BoundingBoxHelper is a helper object to show the world-axis-aligned bounding box for an object.

http://threejs.org/docs/index.html#Reference/Extras.Helpers/BoundingBoxHelper

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	hex := 0xff0000

	opts := three.MeshLambertMaterialOpts{
		"color": 0x00ff00,
	}
	sphereMaterial := t.NewMeshLambertMaterial(opts)
	sphere := t.NewMesh(t.NewSphereGeometry(30, 12, 12, nil), sphereMaterial)
	scene.Add(sphere)

	bbox := t.NewBoundingBoxHelper(sphere, hex)
	bbox.Update()
	scene.Add(bbox)
}
Output:

func BoundingBoxHelperFromJSObject

func BoundingBoxHelperFromJSObject(p *js.Object) *BoundingBoxHelper

BoundingBoxHelperFromJSObject returns a wrapped BoundingBoxHelper JavaScript class.

func (*BoundingBoxHelper) JSObject

func (b *BoundingBoxHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*BoundingBoxHelper) Update

func (b *BoundingBoxHelper) Update() *BoundingBoxHelper

Update updates the BoundingBoxHelper based on the object property.

type Box2

type Box2 struct {
	// contains filtered or unexported fields
}

Box2 represents a boundary box in 2D space.

http://threejs.org/docs/index.html#Reference/Math/Box2

func Box2FromJSObject

func Box2FromJSObject(p *js.Object) *Box2

Box2FromJSObject returns a wrapped Box2 JavaScript class.

func (*Box2) Center

func (b *Box2) Center(optionalTarget float64) *Box2

Center TODO description.

func (*Box2) ClampPoint

func (b *Box2) ClampPoint(point, optionalTarget float64) *Box2

ClampPoint clamps point within the bounds of this box.

point is the position to clamp.
optionalTarget, if specified, is where the clamped result will be copied.

func (*Box2) Clone

func (b *Box2) Clone() *Box2

Clone TODO description.

func (*Box2) ContainsBox

func (b *Box2) ContainsBox(box float64) *Box2

ContainsBox returns true if this box includes the entirety of box. If this and box overlap exactly, this function also returns true.

box to test for inclusion.

func (*Box2) ContainsPoint

func (b *Box2) ContainsPoint(point float64) *Box2

ContainsPoint returns true if the specified point lies within the boundaries of this box.

point is a Vector2 object that is used to check for inclusion.

func (*Box2) Copy

func (b *Box2) Copy(box *Box2) *Box2

Copy TODO description.

func (*Box2) DistanceToPoint

func (b *Box2) DistanceToPoint() *Box2

DistanceToPoint returns the distance from any edge of this box to the specified point. If the point lies inside of this box, the distance will be 0.

Point is the point to measure distance to.

func (*Box2) Equals

func (b *Box2) Equals(box float64) *Box2

Equals returns true if this box and box share the same lower and upper bounds.

box to compare.

func (*Box2) ExpandByPoint

func (b *Box2) ExpandByPoint(point float64) *Box2

ExpandByPoint expands the boundaries of this box to include point.

point is a point that should be included in the box.

func (*Box2) ExpandByScalar

func (b *Box2) ExpandByScalar(scalar float64) *Box2

ExpandByScalar expands each dimension of the box by scalar. If negative, the dimensions of the box will be contracted.

scalar is the distance to expand.

func (*Box2) ExpandByVector

func (b *Box2) ExpandByVector(vector float64) *Box2

ExpandByVector expands this box equilaterally by vector. The width of this box will be expanded by the x component of vector in both directions. The height of this box will be expanded by the y component of vector in both directions.

vector is the amount to expand this box in each dimension.

func (*Box2) GetParameter

func (b *Box2) GetParameter(point, optionalTarget *Vector2) *Box2

GetParameter returns a point as a proportion of this box's width and height.

func (*Box2) Intersect

func (b *Box2) Intersect(box float64) *Box2

Intersect returns the intersection of this and box, setting the upper bound of this box to the lesser of the two boxes' upper bounds and the lower bound of this box to the greater of the two boxes' lower bounds.

box to intersect with.

func (*Box2) IntersectsBox

func (b *Box2) IntersectsBox(box float64) *Box2

IntersectsBox determines whether or not this box intersects box.

box to check for intersection against.

func (*Box2) IsEmpty

func (b *Box2) IsEmpty() *Box2

IsEmpty TODO description.

func (*Box2) JSObject

func (b *Box2) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Box2) MakeEmpty

func (b *Box2) MakeEmpty() *Box2

MakeEmpty TODO description.

func (*Box2) Set

func (b *Box2) Set(min, max float64) *Box2

Set sets the lower and upper (x, y) boundaries of this box.

min -- Lower (x, y) boundary of the box.
max -- Upper (x, y) boundary of the box.

func (*Box2) SetFromCenterAndSize

func (b *Box2) SetFromCenterAndSize() *Box2

SetFromCenterAndSize TODO description.

func (*Box2) SetFromPoints

func (b *Box2) SetFromPoints(points float64) *Box2

SetFromPoints TODO description.

func (*Box2) Size

func (b *Box2) Size(optionalTarget float64) *Box2

Size TODO description.

func (*Box2) Translate

func (b *Box2) Translate(offset float64) *Box2

Translate adds offset to both the upper and lower bounds of this box, effectively moving this box offset units in 2D space.

offset is th direction and distance of offset.

func (*Box2) Union

func (b *Box2) Union(box float64) *Box2

Union unions this box with box setting the upper bound of this box to the greater of the two boxes' upper bounds and the lower bound of this box to the lesser of the two boxes' lower bounds.

box that will be unioned with this box.

type Box3

type Box3 struct {
	// contains filtered or unexported fields
}

Box3 represents a bounding box in 3D space.

http://threejs.org/docs/index.html#Reference/Math/Box3

func Box3FromJSObject

func Box3FromJSObject(p *js.Object) *Box3

Box3FromJSObject returns a wrapped Box3 JavaScript class.

func (*Box3) ApplyMatrix4

func (b *Box3) ApplyMatrix4() *Box3

ApplyMatrix4 TODO description.

func (*Box3) Center

func (b *Box3) Center(optionalTarget *js.Object) *Vector3

Center returns the center point of this box.

optionalTarget, if specified, the result will be copied here.

func (*Box3) ClampPoint

func (b *Box3) ClampPoint(point, optionalTarget float64) *Box3

ClampPoint clamps point within the bounds of this box.

point is the position to clamp.
optionalTarget, if specified, the clamped result will be copied here.

func (*Box3) Clone

func (b *Box3) Clone() *Box3

Clone returns a copy of this box.

func (*Box3) ContainsBox

func (b *Box3) ContainsBox(box float64) *Box3

ContainsBox returns true if this box includes the entirety of box. If this and box overlap exactly, this function also returns true.

box to test for inclusion.

func (*Box3) ContainsPoint

func (b *Box3) ContainsPoint(point float64) *Box3

ContainsPoint returns true if the specified point lies within the boundaries of this box.

point is Vector2 to be checked for inclusion.

func (*Box3) Copy

func (b *Box3) Copy(box *Box3) *Box3

Copy copies the values of box to this box.

box is the box to copy.

func (*Box3) DistanceToPoint

func (b *Box3) DistanceToPoint() *Box3

DistanceToPoint returns the distance from any edge of this box to the specified point. If the point lies inside of this box, the distance will be 0.

point is the point to measure distance to.

func (*Box3) Equals

func (b *Box3) Equals(box float64) *Box3

Equals returns true if this box and box share the same lower and upper bounds.

box to compare.

func (*Box3) ExpandByPoint

func (b *Box3) ExpandByPoint(point float64) *Box3

ExpandByPoint expands the boundaries of this box to include point.

point is the point that should be included in the box.

func (*Box3) ExpandByScalar

func (b *Box3) ExpandByScalar(scalar float64) *Box3

ExpandByScalar expands each dimension of the box by scalar. If negative, the dimensions of the box will be contracted.

scalar is the distance to expand.

func (*Box3) ExpandByVector

func (b *Box3) ExpandByVector(vector float64) *Box3

ExpandByVector expands this box equilaterally by vector. The width of this box will be expanded by the x component of vector in both directions. The height of this box will be expanded by the y component of vector in both directions.

vector is the amount to expand this box in each dimension.

func (*Box3) GetBoundingSphere

func (b *Box3) GetBoundingSphere() *Box3

GetBoundingSphere TODO description.

func (*Box3) GetParameter

func (b *Box3) GetParameter(point, optionalTarget float64) *Box3

GetParameter Returns a point as a proportion of this box's width and height.

point is Vector2
optionalTarget is Vector2

func (*Box3) Intersect

func (b *Box3) Intersect(box float64) *Box3

Intersect returns the intersection of this and box, setting the upper bound of this box to the lesser of the two boxes' upper bounds and the lower bound of this box to the greater of the two boxes' lower bounds.

box to intersect with.

func (*Box3) IntersectsBox

func (b *Box3) IntersectsBox(box float64) *Box3

IntersectsBox Determines whether or not this box intersects box.

box to check for intersection against.

func (*Box3) IntersectsPlane

func (b *Box3) IntersectsPlane(plane float64) *Box3

IntersectsPlane TODO description.

func (*Box3) IsEmpty

func (b *Box3) IsEmpty() *Box3

IsEmpty returns true if this box includes zero points within its bounds. Note that a box with equal lower and upper bounds still includes one point, the one both bounds share.

func (*Box3) JSObject

func (b *Box3) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Box3) MakeEmpty

func (b *Box3) MakeEmpty() *Box3

MakeEmpty Makes this box empty.

func (*Box3) Set

func (b *Box3) Set(min, max float64) *Box3

Set sets the lower and upper (x, y) boundaries of this box.

min is lower (x, y) boundary of the box.
max is upper (x, y) boundary of the box.

func (*Box3) SetFromArray

func (b *Box3) SetFromArray(array float64) *Box3

SetFromArray TODO Description.

func (*Box3) SetFromCenterAndSize

func (b *Box3) SetFromCenterAndSize() *Box3

SetFromCenterAndSize centers this box on center and sets this box's width and height to the values specified in size.

center is the desired center position of the box.
size is the desired x and y dimensions of the box.

func (*Box3) SetFromObject

func (b *Box3) SetFromObject() *Box3

SetFromObject TODO description.

func (*Box3) SetFromPoints

func (b *Box3) SetFromPoints(points float64) *Box3

SetFromPoints sets the upper and lower bounds of this box to include all of the points in points.

points is the set of points that the resulting box will envelop.

func (*Box3) Size

func (b *Box3) Size(optionalTarget float64) *Box3

Size returns the width and height of this box.

optionalTarget, if specified, the result will be copied here.

func (*Box3) Translate

func (b *Box3) Translate(offset float64) *Box3

Translate adds offset to both the upper and lower bounds of this box, effectively moving this box offfset units in 2D space.

offset is the direction and distance of offset.

func (*Box3) Union

func (b *Box3) Union(box float64) *Box3

Union nions this box with box setting the upper bound of this box to the greater of the two boxes' upper bounds and the lower bound of this box to the lesser of the two boxes' lower bounds.

box that will be unioned with this box.

type BoxBufferGeometry

type BoxBufferGeometry struct{ *BufferGeometry }

BoxBufferGeometry represents a BufferGeometry port of BoxGeometry.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/BoxBufferGeometry

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	geometry := t.NewBoxBufferGeometry(1, 1, 1, nil)
	opts := three.MeshBasicMaterialOpts{
		"color": 0x00ff00,
	}
	material := t.NewMeshBasicMaterial(opts)
	cube := t.NewMesh(geometry, material)
	scene.Add(cube)
}
Output:

func BoxBufferGeometryFromJSObject

func BoxBufferGeometryFromJSObject(p *js.Object) *BoxBufferGeometry

BoxBufferGeometryFromJSObject returns a wrapped BoxBufferGeometry JavaScript class.

func (*BoxBufferGeometry) JSObject

func (b *BoxBufferGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type BoxBufferGeometryOpts

type BoxBufferGeometryOpts struct {
	// contains filtered or unexported fields
}

BoxBufferGeometryOpts represents optional arguments that can be passed to NewBoxBufferGeometry.

type BoxGeometry

type BoxGeometry struct{ *Geometry }

BoxGeometry represents a quadrilateral geometry primitive.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/BoxGeometry

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	geometry := t.NewBoxGeometry(1, 1, 1, nil)
	opts := three.MeshBasicMaterialOpts{
		"color": 0x00ff00,
	}
	material := t.NewMeshBasicMaterial(opts)
	cube := t.NewMesh(geometry, material)
	scene.Add(cube)
}
Output:

func BoxGeometryFromJSObject

func BoxGeometryFromJSObject(p *js.Object) *BoxGeometry

BoxGeometryFromJSObject returns a wrapped BoxGeometry JavaScript class.

func (*BoxGeometry) JSObject

func (b *BoxGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type BoxGeometryOpts

type BoxGeometryOpts struct {
	WidthSegments  int // Number of segmented faces along the width of the sides. Default is 1.
	HeightSegments int // Number of segmented faces along the height of the sides. Default is 1.
	DepthSegments  int // Number of segmented faces along the depth of the sides. Default is 1.
}

BoxGeometryOpts represents options passed to the BoxGeometry constructor.

type BoxHelper

type BoxHelper struct{ *Line }

BoxHelper represents an object to show a wireframe box (with no face diagonals) around an object.

http://threejs.org/docs/index.html#Reference/Extras.Helpers/BoxHelper

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	sphere := t.NewSphereGeometry(50, 8, 6, nil)
	opts := three.MeshBasicMaterialOpts{
		"color": 0xff0000,
	}
	object := t.NewMesh(sphere, t.NewMeshBasicMaterial(opts))
	box := t.NewBoxHelper(object)
	scene.Add(box)
}
Output:

func BoxHelperFromJSObject

func BoxHelperFromJSObject(p *js.Object) *BoxHelper

BoxHelperFromJSObject returns a wrapped BoxHelper JavaScript class.

func (*BoxHelper) JSObject

func (b *BoxHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*BoxHelper) Update

func (b *BoxHelper) Update() *BoxHelper

Update updates the BoxHelper based on the object property.

type BufferAttribute

type BufferAttribute struct {
	// contains filtered or unexported fields
}

BufferAttribute stores data for an attribute associated with a BufferGeometry. See that page for details and a usage example. This class is used to store builtin attributes such as vertex position, normals, color, etc., but can also be used in your code to store custom attributes in a BufferGeometry.

http://threejs.org/docs/index.html#Reference/Core/BufferAttribute

func BufferAttributeFromJSObject

func BufferAttributeFromJSObject(p *js.Object) *BufferAttribute

BufferAttributeFromJSObject returns a wrapped BufferAttribute JavaScript class.

func (*BufferAttribute) Array

func (b *BufferAttribute) Array() *js.Object

Array returns the property of the same name.

func (*BufferAttribute) Clone

func (b *BufferAttribute) Clone() *BufferAttribute

Clone TODO description.

func (*BufferAttribute) Copy

Copy TODO description.

func (*BufferAttribute) CopyArray

func (b *BufferAttribute) CopyArray(array []float64) *BufferAttribute

CopyArray TODO description.

func (*BufferAttribute) CopyAt

func (b *BufferAttribute) CopyAt(index1, attribute, index2 float64) *BufferAttribute

CopyAt TODO description.

func (*BufferAttribute) CopyColorsArray

func (b *BufferAttribute) CopyColorsArray(colors []float64) *BufferAttribute

CopyColorsArray TODO description.

func (*BufferAttribute) CopyIndicesArray

func (b *BufferAttribute) CopyIndicesArray(indices []int) *BufferAttribute

CopyIndicesArray TODO description.

func (*BufferAttribute) CopyVector2sArray

func (b *BufferAttribute) CopyVector2sArray(vectors []*Vector2) *BufferAttribute

CopyVector2sArray TODO description.

func (*BufferAttribute) CopyVector3sArray

func (b *BufferAttribute) CopyVector3sArray(vectors []*Vector3) *BufferAttribute

CopyVector3sArray TODO description.

func (*BufferAttribute) CopyVector4sArray

func (b *BufferAttribute) CopyVector4sArray(vectors []*Vector4) *BufferAttribute

CopyVector4sArray TODO description.

func (*BufferAttribute) Count

func (b *BufferAttribute) Count() float64

Count returns the count-component of the BufferAttribute.

func (*BufferAttribute) Dynamic

func (b *BufferAttribute) Dynamic() bool

Dynamic returns the property of the same name.

func (*BufferAttribute) GetW

func (b *BufferAttribute) GetW(index int) *BufferAttribute

GetW TODO description.

func (*BufferAttribute) GetX

func (b *BufferAttribute) GetX(index int) *BufferAttribute

GetX TODO description.

func (*BufferAttribute) GetY

func (b *BufferAttribute) GetY(index int) *BufferAttribute

GetY TODO description.

func (*BufferAttribute) GetZ

func (b *BufferAttribute) GetZ(index int) *BufferAttribute

GetZ TODO description.

func (*BufferAttribute) ItemSize

func (b *BufferAttribute) ItemSize() int

ItemSize returns the property of the same name.

func (*BufferAttribute) JSObject

func (b *BufferAttribute) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*BufferAttribute) Set

func (b *BufferAttribute) Set(value float64, offset int) *BufferAttribute

Set TODO description.

func (*BufferAttribute) SetDynamic

func (b *BufferAttribute) SetDynamic(value float64) *BufferAttribute

SetDynamic TODO description.

func (*BufferAttribute) SetNeedsUpdate

func (b *BufferAttribute) SetNeedsUpdate(value float64) *BufferAttribute

SetNeedsUpdate sets the needsUpdate-component of the BufferAttribute.

func (*BufferAttribute) SetW

func (b *BufferAttribute) SetW(index int, w float64) *BufferAttribute

SetW TODO description.

func (*BufferAttribute) SetX

func (b *BufferAttribute) SetX(index int, x float64) *BufferAttribute

SetX TODO description.

func (*BufferAttribute) SetXY

func (b *BufferAttribute) SetXY(index int, x, y float64) *BufferAttribute

SetXY TODO description.

func (*BufferAttribute) SetXYZ

func (b *BufferAttribute) SetXYZ(index int, x, y, z float64) *BufferAttribute

SetXYZ TODO description.

func (*BufferAttribute) SetXYZW

func (b *BufferAttribute) SetXYZW(index int, x, y, z, w float64) *BufferAttribute

SetXYZW TODO description.

func (*BufferAttribute) SetY

func (b *BufferAttribute) SetY(index int, y float64) *BufferAttribute

SetY TODO description.

func (*BufferAttribute) SetZ

func (b *BufferAttribute) SetZ(index int, z float64) *BufferAttribute

SetZ TODO description.

func (*BufferAttribute) UUID

func (b *BufferAttribute) UUID() int

UUID returns the property of the same name.

func (*BufferAttribute) UpdateRange

func (b *BufferAttribute) UpdateRange() (offset, count int)

UpdateRange returns the property of the same name.

func (*BufferAttribute) Version

func (b *BufferAttribute) Version() int

Version returns the property of the same name.

type BufferGeometry

type BufferGeometry struct {
	// contains filtered or unexported fields
}

BufferGeometry is an efficient alternative to Geometry, because it stores all data, including vertex positions, face indices, normals, colors, UVs, and custom attributes within buffers; this reduces the cost of passing all this data to the GPU. This also makes BufferGeometry harder to work with than Geometry; rather than accessing position data as Vector3 objects, color data as Color objects, and so on, you have to access the raw data from the appropriate attribute buffer. This makes BufferGeometry best-suited for static objects where you don't need to manipulate the geometry much after instantiating it.

http://threejs.org/docs/index.html#Reference/Core/BufferGeometry

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()

	geometry := t.NewBufferGeometry()
	// create a simple square shape. We duplicate the top left and bottom right
	// vertices because each vertex needs to appear once per triangle.
	vertices := []float64{
		-1.0, -1.0, 1.0,
		1.0, -1.0, 1.0,
		1.0, 1.0, 1.0,

		1.0, 1.0, 1.0,
		-1.0, 1.0, 1.0,
		-1.0, -1.0, 1.0,
	}

	// itemSize = 3 because there are 3 values (components) per vertex
	geometry.AddAttribute("position", t.NewBufferAttribute(vertices, 3).JSObject())
	opts := three.MeshBasicMaterialOpts{"color": 0xff0000}
	material := t.NewMeshBasicMaterial(opts)
	/* mesh := */ t.NewMesh(geometry, material)
	//...
}
Output:

func BufferGeometryFromJSObject

func BufferGeometryFromJSObject(p *js.Object) *BufferGeometry

BufferGeometryFromJSObject returns a wrapped Geometry JavaScript class.

func (*BufferGeometry) AddAttribute

func (b *BufferGeometry) AddAttribute(name string, attribute *js.Object) *BufferGeometry

AddAttribute TODO description.

func (*BufferGeometry) AddGroup

func (b *BufferGeometry) AddGroup(start, count, materialIndex int) *BufferGeometry

AddGroup TODO description.

func (*BufferGeometry) ApplyMatrix

func (b *BufferGeometry) ApplyMatrix(matrix *Matrix4) *BufferGeometry

ApplyMatrix TODO description.

func (*BufferGeometry) Attributes

func (b *BufferGeometry) Attributes() *js.Object

Attributes returns the property of the same name.

func (*BufferGeometry) BoundingBox

func (b *BufferGeometry) BoundingBox() *Box3

BoundingBox returns the property of the same name.

func (*BufferGeometry) BoundingSphere

func (b *BufferGeometry) BoundingSphere() *js.Object

BoundingSphere returns the property of the same name.

func (*BufferGeometry) Center

func (b *BufferGeometry) Center() *BufferGeometry

Center TODO description.

func (*BufferGeometry) ClearGroups

func (b *BufferGeometry) ClearGroups() *BufferGeometry

ClearGroups TODO description.

func (*BufferGeometry) Clone

func (b *BufferGeometry) Clone() *BufferGeometry

Clone TODO description.

func (*BufferGeometry) ComputeBoundingBox

func (b *BufferGeometry) ComputeBoundingBox() *BufferGeometry

ComputeBoundingBox TODO description.

func (*BufferGeometry) ComputeBoundingSphere

func (b *BufferGeometry) ComputeBoundingSphere() *BufferGeometry

ComputeBoundingSphere TODO description.

func (*BufferGeometry) ComputeFaceNormals

func (b *BufferGeometry) ComputeFaceNormals() *BufferGeometry

ComputeFaceNormals TODO description.

func (*BufferGeometry) ComputeVertexNormals

func (b *BufferGeometry) ComputeVertexNormals() *BufferGeometry

ComputeVertexNormals TODO description.

func (*BufferGeometry) Copy

func (b *BufferGeometry) Copy(source *BufferGeometry) *BufferGeometry

Copy TODO description.

func (*BufferGeometry) Dispose

func (b *BufferGeometry) Dispose() *BufferGeometry

Dispose TODO description.

func (*BufferGeometry) DrawRange

func (b *BufferGeometry) DrawRange() (start, count int)

DrawRange returns the property of the same name.

func (*BufferGeometry) FromDirectGeometry

func (b *BufferGeometry) FromDirectGeometry(geometry JSObject) *BufferGeometry

FromDirectGeometry TODO description.

func (*BufferGeometry) FromGeometry

func (b *BufferGeometry) FromGeometry(geometry JSObject) *BufferGeometry

FromGeometry TODO description.

func (*BufferGeometry) GetAttribute

func (b *BufferGeometry) GetAttribute(name string) *BufferGeometry

GetAttribute TODO description.

func (*BufferGeometry) GetIndex

func (b *BufferGeometry) GetIndex() *BufferGeometry

GetIndex TODO description.

func (*BufferGeometry) Groups

func (b *BufferGeometry) Groups() *js.Object

Groups returns the property of the same name.

func (*BufferGeometry) Index

func (b *BufferGeometry) Index() int

Index returns the property of the same name.

func (*BufferGeometry) JSObject

func (b *BufferGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*BufferGeometry) LookAt

func (b *BufferGeometry) LookAt() *BufferGeometry

LookAt TODO description.

func (*BufferGeometry) Merge

func (b *BufferGeometry) Merge(geometry JSObject, offset int) *BufferGeometry

Merge TODO description.

func (*BufferGeometry) MortphAttributes

func (b *BufferGeometry) MortphAttributes() *js.Object

MortphAttributes returns the property of the same name.

func (*BufferGeometry) Name

func (b *BufferGeometry) Name() string

Name returns the property of the same name.

func (*BufferGeometry) NormalizeNormals

func (b *BufferGeometry) NormalizeNormals() *BufferGeometry

NormalizeNormals TODO description.

func (*BufferGeometry) RemoveAttribute

func (b *BufferGeometry) RemoveAttribute(name string) *BufferGeometry

RemoveAttribute TODO description.

func (*BufferGeometry) RotateX

func (b *BufferGeometry) RotateX() *BufferGeometry

RotateX TODO description.

func (*BufferGeometry) RotateY

func (b *BufferGeometry) RotateY() *BufferGeometry

RotateY TODO description.

func (*BufferGeometry) RotateZ

func (b *BufferGeometry) RotateZ() *BufferGeometry

RotateZ TODO description.

func (*BufferGeometry) Scale

func (b *BufferGeometry) Scale() *BufferGeometry

Scale TODO description.

func (*BufferGeometry) SetDrawRange

func (b *BufferGeometry) SetDrawRange(start, count int) *BufferGeometry

SetDrawRange TODO description.

func (*BufferGeometry) SetFromObject

func (b *BufferGeometry) SetFromObject(object JSObject) *BufferGeometry

SetFromObject TODO description.

func (*BufferGeometry) SetIndex

func (b *BufferGeometry) SetIndex(index int) *BufferGeometry

SetIndex TODO description.

func (*BufferGeometry) ToJSON

func (b *BufferGeometry) ToJSON() *BufferGeometry

ToJSON TODO description.

func (*BufferGeometry) ToNonIndexed

func (b *BufferGeometry) ToNonIndexed() *BufferGeometry

ToNonIndexed TODO description.

func (*BufferGeometry) Translate

func (b *BufferGeometry) Translate() *BufferGeometry

Translate TODO description.

func (*BufferGeometry) Type

func (b *BufferGeometry) Type() string

Type returns the property of the same name.

func (*BufferGeometry) UUID

func (b *BufferGeometry) UUID() int

UUID returns the property of the same name.

func (*BufferGeometry) UpdateFromObject

func (b *BufferGeometry) UpdateFromObject(object JSObject) *BufferGeometry

UpdateFromObject TODO description.

type BufferGeometryLoadFunc

type BufferGeometryLoadFunc func(geometry *BufferGeometry, materials []*Material)

BufferGeometryLoadFunc is a callback function called by Load.

type BufferGeometryLoader

type BufferGeometryLoader struct {
	// contains filtered or unexported fields
}

BufferGeometryLoader is a loader for loading a BufferGeometry.

http://threejs.org/docs/index.html#Reference/Loaders/BufferGeometryLoader

func BufferGeometryLoaderFromJSObject

func BufferGeometryLoaderFromJSObject(p *js.Object) *BufferGeometryLoader

BufferGeometryLoaderFromJSObject returns a wrapped BufferGeometryLoader JavaScript class.

func (*BufferGeometryLoader) JSObject

func (b *BufferGeometryLoader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*BufferGeometryLoader) Load

func (b *BufferGeometryLoader) Load(url string, onLoad BufferGeometryLoadFunc, onProgress, onError interface{}) *BufferGeometryLoader

Load TODO description.

func (*BufferGeometryLoader) Parse

Parse TODO description.

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache represents a simple cache used internally by XHRLoader.

http://threejs.org/docs/index.html#Reference/Loaders/Cache

func CacheFromJSObject

func CacheFromJSObject(p *js.Object) *Cache

CacheFromJSObject returns a wrapped Cache JavaScript class.

func (*Cache) Add

func (c *Cache) Add(key, file float64) *Cache

Add TODO description.

func (*Cache) Clear

func (c *Cache) Clear() *Cache

Clear TODO description.

func (*Cache) Get

func (c *Cache) Get(key float64) *Cache

Get TODO description.

func (*Cache) JSObject

func (c *Cache) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Cache) Remove

func (c *Cache) Remove(key float64) *Cache

Remove TODO description.

type Camera

type Camera struct{ *Object3D }

Camera is the JavaScript base class for cameras. It should always be inherited when you build a new camera.

http://threejs.org/docs/index.html#Reference/Cameras/Camera

func CameraFromJSObject

func CameraFromJSObject(p *js.Object) *Camera

CameraFromJSObject returns a wrapped Camera JavaScript class.

func (*Camera) Clone

func (c *Camera) Clone(cam *Camera) *Camera

Clone returns a clone of camera.

func (*Camera) Copy

func (c *Camera) Copy(source *Camera) *Camera

Copy TODO description.

func (*Camera) GetWorldDirection

func (c *Camera) GetWorldDirection(vector *Vector3) *Vector3

GetWorldDirection returns a vector representing the direction in which the camera is looking, in world space.

func (*Camera) JSObject

func (c *Camera) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Camera) LookAt

func (c *Camera) LookAt(vector *Vector3) *Camera

LookAt makes the camera look at the vector position in the global space as long as the parent of this camera is the scene or at position (0,0,0).

func (*Camera) MatrixWorldInverse

func (c *Camera) MatrixWorldInverse() *Matrix4

MatrixWorldInverse is the inverse of matrixWorld. MatrixWorld contains the Matrix which has the world transform of the Camera.

func (*Camera) ProjectionMatrix

func (c *Camera) ProjectionMatrix() *Matrix4

ProjectionMatrix is the matrix which contains the projection.

func (*Camera) SetFOV

func (c *Camera) SetFOV(value float64) *Camera

SetFOV sets the property of the same name. Note that this function was added to make the SpotLight example work.

func (*Camera) SetFar

func (c *Camera) SetFar(value float64) *Camera

SetFar sets the property of the same name. Note that this function was added to make the SpotLight example work.

func (*Camera) SetNear

func (c *Camera) SetNear(value float64) *Camera

SetNear sets the property of the same name. Note that this function was added to make the SpotLight example work.

func (*Camera) Type

func (c *Camera) Type() string

Type returns the property of the same name.

func (*Camera) UpdateProjectionMatrix

func (c *Camera) UpdateProjectionMatrix() *Camera

UpdateProjectionMatrix updates the projectionMatrix.

type CameraHelper

type CameraHelper struct{ *Line }

CameraHelper is an Object3D which helps visualizing what a camera contains in its frustum. It visualizes the frustum with a Line geometry.

http://threejs.org/docs/index.html#Reference/Extras.Helpers/CameraHelper

func CameraHelperFromJSObject

func CameraHelperFromJSObject(p *js.Object) *CameraHelper

CameraHelperFromJSObject returns a wrapped CameraHelper JavaScript class.

func (*CameraHelper) JSObject

func (c *CameraHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type CanvasTexture

type CanvasTexture struct {
	// contains filtered or unexported fields
}

CanvasTexture represents a canvastexture.

func CanvasTextureFromJSObject

func CanvasTextureFromJSObject(p *js.Object) *CanvasTexture

CanvasTextureFromJSObject returns a wrapped CanvasTexture JavaScript class.

func (*CanvasTexture) JSObject

func (c *CanvasTexture) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type CatmullRomCurve3

type CatmullRomCurve3 struct{ *Curve }

CatmullRomCurve3 represents a smooth 3D spline curve from a series of points using the Catmull-Rom algorithm.

http://threejs.org/docs/index.html#Reference/Extras.Curves/CatmullRomCurve3

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
	"github.com/gopherjs/gopherjs/js"
)

func main() {
	t := three.New()

	// Create a closed wavey loop
	pts := []*js.Object{
		t.NewVector3(-10, 0, 10).JSObject(),
		t.NewVector3(-5, 5, 5).JSObject(),
		t.NewVector3(0, 0, 0).JSObject(),
		t.NewVector3(5, -5, 5).JSObject(),
		t.NewVector3(10, 0, 10).JSObject(),
	}
	curve := t.NewCatmullRomCurve3(pts)

	geometry := t.NewGeometry()
	geometry.SetVertices(curve.GetPoints(50))
	opts := three.LineBasicMaterialOpts{
		"color": 0xff0000,
	}
	material := t.NewLineBasicMaterial(opts)
	/* mesh := */ t.NewMesh(geometry, material)
	//...
}
Output:

func CatmullRomCurve3FromJSObject

func CatmullRomCurve3FromJSObject(p *js.Object) *CatmullRomCurve3

CatmullRomCurve3FromJSObject returns a wrapped CatmullRomCurve3 JavaScript class.

func (*CatmullRomCurve3) JSObject

func (c *CatmullRomCurve3) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type CircleBufferGeometry

type CircleBufferGeometry struct{ *BufferGeometry }

CircleBufferGeometry is the BufferGeometry port of CircleGeometry.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/CircleBufferGeometry

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	geometry := t.NewCircleBufferGeometry(5, 32, nil)
	opts := three.MeshBasicMaterialOpts{
		"color": 0xffff00,
	}
	material := t.NewMeshBasicMaterial(opts)
	circle := t.NewMesh(geometry, material)
	scene.Add(circle)
}
Output:

func CircleBufferGeometryFromJSObject

func CircleBufferGeometryFromJSObject(p *js.Object) *CircleBufferGeometry

CircleBufferGeometryFromJSObject returns a wrapped CircleBufferGeometry JavaScript class.

func (*CircleBufferGeometry) JSObject

func (c *CircleBufferGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type CircleBufferGeometryOpts

type CircleBufferGeometryOpts struct {
	// contains filtered or unexported fields
}

CircleBufferGeometryOpts represents options for NewCircleBufferGeometry.

thetaStart — Start angle for first segment, default = 0 (three o'clock position).
thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete circle.

type CircleGeometry

type CircleGeometry struct{ *Geometry }

CircleGeometry represents a simple circular shape.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/CircleGeometry

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	geometry := t.NewCircleGeometry(5, 32, nil)
	opts := three.MeshBasicMaterialOpts{
		"color": 0xffff00,
	}
	material := t.NewMeshBasicMaterial(opts)
	circle := t.NewMesh(geometry, material)
	scene.Add(circle)
}
Output:

func CircleGeometryFromJSObject

func CircleGeometryFromJSObject(p *js.Object) *CircleGeometry

CircleGeometryFromJSObject returns a wrapped CircleGeometry JavaScript class.

func (*CircleGeometry) JSObject

func (c *CircleGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type CircleGeometryOpts

type CircleGeometryOpts struct {
	// contains filtered or unexported fields
}

CircleGeometryOpts represents options for NewCircleGeometry.

thetaStart — Start angle for first segment, default = 0 (three o'clock position).
thetaLength — The central angle, often called theta, of the circular sector.
    The default is 2*Pi, which makes for a complete circle.

type Clock

type Clock struct {
	// contains filtered or unexported fields
}

Clock is an object for keeping track of time.

http://threejs.org/docs/index.html#Reference/Core/Clock

func ClockFromJSObject

func ClockFromJSObject(p *js.Object) *Clock

ClockFromJSObject returns a wrapped Clock JavaScript class.

func (*Clock) GetDelta

func (c *Clock) GetDelta() float64

GetDelta TODO description.

func (*Clock) GetElapsedTime

func (c *Clock) GetElapsedTime() float64

GetElapsedTime TODO description.

func (*Clock) JSObject

func (c *Clock) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Clock) Running

func (c *Clock) Running() bool

Running returns the property of the same name.

func (*Clock) Start

func (c *Clock) Start() *Clock

Start TODO description.

func (*Clock) Stop

func (c *Clock) Stop() *Clock

Stop TODO description.

type Color

type Color struct {
	// contains filtered or unexported fields
}

Color represents a color.

http://threejs.org/docs/index.html#Reference/Math/Color

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()

	color := t.NewColor()
	color = t.NewColor(0xff0000)
	color = t.NewColor("rgb(255, 0, 0)")
	color = t.NewColor("rgb(100%, 0%, 0%)")
	color = t.NewColor("hsl(0, 100%, 50%)")
	color = t.NewColor(1, 0, 0)
	color.SetHex(0x00ff00)
}
Output:

func ColorFromJSObject

func ColorFromJSObject(p *js.Object) *Color

ColorFromJSObject returns a wrapped Color JavaScript object.

func (*Color) Add

func (c *Color) Add(color float64) *Color

Add TODO description.

func (*Color) AddColors

func (c *Color) AddColors(color1, color2 float64) *Color

AddColors TODO description.

func (*Color) AddScalar

func (c *Color) AddScalar(s float64) *Color

AddScalar TODO description.

func (*Color) B

func (c *Color) B() float64

B returns the b-component of the Color.

func (*Color) Clone

func (c *Color) Clone() *Color

Clone TODO description.

func (*Color) ConvertGammaToLinear

func (c *Color) ConvertGammaToLinear() *Color

ConvertGammaToLinear TODO description.

func (*Color) ConvertLinearToGamma

func (c *Color) ConvertLinearToGamma() *Color

ConvertLinearToGamma TODO description.

func (*Color) Copy

func (c *Color) Copy(color *Color) *Color

Copy TODO description.

func (*Color) CopyGammaToLinear

func (c *Color) CopyGammaToLinear(color, gammaFactor float64) *Color

CopyGammaToLinear TODO description.

func (*Color) CopyLinearToGamma

func (c *Color) CopyLinearToGamma(color, gammaFactor float64) *Color

CopyLinearToGamma TODO description.

func (*Color) Equals

func (c *Color) Equals(color *Color) bool

Equals TODO description.

func (*Color) FromArray

func (c *Color) FromArray(array, offset float64) *Color

FromArray TODO description.

func (*Color) G

func (c *Color) G() float64

G returns the g-component of the Color.

func (*Color) GetHSL

func (c *Color) GetHSL(optionalTarget float64) *Color

GetHSL TODO description.

func (*Color) GetHex

func (c *Color) GetHex() *Color

GetHex TODO description.

func (*Color) GetHexString

func (c *Color) GetHexString() *Color

GetHexString TODO description.

func (*Color) GetStyle

func (c *Color) GetStyle() *Color

GetStyle TODO description.

func (*Color) JSObject

func (c *Color) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Color) Lerp

func (c *Color) Lerp(color, alpha float64) *Color

Lerp TODO description.

func (*Color) Multiply

func (c *Color) Multiply(color float64) *Color

Multiply TODO description.

func (*Color) MultiplyScalar

func (c *Color) MultiplyScalar(s float64) *Color

MultiplyScalar TODO description.

func (*Color) OffsetHSL

func (c *Color) OffsetHSL(h, s, l float64) *Color

OffsetHSL TODO description.

func (*Color) R

func (c *Color) R() float64

R returns the r-component of the Color.

func (*Color) Set

func (c *Color) Set(value float64) *Color

Set TODO description.

func (*Color) SetHSL

func (c *Color) SetHSL(hue, saturation, luminance float64) *Color

SetHSL TODO description.

func (*Color) SetHex

func (c *Color) SetHex(hex int) *Color

SetHex TODO description.

func (*Color) SetRGB

func (c *Color) SetRGB(red, green, blue float64) *Color

SetRGB TODO description.

func (*Color) SetScalar

func (c *Color) SetScalar(scalar float64) *Color

SetScalar TODO description.

func (*Color) SetStyle

func (c *Color) SetStyle(style float64) *Color

SetStyle TODO description.

func (*Color) ToArray

func (c *Color) ToArray(array, offset float64) *Color

ToArray TODO description.

type ColorKeyframeTrack

type ColorKeyframeTrack struct {
	// contains filtered or unexported fields
}

ColorKeyframeTrack represents a colorkeyframetrack.

func ColorKeyframeTrackFromJSObject

func ColorKeyframeTrackFromJSObject(p *js.Object) *ColorKeyframeTrack

ColorKeyframeTrackFromJSObject returns a wrapped ColorKeyframeTrack JavaScript class.

func (*ColorKeyframeTrack) JSObject

func (c *ColorKeyframeTrack) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type CompressedTexture

type CompressedTexture struct {
	// contains filtered or unexported fields
}

CompressedTexture represents a texture based on data in compressed form.

http://threejs.org/docs/index.html#Reference/Textures/CompressedTexture

func CompressedTextureFromJSObject

func CompressedTextureFromJSObject(p *js.Object) *CompressedTexture

CompressedTextureFromJSObject returns a wrapped CompressedTexture JavaScript class.

func (*CompressedTexture) JSObject

func (c *CompressedTexture) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type CompressedTextureLoader

type CompressedTextureLoader struct {
	// contains filtered or unexported fields
}

CompressedTextureLoader represents a compressedtextureloader.

func CompressedTextureLoaderFromJSObject

func CompressedTextureLoaderFromJSObject(p *js.Object) *CompressedTextureLoader

CompressedTextureLoaderFromJSObject returns a wrapped CompressedTextureLoader JavaScript class.

func (*CompressedTextureLoader) JSObject

func (c *CompressedTextureLoader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*CompressedTextureLoader) Load

func (c *CompressedTextureLoader) Load(url, onLoad, onProgress, onError float64) *CompressedTextureLoader

Load TODO description.

func (*CompressedTextureLoader) SetPath

SetPath TODO description.

type CubeCamera

type CubeCamera struct{ *Object3D }

CubeCamera is 6 cameras that render to a WebGLRenderTargetCube.

http://threejs.org/docs/index.html#Reference/Cameras/CubeCamera

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()

	camera := t.NewPerspectiveCamera(75, 1.25, 1, 10000)
	renderer := t.NewWebGLRenderer(nil)

	// Create cube camera.
	cubeCamera := t.NewCubeCamera(1, 100000, 128)
	scene := t.NewScene()
	scene.Add(cubeCamera)

	// Create car.
	opts := three.MeshLambertMaterialOpts{
		"color":  0xffffff,
		"envMap": cubeCamera.RenderTarget(),
	}
	chromeMaterial := t.NewMeshLambertMaterial(opts)
	carGeometry := t.NewObject3D() // Load car geometry here.
	car := t.NewMesh(carGeometry, chromeMaterial)
	scene.Add(car)

	// Update the render target cube.
	car.SetVisible(false)
	cubeCamera.Position().Copy(car.Position())
	cubeCamera.UpdateCubeMap(renderer, scene)

	// Render the scene.
	car.SetVisible(true)
	renderer.Render(scene, camera, nil)
}
Output:

func CubeCameraFromJSObject

func CubeCameraFromJSObject(p *js.Object) *CubeCamera

CubeCameraFromJSObject returns a wrapped CubeCamera JavaScript class.

func (*CubeCamera) JSObject

func (c *CubeCamera) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*CubeCamera) RenderTarget

func (c *CubeCamera) RenderTarget() *WebGLRenderTargetCube

RenderTarget returns the property of the same name.

func (*CubeCamera) Type

func (c *CubeCamera) Type() string

Type returns the property of the same name.

func (*CubeCamera) UpdateCubeMap

func (c *CubeCamera) UpdateCubeMap(renderer, scene JSObject) *CubeCamera

UpdateCubeMap TODO description.

type CubeTexture

type CubeTexture struct{ *Texture }

CubeTexture represents a cube texture made up of six images.

http://threejs.org/docs/index.html#Reference/Textures/CubeTexture

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()

	loader := t.NewCubeTextureLoader()
	loader.SetPath("textures/cube/pisa/")

	textureCube := loader.Load([]string{
		"px.png", "nx.png",
		"py.png", "ny.png",
		"pz.png", "nz.png",
	}, nil, nil, nil)

	opts := three.MeshBasicMaterialOpts{
		"color":  0xffffff,
		"envMap": textureCube,
	}
	/* material := */ t.NewMeshBasicMaterial(opts)
}
Output:

func CubeTextureFromJSObject

func CubeTextureFromJSObject(p *js.Object) *CubeTexture

CubeTextureFromJSObject returns a wrapped CubeTexture JavaScript class.

func (*CubeTexture) Get

func (c *CubeTexture) Get() *CubeTexture

Get TODO description.

func (*CubeTexture) JSObject

func (c *CubeTexture) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*CubeTexture) Set

func (c *CubeTexture) Set(value float64) *CubeTexture

Set TODO description.

type CubeTextureLoadFunc

type CubeTextureLoadFunc func(geometry *CubeTexture, materials []*Material)

CubeTextureLoadFunc is a callback function called by Load.

type CubeTextureLoader

type CubeTextureLoader struct {
	// contains filtered or unexported fields
}

CubeTextureLoader represents a cubetextureloader.

func CubeTextureLoaderFromJSObject

func CubeTextureLoaderFromJSObject(p *js.Object) *CubeTextureLoader

CubeTextureLoaderFromJSObject returns a wrapped CubeTextureLoader JavaScript class.

func (*CubeTextureLoader) JSObject

func (c *CubeTextureLoader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*CubeTextureLoader) Load

func (c *CubeTextureLoader) Load(urls []string, onLoad CubeTextureLoadFunc, onProgress, onError interface{}) *CubeTextureLoader

Load TODO description.

func (*CubeTextureLoader) SetCrossOrigin

func (c *CubeTextureLoader) SetCrossOrigin(value string) *CubeTextureLoader

SetCrossOrigin TODO description.

func (*CubeTextureLoader) SetPath

func (c *CubeTextureLoader) SetPath(value string) *CubeTextureLoader

SetPath TODO description.

type CubicBezierCurve

type CubicBezierCurve struct{ *Curve }

CubicBezierCurve represents a smooth 2D cubic bezier curve.

http://threejs.org/docs/index.html#Reference/Extras.Curves/CubicBezierCurve

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	curve := t.NewCubicBezierCurve(
		t.NewVector3(-10, 0, 0),
		t.NewVector3(-5, 15, 0),
		t.NewVector3(20, 15, 0),
		t.NewVector3(10, 0, 0),
	)

	path := t.NewPath(curve.GetPoints(50))

	geometry := path.CreatePointsGeometry(50)
	opts := three.LineBasicMaterialOpts{
		"color": 0xff0000,
	}
	material := t.NewLineBasicMaterial(opts)

	// Create the final Object3D to add to the scene
	curveObject := t.NewLine(geometry, material)
	scene.Add(curveObject)
}
Output:

func CubicBezierCurveFromJSObject

func CubicBezierCurveFromJSObject(p *js.Object) *CubicBezierCurve

CubicBezierCurveFromJSObject returns a wrapped CubicBezierCurve JavaScript class.

func (*CubicBezierCurve) GetPoint

func (c *CubicBezierCurve) GetPoint(t float64) *CubicBezierCurve

GetPoint TODO description.

func (*CubicBezierCurve) GetTangent

func (c *CubicBezierCurve) GetTangent(t float64) *CubicBezierCurve

GetTangent TODO description.

func (*CubicBezierCurve) JSObject

func (c *CubicBezierCurve) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type CubicBezierCurve3

type CubicBezierCurve3 struct{ *Curve }

CubicBezierCurve3 represents a smooth 3D cubic bezier curve.

http://threejs.org/docs/index.html#Reference/Extras.Curves/CubicBezierCurve3

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	curve := t.NewCubicBezierCurve3(
		t.NewVector3(-10, 0, 0),
		t.NewVector3(-5, 15, 0),
		t.NewVector3(20, 15, 0),
		t.NewVector3(10, 0, 0),
	)

	path := t.NewPath(curve.GetPoints(50))

	geometry := path.CreatePointsGeometry(50)
	opts := three.LineBasicMaterialOpts{
		"color": 0xff0000,
	}
	material := t.NewLineBasicMaterial(opts)

	// Create the final Object3D to add to the scene
	curveObject := t.NewLine(geometry, material)
	scene.Add(curveObject)
}
Output:

func CubicBezierCurve3FromJSObject

func CubicBezierCurve3FromJSObject(p *js.Object) *CubicBezierCurve3

CubicBezierCurve3FromJSObject returns a wrapped CubicBezierCurve3 JavaScript class.

func (*CubicBezierCurve3) GetPoint

GetPoint TODO description.

func (*CubicBezierCurve3) GetTangent

func (c *CubicBezierCurve3) GetTangent(t float64) *CubicBezierCurve3

GetTangent TODO description.

func (*CubicBezierCurve3) JSObject

func (c *CubicBezierCurve3) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type CubicInterpolant

type CubicInterpolant struct {
	// contains filtered or unexported fields
}

CubicInterpolant represents a cubicinterpolant.

func CubicInterpolantFromJSObject

func CubicInterpolantFromJSObject(p *js.Object) *CubicInterpolant

CubicInterpolantFromJSObject returns a wrapped CubicInterpolant JavaScript class.

func (*CubicInterpolant) Interpolate

func (c *CubicInterpolant) Interpolate(i1, t0, t, t1 float64) *CubicInterpolant

Interpolate TODO description.

func (*CubicInterpolant) IntervalChanged

func (c *CubicInterpolant) IntervalChanged(i1, t0, t1 float64) *CubicInterpolant

IntervalChanged TODO description.

func (*CubicInterpolant) JSObject

func (c *CubicInterpolant) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Curve

type Curve struct {
	// contains filtered or unexported fields
}

Curve represents a a curve object that contains methods for interpolation. For an array of Curves see CurvePath.

http://threejs.org/docs/index.html#Reference/Extras.Core/Curve

func CurveFromJSObject

func CurveFromJSObject(p *js.Object) *Curve

CurveFromJSObject returns a wrapped Curve JavaScript class.

func (*Curve) GetLength

func (c *Curve) GetLength() *Curve

GetLength TODO description.

func (*Curve) GetLengths

func (c *Curve) GetLengths(divisions float64) *Curve

GetLengths TODO description.

func (*Curve) GetPoint

func (c *Curve) GetPoint(t int) *js.Object

GetPoint TODO description.

func (*Curve) GetPointAt

func (c *Curve) GetPointAt(u int) *js.Object

GetPointAt TODO description.

func (*Curve) GetPoints

func (c *Curve) GetPoints(divisions int) *js.Object

GetPoints TODO description.

func (*Curve) GetSpacedPoints

func (c *Curve) GetSpacedPoints(divisions int) *js.Object

GetSpacedPoints TODO description.

func (*Curve) GetTangent

func (c *Curve) GetTangent(t float64) *Curve

GetTangent TODO description.

func (*Curve) GetTangentAt

func (c *Curve) GetTangentAt(u float64) *Curve

GetTangentAt TODO description.

func (*Curve) GetUtoTmapping

func (c *Curve) GetUtoTmapping(u, distance float64) *Curve

GetUtoTmapping TODO description.

func (*Curve) JSObject

func (c *Curve) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Curve) UpdateArcLengths

func (c *Curve) UpdateArcLengths() *Curve

UpdateArcLengths TODO description.

type CurvePath

type CurvePath struct{ *Curve }

CurvePath represents an array of connected curves, but retains the API of a curve.

http://threejs.org/docs/index.html#Reference/Extras.Core/CurvePath

func CurvePathFromJSObject

func CurvePathFromJSObject(p *js.Object) *CurvePath

CurvePathFromJSObject returns a wrapped CurvePath JavaScript class.

func (*CurvePath) Add

func (c *CurvePath) Add(curve float64) *CurvePath

Add TODO description.

func (*CurvePath) CreateGeometry

func (c *CurvePath) CreateGeometry(points JSObject) *Geometry

CreateGeometry TODO description.

func (*CurvePath) CreatePointsGeometry

func (c *CurvePath) CreatePointsGeometry(divisions float64) *Geometry

CreatePointsGeometry TODO description.

func (*CurvePath) CreateSpacedPointsGeometry

func (c *CurvePath) CreateSpacedPointsGeometry(divisions float64) *Geometry

CreateSpacedPointsGeometry TODO description.

func (*CurvePath) GetPoint

func (c *CurvePath) GetPoint(t float64) *CurvePath

GetPoint TODO description.

func (*CurvePath) GetTangent

func (c *CurvePath) GetTangent(t float64) *CurvePath

GetTangent TODO description.

func (*CurvePath) JSObject

func (c *CurvePath) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type CurveUtils

type CurveUtils struct {
	// contains filtered or unexported fields
}

CurveUtils represents a curveutils.

func CurveUtilsFromJSObject

func CurveUtilsFromJSObject(p *js.Object) *CurveUtils

CurveUtilsFromJSObject returns a wrapped CurveUtils JavaScript class.

func (*CurveUtils) Interpolate

func (c *CurveUtils) Interpolate(p0, p1, p2, p3, t float64) *CurveUtils

Interpolate TODO description.

func (*CurveUtils) JSObject

func (c *CurveUtils) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*CurveUtils) TangentCubicBezier

func (c *CurveUtils) TangentCubicBezier(t, p0, p1, p2, p3 float64) *CurveUtils

TangentCubicBezier TODO description.

func (*CurveUtils) TangentQuadraticBezier

func (c *CurveUtils) TangentQuadraticBezier(t, p0, p1, p2 float64) *CurveUtils

TangentQuadraticBezier TODO description.

func (*CurveUtils) TangentSpline

func (c *CurveUtils) TangentSpline(t, p0, p1, p2, p3 float64) *CurveUtils

TangentSpline TODO description.

type CylinderBufferGeometry

type CylinderBufferGeometry struct{ *BufferGeometry }

CylinderBufferGeometry represents a cylinderbuffergeometry.

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	geometry := t.NewCylinderBufferGeometry(5, 5, 20, 32, 1, false, nil)
	opts := three.MeshBasicMaterialOpts{
		"color": 0xffff00,
	}
	material := t.NewMeshBasicMaterial(opts)
	cylinder := t.NewMesh(geometry, material)
	scene.Add(cylinder)
}
Output:

func CylinderBufferGeometryFromJSObject

func CylinderBufferGeometryFromJSObject(p *js.Object) *CylinderBufferGeometry

CylinderBufferGeometryFromJSObject returns a wrapped CylinderBufferGeometry JavaScript class.

func (*CylinderBufferGeometry) JSObject

func (c *CylinderBufferGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type CylinderBufferGeometryOpts

type CylinderBufferGeometryOpts struct {
	// contains filtered or unexported fields
}

CylinderBufferGeometryOpts represents options for NewCylinderBufferGeometry.

thetaStart — Start angle for first segment, default = 0 (three o'clock position). thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cylinder.

type CylinderGeometry

type CylinderGeometry struct{ *Geometry }

CylinderGeometry represents a cylinder geometry primitive.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/CylinderGeometry

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	geometry := t.NewCylinderGeometry(5, 5, 20, 32, 1, false, nil)
	opts := three.MeshBasicMaterialOpts{
		"color": 0xffff00,
	}
	material := t.NewMeshBasicMaterial(opts)
	cylinder := t.NewMesh(geometry, material)
	scene.Add(cylinder)
}
Output:

func CylinderGeometryFromJSObject

func CylinderGeometryFromJSObject(p *js.Object) *CylinderGeometry

CylinderGeometryFromJSObject returns a wrapped CylinderGeometry JavaScript class.

func (*CylinderGeometry) JSObject

func (c *CylinderGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type CylinderGeometryOpts

type CylinderGeometryOpts struct {
	// contains filtered or unexported fields
}

CylinderGeometryOpts represents options for NewCylinderGeometry.

thetaStart — Start angle for first segment, default = 0 (three o'clock position).
thetaLength — The central angle, often called theta, of the circular sector.
    The default is 2*Pi, which makes for a complete cylinder.

type DataTexture

type DataTexture struct{ *Texture }

DataTexture represents a a texture directly from raw data, width and height.

http://threejs.org/docs/index.html#Reference/Textures/DataTexture

func DataTextureFromJSObject

func DataTextureFromJSObject(p *js.Object) *DataTexture

DataTextureFromJSObject returns a wrapped DataTexture JavaScript class.

func (*DataTexture) JSObject

func (d *DataTexture) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type DirectGeometry

type DirectGeometry struct {
	// contains filtered or unexported fields
}

DirectGeometry represents a directgeometry.

func DirectGeometryFromJSObject

func DirectGeometryFromJSObject(p *js.Object) *DirectGeometry

DirectGeometryFromJSObject returns a wrapped DirectGeometry JavaScript class.

func (*DirectGeometry) ComputeFaceNormals

func (d *DirectGeometry) ComputeFaceNormals() *DirectGeometry

ComputeFaceNormals TODO description.

func (*DirectGeometry) ComputeGroups

func (d *DirectGeometry) ComputeGroups(geometry float64) *DirectGeometry

ComputeGroups TODO description.

func (*DirectGeometry) ComputeVertexNormals

func (d *DirectGeometry) ComputeVertexNormals() *DirectGeometry

ComputeVertexNormals TODO description.

func (*DirectGeometry) Dispose

func (d *DirectGeometry) Dispose() *DirectGeometry

Dispose TODO description.

func (*DirectGeometry) FromGeometry

func (d *DirectGeometry) FromGeometry(geometry float64) *DirectGeometry

FromGeometry TODO description.

func (*DirectGeometry) JSObject

func (d *DirectGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type DirectionalLight

type DirectionalLight struct{ *Light }

DirectionalLight is a light that affects objects using MeshLambertMaterial or MeshPhongMaterial.

http://threejs.org/docs/index.html#Reference/Lights/DirectionalLight

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	// White directional light at half intensity shining from the top.
	light := t.NewDirectionalLight(0xffffff, 0.5)
	light.Position().Set(0, 1, 0)
	scene.Add(light)
}
Output:

func DirectionalLightFromJSObject

func DirectionalLightFromJSObject(p *js.Object) *DirectionalLight

DirectionalLightFromJSObject returns a wrapped DirectionalLight JavaScript class.

func (*DirectionalLight) Copy

Copy TODO description.

func (*DirectionalLight) JSObject

func (d *DirectionalLight) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type DirectionalLightHelper

type DirectionalLightHelper struct{ *Object3D }

DirectionalLightHelper visualizes a DirectionalLight's effect on the scene.

http://threejs.org/docs/index.html#Reference/Extras.Helpers/DirectionalLightHelper

func DirectionalLightHelperFromJSObject

func DirectionalLightHelperFromJSObject(p *js.Object) *DirectionalLightHelper

DirectionalLightHelperFromJSObject returns a wrapped DirectionalLightHelper JavaScript class.

func (*DirectionalLightHelper) JSObject

func (d *DirectionalLightHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type DiscreteInterpolant

type DiscreteInterpolant struct {
	// contains filtered or unexported fields
}

DiscreteInterpolant represents a discreteinterpolant.

func DiscreteInterpolantFromJSObject

func DiscreteInterpolantFromJSObject(p *js.Object) *DiscreteInterpolant

DiscreteInterpolantFromJSObject returns a wrapped DiscreteInterpolant JavaScript class.

func (*DiscreteInterpolant) Interpolate

func (d *DiscreteInterpolant) Interpolate(i1, t0, t, t1 float64) *DiscreteInterpolant

Interpolate TODO description.

func (*DiscreteInterpolant) JSObject

func (d *DiscreteInterpolant) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type DodecahedronGeometry

type DodecahedronGeometry struct{ *PolyhedronGeometry }

DodecahedronGeometry represents a dodecagedron.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/DodecahedronGeometry

func DodecahedronGeometryFromJSObject

func DodecahedronGeometryFromJSObject(p *js.Object) *DodecahedronGeometry

DodecahedronGeometryFromJSObject returns a wrapped DodecahedronGeometry JavaScript class.

func (*DodecahedronGeometry) JSObject

func (d *DodecahedronGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type EdgesGeometry

type EdgesGeometry struct {
	// contains filtered or unexported fields
}

EdgesGeometry represents an edgesgeometry.

func EdgesGeometryFromJSObject

func EdgesGeometryFromJSObject(p *js.Object) *EdgesGeometry

EdgesGeometryFromJSObject returns a wrapped EdgesGeometry JavaScript class.

func (*EdgesGeometry) JSObject

func (e *EdgesGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type EdgesHelper

type EdgesHelper struct{ *Line }

EdgesHelper represents a wireframe object that shows the "hard" edges of another object's geometry. To draw a full wireframe image of an object, see WireframeHelper.

http://threejs.org/docs/index.html#Reference/Extras.Helpers/EdgesHelper

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	boxOpts := &three.BoxGeometryOpts{
		WidthSegments:  2,
		HeightSegments: 2,
		DepthSegments:  2,
	}
	geometry := t.NewBoxGeometry(10, 10, 10, boxOpts)
	opts := three.MeshBasicMaterialOpts{
		"color": 0xff0000,
	}
	material := t.NewMeshBasicMaterial(opts)
	object := t.NewMesh(geometry, material)

	edges := t.NewEdgesHelper(object, 0x00ff00, 0.1)

	scene.Add(object)
	scene.Add(edges)
}
Output:

func EdgesHelperFromJSObject

func EdgesHelperFromJSObject(p *js.Object) *EdgesHelper

EdgesHelperFromJSObject returns a wrapped EdgesHelper JavaScript class.

func (*EdgesHelper) JSObject

func (e *EdgesHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type EllipseCurve

type EllipseCurve struct{ *Curve }

EllipseCurve represents a 2D curve in the shape of an ellipse.

http://threejs.org/docs/index.html#Reference/Extras.Curves/EllipseCurve

Example
package main

import (
	"math"

	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	ellipseOpts := &three.EllipseCurveOpts{
		StartAngle: 0,
		EndAngle:   2 * math.Pi,
		Clockwise:  false,
		Rotation:   0,
	}
	curve := t.NewEllipseCurve(
		0, 0, // ax, aY
		10, 10, // xRadius, yRadius
		ellipseOpts)

	path := t.NewPath(curve.GetPoints(50))
	geometry := path.CreatePointsGeometry(50)
	opts := three.LineBasicMaterialOpts{
		"color": 0xff0000,
	}
	material := t.NewLineBasicMaterial(opts)

	// Create the final Object3d to add to the scene
	ellipse := t.NewLine(geometry, material)
	scene.Add(ellipse)
}
Output:

func EllipseCurveFromJSObject

func EllipseCurveFromJSObject(p *js.Object) *EllipseCurve

EllipseCurveFromJSObject returns a wrapped EllipseCurve JavaScript class.

func (*EllipseCurve) GetPoint

func (e *EllipseCurve) GetPoint(t float64) *EllipseCurve

GetPoint TODO description.

func (*EllipseCurve) JSObject

func (e *EllipseCurve) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type EllipseCurveOpts

type EllipseCurveOpts struct {
	StartAngle float64
	EndAngle   float64
	Clockwise  bool
	Rotation   float64
}

EllipseCurveOpts represents options passed to the EllipseCurve constructor.

StartAngle – The start angle of the curve in radians starting from the middle right side
EndAngle – The end angle of the curve in radians starting from the middle right side
Clockwise – Whether the ellipse is clockwise
Rotation – The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional)

Note: When going clockwise it's best to set the start angle to (Math.PI * 2) and then work towards lower numbers.

type Euler

type Euler struct {
	// contains filtered or unexported fields
}

Euler represents an Euler (x,y,z) angle. Euler angles describe a rotation transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order.

http://threejs.org/docs/index.html#Reference/Math/Euler

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()

	a := t.NewEuler(0, 1, 1.57, "XYZ")
	b := t.NewVector3(1, 0, 1)
	b.ApplyEuler(a)
}
Output:

func EulerFromJSObject

func EulerFromJSObject(p *js.Object) *Euler

EulerFromJSObject returns a wrapped Euler JavaScript class.

func (*Euler) Clone

func (e *Euler) Clone() *Euler

Clone TODO description.

func (*Euler) Copy

func (e *Euler) Copy(euler *Euler) *Euler

Copy TODO description.

func (*Euler) Equals

func (e *Euler) Equals(euler float64) *Euler

Equals TODO description.

func (*Euler) FromArray

func (e *Euler) FromArray(array float64) *Euler

FromArray TODO description.

func (*Euler) JSObject

func (e *Euler) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Euler) OnChange

func (e *Euler) OnChange(callback float64) *Euler

OnChange TODO description.

func (*Euler) OnChangeCallback

func (e *Euler) OnChangeCallback() *Euler

OnChangeCallback TODO description.

func (*Euler) Order

func (e *Euler) Order() float64

Order returns the order-component of the Euler.

func (*Euler) Reorder

func (e *Euler) Reorder() *Euler

Reorder TODO description.

func (*Euler) Set

func (e *Euler) Set(x, y, z, order float64) *Euler

Set TODO description.

func (*Euler) SetFromQuaternion

func (e *Euler) SetFromQuaternion() *Euler

SetFromQuaternion TODO description.

func (*Euler) SetFromRotationMatrix

func (e *Euler) SetFromRotationMatrix(m *Matrix4, order string, update bool) *Euler

SetFromRotationMatrix TODO description.

func (*Euler) SetFromVector3

func (e *Euler) SetFromVector3(v, order float64) *Euler

SetFromVector3 TODO description.

func (*Euler) SetOrder

func (e *Euler) SetOrder(value float64) *Euler

SetOrder sets the order-component of the Euler.

func (*Euler) SetX

func (e *Euler) SetX(value float64) *Euler

SetX sets the x-component of the Euler.

func (*Euler) SetY

func (e *Euler) SetY(value float64) *Euler

SetY sets the y-component of the Euler.

func (*Euler) SetZ

func (e *Euler) SetZ(value float64) *Euler

SetZ sets the z-component of the Euler.

func (*Euler) ToArray

func (e *Euler) ToArray(array, offset float64) *Euler

ToArray TODO description.

func (*Euler) ToVector3

func (e *Euler) ToVector3(optionalResult float64) *Euler

ToVector3 TODO description.

func (*Euler) X

func (e *Euler) X() float64

X returns the x-component of the Euler.

func (*Euler) Y

func (e *Euler) Y() float64

Y returns the y-component of the Euler.

func (*Euler) Z

func (e *Euler) Z() float64

Z returns the z-component of the Euler.

type EventDispatcher

type EventDispatcher struct {
	// contains filtered or unexported fields
}

EventDispatcher handles JavaScript events for custom objects.

http://threejs.org/docs/index.html#Reference/Core/EventDispatcher

func EventDispatcherFromJSObject

func EventDispatcherFromJSObject(p *js.Object) *EventDispatcher

EventDispatcherFromJSObject returns a wrapped EventDispatcher JavaScript class.

func (*EventDispatcher) AddEventListener

func (e *EventDispatcher) AddEventListener(typ, listener float64) *EventDispatcher

AddEventListener TODO description.

func (*EventDispatcher) Apply

func (e *EventDispatcher) Apply(object float64) *EventDispatcher

Apply TODO description.

func (*EventDispatcher) DispatchEvent

func (e *EventDispatcher) DispatchEvent(event float64) *EventDispatcher

DispatchEvent TODO description.

func (*EventDispatcher) HasEventListener

func (e *EventDispatcher) HasEventListener(typ, listener float64) *EventDispatcher

HasEventListener TODO description.

func (*EventDispatcher) JSObject

func (e *EventDispatcher) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*EventDispatcher) RemoveEventListener

func (e *EventDispatcher) RemoveEventListener(typ, listener float64) *EventDispatcher

RemoveEventListener TODO description.

type ExtrudeGeometry

type ExtrudeGeometry struct{ *Geometry }

ExtrudeGeometry represents extruded geometry from a path shape.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/ExtrudeGeometry

func ExtrudeGeometryFromJSObject

func ExtrudeGeometryFromJSObject(p *js.Object) *ExtrudeGeometry

ExtrudeGeometryFromJSObject returns a wrapped ExtrudeGeometry JavaScript class.

func (*ExtrudeGeometry) AddShape

func (e *ExtrudeGeometry) AddShape(shape, options float64) *ExtrudeGeometry

AddShape TODO description.

func (*ExtrudeGeometry) AddShapeList

func (e *ExtrudeGeometry) AddShapeList(shapes, options float64) *ExtrudeGeometry

AddShapeList TODO description.

func (*ExtrudeGeometry) GenerateSideWallUV

func (e *ExtrudeGeometry) GenerateSideWallUV(geometry, indexA, indexB, indexC, indexD float64) *ExtrudeGeometry

GenerateSideWallUV TODO description.

func (*ExtrudeGeometry) GenerateTopUV

func (e *ExtrudeGeometry) GenerateTopUV(geometry, indexA, indexB, indexC float64) *ExtrudeGeometry

GenerateTopUV TODO description.

func (*ExtrudeGeometry) JSObject

func (e *ExtrudeGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type ExtrudeGeometryOpts

type ExtrudeGeometryOpts struct {
	CurveSegments   int
	Steps           int
	Amount          int
	BevelEnabled    bool
	BevelThickness  float64
	BevelSize       float64
	BevelSegments   int
	ExtrudePath     *CurvePath
	Frames          *TubeGeometry
	Material        int
	ExtrudeMaterial int
	UVGenerator     *Object3D
}

ExtrudeGeometryOpts represents options passed to the ExtrudeGeometry constructor.

CurveSegments — int. number of points on the curves
Steps — int. number of points used for subdividing segements of extrude spline
Amount — int. Depth to extrude the shape
BevelEnabled — bool. turn on bevel
BevelThickness — float. how deep into the original shape bevel goes
BevelSize — float. how far from shape outline is bevel
BevelSegments — int. number of bevel layers
ExtrudePath — THREE.CurvePath. 3d spline path to extrude shape along. (creates Frames if (frames aren't defined)
Frames — THREE.TubeGeometry.FrenetFrames. containing arrays of tangents, normals, binormals
Material — int. material index for front and back faces
ExtrudeMaterial — int. material index for extrusion and beveled faces
UVGenerator — Object. object that provides UV generator functions

type Face3

type Face3 struct {
	// contains filtered or unexported fields
}

Face3 is a triangle face.

http://threejs.org/docs/index.html#Reference/Core/Face3

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()

	normal := t.NewVector3(0, 1, 0)
	color := t.NewColor(0xffaa00)
	/* face := */ t.NewFace3(0, 1, 2, normal, color, 0)
	//...
}
Output:

func Face3FromJSObject

func Face3FromJSObject(p *js.Object) *Face3

Face3FromJSObject returns a wrapped Face3 JavaScript class.

func (*Face3) Clone

func (f *Face3) Clone() *Face3

Clone TODO description.

func (*Face3) Copy

func (f *Face3) Copy(source *Face3) *Face3

Copy TODO description.

func (*Face3) Index

func (f *Face3) Index(key string) int

Index returns the element (a vertex index) at this key. key must be "a", "b", or "c".

func (*Face3) JSObject

func (f *Face3) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Face3) SetVertexColor

func (f *Face3) SetVertexColor(index int, color *Color) *Face3

SetVertexColor sets the colors of the indexed vertex. index is the vertex index and must be 0, 1, or 2. color is the color for the vertex.

type FaceNormalsHelper

type FaceNormalsHelper struct {
	// contains filtered or unexported fields
}

FaceNormalsHelper renders arrows to visualize an object's face normals. Requires that the object's geometry be an instance of Geometry (does not work with BufferGeometry), and that face normals have been specified on all faces or calculated with ComputeFaceNormals.

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	boxOpts := &three.BoxGeometryOpts{
		WidthSegments:  2,
		HeightSegments: 2,
		DepthSegments:  2,
	}
	geometry := t.NewBoxGeometry(10, 10, 10, boxOpts)
	opts := three.MeshBasicMaterialOpts{
		"color": 0xff0000,
	}
	material := t.NewMeshBasicMaterial(opts)
	object := t.NewMesh(geometry, material)

	edges := t.NewFaceNormalsHelper(object, 2, 0x00ff00, 1)

	scene.Add(object)
	scene.Add(edges)
}
Output:

func FaceNormalsHelperFromJSObject

func FaceNormalsHelperFromJSObject(p *js.Object) *FaceNormalsHelper

FaceNormalsHelperFromJSObject returns a wrapped FaceNormalsHelper JavaScript class.

func (*FaceNormalsHelper) JSObject

func (f *FaceNormalsHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Float32Attribute

type Float32Attribute struct {
	// contains filtered or unexported fields
}

Float32Attribute represents a float32attribute.

type Float64Attribute

type Float64Attribute struct {
	// contains filtered or unexported fields
}

Float64Attribute represents a float64attribute.

type Fog

type Fog struct {
	// contains filtered or unexported fields
}

Fog represents linear fog.

http://threejs.org/docs/index.html#Reference/Scenes/Fog

func FogFromJSObject

func FogFromJSObject(p *js.Object) *Fog

FogFromJSObject returns a wrapped Fog JavaScript class.

func (*Fog) JSObject

func (f *Fog) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type FogExp2

type FogExp2 struct {
	// contains filtered or unexported fields
}

FogExp2 represents exponential fog.

http://threejs.org/docs/index.html#Reference/Scenes/FogExp2

func FogExp2FromJSObject

func FogExp2FromJSObject(p *js.Object) *FogExp2

FogExp2FromJSObject returns a wrapped FogExp2 JavaScript class.

func (*FogExp2) JSObject

func (f *FogExp2) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Font

type Font struct {
	// contains filtered or unexported fields
}

Font represents a font.

func FontFromJSObject

func FontFromJSObject(p *js.Object) *Font

FontFromJSObject returns a wrapped Font JavaScript class.

func (*Font) GenerateShapes

func (f *Font) GenerateShapes(text, size, divisions float64) *Font

GenerateShapes TODO description.

func (*Font) JSObject

func (f *Font) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type FontLoader

type FontLoader struct {
	// contains filtered or unexported fields
}

FontLoader represents a fontloader.

func FontLoaderFromJSObject

func FontLoaderFromJSObject(p *js.Object) *FontLoader

FontLoaderFromJSObject returns a wrapped FontLoader JavaScript class.

func (*FontLoader) JSObject

func (f *FontLoader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*FontLoader) Load

func (f *FontLoader) Load(url, onLoad, onProgress, onError float64) *FontLoader

Load TODO description.

type Frustum

type Frustum struct {
	// contains filtered or unexported fields
}

Frustum represents a frustum.

func FrustumFromJSObject

func FrustumFromJSObject(p *js.Object) *Frustum

FrustumFromJSObject returns a wrapped Frustum JavaScript class.

func (*Frustum) Clone

func (f *Frustum) Clone() *Frustum

Clone TODO description.

func (*Frustum) ContainsPoint

func (f *Frustum) ContainsPoint(point float64) *Frustum

ContainsPoint TODO description.

func (*Frustum) Copy

func (f *Frustum) Copy(frustum *Frustum) *Frustum

Copy TODO description.

func (*Frustum) IntersectsBox

func (f *Frustum) IntersectsBox() *Frustum

IntersectsBox TODO description.

func (*Frustum) IntersectsObject

func (f *Frustum) IntersectsObject() *Frustum

IntersectsObject TODO description.

func (*Frustum) IntersectsSphere

func (f *Frustum) IntersectsSphere(sphere float64) *Frustum

IntersectsSphere TODO description.

func (*Frustum) JSObject

func (f *Frustum) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Frustum) Set

func (f *Frustum) Set(p0, p1, p2, p3, p4, p5 float64) *Frustum

Set TODO description.

func (*Frustum) SetFromMatrix

func (f *Frustum) SetFromMatrix(m float64) *Frustum

SetFromMatrix TODO description.

type Geometry

type Geometry struct {
	// contains filtered or unexported fields
}

Geometry is a Javascript base class for geometries. A geometry holds all data necessary to describe a 3D model.

http://threejs.org/docs/index.html#Reference/Core/Geometry

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()

	geometry := t.NewGeometry()
	/*
		geometry.vertices.push(
			t.NewVector3(-10, 10, 0),
			t.NewVector3(-10, -10, 0),
			t.NewVector3(10, -10, 0),
		)

		geometry.faces.push(t.NewFace3(0, 1, 2))
	*/
	geometry.ComputeBoundingSphere()
}
Output:

func GeometryFromJSObject

func GeometryFromJSObject(p *js.Object) *Geometry

GeometryFromJSObject returns a wrapped Geometry JavaScript class.

func (*Geometry) ApplyMatrix

func (g *Geometry) ApplyMatrix(matrix float64) *Geometry

ApplyMatrix TODO description.

func (*Geometry) BoundingBox

func (g *Geometry) BoundingBox() *Box3

BoundingBox returns the bounding box of the Geometry.

func (*Geometry) Center

func (g *Geometry) Center() *Geometry

Center TODO description.

func (*Geometry) Clone

func (g *Geometry) Clone() *Geometry

Clone TODO description.

func (*Geometry) ComputeBoundingBox

func (g *Geometry) ComputeBoundingBox() *Geometry

ComputeBoundingBox TODO description.

func (*Geometry) ComputeBoundingSphere

func (g *Geometry) ComputeBoundingSphere() *Geometry

ComputeBoundingSphere TODO description.

func (*Geometry) ComputeFaceNormals

func (g *Geometry) ComputeFaceNormals() *Geometry

ComputeFaceNormals TODO description.

func (*Geometry) ComputeLineDistances

func (g *Geometry) ComputeLineDistances() *Geometry

ComputeLineDistances TODO description.

func (*Geometry) ComputeMorphNormals

func (g *Geometry) ComputeMorphNormals() *Geometry

ComputeMorphNormals TODO description.

func (*Geometry) ComputeTangents

func (g *Geometry) ComputeTangents() *Geometry

ComputeTangents TODO description.

func (*Geometry) ComputeVertexNormals

func (g *Geometry) ComputeVertexNormals(areaWeighted bool) *Geometry

ComputeVertexNormals TODO description.

func (*Geometry) Copy

func (g *Geometry) Copy(source *Geometry) *Geometry

Copy TODO description.

func (*Geometry) Dispose

func (g *Geometry) Dispose() *Geometry

Dispose TODO description.

func (*Geometry) Faces

func (g *Geometry) Faces() []*Face3

Faces returns a slice of the geometry's faces.

func (*Geometry) FromBufferGeometry

func (g *Geometry) FromBufferGeometry(geometry float64) *Geometry

FromBufferGeometry TODO description.

func (*Geometry) JSObject

func (g *Geometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Geometry) LookAt

func (g *Geometry) LookAt() *Geometry

LookAt TODO description.

func (*Geometry) Merge

func (g *Geometry) Merge(geometry, matrix, materialIndexOffset float64) *Geometry

Merge TODO description.

func (*Geometry) MergeMesh

func (g *Geometry) MergeMesh(mesh float64) *Geometry

MergeMesh TODO description.

func (*Geometry) MergeVertices

func (g *Geometry) MergeVertices() *Geometry

MergeVertices TODO description.

func (*Geometry) Normalize

func (g *Geometry) Normalize() *Geometry

Normalize TODO description.

func (*Geometry) RotateX

func (g *Geometry) RotateX() *Geometry

RotateX TODO description.

func (*Geometry) RotateY

func (g *Geometry) RotateY() *Geometry

RotateY TODO description.

func (*Geometry) RotateZ

func (g *Geometry) RotateZ() *Geometry

RotateZ TODO description.

func (*Geometry) Scale

func (g *Geometry) Scale() *Geometry

Scale TODO description.

func (*Geometry) SetVertices

func (g *Geometry) SetVertices(pts *js.Object) *Geometry

SetVertices sets the geometry's vertices.

func (*Geometry) SortFacesByMaterialIndex

func (g *Geometry) SortFacesByMaterialIndex() *Geometry

SortFacesByMaterialIndex TODO description.

func (*Geometry) ToJSON

func (g *Geometry) ToJSON() *Geometry

ToJSON TODO description.

func (*Geometry) Translate

func (g *Geometry) Translate() *Geometry

Translate TODO description.

func (*Geometry) Vertex

func (g *Geometry) Vertex(index int) *Vector3

Vertex returns a vertex at the given index.

func (*Geometry) Vertices

func (g *Geometry) Vertices() []*Vector3

Vertices returns a slice of the geometry's vertices.

func (*Geometry) VerticesLength

func (g *Geometry) VerticesLength() int

VerticesLength returns a the length of the geometry's vertices array.

type GridHelper

type GridHelper struct {
	// contains filtered or unexported fields
}

GridHelper represents a gridhelper.

func GridHelperFromJSObject

func GridHelperFromJSObject(p *js.Object) *GridHelper

GridHelperFromJSObject returns a wrapped GridHelper JavaScript class.

func (*GridHelper) JSObject

func (g *GridHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*GridHelper) SetColors

func (g *GridHelper) SetColors(colorCenterLine, colorGrid float64) *GridHelper

SetColors TODO description.

type Group

type Group struct{ *Object3D }

Group represents a group of objects.

func GroupFromJSObject

func GroupFromJSObject(p *js.Object) *Group

GroupFromJSObject returns a wrapped Group JavaScript class.

func (*Group) JSObject

func (g *Group) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type HemisphereLight

type HemisphereLight struct{ *Light }

HemisphereLight is a light that is positioned directly above the scene.

http://threejs.org/docs/index.html#Reference/Lights/HemisphereLight

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	light := t.NewHemisphereLight(0xffffbb, 0x080820, 1)
	scene.Add(light)
}
Output:

func HemisphereLightFromJSObject

func HemisphereLightFromJSObject(p *js.Object) *HemisphereLight

HemisphereLightFromJSObject returns a wrapped HemisphereLight JavaScript class.

func (*HemisphereLight) Copy

Copy TODO description.

func (*HemisphereLight) JSObject

func (h *HemisphereLight) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type HemisphereLightHelper

type HemisphereLightHelper struct {
	// contains filtered or unexported fields
}

HemisphereLightHelper represents a hemispherelighthelper.

func HemisphereLightHelperFromJSObject

func HemisphereLightHelperFromJSObject(p *js.Object) *HemisphereLightHelper

HemisphereLightHelperFromJSObject returns a wrapped HemisphereLightHelper JavaScript class.

func (*HemisphereLightHelper) JSObject

func (h *HemisphereLightHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type IcosahedronGeometry

type IcosahedronGeometry struct{ *PolyhedronGeometry }

IcosahedronGeometry represents an icosahedron geometry.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/IcosahedronGeometry

func IcosahedronGeometryFromJSObject

func IcosahedronGeometryFromJSObject(p *js.Object) *IcosahedronGeometry

IcosahedronGeometryFromJSObject returns a wrapped IcosahedronGeometry JavaScript class.

func (*IcosahedronGeometry) JSObject

func (i *IcosahedronGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type ImageLoader

type ImageLoader struct {
	// contains filtered or unexported fields
}

ImageLoader represents an imageloader.

func ImageLoaderFromJSObject

func ImageLoaderFromJSObject(p *js.Object) *ImageLoader

ImageLoaderFromJSObject returns a wrapped ImageLoader JavaScript class.

func (*ImageLoader) JSObject

func (i *ImageLoader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*ImageLoader) Load

func (i *ImageLoader) Load(url, onLoad, onProgress, onError float64) *ImageLoader

Load TODO description.

func (*ImageLoader) SetCrossOrigin

func (i *ImageLoader) SetCrossOrigin(value float64) *ImageLoader

SetCrossOrigin TODO description.

func (*ImageLoader) SetPath

func (i *ImageLoader) SetPath(value float64) *ImageLoader

SetPath TODO description.

type ImmediateRenderObject

type ImmediateRenderObject struct {
	// contains filtered or unexported fields
}

ImmediateRenderObject represents an immediaterenderobject.

func ImmediateRenderObjectFromJSObject

func ImmediateRenderObjectFromJSObject(p *js.Object) *ImmediateRenderObject

ImmediateRenderObjectFromJSObject returns a wrapped ImmediateRenderObject JavaScript class.

func (*ImmediateRenderObject) JSObject

func (i *ImmediateRenderObject) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type InstancedBufferAttribute

type InstancedBufferAttribute struct {
	// contains filtered or unexported fields
}

InstancedBufferAttribute represents an instancedbufferattribute.

func InstancedBufferAttributeFromJSObject

func InstancedBufferAttributeFromJSObject(p *js.Object) *InstancedBufferAttribute

InstancedBufferAttributeFromJSObject returns a wrapped InstancedBufferAttribute JavaScript class.

func (*InstancedBufferAttribute) Copy

Copy TODO description.

func (*InstancedBufferAttribute) JSObject

func (i *InstancedBufferAttribute) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type InstancedBufferGeometry

type InstancedBufferGeometry struct {
	// contains filtered or unexported fields
}

InstancedBufferGeometry represents an instancedbuffergeometry.

func InstancedBufferGeometryFromJSObject

func InstancedBufferGeometryFromJSObject(p *js.Object) *InstancedBufferGeometry

InstancedBufferGeometryFromJSObject returns a wrapped InstancedBufferGeometry JavaScript class.

func (*InstancedBufferGeometry) AddGroup

func (i *InstancedBufferGeometry) AddGroup(start, count, instances float64) *InstancedBufferGeometry

AddGroup TODO description.

func (*InstancedBufferGeometry) Copy

Copy TODO description.

func (*InstancedBufferGeometry) JSObject

func (i *InstancedBufferGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type InstancedInterleavedBuffer

type InstancedInterleavedBuffer struct {
	// contains filtered or unexported fields
}

InstancedInterleavedBuffer represents an instancedinterleavedbuffer.

func InstancedInterleavedBufferFromJSObject

func InstancedInterleavedBufferFromJSObject(p *js.Object) *InstancedInterleavedBuffer

InstancedInterleavedBufferFromJSObject returns a wrapped InstancedInterleavedBuffer JavaScript class.

func (*InstancedInterleavedBuffer) Copy

Copy TODO description.

func (*InstancedInterleavedBuffer) JSObject

func (i *InstancedInterleavedBuffer) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Int16Attribute

type Int16Attribute struct {
	// contains filtered or unexported fields
}

Int16Attribute represents an int16attribute.

type Int32Attribute

type Int32Attribute struct {
	// contains filtered or unexported fields
}

Int32Attribute represents an int32attribute.

type Int8Attribute

type Int8Attribute struct {
	// contains filtered or unexported fields
}

Int8Attribute represents an int8attribute.

type InterleavedBuffer

type InterleavedBuffer struct {
	// contains filtered or unexported fields
}

InterleavedBuffer represents an interleavedbuffer.

func InterleavedBufferFromJSObject

func InterleavedBufferFromJSObject(p *js.Object) *InterleavedBuffer

InterleavedBufferFromJSObject returns a wrapped InterleavedBuffer JavaScript class.

func (*InterleavedBuffer) Clone

Clone TODO description.

func (*InterleavedBuffer) Copy

Copy TODO description.

func (*InterleavedBuffer) CopyAt

func (i *InterleavedBuffer) CopyAt(index1, attribute, index2 float64) *InterleavedBuffer

CopyAt TODO description.

func (*InterleavedBuffer) Count

func (i *InterleavedBuffer) Count() float64

Count returns the count-component of the InterleavedBuffer.

func (*InterleavedBuffer) JSObject

func (i *InterleavedBuffer) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*InterleavedBuffer) Length

func (i *InterleavedBuffer) Length() float64

Length returns the length-component of the InterleavedBuffer.

func (*InterleavedBuffer) Set

func (i *InterleavedBuffer) Set(value, offset float64) *InterleavedBuffer

Set TODO description.

func (*InterleavedBuffer) SetDynamic

func (i *InterleavedBuffer) SetDynamic(value float64) *InterleavedBuffer

SetDynamic TODO description.

func (*InterleavedBuffer) SetNeedsUpdate

func (i *InterleavedBuffer) SetNeedsUpdate(value float64) *InterleavedBuffer

SetNeedsUpdate sets the needsUpdate-component of the InterleavedBuffer.

type InterleavedBufferAttribute

type InterleavedBufferAttribute struct {
	// contains filtered or unexported fields
}

InterleavedBufferAttribute represents an interleavedbufferattribute.

func InterleavedBufferAttributeFromJSObject

func InterleavedBufferAttributeFromJSObject(p *js.Object) *InterleavedBufferAttribute

InterleavedBufferAttributeFromJSObject returns a wrapped InterleavedBufferAttribute JavaScript class.

func (*InterleavedBufferAttribute) Count

Count returns the count-component of the InterleavedBufferAttribute.

func (*InterleavedBufferAttribute) GetW

GetW TODO description.

func (*InterleavedBufferAttribute) GetX

GetX TODO description.

func (*InterleavedBufferAttribute) GetY

GetY TODO description.

func (*InterleavedBufferAttribute) GetZ

GetZ TODO description.

func (*InterleavedBufferAttribute) JSObject

func (i *InterleavedBufferAttribute) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*InterleavedBufferAttribute) Length

func (i *InterleavedBufferAttribute) Length() float64

Length returns the length-component of the InterleavedBufferAttribute.

func (*InterleavedBufferAttribute) SetW

SetW TODO description.

func (*InterleavedBufferAttribute) SetX

SetX TODO description.

func (*InterleavedBufferAttribute) SetXY

SetXY TODO description.

func (*InterleavedBufferAttribute) SetXYZ

SetXYZ TODO description.

func (*InterleavedBufferAttribute) SetXYZW

func (i *InterleavedBufferAttribute) SetXYZW(index, x, y, z, w float64) *InterleavedBufferAttribute

SetXYZW TODO description.

func (*InterleavedBufferAttribute) SetY

SetY TODO description.

func (*InterleavedBufferAttribute) SetZ

SetZ TODO description.

type Interpolant

type Interpolant struct {
	// contains filtered or unexported fields
}

Interpolant represents an interpolant.

func InterpolantFromJSObject

func InterpolantFromJSObject(p *js.Object) *Interpolant

InterpolantFromJSObject returns a wrapped Interpolant JavaScript class.

func (*Interpolant) CopySampleValue

func (i *Interpolant) CopySampleValue(index float64) *Interpolant

CopySampleValue TODO description.

func (*Interpolant) Evaluate

func (i *Interpolant) Evaluate(t float64) *Interpolant

Evaluate TODO description.

func (*Interpolant) GetSettings

func (i *Interpolant) GetSettings() *Interpolant

GetSettings TODO description.

func (*Interpolant) Interpolate

func (i *Interpolant) Interpolate(i1, t0, t, t1 float64) *Interpolant

Interpolate TODO description.

func (*Interpolant) IntervalChanged

func (i *Interpolant) IntervalChanged(i1, t0, t1 float64) *Interpolant

IntervalChanged TODO description.

func (*Interpolant) JSObject

func (i *Interpolant) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type JSONLoadFunc

type JSONLoadFunc func(geometry *Geometry, materials []*Material)

JSONLoadFunc is a callback function called by Load.

type JSONLoader

type JSONLoader struct {
	// contains filtered or unexported fields
}

JSONLoader represents a jsonloader.

func JSONLoaderFromJSObject

func JSONLoaderFromJSObject(p *js.Object) *JSONLoader

JSONLoaderFromJSObject returns a wrapped JSONLoader JavaScript class.

func (*JSONLoader) JSObject

func (j *JSONLoader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*JSONLoader) Load

func (j *JSONLoader) Load(url string, onLoad JSONLoadFunc, onProgress, onError interface{}) *JSONLoader

Load TODO description.

func (*JSONLoader) Parse

func (j *JSONLoader) Parse(json, texturePath float64) *JSONLoader

Parse TODO description.

func (*JSONLoader) SetTexturePath

func (j *JSONLoader) SetTexturePath(value float64) *JSONLoader

SetTexturePath TODO description.

func (*JSONLoader) StatusDomElement

func (j *JSONLoader) StatusDomElement() float64

StatusDomElement returns the statusDomElement-component of the JSONLoader.

type JSObject

type JSObject interface {
	JSObject() *js.Object
}

JSObject can return its underlying *js.Object.

type KeyframeTrack

type KeyframeTrack struct {
	// contains filtered or unexported fields
}

KeyframeTrack represents a keyframetrack.

func KeyframeTrackFromJSObject

func KeyframeTrackFromJSObject(p *js.Object) *KeyframeTrack

KeyframeTrackFromJSObject returns a wrapped KeyframeTrack JavaScript class.

func (*KeyframeTrack) GetInterpolation

func (k *KeyframeTrack) GetInterpolation() *KeyframeTrack

GetInterpolation TODO description.

func (*KeyframeTrack) GetValueSize

func (k *KeyframeTrack) GetValueSize() *KeyframeTrack

GetValueSize TODO description.

func (*KeyframeTrack) InterpolantFactoryMethodDiscrete

func (k *KeyframeTrack) InterpolantFactoryMethodDiscrete(result float64) *KeyframeTrack

InterpolantFactoryMethodDiscrete TODO description.

func (*KeyframeTrack) InterpolantFactoryMethodLinear

func (k *KeyframeTrack) InterpolantFactoryMethodLinear(result float64) *KeyframeTrack

InterpolantFactoryMethodLinear TODO description.

func (*KeyframeTrack) InterpolantFactoryMethodSmooth

func (k *KeyframeTrack) InterpolantFactoryMethodSmooth(result float64) *KeyframeTrack

InterpolantFactoryMethodSmooth TODO description.

func (*KeyframeTrack) JSObject

func (k *KeyframeTrack) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*KeyframeTrack) Optimize

func (k *KeyframeTrack) Optimize() *KeyframeTrack

Optimize TODO description.

func (*KeyframeTrack) Parse

func (k *KeyframeTrack) Parse(json float64) *KeyframeTrack

Parse TODO description.

func (*KeyframeTrack) Scale

func (k *KeyframeTrack) Scale(timeScale float64) *KeyframeTrack

Scale TODO description.

func (*KeyframeTrack) SetInterpolation

func (k *KeyframeTrack) SetInterpolation(interpolation float64) *KeyframeTrack

SetInterpolation TODO description.

func (*KeyframeTrack) Shift

func (k *KeyframeTrack) Shift(timeOffset float64) *KeyframeTrack

Shift TODO description.

func (*KeyframeTrack) ToJSON

func (k *KeyframeTrack) ToJSON(track float64) *KeyframeTrack

ToJSON TODO description.

func (*KeyframeTrack) Trim

func (k *KeyframeTrack) Trim(startTime, endTime float64) *KeyframeTrack

Trim TODO description.

func (*KeyframeTrack) Validate

func (k *KeyframeTrack) Validate() *KeyframeTrack

Validate TODO description.

type LOD

type LOD struct {
	// contains filtered or unexported fields
}

LOD shows meshes with more or less geometry based on distance.

http://threejs.org/docs/index.html#Reference/Objects/LOD

func LODFromJSObject

func LODFromJSObject(p *js.Object) *LOD

LODFromJSObject returns a wrapped LOD JavaScript class.

func (*LOD) AddLevel

func (l *LOD) AddLevel(object, distance float64) *LOD

AddLevel TODO description.

func (*LOD) Copy

func (l *LOD) Copy(source *LOD) *LOD

Copy TODO description.

func (*LOD) Get

func (l *LOD) Get() *LOD

Get TODO description.

func (*LOD) GetObjectForDistance

func (l *LOD) GetObjectForDistance(distance float64) *LOD

GetObjectForDistance TODO description.

func (*LOD) JSObject

func (l *LOD) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*LOD) ToJSON

func (l *LOD) ToJSON(meta float64) *LOD

ToJSON TODO description.

type LUT

type LUT struct {
	// contains filtered or unexported fields
}

LUT represents a lookup table.

func LUTFromJSObject

func LUTFromJSObject(p *js.Object) *LUT

LUTFromJSObject returns a wrapped LUT JavaScript class.

func (*LUT) AddColorMap

func (l *LUT) AddColorMap(colormapName string, arrayOfColors *js.Object) *LUT

AddColorMap TODO description.

func (*LUT) ChangeColorMap

func (l *LUT) ChangeColorMap(colormap string) *LUT

ChangeColorMap TODO description.

func (*LUT) ChangeNumberOfColors

func (l *LUT) ChangeNumberOfColors(numberofcolors int) *LUT

ChangeNumberOfColors TODO description.

func (*LUT) Copy

func (l *LUT) Copy(lut *LUT) *LUT

Copy TODO description.

func (*LUT) GetColor

func (l *LUT) GetColor(alpha float64) *Color

GetColor TODO description.

func (*LUT) Set

func (l *LUT) Set(value float64) *LUT

Set TODO description.

func (*LUT) SetLegendLabels

func (l *LUT) SetLegendLabels(parameters, callback interface{}) *js.Object

SetLegendLabels TODO description.

func (*LUT) SetLegendLayout

func (l *LUT) SetLegendLayout(layout bool) bool

SetLegendLayout TODO description.

func (*LUT) SetLegendOff

func (l *LUT) SetLegendOff() string

SetLegendOff TODO description.

func (*LUT) SetLegendOn

func (l *LUT) SetLegendOn(parameters LUTLegendOpts) *Mesh

SetLegendOn TODO description.

func (*LUT) SetLegendPosition

func (l *LUT) SetLegendPosition(position *Vector3) *js.Object

SetLegendPosition TODO description.

func (*LUT) SetMax

func (l *LUT) SetMax(max float64) *LUT

SetMax TODO description.

func (*LUT) SetMin

func (l *LUT) SetMin(min float64) *LUT

SetMin TODO description.

type LUTLegendOpts

type LUTLegendOpts map[string]interface{}

LUTLegendOpts defines options for LUT properties.

type LatheBufferGeometry

type LatheBufferGeometry struct {
	// contains filtered or unexported fields
}

LatheBufferGeometry represents a lathebuffergeometry.

func LatheBufferGeometryFromJSObject

func LatheBufferGeometryFromJSObject(p *js.Object) *LatheBufferGeometry

LatheBufferGeometryFromJSObject returns a wrapped LatheBufferGeometry JavaScript class.

func (*LatheBufferGeometry) JSObject

func (l *LatheBufferGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type LatheGeometry

type LatheGeometry struct {
	// contains filtered or unexported fields
}

LatheGeometry represents a mesh with axial symmetry.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/LatheGeometry

func LatheGeometryFromJSObject

func LatheGeometryFromJSObject(p *js.Object) *LatheGeometry

LatheGeometryFromJSObject returns a wrapped LatheGeometry JavaScript class.

func (*LatheGeometry) JSObject

func (l *LatheGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Layers

type Layers struct {
	// contains filtered or unexported fields
}

Layers represents a layers.

func LayersFromJSObject

func LayersFromJSObject(p *js.Object) *Layers

LayersFromJSObject returns a wrapped Layers JavaScript class.

func (*Layers) Disable

func (l *Layers) Disable(channel float64) *Layers

Disable TODO description.

func (*Layers) Enable

func (l *Layers) Enable(channel float64) *Layers

Enable TODO description.

func (*Layers) JSObject

func (l *Layers) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Layers) Set

func (l *Layers) Set(channel float64) *Layers

Set TODO description.

func (*Layers) Test

func (l *Layers) Test(layers float64) *Layers

Test TODO description.

func (*Layers) Toggle

func (l *Layers) Toggle(channel float64) *Layers

Toggle TODO description.

type LensFlare

type LensFlare struct {
	// contains filtered or unexported fields
}

LensFlare represents a simulated lens flare that tracks a light.

http://threejs.org/docs/index.html#Reference/Objects/LensFlare

func LensFlareFromJSObject

func LensFlareFromJSObject(p *js.Object) *LensFlare

LensFlareFromJSObject returns a wrapped LensFlare JavaScript class.

func (*LensFlare) Add

func (l *LensFlare) Add(texture *js.Object, size, distance float64, blending, color, opacity int) *LensFlare

Add TODO description.

func (*LensFlare) Copy

func (l *LensFlare) Copy(source *LensFlare) *LensFlare

Copy TODO description.

func (*LensFlare) JSObject

func (l *LensFlare) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type LensFlarePlugin

type LensFlarePlugin struct {
	// contains filtered or unexported fields
}

LensFlarePlugin represents a lensflareplugin.

func LensFlarePluginFromJSObject

func LensFlarePluginFromJSObject(p *js.Object) *LensFlarePlugin

LensFlarePluginFromJSObject returns a wrapped LensFlarePlugin JavaScript class.

func (*LensFlarePlugin) JSObject

func (l *LensFlarePlugin) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Light

type Light struct{ *Object3D }

Light is the JavaScript abstract base class for lights.

http://threejs.org/docs/index.html#Reference/Lights/Light

func LightFromJSObject

func LightFromJSObject(p *js.Object) *Light

LightFromJSObject returns a wrapped Light JavaScript class.

func (*Light) Copy

func (l *Light) Copy(source *Light) *Light

Copy TODO description.

func (*Light) JSObject

func (l *Light) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Light) ToJSON

func (l *Light) ToJSON(meta float64) *Light

ToJSON TODO description.

type LightShadow

type LightShadow struct {
	// contains filtered or unexported fields
}

LightShadow represents a light shadow.

http://threejs.org/docs/index.html#Reference/Lights/LightShadow

func LightShadowFromJSObject

func LightShadowFromJSObject(p *js.Object) *LightShadow

LightShadowFromJSObject returns a wrapped LightShadow JavaScript class.

func (*LightShadow) Bias

func (l *LightShadow) Bias() float64

Bias returns the property of the same name.

func (*LightShadow) Camera

func (l *LightShadow) Camera() *Camera

Camera returns the property of the same name.

func (*LightShadow) Clone

func (l *LightShadow) Clone() *LightShadow

Clone TODO description.

func (*LightShadow) Copy

func (l *LightShadow) Copy(source *LightShadow) *LightShadow

Copy TODO description.

func (*LightShadow) JSObject

func (l *LightShadow) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*LightShadow) MapSize

func (l *LightShadow) MapSize() *Vector2

MapSize returns the property of the same name.

func (*LightShadow) Matrix

func (l *LightShadow) Matrix() *Matrix4

Matrix returns the property of the same name.

func (*LightShadow) Radius

func (l *LightShadow) Radius() float64

Radius returns the property of the same name.

func (*LightShadow) SetBias

func (l *LightShadow) SetBias(value float64) *LightShadow

SetBias sets the bias property.

func (*LightShadow) SetMapSize

func (l *LightShadow) SetMapSize(value *Vector2) *LightShadow

SetMapSize sets the mapSize property.

func (*LightShadow) SetMatrix

func (l *LightShadow) SetMatrix(value *Matrix4) *LightShadow

SetMatrix sets the matrix property.

func (*LightShadow) SetRadius

func (l *LightShadow) SetRadius(value float64) *LightShadow

SetRadius sets the radius property.

type Line

type Line struct{ *Object3D }

Line represents a continuous line.

http://threejs.org/docs/index.html#Reference/Objects/Line

func LineFromJSObject

func LineFromJSObject(p *js.Object) *Line

LineFromJSObject returns a wrapper Line JavaScript class.

func (*Line) JSObject

func (l *Line) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Line3

type Line3 struct {
	// contains filtered or unexported fields
}

Line3 represents a line3.

func Line3FromJSObject

func Line3FromJSObject(p *js.Object) *Line3

Line3FromJSObject returns a wrapped Line3 JavaScript class.

func (*Line3) ApplyMatrix4

func (l *Line3) ApplyMatrix4(matrix float64) *Line3

ApplyMatrix4 TODO description.

func (*Line3) At

func (l *Line3) At(t, optionalTarget float64) *Line3

At TODO description.

func (*Line3) Center

func (l *Line3) Center(optionalTarget float64) *Line3

Center TODO description.

func (*Line3) Clone

func (l *Line3) Clone() *Line3

Clone TODO description.

func (*Line3) ClosestPointToPoint

func (l *Line3) ClosestPointToPoint(point, clampToLine, optionalTarget float64) *Line3

ClosestPointToPoint TODO description.

func (*Line3) ClosestPointToPointParameter

func (l *Line3) ClosestPointToPointParameter() *Line3

ClosestPointToPointParameter TODO description.

func (*Line3) Copy

func (l *Line3) Copy(line *Line3) *Line3

Copy TODO description.

func (*Line3) Delta

func (l *Line3) Delta(optionalTarget float64) *Line3

Delta TODO description.

func (*Line3) Distance

func (l *Line3) Distance() *Line3

Distance TODO description.

func (*Line3) DistanceSq

func (l *Line3) DistanceSq() *Line3

DistanceSq TODO description.

func (*Line3) Equals

func (l *Line3) Equals(line float64) *Line3

Equals TODO description.

func (*Line3) JSObject

func (l *Line3) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Line3) Set

func (l *Line3) Set(start, end float64) *Line3

Set TODO description.

type LineBasicMaterial

type LineBasicMaterial struct {
	// contains filtered or unexported fields
}

LineBasicMaterial represents a material for drawing wireframe-style geometries.

http://threejs.org/docs/index.html#Reference/Materials/LineBasicMaterial

func LineBasicMaterialFromJSObject

func LineBasicMaterialFromJSObject(p *js.Object) *LineBasicMaterial

LineBasicMaterialFromJSObject returns a wrapped LineBasicMaterial JavaScript class.

func (*LineBasicMaterial) Copy

Copy TODO description.

func (*LineBasicMaterial) JSObject

func (l *LineBasicMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type LineBasicMaterialOpts

type LineBasicMaterialOpts map[string]interface{}

LineBasicMaterialOpts is a map with one or more properties defining the material's appearance:

color — Line color in hexadecimal. Default is 0xffffff.
linewidth — Line thickness. Default is 1.
linecap — Define appearance of line ends. Default is 'round'.
linejoin — Define appearance of line joints. Default is 'round'.
vertexColors — Define how the vertices gets colored. Default is THREE.NoColors.
fog — Define whether the material color is affected by global fog settings. Default is false.

type LineCurve

type LineCurve struct {
	// contains filtered or unexported fields
}

LineCurve represents a linecurve.

func LineCurveFromJSObject

func LineCurveFromJSObject(p *js.Object) *LineCurve

LineCurveFromJSObject returns a wrapped LineCurve JavaScript class.

func (*LineCurve) GetPoint

func (l *LineCurve) GetPoint(t float64) *LineCurve

GetPoint TODO description.

func (*LineCurve) GetPointAt

func (l *LineCurve) GetPointAt(u float64) *LineCurve

GetPointAt TODO description.

func (*LineCurve) GetTangent

func (l *LineCurve) GetTangent(t float64) *LineCurve

GetTangent TODO description.

func (*LineCurve) JSObject

func (l *LineCurve) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type LineDashedMaterial

type LineDashedMaterial struct {
	// contains filtered or unexported fields
}

LineDashedMaterial represents a material for drawing wireframe-style geometries with dashed lines.

http://threejs.org/docs/index.html#Reference/Materials/LineDashedMaterial

func LineDashedMaterialFromJSObject

func LineDashedMaterialFromJSObject(p *js.Object) *LineDashedMaterial

LineDashedMaterialFromJSObject returns a wrapped LineDashedMaterial JavaScript class.

func (*LineDashedMaterial) Copy

Copy TODO description.

func (*LineDashedMaterial) JSObject

func (l *LineDashedMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type LineSegments

type LineSegments struct{ *Line }

LineSegments represents a series of lines.

http://threejs.org/docs/index.html#Reference/Objects/LineSegments

func LineSegmentsFromJSObject

func LineSegmentsFromJSObject(p *js.Object) *LineSegments

LineSegmentsFromJSObject returns a wrapper LineSegments JavaScript class.

func (*LineSegments) JSObject

func (l *LineSegments) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type LinearInterpolant

type LinearInterpolant struct {
	// contains filtered or unexported fields
}

LinearInterpolant represents a linearinterpolant.

func LinearInterpolantFromJSObject

func LinearInterpolantFromJSObject(p *js.Object) *LinearInterpolant

LinearInterpolantFromJSObject returns a wrapped LinearInterpolant JavaScript class.

func (*LinearInterpolant) Interpolate

func (l *LinearInterpolant) Interpolate(i1, t0, t, t1 float64) *LinearInterpolant

Interpolate TODO description.

func (*LinearInterpolant) JSObject

func (l *LinearInterpolant) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

Loader represents a loader.

func LoaderFromJSObject

func LoaderFromJSObject(p *js.Object) *Loader

LoaderFromJSObject returns a wrapped Loader JavaScript class.

func (*Loader) Add

func (l *Loader) Add(regex, loader float64) *Loader

Add TODO description.

func (*Loader) ExtractURLBase

func (l *Loader) ExtractURLBase(url float64) *Loader

ExtractURLBase TODO description.

func (*Loader) Get

func (l *Loader) Get(file float64) *Loader

Get TODO description.

func (*Loader) InitMaterials

func (l *Loader) InitMaterials(materials, texturePath, crossOrigin float64) *Loader

InitMaterials TODO description.

func (*Loader) JSObject

func (l *Loader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type LoadingManager

type LoadingManager struct {
	// contains filtered or unexported fields
}

LoadingManager represents a loadingmanager.

func LoadingManagerFromJSObject

func LoadingManagerFromJSObject(p *js.Object) *LoadingManager

LoadingManagerFromJSObject returns a wrapped LoadingManager JavaScript class.

func (*LoadingManager) JSObject

func (l *LoadingManager) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type MOUSE

type MOUSE struct {
	// contains filtered or unexported fields
}

MOUSE represents a mouse.

func (*MOUSE) Get

func (m *MOUSE) Get() *MOUSE

Get TODO description.

func (*MOUSE) Value

func (m *MOUSE) Value(target float64) *MOUSE

Value TODO description.

type Material

type Material struct {
	// contains filtered or unexported fields
}

Material represents a generic material.

func MaterialFromJSObject

func MaterialFromJSObject(p *js.Object) *Material

MaterialFromJSObject returns a wrapped Material JavaScript class.

func (*Material) Clone

func (m *Material) Clone() *Material

Clone TODO description.

func (*Material) Copy

func (m *Material) Copy(source *Material) *Material

Copy TODO description.

func (*Material) Dispose

func (m *Material) Dispose() *Material

Dispose TODO description.

func (*Material) JSObject

func (m *Material) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Material) NeedsUpdate

func (m *Material) NeedsUpdate() float64

NeedsUpdate returns the needsUpdate-component of the Material.

func (*Material) SetNeedsUpdate

func (m *Material) SetNeedsUpdate(value float64) *Material

SetNeedsUpdate sets the needsUpdate-component of the Material.

func (*Material) SetShading

func (m *Material) SetShading(value int) *Material

SetShading set the shading-component of the Material.

func (*Material) SetValues

func (m *Material) SetValues(values float64) *Material

SetValues TODO description.

func (*Material) ToJSON

func (m *Material) ToJSON(meta float64) *Material

ToJSON TODO description.

func (*Material) Update

func (m *Material) Update() *Material

Update TODO description.

type MaterialLoader

type MaterialLoader struct {
	// contains filtered or unexported fields
}

MaterialLoader represents a materialloader.

func MaterialLoaderFromJSObject

func MaterialLoaderFromJSObject(p *js.Object) *MaterialLoader

MaterialLoaderFromJSObject returns a wrapped MaterialLoader JavaScript class.

func (*MaterialLoader) GetTexture

func (m *MaterialLoader) GetTexture(name float64) *MaterialLoader

GetTexture TODO description.

func (*MaterialLoader) JSObject

func (m *MaterialLoader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*MaterialLoader) Load

func (m *MaterialLoader) Load(url, onLoad, onProgress, onError float64) *MaterialLoader

Load TODO description.

func (*MaterialLoader) Parse

func (m *MaterialLoader) Parse(json float64) *MaterialLoader

Parse TODO description.

func (*MaterialLoader) SetTextures

func (m *MaterialLoader) SetTextures(value float64) *MaterialLoader

SetTextures TODO description.

type Math

type Math struct {
	// contains filtered or unexported fields
}

Math represents a math.

func MathFromJSObject

func MathFromJSObject(p *js.Object) *Math

MathFromJSObject returns a wrapped Math JavaScript class.

func (*Math) Clamp

func (m *Math) Clamp(value, min, max float64) *Math

Clamp TODO description.

func (*Math) DegToRad

func (m *Math) DegToRad() *Math

DegToRad TODO description.

func (*Math) EuclideanModulo

func (m *Math) EuclideanModulo(n, mod float64) *Math

EuclideanModulo TODO description.

func (*Math) GenerateUUID

func (m *Math) GenerateUUID() *Math

GenerateUUID TODO description.

func (*Math) IsPowerOfTwo

func (m *Math) IsPowerOfTwo(value float64) *Math

IsPowerOfTwo TODO description.

func (*Math) JSObject

func (m *Math) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Math) MapLinear

func (m *Math) MapLinear(x, a1, a2, b1, b2 float64) *Math

MapLinear TODO description.

func (*Math) NearestPowerOfTwo

func (m *Math) NearestPowerOfTwo(value float64) *Math

NearestPowerOfTwo TODO description.

func (*Math) NextPowerOfTwo

func (m *Math) NextPowerOfTwo(value float64) *Math

NextPowerOfTwo TODO description.

func (*Math) RadToDeg

func (m *Math) RadToDeg() *Math

RadToDeg TODO description.

func (*Math) RandFloat

func (m *Math) RandFloat(low, high float64) *Math

RandFloat TODO description.

func (*Math) RandFloatSpread

func (m *Math) RandFloatSpread(rnge float64) *Math

RandFloatSpread TODO description.

func (*Math) RandInt

func (m *Math) RandInt(low, high float64) *Math

RandInt TODO description.

func (*Math) Random16

func (m *Math) Random16() *Math

Random16 TODO description.

func (*Math) Smootherstep

func (m *Math) Smootherstep(x, min, max float64) *Math

Smootherstep TODO description.

func (*Math) Smoothstep

func (m *Math) Smoothstep(x, min, max float64) *Math

Smoothstep TODO description.

type Matrix3

type Matrix3 struct {
	// contains filtered or unexported fields
}

Matrix3 represents a matrix3.

func Matrix3FromJSObject

func Matrix3FromJSObject(p *js.Object) *Matrix3

Matrix3FromJSObject returns a wrapped Matrix3 JavaScript class.

func (*Matrix3) ApplyToBuffer

func (m *Matrix3) ApplyToBuffer() *Matrix3

ApplyToBuffer TODO description.

func (*Matrix3) ApplyToVector3Array

func (m *Matrix3) ApplyToVector3Array() *Matrix3

ApplyToVector3Array TODO description.

func (*Matrix3) Clone

func (m *Matrix3) Clone() *Matrix3

Clone TODO description.

func (*Matrix3) Copy

func (m *Matrix3) Copy(src *Matrix3) *Matrix3

Copy TODO description.

func (*Matrix3) Determinant

func (m *Matrix3) Determinant() *Matrix3

Determinant TODO description.

func (*Matrix3) FlattenToArrayOffset

func (m *Matrix3) FlattenToArrayOffset(array, offset float64) *Matrix3

FlattenToArrayOffset TODO description.

func (*Matrix3) FromArray

func (m *Matrix3) FromArray(array float64) *Matrix3

FromArray TODO description.

func (*Matrix3) GetInverse

func (m *Matrix3) GetInverse(matrix, throwOnDegenerate float64) *Matrix3

GetInverse TODO description.

func (*Matrix3) GetNormalMatrix

func (m *Matrix3) GetNormalMatrix(matrix4 float64) *Matrix3

GetNormalMatrix TODO description.

func (*Matrix3) Identity

func (m *Matrix3) Identity() *Matrix3

Identity TODO description.

func (*Matrix3) JSObject

func (m *Matrix3) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Matrix3) MultiplyScalar

func (m *Matrix3) MultiplyScalar(s float64) *Matrix3

MultiplyScalar TODO description.

func (*Matrix3) Set

func (m *Matrix3) Set(n11, n12, n13, n21, n22, n23, n31, n32, n33 float64) *Matrix3

Set TODO description.

func (*Matrix3) SetFromMatrix4

func (m *Matrix3) SetFromMatrix4(src *Matrix4) *Matrix3

SetFromMatrix4 TODO description.

func (*Matrix3) ToArray

func (m *Matrix3) ToArray() *Matrix3

ToArray TODO description.

func (*Matrix3) Transpose

func (m *Matrix3) Transpose() *Matrix3

Transpose TODO description.

func (*Matrix3) TransposeIntoArray

func (m *Matrix3) TransposeIntoArray(r float64) *Matrix3

TransposeIntoArray TODO description.

type Matrix4

type Matrix4 struct {
	// contains filtered or unexported fields
}

Matrix4 represents a matrix4.

func Matrix4FromJSObject

func Matrix4FromJSObject(p *js.Object) *Matrix4

Matrix4FromJSObject returns a wrapped Matrix4 JavaScript class.

func (*Matrix4) ApplyToBuffer

func (m *Matrix4) ApplyToBuffer() *Matrix4

ApplyToBuffer TODO description.

func (*Matrix4) ApplyToVector3Array

func (m *Matrix4) ApplyToVector3Array() *Matrix4

ApplyToVector3Array TODO description.

func (*Matrix4) Clone

func (m *Matrix4) Clone() *Matrix4

Clone TODO description.

func (*Matrix4) Compose

func (m *Matrix4) Compose(position, quaternion, scale float64) *Matrix4

Compose TODO description.

func (*Matrix4) Copy

func (m *Matrix4) Copy(src *Matrix4) *Matrix4

Copy TODO description.

func (*Matrix4) CopyPosition

func (m *Matrix4) CopyPosition(src *Matrix4) *Matrix4

CopyPosition TODO description.

func (*Matrix4) Decompose

func (m *Matrix4) Decompose() *Matrix4

Decompose TODO description.

func (*Matrix4) Determinant

func (m *Matrix4) Determinant() *Matrix4

Determinant TODO description.

func (*Matrix4) Equals

func (m *Matrix4) Equals(matrix float64) *Matrix4

Equals TODO description.

func (*Matrix4) ExtractBasis

func (m *Matrix4) ExtractBasis(xAxis, yAxis, zAxis float64) *Matrix4

ExtractBasis TODO description.

func (*Matrix4) ExtractRotation

func (m *Matrix4) ExtractRotation() *Matrix4

ExtractRotation TODO description.

func (*Matrix4) FlattenToArrayOffset

func (m *Matrix4) FlattenToArrayOffset(array, offset float64) *Matrix4

FlattenToArrayOffset TODO description.

func (*Matrix4) FromArray

func (m *Matrix4) FromArray(array float64) *Matrix4

FromArray TODO description.

func (*Matrix4) GetInverse

func (m *Matrix4) GetInverse(src *Matrix4, throwOnDegenerate bool) *Matrix4

GetInverse TODO description.

func (*Matrix4) GetMaxScaleOnAxis

func (m *Matrix4) GetMaxScaleOnAxis() *Matrix4

GetMaxScaleOnAxis TODO description.

func (*Matrix4) GetPosition

func (m *Matrix4) GetPosition() *Matrix4

GetPosition TODO description.

func (*Matrix4) Identity

func (m *Matrix4) Identity() *Matrix4

Identity TODO description.

func (*Matrix4) JSObject

func (m *Matrix4) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Matrix4) LookAt

func (m *Matrix4) LookAt() *Matrix4

LookAt TODO description.

func (*Matrix4) MakeBasis

func (m *Matrix4) MakeBasis(xAxis, yAxis, zAxis float64) *Matrix4

MakeBasis TODO description.

func (*Matrix4) MakeFrustum

func (m *Matrix4) MakeFrustum(left, right, bottom, top, near, far float64) *Matrix4

MakeFrustum TODO description.

func (*Matrix4) MakeOrthographic

func (m *Matrix4) MakeOrthographic(left, right, top, bottom, near, far float64) *Matrix4

MakeOrthographic TODO description.

func (*Matrix4) MakePerspective

func (m *Matrix4) MakePerspective(fov, aspect, near, far float64) *Matrix4

MakePerspective TODO description.

func (*Matrix4) MakeRotationAxis

func (m *Matrix4) MakeRotationAxis(axis *Vector3, angle float64) *Matrix4

MakeRotationAxis TODO description.

func (*Matrix4) MakeRotationFromEuler

func (m *Matrix4) MakeRotationFromEuler(euler float64) *Matrix4

MakeRotationFromEuler TODO description.

func (*Matrix4) MakeRotationFromQuaternion

func (m *Matrix4) MakeRotationFromQuaternion(q float64) *Matrix4

MakeRotationFromQuaternion TODO description.

func (*Matrix4) MakeRotationX

func (m *Matrix4) MakeRotationX(theta float64) *Matrix4

MakeRotationX TODO description.

func (*Matrix4) MakeRotationY

func (m *Matrix4) MakeRotationY(theta float64) *Matrix4

MakeRotationY TODO description.

func (*Matrix4) MakeRotationZ

func (m *Matrix4) MakeRotationZ(theta float64) *Matrix4

MakeRotationZ TODO description.

func (*Matrix4) MakeScale

func (m *Matrix4) MakeScale(x, y, z float64) *Matrix4

MakeScale TODO description.

func (*Matrix4) MakeTranslation

func (m *Matrix4) MakeTranslation(x, y, z float64) *Matrix4

MakeTranslation TODO description.

func (*Matrix4) Multiply

func (m *Matrix4) Multiply(src *Matrix4) *Matrix4

Multiply TODO description.

func (*Matrix4) MultiplyMatrices

func (m *Matrix4) MultiplyMatrices(a, b *Matrix4) *Matrix4

MultiplyMatrices TODO description.

func (*Matrix4) MultiplyScalar

func (m *Matrix4) MultiplyScalar(s float64) *Matrix4

MultiplyScalar TODO description.

func (*Matrix4) MultiplyToArray

func (m *Matrix4) MultiplyToArray(a, b, r float64) *Matrix4

MultiplyToArray TODO description.

func (*Matrix4) Scale

func (m *Matrix4) Scale(v float64) *Matrix4

Scale TODO description.

func (*Matrix4) Set

func (m *Matrix4) Set(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 float64) *Matrix4

Set TODO description.

func (*Matrix4) SetPosition

func (m *Matrix4) SetPosition(v float64) *Matrix4

SetPosition TODO description.

func (*Matrix4) ToArray

func (m *Matrix4) ToArray() *Matrix4

ToArray TODO description.

func (*Matrix4) Transpose

func (m *Matrix4) Transpose() *Matrix4

Transpose TODO description.

type Mesh

type Mesh struct{ *Object3D }

Mesh is the base class for mesh objects.

http://threejs.org/docs/index.html#Reference/Objects/Mesh

func MeshFromJSObject

func MeshFromJSObject(p *js.Object) *Mesh

MeshFromJSObject returns a wrapped Mesh JavaScript class.

func (*Mesh) GetMorphTargetIndexByName

func (m *Mesh) GetMorphTargetIndexByName(name string) *Mesh

GetMorphTargetIndexByName TODO description.

func (*Mesh) JSObject

func (m *Mesh) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Mesh) SetDrawMode

func (m *Mesh) SetDrawMode(value bool) *Mesh

SetDrawMode TODO description.

type MeshBasicMaterial

type MeshBasicMaterial struct {
	// contains filtered or unexported fields
}

MeshBasicMaterial represents a material for drawing geometries in a simple shaded (flat or wireframe) way.

http://threejs.org/docs/index.html#Reference/Materials/MeshBasicMaterial

func MeshBasicMaterialFromJSObject

func MeshBasicMaterialFromJSObject(p *js.Object) *MeshBasicMaterial

MeshBasicMaterialFromJSObject returns a wrapped MeshBasicMaterial JavaScript class.

func (*MeshBasicMaterial) Copy

Copy TODO description.

func (*MeshBasicMaterial) JSObject

func (m *MeshBasicMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type MeshBasicMaterialOpts

type MeshBasicMaterialOpts map[string]interface{}

MeshBasicMaterialOpts is a map with one or more properties defining the material's appearance:

color — geometry color in hexadecimal. Default is 0xffffff.
map — Set texture map. Default is null
aoMap — Set ambient occlusion map. Default is null
specularMap — Set specular map. Default is null.
alphaMap — Set alpha map. Default is null.
envMap — Set env map. Default is null.
fog — Define whether the material color is affected by global fog
    settings. Default is true.
shading — Define shading type. Default is THREE.SmoothShading.
wireframe — render geometry as wireframe. Default is false.
wireframeLinewidth — Line thickness. Default is 1.
wireframeLinecap — Define appearance of line ends. Default is 'round'.
wireframeLinejoin — Define appearance of line joints. Default is 'round'.
vertexColors — Define how the vertices gets colored.
    Default is THREE.NoColors.
skinning — Define whether the material uses skinning. Default is false.
morphTargets — Define whether the material uses morphTargets.
    Default is false.

type MeshDepthMaterial

type MeshDepthMaterial struct {
	// contains filtered or unexported fields
}

MeshDepthMaterial represents a material for drawing geometry by depth. Depth is based off of the camera near and far plane. White is nearest, black is farthest.

http://threejs.org/docs/index.html#Reference/Materials/MeshDepthMaterial

func MeshDepthMaterialFromJSObject

func MeshDepthMaterialFromJSObject(p *js.Object) *MeshDepthMaterial

MeshDepthMaterialFromJSObject returns a wrapped MeshDepthMaterial JavaScript class.

func (*MeshDepthMaterial) Copy

Copy TODO description.

func (*MeshDepthMaterial) JSObject

func (m *MeshDepthMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type MeshDepthMaterialOpts

type MeshDepthMaterialOpts map[string]interface{}

MeshDepthMaterialOpts is a map with one or more properties defining the material's appearance:

morphTargets -- Define whether the material uses morphTargets. Default is false.
wireframe -- Render geometry as wireframe. Default is false (i.e. render as smooth shaded).
wireframeLinewidth -- Controls wireframe thickness. Default is 1.

type MeshLambertMaterial

type MeshLambertMaterial struct {
	// contains filtered or unexported fields
}

MeshLambertMaterial represents a material for non-shiny (Lambertian) surfaces, evaluated per vertex.

http://threejs.org/docs/index.html#Reference/Materials/MeshLambertMaterial

func MeshLambertMaterialFromJSObject

func MeshLambertMaterialFromJSObject(p *js.Object) *MeshLambertMaterial

MeshLambertMaterialFromJSObject returns a wrapped MeshLambertMaterial JavaScript class.

func (*MeshLambertMaterial) Copy

Copy TODO description.

func (*MeshLambertMaterial) JSObject

func (m *MeshLambertMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type MeshLambertMaterialOpts

type MeshLambertMaterialOpts map[string]interface{}

MeshLambertMaterialOpts is a map with one or more properties defining the material's appearance:

color — Line color in hexadecimal. Default is 0xffffff.
map — Sets the texture map. Default is null
lightMap — Set light map. Default is null.
aoMap — Set ao map. Default is null.
emissiveMap — Set emissive map. Default is null.
specularMap — Set specular map. Default is null.
alphaMap — Set alpha map. Default is null.
envMap — Set env map. Default is null.
fog — Define whether the material color is affected by global fog
    settings. Default is false.
wireframe — Render geometry as wireframe. Default is false (i.e. render
    as smooth shaded).
wireframeLinewidth — Controls wireframe thickness. Default is 1.
wireframeLinecap — Define appearance of line ends. Default is 'round'.
wireframeLinejoin — Define appearance of line joints. Default is 'round'.
vertexColors — Define how the vertices gets colored.
    Default is THREE.NoColors.
skinning — Define whether the material uses skinning. Default is false.
morphTargets — Define whether the material uses morphTargets.
    Default is false.

type MeshNormalMaterial

type MeshNormalMaterial struct {
	// contains filtered or unexported fields
}

MeshNormalMaterial represents a material that maps the normal vectors to RGB colors.

http://threejs.org/docs/index.html#Reference/Materials/MeshNormalMaterial

func MeshNormalMaterialFromJSObject

func MeshNormalMaterialFromJSObject(p *js.Object) *MeshNormalMaterial

MeshNormalMaterialFromJSObject returns a wrapped MeshNormalMaterial JavaScript class.

func (*MeshNormalMaterial) Copy

Copy TODO description.

func (*MeshNormalMaterial) JSObject

func (m *MeshNormalMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type MeshNormalMaterialOpts

type MeshNormalMaterialOpts map[string]interface{}

MeshNormalMaterialOpts is a map with one or more properties defining the material's appearance:

wireframe -- Render geometry as wireframe. Default is false (i.e. render as smooth shaded).
wireframeLinewidth -- Controls wireframe thickness. Default is 1.
morphTargets -- Define whether the material uses morphTargets. Default is false.

type MeshPhongMaterial

type MeshPhongMaterial struct{ *Material }

MeshPhongMaterial represents a material for shiny surfaces, evaluated per pixel.

http://threejs.org/docs/index.html#Reference/Materials/MeshPhongMaterial

func MeshPhongMaterialFromJSObject

func MeshPhongMaterialFromJSObject(p *js.Object) *MeshPhongMaterial

MeshPhongMaterialFromJSObject returns a wrapped MeshPhongMaterial JavaScript class.

func (*MeshPhongMaterial) Copy

Copy TODO description.

func (*MeshPhongMaterial) JSObject

func (m *MeshPhongMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type MeshPhongMaterialOpts

type MeshPhongMaterialOpts map[string]interface{}

MeshPhongMaterialOpts is a map with one or more properties defining the material's appearance:

color — geometry color in hexadecimal. Default is 0xffffff.
map — Set texture map. Default is null
lightMap — Set light map. Default is null.
aoMap — Set ao map. Default is null.
emissiveMap — Set emissive map. Default is null.
specularMap — Set specular map. Default is null.
alphaMap — Set alpha map. Default is null.
displacementMap — Set displacement map. Default is null.
displacementScale — Set displacement scale. Default is 1.
displacementBias — Set displacement offset. Default is 0.
envMap — Set env map. Default is null.
fog — Define whether the material color is affected by global fog settings. Default is true.
shading — Define shading type. Default is THREE.SmoothShading.
wireframe — render geometry as wireframe. Default is false.
wireframeLinewidth — Line thickness. Default is 1.
wireframeLinecap — Define appearance of line ends. Default is 'round'.
wireframeLinejoin — Define appearance of line joints. Default is 'round'.
vertexColors — Define how the vertices gets colored. Default is THREE.NoColors.
skinning — Define whether the material uses skinning. Default is false.
morphTargets — Define whether the material uses morphTargets. Default is false.

type MeshStandardMaterial

type MeshStandardMaterial struct {
	// contains filtered or unexported fields
}

MeshStandardMaterial represents a meshstandardmaterial.

func MeshStandardMaterialFromJSObject

func MeshStandardMaterialFromJSObject(p *js.Object) *MeshStandardMaterial

MeshStandardMaterialFromJSObject returns a wrapped MeshStandardMaterial JavaScript class.

func (*MeshStandardMaterial) Copy

Copy TODO description.

func (*MeshStandardMaterial) JSObject

func (m *MeshStandardMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type MeshStandardMaterialOpts

type MeshStandardMaterialOpts map[string]interface{}

MeshStandardMaterialOpts is a map with one or more properties defining the material's appearance.

type MorphBlendMesh

type MorphBlendMesh struct {
	// contains filtered or unexported fields
}

MorphBlendMesh represents a morphblendmesh.

func MorphBlendMeshFromJSObject

func MorphBlendMeshFromJSObject(p *js.Object) *MorphBlendMesh

MorphBlendMeshFromJSObject returns a wrapped MorphBlendMesh JavaScript class.

func (*MorphBlendMesh) AutoCreateAnimations

func (m *MorphBlendMesh) AutoCreateAnimations(fps float64) *MorphBlendMesh

AutoCreateAnimations TODO description.

func (*MorphBlendMesh) CreateAnimation

func (m *MorphBlendMesh) CreateAnimation(name, start, end, fps float64) *MorphBlendMesh

CreateAnimation TODO description.

func (*MorphBlendMesh) GetAnimationDuration

func (m *MorphBlendMesh) GetAnimationDuration(name float64) *MorphBlendMesh

GetAnimationDuration TODO description.

func (*MorphBlendMesh) GetAnimationTime

func (m *MorphBlendMesh) GetAnimationTime(name float64) *MorphBlendMesh

GetAnimationTime TODO description.

func (*MorphBlendMesh) JSObject

func (m *MorphBlendMesh) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*MorphBlendMesh) PlayAnimation

func (m *MorphBlendMesh) PlayAnimation(name float64) *MorphBlendMesh

PlayAnimation TODO description.

func (*MorphBlendMesh) SetAnimationDirectionBackward

func (m *MorphBlendMesh) SetAnimationDirectionBackward(name float64) *MorphBlendMesh

SetAnimationDirectionBackward TODO description.

func (*MorphBlendMesh) SetAnimationDirectionForward

func (m *MorphBlendMesh) SetAnimationDirectionForward(name float64) *MorphBlendMesh

SetAnimationDirectionForward TODO description.

func (*MorphBlendMesh) SetAnimationDuration

func (m *MorphBlendMesh) SetAnimationDuration(name, duration float64) *MorphBlendMesh

SetAnimationDuration TODO description.

func (*MorphBlendMesh) SetAnimationFPS

func (m *MorphBlendMesh) SetAnimationFPS(name, fps float64) *MorphBlendMesh

SetAnimationFPS TODO description.

func (*MorphBlendMesh) SetAnimationTime

func (m *MorphBlendMesh) SetAnimationTime(name, time float64) *MorphBlendMesh

SetAnimationTime TODO description.

func (*MorphBlendMesh) SetAnimationWeight

func (m *MorphBlendMesh) SetAnimationWeight(name, weight float64) *MorphBlendMesh

SetAnimationWeight TODO description.

func (*MorphBlendMesh) StopAnimation

func (m *MorphBlendMesh) StopAnimation(name float64) *MorphBlendMesh

StopAnimation TODO description.

func (*MorphBlendMesh) Update

func (m *MorphBlendMesh) Update(delta float64) *MorphBlendMesh

Update TODO description.

type MultiMaterial

type MultiMaterial struct {
	// contains filtered or unexported fields
}

MultiMaterial represents a multimaterial.

func MultiMaterialFromJSObject

func MultiMaterialFromJSObject(p *js.Object) *MultiMaterial

MultiMaterialFromJSObject returns a wrapped MultiMaterial JavaScript class.

func (*MultiMaterial) Clone

func (m *MultiMaterial) Clone() *MultiMaterial

Clone TODO description.

func (*MultiMaterial) JSObject

func (m *MultiMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*MultiMaterial) ToJSON

func (m *MultiMaterial) ToJSON(meta float64) *MultiMaterial

ToJSON TODO description.

type NumberKeyframeTrack

type NumberKeyframeTrack struct {
	// contains filtered or unexported fields
}

NumberKeyframeTrack represents a numberkeyframetrack.

func NumberKeyframeTrackFromJSObject

func NumberKeyframeTrackFromJSObject(p *js.Object) *NumberKeyframeTrack

NumberKeyframeTrackFromJSObject returns a wrapped NumberKeyframeTrack JavaScript class.

func (*NumberKeyframeTrack) JSObject

func (n *NumberKeyframeTrack) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Object3D

type Object3D struct {
	// contains filtered or unexported fields
}

Object3D is the JavaScript base class for scene graph objects.

http://threejs.org/docs/index.html#Reference/Core/Object3D

func Object3DFromJSObject

func Object3DFromJSObject(p *js.Object) *Object3D

Object3DFromJSObject returns a wrapped Object3D JavaScript class.

func (*Object3D) Add

func (o *Object3D) Add(obj interface{}) *Object3D

Add adds an object as a child to object o.

func (*Object3D) ApplyMatrix

func (o *Object3D) ApplyMatrix(matrix *Matrix4) *Object3D

ApplyMatrix updates the position, rotation and scale with the matrix.

func (*Object3D) CastShadow

func (o *Object3D) CastShadow() bool

CastShadow determines if the object is rendered to the shadow map. The default is true.

func (*Object3D) Children

func (o *Object3D) Children() []*Object3D

Children returns a slice of the object's children.

func (*Object3D) Clone

func (o *Object3D) Clone(recursive float64) *Object3D

Clone TODO description.

func (*Object3D) Copy

func (o *Object3D) Copy(source *Object3D, recursive bool) *Object3D

Copy TODO description.

func (*Object3D) FrustumCulled

func (o *Object3D) FrustumCulled() bool

FrustumCulled determines if every frame is checked if the object is in the frustum of the camera. Otherwise the object gets drawn every frame even if it isn't visible. The default is true.

func (*Object3D) GetObjectByID

func (o *Object3D) GetObjectByID(id int) *Object3D

GetObjectByID TODO description.

func (*Object3D) GetObjectByName

func (o *Object3D) GetObjectByName(name string) *Object3D

GetObjectByName TODO description.

func (*Object3D) GetObjectByProperty

func (o *Object3D) GetObjectByProperty(name string, value float64) *Object3D

GetObjectByProperty TODO description.

func (*Object3D) GetWorldDirection

func (o *Object3D) GetWorldDirection() *Object3D

GetWorldDirection TODO description.

func (*Object3D) GetWorldPosition

func (o *Object3D) GetWorldPosition(optionalTarget float64) *Object3D

GetWorldPosition TODO description.

func (*Object3D) GetWorldQuaternion

func (o *Object3D) GetWorldQuaternion() *Object3D

GetWorldQuaternion TODO description.

func (*Object3D) GetWorldRotation

func (o *Object3D) GetWorldRotation() *Object3D

GetWorldRotation TODO description.

func (*Object3D) GetWorldScale

func (o *Object3D) GetWorldScale() *Object3D

GetWorldScale TODO description.

func (*Object3D) ID

func (o *Object3D) ID() int

ID returns a unique identifier for this object instance.

func (*Object3D) JSObject

func (o *Object3D) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Object3D) Layers

func (o *Object3D) Layers() *Layers

Layers returns the property of the same name.

func (*Object3D) LocalToWorld

func (o *Object3D) LocalToWorld(vector float64) *Object3D

LocalToWorld TODO description.

func (*Object3D) LookAt

func (o *Object3D) LookAt() *Object3D

LookAt TODO description.

func (*Object3D) Matrix

func (o *Object3D) Matrix() *Matrix4

Matrix is the local transform.

func (*Object3D) MatrixAutoUpdate

func (o *Object3D) MatrixAutoUpdate() bool

MatrixAutoUpdate determines if the position, (rotation or quaternion), scale, and matrixWorld matrices are recalculated for every frame. The default is true.

func (*Object3D) MatrixWorld

func (o *Object3D) MatrixWorld() *Matrix4

MatrixWorld is the global transform of the object. If the Object3d has no parent, then it's identical to the local transform.

func (*Object3D) MatrixWorldNeedsUpdate

func (o *Object3D) MatrixWorldNeedsUpdate() bool

MatrixWorldNeedsUpdate determines if matrixWorld is recalculated for the frame, in which case this property is reset to false afterward. The default is false.

func (*Object3D) ModelViewMatrix

func (o *Object3D) ModelViewMatrix() *Matrix4

ModelViewMatrix returns the property of the same name.

func (*Object3D) Name

func (o *Object3D) Name() string

Name returns the optional name of the object (which does not need to be unique).

func (*Object3D) NormalMatrix

func (o *Object3D) NormalMatrix() *Matrix3

NormalMatrix returns the property of the same name.

func (*Object3D) Parent

func (o *Object3D) Parent() *Object3D

Parent is the object's parent in the scene graph.

func (*Object3D) Position

func (o *Object3D) Position() *Vector3

Position is the object's local position.

func (*Object3D) Quaternion

func (o *Object3D) Quaternion() *Quaternion

Quaternion returns the property of the same name.

func (*Object3D) Raycast

func (o *Object3D) Raycast() *Object3D

Raycast TODO description.

func (*Object3D) ReceiveShadow

func (o *Object3D) ReceiveShadow() bool

ReceiveShadow determines if the material gets bakes in shadow receiving. The default is false.

func (*Object3D) Remove

func (o *Object3D) Remove(obj interface{}) *Object3D

Remove removes a child object.

func (*Object3D) RenderOrder

func (o *Object3D) RenderOrder() int

RenderOrder returns the property of the same name.

func (*Object3D) RotateOnAxis

func (o *Object3D) RotateOnAxis() *Object3D

RotateOnAxis TODO description.

func (*Object3D) RotateX

func (o *Object3D) RotateX() *Object3D

RotateX TODO description.

func (*Object3D) RotateY

func (o *Object3D) RotateY() *Object3D

RotateY TODO description.

func (*Object3D) RotateZ

func (o *Object3D) RotateZ() *Object3D

RotateZ TODO description.

func (*Object3D) Rotation

func (o *Object3D) Rotation() *Euler

Rotation is the object's local rotation (Euler angles), in radians.

func (*Object3D) RotationAutoUpdate

func (o *Object3D) RotationAutoUpdate() bool

RotationAutoUpdate returns the property of the same name.

func (*Object3D) Scale

func (o *Object3D) Scale() *Vector3

Scale is the object's local scale.

func (*Object3D) SetCastShadow

func (o *Object3D) SetCastShadow(value bool) *Object3D

SetCastShadow sets the castShadow property.

func (*Object3D) SetFrustumCulled

func (o *Object3D) SetFrustumCulled(value bool) *Object3D

SetFrustumCulled sets the frustumCulled property.

func (*Object3D) SetLayers

func (o *Object3D) SetLayers(value *Layers) *Object3D

SetLayers sets the layers property.

func (*Object3D) SetMatrix

func (o *Object3D) SetMatrix(value *Matrix4) *Object3D

SetMatrix sets the matrix property.

func (*Object3D) SetMatrixAutoUpdate

func (o *Object3D) SetMatrixAutoUpdate(value bool) *Object3D

SetMatrixAutoUpdate sets the matrixAutoUpdate property.

func (*Object3D) SetMatrixWorld

func (o *Object3D) SetMatrixWorld(value *Matrix4) *Object3D

SetMatrixWorld sets the matrixWorld property.

func (*Object3D) SetMatrixWorldNeedsUpdate

func (o *Object3D) SetMatrixWorldNeedsUpdate(value bool) *Object3D

SetMatrixWorldNeedsUpdate sets the matrixWorldNeedsUpdate property.

func (*Object3D) SetName

func (o *Object3D) SetName(value string) *Object3D

SetName sets the name property.

func (*Object3D) SetReceiveShadow

func (o *Object3D) SetReceiveShadow(value bool) *Object3D

SetReceiveShadow sets the receiveShadow property.

func (*Object3D) SetRenderOrder

func (o *Object3D) SetRenderOrder(value int) *Object3D

SetRenderOrder sets the renderOrder property.

func (*Object3D) SetRotationAutoUpdate

func (o *Object3D) SetRotationAutoUpdate(value bool) *Object3D

SetRotationAutoUpdate sets the rotationAutoUpdate property.

func (*Object3D) SetRotationFromAxisAngle

func (o *Object3D) SetRotationFromAxisAngle(axis, angle float64) *Object3D

SetRotationFromAxisAngle TODO description.

func (*Object3D) SetRotationFromEuler

func (o *Object3D) SetRotationFromEuler(euler float64) *Object3D

SetRotationFromEuler TODO description.

func (*Object3D) SetRotationFromMatrix

func (o *Object3D) SetRotationFromMatrix(m float64) *Object3D

SetRotationFromMatrix TODO description.

func (*Object3D) SetRotationFromQuaternion

func (o *Object3D) SetRotationFromQuaternion(q float64) *Object3D

SetRotationFromQuaternion TODO description.

func (*Object3D) SetUserData

func (o *Object3D) SetUserData(value *js.Object) *Object3D

SetUserData sets the userData property.

func (*Object3D) SetVisible

func (o *Object3D) SetVisible(value bool) *Object3D

SetVisible sets the visible property.

func (*Object3D) Shadow

func (o *Object3D) Shadow() *LightShadow

Shadow returns the property of the same name.

func (*Object3D) ToJSON

func (o *Object3D) ToJSON(meta float64) *Object3D

ToJSON TODO description.

func (*Object3D) TranslateOnAxis

func (o *Object3D) TranslateOnAxis() *Object3D

TranslateOnAxis TODO description.

func (*Object3D) TranslateX

func (o *Object3D) TranslateX(distance float64) *Object3D

TranslateX translates object along x axis by distance.

func (*Object3D) TranslateY

func (o *Object3D) TranslateY(distance float64) *Object3D

TranslateY translates object along y axis by distance.

func (*Object3D) TranslateZ

func (o *Object3D) TranslateZ() *Object3D

TranslateZ TODO description.

func (*Object3D) Traverse

func (o *Object3D) Traverse(callback float64) *Object3D

Traverse TODO description.

func (*Object3D) TraverseAncestors

func (o *Object3D) TraverseAncestors(callback float64) *Object3D

TraverseAncestors TODO description.

func (*Object3D) TraverseVisible

func (o *Object3D) TraverseVisible(callback float64) *Object3D

TraverseVisible TODO description.

func (*Object3D) Type

func (o *Object3D) Type() string

Type returns the property of the same name.

func (*Object3D) UUID

func (o *Object3D) UUID() int

UUID returns the universally unique identifier for this object instance.

func (*Object3D) Up

func (o *Object3D) Up() *Vector3

Up returns the up direction. The default is &Vector(0, 1, 0).

func (*Object3D) UpdateMatrix

func (o *Object3D) UpdateMatrix() *Object3D

UpdateMatrix TODO description.

func (*Object3D) UpdateMatrixWorld

func (o *Object3D) UpdateMatrixWorld(force float64) *Object3D

UpdateMatrixWorld TODO description.

func (*Object3D) UserData

func (o *Object3D) UserData() *js.Object

UserData is an object that can be used to store custom data about the Object3d.

func (*Object3D) Visible

func (o *Object3D) Visible() bool

Visible is the visibility of the object. The default is true.

func (*Object3D) WorldToLocal

func (o *Object3D) WorldToLocal() *Object3D

WorldToLocal TODO description.

type ObjectLoader

type ObjectLoader struct {
	// contains filtered or unexported fields
}

ObjectLoader represents an objectloader.

func ObjectLoaderFromJSObject

func ObjectLoaderFromJSObject(p *js.Object) *ObjectLoader

ObjectLoaderFromJSObject returns a wrapped ObjectLoader JavaScript class.

func (*ObjectLoader) JSObject

func (o *ObjectLoader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*ObjectLoader) Load

func (o *ObjectLoader) Load(url, onLoad, onProgress, onError float64) *ObjectLoader

Load TODO description.

func (*ObjectLoader) Parse

func (o *ObjectLoader) Parse(json, onLoad float64) *ObjectLoader

Parse TODO description.

func (*ObjectLoader) ParseAnimations

func (o *ObjectLoader) ParseAnimations(json float64) *ObjectLoader

ParseAnimations TODO description.

func (*ObjectLoader) ParseGeometries

func (o *ObjectLoader) ParseGeometries(json float64) *ObjectLoader

ParseGeometries TODO description.

func (*ObjectLoader) ParseImages

func (o *ObjectLoader) ParseImages(json, onLoad float64) *ObjectLoader

ParseImages TODO description.

func (*ObjectLoader) ParseMaterials

func (o *ObjectLoader) ParseMaterials(json, textures float64) *ObjectLoader

ParseMaterials TODO description.

func (*ObjectLoader) ParseObject

func (o *ObjectLoader) ParseObject() *ObjectLoader

ParseObject TODO description.

func (*ObjectLoader) ParseTextures

func (o *ObjectLoader) ParseTextures(json, images float64) *ObjectLoader

ParseTextures TODO description.

func (*ObjectLoader) SetCrossOrigin

func (o *ObjectLoader) SetCrossOrigin(value float64) *ObjectLoader

SetCrossOrigin TODO description.

func (*ObjectLoader) SetTexturePath

func (o *ObjectLoader) SetTexturePath(value float64) *ObjectLoader

SetTexturePath TODO description.

type OctahedronGeometry

type OctahedronGeometry struct {
	// contains filtered or unexported fields
}

OctahedronGeometry represents an octahedron.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/OctahedronGeometry

func OctahedronGeometryFromJSObject

func OctahedronGeometryFromJSObject(p *js.Object) *OctahedronGeometry

OctahedronGeometryFromJSObject returns a wrapped OctahedronGeometry JavaScript class.

func (*OctahedronGeometry) JSObject

func (o *OctahedronGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type OrthographicCamera

type OrthographicCamera struct{ *Camera }

OrthographicCamera is a camera with orthographic projection.

http://threejs.org/docs/index.html#Reference/Cameras/OrthographicCamera

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	const width, height = 800, 600
	t := three.New()
	scene := t.NewScene()

	camera := t.NewOrthographicCamera(width/-2, width/2, height/2, height/-2, 1, 1000)
	scene.Add(camera)
}
Output:

func OrthographicCameraFromJSObject

func OrthographicCameraFromJSObject(p *js.Object) *OrthographicCamera

OrthographicCameraFromJSObject returns a wrapped OrthographicCamera JavaScript class.

func (*OrthographicCamera) Bottom

func (o *OrthographicCamera) Bottom() float64

Bottom returns the property of the same name.

func (*OrthographicCamera) Copy

Copy TODO description.

func (*OrthographicCamera) Far

func (o *OrthographicCamera) Far() float64

Far returns the property of the same name.

func (*OrthographicCamera) JSObject

func (o *OrthographicCamera) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*OrthographicCamera) Left

func (o *OrthographicCamera) Left() float64

Left returns the property of the same name.

func (*OrthographicCamera) Near

func (o *OrthographicCamera) Near() float64

Near returns the property of the same name.

func (*OrthographicCamera) Right

func (o *OrthographicCamera) Right() float64

Right returns the property of the same name.

func (*OrthographicCamera) ToJSON

ToJSON TODO description.

func (*OrthographicCamera) Top

func (o *OrthographicCamera) Top() float64

Top returns the property of the same name.

func (*OrthographicCamera) Zoom

func (o *OrthographicCamera) Zoom() float64

Zoom returns the property of the same name.

type ParametricGeometry

type ParametricGeometry struct {
	// contains filtered or unexported fields
}

ParametricGeometry represents geometry defined by a parametric surface.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/ParametricGeometry

func ParametricGeometryFromJSObject

func ParametricGeometryFromJSObject(p *js.Object) *ParametricGeometry

ParametricGeometryFromJSObject returns a wrapped ParametricGeometry JavaScript class.

func (*ParametricGeometry) JSObject

func (p *ParametricGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Path

type Path struct{ *CurvePath }

Path represents a path.

func PathFromJSObject

func PathFromJSObject(p *js.Object) *Path

PathFromJSObject returns a wrapped Path JavaScript class.

func (*Path) Absarc

func (p *Path) Absarc(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise float64) *Path

Absarc TODO description.

func (*Path) Absellipse

func (p *Path) Absellipse(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation float64) *Path

Absellipse TODO description.

func (*Path) Arc

func (p *Path) Arc(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise float64) *Path

Arc TODO description.

func (*Path) BezierCurveTo

func (p *Path) BezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY float64) *Path

BezierCurveTo TODO description.

func (*Path) Ellipse

func (p *Path) Ellipse(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation float64) *Path

Ellipse TODO description.

func (*Path) FromPoints

func (p *Path) FromPoints(vectors *js.Object) *Path

FromPoints TODO description.

func (*Path) GetPoints

func (p *Path) GetPoints(divisions float64) *Path

GetPoints TODO description.

func (*Path) GetSpacedPoints

func (p *Path) GetSpacedPoints(divisions float64) *Path

GetSpacedPoints TODO description.

func (*Path) JSObject

func (p *Path) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Path) LineTo

func (p *Path) LineTo(x, y float64) *Path

LineTo TODO description.

func (*Path) MoveTo

func (p *Path) MoveTo(x, y float64) *Path

MoveTo TODO description.

func (*Path) QuadraticCurveTo

func (p *Path) QuadraticCurveTo(aCPx, aCPy, aX, aY float64) *Path

QuadraticCurveTo TODO description.

func (*Path) SplineThru

func (p *Path) SplineThru(pts float64) *Path

SplineThru TODO description.

func (*Path) ToShapes

func (p *Path) ToShapes(isCCW, noHoles float64) *Path

ToShapes TODO description.

type PerspectiveCamera

type PerspectiveCamera struct{ *Camera }

PerspectiveCamera is a camera with perspective projection.

http://threejs.org/docs/index.html#Reference/Cameras/PerspectiveCamera

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	const width, height = 800, 600
	t := three.New()
	scene := t.NewScene()

	camera := t.NewPerspectiveCamera(45, width/height, 1, 1000)
	scene.Add(camera)
}
Output:

func PerspectiveCameraFromJSObject

func PerspectiveCameraFromJSObject(p *js.Object) *PerspectiveCamera

PerspectiveCameraFromJSObject returns a wrapped PerspectiveCamera JavaScript class.

func (*PerspectiveCamera) Aspect

func (p *PerspectiveCamera) Aspect() float64

Aspect returns the property of the same name.

func (*PerspectiveCamera) Copy

Copy TODO description.

func (*PerspectiveCamera) FOV

func (p *PerspectiveCamera) FOV() float64

FOV returns the property of the same name.

func (*PerspectiveCamera) Far

func (p *PerspectiveCamera) Far() float64

Far returns the property of the same name.

func (*PerspectiveCamera) FocalLength

func (p *PerspectiveCamera) FocalLength() float64

FocalLength returns the property of the same name.

func (*PerspectiveCamera) JSObject

func (p *PerspectiveCamera) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*PerspectiveCamera) Near

func (p *PerspectiveCamera) Near() float64

Near returns the property of the same name.

func (*PerspectiveCamera) SetAspect

func (p *PerspectiveCamera) SetAspect(value float64) *PerspectiveCamera

SetAspect set the aspect property.

func (*PerspectiveCamera) SetLens

func (p *PerspectiveCamera) SetLens(focalLength, frameHeight float64) *PerspectiveCamera

SetLens TODO description.

func (*PerspectiveCamera) SetViewOffset

func (p *PerspectiveCamera) SetViewOffset(fullWidth, fullHeight, x, y, width, height float64) *PerspectiveCamera

SetViewOffset TODO description.

func (*PerspectiveCamera) ToJSON

func (p *PerspectiveCamera) ToJSON(meta float64) *PerspectiveCamera

ToJSON TODO description.

func (*PerspectiveCamera) Zoom

func (p *PerspectiveCamera) Zoom() float64

Zoom returns the property of the same name.

type Plane

type Plane struct {
	// contains filtered or unexported fields
}

Plane represents a plane.

func PlaneFromJSObject

func PlaneFromJSObject(p *js.Object) *Plane

PlaneFromJSObject returns a wrapped Plane JavaScript class.

func (*Plane) ApplyMatrix4

func (p *Plane) ApplyMatrix4() *Plane

ApplyMatrix4 TODO description.

func (*Plane) Clone

func (p *Plane) Clone() *Plane

Clone TODO description.

func (*Plane) CoplanarPoint

func (p *Plane) CoplanarPoint(optionalTarget float64) *Plane

CoplanarPoint TODO description.

func (*Plane) Copy

func (p *Plane) Copy(plane *Plane) *Plane

Copy TODO description.

func (*Plane) DistanceToPoint

func (p *Plane) DistanceToPoint(point float64) *Plane

DistanceToPoint TODO description.

func (*Plane) DistanceToSphere

func (p *Plane) DistanceToSphere(sphere float64) *Plane

DistanceToSphere TODO description.

func (*Plane) Equals

func (p *Plane) Equals(plane float64) *Plane

Equals TODO description.

func (*Plane) IntersectLine

func (p *Plane) IntersectLine() *Plane

IntersectLine TODO description.

func (*Plane) IntersectsBox

func (p *Plane) IntersectsBox(box float64) *Plane

IntersectsBox TODO description.

func (*Plane) IntersectsLine

func (p *Plane) IntersectsLine(line float64) *Plane

IntersectsLine TODO description.

func (*Plane) IntersectsSphere

func (p *Plane) IntersectsSphere(sphere float64) *Plane

IntersectsSphere TODO description.

func (*Plane) JSObject

func (p *Plane) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Plane) Negate

func (p *Plane) Negate() *Plane

Negate TODO description.

func (*Plane) Normalize

func (p *Plane) Normalize() *Plane

Normalize TODO description.

func (*Plane) OrthoPoint

func (p *Plane) OrthoPoint(point, optionalTarget float64) *Plane

OrthoPoint TODO description.

func (*Plane) ProjectPoint

func (p *Plane) ProjectPoint(point, optionalTarget float64) *Plane

ProjectPoint TODO description.

func (*Plane) Set

func (p *Plane) Set(normal, constant float64) *Plane

Set TODO description.

func (*Plane) SetComponents

func (p *Plane) SetComponents(x, y, z, w float64) *Plane

SetComponents TODO description.

func (*Plane) SetFromCoplanarPoints

func (p *Plane) SetFromCoplanarPoints() *Plane

SetFromCoplanarPoints TODO description.

func (*Plane) SetFromNormalAndCoplanarPoint

func (p *Plane) SetFromNormalAndCoplanarPoint(normal, point float64) *Plane

SetFromNormalAndCoplanarPoint TODO description.

func (*Plane) Translate

func (p *Plane) Translate(offset float64) *Plane

Translate TODO description.

type PlaneBufferGeometry

type PlaneBufferGeometry struct {
	// contains filtered or unexported fields
}

PlaneBufferGeometry represents a planebuffergeometry.

func PlaneBufferGeometryFromJSObject

func PlaneBufferGeometryFromJSObject(p *js.Object) *PlaneBufferGeometry

PlaneBufferGeometryFromJSObject returns a wrapped PlaneBufferGeometry JavaScript class.

func (*PlaneBufferGeometry) JSObject

func (p *PlaneBufferGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type PlaneGeometry

type PlaneGeometry struct {
	// contains filtered or unexported fields
}

PlaneGeometry represent a plane.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/PlaneGeometry

func PlaneGeometryFromJSObject

func PlaneGeometryFromJSObject(p *js.Object) *PlaneGeometry

PlaneGeometryFromJSObject returns a wrapped PlaneGeometry JavaScript class.

func (*PlaneGeometry) JSObject

func (p *PlaneGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type PointLight

type PointLight struct{ *Light }

PointLight is a light that affects objects using MeshLambertMaterial or MeshPhongMaterial.

http://threejs.org/docs/index.html#Reference/Lights/PointLight

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	light := t.NewPointLight(0xff0000, 1, 100, 0)
	light.Position().Set(50, 50, 50)
	scene.Add(light)
}
Output:

func PointLightFromJSObject

func PointLightFromJSObject(p *js.Object) *PointLight

PointLightFromJSObject returns a wrapped PointLight JavaScript class.

func (*PointLight) Copy

func (p *PointLight) Copy(source *PointLight) *PointLight

Copy TODO description.

func (*PointLight) Get

func (p *PointLight) Get() *PointLight

Get TODO description.

func (*PointLight) JSObject

func (p *PointLight) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*PointLight) Set

func (p *PointLight) Set(power float64) *PointLight

Set TODO description.

type PointLightHelper

type PointLightHelper struct {
	// contains filtered or unexported fields
}

PointLightHelper represents a pointlighthelper.

func PointLightHelperFromJSObject

func PointLightHelperFromJSObject(p *js.Object) *PointLightHelper

PointLightHelperFromJSObject returns a wrapped PointLightHelper JavaScript class.

func (*PointLightHelper) JSObject

func (p *PointLightHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Points

type Points struct {
	// contains filtered or unexported fields
}

Points is a class for displaying particles in the form of variable size points.

http://threejs.org/docs/index.html#Reference/Objects/Points

func PointsFromJSObject

func PointsFromJSObject(p *js.Object) *Points

PointsFromJSObject returns a wrapped Points JavaScript class.

func (*Points) JSObject

func (p *Points) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type PointsMaterial

type PointsMaterial struct {
	// contains filtered or unexported fields
}

PointsMaterial represents a material used by particle systems.

http://threejs.org/docs/index.html#Reference/Materials/PointsMaterial

func PointsMaterialFromJSObject

func PointsMaterialFromJSObject(p *js.Object) *PointsMaterial

PointsMaterialFromJSObject returns a wrapped PointsMaterial JavaScript class.

func (*PointsMaterial) Copy

func (p *PointsMaterial) Copy(source *PointsMaterial) *PointsMaterial

Copy TODO description.

func (*PointsMaterial) JSObject

func (p *PointsMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type PolyhedronGeometry

type PolyhedronGeometry struct{ *Geometry }

PolyhedronGeometry represents a solid with flat faces.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/PolyhedronGeometry

func PolyhedronGeometryFromJSObject

func PolyhedronGeometryFromJSObject(p *js.Object) *PolyhedronGeometry

PolyhedronGeometryFromJSObject returns a wrapped PolyhedronGeometry JavaScript class.

func (*PolyhedronGeometry) JSObject

func (p *PolyhedronGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type PositionalAudio

type PositionalAudio struct {
	// contains filtered or unexported fields
}

PositionalAudio represents a positionalaudio.

func PositionalAudioFromJSObject

func PositionalAudioFromJSObject(p *js.Object) *PositionalAudio

PositionalAudioFromJSObject returns a wrapped PositionalAudio JavaScript class.

func (*PositionalAudio) JSObject

func (p *PositionalAudio) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*PositionalAudio) SetDistanceModel

func (p *PositionalAudio) SetDistanceModel(value float64) *PositionalAudio

SetDistanceModel TODO description.

func (*PositionalAudio) SetMaxDistance

func (p *PositionalAudio) SetMaxDistance(value float64) *PositionalAudio

SetMaxDistance TODO description.

func (*PositionalAudio) SetRefDistance

func (p *PositionalAudio) SetRefDistance(value float64) *PositionalAudio

SetRefDistance TODO description.

func (*PositionalAudio) SetRolloffFactor

func (p *PositionalAudio) SetRolloffFactor(value float64) *PositionalAudio

SetRolloffFactor TODO description.

type PropertyBinding

type PropertyBinding struct {
	// contains filtered or unexported fields
}

PropertyBinding represents a propertybinding.

func PropertyBindingFromJSObject

func PropertyBindingFromJSObject(p *js.Object) *PropertyBinding

PropertyBindingFromJSObject returns a wrapped PropertyBinding JavaScript class.

func (*PropertyBinding) Bind

func (p *PropertyBinding) Bind() *PropertyBinding

Bind TODO description.

func (*PropertyBinding) GetValue

func (p *PropertyBinding) GetValue(array, offset float64) *PropertyBinding

GetValue TODO description.

func (*PropertyBinding) JSObject

func (p *PropertyBinding) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*PropertyBinding) SetValue

func (p *PropertyBinding) SetValue(array, offset float64) *PropertyBinding

SetValue TODO description.

func (*PropertyBinding) Unbind

func (p *PropertyBinding) Unbind() *PropertyBinding

Unbind TODO description.

type PropertyMixer

type PropertyMixer struct {
	// contains filtered or unexported fields
}

PropertyMixer represents a propertymixer.

func PropertyMixerFromJSObject

func PropertyMixerFromJSObject(p *js.Object) *PropertyMixer

PropertyMixerFromJSObject returns a wrapped PropertyMixer JavaScript class.

func (*PropertyMixer) Accumulate

func (p *PropertyMixer) Accumulate(accuIndex, weight float64) *PropertyMixer

Accumulate TODO description.

func (*PropertyMixer) Apply

func (p *PropertyMixer) Apply(accuIndex float64) *PropertyMixer

Apply TODO description.

func (*PropertyMixer) JSObject

func (p *PropertyMixer) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*PropertyMixer) RestoreOriginalState

func (p *PropertyMixer) RestoreOriginalState() *PropertyMixer

RestoreOriginalState TODO description.

func (*PropertyMixer) SaveOriginalState

func (p *PropertyMixer) SaveOriginalState() *PropertyMixer

SaveOriginalState TODO description.

type QuadraticBezierCurve

type QuadraticBezierCurve struct {
	// contains filtered or unexported fields
}

QuadraticBezierCurve represents a quadraticbeziercurve.

func QuadraticBezierCurveFromJSObject

func QuadraticBezierCurveFromJSObject(p *js.Object) *QuadraticBezierCurve

QuadraticBezierCurveFromJSObject returns a wrapped QuadraticBezierCurve JavaScript class.

func (*QuadraticBezierCurve) GetPoint

GetPoint TODO description.

func (*QuadraticBezierCurve) GetTangent

GetTangent TODO description.

func (*QuadraticBezierCurve) JSObject

func (q *QuadraticBezierCurve) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Quaternion

type Quaternion struct {
	// contains filtered or unexported fields
}

Quaternion represents a quaternion.

func QuaternionFromJSObject

func QuaternionFromJSObject(p *js.Object) *Quaternion

QuaternionFromJSObject returns a wrapped Quaternion JavaScript class.

func (*Quaternion) Clone

func (q *Quaternion) Clone() *Quaternion

Clone returns a clone of this quaternion.

func (*Quaternion) Conjugate

func (q *Quaternion) Conjugate() *Quaternion

Conjugate TODO description.

func (*Quaternion) Copy

func (q *Quaternion) Copy(quaternion *Quaternion) *Quaternion

Copy copies the values from quaternion into q.

func (*Quaternion) Dot

func (q *Quaternion) Dot(src *Quaternion) *Quaternion

Dot TODO description.

func (*Quaternion) Equals

func (q *Quaternion) Equals(quaternion *Quaternion) bool

Equals TODO description.

func (*Quaternion) FromArray

func (q *Quaternion) FromArray(array []float64, offset int) *Quaternion

FromArray TODO description.

func (*Quaternion) Inverse

func (q *Quaternion) Inverse() *Quaternion

Inverse TODO description.

func (*Quaternion) JSObject

func (q *Quaternion) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Quaternion) Length

func (q *Quaternion) Length() *Quaternion

Length TODO description.

func (*Quaternion) LengthSq

func (q *Quaternion) LengthSq() *Quaternion

LengthSq TODO description.

func (*Quaternion) Multiply

func (q *Quaternion) Multiply(src *Quaternion) *Quaternion

Multiply TODO description.

func (*Quaternion) MultiplyQuaternions

func (q *Quaternion) MultiplyQuaternions(a, b *Quaternion) *Quaternion

MultiplyQuaternions TODO description.

func (*Quaternion) Normalize

func (q *Quaternion) Normalize() *Quaternion

Normalize TODO description.

func (*Quaternion) OnChange

func (q *Quaternion) OnChange(callback float64) *Quaternion

OnChange TODO description.

func (*Quaternion) OnChangeCallback

func (q *Quaternion) OnChangeCallback() *Quaternion

OnChangeCallback TODO description.

func (*Quaternion) Set

func (q *Quaternion) Set(x, y, z, w float64) *Quaternion

Set sets the components of the quaternion.

func (*Quaternion) SetFromAxisAngle

func (q *Quaternion) SetFromAxisAngle(axis, angle float64) *Quaternion

SetFromAxisAngle TODO description.

func (*Quaternion) SetFromEuler

func (q *Quaternion) SetFromEuler(euler, update float64) *Quaternion

SetFromEuler TODO description.

func (*Quaternion) SetFromRotationMatrix

func (q *Quaternion) SetFromRotationMatrix(m *Matrix3) *Quaternion

SetFromRotationMatrix TODO description.

func (*Quaternion) SetFromUnitVectors

func (q *Quaternion) SetFromUnitVectors() *Quaternion

SetFromUnitVectors TODO description.

func (*Quaternion) SetW

func (q *Quaternion) SetW(value float64) *Quaternion

SetW sets the w-component of the Quaternion.

func (*Quaternion) SetX

func (q *Quaternion) SetX(value float64) *Quaternion

SetX sets the x-component of the Quaternion.

func (*Quaternion) SetY

func (q *Quaternion) SetY(value float64) *Quaternion

SetY sets the y-component of the Quaternion.

func (*Quaternion) SetZ

func (q *Quaternion) SetZ(value float64) *Quaternion

SetZ sets the z-component of the Quaternion.

func (*Quaternion) Slerp

func (q *Quaternion) Slerp(qb *Quaternion, t float64) *Quaternion

Slerp TODO description.

func (*Quaternion) SlerpFlat

func (q *Quaternion) SlerpFlat(dsq *Quaternion, dstOffset int, src0 *Quaternion, srcOffset0 int, src1 *Quaternion, srcOffset1 int, t float64) *Quaternion

SlerpFlat TODO description.

func (*Quaternion) ToArray

func (q *Quaternion) ToArray(array []float64, offset int) *Quaternion

ToArray TODO description.

func (*Quaternion) W

func (q *Quaternion) W() float64

W returns the w-component of the Quaternion.

func (*Quaternion) X

func (q *Quaternion) X() float64

X returns the x-component of the Quaternion.

func (*Quaternion) Y

func (q *Quaternion) Y() float64

Y returns the y-component of the Quaternion.

func (*Quaternion) Z

func (q *Quaternion) Z() float64

Z returns the z-component of the Quaternion.

type QuaternionKeyframeTrack

type QuaternionKeyframeTrack struct {
	// contains filtered or unexported fields
}

QuaternionKeyframeTrack represents a quaternionkeyframetrack.

func QuaternionKeyframeTrackFromJSObject

func QuaternionKeyframeTrackFromJSObject(p *js.Object) *QuaternionKeyframeTrack

QuaternionKeyframeTrackFromJSObject returns a wrapped QuaternionKeyframeTrack JavaScript class.

func (*QuaternionKeyframeTrack) InterpolantFactoryMethodLinear

func (q *QuaternionKeyframeTrack) InterpolantFactoryMethodLinear(result float64) *QuaternionKeyframeTrack

InterpolantFactoryMethodLinear TODO description.

func (*QuaternionKeyframeTrack) JSObject

func (q *QuaternionKeyframeTrack) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type QuaternionLinearInterpolant

type QuaternionLinearInterpolant struct {
	// contains filtered or unexported fields
}

QuaternionLinearInterpolant represents a quaternionlinearinterpolant.

func QuaternionLinearInterpolantFromJSObject

func QuaternionLinearInterpolantFromJSObject(p *js.Object) *QuaternionLinearInterpolant

QuaternionLinearInterpolantFromJSObject returns a wrapped QuaternionLinearInterpolant JavaScript class.

func (*QuaternionLinearInterpolant) Interpolate

func (q *QuaternionLinearInterpolant) Interpolate(i1, t0, t, t1 float64) *QuaternionLinearInterpolant

Interpolate TODO description.

func (*QuaternionLinearInterpolant) JSObject

func (q *QuaternionLinearInterpolant) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type RawShaderMaterial

type RawShaderMaterial struct {
	// contains filtered or unexported fields
}

RawShaderMaterial works just like ShaderMaterial, except that definitions of built-in uniforms and attributes are not automatically prepended to the GLSL shader code.

http://threejs.org/docs/index.html#Reference/Materials/RawShaderMaterial

func RawShaderMaterialFromJSObject

func RawShaderMaterialFromJSObject(p *js.Object) *RawShaderMaterial

RawShaderMaterialFromJSObject returns a wrapped RawShaderMaterial JavaScript class.

func (*RawShaderMaterial) JSObject

func (r *RawShaderMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Ray

type Ray struct {
	// contains filtered or unexported fields
}

Ray is a ray that emits from an origin in a certain direction.

http://threejs.org/docs/index.html#Reference/Math/Ray

func RayFromJSObject

func RayFromJSObject(p *js.Object) *Ray

RayFromJSObject returns a wrapped Ray JavaScript class.

func (*Ray) ApplyMatrix4

func (r *Ray) ApplyMatrix4(matrix4 float64) *Ray

ApplyMatrix4 transforms this Ray by the Matrix4.

matrix4 -- Matrix4 The Matrix4 to transform this Ray by.

func (*Ray) At

func (r *Ray) At(t, optionalTarget float64) *Ray

At gets a Vector3 that is a given distance along this Ray.

t -- Float The distance along the Ray to retrieve a position for.
optionalTarget -- Vector3 Receives the position along the Ray if passed; otherwise a new Vector3 is created.

func (*Ray) Clone

func (r *Ray) Clone() *Ray

Clone creates a clone of this Ray.

func (*Ray) ClosestPointToPoint

func (r *Ray) ClosestPointToPoint(point, optionalTarget float64) *Ray

ClosestPointToPoint gets the point along this Ray that is closest to the Vector3 provided.

point -- Vector3 The point to get the closest approach to.
optionalTarget -- Vector3 Receives the return value if passed; otherwise a new Vector3 is created.

func (*Ray) Copy

func (r *Ray) Copy(ray *Ray) *Ray

Copy copies the properties of the provided Ray, then returns this Ray.

ray -- Ray The Ray to copy values from.

func (*Ray) DistanceSqToPoint

func (r *Ray) DistanceSqToPoint() *Ray

DistanceSqToPoint gets the squared distance of the closest approach between the Ray and the Vector3.

point -- Vector3 The Vector3 to compute a distance to.

func (*Ray) DistanceSqToSegment

func (r *Ray) DistanceSqToSegment() *Ray

DistanceSqToSegment gets the squared distance between this Ray and a line segment.

v0 -- Vector3 The start of the line segment.
v1 -- Vector3 The end of the line segment.
optionalPointOnRay -- Vector3 If this is provided, it receives the point on this Ray that is
closest to the segment.
optionalPointOnSegment -- Vector3 If this is provided, it receives the point on the line segment that is
closest to this Ray.

func (*Ray) DistanceToPlane

func (r *Ray) DistanceToPlane(plane float64) *Ray

DistanceToPlane gets the distance from the origin to the Plane, or null if the Ray doesn't intersect the Plane.

plane -- Plane The Plane to get the distance to.

func (*Ray) DistanceToPoint

func (r *Ray) DistanceToPoint(point float64) *Ray

DistanceToPoint gets the distance of the closest approach between the Ray and the Vector3.

point -- Vector3 The Vector3 to compute a distance to.

func (*Ray) Equals

func (r *Ray) Equals(ray float64) *Ray

Equals returns whether this and the other Ray have equal offsets and directions.

ray -- Ray The Ray to compare to.

func (*Ray) IntersectBox

func (r *Ray) IntersectBox(box, optionalTarget float64) *Ray

IntersectBox intersects this Ray with a Box3, returning the intersection point or null if there is no intersection.

box -- Box3 The Box3 to intersect with.
optionalTarget -- Vector3 The Vector3 to store the result in, or null to create a new Vector3.

func (*Ray) IntersectPlane

func (r *Ray) IntersectPlane(plane, optionalTarget float64) *Ray

IntersectPlane intersects this Ray with a Plane, returning the intersection point or null if there is no intersection.

plane -- Plane The Plane to intersect with.
optionalTarget -- Vector3 The Vector3 to store the result in, or null to create a new Vector3.

func (*Ray) IntersectSphere

func (r *Ray) IntersectSphere() *Ray

IntersectSphere TODO description.

func (*Ray) IntersectTriangle

func (r *Ray) IntersectTriangle() *Ray

IntersectTriangle intersects this Ray with a triangle, returning the intersection point or null if there is no intersection.

a, b, c -- Vector3 The Vector3 points on the triangle.
backfaceCulling -- Boolean Whether to use backface culling.
optionalTarget -- Vector3 The Vector3 to store the result in, or null to create a new Vector3.

func (*Ray) IntersectsPlane

func (r *Ray) IntersectsPlane(plane float64) *Ray

IntersectsPlane returns whether or not this Ray intersects with the Plane.

plane -- Plane The Plane to intersect with.

func (*Ray) IntersectsSphere

func (r *Ray) IntersectsSphere(sphere float64) *Ray

IntersectsSphere returns whether or not this Ray intersects with the Sphere.

sphere -- Sphere The Sphere to intersect with.

func (*Ray) JSObject

func (r *Ray) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Ray) LookAt

func (r *Ray) LookAt(v float64) *Ray

LookAt adjusts the direction of the ray to point at the vector in world coordinates.

v -- Vector3 The vector to look at.

func (*Ray) Recast

func (r *Ray) Recast() *Ray

Recast shifts the origin of this Ray along its direction by the distance given.

v -- Vector3 The vector to look at.

func (*Ray) Set

func (r *Ray) Set(origin, direction float64) *Ray

Set copies the parameters to the origin and direction properties.

origin -- Vector3 The origin of the Ray.
direction -- Vector3 The direction of the Ray. This must be normalized (with Vector3.normalize) for the
methods to operate properly.

type Raycaster

type Raycaster struct {
	// contains filtered or unexported fields
}

Raycaster is the JavaScript class that makes raycasting easier. Raycasting is used for picking and more.

http://threejs.org/docs/index.html#Reference/Core/Raycaster

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	/* t := */ three.New()

	/* TODO
	raycaster := t.NewRaycaster()
	mouse := t.NewVector2()

	   function onMouseMove( event ) {

	   	// calculate mouse position in normalized device coordinates
	   	// (-1 to +1) for both components

	   	mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
	   	mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;

	   }

	   function render() {

	   	// update the picking ray with the camera and mouse position
	   	raycaster.setFromCamera( mouse, camera );

	   	// calculate objects intersecting the picking ray
	   	var intersects = raycaster.intersectObjects( scene.children );

	   	for ( var i = 0; i < intersects.length; i++ ) {

	   		intersects[ i ].object.material.color.set( 0xff0000 );

	   	}

	   	renderer.render( scene, camera );

	   }

	   window.addEventListener( 'mousemove', onMouseMove, false );

	   window.requestAnimationFrame(render);
	*/
}
Output:

func RaycasterFromJSObject

func RaycasterFromJSObject(p *js.Object) *Raycaster

RaycasterFromJSObject returns a wrapped Raycaster JavaScript class.

func (*Raycaster) Get

func (r *Raycaster) Get() *Raycaster

Get TODO description.

func (*Raycaster) IntersectObject

func (r *Raycaster) IntersectObject(object, recursive float64) *Raycaster

IntersectObject TODO description.

func (*Raycaster) IntersectObjects

func (r *Raycaster) IntersectObjects(objects, recursive float64) *Raycaster

IntersectObjects TODO description.

func (*Raycaster) JSObject

func (r *Raycaster) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Raycaster) Set

func (r *Raycaster) Set(origin, direction float64) *Raycaster

Set TODO description.

func (*Raycaster) SetFromCamera

func (r *Raycaster) SetFromCamera(coords, camera float64) *Raycaster

SetFromCamera TODO description.

type RenderOpts

type RenderOpts struct {
	// contains filtered or unexported fields
}

RenderOpts represents the optional arguments that can be passed to Render.

type RingBufferGeometry

type RingBufferGeometry struct {
	// contains filtered or unexported fields
}

RingBufferGeometry is the BufferGeometry port of RingGeometry.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/RingBufferGeometry

func RingBufferGeometryFromJSObject

func RingBufferGeometryFromJSObject(p *js.Object) *RingBufferGeometry

RingBufferGeometryFromJSObject returns a wrapped RingBufferGeometry JavaScript class.

func (*RingBufferGeometry) JSObject

func (r *RingBufferGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type RingGeometry

type RingGeometry struct {
	// contains filtered or unexported fields
}

RingGeometry represents two-dimensional ring geometry.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/RingGeometry

func RingGeometryFromJSObject

func RingGeometryFromJSObject(p *js.Object) *RingGeometry

RingGeometryFromJSObject returns a wrapped RingGeometry JavaScript class.

func (*RingGeometry) JSObject

func (r *RingGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Scene

type Scene struct{ *Object3D }

Scene represents a three.js scene. Scenes allow you to set up what and where is to be rendered by three.js. This is where you place objects, lights and cameras.

func SceneFromJSObject

func SceneFromJSObject(p *js.Object) *Scene

SceneFromJSObject returns a wrapped Scene JavaScript class.

func (*Scene) Copy

func (s *Scene) Copy(source *Scene, recursive bool) *Scene

Copy TODO description.

func (*Scene) JSObject

func (s *Scene) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type SceneUtils

type SceneUtils struct {
	// contains filtered or unexported fields
}

SceneUtils contains useful utility functions for scene manipulation.

http://threejs.org/docs/index.html#Reference/Extras/SceneUtils

func SceneUtilsFromJSObject

func SceneUtilsFromJSObject(p *js.Object) *SceneUtils

SceneUtilsFromJSObject returns a wrapped SceneUtils JavaScript class.

func (*SceneUtils) Attach

func (s *SceneUtils) Attach(child, scene, parent float64) *SceneUtils

Attach attaches the object to the parent without the moving the object in the worldspace. Beware that to do this the matrixWorld needs to be updated, this can be done by calling the updateMatrixWorld method on the parent object.

child -- The object to add to the parent
scene -- The scene to detach the object on.
parent -- The parent to attach the object from.

func (*SceneUtils) CreateMultiMaterialObject

func (s *SceneUtils) CreateMultiMaterialObject(geometry JSObject, materials []JSObject) *Group

CreateMultiMaterialObject creates an new Object3D an new mesh for each material defined in materials. Beware that this is not the same as MultiMaterial which defines multiple material for 1 mesh. This is mostly useful for object that need a material and a wireframe implementation.

geometry -- The geometry for the Object.
materials -- The materials for the object.

func (*SceneUtils) Detach

func (s *SceneUtils) Detach(child, parent, scene float64) *SceneUtils

Detach detaches the object from the parent and adds it back to the scene without moving in worldspace. Beware that to do this the matrixWorld needs to be updated, this can be done by calling the updateMatrixWorld method on the parent object.

child -- The object to remove from the parent
scene -- The scene to attach the object on.
parent -- The parent to detach the object from.

func (*SceneUtils) JSObject

func (s *SceneUtils) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type ShaderChunk

type ShaderChunk struct {
	// contains filtered or unexported fields
}

ShaderChunk represents a shaderchunk.

http://threejs.org/docs/index.html#Reference/Renderers.Shaders/ShaderChunk

func ShaderChunkFromJSObject

func ShaderChunkFromJSObject(p *js.Object) *ShaderChunk

ShaderChunkFromJSObject returns a wrapped ShaderChunk JavaScript class.

func (*ShaderChunk) JSObject

func (s *ShaderChunk) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type ShaderLib

type ShaderLib struct {
	// contains filtered or unexported fields
}

ShaderLib represents a shaderlib.

http://threejs.org/docs/index.html#Reference/Renderers.Shaders/ShaderLib

func ShaderLibFromJSObject

func ShaderLibFromJSObject(p *js.Object) *ShaderLib

ShaderLibFromJSObject returns a wrapped ShaderLib JavaScript class.

func (*ShaderLib) JSObject

func (s *ShaderLib) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type ShaderMaterial

type ShaderMaterial struct {
	// contains filtered or unexported fields
}

ShaderMaterial is material rendered with custom shaders.

http://threejs.org/docs/index.html#Reference/Materials/ShaderMaterial

func ShaderMaterialFromJSObject

func ShaderMaterialFromJSObject(p *js.Object) *ShaderMaterial

ShaderMaterialFromJSObject returns a wrapped ShaderMaterial JavaScript class.

func (*ShaderMaterial) Copy

func (s *ShaderMaterial) Copy(source *ShaderMaterial) *ShaderMaterial

Copy TODO description.

func (*ShaderMaterial) JSObject

func (s *ShaderMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*ShaderMaterial) ToJSON

func (s *ShaderMaterial) ToJSON(meta float64) *ShaderMaterial

ToJSON TODO description.

type Shape

type Shape struct {
	// contains filtered or unexported fields
}

Shape defines an arbitrary 2d shape plane using paths with optional holes. It can be used with ExtrudeGeometry, ShapeGeometry, to get points, or to get triangulated faces.

func ShapeFromJSObject

func ShapeFromJSObject(p *js.Object) *Shape

ShapeFromJSObject returns a wrapped Shape JavaScript class.

func (*Shape) ExtractAllPoints

func (s *Shape) ExtractAllPoints(divisions float64) *Shape

ExtractAllPoints get points of shape and holes (keypoints based on segments parameter).

divisions -- The number of divisions to create on the shape

func (*Shape) ExtractPoints

func (s *Shape) ExtractPoints(divisions float64) *Shape

ExtractPoints returns an object with a shape and holes property that each reference an array of Vector2s.

divisions -- The number of divisions to create on the shape

func (*Shape) Extrude

func (s *Shape) Extrude(options float64) *Shape

Extrude convenience method to return ExtrudeGeometry

options -- This is passed as the second argument to ExtrudeGeometry

func (*Shape) GetPointsHoles

func (s *Shape) GetPointsHoles(divisions float64) *Shape

GetPointsHoles gets an array of [page Vector2 Vector2s] that represent the holes in the shape.

divisions -- The number of divisions to create on the shape

func (*Shape) JSObject

func (s *Shape) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Shape) MakeGeometry

func (s *Shape) MakeGeometry(options float64) *Shape

MakeGeometry convenience method to return ShapeGeometry

options -- This is passed as the second argument to ShapeGeometry

type ShapeGeometry

type ShapeGeometry struct {
	// contains filtered or unexported fields
}

ShapeGeometry creates a one-sided polygonal geometry from one or more path shapes. Similar to ExtrudeGeometry.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/ShapeGeometry

func ShapeGeometryFromJSObject

func ShapeGeometryFromJSObject(p *js.Object) *ShapeGeometry

ShapeGeometryFromJSObject returns a wrapped ShapeGeometry JavaScript class.

func (*ShapeGeometry) AddShape

func (s *ShapeGeometry) AddShape(shape, options float64) *ShapeGeometry

AddShape adds a single shape to the geometry

shape — Shape
options — See options in constructor

func (*ShapeGeometry) AddShapeList

func (s *ShapeGeometry) AddShapeList(shapes, options float64) *ShapeGeometry

AddShapeList adds a list of shapes to the geometry.

shapes — Array of shapes
options — See options in constructor

func (*ShapeGeometry) JSObject

func (s *ShapeGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type ShapeUtils

type ShapeUtils struct {
	// contains filtered or unexported fields
}

ShapeUtils represents a shapeutils.

func ShapeUtilsFromJSObject

func ShapeUtilsFromJSObject(p *js.Object) *ShapeUtils

ShapeUtilsFromJSObject returns a wrapped ShapeUtils JavaScript class.

func (*ShapeUtils) Area

func (s *ShapeUtils) Area(contour float64) *ShapeUtils

Area TODO description.

func (*ShapeUtils) IsClockWise

func (s *ShapeUtils) IsClockWise(pts float64) *ShapeUtils

IsClockWise TODO description.

func (*ShapeUtils) JSObject

func (s *ShapeUtils) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*ShapeUtils) TriangulateShape

func (s *ShapeUtils) TriangulateShape(contour, holes float64) *ShapeUtils

TriangulateShape TODO description.

type Skeleton

type Skeleton struct {
	// contains filtered or unexported fields
}

Skeleton uses an array of bones to create a skeleton that can be used by a SkinnedMesh.

http://threejs.org/docs/index.html#Reference/Objects/Skeleton

func SkeletonFromJSObject

func SkeletonFromJSObject(p *js.Object) *Skeleton

SkeletonFromJSObject returns a wrapped Skeleton JavaScript class.

func (*Skeleton) JSObject

func (s *Skeleton) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type SkeletonHelper

type SkeletonHelper struct {
	// contains filtered or unexported fields
}

SkeletonHelper represents a skeletonhelper.

func SkeletonHelperFromJSObject

func SkeletonHelperFromJSObject(p *js.Object) *SkeletonHelper

SkeletonHelperFromJSObject returns a wrapped SkeletonHelper JavaScript class.

func (*SkeletonHelper) GetBoneList

func (s *SkeletonHelper) GetBoneList(object float64) *SkeletonHelper

GetBoneList TODO description.

func (*SkeletonHelper) JSObject

func (s *SkeletonHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type SkinnedMesh

type SkinnedMesh struct{ *Mesh }

SkinnedMesh represents a mesh that has a Skeleton with bones that can then be used to animate the vertices of the geometry.

http://threejs.org/docs/index.html#Reference/Objects/SkinnedMesh

func SkinnedMeshFromJSObject

func SkinnedMeshFromJSObject(p *js.Object) *SkinnedMesh

SkinnedMeshFromJSObject returns a wrapped SkinnedMesh JavaScript class.

func (*SkinnedMesh) Bind

func (s *SkinnedMesh) Bind(skeleton, bindMatrix float64) *SkinnedMesh

Bind TODO description.

func (*SkinnedMesh) JSObject

func (s *SkinnedMesh) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*SkinnedMesh) UpdateMatrixWorld

func (s *SkinnedMesh) UpdateMatrixWorld(force float64) *SkinnedMesh

UpdateMatrixWorld TODO description.

type Sphere

type Sphere struct {
	// contains filtered or unexported fields
}

Sphere represents a geometric sphere defined by a center position and radius.

http://threejs.org/docs/index.html#Reference/Math/Sphere

func SphereFromJSObject

func SphereFromJSObject(p *js.Object) *Sphere

SphereFromJSObject returns a wrapped Sphere JavaScript class.

func (*Sphere) ApplyMatrix4

func (s *Sphere) ApplyMatrix4(matrix float64) *Sphere

ApplyMatrix4 transforms this sphere with the provided Matrix4.

matrix -- Matrix4

func (*Sphere) ClampPoint

func (s *Sphere) ClampPoint(point, optionalTarget float64) *Sphere

ClampPoint clamps a point within the sphere. If the point is is outside the sphere, it will clamp it to the closets point on the edge of the sphere.

point -- Vector3 The point to clamp
optionalTarget -- Vector3 The optional target point to return

func (*Sphere) Clone

func (s *Sphere) Clone() *Sphere

Clone provides a new copy of the sphere.

func (*Sphere) ContainsPoint

func (s *Sphere) ContainsPoint(point float64) *Sphere

ContainsPoint checks to see if the sphere contains the provided point inclusive of the edge of the sphere.

point -- Vector3

func (*Sphere) Copy

func (s *Sphere) Copy(sphere *Sphere) *Sphere

Copy copies the values of the passed sphere to this sphere.

sphere -- Sphere to copy

func (*Sphere) DistanceToPoint

func (s *Sphere) DistanceToPoint(point float64) *Sphere

DistanceToPoint Returns the closest distance from the boundary of the sphere to the point. If the sphere contains the point, the distance will be negative.

point -- Vector3

func (*Sphere) Empty

func (s *Sphere) Empty() *Sphere

Empty checks to see if the sphere is empty (the radius set to 0).

func (*Sphere) Equals

func (s *Sphere) Equals(sphere float64) *Sphere

Equals checks to see if the two spheres' centers and radii are equal.

sphere -- Sphere

func (*Sphere) GetBoundingBox

func (s *Sphere) GetBoundingBox(optionalTarget float64) *Sphere

GetBoundingBox Returns a bounding box for the sphere, optionally setting a provided box target.

optionalTarget -- Box

func (*Sphere) IntersectsBox

func (s *Sphere) IntersectsBox(box float64) *Sphere

IntersectsBox TODO description.

func (*Sphere) IntersectsPlane

func (s *Sphere) IntersectsPlane(plane float64) *Sphere

IntersectsPlane TODO description.

func (*Sphere) IntersectsSphere

func (s *Sphere) IntersectsSphere(sphere float64) *Sphere

IntersectsSphere checks to see if two spheres intersect.

sphere -- Sphere

func (*Sphere) JSObject

func (s *Sphere) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Sphere) Set

func (s *Sphere) Set(center, radius float64) *Sphere

Set sets the center and radius.

center -- Vector3
radius -- Float

func (*Sphere) SetFromPoints

func (s *Sphere) SetFromPoints() *Sphere

SetFromPoints computes the minimum bounding sphere for points. If optionalCenter is given, it is used as the sphere's center. Otherwise, the center of the axis-aligned bounding box encompassing points is calculated.

points -- Array of Vector3 positions.
optionalCenter -- Optional Vector3 position for the sphere's center.

func (*Sphere) Translate

func (s *Sphere) Translate(offset float64) *Sphere

Translate translates the sphere's center by the provided offset vector.

offset -- Vector3

type SphereBufferGeometry

type SphereBufferGeometry struct {
	// contains filtered or unexported fields
}

SphereBufferGeometry is the BufferGeometry port of SphereGeometry.

func SphereBufferGeometryFromJSObject

func SphereBufferGeometryFromJSObject(p *js.Object) *SphereBufferGeometry

SphereBufferGeometryFromJSObject returns a wrapped SphereBufferGeometry JavaScript class.

func (*SphereBufferGeometry) JSObject

func (s *SphereBufferGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type SphereGeometry

type SphereGeometry struct {
	// contains filtered or unexported fields
}

SphereGeometry represents a sphere.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/SphereGeometry

func SphereGeometryFromJSObject

func SphereGeometryFromJSObject(p *js.Object) *SphereGeometry

SphereGeometryFromJSObject returns a wrapped SphereGeometry JavaScript class.

func (*SphereGeometry) JSObject

func (s *SphereGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type SphereGeometryOpts

type SphereGeometryOpts struct {
	// contains filtered or unexported fields
}

SphereGeometryOpts represents options for constructing a SphereGeometry.

phiStart — specify horizontal starting angle. Default is 0.
phiLength — specify horizontal sweep angle size. Default is Math.PI * 2.
thetaStart — specify vertical starting angle. Default is 0.
thetaLength — specify vertical sweep angle size. Default is Math.PI.

type Spherical

type Spherical struct {
	// contains filtered or unexported fields
}

Spherical represents a spherical.

func SphericalFromJSObject

func SphericalFromJSObject(p *js.Object) *Spherical

SphericalFromJSObject returns a wrapped Spherical JavaScript class.

func (*Spherical) Clone

func (s *Spherical) Clone() *Spherical

Clone TODO description.

func (*Spherical) Copy

func (s *Spherical) Copy(other *Spherical) *Spherical

Copy TODO description.

func (*Spherical) JSObject

func (s *Spherical) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Spherical) MakeSafe

func (s *Spherical) MakeSafe() *Spherical

MakeSafe TODO description.

func (*Spherical) Set

func (s *Spherical) Set(radius, phi, theta float64) *Spherical

Set TODO description.

func (*Spherical) SetFromVector3

func (s *Spherical) SetFromVector3(vec3 float64) *Spherical

SetFromVector3 TODO description.

type Spline

type Spline struct {
	// contains filtered or unexported fields
}

Spline represents a spline.

http://threejs.org/docs/index.html#Reference/Math/Spline

func SplineFromJSObject

func SplineFromJSObject(p *js.Object) *Spline

SplineFromJSObject returns a wrapped Spline JavaScript class.

func (*Spline) JSObject

func (s *Spline) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type SplineCurve

type SplineCurve struct {
	// contains filtered or unexported fields
}

SplineCurve creates a smooth 2d spline curve from a series of points.

http://threejs.org/docs/index.html#Reference/Extras.Curves/SplineCurve

func SplineCurveFromJSObject

func SplineCurveFromJSObject(p *js.Object) *SplineCurve

SplineCurveFromJSObject returns a wrapped SplineCurve JavaScript class.

func (*SplineCurve) GetPoint

func (s *SplineCurve) GetPoint(t float64) *SplineCurve

GetPoint TODO description.

func (*SplineCurve) JSObject

func (s *SplineCurve) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type SpotLight

type SpotLight struct{ *Light }

SpotLight is a point light that can cast a shadow in one direction within a falloff cone. It affects objects using MeshLambertMaterial or MeshPhongMaterial.

http://threejs.org/docs/index.html#Reference/Lights/SpotLight

Example
package main

import (
	"github.com/gmlewis/go-threejs/v2/three"
)

func main() {
	t := three.New()
	scene := t.NewScene()

	// white spotlight shining from the side, casting shadow

	light := t.NewSpotLight(0xffffff, 0, 0, 0, 0, 0)
	light.Position().Set(100, 1000, 100)

	light.SetCastShadow(true)

	light.Shadow().MapSize().
		SetWidth(1024).
		SetHeight(1024)

	light.Shadow().Camera().
		SetNear(500).
		SetFar(4000).
		SetFOV(30)

	scene.Add(light)
}
Output:

func SpotLightFromJSObject

func SpotLightFromJSObject(p *js.Object) *SpotLight

SpotLightFromJSObject returns a wrapped SpotLight JavaScript class.

func (*SpotLight) Copy

func (s *SpotLight) Copy(source *SpotLight) *SpotLight

Copy TODO description.

func (*SpotLight) Get

func (s *SpotLight) Get() *SpotLight

Get TODO description.

func (*SpotLight) JSObject

func (s *SpotLight) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*SpotLight) Set

func (s *SpotLight) Set(power float64) *SpotLight

Set TODO description.

type SpotLightHelper

type SpotLightHelper struct {
	// contains filtered or unexported fields
}

SpotLightHelper represents a spotlighthelper.

func SpotLightHelperFromJSObject

func SpotLightHelperFromJSObject(p *js.Object) *SpotLightHelper

SpotLightHelperFromJSObject returns a wrapped SpotLightHelper JavaScript class.

func (*SpotLightHelper) JSObject

func (s *SpotLightHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Sprite

type Sprite struct {
	// contains filtered or unexported fields
}

Sprite represents a plane in an 3d scene which faces always towards the camera.

http://threejs.org/docs/index.html#Reference/Objects/Sprite

func SpriteFromJSObject

func SpriteFromJSObject(p *js.Object) *Sprite

SpriteFromJSObject returns a wrapped Sprite JavaScript class.

func (*Sprite) JSObject

func (s *Sprite) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type SpriteMaterial

type SpriteMaterial struct {
	// contains filtered or unexported fields
}

SpriteMaterial represents a material for a sprite.

http://threejs.org/docs/index.html#Reference/Materials/SpriteMaterial

func SpriteMaterialFromJSObject

func SpriteMaterialFromJSObject(p *js.Object) *SpriteMaterial

SpriteMaterialFromJSObject returns a wrapped SpriteMaterial JavaScript class.

func (*SpriteMaterial) Copy

func (s *SpriteMaterial) Copy(source *SpriteMaterial) *SpriteMaterial

Copy TODO description.

func (*SpriteMaterial) JSObject

func (s *SpriteMaterial) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type SpritePlugin

type SpritePlugin struct {
	// contains filtered or unexported fields
}

SpritePlugin allows Sprites to be rendered in the WebglRenderer. This plugin is automatically loaded in the Webglrenderer.

http://threejs.org/docs/index.html#Reference/Renderers.WebGL.Plugins/SpritePlugin

func SpritePluginFromJSObject

func SpritePluginFromJSObject(p *js.Object) *SpritePlugin

SpritePluginFromJSObject returns a wrapped SpritePlugin JavaScript class.

func (*SpritePlugin) JSObject

func (s *SpritePlugin) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type StereoCamera

type StereoCamera struct {
	// contains filtered or unexported fields
}

StereoCamera is a stereo projection camera with left and right eyes.

func StereoCameraFromJSObject

func StereoCameraFromJSObject(p *js.Object) *StereoCamera

StereoCameraFromJSObject returns a wrapped StereoCamera JavaScript class.

func (*StereoCamera) Aspect

func (s *StereoCamera) Aspect() float64

Aspect returns the property of the same name.

func (*StereoCamera) CameraL

func (s *StereoCamera) CameraL() *PerspectiveCamera

CameraL returns the property of the same name.

func (*StereoCamera) CameraR

func (s *StereoCamera) CameraR() *PerspectiveCamera

CameraR returns the property of the same name.

func (*StereoCamera) JSObject

func (s *StereoCamera) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*StereoCamera) Type

func (s *StereoCamera) Type() string

Type returns the property of the same name.

type StringKeyframeTrack

type StringKeyframeTrack struct {
	// contains filtered or unexported fields
}

StringKeyframeTrack represents a stringkeyframetrack.

func StringKeyframeTrackFromJSObject

func StringKeyframeTrackFromJSObject(p *js.Object) *StringKeyframeTrack

StringKeyframeTrackFromJSObject returns a wrapped StringKeyframeTrack JavaScript class.

func (*StringKeyframeTrack) JSObject

func (s *StringKeyframeTrack) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type TetrahedronGeometry

type TetrahedronGeometry struct {
	// contains filtered or unexported fields
}

TetrahedronGeometry represents a tetrahedron.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/TetrahedronGeometry

func TetrahedronGeometryFromJSObject

func TetrahedronGeometryFromJSObject(p *js.Object) *TetrahedronGeometry

TetrahedronGeometryFromJSObject returns a wrapped TetrahedronGeometry JavaScript class.

func (*TetrahedronGeometry) JSObject

func (t *TetrahedronGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type TextGeometry

type TextGeometry struct {
	// contains filtered or unexported fields
}

TextGeometry represents a 3D object of text as a single object.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/TextGeometry

func TextGeometryFromJSObject

func TextGeometryFromJSObject(p *js.Object) *TextGeometry

TextGeometryFromJSObject returns a wrapped TextGeometry JavaScript class.

func (*TextGeometry) JSObject

func (t *TextGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Texture

type Texture struct {
	// contains filtered or unexported fields
}

Texture creates a texture to apply to a surface or as a reflection or refraction map.

http://threejs.org/docs/index.html#Reference/Textures/Texture

func TextureFromJSObject

func TextureFromJSObject(p *js.Object) *Texture

TextureFromJSObject returns a wrapped Texture JavaScript class.

func (*Texture) Clone

func (t *Texture) Clone() *Texture

Clone makes a copy of texture. Note this is not a "deep copy", the image is shared.

func (*Texture) Copy

func (t *Texture) Copy(source *Texture) *Texture

Copy TODO description.

func (*Texture) Dispose

func (t *Texture) Dispose() *Texture

Dispose calls EventDispatcher.dispatchEvent with a 'dispose' event type.

func (*Texture) JSObject

func (t *Texture) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Texture) SetAnisotropy

func (t *Texture) SetAnisotropy(value int) *Texture

SetAnisotropy sets the anisotropy-component of the Texture.

func (*Texture) SetNeedsUpdate

func (t *Texture) SetNeedsUpdate(value bool) *Texture

SetNeedsUpdate sets the needsUpdate-component of the Texture.

func (*Texture) SetWrapS

func (t *Texture) SetWrapS(value int) *Texture

SetWrapS sets the wrapS-component of the Texture.

func (*Texture) SetWrapT

func (t *Texture) SetWrapT(value int) *Texture

SetWrapT sets the wrapT-component of the Texture.

func (*Texture) ToJSON

func (t *Texture) ToJSON(meta float64) *Texture

ToJSON TODO description.

func (*Texture) TransformUv

func (t *Texture) TransformUv(uv float64) *Texture

TransformUv TODO description.

type TextureLoadFunc

type TextureLoadFunc func(geometry *Geometry, materials []*Material)

TextureLoadFunc is a callback function called by Load.

type TextureLoader

type TextureLoader struct {
	// contains filtered or unexported fields
}

TextureLoader is a class for loading a texture.

func TextureLoaderFromJSObject

func TextureLoaderFromJSObject(p *js.Object) *TextureLoader

TextureLoaderFromJSObject returns a wrapped TextureLoader JavaScript class.

func (*TextureLoader) JSObject

func (t *TextureLoader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*TextureLoader) Load

func (t *TextureLoader) Load(url string, onLoad TextureLoadFunc, onProgress, onError interface{}) *Texture

Load begins loading from url and passes the loaded texture to onLoad.

url — required
onLoad — Will be called when load completes. The argument will be the loaded texture.
onProgress — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .total and .loaded bytes.
onError — Will be called when load errors.

func (*TextureLoader) SetCrossOrigin

func (t *TextureLoader) SetCrossOrigin(value string) *TextureLoader

SetCrossOrigin TODO description.

func (*TextureLoader) SetPath

func (t *TextureLoader) SetPath(value float64) *TextureLoader

SetPath TODO description.

type TextureOpts

type TextureOpts struct {
	// contains filtered or unexported fields
}

TextureOpts representions optional arguments for creating a Texture.

mapping - 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, and a single
    texture is expected. The other types are
    THREE.CubeReflectionMapping, for cube maps used as a
    reflection map; THREE.CubeRefractionMapping, refraction
    mapping; and THREE.SphericalReflectionMapping, a spherical
    reflection map projection.

wrapS - The default is THREE.ClampToEdgeWrapping, where the
    edge is clamped to the outer edge texels. The other two
    choices are THREE.RepeatWrapping and
    THREE.MirroredRepeatWrapping.

wrapT - The default is THREE.ClampToEdgeWrapping, where the
    edge is clamped to the outer edge texels. The other two
    choices are THREE.RepeatWrapping and
    THREE.MirroredRepeatWrapping. NOTE: tiling of images in
    textures only functions if image dimensions are powers of
    two (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...)
    in terms of pixels. Individual dimensions need not be
    equal, but each must be a power of two. This is a
    limitation of WebGL, not Three.js.

magFilter - 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. The other option is
    THREE.NearestFilter, which uses the value of the closest
    texel.

minFilter - 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. Other choices are THREE.NearestFilter,
    THREE.NearestMipMapNearestFilter,
    THREE.NearestMipMapLinearFilter, THREE.LinearFilter, and
    THREE.LinearMipMapNearestFilter. These vary whether the
    nearest texel or nearest four texels are retrieved on the
    nearest mipmap or nearest two mipmaps. Interpolation
    occurs among the samples retrieved.

format - The default is THREE.RGBAFormat for the
    texture. Other formats are: THREE.AlphaFormat,
    THREE.RGBFormat, THREE.LuminanceFormat, and
    THREE.LuminanceAlphaFormat. There are also compressed
    texture formats, if the S3TC extension is supported:
    THREE.RGB_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT1_Format,
    THREE.RGBA_S3TC_DXT3_Format, and
    THREE.RGBA_S3TC_DXT5_Format.

type - The default is THREE.UnsignedByteType. Other valid
    types (as WebGL allows) are THREE.ByteType,
    THREE.ShortType, THREE.UnsignedShortType, THREE.IntType,
    THREE.UnsignedIntType, THREE.FloatType,
    THREE.UnsignedShort4444Type, THREE.UnsignedShort5551Type,
    and THREE.UnsignedShort565Type.

anisotropy - 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.

type Three

type Three struct {
	// contains filtered or unexported fields
}

Three represents the three.js API.

func New

func New() *Three

New returns a new JavaScript object that binds to three.js.

func (*Three) AmbientLight

func (t *Three) AmbientLight() *AmbientLight

AmbientLight returns an AmbientLight JavaScript class.

func (*Three) AnimationClip

func (t *Three) AnimationClip() *AnimationClip

AnimationClip returns an AnimationClip JavaScript class.

func (*Three) AnimationLoader

func (t *Three) AnimationLoader() *AnimationLoader

AnimationLoader returns an AnimationLoader JavaScript class.

func (*Three) AnimationMixer

func (t *Three) AnimationMixer() *AnimationMixer

AnimationMixer returns an AnimationMixer JavaScript class.

func (*Three) AnimationObjectGroup

func (t *Three) AnimationObjectGroup() *AnimationObjectGroup

AnimationObjectGroup returns an AnimationObjectGroup JavaScript class.

func (*Three) AnimationUtils

func (t *Three) AnimationUtils() *AnimationUtils

AnimationUtils returns an AnimationUtils JavaScript class.

func (*Three) ArcCurve

func (t *Three) ArcCurve() *ArcCurve

ArcCurve returns an ArcCurve JavaScript class.

func (*Three) ArrowHelper

func (t *Three) ArrowHelper() *ArrowHelper

ArrowHelper returns an ArrowHelper JavaScript class.

func (*Three) Audio

func (t *Three) Audio() *Audio

Audio returns an Audio JavaScript class.

func (*Three) AudioAnalyser

func (t *Three) AudioAnalyser() *AudioAnalyser

AudioAnalyser returns an AudioAnalyser JavaScript class.

func (*Three) AudioBuffer

func (t *Three) AudioBuffer() *AudioBuffer

AudioBuffer returns an AudioBuffer JavaScript class.

func (*Three) AudioListener

func (t *Three) AudioListener() *AudioListener

AudioListener returns an AudioListener JavaScript class.

func (*Three) AxisHelper

func (t *Three) AxisHelper() *AxisHelper

AxisHelper returns an AxisHelper JavaScript class.

func (*Three) BinaryTextureLoader

func (t *Three) BinaryTextureLoader() *BinaryTextureLoader

BinaryTextureLoader returns a BinaryTextureLoader JavaScript class.

func (*Three) Bone

func (t *Three) Bone() *Bone

Bone returns a Bone JavaScript class.

func (*Three) BooleanKeyframeTrack

func (t *Three) BooleanKeyframeTrack() *BooleanKeyframeTrack

BooleanKeyframeTrack returns a BooleanKeyframeTrack JavaScript class.

func (*Three) BoundingBoxHelper

func (t *Three) BoundingBoxHelper() *BoundingBoxHelper

BoundingBoxHelper returns a BoundingBoxHelper JavaScript class.

func (*Three) Box2

func (t *Three) Box2() *Box2

Box2 returns a Box2 JavaScript class.

func (*Three) Box3

func (t *Three) Box3() *Box3

Box3 returns a Box3 JavaScript class.

func (*Three) BoxBufferGeometry

func (t *Three) BoxBufferGeometry() *BoxBufferGeometry

BoxBufferGeometry returns a BoxBufferGeometry JavaScript class.

func (*Three) BoxGeometry

func (t *Three) BoxGeometry() *BoxGeometry

BoxGeometry returns a BoxGeometry JavaScript class.

func (*Three) BoxHelper

func (t *Three) BoxHelper() *BoxHelper

BoxHelper returns a BoxHelper JavaScript class.

func (*Three) BufferAttribute

func (t *Three) BufferAttribute() *BufferAttribute

BufferAttribute returns a BufferAttribute JavaScript class.

func (*Three) BufferGeometry

func (t *Three) BufferGeometry() *BufferGeometry

BufferGeometry returns a BufferGeometry JavaScript class.

func (*Three) BufferGeometryLoader

func (t *Three) BufferGeometryLoader() *BufferGeometryLoader

BufferGeometryLoader returns a BufferGeometryLoader JavaScript class.

func (*Three) Cache

func (t *Three) Cache() *Cache

Cache returns a Cache JavaScript class.

func (*Three) Camera

func (t *Three) Camera() *Camera

Camera returns a Camera JavaScript class.

func (*Three) CameraHelper

func (t *Three) CameraHelper() *CameraHelper

CameraHelper returns a CameraHelper JavaScript class.

func (*Three) CanvasTexture

func (t *Three) CanvasTexture() *CanvasTexture

CanvasTexture returns a CanvasTexture JavaScript class.

func (*Three) CatmullRomCurve3

func (t *Three) CatmullRomCurve3() *CatmullRomCurve3

CatmullRomCurve3 returns a CatmullRomCurve3 JavaScript class.

func (*Three) CircleBufferGeometry

func (t *Three) CircleBufferGeometry() *CircleBufferGeometry

CircleBufferGeometry returns a CircleBufferGeometry JavaScript class.

func (*Three) CircleGeometry

func (t *Three) CircleGeometry() *CircleGeometry

CircleGeometry returns a CircleGeometry JavaScript class.

func (*Three) Clock

func (t *Three) Clock() *Clock

Clock returns a Clock JavaScript class.

func (*Three) Color

func (t *Three) Color() *Color

Color returns a Color JavaScript class.

func (*Three) ColorKeyframeTrack

func (t *Three) ColorKeyframeTrack() *ColorKeyframeTrack

ColorKeyframeTrack returns a ColorKeyframeTrack JavaScript class.

func (*Three) CompressedTexture

func (t *Three) CompressedTexture() *CompressedTexture

CompressedTexture returns a CompressedTexture JavaScript class.

func (*Three) CompressedTextureLoader

func (t *Three) CompressedTextureLoader() *CompressedTextureLoader

CompressedTextureLoader returns a CompressedTextureLoader JavaScript class.

func (*Three) CubeCamera

func (t *Three) CubeCamera() *CubeCamera

CubeCamera returns a CubeCamera JavaScript class.

func (*Three) CubeTexture

func (t *Three) CubeTexture() *CubeTexture

CubeTexture returns a CubeTexture JavaScript class.

func (*Three) CubeTextureLoader

func (t *Three) CubeTextureLoader() *CubeTextureLoader

CubeTextureLoader returns a CubeTextureLoader JavaScript class.

func (*Three) CubicBezierCurve

func (t *Three) CubicBezierCurve() *CubicBezierCurve

CubicBezierCurve returns a CubicBezierCurve JavaScript class.

func (*Three) CubicBezierCurve3

func (t *Three) CubicBezierCurve3() *CubicBezierCurve3

CubicBezierCurve3 returns a CubicBezierCurve3 JavaScript class.

func (*Three) CubicInterpolant

func (t *Three) CubicInterpolant() *CubicInterpolant

CubicInterpolant returns a CubicInterpolant JavaScript class.

func (*Three) Curve

func (t *Three) Curve() *Curve

Curve returns a Curve JavaScript class.

func (*Three) CurvePath

func (t *Three) CurvePath() *CurvePath

CurvePath returns a CurvePath JavaScript class.

func (*Three) CurveUtils

func (t *Three) CurveUtils() *CurveUtils

CurveUtils returns a CurveUtils JavaScript class.

func (*Three) CylinderBufferGeometry

func (t *Three) CylinderBufferGeometry() *CylinderBufferGeometry

CylinderBufferGeometry returns a CylinderBufferGeometry JavaScript class.

func (*Three) CylinderGeometry

func (t *Three) CylinderGeometry() *CylinderGeometry

CylinderGeometry returns a CylinderGeometry JavaScript class.

func (*Three) DataTexture

func (t *Three) DataTexture() *DataTexture

DataTexture returns a DataTexture JavaScript class.

func (*Three) DirectGeometry

func (t *Three) DirectGeometry() *DirectGeometry

DirectGeometry returns a DirectGeometry JavaScript class.

func (*Three) DirectionalLight

func (t *Three) DirectionalLight() *DirectionalLight

DirectionalLight returns a DirectionalLight JavaScript class.

func (*Three) DirectionalLightHelper

func (t *Three) DirectionalLightHelper() *DirectionalLightHelper

DirectionalLightHelper returns a DirectionalLightHelper JavaScript class.

func (*Three) DiscreteInterpolant

func (t *Three) DiscreteInterpolant() *DiscreteInterpolant

DiscreteInterpolant returns a DiscreteInterpolant JavaScript class.

func (*Three) DodecahedronGeometry

func (t *Three) DodecahedronGeometry() *DodecahedronGeometry

DodecahedronGeometry returns a DodecahedronGeometry JavaScript class.

func (*Three) EdgesGeometry

func (t *Three) EdgesGeometry() *EdgesGeometry

EdgesGeometry returns an EdgesGeometry JavaScript class.

func (*Three) EdgesHelper

func (t *Three) EdgesHelper() *EdgesHelper

EdgesHelper returns an EdgesHelper JavaScript class.

func (*Three) EllipseCurve

func (t *Three) EllipseCurve() *EllipseCurve

EllipseCurve returns an EllipseCurve JavaScript class.

func (*Three) Euler

func (t *Three) Euler() *Euler

Euler returns an Euler JavaScript class.

func (*Three) EventDispatcher

func (t *Three) EventDispatcher() *EventDispatcher

EventDispatcher returns an EventDispatcher JavaScript class.

func (*Three) ExtrudeGeometry

func (t *Three) ExtrudeGeometry() *ExtrudeGeometry

ExtrudeGeometry returns an ExtrudeGeometry JavaScript class.

func (*Three) Face3

func (t *Three) Face3() *Face3

Face3 returns a Face3 JavaScript class.

func (*Three) FaceNormalsHelper

func (t *Three) FaceNormalsHelper() *FaceNormalsHelper

FaceNormalsHelper returns a FaceNormalsHelper JavaScript class.

func (*Three) Float32Attribute

func (t *Three) Float32Attribute() *Float32Attribute

Float32Attribute returns a Float32Attribute object.

func (*Three) Float64Attribute

func (t *Three) Float64Attribute() *Float64Attribute

Float64Attribute returns a Float64Attribute object.

func (*Three) Fog

func (t *Three) Fog() *Fog

Fog returns a Fog JavaScript class.

func (*Three) FogExp2

func (t *Three) FogExp2() *FogExp2

FogExp2 returns a FogExp2 JavaScript class.

func (*Three) Font

func (t *Three) Font() *Font

Font returns a Font JavaScript class.

func (*Three) FontLoader

func (t *Three) FontLoader() *FontLoader

FontLoader returns a FontLoader JavaScript class.

func (*Three) Frustum

func (t *Three) Frustum() *Frustum

Frustum returns a Frustum JavaScript class.

func (*Three) Geometry

func (t *Three) Geometry() *Geometry

Geometry returns a Geometry JavaScript class.

func (*Three) GridHelper

func (t *Three) GridHelper() *GridHelper

GridHelper returns a GridHelper JavaScript class.

func (*Three) Group

func (t *Three) Group() *Group

Group returns a Group JavaScript class.

func (*Three) HemisphereLight

func (t *Three) HemisphereLight() *HemisphereLight

HemisphereLight returns a HemisphereLight JavaScript class.

func (*Three) HemisphereLightHelper

func (t *Three) HemisphereLightHelper() *HemisphereLightHelper

HemisphereLightHelper returns a HemisphereLightHelper JavaScript class.

func (*Three) IcosahedronGeometry

func (t *Three) IcosahedronGeometry() *IcosahedronGeometry

IcosahedronGeometry returns an IcosahedronGeometry JavaScript class.

func (*Three) ImageLoader

func (t *Three) ImageLoader() *ImageLoader

ImageLoader returns an ImageLoader JavaScript class.

func (*Three) ImmediateRenderObject

func (t *Three) ImmediateRenderObject() *ImmediateRenderObject

ImmediateRenderObject returns an ImmediateRenderObject JavaScript class.

func (*Three) InstancedBufferAttribute

func (t *Three) InstancedBufferAttribute() *InstancedBufferAttribute

InstancedBufferAttribute returns an InstancedBufferAttribute JavaScript class.

func (*Three) InstancedBufferGeometry

func (t *Three) InstancedBufferGeometry() *InstancedBufferGeometry

InstancedBufferGeometry returns an InstancedBufferGeometry JavaScript class.

func (*Three) InstancedInterleavedBuffer

func (t *Three) InstancedInterleavedBuffer() *InstancedInterleavedBuffer

InstancedInterleavedBuffer returns an InstancedInterleavedBuffer JavaScript class.

func (*Three) Int16Attribute

func (t *Three) Int16Attribute() *Int16Attribute

Int16Attribute returns an Int16Attribute object.

func (*Three) Int32Attribute

func (t *Three) Int32Attribute() *Int32Attribute

Int32Attribute returns an Int32Attribute object.

func (*Three) Int8Attribute

func (t *Three) Int8Attribute() *Int8Attribute

Int8Attribute returns an Int8Attribute object.

func (*Three) InterleavedBuffer

func (t *Three) InterleavedBuffer() *InterleavedBuffer

InterleavedBuffer returns an InterleavedBuffer JavaScript class.

func (*Three) InterleavedBufferAttribute

func (t *Three) InterleavedBufferAttribute() *InterleavedBufferAttribute

InterleavedBufferAttribute returns an InterleavedBufferAttribute JavaScript class.

func (*Three) Interpolant

func (t *Three) Interpolant() *Interpolant

Interpolant returns an Interpolant JavaScript class.

func (*Three) JSONLoader

func (t *Three) JSONLoader() *JSONLoader

JSONLoader returns a JSONLoader JavaScript class.

func (*Three) JSObject

func (t *Three) JSObject() *js.Object

JSObject returns the underlying *js.JavaScript class.

func (*Three) KeyframeTrack

func (t *Three) KeyframeTrack() *KeyframeTrack

KeyframeTrack returns a KeyframeTrack JavaScript class.

func (*Three) LOD

func (t *Three) LOD() *LOD

LOD returns a LOD JavaScript class.

func (*Three) LatheBufferGeometry

func (t *Three) LatheBufferGeometry() *LatheBufferGeometry

LatheBufferGeometry returns a LatheBufferGeometry JavaScript class.

func (*Three) LatheGeometry

func (t *Three) LatheGeometry() *LatheGeometry

LatheGeometry returns a LatheGeometry JavaScript class.

func (*Three) Layers

func (t *Three) Layers() *Layers

Layers returns a Layers JavaScript class.

func (*Three) LensFlare

func (t *Three) LensFlare() *LensFlare

LensFlare returns a LensFlare JavaScript class.

func (*Three) LensFlarePlugin

func (t *Three) LensFlarePlugin() *LensFlarePlugin

LensFlarePlugin returns a LensFlarePlugin JavaScript class.

func (*Three) Light

func (t *Three) Light() *Light

Light returns a Light JavaScript class.

func (*Three) LightShadow

func (t *Three) LightShadow() *LightShadow

LightShadow returns a LightShadow JavaScript class.

func (*Three) Line

func (t *Three) Line() *Line

Line returns a Line JavaScript class.

func (*Three) Line3

func (t *Three) Line3() *Line3

Line3 returns a Line3 JavaScript class.

func (*Three) LineBasicMaterial

func (t *Three) LineBasicMaterial() *LineBasicMaterial

LineBasicMaterial returns a LineBasicMaterial JavaScript class.

func (*Three) LineCurve

func (t *Three) LineCurve() *LineCurve

LineCurve returns a LineCurve JavaScript class.

func (*Three) LineDashedMaterial

func (t *Three) LineDashedMaterial() *LineDashedMaterial

LineDashedMaterial returns a LineDashedMaterial JavaScript class.

func (*Three) LineSegments

func (t *Three) LineSegments() *LineSegments

LineSegments returns a LineSegments JavaScript class.

func (*Three) LinearInterpolant

func (t *Three) LinearInterpolant() *LinearInterpolant

LinearInterpolant returns a LinearInterpolant JavaScript class.

func (*Three) Loader

func (t *Three) Loader() *Loader

Loader returns a Loader JavaScript class.

func (*Three) LoadingManager

func (t *Three) LoadingManager() *LoadingManager

LoadingManager returns a LoadingManager JavaScript class.

func (*Three) MOUSE

func (t *Three) MOUSE() *MOUSE

MOUSE returns a MOUSE object.

func (*Three) Material

func (t *Three) Material() *Material

Material returns a Material JavaScript class.

func (*Three) MaterialLoader

func (t *Three) MaterialLoader() *MaterialLoader

MaterialLoader returns a MaterialLoader JavaScript class.

func (*Three) Math

func (t *Three) Math() *Math

Math returns a Math JavaScript class.

func (*Three) Matrix3

func (t *Three) Matrix3() *Matrix3

Matrix3 returns a Matrix3 JavaScript class.

func (*Three) Matrix4

func (t *Three) Matrix4() *Matrix4

Matrix4 returns a Matrix4 JavaScript class.

func (*Three) Mesh

func (t *Three) Mesh() *Mesh

Mesh returns a Mesh JavaScript class.

func (*Three) MeshBasicMaterial

func (t *Three) MeshBasicMaterial() *MeshBasicMaterial

MeshBasicMaterial returns a MeshBasicMaterial JavaScript class.

func (*Three) MeshDepthMaterial

func (t *Three) MeshDepthMaterial() *MeshDepthMaterial

MeshDepthMaterial returns a MeshDepthMaterial JavaScript class.

func (*Three) MeshLambertMaterial

func (t *Three) MeshLambertMaterial() *MeshLambertMaterial

MeshLambertMaterial returns a MeshLambertMaterial JavaScript class.

func (*Three) MeshNormalMaterial

func (t *Three) MeshNormalMaterial() *MeshNormalMaterial

MeshNormalMaterial returns a MeshNormalMaterial JavaScript class.

func (*Three) MeshPhongMaterial

func (t *Three) MeshPhongMaterial() *MeshPhongMaterial

MeshPhongMaterial returns a MeshPhongMaterial JavaScript class.

func (*Three) MeshStandardMaterial

func (t *Three) MeshStandardMaterial() *MeshStandardMaterial

MeshStandardMaterial returns a MeshStandardMaterial JavaScript class.

func (*Three) MorphBlendMesh

func (t *Three) MorphBlendMesh() *MorphBlendMesh

MorphBlendMesh returns a MorphBlendMesh JavaScript class.

func (*Three) MultiMaterial

func (t *Three) MultiMaterial() *MultiMaterial

MultiMaterial returns a MultiMaterial JavaScript class.

func (*Three) NewAmbientLight

func (t *Three) NewAmbientLight(color int, intensity float64) *AmbientLight

NewAmbientLight creates an Ambientlight with a color and intensity.

color — Numeric value of the RGB component of the color.
intensity -- Numeric value of the light's strength/intensity.

func (*Three) NewAnimationClip

func (t *Three) NewAnimationClip(name, duration, tracks float64) *AnimationClip

NewAnimationClip returns a new AnimationClip object.

func (*Three) NewAnimationLoader

func (t *Three) NewAnimationLoader(manager float64) *AnimationLoader

NewAnimationLoader returns a new AnimationLoader object.

func (*Three) NewAnimationMixer

func (t *Three) NewAnimationMixer(root float64) *AnimationMixer

NewAnimationMixer returns a new AnimationMixer object.

func (*Three) NewAnimationObjectGroup

func (t *Three) NewAnimationObjectGroup(varArgs JSObject) *AnimationObjectGroup

NewAnimationObjectGroup returns a new AnimationObjectGroup object.

func (*Three) NewAnimationUtils

func (t *Three) NewAnimationUtils() *AnimationUtils

NewAnimationUtils returns a new AnimationUtils object.

func (*Three) NewArcCurve

func (t *Three) NewArcCurve(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise float64) *ArcCurve

NewArcCurve returns a new ArcCurve object.

func (*Three) NewArrowHelper

func (t *Three) NewArrowHelper(dir, origin *Vector3, opts *ArrowHelperOpts) *ArrowHelper

NewArrowHelper returns a new ArrowHelper object.

func (*Three) NewAudio

func (t *Three) NewAudio(listener float64) *Audio

NewAudio returns a new Audio object.

func (*Three) NewAudioAnalyser

func (t *Three) NewAudioAnalyser(audio, fftSize float64) *AudioAnalyser

NewAudioAnalyser returns a new AudioAnalyser object.

func (*Three) NewAudioBuffer

func (t *Three) NewAudioBuffer(context float64) *AudioBuffer

NewAudioBuffer returns a new AudioBuffer object.

func (*Three) NewAudioListener

func (t *Three) NewAudioListener() *AudioListener

NewAudioListener returns a new AudioListener object.

func (*Three) NewAxisHelper

func (t *Three) NewAxisHelper(size float64) *AxisHelper

NewAxisHelper returns a new AxisHelper object.

func (*Three) NewBinaryTextureLoader

func (t *Three) NewBinaryTextureLoader() *BinaryTextureLoader

NewBinaryTextureLoader returns a new BinaryTextureLoader object.

func (*Three) NewBone

func (t *Three) NewBone(skin float64) *Bone

NewBone returns a new Bone object.

func (*Three) NewBooleanKeyframeTrack

func (t *Three) NewBooleanKeyframeTrack(name, times, values float64) *BooleanKeyframeTrack

NewBooleanKeyframeTrack returns a new BooleanKeyframeTrack object.

func (*Three) NewBoundingBoxHelper

func (t *Three) NewBoundingBoxHelper(object JSObject, hex int) *BoundingBoxHelper

NewBoundingBoxHelper returns a new BoundingBoxHelper object.

func (*Three) NewBox2

func (t *Three) NewBox2(min, max float64) *Box2

NewBox2 returns a new Box2 object bounded by min and max.

min -- Lower (x, y) boundary of the box.
max -- Upper (x, y) boundary of the box.

func (*Three) NewBox3

func (t *Three) NewBox3(min, max float64) *Box3

NewBox3 returns a new Box3 object.

func (*Three) NewBoxBufferGeometry

func (t *Three) NewBoxBufferGeometry(width, height, depth int, opts *BoxBufferGeometryOpts) *BoxBufferGeometry

NewBoxBufferGeometry returns a new BoxBufferGeometry object.

func (*Three) NewBoxGeometry

func (t *Three) NewBoxGeometry(width, height, depth float64, opts *BoxGeometryOpts) *BoxGeometry

NewBoxGeometry returns a new BoxGeometry object.

width — Width of the sides on the X axis.
height — Height of the sides on the Y axis.
depth — Depth of the sides on the Z axis.

func (*Three) NewBoxHelper

func (t *Three) NewBoxHelper(object JSObject) *BoxHelper

NewBoxHelper returns a new BoxHelper object.

func (*Three) NewBufferAttribute

func (t *Three) NewBufferAttribute(array interface{}, itemSize int) *BufferAttribute

NewBufferAttribute returns a new BufferAttribute object.

func (*Three) NewBufferGeometry

func (t *Three) NewBufferGeometry() *BufferGeometry

NewBufferGeometry returns a new BufferGeometry object.

func (*Three) NewBufferGeometryLoader

func (t *Three) NewBufferGeometryLoader() *BufferGeometryLoader

NewBufferGeometryLoader returns a new BufferGeometryLoader object.

func (*Three) NewCache

func (t *Three) NewCache() *Cache

NewCache returns a new Cache object.

func (*Three) NewCamera

func (t *Three) NewCamera() *Camera

NewCamera returns a new Camera object.

This constructor sets the following properties to the correct type: matrixWorldInverse and projectionMatrix.

func (*Three) NewCameraHelper

func (t *Three) NewCameraHelper(camera float64) *CameraHelper

NewCameraHelper returns a new CameraHelper object.

func (*Three) NewCanvasTexture

func (t *Three) NewCanvasTexture(canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, typ, anisotropy float64) *CanvasTexture

NewCanvasTexture returns a new CanvasTexture object.

func (*Three) NewCatmullRomCurve3

func (t *Three) NewCatmullRomCurve3(pts []*js.Object) *CatmullRomCurve3

NewCatmullRomCurve3 returns a new CatmullRomCurve3 object.

func (*Three) NewCircleBufferGeometry

func (t *Three) NewCircleBufferGeometry(radius float64, segments int, opts *CircleBufferGeometryOpts) *CircleBufferGeometry

NewCircleBufferGeometry returns a new CircleBufferGeometry object.

radius — Radius of the circle, default = 50.
segments — Number of segments (triangles), minimum = 3, default = 8.

func (*Three) NewCircleGeometry

func (t *Three) NewCircleGeometry(radius float64, segments int, opts *CircleGeometryOpts) *CircleGeometry

NewCircleGeometry returns a new CircleGeometry object.

radius — Radius of the circle, default = 50.
segments — Number of segments (triangles), minimum = 3, default = 8.

func (*Three) NewClock

func (t *Three) NewClock(autoStart bool) *Clock

NewClock returns a new Clock object.

func (*Three) NewColor

func (t *Three) NewColor(color ...interface{}) *Color

NewColor returns a new Color object.

func (*Three) NewColorKeyframeTrack

func (t *Three) NewColorKeyframeTrack(name, times, values, interpolation float64) *ColorKeyframeTrack

NewColorKeyframeTrack returns a new ColorKeyframeTrack object.

func (*Three) NewCompressedTexture

func (t *Three) NewCompressedTexture(mipmaps, width, height, format, typ, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy float64) *CompressedTexture

NewCompressedTexture returns a new CompressedTexture object.

func (*Three) NewCompressedTextureLoader

func (t *Three) NewCompressedTextureLoader(manager float64) *CompressedTextureLoader

NewCompressedTextureLoader returns a new CompressedTextureLoader object.

func (*Three) NewCubeCamera

func (t *Three) NewCubeCamera(near, far, cubeResolution float64) *CubeCamera

NewCubeCamera returns a new CubeCamera object.

func (*Three) NewCubeTexture

func (t *Three) NewCubeTexture(images, mapping, wrapS, wrapT, magFilter, minFilter, format, typ, anisotropy float64) *CubeTexture

NewCubeTexture returns a new CubeTexture object.

func (*Three) NewCubeTextureLoader

func (t *Three) NewCubeTextureLoader() *CubeTextureLoader

NewCubeTextureLoader returns a new CubeTextureLoader object.

func (*Three) NewCubicBezierCurve

func (t *Three) NewCubicBezierCurve(v0, v1, v2, v3 *Vector3) *CubicBezierCurve

NewCubicBezierCurve returns a new CubicBezierCurve object.

func (*Three) NewCubicBezierCurve3

func (t *Three) NewCubicBezierCurve3(v0, v1, v2, v3 *Vector3) *CubicBezierCurve3

NewCubicBezierCurve3 returns a new CubicBezierCurve3 object.

func (*Three) NewCubicInterpolant

func (t *Three) NewCubicInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer float64) *CubicInterpolant

NewCubicInterpolant returns a new CubicInterpolant object.

func (*Three) NewCurve

func (t *Three) NewCurve() *Curve

NewCurve returns a new Curve object.

func (*Three) NewCurvePath

func (t *Three) NewCurvePath() *CurvePath

NewCurvePath returns a new CurvePath object.

func (*Three) NewCurveUtils

func (t *Three) NewCurveUtils() *CurveUtils

NewCurveUtils returns a new CurveUtils object.

func (*Three) NewCylinderBufferGeometry

func (t *Three) NewCylinderBufferGeometry(radiusTop, radiusBottom, height float64, radialSegments, heightSegments int, openEnded bool, opts *CylinderBufferGeometryOpts) *CylinderBufferGeometry

NewCylinderBufferGeometry returns a new CylinderBufferGeometry object.

radiusTop — Radius of the cylinder at the top. Default is 20. radiusBottom — Radius of the cylinder at the bottom. Default is 20. height — Height of the cylinder. Default is 100. radiusSegments — Number of segmented faces around the circumference of the cylinder. Default is 8 heightSegments — Number of rows of faces along the height of the cylinder. Default is 1. openEnded — A Boolean indicating whether the ends of the cylinder are open or capped. Default is false, meaning capped.

func (*Three) NewCylinderGeometry

func (t *Three) NewCylinderGeometry(radiusTop, radiusBottom, height float64, radialSegments, heightSegments int, openEnded bool, opts *CylinderGeometryOpts) *CylinderGeometry

NewCylinderGeometry returns a new CylinderGeometry object.

radiusTop — Radius of the cylinder at the top. Default is 20.
radiusBottom — Radius of the cylinder at the bottom. Default is 20.
height — Height of the cylinder. Default is 100.
radiusSegments — Number of segmented faces around the circumference of the cylinder. Default is 8
heightSegments — Number of rows of faces along the height of the cylinder. Default is 1.
openEnded — A Boolean indicating whether the ends of the cylinder are open or capped.
    Default is false, meaning capped.

func (*Three) NewDataTexture

func (t *Three) NewDataTexture(data, width, height, format, typ, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy float64) *DataTexture

NewDataTexture returns a new DataTexture object.

func (*Three) NewDirectGeometry

func (t *Three) NewDirectGeometry() *DirectGeometry

NewDirectGeometry returns a new DirectGeometry object.

func (*Three) NewDirectionalLight

func (t *Three) NewDirectionalLight(color, intensity float64) *DirectionalLight

NewDirectionalLight returns a new DirectionalLight object.

func (*Three) NewDirectionalLightHelper

func (t *Three) NewDirectionalLightHelper(light, size float64) *DirectionalLightHelper

NewDirectionalLightHelper returns a new DirectionalLightHelper object.

func (*Three) NewDiscreteInterpolant

func (t *Three) NewDiscreteInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer float64) *DiscreteInterpolant

NewDiscreteInterpolant returns a new DiscreteInterpolant object.

func (*Three) NewDodecahedronGeometry

func (t *Three) NewDodecahedronGeometry(radius, detail float64) *DodecahedronGeometry

NewDodecahedronGeometry returns a new DodecahedronGeometry object.

radius — Radius of the dodecahedron. Default is 1.
detail — Default is 0. Setting this to a value greater than 0 adds
    vertices making it no longer a dodecahedron.

func (*Three) NewEdgesGeometry

func (t *Three) NewEdgesGeometry(geometry, thresholdAngle float64) *EdgesGeometry

NewEdgesGeometry returns a new EdgesGeometry object.

func (*Three) NewEdgesHelper

func (t *Three) NewEdgesHelper(object JSObject, hex int, thresholdAngle float64) *EdgesHelper

NewEdgesHelper creates a Line, showing only the "hard" edges of the passed object; specifically, no edge will be drawn between faces which are adjacent and coplanar (or nearly coplanar).

object -- Object of which to draw edges
color -- Color of the edges.
thresholdAngle -- the minimim angle (in degrees), between the
    face normals of adjacent faces, that is required to render
    an edge. Default is 0.1.

func (*Three) NewEllipseCurve

func (t *Three) NewEllipseCurve(aX, aY, xRadius, yRadius float64, opts *EllipseCurveOpts) *EllipseCurve

NewEllipseCurve returns a new EllipseCurve object.

aX – The X center of the ellipse
aY – The Y center of the ellipse
xRadius – The radius of the ellipse in the x direction
yRadius – The radius of the ellipse in the y direction

func (*Three) NewEuler

func (t *Three) NewEuler(x, y, z float64, order string) *Euler

NewEuler returns a new Euler object.

x -- Float the angle of the x axis in radians
y -- Float the angle of the y axis in radians
z -- Float the angle of the z axis in radians
order -- String A string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case).

func (*Three) NewEventDispatcher

func (t *Three) NewEventDispatcher() *EventDispatcher

NewEventDispatcher returns a new EventDispatcher object.

func (*Three) NewExtrudeGeometry

func (t *Three) NewExtrudeGeometry(shapes JSObject, opts *ExtrudeGeometryOpts) *ExtrudeGeometry

NewExtrudeGeometry returns a new ExtrudeGeometry object.

shapes — Shape or an array of shapes.

func (*Three) NewFace3

func (t *Three) NewFace3(a, b, c float64, normal *Vector3, color *Color, materialIndex int) *Face3

NewFace3 returns a new Face3 object.

a — Vertex A index.
b — Vertex B index.
c — Vertex C index.
normal — Face normal or array of vertex normals.
color — Face color or array of vertex colors.
materialIndex — Material index.

func (*Three) NewFaceNormalsHelper

func (t *Three) NewFaceNormalsHelper(object JSObject, size float64, hex int, linewidth float64) *FaceNormalsHelper

NewFaceNormalsHelper returns a new FaceNormalsHelper object.

object -- object for which to render face normals
size -- size (length) of the arrows
color -- color of the arrows
linewidth -- width of the arrow lines

func (*Three) NewFloat32Attribute

func (t *Three) NewFloat32Attribute(array []float32, itemSize int) *Float32Attribute

NewFloat32Attribute returns a new Float32Attribute object.

func (*Three) NewFloat64Attribute

func (t *Three) NewFloat64Attribute(array []float64, itemSize int) *Float64Attribute

NewFloat64Attribute returns a new Float64Attribute object.

func (*Three) NewFog

func (t *Three) NewFog(color, near, far float64) *Fog

NewFog returns a new Fog object.

func (*Three) NewFogExp2

func (t *Three) NewFogExp2(color, density float64) *FogExp2

NewFogExp2 returns a new FogExp2 object.

func (*Three) NewFont

func (t *Three) NewFont(data float64) *Font

NewFont returns a new Font object.

func (*Three) NewFontLoader

func (t *Three) NewFontLoader(manager float64) *FontLoader

NewFontLoader returns a new FontLoader object.

func (*Three) NewFrustum

func (t *Three) NewFrustum(p0, p1, p2, p3, p4, p5 float64) *Frustum

NewFrustum returns a new Frustum object.

func (*Three) NewGeometry

func (t *Three) NewGeometry() *Geometry

NewGeometry returns a new Geometry object.

func (*Three) NewGridHelper

func (t *Three) NewGridHelper(size, step float64) *GridHelper

NewGridHelper returns a new GridHelper object.

func (*Three) NewGroup

func (t *Three) NewGroup() *Group

NewGroup returns a new Group object.

func (*Three) NewHemisphereLight

func (t *Three) NewHemisphereLight(skyColor, groundColor, intensity float64) *HemisphereLight

NewHemisphereLight returns a new HemisphereLight object.

func (*Three) NewHemisphereLightHelper

func (t *Three) NewHemisphereLightHelper(light, sphereSize float64) *HemisphereLightHelper

NewHemisphereLightHelper returns a new HemisphereLightHelper object.

func (*Three) NewIcosahedronGeometry

func (t *Three) NewIcosahedronGeometry(radius, detail float64) *IcosahedronGeometry

NewIcosahedronGeometry returns a new IcosahedronGeometry object.

radius — Default is 1.
detail — Default is 0. Setting this to a value greater than 0 adds more
    vertices making it no longer an icosahedron. When detail is greater
    than 1, it's effectively a sphere.

func (*Three) NewImageLoader

func (t *Three) NewImageLoader(manager float64) *ImageLoader

NewImageLoader returns a new ImageLoader object.

func (*Three) NewImmediateRenderObject

func (t *Three) NewImmediateRenderObject(material float64) *ImmediateRenderObject

NewImmediateRenderObject returns a new ImmediateRenderObject object.

func (*Three) NewInstancedBufferAttribute

func (t *Three) NewInstancedBufferAttribute(array, itemSize, meshPerAttribute float64) *InstancedBufferAttribute

NewInstancedBufferAttribute returns a new InstancedBufferAttribute object.

func (*Three) NewInstancedBufferGeometry

func (t *Three) NewInstancedBufferGeometry() *InstancedBufferGeometry

NewInstancedBufferGeometry returns a new InstancedBufferGeometry object.

func (*Three) NewInstancedInterleavedBuffer

func (t *Three) NewInstancedInterleavedBuffer(array, stride, meshPerAttribute float64) *InstancedInterleavedBuffer

NewInstancedInterleavedBuffer returns a new InstancedInterleavedBuffer object.

func (*Three) NewInt16Attribute

func (t *Three) NewInt16Attribute(array []int16, itemSize int) *Int16Attribute

NewInt16Attribute returns a new Int16Attribute object.

func (*Three) NewInt32Attribute

func (t *Three) NewInt32Attribute(array []int32, itemSize int) *Int32Attribute

NewInt32Attribute returns a new Int32Attribute object.

func (*Three) NewInt8Attribute

func (t *Three) NewInt8Attribute(array []int8, itemSize int) *Int8Attribute

NewInt8Attribute returns a new Int8Attribute object.

func (*Three) NewInterleavedBuffer

func (t *Three) NewInterleavedBuffer(array, stride float64) *InterleavedBuffer

NewInterleavedBuffer returns a new InterleavedBuffer object.

func (*Three) NewInterleavedBufferAttribute

func (t *Three) NewInterleavedBufferAttribute(interleavedBuffer, itemSize, offset float64) *InterleavedBufferAttribute

NewInterleavedBufferAttribute returns a new InterleavedBufferAttribute object.

func (*Three) NewInterpolant

func (t *Three) NewInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer float64) *Interpolant

NewInterpolant returns a new Interpolant object.

func (*Three) NewJSONLoader

func (t *Three) NewJSONLoader() *JSONLoader

NewJSONLoader returns a new JSONLoader object.

func (*Three) NewJSObject

func (t *Three) NewJSObject() *MOUSE

NewJSObject returns a new MOUSE object.

func (*Three) NewKeyframeTrack

func (t *Three) NewKeyframeTrack(name, times, values, interpolation float64) *KeyframeTrack

NewKeyframeTrack returns a new KeyframeTrack object.

func (*Three) NewLOD

func (t *Three) NewLOD() *LOD

NewLOD returns a new LOD object.

func (*Three) NewLUT

func (t *Three) NewLUT(colormap string, numberofcolors int) *LUT

NewLUT returns a new LUT object.

func (*Three) NewLatheBufferGeometry

func (t *Three) NewLatheBufferGeometry(points, segments, phiStart, phiLength float64) *LatheBufferGeometry

NewLatheBufferGeometry returns a new LatheBufferGeometry object.

func (*Three) NewLatheGeometry

func (t *Three) NewLatheGeometry(points []*js.Object, segments int, phiStart, phiLength float64) *LatheGeometry

NewLatheGeometry returns a new LatheGeometry object.

points — Slice of Vector2s.
segments — the number of circumference segments to generate. Default is 12.
phiStart — the starting angle in radians. Default is 0.
phiLength — the radian (0 to 2PI) range of the lathed section 2PI is a
    closed lathe, less than 2PI is a portion. Default is 2*PI

func (*Three) NewLayers

func (t *Three) NewLayers() *Layers

NewLayers returns a new Layers object.

func (*Three) NewLensFlare

func (t *Three) NewLensFlare(texture *js.Object, size, distance float64, blending, color int) *LensFlare

NewLensFlare returns a new LensFlare object.

texture -- THREE.Texture (optional)
size -- size in pixels (-1 = use texture.width)
distance -- (0-1) from light source (0 = at light source)
blending -- Blending Mode - Defaults to THREE.NormalBlending
color -- The color of the lens flare

func (*Three) NewLensFlarePlugin

func (t *Three) NewLensFlarePlugin(renderer, flares float64) *LensFlarePlugin

NewLensFlarePlugin returns a new LensFlarePlugin object.

func (*Three) NewLight

func (t *Three) NewLight(color, intensity float64) *Light

NewLight returns a new Light object.

func (*Three) NewLightShadow

func (t *Three) NewLightShadow(camera *Camera) *LightShadow

NewLightShadow returns a new LightShadow object.

func (*Three) NewLine

func (t *Three) NewLine(geometry JSObject, material JSObject) *Line

NewLine returns a new Line object.

geometry — Vertices representing the line segment(s).
material — Material for the line. Default is LineBasicMaterial.

func (*Three) NewLine3

func (t *Three) NewLine3(start, end float64) *Line3

NewLine3 returns a new Line3 object.

func (*Three) NewLineBasicMaterial

func (t *Three) NewLineBasicMaterial(parameters LineBasicMaterialOpts) *LineBasicMaterial

NewLineBasicMaterial returns a new LineBasicMaterial object.

func (*Three) NewLineCurve

func (t *Three) NewLineCurve(v1, v2 float64) *LineCurve

NewLineCurve returns a new LineCurve object.

func (*Three) NewLineDashedMaterial

func (t *Three) NewLineDashedMaterial(parameters map[string]interface{}) *LineDashedMaterial

NewLineDashedMaterial returns a new LineDashedMaterial object.

parameters is an object with one or more properties defining the material's appearance:

color — Line color in hexadecimal. Default is 0xffffff.
linewidth — Line thickness. Default is 1.
scale — The scale of the dashed part of a line. Default is 1.
dashSize — The size of the dash. Default is 3.
gapSize - The size of the gap. Default is 1.
vertexColors — Define how the vertices gets colored. Default is THREE.NoColors.
fog — Define whether the material color is affected by global fog settings. Default is false.

func (*Three) NewLineSegments

func (t *Three) NewLineSegments(geometry []*js.Object, material *js.Object) *LineSegments

NewLineSegments returns a new LineSegments object.

geometry — Vertices representing the line segment(s).
material — Material for the line. Default is LineBasicMaterial.

func (*Three) NewLinearInterpolant

func (t *Three) NewLinearInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer float64) *LinearInterpolant

NewLinearInterpolant returns a new LinearInterpolant object.

func (*Three) NewLoader

func (t *Three) NewLoader() *Loader

NewLoader returns a new Loader object.

func (*Three) NewLoadingManager

func (t *Three) NewLoadingManager(onLoad, onProgress, onError float64) *LoadingManager

NewLoadingManager returns a new LoadingManager object.

func (*Three) NewMaterial

func (t *Three) NewMaterial() *Material

NewMaterial returns a new Material object.

func (*Three) NewMaterialLoader

func (t *Three) NewMaterialLoader(manager float64) *MaterialLoader

NewMaterialLoader returns a new MaterialLoader object.

func (*Three) NewMath

func (t *Three) NewMath() *Math

NewMath returns a new Math object.

func (*Three) NewMatrix3

func (t *Three) NewMatrix3() *Matrix3

NewMatrix3 returns a new Matrix3 object.

func (*Three) NewMatrix4

func (t *Three) NewMatrix4() *Matrix4

NewMatrix4 returns a new Matrix4 object.

func (*Three) NewMesh

func (t *Three) NewMesh(geometry, material JSObject) *Mesh

NewMesh returns a new Mesh object.

geometry — an instance of geometry.
material — an instance of material (optional).

func (*Three) NewMeshBasicMaterial

func (t *Three) NewMeshBasicMaterial(parameters MeshBasicMaterialOpts) *MeshBasicMaterial

NewMeshBasicMaterial returns a new MeshBasicMaterial object.

func (*Three) NewMeshDepthMaterial

func (t *Three) NewMeshDepthMaterial(parameters MeshDepthMaterialOpts) *MeshDepthMaterial

NewMeshDepthMaterial returns a new MeshDepthMaterial object.

func (*Three) NewMeshLambertMaterial

func (t *Three) NewMeshLambertMaterial(parameters MeshLambertMaterialOpts) *MeshLambertMaterial

NewMeshLambertMaterial returns a new MeshLambertMaterial object.

func (*Three) NewMeshNormalMaterial

func (t *Three) NewMeshNormalMaterial(parameters MeshNormalMaterialOpts) *MeshNormalMaterial

NewMeshNormalMaterial returns a new MeshNormalMaterial object.

func (*Three) NewMeshPhongMaterial

func (t *Three) NewMeshPhongMaterial(parameters MeshPhongMaterialOpts) *MeshPhongMaterial

NewMeshPhongMaterial returns a new MeshPhongMaterial object.

func (*Three) NewMeshStandardMaterial

func (t *Three) NewMeshStandardMaterial(parameters MeshStandardMaterialOpts) *MeshStandardMaterial

NewMeshStandardMaterial returns a new MeshStandardMaterial object.

func (*Three) NewMorphBlendMesh

func (t *Three) NewMorphBlendMesh(geometry, material float64) *MorphBlendMesh

NewMorphBlendMesh returns a new MorphBlendMesh object.

func (*Three) NewMultiMaterial

func (t *Three) NewMultiMaterial(materials []*Material) *MultiMaterial

NewMultiMaterial returns a new MultiMaterial object.

func (*Three) NewNumberKeyframeTrack

func (t *Three) NewNumberKeyframeTrack(name, times, values, interpolation float64) *NumberKeyframeTrack

NewNumberKeyframeTrack returns a new NumberKeyframeTrack object.

func (*Three) NewObject3D

func (t *Three) NewObject3D() *Object3D

NewObject3D returns a new Object3D object.

func (*Three) NewObjectLoader

func (t *Three) NewObjectLoader(manager float64) *ObjectLoader

NewObjectLoader returns a new ObjectLoader object.

func (*Three) NewOctahedronGeometry

func (t *Three) NewOctahedronGeometry(radius, detail float64) *OctahedronGeometry

NewOctahedronGeometry returns a new OctahedronGeometry object.

radius — Default is 1.
detail — Default is 0. Setting this to a value greater than 0 adds more
    vertices making it no longer an icosahedron. When detail is greater
    than 1, it's effectively a sphere.

func (*Three) NewOrthographicCamera

func (t *Three) NewOrthographicCamera(left, right, top, bottom, near, far float64) *OrthographicCamera

NewOrthographicCamera returns a new OrthographicCamera object.

func (*Three) NewParametricGeometry

func (t *Three) NewParametricGeometry(fn func(u, v float64) *js.Object, slices, stacks int) *ParametricGeometry

NewParametricGeometry returns a new ParametricGeometry object.

fn — A function that takes in a u and v value each between 0 and 1 and returns a Vector3
slices — The count of slices to use for the parametric function
stacks — The count of stacks to use for the parametric function

func (*Three) NewPath

func (t *Three) NewPath(points *js.Object) *Path

NewPath returns a new Path object.

func (*Three) NewPerspectiveCamera

func (t *Three) NewPerspectiveCamera(fov, aspect, near, far float64) *PerspectiveCamera

NewPerspectiveCamera returns a new PerspectiveCamera object.

func (*Three) NewPlane

func (t *Three) NewPlane(normal, constant float64) *Plane

NewPlane returns a new Plane object.

func (*Three) NewPlaneBufferGeometry

func (t *Three) NewPlaneBufferGeometry(width, height, widthSegments, heightSegments float64) *PlaneBufferGeometry

NewPlaneBufferGeometry returns a new PlaneBufferGeometry object.

func (*Three) NewPlaneGeometry

func (t *Three) NewPlaneGeometry(width, height float64, widthSegments, heightSegments int) *PlaneGeometry

NewPlaneGeometry returns a new PlaneGeometry object.

width — Width along the X axis.
height — Height along the Y axis.
widthSegments — Optional. Default is 1.
heightSegments — Optional. Default is 1.

func (*Three) NewPointLight

func (t *Three) NewPointLight(color, intensity, distance, decay float64) *PointLight

NewPointLight returns a new PointLight object.

func (*Three) NewPointLightHelper

func (t *Three) NewPointLightHelper(light, sphereSize float64) *PointLightHelper

NewPointLightHelper returns a new PointLightHelper object.

func (*Three) NewPoints

func (t *Three) NewPoints(geometry, material *js.Object) *Points

NewPoints returns a new Points object.

geometry — an instance of geometry.
material — an instance of material (optional).

func (*Three) NewPointsMaterial

func (t *Three) NewPointsMaterial(parameters map[string]interface{}) *PointsMaterial

NewPointsMaterial returns a new PointsMaterial object.

parameters is an object with one or more properties defining the material's appearance:

color — Particle color in hexadecimal. Default is 0xffffff.
map — a texture.If defined, then a point has the data from texture as colors. Default is null.
size — Define size of particles. Default is 1.0.
sizeAttenuation — Enable/disable size attenuation with distance.
vertexColors — Define whether the material uses vertex colors, or not. Default is false.
fog — Define whether the material color is affected by global fog settings. Default is true.

func (*Three) NewPolyhedronGeometry

func (t *Three) NewPolyhedronGeometry(vertices []float64, indices []int, radius float64, detail int) *PolyhedronGeometry

NewPolyhedronGeometry returns a new PolyhedronGeometry object.

vertices — Array of points of the form [1,1,1, -1,-1,-1, ... ]
indices — Array of indices that make up the faces of the form [0,1,2, 2,3,0, ... ]
radius — Float - The radius of the final shape
detail — Integer - How many levels to subdivide the geometry. The more detail, the smoother the shape.

func (*Three) NewPositionalAudio

func (t *Three) NewPositionalAudio(listener float64) *PositionalAudio

NewPositionalAudio returns a new PositionalAudio object.

func (*Three) NewPropertyBinding

func (t *Three) NewPropertyBinding(rootNode, path, parsedPath float64) *PropertyBinding

NewPropertyBinding returns a new PropertyBinding object.

func (*Three) NewPropertyMixer

func (t *Three) NewPropertyMixer(binding, typName, valueSize float64) *PropertyMixer

NewPropertyMixer returns a new PropertyMixer object.

func (*Three) NewQuadraticBezierCurve

func (t *Three) NewQuadraticBezierCurve(v0, v1, v2 float64) *QuadraticBezierCurve

NewQuadraticBezierCurve returns a new QuadraticBezierCurve object.

func (*Three) NewQuaternion

func (t *Three) NewQuaternion(x, y, z, w float64) *Quaternion

NewQuaternion returns a new Quaternion object.

func (*Three) NewQuaternionKeyframeTrack

func (t *Three) NewQuaternionKeyframeTrack(name, times, values, interpolation float64) *QuaternionKeyframeTrack

NewQuaternionKeyframeTrack returns a new QuaternionKeyframeTrack object.

func (*Three) NewQuaternionLinearInterpolant

func (t *Three) NewQuaternionLinearInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer float64) *QuaternionLinearInterpolant

NewQuaternionLinearInterpolant returns a new QuaternionLinearInterpolant object.

func (*Three) NewRawShaderMaterial

func (t *Three) NewRawShaderMaterial(parameters float64) *RawShaderMaterial

NewRawShaderMaterial returns a new RawShaderMaterial object.

func (*Three) NewRay

func (t *Three) NewRay(origin, direction float64) *Ray

NewRay returns a new Ray object. Initialises the origin and direction properties to the provided values.

origin -- Vector3 The origin of the Ray.
direction -- Vector3 The direction of the Ray. This must be normalized (with Vector3.normalize) for the
methods to operate properly.

func (*Three) NewRaycaster

func (t *Three) NewRaycaster(origin, direction, near, far float64) *Raycaster

NewRaycaster returns a new Raycaster object.

func (*Three) NewRingBufferGeometry

func (t *Three) NewRingBufferGeometry(innerRadius, outerRadius, thetaSegments, phiSegments, thetaStart, thetaLength float64) *RingBufferGeometry

NewRingBufferGeometry returns a new RingBufferGeometry object.

innerRadius — Default is 0, but it doesn't work right when innerRadius is set to 0.
outerRadius — Default is 50.
thetaSegments — Number of segments. A higher number means the ring will be more round. Minimum is 3. Default is 8.
phiSegments — Minimum is 1. Default is 8.
thetaStart — Starting angle. Default is 0.
thetaLength — Central angle. Default is Math.PI * 2.

func (*Three) NewRingGeometry

func (t *Three) NewRingGeometry(innerRadius, outerRadius float64, thetaSegments, phiSegments int, thetaStart, thetaLength float64) *RingGeometry

NewRingGeometry returns a new RingGeometry object.

innerRadius — Default is 0, but it doesn't work right when innerRadius is set to 0.
outerRadius — Default is 50.
thetaSegments — Number of segments. A higher number means the ring will
    be more round. Minimum is 3. Default is 8.
phiSegments — Minimum is 1. Default is 8.
thetaStart — Starting angle. Default is 0.
thetaLength — Central angle. Default is Math.PI * 2.

func (*Three) NewScene

func (t *Three) NewScene() *Scene

NewScene returns a new Scene object.

http://threejs.org/docs/index.html#Reference/Scenes/Scene

func (*Three) NewSceneUtils

func (t *Three) NewSceneUtils() *SceneUtils

NewSceneUtils returns a new SceneUtils object.

func (*Three) NewShaderChunk

func (t *Three) NewShaderChunk() *ShaderChunk

NewShaderChunk returns a new ShaderChunk object.

func (*Three) NewShaderLib

func (t *Three) NewShaderLib() *ShaderLib

NewShaderLib returns a new ShaderLib object.

func (*Three) NewShaderMaterial

func (t *Three) NewShaderMaterial(parameters float64) *ShaderMaterial

NewShaderMaterial returns a new ShaderMaterial object.

parameters -- An object containing various parameters setting up shaders and their uniforms.

shading — Define shading type. Default is THREE.SmoothShading.
fog — Define whether the material color is affected by global fog settings. Default is true.
wireframe — render geometry as wireframe. Default is false.
wireframeLinewidth — Line thickness. Default is 1.
vertexColors — Define how the vertices gets colored. Default is THREE.NoColors.
skinning — Define whether the material uses skinning. Default is false.
morphTargets — Define whether the material uses morphTargets. Default is false.

func (*Three) NewShape

func (t *Three) NewShape() *Shape

NewShape returns a new Shape object.

func (*Three) NewShapeGeometry

func (t *Three) NewShapeGeometry(shapes, options float64) *ShapeGeometry

NewShapeGeometry returns a new ShapeGeometry object.

func (*Three) NewShapeUtils

func (t *Three) NewShapeUtils() *ShapeUtils

NewShapeUtils returns a new ShapeUtils object.

func (*Three) NewSkeleton

func (t *Three) NewSkeleton(bones, boneInverses []*js.Object, useVertexTexture bool) *Skeleton

NewSkeleton returns a new Skeleton object.

bones — The array of bones
boneInverses — (optional) An array of Matrix4s
useVertexTexture — (optional) Whether or not to use a vertex texture in the shader.

func (*Three) NewSkeletonHelper

func (t *Three) NewSkeletonHelper(object float64) *SkeletonHelper

NewSkeletonHelper returns a new SkeletonHelper object.

func (*Three) NewSkinnedMesh

func (t *Three) NewSkinnedMesh(geometry, material *js.Object, useVertexTexture bool) *SkinnedMesh

NewSkinnedMesh returns a new SkinnedMesh object.

geometry — An instance of Geometry. Geometry.skinIndices and Geometry.skinWeights should be set.
material — An instance of Material (optional).
useVertexTexture -- Defines whether a vertex texture can be used (optional).

func (*Three) NewSphere

func (t *Three) NewSphere(center, radius float64) *Sphere

NewSphere returns a new Sphere object.

center -- Vector3
radius -- Float

func (*Three) NewSphereBufferGeometry

func (t *Three) NewSphereBufferGeometry(radius, widthSegments, heightSegments, phiStart, phiLength, thetaStart, thetaLength float64) *SphereBufferGeometry

NewSphereBufferGeometry returns a new SphereBufferGeometry object.

radius — sphere radius. Default is 50.
widthSegments — number of horizontal segments. Minimum value is 3, and the default is 8.
heightSegments — number of vertical segments. Minimum value is 2, and the default is 6.
phiStart — specify horizontal starting angle. Default is 0.
phiLength — specify horizontal sweep angle size. Default is Math.PI * 2.
thetaStart — specify vertical starting angle. Default is 0.
thetaLength — specify vertical sweep angle size. Default is Math.PI.

func (*Three) NewSphereGeometry

func (t *Three) NewSphereGeometry(radius float64, widthSegments, heightSegments int, opts *SphereGeometryOpts) *SphereGeometry

NewSphereGeometry returns a new SphereGeometry object.

radius — sphere radius. Default is 50.
widthSegments — number of horizontal segments. Minimum value is 3, and the default is 8.
heightSegments — number of vertical segments. Minimum value is 2, and the default is 6.

func (*Three) NewSpherical

func (t *Three) NewSpherical(radius, phi, theta float64) *Spherical

NewSpherical returns a new Spherical object.

func (*Three) NewSpline

func (t *Three) NewSpline(points float64) *Spline

NewSpline returns a new Spline object.

func (*Three) NewSplineCurve

func (t *Three) NewSplineCurve(points float64) *SplineCurve

NewSplineCurve returns a new SplineCurve object.

func (*Three) NewSpotLight

func (t *Three) NewSpotLight(color, intensity, distance, angle, penumbra, decay float64) *SpotLight

NewSpotLight returns a new SpotLight object.

func (*Three) NewSpotLightHelper

func (t *Three) NewSpotLightHelper(light float64) *SpotLightHelper

NewSpotLightHelper returns a new SpotLightHelper object.

func (*Three) NewSprite

func (t *Three) NewSprite(material *js.Object) *Sprite

NewSprite returns a new Sprite object.

material — An instance of Material (optional).

func (*Three) NewSpriteMaterial

func (t *Three) NewSpriteMaterial(parameters map[string]interface{}) *SpriteMaterial

NewSpriteMaterial returns a new SpriteMaterial object.

parameters is an object defining the the default properties:

color - color of the sprite
map - the texture map
rotation - the rotation of the sprite
fog - whether or not to use the scene fog

func (*Three) NewSpritePlugin

func (t *Three) NewSpritePlugin(renderer, sprites float64) *SpritePlugin

NewSpritePlugin creates a new SpritePlugin object.

func (*Three) NewStereoCamera

func (t *Three) NewStereoCamera() *StereoCamera

NewStereoCamera returns a new StereoCamera object.

func (*Three) NewStringKeyframeTrack

func (t *Three) NewStringKeyframeTrack(name, times, values, interpolation float64) *StringKeyframeTrack

NewStringKeyframeTrack returns a new StringKeyframeTrack object.

func (*Three) NewTetrahedronGeometry

func (t *Three) NewTetrahedronGeometry(radius, detail float64) *TetrahedronGeometry

NewTetrahedronGeometry returns a new TetrahedronGeometry object.

radius — Radius of the tetrahedron. Default is 1.
detail — Default is 0. Setting this to a value greater than 0 adds vertices making it no longer a tetrahedron.

func (*Three) NewTextGeometry

func (t *Three) NewTextGeometry(text string, parameters map[string]interface{}) *TextGeometry

NewTextGeometry returns a new TextGeometry object.

text — The text to be shown.
parameters — Object that can contains the following parameters.  TODO.

func (*Three) NewTexture

func (t *Three) NewTexture(image *js.Object, opts *TextureOpts) *Texture

NewTexture returns a new Texture object.

func (*Three) NewTextureLoader

func (t *Three) NewTextureLoader() *TextureLoader

NewTextureLoader creates a new TextureLoader object.

manager — The loadingManager for the loader to use. Default is THREE.DefaultLoadingManager.

func (*Three) NewTorusBufferGeometry

func (t *Three) NewTorusBufferGeometry(radius, tube, radialSegments, tubularSegments, arc float64) *TorusBufferGeometry

NewTorusBufferGeometry returns a new TorusBufferGeometry object.

radius — Default is 100.
tube — Diameter of the tube. Default is 40.
radialSegments — Default is 8
tubularSegments — Default is 6.
arc — Central angle. Default is Math.PI * 2.

func (*Three) NewTorusGeometry

func (t *Three) NewTorusGeometry(radius, tube float64, radialSegments, tubularSegments int, arc float64) *TorusGeometry

NewTorusGeometry returns a new TorusGeometry object.

radius — Default is 100.
tube — Diameter of the tube. Default is 40.
radialSegments — Default is 8
tubularSegments — Default is 6.
arc — Central angle. Default is Math.PI * 2.

func (*Three) NewTorusKnotBufferGeometry

func (t *Three) NewTorusKnotBufferGeometry(radius, tube, tubularSegments, radialSegments, p, q float64) *TorusKnotBufferGeometry

NewTorusKnotBufferGeometry returns a new TorusKnotBufferGeometry object.

radius — Default is 100.
tube — Diameter of the tube. Default is 40.
tubularSegments — Default is 64.
radialSegments — Default is 8.
p — This value determines, how many times the geometry winds around its axis of rotational symmetry. Default is 2.
q — This value determines, how many times the geometry winds around a circle in the interior of the torus. Default is 3.

func (*Three) NewTorusKnotGeometry

func (t *Three) NewTorusKnotGeometry(radius, tube float64, tubularSegments, radialSegments int, p, q, heightScale float64) *TorusKnotGeometry

NewTorusKnotGeometry returns a new TorusKnotGeometry object.

radius — Default is 100.
tube — Default is 40.
radialSegments — Default is 64.
tubularSegments — Default is 8.
p — Default is 2.
q — Default is 3.
heightScale — Default is 1.

func (*Three) NewTriangle

func (t *Three) NewTriangle(a, b, c float64) *Triangle

NewTriangle returns a new Triangle object.

func (*Three) NewTubeGeometry

func (t *Three) NewTubeGeometry(path, segments, radius, radialSegments, closed, taper float64) *TubeGeometry

NewTubeGeometry returns a new TubeGeometry object.

path — Curve - A path that inherits from the Curve base class
segments — Integer - The number of segments that make up the tube, default is 64
radius — Float - The radius of the tube, default is 1
radiusSegments — Integer - The number of segments that make up the cross-section, default is 8
closed — Boolean Is the tube open or closed, default is false

func (*Three) NewUint16Attribute

func (t *Three) NewUint16Attribute(array []uint16, itemSize int) *Uint16Attribute

NewUint16Attribute returns a new Uint16Attribute object.

func (*Three) NewUint32Attribute

func (t *Three) NewUint32Attribute(array []uint32, itemSize int) *Uint32Attribute

NewUint32Attribute returns a new Uint32Attribute object.

func (*Three) NewUint8Attribute

func (t *Three) NewUint8Attribute(array []uint8, itemSize int) *Uint8Attribute

NewUint8Attribute returns a new Uint8Attribute object.

func (*Three) NewUint8ClampedAttribute

func (t *Three) NewUint8ClampedAttribute(array []uint8, itemSize int) *Uint8ClampedAttribute

NewUint8ClampedAttribute returns a new Uint8ClampedAttribute object.

func (*Three) NewUniform

func (t *Three) NewUniform(typ, value float64) *Uniform

NewUniform returns a new Uniform object.

func (*Three) NewUniformsLib

func (t *Three) NewUniformsLib() *UniformsLib

NewUniformsLib returns a new UniformsLib object.

func (*Three) NewUniformsUtils

func (t *Three) NewUniformsUtils() *UniformsUtils

NewUniformsUtils returns a new UniformsUtils object.

func (*Three) NewVector2

func (t *Three) NewVector2(x, y float64) *Vector2

NewVector2 returns a new Vector2 object.

func (*Three) NewVector3

func (t *Three) NewVector3(x, y, z float64) *Vector3

NewVector3 returns a new Vector3 object.

func (*Three) NewVector4

func (t *Three) NewVector4(x, y, z, w float64) *Vector4

NewVector4 returns a new Vector4 object.

x -- Float
y -- Float
z -- Float
w -- Float

func (*Three) NewVectorKeyframeTrack

func (t *Three) NewVectorKeyframeTrack(name, times, values, interpolation float64) *VectorKeyframeTrack

NewVectorKeyframeTrack returns a new VectorKeyframeTrack object.

func (*Three) NewVertexNormalsHelper

func (t *Three) NewVertexNormalsHelper(object, size, hex, linewidth float64) *VertexNormalsHelper

NewVertexNormalsHelper returns a new VertexNormalsHelper object.

object -- object for which to render vertex normals size -- size (length) of the arrows color -- color of
the arrows linewidth -- width of the arrow lines

func (*Three) NewVideoTexture

func (t *Three) NewVideoTexture(video, mapping, wrapS, wrapT, magFilter, minFilter, format, typ, anisotropy float64) *VideoTexture

NewVideoTexture returns a new VideoTexture object.

func (*Three) NewWebGLBufferRenderer

func (t *Three) NewWebGLBufferRenderer(_gl, extensions, _infoRender float64) *WebGLBufferRenderer

NewWebGLBufferRenderer returns a new WebGLBufferRenderer object.

func (*Three) NewWebGLCapabilities

func (t *Three) NewWebGLCapabilities(gl, extensions, parameters float64) *WebGLCapabilities

NewWebGLCapabilities returns a new WebGLCapabilities object.

func (*Three) NewWebGLExtensions

func (t *Three) NewWebGLExtensions(gl float64) *WebGLExtensions

NewWebGLExtensions returns a new WebGLExtensions object.

func (*Three) NewWebGLGeometries

func (t *Three) NewWebGLGeometries(gl, properties, info float64) *WebGLGeometries

NewWebGLGeometries returns a new WebGLGeometries object.

func (*Three) NewWebGLIndexedBufferRenderer

func (t *Three) NewWebGLIndexedBufferRenderer(_gl, extensions, _infoRender float64) *WebGLIndexedBufferRenderer

NewWebGLIndexedBufferRenderer returns a new WebGLIndexedBufferRenderer object.

func (*Three) NewWebGLLights

func (t *Three) NewWebGLLights() *WebGLLights

NewWebGLLights returns a new WebGLLights object.

func (*Three) NewWebGLObjects

func (t *Three) NewWebGLObjects(gl, properties, info float64) *WebGLObjects

NewWebGLObjects returns a new WebGLObjects object.

func (*Three) NewWebGLProgram

func (t *Three) NewWebGLProgram() *WebGLProgram

NewWebGLProgram returns a new WebGLProgram object.

func (*Three) NewWebGLPrograms

func (t *Three) NewWebGLPrograms(renderer, capabilities float64) *WebGLPrograms

NewWebGLPrograms returns a new WebGLPrograms object.

func (*Three) NewWebGLProperties

func (t *Three) NewWebGLProperties() *WebGLProperties

NewWebGLProperties returns a new WebGLProperties object.

func (*Three) NewWebGLRenderTarget

func (t *Three) NewWebGLRenderTarget(width, height, options float64) *WebGLRenderTarget

NewWebGLRenderTarget creates a new render target with a certain width and height.

width -- The width of the renderTarget.
height -- The height of the renderTarget.

options is an optional object that holds texture parameters for an auto-generated target texture and depthBuffer/stencilBuffer booleans. For an explanation of the texture parameters see Texture.

wrapS — Number default is THREE.ClampToEdgeWrapping.
wrapT — Number default is THREE.ClampToEdgeWrapping.
magFilter — Number, default is THREE.LinearFilter.
minFilter — Number, default is THREE.LinearFilter.
format — Number, default is THREE.RGBAFormat.
type — Number, default is THREE.UnsignedByteType.
anisotropy — Number, default is 1.
encoding — Number, default is THREE.LinearEncoding.
depthBuffer — Boolean, default is true. Set this to false if you don't need it.
stencilBuffer — Boolean, default is true. Set this to false if you don't need it.

func (*Three) NewWebGLRenderTargetCube

func (t *Three) NewWebGLRenderTargetCube(width, height, options float64) *WebGLRenderTargetCube

NewWebGLRenderTargetCube returns a new WebGLRenderTargetCube object.

width -- The width of the renderTarget.
height -- The height of the renderTarget.
options -- The options sets the properties of the render target.

func (*Three) NewWebGLRenderer

func (t *Three) NewWebGLRenderer(opts *WebGLRendererOpts) *WebGLRenderer

NewWebGLRenderer returns a new WebGLRenderer object.

func (*Three) NewWebGLShader

func (t *Three) NewWebGLShader() *WebGLShader

NewWebGLShader returns a new WebGLShader object.

func (*Three) NewWebGLShadowMap

func (t *Three) NewWebGLShadowMap(_renderer, _lights, _objects float64) *WebGLShadowMap

NewWebGLShadowMap returns a new WebGLShadowMap object.

func (*Three) NewWebGLState

func (t *Three) NewWebGLState(gl, extensions, paramThreeToGL float64) *WebGLState

NewWebGLState returns a new WebGLState object.

func (*Three) NewWireframeGeometry

func (t *Three) NewWireframeGeometry(geometry float64) *WireframeGeometry

NewWireframeGeometry returns a new WireframeGeometry object.

func (*Three) NewWireframeHelper

func (t *Three) NewWireframeHelper(object, hex float64) *WireframeHelper

NewWireframeHelper returns a new WireframeHelper object.

func (*Three) NewXHRLoader

func (t *Three) NewXHRLoader(manager float64) *XHRLoader

NewXHRLoader returns a new XHRLoader object.

func (*Three) NumberKeyframeTrack

func (t *Three) NumberKeyframeTrack() *NumberKeyframeTrack

NumberKeyframeTrack returns a NumberKeyframeTrack JavaScript class.

func (*Three) Object3D

func (t *Three) Object3D() *Object3D

Object3D returns an Object3D JavaScript class.

func (*Three) ObjectLoader

func (t *Three) ObjectLoader() *ObjectLoader

ObjectLoader returns an ObjectLoader JavaScript class.

func (*Three) OctahedronGeometry

func (t *Three) OctahedronGeometry() *OctahedronGeometry

OctahedronGeometry returns an OctahedronGeometry JavaScript class.

func (*Three) OrthographicCamera

func (t *Three) OrthographicCamera() *OrthographicCamera

OrthographicCamera returns an OrthographicCamera JavaScript class.

func (*Three) ParametricGeometry

func (t *Three) ParametricGeometry() *ParametricGeometry

ParametricGeometry returns a ParametricGeometry JavaScript class.

func (*Three) Path

func (t *Three) Path() *Path

Path returns a Path JavaScript class.

func (*Three) PerspectiveCamera

func (t *Three) PerspectiveCamera() *PerspectiveCamera

PerspectiveCamera returns a PerspectiveCamera JavaScript class.

func (*Three) Plane

func (t *Three) Plane() *Plane

Plane returns a Plane JavaScript class.

func (*Three) PlaneBufferGeometry

func (t *Three) PlaneBufferGeometry() *PlaneBufferGeometry

PlaneBufferGeometry returns a PlaneBufferGeometry JavaScript class.

func (*Three) PlaneGeometry

func (t *Three) PlaneGeometry() *PlaneGeometry

PlaneGeometry returns a PlaneGeometry JavaScript class.

func (*Three) PointLight

func (t *Three) PointLight() *PointLight

PointLight returns a PointLight JavaScript class.

func (*Three) PointLightHelper

func (t *Three) PointLightHelper() *PointLightHelper

PointLightHelper returns a PointLightHelper JavaScript class.

func (*Three) Points

func (t *Three) Points() *Points

Points returns a Points JavaScript class.

func (*Three) PointsMaterial

func (t *Three) PointsMaterial() *PointsMaterial

PointsMaterial returns a PointsMaterial JavaScript class.

func (*Three) PolyhedronGeometry

func (t *Three) PolyhedronGeometry() *PolyhedronGeometry

PolyhedronGeometry returns a PolyhedronGeometry JavaScript class.

func (*Three) PositionalAudio

func (t *Three) PositionalAudio() *PositionalAudio

PositionalAudio returns a PositionalAudio JavaScript class.

func (*Three) PropertyBinding

func (t *Three) PropertyBinding() *PropertyBinding

PropertyBinding returns a PropertyBinding JavaScript class.

func (*Three) PropertyMixer

func (t *Three) PropertyMixer() *PropertyMixer

PropertyMixer returns a PropertyMixer JavaScript class.

func (*Three) QuadraticBezierCurve

func (t *Three) QuadraticBezierCurve() *QuadraticBezierCurve

QuadraticBezierCurve returns a QuadraticBezierCurve JavaScript class.

func (*Three) Quaternion

func (t *Three) Quaternion() *Quaternion

Quaternion returns a Quaternion JavaScript class.

func (*Three) QuaternionKeyframeTrack

func (t *Three) QuaternionKeyframeTrack() *QuaternionKeyframeTrack

QuaternionKeyframeTrack returns a QuaternionKeyframeTrack JavaScript class.

func (*Three) QuaternionLinearInterpolant

func (t *Three) QuaternionLinearInterpolant() *QuaternionLinearInterpolant

QuaternionLinearInterpolant returns a QuaternionLinearInterpolant JavaScript class.

func (*Three) RawShaderMaterial

func (t *Three) RawShaderMaterial() *RawShaderMaterial

RawShaderMaterial returns a RawShaderMaterial JavaScript class.

func (*Three) Ray

func (t *Three) Ray() *Ray

Ray returns a Ray JavaScript class.

func (*Three) Raycaster

func (t *Three) Raycaster() *Raycaster

Raycaster returns a Raycaster JavaScript class.

func (*Three) RingBufferGeometry

func (t *Three) RingBufferGeometry() *RingBufferGeometry

RingBufferGeometry returns a RingBufferGeometry JavaScript class.

func (*Three) RingGeometry

func (t *Three) RingGeometry() *RingGeometry

RingGeometry returns a RingGeometry JavaScript class.

func (*Three) Scene

func (t *Three) Scene() *Scene

Scene returns a Scene JavaScript class.

func (*Three) SceneUtils

func (t *Three) SceneUtils() *SceneUtils

SceneUtils returns a SceneUtils JavaScript class.

func (*Three) ShaderChunk

func (t *Three) ShaderChunk() *ShaderChunk

ShaderChunk returns a ShaderChunk JavaScript class.

func (*Three) ShaderLib

func (t *Three) ShaderLib() *ShaderLib

ShaderLib returns a ShaderLib JavaScript class.

func (*Three) ShaderMaterial

func (t *Three) ShaderMaterial() *ShaderMaterial

ShaderMaterial returns a ShaderMaterial JavaScript class.

func (*Three) Shape

func (t *Three) Shape() *Shape

Shape returns a Shape JavaScript class.

func (*Three) ShapeGeometry

func (t *Three) ShapeGeometry() *ShapeGeometry

ShapeGeometry returns a ShapeGeometry JavaScript class.

func (*Three) ShapeUtils

func (t *Three) ShapeUtils() *ShapeUtils

ShapeUtils returns a ShapeUtils JavaScript class.

func (*Three) Skeleton

func (t *Three) Skeleton() *Skeleton

Skeleton returns a Skeleton JavaScript class.

func (*Three) SkeletonHelper

func (t *Three) SkeletonHelper() *SkeletonHelper

SkeletonHelper returns a SkeletonHelper JavaScript class.

func (*Three) SkinnedMesh

func (t *Three) SkinnedMesh() *SkinnedMesh

SkinnedMesh returns a SkinnedMesh JavaScript class.

func (*Three) Sphere

func (t *Three) Sphere() *Sphere

Sphere returns a Sphere JavaScript class.

func (*Three) SphereBufferGeometry

func (t *Three) SphereBufferGeometry() *SphereBufferGeometry

SphereBufferGeometry returns a SphereBufferGeometry JavaScript class.

func (*Three) SphereGeometry

func (t *Three) SphereGeometry() *SphereGeometry

SphereGeometry returns a SphereGeometry JavaScript class.

func (*Three) Spherical

func (t *Three) Spherical() *Spherical

Spherical returns a Spherical JavaScript class.

func (*Three) Spline

func (t *Three) Spline() *Spline

Spline returns a Spline JavaScript class.

func (*Three) SplineCurve

func (t *Three) SplineCurve() *SplineCurve

SplineCurve returns a SplineCurve JavaScript class.

func (*Three) SpotLight

func (t *Three) SpotLight() *SpotLight

SpotLight returns a SpotLight JavaScript class.

func (*Three) SpotLightHelper

func (t *Three) SpotLightHelper() *SpotLightHelper

SpotLightHelper returns a SpotLightHelper JavaScript class.

func (*Three) Sprite

func (t *Three) Sprite() *Sprite

Sprite returns a Sprite JavaScript class.

func (*Three) SpriteMaterial

func (t *Three) SpriteMaterial() *SpriteMaterial

SpriteMaterial returns a SpriteMaterial JavaScript class.

func (*Three) SpritePlugin

func (t *Three) SpritePlugin() *SpritePlugin

SpritePlugin returns a SpritePlugin JavaScript class.

func (*Three) StereoCamera

func (t *Three) StereoCamera() *StereoCamera

StereoCamera returns a StereoCamera JavaScript class.

func (*Three) StringKeyframeTrack

func (t *Three) StringKeyframeTrack() *StringKeyframeTrack

StringKeyframeTrack returns a StringKeyframeTrack JavaScript class.

func (*Three) TetrahedronGeometry

func (t *Three) TetrahedronGeometry() *TetrahedronGeometry

TetrahedronGeometry returns a TetrahedronGeometry JavaScript class.

func (*Three) TextGeometry

func (t *Three) TextGeometry() *TextGeometry

TextGeometry returns a TextGeometry JavaScript class.

func (*Three) Texture

func (t *Three) Texture() *Texture

Texture returns a Texture JavaScript class.

func (*Three) TextureLoader

func (t *Three) TextureLoader() *TextureLoader

TextureLoader returns a TextureLoader JavaScript class.

func (*Three) TorusBufferGeometry

func (t *Three) TorusBufferGeometry() *TorusBufferGeometry

TorusBufferGeometry returns a TorusBufferGeometry JavaScript class.

func (*Three) TorusGeometry

func (t *Three) TorusGeometry() *TorusGeometry

TorusGeometry returns a TorusGeometry JavaScript class.

func (*Three) TorusKnotBufferGeometry

func (t *Three) TorusKnotBufferGeometry() *TorusKnotBufferGeometry

TorusKnotBufferGeometry returns a TorusKnotBufferGeometry JavaScript class.

func (*Three) TorusKnotGeometry

func (t *Three) TorusKnotGeometry() *TorusKnotGeometry

TorusKnotGeometry returns a TorusKnotGeometry JavaScript class.

func (*Three) Triangle

func (t *Three) Triangle() *Triangle

Triangle returns a Triangle JavaScript class.

func (*Three) TubeGeometry

func (t *Three) TubeGeometry() *TubeGeometry

TubeGeometry returns a TubeGeometry JavaScript class.

func (*Three) Uint16Attribute

func (t *Three) Uint16Attribute() *Uint16Attribute

Uint16Attribute returns an Uint16Attribute object.

func (*Three) Uint32Attribute

func (t *Three) Uint32Attribute() *Uint32Attribute

Uint32Attribute returns an Uint32Attribute object.

func (*Three) Uint8Attribute

func (t *Three) Uint8Attribute() *Uint8Attribute

Uint8Attribute returns an Uint8Attribute object.

func (*Three) Uint8ClampedAttribute

func (t *Three) Uint8ClampedAttribute() *Uint8ClampedAttribute

Uint8ClampedAttribute returns an Uint8ClampedAttribute object.

func (*Three) Uniform

func (t *Three) Uniform() *Uniform

Uniform returns an Uniform JavaScript class.

func (*Three) UniformsLib

func (t *Three) UniformsLib() *UniformsLib

UniformsLib returns an UniformsLib JavaScript class.

func (*Three) UniformsUtils

func (t *Three) UniformsUtils() *UniformsUtils

UniformsUtils returns an UniformsUtils JavaScript class.

func (*Three) Vector2

func (t *Three) Vector2() *Vector2

Vector2 returns a Vector2 JavaScript class.

func (*Three) Vector3

func (t *Three) Vector3() *Vector3

Vector3 returns a Vector3 JavaScript class.

func (*Three) Vector4

func (t *Three) Vector4() *Vector4

Vector4 returns a Vector4 JavaScript class.

func (*Three) VectorKeyframeTrack

func (t *Three) VectorKeyframeTrack() *VectorKeyframeTrack

VectorKeyframeTrack returns a VectorKeyframeTrack JavaScript class.

func (*Three) VertexNormalsHelper

func (t *Three) VertexNormalsHelper() *VertexNormalsHelper

VertexNormalsHelper returns a VertexNormalsHelper JavaScript class.

func (*Three) VideoTexture

func (t *Three) VideoTexture() *VideoTexture

VideoTexture returns a VideoTexture JavaScript class.

func (*Three) WebGLBufferRenderer

func (t *Three) WebGLBufferRenderer() *WebGLBufferRenderer

WebGLBufferRenderer returns a WebGLBufferRenderer JavaScript class.

func (*Three) WebGLCapabilities

func (t *Three) WebGLCapabilities() *WebGLCapabilities

WebGLCapabilities returns a WebGLCapabilities JavaScript class.

func (*Three) WebGLExtensions

func (t *Three) WebGLExtensions() *WebGLExtensions

WebGLExtensions returns a WebGLExtensions JavaScript class.

func (*Three) WebGLGeometries

func (t *Three) WebGLGeometries() *WebGLGeometries

WebGLGeometries returns a WebGLGeometries JavaScript class.

func (*Three) WebGLIndexedBufferRenderer

func (t *Three) WebGLIndexedBufferRenderer() *WebGLIndexedBufferRenderer

WebGLIndexedBufferRenderer returns a WebGLIndexedBufferRenderer JavaScript class.

func (*Three) WebGLLights

func (t *Three) WebGLLights() *WebGLLights

WebGLLights returns a WebGLLights JavaScript class.

func (*Three) WebGLObjects

func (t *Three) WebGLObjects() *WebGLObjects

WebGLObjects returns a WebGLObjects JavaScript class.

func (*Three) WebGLProgram

func (t *Three) WebGLProgram() *WebGLProgram

WebGLProgram returns a WebGLProgram JavaScript class.

func (*Three) WebGLPrograms

func (t *Three) WebGLPrograms() *WebGLPrograms

WebGLPrograms returns a WebGLPrograms JavaScript class.

func (*Three) WebGLProperties

func (t *Three) WebGLProperties() *WebGLProperties

WebGLProperties returns a WebGLProperties JavaScript class.

func (*Three) WebGLRenderTarget

func (t *Three) WebGLRenderTarget() *WebGLRenderTarget

WebGLRenderTarget returns a WebGLRenderTarget JavaScript class.

func (*Three) WebGLRenderTargetCube

func (t *Three) WebGLRenderTargetCube() *WebGLRenderTargetCube

WebGLRenderTargetCube returns a WebGLRenderTargetCube JavaScript class.

func (*Three) WebGLRenderer

func (t *Three) WebGLRenderer() *WebGLRenderer

WebGLRenderer returns a WebGLRenderer JavaScript class.

func (*Three) WebGLShader

func (t *Three) WebGLShader() *WebGLShader

WebGLShader returns a WebGLShader JavaScript class.

func (*Three) WebGLShadowMap

func (t *Three) WebGLShadowMap() *WebGLShadowMap

WebGLShadowMap returns a WebGLShadowMap JavaScript class.

func (*Three) WebGLState

func (t *Three) WebGLState() *WebGLState

WebGLState returns a WebGLState JavaScript class.

func (*Three) WireframeGeometry

func (t *Three) WireframeGeometry() *WireframeGeometry

WireframeGeometry returns a WireframeGeometry JavaScript class.

func (*Three) WireframeHelper

func (t *Three) WireframeHelper() *WireframeHelper

WireframeHelper returns a WireframeHelper JavaScript class.

func (*Three) XHRLoader

func (t *Three) XHRLoader() *XHRLoader

XHRLoader returns a XHRLoader JavaScript class.

type TorusBufferGeometry

type TorusBufferGeometry struct {
	// contains filtered or unexported fields
}

TorusBufferGeometry represents a torusbuffergeometry.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/TorusBufferGeometry

func TorusBufferGeometryFromJSObject

func TorusBufferGeometryFromJSObject(p *js.Object) *TorusBufferGeometry

TorusBufferGeometryFromJSObject returns a wrapped TorusBufferGeometry JavaScript class.

func (*TorusBufferGeometry) JSObject

func (t *TorusBufferGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type TorusGeometry

type TorusGeometry struct {
	// contains filtered or unexported fields
}

TorusGeometry represents a torus.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/TorusGeometry

func TorusGeometryFromJSObject

func TorusGeometryFromJSObject(p *js.Object) *TorusGeometry

TorusGeometryFromJSObject returns a wrapped TorusGeometry JavaScript class.

func (*TorusGeometry) JSObject

func (t *TorusGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type TorusKnotBufferGeometry

type TorusKnotBufferGeometry struct {
	// contains filtered or unexported fields
}

TorusKnotBufferGeometry is the BufferGeometry port of TorusKnotGeometry.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/TorusKnotBufferGeometry

func TorusKnotBufferGeometryFromJSObject

func TorusKnotBufferGeometryFromJSObject(p *js.Object) *TorusKnotBufferGeometry

TorusKnotBufferGeometryFromJSObject returns a wrapped TorusKnotBufferGeometry JavaScript class.

func (*TorusKnotBufferGeometry) JSObject

func (t *TorusKnotBufferGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type TorusKnotGeometry

type TorusKnotGeometry struct {
	// contains filtered or unexported fields
}

TorusKnotGeometry creates a torus knot, the particular shape of which is defined by a pair of coprime integers, p and q. If p and q are not coprime, the result will be a torus link.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/TorusKnotGeometry

func TorusKnotGeometryFromJSObject

func TorusKnotGeometryFromJSObject(p *js.Object) *TorusKnotGeometry

TorusKnotGeometryFromJSObject returns a wrapped TorusKnotGeometry JavaScript class.

func (*TorusKnotGeometry) JSObject

func (t *TorusKnotGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Triangle

type Triangle struct {
	// contains filtered or unexported fields
}

Triangle is a geometric triangle as defined by three vectors.

http://threejs.org/docs/index.html#Reference/Math/Triangle

func TriangleFromJSObject

func TriangleFromJSObject(p *js.Object) *Triangle

TriangleFromJSObject returns a wrapped Triangle JavaScript class.

func (*Triangle) Area

func (t *Triangle) Area() *Triangle

Area returns the area of the triangle.

func (*Triangle) BarycoordFromPoint

func (t *Triangle) BarycoordFromPoint(point, optionalTarget float64) *Triangle

BarycoordFromPoint returns a barycentric coordinate from the given vector.

point -- Vector3
optionalTarget -- Optional Vector3 target to set the result.

http://commons.wikimedia.org/wiki/File:Barycentric_coordinates_1.png (An image of barycentric coordinates)

func (*Triangle) Clone

func (t *Triangle) Clone() *Triangle

Clone returns a new copy of this triangle.

func (*Triangle) ContainsPoint

func (t *Triangle) ContainsPoint(point float64) *Triangle

ContainsPoint checks to see if the passed vector is within the triangle.

point -- Vector3

func (*Triangle) Copy

func (t *Triangle) Copy(triangle *Triangle) *Triangle

Copy copies the values of the vertices of the passed triangle to this triangle.

triangle -- Triangle

func (*Triangle) Equals

func (t *Triangle) Equals(triangle float64) *Triangle

Equals checks to see if two triangles are equal (share the same vectors).

triangle -- Triangle

func (*Triangle) JSObject

func (t *Triangle) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Triangle) Midpoint

func (t *Triangle) Midpoint(optionalTarget float64) *Triangle

Midpoint returns the midpoint of the triangle. Optionally sets a target vector.

optionalTarget -- Optional Vector3 target to set the result.

func (*Triangle) Normal

func (t *Triangle) Normal(optionalTarget float64) *Triangle

Normal returns the calculated normal of the triangle.

optionalTarget -- Optional Vector3 target to set the result.

func (*Triangle) Plane

func (t *Triangle) Plane(optionalTarget float64) *Triangle

Plane returns a plane based on the triangle. Optionally sets a target plane.

optionalTarget -- Optional Plane target to set the result.

func (*Triangle) Set

func (t *Triangle) Set(a, b, c float64) *Triangle

Set sets the triangle's vectors to the passed vectors.

a -- Vector3
b -- Vector3
c -- Vector3

func (*Triangle) SetFromPointsAndIndices

func (t *Triangle) SetFromPointsAndIndices(points, i0, i1, i2 float64) *Triangle

SetFromPointsAndIndices sets the triangle's vectors to the vectors in the array.

points -- Array of Vector3s
i0 -- Integer index
i1 -- Integer index
i2 -- Integer index

type TubeGeometry

type TubeGeometry struct {
	// contains filtered or unexported fields
}

TubeGeometry creates a tube that extrudes along a three-dimensional curve.

http://threejs.org/docs/index.html#Reference/Extras.Geometries/TubeGeometry

func TubeGeometryFromJSObject

func TubeGeometryFromJSObject(p *js.Object) *TubeGeometry

TubeGeometryFromJSObject returns a wrapped TubeGeometry JavaScript class.

func (*TubeGeometry) JSObject

func (t *TubeGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type Uint16Attribute

type Uint16Attribute struct {
	// contains filtered or unexported fields
}

Uint16Attribute represents an uint16attribute.

type Uint32Attribute

type Uint32Attribute struct {
	// contains filtered or unexported fields
}

Uint32Attribute represents an uint32attribute.

type Uint8Attribute

type Uint8Attribute struct {
	// contains filtered or unexported fields
}

Uint8Attribute represents an uint8attribute.

type Uint8ClampedAttribute

type Uint8ClampedAttribute struct {
	// contains filtered or unexported fields
}

Uint8ClampedAttribute represents an uint8clampedattribute.

type Uniform

type Uniform struct {
	// contains filtered or unexported fields
}

Uniform represents an uniform.

func UniformFromJSObject

func UniformFromJSObject(p *js.Object) *Uniform

UniformFromJSObject returns a wrapped Uniform JavaScript class.

func (*Uniform) JSObject

func (u *Uniform) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Uniform) OnUpdate

func (u *Uniform) OnUpdate(callback float64) *Uniform

OnUpdate TODO description.

type UniformsLib

type UniformsLib struct {
	// contains filtered or unexported fields
}

UniformsLib is a library for shared webgl shaders.

http://threejs.org/docs/index.html#Reference/Renderers.Shaders/UniformsLib

func UniformsLibFromJSObject

func UniformsLibFromJSObject(p *js.Object) *UniformsLib

UniformsLibFromJSObject returns a wrapped UniformsLib JavaScript class.

func (*UniformsLib) JSObject

func (u *UniformsLib) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type UniformsUtils

type UniformsUtils struct {
	// contains filtered or unexported fields
}

UniformsUtils support the merging and cloning of uniform variables.

http://threejs.org/docs/index.html#Reference/Renderers.Shaders/UniformsUtils

func UniformsUtilsFromJSObject

func UniformsUtilsFromJSObject(p *js.Object) *UniformsUtils

UniformsUtilsFromJSObject returns a wrapped UniformsUtils JavaScript class.

func (*UniformsUtils) Clone

func (u *UniformsUtils) Clone(uniformsSrc JSObject) *UniformsUtils

Clone TODO description.

func (*UniformsUtils) JSObject

func (u *UniformsUtils) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*UniformsUtils) Merge

func (u *UniformsUtils) Merge(uniforms float64) *UniformsUtils

Merge TODO description.

type Vector2

type Vector2 struct {
	// contains filtered or unexported fields
}

Vector2 represents a two-dimensional vector.

http://threejs.org/docs/index.html#Reference/Math/Vector2

func Vector2FromJSObject

func Vector2FromJSObject(p *js.Object) *Vector2

Vector2FromJSObject returns a wrapped Vector2 JavaScript class.

func (*Vector2) Add

func (v *Vector2) Add(src *Vector2) *Vector2

Add adds the src vector to v.

func (*Vector2) AddScalar

func (v *Vector2) AddScalar(s float64) *Vector2

AddScalar adds s to the components of v.

func (*Vector2) AddScaledVector

func (v *Vector2) AddScaledVector(src *Vector2, s float64) *Vector2

AddScaledVector adds scaled vector src to v.

func (*Vector2) AddVectors

func (v *Vector2) AddVectors(a, b *Vector2) *Vector2

AddVectors adds vectors a and b and stores the result in v.

func (*Vector2) Angle

func (v *Vector2) Angle() float64

Angle returns the angle in radians with respect to the positive X-axis.

func (*Vector2) Ceil

func (v *Vector2) Ceil() *Vector2

Ceil calls ceil on the components of v.

func (*Vector2) Clamp

func (v *Vector2) Clamp(min, max *Vector2) *Vector2

Clamp clamps the components of v between min and max.

Note that the min components must be less than the max components or this function will not operate correctly.

func (*Vector2) ClampLength

func (v *Vector2) ClampLength(min, max float64) *Vector2

ClampLength clamps length of v between min and max.

func (*Vector2) ClampScalar

func (v *Vector2) ClampScalar() *Vector2

ClampScalar TODO description.

func (*Vector2) Clone

func (v *Vector2) Clone() *Vector2

Clone TODO description.

func (*Vector2) Copy

func (v *Vector2) Copy(src *Vector2) *Vector2

Copy copies the src vector to v.

func (*Vector2) DistanceTo

func (v *Vector2) DistanceTo(src *Vector2) float64

DistanceTo returns the distance from v to src.

func (*Vector2) DistanceToSquared

func (v *Vector2) DistanceToSquared(src *Vector2) float64

DistanceToSquared returns the squared distance from v to src.

func (*Vector2) Divide

func (v *Vector2) Divide(src *Vector2) *Vector2

Divide divides vector v by the src vector.

func (*Vector2) DivideScalar

func (v *Vector2) DivideScalar(scalar float64) *Vector2

DivideScalar divides the components of v by scalar.

func (*Vector2) Dot

func (v *Vector2) Dot(src *Vector2) float64

Dot returns the dot product of (v*src)

func (*Vector2) Equals

func (v *Vector2) Equals(src *Vector2) bool

Equals compares v to src and returns true if equal.

func (*Vector2) Floor

func (v *Vector2) Floor() *Vector2

Floor calls floor on the components of v.

func (*Vector2) FromArray

func (v *Vector2) FromArray(array []float64, offset float64) *Vector2

FromArray sets v to the offset component of array.

func (*Vector2) FromAttribute

func (v *Vector2) FromAttribute(attribute, index, offset float64) *Vector2

FromAttribute TODO description.

func (*Vector2) GetComponent

func (v *Vector2) GetComponent(index int) float64

GetComponent returns the indexed component of the vector.

func (*Vector2) Height

func (v *Vector2) Height() float64

Height returns the height-component of the Vector2.

func (*Vector2) JSObject

func (v *Vector2) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Vector2) Length

func (v *Vector2) Length() *Vector2

Length returns the length of v.

func (*Vector2) LengthManhattan

func (v *Vector2) LengthManhattan() *Vector2

LengthManhattan returns the manhattan length of v.

func (*Vector2) LengthSq

func (v *Vector2) LengthSq() *Vector2

LengthSq returns the length of v squared.

func (*Vector2) Lerp

func (v *Vector2) Lerp(src *Vector2, alpha float64) *Vector2

Lerp linearly interpolates between v and src by alpha.

alpha = 0 returns v unmodified. alpha = 1 returns v set to src.

func (*Vector2) LerpVectors

func (v *Vector2) LerpVectors(v1, v2 *Vector2, alpha float64) *Vector2

LerpVectors linearly interpolates between v1 and v2 by alpha.

alpha = 0 sets v to v1. alpha = 1 sets v to v2.

func (*Vector2) Max

func (v *Vector2) Max(src *Vector2) *Vector2

Max sets the components of v to the max of v and src.

func (*Vector2) Min

func (v *Vector2) Min(src *Vector2) *Vector2

Min sets the components of v to the min of v and src.

func (*Vector2) Multiply

func (v *Vector2) Multiply(src *Vector2) *Vector2

Multiply multiplies vector v by the src vector.

func (*Vector2) MultiplyScalar

func (v *Vector2) MultiplyScalar(scalar float64) *Vector2

MultiplyScalar multiplies the components of v by scalar.

func (*Vector2) Negate

func (v *Vector2) Negate() *Vector2

Negate negates the components of v.

func (*Vector2) Normalize

func (v *Vector2) Normalize() *Vector2

Normalize normalizes v to unit length.

func (*Vector2) RotateAround

func (v *Vector2) RotateAround(center *Vector2, angle float64) *Vector2

RotateAround rotates v around center by angle radians.

func (*Vector2) Round

func (v *Vector2) Round() *Vector2

Round rounds the components of v.

func (*Vector2) RoundToZero

func (v *Vector2) RoundToZero() *Vector2

RoundToZero rounds the components of v to zero.

func (*Vector2) Set

func (v *Vector2) Set(x, y float64) *Vector2

Set sets the vector values.

func (*Vector2) SetComponent

func (v *Vector2) SetComponent(index int, value float64) *Vector2

SetComponent sets the indexed component of the vector.

func (*Vector2) SetHeight

func (v *Vector2) SetHeight(value float64) *Vector2

SetHeight sets the height-component of the Vector2.

func (*Vector2) SetLength

func (v *Vector2) SetLength(length float64) *Vector2

SetLength sets the length of v.

func (*Vector2) SetScalar

func (v *Vector2) SetScalar(scalar float64) *Vector2

SetScalar sets all components of v to scalar.

func (*Vector2) SetWidth

func (v *Vector2) SetWidth(value float64) *Vector2

SetWidth sets the width-component of the Vector2.

func (*Vector2) SetX

func (v *Vector2) SetX(x float64) *Vector2

SetX sets the X component of the vector.

func (*Vector2) SetY

func (v *Vector2) SetY(y float64) *Vector2

SetY sets the Y component of the vector.

func (*Vector2) Sub

func (v *Vector2) Sub(src *Vector2) *Vector2

Sub subtracts src from v and stores the result in v.

func (*Vector2) SubScalar

func (v *Vector2) SubScalar(s float64) *Vector2

SubScalar subtracts s from the components of v.

func (*Vector2) SubVectors

func (v *Vector2) SubVectors(a, b *Vector2) *Vector2

SubVectors subtracts b from a and stores the result in v.

func (*Vector2) Width

func (v *Vector2) Width() float64

Width returns the width-component of the Vector2.

type Vector3

type Vector3 struct {
	// contains filtered or unexported fields
}

Vector3 represents a three-dimensional vector.

http://threejs.org/docs/index.html#Reference/Math/Vector3

func Vector3FromJSObject

func Vector3FromJSObject(p *js.Object) *Vector3

Vector3FromJSObject returns a wrapped Vector3 JavaScript class.

func (*Vector3) Add

func (v *Vector3) Add(src *Vector3) *Vector3

Add adds the src vector to v.

func (*Vector3) AddScalar

func (v *Vector3) AddScalar(s float64) *Vector3

AddScalar adds scalar to the components of v.

func (*Vector3) AddScaledVector

func (v *Vector3) AddScaledVector(src *Vector3, s float64) *Vector3

AddScaledVector adds scaled vector src to v.

func (*Vector3) AddVectors

func (v *Vector3) AddVectors(a, b *Vector3) *Vector3

AddVectors adds the two vectors and stores the result in v.

func (*Vector3) AngleTo

func (v *Vector3) AngleTo(src *Vector3) float64

AngleTo TODO description.

func (*Vector3) ApplyAxisAngle

func (v *Vector3) ApplyAxisAngle() *Vector3

ApplyAxisAngle TODO description.

func (*Vector3) ApplyEuler

func (v *Vector3) ApplyEuler(euler *Euler) *Vector3

ApplyEuler applies euler transform to this vector by converting the Euler object to a Quaternion and applying.

func (*Vector3) ApplyMatrix3

func (v *Vector3) ApplyMatrix3(m *Matrix3) *Vector3

ApplyMatrix3 multiplies m by v and stores the result in v.

func (*Vector3) ApplyMatrix4

func (v *Vector3) ApplyMatrix4(m *Matrix4) *Vector3

ApplyMatrix4 multiplies m by v and stores the result in v.

func (*Vector3) ApplyProjection

func (v *Vector3) ApplyProjection(m *Matrix4) *Vector3

ApplyProjection applies the projection matrix m to v and stores the result in v.

func (*Vector3) ApplyQuaternion

func (v *Vector3) ApplyQuaternion(q *Quaternion) *Vector3

ApplyQuaternion applies the quaternion q to v and stores the result in v.

func (*Vector3) Ceil

func (v *Vector3) Ceil() *Vector3

Ceil calls ceil on the components of v.

func (*Vector3) Clamp

func (v *Vector3) Clamp(min, max *Vector3) *Vector3

Clamp clamps the components of v between min and max.

Note that the min components must be less than the max components or this function will not operate correctly.

func (*Vector3) ClampLength

func (v *Vector3) ClampLength(min, max float64) *Vector3

ClampLength clamps length of v between min and max.

func (*Vector3) ClampScalar

func (v *Vector3) ClampScalar() *Vector3

ClampScalar TODO description.

func (*Vector3) Clone

func (v *Vector3) Clone() *Vector3

Clone TODO description.

func (*Vector3) Copy

func (v *Vector3) Copy(src *Vector3) *Vector3

Copy copies the src vector to v.

func (*Vector3) Cross

func (v *Vector3) Cross(src *Vector3) *Vector3

Cross TODO description.

func (*Vector3) CrossVectors

func (v *Vector3) CrossVectors(a, b *Vector3) *Vector3

CrossVectors TODO description.

func (*Vector3) DistanceTo

func (v *Vector3) DistanceTo(src *Vector3) float64

DistanceTo TODO description.

func (*Vector3) DistanceToSquared

func (v *Vector3) DistanceToSquared(src *Vector3) float64

DistanceToSquared TODO description.

func (*Vector3) Divide

func (v *Vector3) Divide(src *Vector3) *Vector3

Divide divides vector v by the src vector.

func (*Vector3) DivideScalar

func (v *Vector3) DivideScalar(scalar float64) *Vector3

DivideScalar divides the components of v by scalar.

func (*Vector3) Dot

func (v *Vector3) Dot(src *Vector3) float64

Dot returns the dot product of (v*src)

func (*Vector3) Equals

func (v *Vector3) Equals(src *Vector3) bool

Equals compares v to src and returns true if equal.

func (*Vector3) Floor

func (v *Vector3) Floor() *Vector3

Floor calls floor on the components of v.

func (*Vector3) FromArray

func (v *Vector3) FromArray(array []float64, offset int) *Vector3

FromArray sets v to the offset component of array.

func (*Vector3) FromAttribute

func (v *Vector3) FromAttribute(attribute, index, offset float64) *Vector3

FromAttribute TODO description.

func (*Vector3) GetComponent

func (v *Vector3) GetComponent(index int) *Vector3

GetComponent returns the indexed component of the vector.

func (*Vector3) JSObject

func (v *Vector3) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Vector3) Length

func (v *Vector3) Length() float64

Length returns the length of v.

func (*Vector3) LengthManhattan

func (v *Vector3) LengthManhattan() float64

LengthManhattan returns the manhattan length of v.

func (*Vector3) LengthSq

func (v *Vector3) LengthSq() float64

LengthSq returns the length of v squared.

func (*Vector3) Lerp

func (v *Vector3) Lerp(src *Vector3, alpha float64) *Vector3

Lerp linearly interpolates between v and src by alpha.

alpha = 0 returns v unmodified. alpha = 1 returns v set to src.

func (*Vector3) LerpVectors

func (v *Vector3) LerpVectors(v1, v2 *Vector3, alpha float64) *Vector3

LerpVectors linearly interpolates between v1 and v2 by alpha.

alpha = 0 sets v to v1. alpha = 1 sets v to v2.

func (*Vector3) Max

func (v *Vector3) Max(src *Vector3) *Vector3

Max sets the components of v to the max of v and src.

func (*Vector3) Min

func (v *Vector3) Min(src *Vector3) *Vector3

Min sets the components of v to the min of v and src.

func (*Vector3) Multiply

func (v *Vector3) Multiply(src *Vector3) *Vector3

Multiply multiplies vector v by the src vector.

func (*Vector3) MultiplyScalar

func (v *Vector3) MultiplyScalar(scalar float64) *Vector3

MultiplyScalar multiplies the components of v by scalar.

func (*Vector3) MultiplyVectors

func (v *Vector3) MultiplyVectors(a, b *Vector3) *Vector3

MultiplyVectors multiplies a by b and stores the result in v.

func (*Vector3) Negate

func (v *Vector3) Negate() *Vector3

Negate negates the components of v.

func (*Vector3) Normalize

func (v *Vector3) Normalize() *Vector3

Normalize normalizes v to unit length.

func (*Vector3) Project

func (v *Vector3) Project() *Vector3

Project TODO description.

func (*Vector3) ProjectOnPlane

func (v *Vector3) ProjectOnPlane() *Vector3

ProjectOnPlane TODO description.

func (*Vector3) ProjectOnVector

func (v *Vector3) ProjectOnVector() *Vector3

ProjectOnVector TODO description.

func (*Vector3) Reflect

func (v *Vector3) Reflect() *Vector3

Reflect TODO description.

func (*Vector3) Round

func (v *Vector3) Round() *Vector3

Round rounds the components of v.

func (*Vector3) RoundToZero

func (v *Vector3) RoundToZero() *Vector3

RoundToZero rounds the components of v to zero.

func (*Vector3) Set

func (v *Vector3) Set(x, y, z float64) *Vector3

Set sets the vector values.

func (*Vector3) SetComponent

func (v *Vector3) SetComponent(index int, value float64) *Vector3

SetComponent sets the indexed component of the vector.

func (*Vector3) SetFromMatrixColumn

func (v *Vector3) SetFromMatrixColumn(m *Matrix3, index int) *Vector3

SetFromMatrixColumn TODO description.

func (*Vector3) SetFromMatrixPosition

func (v *Vector3) SetFromMatrixPosition(m *Matrix3) *Vector3

SetFromMatrixPosition TODO description.

func (*Vector3) SetFromMatrixScale

func (v *Vector3) SetFromMatrixScale(m *Matrix3) *Vector3

SetFromMatrixScale TODO description.

func (*Vector3) SetFromSpherical

func (v *Vector3) SetFromSpherical(s float64) *Vector3

SetFromSpherical TODO description.

func (*Vector3) SetLength

func (v *Vector3) SetLength(length float64) *Vector3

SetLength sets the length of v.

func (*Vector3) SetScalar

func (v *Vector3) SetScalar(scalar float64) *Vector3

SetScalar sets all components of v to scalar.

func (*Vector3) SetX

func (v *Vector3) SetX(x float64) *Vector3

SetX sets the X component of the vector.

func (*Vector3) SetY

func (v *Vector3) SetY(y float64) *Vector3

SetY sets the Y component of the vector.

func (*Vector3) SetZ

func (v *Vector3) SetZ(z float64) *Vector3

SetZ sets the Z component of the vector.

func (*Vector3) Sub

func (v *Vector3) Sub(src *Vector3) *Vector3

Sub subtracts src from v and stores the result in v.

func (*Vector3) SubScalar

func (v *Vector3) SubScalar(s float64) *Vector3

SubScalar subtracts scalar from the components of v.

func (*Vector3) SubVectors

func (v *Vector3) SubVectors(a, b *Vector3) *Vector3

SubVectors subtracts the two vectors and stores the result in v.

func (*Vector3) ToArray

func (v *Vector3) ToArray(array []float64, offset int) *Vector3

ToArray sets the offset components of array from v.

func (*Vector3) TransformDirection

func (v *Vector3) TransformDirection(m *Matrix4) *Vector3

TransformDirection transforms v by affine matrix m and stores the results in v.

func (*Vector3) Unproject

func (v *Vector3) Unproject() *Vector3

Unproject TODO description.

func (*Vector3) X

func (v *Vector3) X() float64

X gets the x-component of the vector.

func (*Vector3) Y

func (v *Vector3) Y() float64

Y gets the y-component of the vector.

func (*Vector3) Z

func (v *Vector3) Z() float64

Z gets the z-component of the vector.

type Vector4

type Vector4 struct {
	// contains filtered or unexported fields
}

Vector4 represents a 4D vector.

http://threejs.org/docs/index.html#Reference/Math/Vector4

func Vector4FromJSObject

func Vector4FromJSObject(p *js.Object) *Vector4

Vector4FromJSObject returns a wrapped Vector4 JavaScript class.

func (*Vector4) Add

func (v *Vector4) Add(src *Vector4) *Vector4

Add adds v to this vector.

func (*Vector4) AddScalar

func (v *Vector4) AddScalar(s float64) *Vector4

AddScalar adds a scalar value to all of the vector's components.

s -- Float

func (*Vector4) AddScaledVector

func (v *Vector4) AddScaledVector(src *Vector4, s float64) *Vector4

AddScaledVector adds the multiple of v and s to this vector

func (*Vector4) AddVectors

func (v *Vector4) AddVectors(a, b *Vector4) *Vector4

AddVectors sets this vector to a + b.

func (*Vector4) ApplyMatrix4

func (v *Vector4) ApplyMatrix4(m *Matrix4) *Vector4

ApplyMatrix4 transforms the vector by the matrix.

m -- Matrix4

func (*Vector4) Ceil

func (v *Vector4) Ceil() *Vector4

Ceil components are rounded upwards (towards positive infinity) to an integer value.

func (*Vector4) Clamp

func (v *Vector4) Clamp(min, max *Vector4) *Vector4

Clamp replaces the corresponing vector value if this vector's x, y, z, or w value is greater than the max vector's x, y, z, or w value and replaces the corresponing vector value if this vector's x, y, z, or w value is less than the min vector's x, y, z, or w value.

min -- Vector4
max -- Vector4

func (*Vector4) ClampScalar

func (v *Vector4) ClampScalar() *Vector4

ClampScalar vector's x, y, z or w values are replaced by the max value if they are greater than the max value and if this vector's x, y, z or w values are less than the min value, they are replaced by the min value.

min -- Float the minimum value the components will be clamped to
max -- Float the maximum value the components will be clamped to

func (*Vector4) Clone

func (v *Vector4) Clone() *Vector4

Clone clones this vector.

func (*Vector4) Copy

func (v *Vector4) Copy(src *Vector4) *Vector4

Copy copies value of v to this vector.

func (*Vector4) DivideScalar

func (v *Vector4) DivideScalar(scalar float64) *Vector4

DivideScalar Divides this vector by scalar s. Set vector to ( 0, 0, 0 ) if s == 0.

func (*Vector4) Dot

func (v *Vector4) Dot(src *Vector4) *Vector4

Dot computes dot product of this vector and v.

func (*Vector4) Equals

func (v *Vector4) Equals(src *Vector4) bool

Equals checks to see if this vector matches vector v.

v -- Vector4

func (*Vector4) Floor

func (v *Vector4) Floor() *Vector4

Floor components are rounded downwards (towards negative infinity) to an integer value.

func (*Vector4) FromArray

func (v *Vector4) FromArray(array []float64, offset int) *Vector4

FromArray sets the vector's components based on an array formatted like [x, y, z, w].

array -- The source array in the form [x, y, z, w].
offset -- An optional offset into the array.

func (*Vector4) FromAttribute

func (v *Vector4) FromAttribute(attribute, index, offset float64) *Vector4

FromAttribute TODO description.

func (*Vector4) GetComponent

func (v *Vector4) GetComponent(index float64) *Vector4

GetComponent returns the value of the vector component x, y, or z by an index.

index -- Integer 0, 1, 2, or 3
    Index 0: x
    Index 1: y
    Index 2: z
    Index 3: w

func (*Vector4) JSObject

func (v *Vector4) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*Vector4) Length

func (v *Vector4) Length() *Vector4

Length computes length of this vector.

func (*Vector4) LengthManhattan

func (v *Vector4) LengthManhattan() *Vector4

LengthManhattan computes Manhattan length of this vector.

http://en.wikipedia.org/wiki/Taxicab_geometry

func (*Vector4) LengthSq

func (v *Vector4) LengthSq() *Vector4

LengthSq computes squared length of this vector.

func (*Vector4) Lerp

func (v *Vector4) Lerp(src *Vector4, alpha float64) *Vector4

Lerp linearly interpolate between this vector and v with alpha factor.

func (*Vector4) LerpVectors

func (v *Vector4) LerpVectors(v1, v2 *Vector4, alpha float64) *Vector4

LerpVectors sets this vector to be the vector linearly interpolated between v1 and v2 with alpha factor.

func (*Vector4) Max

func (v *Vector4) Max(src *Vector4) *Vector4

Max replaces the corresponing vector v value if this vector's x, y, z, or w value is less than vector v's x, y, z, or w value.

v -- Vector4

func (*Vector4) Min

func (v *Vector4) Min(src *Vector4) *Vector4

Min replaces the corresponing vector v value if this vector's x, y, z, or w value is greater than vector v's x, y, z, or w value.

v -- Vector4

func (*Vector4) MultiplyScalar

func (v *Vector4) MultiplyScalar(scalar float64) *Vector4

MultiplyScalar multiplies this vector by scalar s.

func (*Vector4) Negate

func (v *Vector4) Negate() *Vector4

Negate inverts this vector.

func (*Vector4) Normalize

func (v *Vector4) Normalize() *Vector4

Normalize normalizes this vector.

func (*Vector4) Round

func (v *Vector4) Round() *Vector4

Round components are rounded towards the nearest integer value.

func (*Vector4) RoundToZero

func (v *Vector4) RoundToZero() *Vector4

RoundToZero components are rounded towards zero (up if negative, down if positive) to an integer value.

func (*Vector4) Set

func (v *Vector4) Set(x, y, z, w float64) *Vector4

Set sets value of this vector.

func (*Vector4) SetAxisAngleFromQuaternion

func (v *Vector4) SetAxisAngleFromQuaternion(q *Quaternion) *Vector4

SetAxisAngleFromQuaternion sets this Vector4 to the computed axis-angle representation of the rotation defined by Quaternion q. The axis is stored in components (x, y, z) of the vector, and the rotation in radians is stored in component w.

q -- Quaternion

func (*Vector4) SetAxisAngleFromRotationMatrix

func (v *Vector4) SetAxisAngleFromRotationMatrix(m *Matrix4) *Vector4

SetAxisAngleFromRotationMatrix Sets this Vector4 to the computed axis-angle representation of the rotation defined by Matrix4 m. Assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled). The axis is stored in components (x, y, z) of the vector, and the rotation in radians is stored in component w.

m -- Matrix4

func (*Vector4) SetComponent

func (v *Vector4) SetComponent(index, value float64) *Vector4

SetComponent sets the value of the vector component x, y, or z by an index.

index -- Integer 0 - 3
    Index 0: x
    Index 1: y
    Index 2: z
    Index 3: w
value -- Float

func (*Vector4) SetLength

func (v *Vector4) SetLength(length float64) *Vector4

SetLength normalizes this vector and multiplies it by l.

func (*Vector4) SetScalar

func (v *Vector4) SetScalar(scalar float64) *Vector4

SetScalar TODO description.

func (*Vector4) SetW

func (v *Vector4) SetW(w float64) *Vector4

SetW sets the w component of the vector.

w -- Float

func (*Vector4) SetX

func (v *Vector4) SetX(x float64) *Vector4

SetX sets the x component of the vector.

x -- Float

func (*Vector4) SetY

func (v *Vector4) SetY(y float64) *Vector4

SetY sets the y component of the vector.

y -- Float

func (*Vector4) SetZ

func (v *Vector4) SetZ(z float64) *Vector4

SetZ sets the z component of the vector.

z -- Float

func (*Vector4) Sub

func (v *Vector4) Sub(src *Vector4) *Vector4

Sub subtracts v from this vector.

func (*Vector4) SubScalar

func (v *Vector4) SubScalar(s float64) *Vector4

SubScalar TODO description.

func (*Vector4) SubVectors

func (v *Vector4) SubVectors(a, b *Vector4) *Vector4

SubVectors sets this vector to a - b.

type VectorKeyframeTrack

type VectorKeyframeTrack struct {
	// contains filtered or unexported fields
}

VectorKeyframeTrack represents a vectorkeyframetrack.

func VectorKeyframeTrackFromJSObject

func VectorKeyframeTrackFromJSObject(p *js.Object) *VectorKeyframeTrack

VectorKeyframeTrackFromJSObject returns a wrapped VectorKeyframeTrack JavaScript class.

func (*VectorKeyframeTrack) JSObject

func (v *VectorKeyframeTrack) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type VertexNormalsHelper

type VertexNormalsHelper struct {
	// contains filtered or unexported fields
}

VertexNormalsHelper renders arrows to visualize an object's vertex normal vectors. Requires that normals have been specified in a custom attribute or have been calculated using computeVertexNormals.

http://threejs.org/docs/index.html#Reference/Extras.Helpers/VertexNormalsHelper

func VertexNormalsHelperFromJSObject

func VertexNormalsHelperFromJSObject(p *js.Object) *VertexNormalsHelper

VertexNormalsHelperFromJSObject returns a wrapped VertexNormalsHelper JavaScript class.

func (*VertexNormalsHelper) JSObject

func (v *VertexNormalsHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type VideoTexture

type VideoTexture struct {
	// contains filtered or unexported fields
}

VideoTexture represents a videotexture.

func VideoTextureFromJSObject

func VideoTextureFromJSObject(p *js.Object) *VideoTexture

VideoTextureFromJSObject returns a wrapped VideoTexture JavaScript class.

func (*VideoTexture) JSObject

func (v *VideoTexture) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLBufferRenderer

type WebGLBufferRenderer struct {
	// contains filtered or unexported fields
}

WebGLBufferRenderer represents a webglbufferrenderer.

func WebGLBufferRendererFromJSObject

func WebGLBufferRendererFromJSObject(p *js.Object) *WebGLBufferRenderer

WebGLBufferRendererFromJSObject returns a wrapped WebGLBufferRenderer JavaScript class.

func (*WebGLBufferRenderer) JSObject

func (w *WebGLBufferRenderer) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLCapabilities

type WebGLCapabilities struct {
	// contains filtered or unexported fields
}

WebGLCapabilities represents a webglcapabilities.

func WebGLCapabilitiesFromJSObject

func WebGLCapabilitiesFromJSObject(p *js.Object) *WebGLCapabilities

WebGLCapabilitiesFromJSObject returns a wrapped WebGLCapabilities JavaScript class.

func (*WebGLCapabilities) JSObject

func (w *WebGLCapabilities) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLExtensions

type WebGLExtensions struct {
	// contains filtered or unexported fields
}

WebGLExtensions represents a webglextensions.

func WebGLExtensionsFromJSObject

func WebGLExtensionsFromJSObject(p *js.Object) *WebGLExtensions

WebGLExtensionsFromJSObject returns a wrapped WebGLExtensions JavaScript class.

func (*WebGLExtensions) JSObject

func (w *WebGLExtensions) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLGeometries

type WebGLGeometries struct {
	// contains filtered or unexported fields
}

WebGLGeometries represents a webglgeometries.

func WebGLGeometriesFromJSObject

func WebGLGeometriesFromJSObject(p *js.Object) *WebGLGeometries

WebGLGeometriesFromJSObject returns a wrapped WebGLGeometries JavaScript class.

func (*WebGLGeometries) JSObject

func (w *WebGLGeometries) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLIndexedBufferRenderer

type WebGLIndexedBufferRenderer struct {
	// contains filtered or unexported fields
}

WebGLIndexedBufferRenderer represents a webglindexedbufferrenderer.

func WebGLIndexedBufferRendererFromJSObject

func WebGLIndexedBufferRendererFromJSObject(p *js.Object) *WebGLIndexedBufferRenderer

WebGLIndexedBufferRendererFromJSObject returns a wrapped WebGLIndexedBufferRenderer JavaScript class.

func (*WebGLIndexedBufferRenderer) JSObject

func (w *WebGLIndexedBufferRenderer) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLLights

type WebGLLights struct {
	// contains filtered or unexported fields
}

WebGLLights represents a webgllights.

func WebGLLightsFromJSObject

func WebGLLightsFromJSObject(p *js.Object) *WebGLLights

WebGLLightsFromJSObject returns a wrapped WebGLLights JavaScript class.

func (*WebGLLights) JSObject

func (w *WebGLLights) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLObjects

type WebGLObjects struct {
	// contains filtered or unexported fields
}

WebGLObjects represents a webglobjects.

func WebGLObjectsFromJSObject

func WebGLObjectsFromJSObject(p *js.Object) *WebGLObjects

WebGLObjectsFromJSObject returns a wrapped WebGLObjects JavaScript class.

func (*WebGLObjects) JSObject

func (w *WebGLObjects) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLProgram

type WebGLProgram struct {
	// contains filtered or unexported fields
}

WebGLProgram represents a webglprogram. Constructor for the GLSL program sent to vertex and fragment shaders, including default uniforms and attributes.

http://threejs.org/docs/index.html#Reference/Renderers.WebGL/WebGLProgram

func WebGLProgramFromJSObject

func WebGLProgramFromJSObject(p *js.Object) *WebGLProgram

WebGLProgramFromJSObject returns a wrapped WebGLProgram JavaScript class.

func (*WebGLProgram) Get

func (w *WebGLProgram) Get() *WebGLProgram

Get TODO description.

func (*WebGLProgram) JSObject

func (w *WebGLProgram) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLPrograms

type WebGLPrograms struct {
	// contains filtered or unexported fields
}

WebGLPrograms represents a webglprograms.

func WebGLProgramsFromJSObject

func WebGLProgramsFromJSObject(p *js.Object) *WebGLPrograms

WebGLProgramsFromJSObject returns a wrapped WebGLPrograms JavaScript class.

func (*WebGLPrograms) JSObject

func (w *WebGLPrograms) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLProperties

type WebGLProperties struct {
	// contains filtered or unexported fields
}

WebGLProperties represents a webglproperties.

func WebGLPropertiesFromJSObject

func WebGLPropertiesFromJSObject(p *js.Object) *WebGLProperties

WebGLPropertiesFromJSObject returns a wrapped WebGLProperties JavaScript class.

func (*WebGLProperties) JSObject

func (w *WebGLProperties) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLRenderTarget

type WebGLRenderTarget struct {
	// contains filtered or unexported fields
}

WebGLRenderTarget is a buffer where the video card draws pixels for a scene that is being rendered in the background. It is used in different effects.

http://threejs.org/docs/index.html#Reference/Renderers/WebGLRenderTarget

func WebGLRenderTargetFromJSObject

func WebGLRenderTargetFromJSObject(p *js.Object) *WebGLRenderTarget

WebGLRenderTargetFromJSObject returns a wrapped WebGLRenderTarget JavaScript class.

func (*WebGLRenderTarget) Clone

Clone creates a copy of this render target.

func (*WebGLRenderTarget) Copy

Copy adopts the settings of the given render target.

func (*WebGLRenderTarget) Dispose

func (w *WebGLRenderTarget) Dispose() *WebGLRenderTarget

Dispose dispatches a dispose event..

func (*WebGLRenderTarget) JSObject

func (w *WebGLRenderTarget) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*WebGLRenderTarget) SetSize

func (w *WebGLRenderTarget) SetSize(width, height float64) *WebGLRenderTarget

SetSize sets the size of the render target.

type WebGLRenderTargetCube

type WebGLRenderTargetCube struct {
	// contains filtered or unexported fields
}

WebGLRenderTargetCube represents a webglrendertargetcube. CubeCamera uses this as its WebGLRenderTarget.

http://threejs.org/docs/index.html#Reference/Renderers/WebGLRenderTargetCube

func WebGLRenderTargetCubeFromJSObject

func WebGLRenderTargetCubeFromJSObject(p *js.Object) *WebGLRenderTargetCube

WebGLRenderTargetCubeFromJSObject returns a wrapped WebGLRenderTargetCube JavaScript class.

func (*WebGLRenderTargetCube) JSObject

func (w *WebGLRenderTargetCube) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLRenderer

type WebGLRenderer struct {
	// contains filtered or unexported fields
}

WebGLRenderer displays your beautifully crafted scenes using WebGL, if your device supports it.

http://threejs.org/docs/index.html#Reference/Renderers/WebGLRenderer

func WebGLRendererFromJSObject

func WebGLRendererFromJSObject(p *js.Object) *WebGLRenderer

WebGLRendererFromJSObject returns a wrapped WebGLRenderer JavaScript class.

func (*WebGLRenderer) Clear

func (w *WebGLRenderer) Clear(color, depth, stencil bool) *WebGLRenderer

Clear Tells the renderer to clear its color, depth or stencil drawing buffer(s). This method initializes the color buffer to the current clear color value. Arguments default to true.

func (*WebGLRenderer) ClearColor

func (w *WebGLRenderer) ClearColor() *WebGLRenderer

ClearColor TODO description.

func (*WebGLRenderer) ClearDepth

func (w *WebGLRenderer) ClearDepth() *WebGLRenderer

ClearDepth TODO description.

func (*WebGLRenderer) ClearStencil

func (w *WebGLRenderer) ClearStencil() *WebGLRenderer

ClearStencil TODO description.

func (*WebGLRenderer) ClearTarget

func (w *WebGLRenderer) ClearTarget(renderTarget JSObject, color, depth, stencil bool) *WebGLRenderer

ClearTarget clears a rendertarget. To do this, it activates the rendertarget.

renderTarget -- The renderTarget that needs to be cleared.
color -- If set, then the color gets cleared.
depth -- If set, then the depth gets cleared.
stencil -- If set, then the stencil gets cleared.
This method clears a rendertarget. To do this, it activates the rendertarget

func (*WebGLRenderer) DOMElement

func (w *WebGLRenderer) DOMElement() *js.Object

DOMElement returns the DOM element associated with this renderer.

func (*WebGLRenderer) ForceContextLoss

func (w *WebGLRenderer) ForceContextLoss() *WebGLRenderer

ForceContextLoss TODO description.

func (*WebGLRenderer) GetClearAlpha

func (w *WebGLRenderer) GetClearAlpha() float64

GetClearAlpha returns a float with the current clear alpha. Ranges from 0 to 1.

func (*WebGLRenderer) GetClearColor

func (w *WebGLRenderer) GetClearColor() *Color

GetClearColor returns a THREE.Color instance with the current clear color.

func (*WebGLRenderer) GetContext

func (w *WebGLRenderer) GetContext() *js.Object

GetContext returns the WebGL context.

func (*WebGLRenderer) GetContextAttributes

func (w *WebGLRenderer) GetContextAttributes() *js.Object

GetContextAttributes returns an object that describes the attributes set on the WebGL context when it was created.

func (*WebGLRenderer) GetCurrentRenderTarget

func (w *WebGLRenderer) GetCurrentRenderTarget() *js.Object

GetCurrentRenderTarget TODO description.

func (*WebGLRenderer) GetMaxAnisotropy

func (w *WebGLRenderer) GetMaxAnisotropy() float64

GetMaxAnisotropy returns the anisotropy level of the textures.

func (*WebGLRenderer) GetPixelRatio

func (w *WebGLRenderer) GetPixelRatio() float64

GetPixelRatio returns current device pixel ratio used.

func (*WebGLRenderer) GetPrecision

func (w *WebGLRenderer) GetPrecision() float64

GetPrecision gets the precision used by the shaders. It returns "highp","mediump" or "lowp".

func (*WebGLRenderer) GetSize

func (w *WebGLRenderer) GetSize() (width, height float64)

GetSize returns an object containing the width and height of the renderer's output canvas, in pixels.

func (*WebGLRenderer) JSObject

func (w *WebGLRenderer) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*WebGLRenderer) ReadRenderTargetPixels

func (w *WebGLRenderer) ReadRenderTargetPixels(renderTarget JSObject, x, y, width, height int, buffer JSObject) *WebGLRenderer

ReadRenderTargetPixels reads the pixel data from the renderTarget into the buffer you pass in. Buffer should be a Javascript Uint8Array instantiated with new Uint8Array( renderTargetWidth * renderTargetWidth * 4 ) to account for size and color information. This is a wrapper around gl.readPixels.

func (*WebGLRenderer) Render

func (w *WebGLRenderer) Render(scene, camera JSObject, opts *RenderOpts) *WebGLRenderer

Render Render a scene using a camera. The render is done to the renderTarget (if specified) or to the canvas as usual. If forceClear is true, the depth, stencil and color buffers will be cleared before rendering even if the renderer's autoClear property is false. Even with forceClear set to true you can prevent certain buffers being cleared by setting either the .autoClearColor, .autoClearStencil or .autoClearDepth properties to false.

func (*WebGLRenderer) RenderBufferDirect

func (w *WebGLRenderer) RenderBufferDirect(camera, fog, geometry, material, object, group JSObject) *WebGLRenderer

RenderBufferDirect renders a buffer geometry group using the camera and with the correct material.

func (*WebGLRenderer) RenderBufferImmediate

func (w *WebGLRenderer) RenderBufferImmediate(object, program, material JSObject) *WebGLRenderer

RenderBufferImmediate renders an immediate buffer. Gets called by renderImmediateObject.

object — an instance of Object3D
program — an instance of shaderProgram
shading — an instance of Material

func (*WebGLRenderer) ResetGLState

func (w *WebGLRenderer) ResetGLState() *WebGLRenderer

ResetGLState TODO description.

func (*WebGLRenderer) SetClearAlpha

func (w *WebGLRenderer) SetClearAlpha(alpha float64) *WebGLRenderer

SetClearAlpha TODO description.

func (*WebGLRenderer) SetClearColor

func (w *WebGLRenderer) SetClearColor(color *Color, alpha float64) *WebGLRenderer

SetClearColor sets the clear color and opacity.

func (*WebGLRenderer) SetFaceCulling

func (w *WebGLRenderer) SetFaceCulling(cullFace, frontFaceDirection int) *WebGLRenderer

SetFaceCulling is used for setting the gl frontFace, cullFace states in the GPU, thus enabling/disabling face culling when rendering. If cullFace is false, culling will be disabled.

cullFace —- "back", "front", "front_and_back", or false.
frontFace —- "ccw" or "cw

func (*WebGLRenderer) SetPixelRatio

func (w *WebGLRenderer) SetPixelRatio(value float64) *WebGLRenderer

SetPixelRatio sets device pixel ratio. This is usually used for HiDPI device to prevent blurring output canvas.

func (*WebGLRenderer) SetRenderTarget

func (w *WebGLRenderer) SetRenderTarget(renderTarget JSObject) *WebGLRenderer

SetRenderTarget sets the active rendertarget. If the parameter is omitted the canvas is set as the active rendertarget.

renderTarget -- The renderTarget that needs to be activated (optional).

func (*WebGLRenderer) SetScissor

func (w *WebGLRenderer) SetScissor(x, y, width, height float64) *WebGLRenderer

SetScissor Sets the scissor area from (x, y) to (x + width, y + height). NOTE: The point (x, y) is the lower left corner of the area to be set for both of these methods. The area is defined from left to right in width but bottom to top in height. The sense of the vertical definition is opposite to the fill direction of an HTML canvas element.

func (*WebGLRenderer) SetScissorTest

func (w *WebGLRenderer) SetScissorTest(value bool) *WebGLRenderer

SetScissorTest Enable or disable the scissor test. When this is enabled, only the pixels within the defined scissor area will be affected by further renderer actions.

func (*WebGLRenderer) SetSize

func (w *WebGLRenderer) SetSize(width, height float64, updateStyle bool) *WebGLRenderer

SetSize resizes the output canvas to (width, height) with device pixel ratio taken into account, and also sets the viewport to fit that size, starting in (0, 0). Setting updateStyle to true adds explicit pixel units to the output canvas style.

func (*WebGLRenderer) SetTexture

func (w *WebGLRenderer) SetTexture(texture, slot JSObject) *WebGLRenderer

SetTexture sets the correct texture to the correct slot for the wegl shader. The slot number can be found as a value of the uniform of the sampler.

texture -- The texture that needs to be set.
slot -- The number indicating which slot should be used by the texture.

func (*WebGLRenderer) SetViewport

func (w *WebGLRenderer) SetViewport(x, y, width, height float64) *WebGLRenderer

SetViewport sets the viewport to render from (x, y) to (x + width, y + height).

type WebGLRendererOpts

type WebGLRendererOpts struct {
	// canvas — A Canvas where the renderer draws its output.
	// context — The RenderingContext context to use.
	Precision              *string `json:"precision,omitempty"`             // Shader precision. Can be "highp", "mediump" or "lowp". Defaults to "highp" if supported by the device.
	Alpha                  *bool   `json:"alpha,omitempty"`                 // default is false.
	PremultipliedAlpha     *bool   `json:"premultipliedAlpha,omitempty"`    // default is true.
	Antialias              *bool   `json:"antialias,omitempty"`             // default is false.
	Stencil                *bool   `json:"stencil,omitempty"`               // default is true.
	PreserveDrawingBuffer  *bool   `json:"preserveDrawingBuffer,omitempty"` // default is false.
	Depth                  *bool   `json:"depth,omitempty"`                 // default is true.
	LogarithmicDepthBuffer *bool   `json:"logatihmicDepthBuffer,omitempty"` // default is false.
}

WebGLRendererOpts provides optional parameters to WebGLRenderer.

type WebGLShader

type WebGLShader struct {
	// contains filtered or unexported fields
}

WebGLShader is a lower level function to compile either a vertex or fragment shader.

http://threejs.org/docs/index.html#Reference/Renderers.WebGL/WebGLShader

func WebGLShaderFromJSObject

func WebGLShaderFromJSObject(p *js.Object) *WebGLShader

WebGLShaderFromJSObject returns a wrapped WebGLShader JavaScript class.

func (*WebGLShader) JSObject

func (w *WebGLShader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLShadowMap

type WebGLShadowMap struct {
	// contains filtered or unexported fields
}

WebGLShadowMap represents a webglshadowmap.

func WebGLShadowMapFromJSObject

func WebGLShadowMapFromJSObject(p *js.Object) *WebGLShadowMap

WebGLShadowMapFromJSObject returns a wrapped WebGLShadowMap JavaScript class.

func (*WebGLShadowMap) JSObject

func (w *WebGLShadowMap) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WebGLState

type WebGLState struct {
	// contains filtered or unexported fields
}

WebGLState represents a webglstate.

http://threejs.org/docs/index.html#Reference/Renderers.WebGL/WebGLState

func WebGLStateFromJSObject

func WebGLStateFromJSObject(p *js.Object) *WebGLState

WebGLStateFromJSObject returns a wrapped WebGLState JavaScript class.

func (*WebGLState) JSObject

func (w *WebGLState) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WireframeGeometry

type WireframeGeometry struct {
	// contains filtered or unexported fields
}

WireframeGeometry represents a wireframegeometry.

func WireframeGeometryFromJSObject

func WireframeGeometryFromJSObject(p *js.Object) *WireframeGeometry

WireframeGeometryFromJSObject returns a wrapped WireframeGeometry JavaScript class.

func (*WireframeGeometry) JSObject

func (w *WireframeGeometry) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type WireframeHelper

type WireframeHelper struct {
	// contains filtered or unexported fields
}

WireframeHelper represents a wireframehelper.

func WireframeHelperFromJSObject

func WireframeHelperFromJSObject(p *js.Object) *WireframeHelper

WireframeHelperFromJSObject returns a wrapped WireframeHelper JavaScript class.

func (*WireframeHelper) JSObject

func (w *WireframeHelper) JSObject() *js.Object

JSObject returns the underlying *js.Object.

type XHRLoader

type XHRLoader struct {
	// contains filtered or unexported fields
}

XHRLoader represents a xhrloader.

func XHRLoaderFromJSObject

func XHRLoaderFromJSObject(p *js.Object) *XHRLoader

XHRLoaderFromJSObject returns a wrapped XHRLoader JavaScript class.

func (*XHRLoader) JSObject

func (x *XHRLoader) JSObject() *js.Object

JSObject returns the underlying *js.Object.

func (*XHRLoader) Load

func (x *XHRLoader) Load(url, onLoad, onProgress, onError float64) *XHRLoader

Load TODO description.

func (*XHRLoader) SetPath

func (x *XHRLoader) SetPath(value float64) *XHRLoader

SetPath TODO description.

func (*XHRLoader) SetResponseType

func (x *XHRLoader) SetResponseType(value float64) *XHRLoader

SetResponseType TODO description.

func (*XHRLoader) SetWithCredentials

func (x *XHRLoader) SetWithCredentials(value float64) *XHRLoader

SetWithCredentials TODO description.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL