Skip to content

Commit aef7c87

Browse files
committed
Specify more types
1 parent 646546a commit aef7c87

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

js/scripts/three-class-config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ module.exports = {
101101
CubeCamera: {
102102
relativePath: './cameras/CubeCamera',
103103
superClass: 'Object3D',
104+
properties: {
105+
type: new Types.String('CubeCamera'),
106+
}
104107
},
105108
OrthographicCamera: {
106109
relativePath: './cameras/OrthographicCamera',
@@ -113,6 +116,7 @@ module.exports = {
113116
bottom: new Types.Float(),
114117
near: new Types.Float(0.1),
115118
far: new Types.Float(2000),
119+
type: new Types.String('OrthographicCamera'),
116120
},
117121
constructorArgs: [ 'left', 'right', 'top', 'bottom', 'near', 'far' ],
118122
},
@@ -129,13 +133,15 @@ module.exports = {
129133
// view: new Types.Dict(),
130134
// filmGauge: new Types.Float(35.0),
131135
// filmOffset: new Types.Float(0.0),
136+
type: new Types.String('PerspectiveCamera'),
132137
},
133138
constructorArgs: [ 'fov', 'aspect', 'near', 'far' ],
134139
},
135140
ArrayCamera: {
136141
relativePath: './cameras/ArrayCamera',
137142
superClass: 'PerspectiveCamera',
138143
properties: {
144+
type: new Types.String('ArrayCamera'),
139145
},
140146
constructorArgs: [ 'fov', 'aspect', 'near', 'far' ],
141147
},
@@ -341,6 +347,7 @@ module.exports = {
341347
attributes: new Types.ThreeTypeDict(['BufferAttribute', 'InterleavedBufferAttribute']),
342348
morphAttributes: new Types.BufferMorphAttributes(),
343349
MaxIndex: new Types.Int(65535),
350+
type: new Types.String('BufferGeometry'),
344351
// TODO: These likely require special types:
345352
//groups: new Types.GeometryGroup(),
346353
//drawRange: new Types.DrawRange(),
@@ -668,6 +675,7 @@ module.exports = {
668675
refractionRatio: new Types.Float(0.98),
669676
skinning: new Types.Bool(false),
670677
specularMap: new Types.ThreeType('Texture'),
678+
type: new Types.String('MeshBasicMaterial'),
671679
wireframe: new Types.Bool(false),
672680
wireframeLinewidth: new Types.Float(1),
673681
wireframeLinecap: new Types.String('round'), // TODO: enum?
@@ -1036,6 +1044,7 @@ module.exports = {
10361044
geometry: new Types.ThreeType(['BaseGeometry', 'BaseBufferGeometry'], {nullable: false}),
10371045
drawMode: new Types.Enum('DrawModes', 'TrianglesDrawMode'),
10381046
morphTargetInfluences: new Types.Array(),
1047+
type: new Types.String('Mesh'),
10391048
},
10401049
propsDefinedByThree: ['morphTargetInfluences'],
10411050
},
@@ -1673,6 +1682,7 @@ module.exports = {
16731682
hex: new Types.Int(0),
16741683
headLength: new Types.Float(null, {nullable: true}),
16751684
headWidth: new Types.Float(null, {nullable: true}),
1685+
type: new Types.String('ArrowHelper'),
16761686
},
16771687
},
16781688
AxesHelper: {

0 commit comments

Comments
 (0)