Exemple #1
0
func NewScene() *Scene {
	scene := &Scene{
		core.NewObject3D(),
		true,
	}
	scene.Type = "Scene"
	//	this.fog = null;
	//	this.overrideMaterial = null;
	return scene
}
Exemple #2
0
func NewMesh(geometry *core.Geometry, material *materials.Material) *Mesh {
	o := core.NewObject3D()
	o.Geometry = geometry
	m := &Mesh{
		o,
		Material: material,
	}
	// m.UpdateMorphTargets()
	return m
}
Exemple #3
0
func NewCamera() *Camera {
	c := &Camera{
		core.NewObject3D(),
		Type:               "Camera",
		MatrixWorldInverse: math.NewMatrix4(),
		ProjectionMatrix:   math.NewMatrix4(),
	}
	c.LookAt = c.buildLookAt()
	return c
}