new TraceImage(meshes [, config])
Create a new trace image.
Parameters:
| Name | Type | Argument | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
meshes |
BIM.Meshes | The THREE meshes object to use. |
|||||||||||||||||
config |
object |
<optional> |
An optional configuration object. |
||||||||||||||||
Properties of
|
|||||||||||||||||||
| Name | Type | Argument | Description |
|---|---|---|---|
extents |
THREE.Box3 | Array |
<optional> |
The minimum/maximum size of the image, in model coordinates. |
alphaTest |
number |
<optional> |
The transparency threshold of the trace image, 0 to 1. |
opacity |
number |
<optional> |
The opacity of the trace image, 0 to 1. |
Members
-
:number
alphaTest
-
The threshold opacity below which the image is transparent.
Type
- number
-
:THREE.Box3
extents <readonly>
-
Stores the extents of the trace image in absolute model coordinates.
Type
- THREE.Box3
-
:object|null
imageSource <readonly>
-
Retrieves the texture image source data if available, or null.
Type
- object | null
-
:boolean
isTraceImage <readonly>
-
A flag identifying this object as a trace image.
Type
- boolean
-
:boolean
keepAspectRatio
-
Whether or not to maintain the aspect ratio of the trace image.
Type
- boolean
-
:PD.RectMesh|null
mesh <readonly>
-
The mesh for rendering the trace image if available, or null.
Type
- PD.RectMesh | null
-
:number
opacity
-
The opacity of the trace image mesh material.
Type
- number
-
:THREE.Texture|null
texture
-
The trace image texture if available, or null.
Type
- THREE.Texture | null
-
:boolean
transparentBackground
-
Whether or not to maintain the aspect ratio of the trace image.
Type
- boolean
-
:boolean
valid <readonly>
-
Whether or not the trace image is valid and available.
Type
- boolean
-
:boolean
visible
-
Whether or not the trace image is currently visible.
Type
- boolean
Methods
-
fromJSON(data)
-
Safely copy properties from a source object.
See the
PD.Base#fromJSONmethod for more details.Parameters:
Name Type Description dataobject The source object containing data to copy.
Returns:
Returns this instance to support method chaining.
- Type
- BIM.Entity
-
scale(factor, aboutPoint)
-
Applies a scale factor to resize the trace image.
Parameters:
Name Type Description factornumber The scale factor to apply.
aboutPointTHREE.Vector3 The point about which to apply the scale.
-
toJSON( [data])
-
Converts the object instance to a simple POJO for JSON storage.
This method is used to copy, store and save the data for ths object, so the returned object must have all the properties required be able to rebuild this instance in its entirety when passed to the class constructor.
See the
PD.Base#toJSONmethod for more details.Parameters:
Name Type Argument Description dataobject <optional>
An optional parent object to append this data to.
Returns:
Returns a JSON object.
- Type
- object