ModelOptions
Options of Renderer.addModel and Renderer.addEncodedModel.
Defined in: renderer.ts:158
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
scale? | number | Draw the model enlarged by this integer factor (default 1): each of its voxels covers scale³ world voxels, and an instance draws exactly what the model upsampled scale times by nearest neighbour would draw at scale 1 (the world voxel at p reads model voxel floor(q / scale), q being p's cell in the enlarged model), at any yaw, mirrored, at fractional positions, with the same shadows, AO and faces. A model built at 10 vox/m drawn in a 50 vox/m world takes 5. The instance's space is the enlarged model's, so Instance.anchor is in world voxels of it; the encoding is the same at any scale (scale is not part of it), so one encoding can be added at several. Instances of a scaled model cannot be posed (Instance.parts throws), since the posed path would need every part transform and mask grid at the enlarged size; draw it plain, or bake the pose. | renderer.ts:173 |