forked from Lngramos/three
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathobjects_line.go
More file actions
27 lines (22 loc) · 804 Bytes
/
objects_line.go
File metadata and controls
27 lines (22 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package three
//go:generate go run object3d_method_generator/main.go -typeName Line -typeSlug line
import (
"github.com/gopherjs/gopherjs/js"
)
// Line a continuous line.
type Line struct {
*js.Object
ID int `js:"id"`
Position *Vector3 `js:"position"`
Rotation *Euler `js:"rotation"`
Geometry *BufferGeometry `js:"geometry"`
Material Material `js:"material"`
MatrixAutoUpdate bool `js:"matrixAutoUpdate"`
RenderOrder int `js:"renderOrder"`
}
// NewLine creates a new material. If Material is nil, three.js will assign a randomized material to the line o_O.
func NewLine(geom Geometry, material Material) *Line {
return &Line{
Object: three.Get("Line").New(geom, material),
}
}