goggles

package module
v0.0.0-...-46a252d Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2015 License: MIT Imports: 7 Imported by: 0

README

goggles

This repository contains some examples of WebGL rendering using GopherJS. To use it, you'll first need to install Go. To do that on Mac, you could install using Homebrew:

brew install go
export GOPATH=/usr/local/share/go

Then you can run use go get to download the files:

go get github.com/noonat/goggles

And build things with:

cd $GOPATH/src/github.com/noonat/goggles
make

You can run a server with:

make run

Then you can view the examples at:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelAnimationFrame

func CancelAnimationFrame(id int)

func DegToRad

func DegToRad(degrees float32) float32

func Error

func Error(message string)

func RequestAnimationFrame

func RequestAnimationFrame(callback func(float32)) int

Types

type Obj

type Obj struct {
	Name         string
	Groups       []*ObjGroup
	VertexBuffer *js.Object
	// contains filtered or unexported fields
}

func (*Obj) GetMaterial

func (o *Obj) GetMaterial(name string) *js.Object

func (*Obj) Read

func (o *Obj) Read(reader io.Reader, gl *webgl.Context) error

func (*Obj) SetMaterial

func (o *Obj) SetMaterial(name string, texture *js.Object)

type ObjGroup

type ObjGroup struct {
	Name         string
	MaterialName string
	IndexBuffer  *js.Object
	NumIndices   int
	// contains filtered or unexported fields
}

Directories

Path Synopsis
obj

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL