CanvasMap
Getting Started Tutorials 3D Reference

Class Reference

Below is a list of the functions that are publically available in classes in CanvasMap.These functions are going to be placed under 'controlled change' where developers will be notified at least a year in advance before they change. Click on the name of a class to see details on the class. If you see functions you would recommend changes to or would like to see additional functions added to this list, please contact SchoonerTurtles.

CM3Camera

File: CM3Camera

Settings Group: Camera

Setting Name Type Options Default Comments
near near CMTYPE_FLOAT 0.1 frustrum near plan
far far CMTYPE_FLOAT 20000000 frustum far plane
up up CMTYPE_ENUMERATED "X", "Y", "Z" Z aspect ratio between the horiziontal and veritical dimensions of the pixels
lookAt lookAt CMTYPE_VECTOR

Name Name CMTYPE_STRING Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree

C3CameraPerspective extends CM3Camera

File: CM3Camera

Settings Group: Perspective

Setting Name Type Options Default Comments
fov Field Of View CMTYPE_FLOAT 45 frustrum (angle) of the vertical field of view from bottom to top in degrees
aspect aspect CMTYPE_FLOAT 1 aspect ratio between the horiziontal and veritical dimensions of the pixels

CM3CameraOrthographic extends CM3Camera

File: CM3Camera

Settings Group: Orthographic

Setting Name Type Options Default Comments
left left CMTYPE_FLOAT sets the left side of the viewing area unless a FrustrumSize is specified
right right CMTYPE_FLOAT sets the right side of the viewing area unless a FrustrumSize is specified
top top CMTYPE_FLOAT sets the top side of the viewing area unless a FrustrumSize is specified
bottom bottom CMTYPE_FLOAT sets the bottom side of the viewing area unless a FrustrumSize is specified
FrustumSize FrustumSize CMTYPE_FLOAT 500 sets the width of the viewing area in 3D. If specified, overrides the left, right, top and bottom settings
zoom zoom CMTYPE_FLOAT 1 sets the zoom level for orthographic projections. Smaller values appear further from the objects

CM3Controls

File: CM3Controls

Settings Group: Controls

Setting Name Type Options Default Comments
MinElevation Min Elevation CMTYPE_FLOAT 0
MaxElevation Max Elevation CMTYPE_FLOAT Infinity
MouseActive Mouse Active CMTYPE_BOOLEAN true
KeysActive Keys Active CMTYPE_BOOLEAN true
TouchActive Touch Active CMTYPE_BOOLEAN true

Name Name CMTYPE_STRING Name that appears in the item and layer lists Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree

CM3ControlsHelicopter

File: CM3ControlsHelicopter

Settings Group: CM3ControlsHelicopter

Setting Name Type Options Default Comments
MinPitch Min Pitch CMTYPE_FLOAT -Infinity -1
MaxPitch Max Pitch CMTYPE_FLOAT Infinity 0.2
MinRoll Min Roll CMTYPE_FLOAT -Infinity -0.25
MaxRoll Max Roll CMTYPE_FLOAT Infinity 0.25

CM3ControlsOrbit extends CM3Controls

File: CM3ControlsOrbit

Settings Group: OrbitControls

Setting Name Type Options Default Comments
MinDistance Min Distance CMTYPE_FLOAT 0
MaxDistance Max Distance CMTYPE_FLOAT Infinity
MinLatitude Min Latitude CMTYPE_FLOAT -90
MaxLatitude Max Latitude CMTYPE_FLOAT 90

CM3DrapeGeometry

File: CM3DrapeGeometry

CM3Geo extends CMGeo

File: CM3Geo

Object Functions

Inherited From: CMGeo
ReturnsFunctionThrows
ProjectFromGeographic(TheProjector)
GetNormalFromGeographic(Long, Lat)

CM3Item extends CMItem

File: CM3Item

Settings Group: Position

Setting Name Type Options Default Comments
Translations Position Offset Vector CMTYPE_VECTOR null,Initial:[1,1,1] x,y, and z values to offset the item
Scales Scaling Vector CMTYPE_VECTOR null,Initial:[1,1,1] x,y, and z scaling values for the item's size

Settings Group: Shadows

Setting Name Type Options Default Comments
cast Cast Shadows CMTYPE_BOOLEAN false must be set before the OGL object is created (or recreate on set)
receive Receive Shadow CMTYPE_BOOLEAN false must be set before the OGL object is created (or recreate on set)

Name Name CMTYPE_STRING Name that appears in the item and layer lists Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree Status Status CMTYPE_INDEXES CMSTATUS_OPTIONS, Default:CMSTATUS_SELECTABLE CMSTATUS_SELECTABLE How the item appears to the user and how the user can interact with it ElevationAngle Elevation Angle CMTYPE_FLOAT 0,Range:[-90,90] BearingAngle Bearing Angle CMTYPE_FLOAT 0,Range:[-180,180] RollAngle Roll Angle CMTYPE_FLOAT 0,Range:[-90,90] Color Color CMTYPE_COLOR rgb(128,128,128) must be set before the OGL object is created (or recreate on set) opacity opacity CMTYPE_FLOAT 1 must be set before the OGL object is created (or recreate on set)

Object Functions

Inherited From: CMItem
ReturnsFunctionThrows
SetTHREEMaterial()

CM3ItemArrow extends CM3Item

File: CM3ItemArrow

Settings Group: Dimensions

Setting Name Type Options Default Comments
Width Width CMTYPE_FLOAT 10
Height Height CMTYPE_FLOAT 20
Depth Depth CMTYPE_FLOAT 20

CM3ItemBox extends CM3Item

File: CM3ItemBox

Settings Group: Dimensions

Setting Name Type Options Default Comments
Width Width CMTYPE_FLOAT 10
Height Height CMTYPE_FLOAT 20
Depth Depth CMTYPE_FLOAT 20

CM3ItemCone extends CM3Item

File: CM3ItemBox

Settings Group: Dimensions

Setting Name Type Options Default Comments
Height Height CMTYPE_FLOAT 20
Radius Bottom Radius CMTYPE_FLOAT 10
NumSides Number of Sides CMTYPE_FLOAT 4

CM3ItemCylinder extends CM3Item

File: CM3ItemBox

Settings Group: Dimensions

Setting Name Type Options Default Comments
Height Height CMTYPE_FLOAT 20
TopRadius Top Radius CMTYPE_FLOAT 10
BottomRadius Bottom Radius CMTYPE_FLOAT 10
NumSides Number of Sides CMTYPE_FLOAT 4

CM3ItemCircle extends CM3Item

File: CM3ItemBox

Settings Group: Dimensions

Setting Name Type Options Default Comments
radius Radius CMTYPE_FLOAT 10 sphere radius. Default is 1.
segments Number of Segments CMTYPE_FLOAT 20 sphere radius. Default is 1.
thetaStart Start Angle CMTYPE_FLOAT 0,Range:[0,Math.PI*2]
thetaLength Central Angle CMTYPE_FLOAT Math.PI*2,Range:[0,Math.PI*2]

CM3ItemPlane extends CM3Item

File: CM3ItemBox

Settings Group: Dimensions

Setting Name Type Options Default Comments
width Width CMTYPE_FLOAT 10 width of the plane
height Height CMTYPE_FLOAT 10 height of the plane

CM3ItemRing extends CM3Item

File: CM3ItemBox

Settings Group: Dimensions

Setting Name Type Options Default Comments
innerRadius Inner Radius CMTYPE_FLOAT 10 sphere radius. Default is 1.
outerRadius Outer Radius CMTYPE_FLOAT 20 sphere radius. Default is 1.
thetaSegments Number of Segments CMTYPE_INTEGER 16,Range:[3,Infinity] Number of segments. A higher number means the ring will be more round. Minimum is 3. Default is 8.
phiSegments phiSegments CMTYPE_INTEGER 1,Range:[1,Infinity]
thetaStart Start Angle CMTYPE_FLOAT 0,Range:[0,Math.PI*2]
thetaLength Central Angle CMTYPE_FLOAT Math.PI*2,Range:[0,Math.PI*2]

CM3ItemSphere extends CM3Item

File: CM3ItemBox

Settings Group: Dimensions

Setting Name Type Options Default Comments
radius Radius CMTYPE_FLOAT 10 sphere radius. Default is 1.
widthSegments Number of Horizontal Segments CMTYPE_INTEGER 16,Range:[3,Infinity] number of horizontal segments. Minimum value is 3, and the default is 8.
heightSegments Number of Vertical Segements CMTYPE_INTEGER 16,Range:[2,Infinity] number of vertical segments. Minimum value is 2, and the default is 6.
phiStart Horizontal Start Angle CMTYPE_FLOAT 0,Range:[0,Math.PI*2] specify horizontal starting angle. Default is 0.
phiLength Horizontal Sweep Angle CMTYPE_FLOAT Math.PI*2,Range:[0,Math.PI*2] specify horizontal sweep angle size. Default is Math.PI * 2.
thetaStart Vertical Start Angle CMTYPE_FLOAT 0,Range:[0,Math.PI*2] specify vertical starting angle. Default is 0.
thetaLength Vertical Sweep Angle CMTYPE_FLOAT Math.PI*2,Range:[0,Math.PI*2] specify vertical sweep angle size. Default is Math.PI.

CM3ItemPolyhedra extends CM3Item

File: CM3ItemBox

Settings Group: Polyhedra

Setting Name Type Options Default Comments
Type Type CMTYPE_ENUMERATED 1 CM3ItemPolyhedra.ItemNames[1]
Radius Radius CMTYPE_FLOAT 10

CM3ItemTorus extends CM3Item

File: CM3ItemBox

Settings Group: Dimensions

Setting Name Type Options Default Comments
radius radius CMTYPE_FLOAT 10 Radius of the torus, from the center of the torus to the center of the tube. Default is 1.
tube tube CMTYPE_FLOAT 8,Range:[3,Infinity] Radius of the tube. Default is 0.4.
radialSegments radialSegments CMTYPE_INTEGER 6,Range:[2,Infinity] Number of segements dividing up the torus as it goes around to form a ring
tubularSegments tubularSegments CMTYPE_INTEGER 6,Range:[0,Math.PI*2] Number of segment of each tube in the torus
arc arc CMTYPE_FLOAT Math.PI*2,Range:[0,Math.PI*2] Central angle

CM3ItemTorusKnot extends CM3Item

File: CM3ItemBox

Settings Group: Dimensions

Setting Name Type Options Default Comments
radius radius CMTYPE_FLOAT 10 Radius of the torus, from the center of the torus to the center of the tube. Default is 1.
tube tube CMTYPE_FLOAT 2,Range:[0,Infinity] Radius of the tube. Default is 0.4.
tubularSegments tubularSegments CMTYPE_INTEGER 64,Range:[2,Infinity] Number of segment of each tube in the torus
radialSegments radialSegments CMTYPE_INTEGER 8,Range:[2,Infinity] Number of segements dividing up the torus as it goes around to form a ring
p p CMTYPE_INTEGER 2,Range:[1,Infinity] This value determines, how many times the geometry winds around its axis of rotational symmetry
q q CMTYPE_INTEGER 3,Range:[1,Infinity] This value determines, how many times the geometry winds around a circle in the interior of the torus.

CM3ItemFloor extends CM3Item

File: CM3ItemFloor

Settings Group: Dimensions

Setting Name Type Options Default Comments
Width Width CMTYPE_FLOAT 10
Height Height CMTYPE_FLOAT 20
Depth Depth CMTYPE_FLOAT 20

Name Name CMTYPE_STRING Name that appears in the item and layer lists Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree

CM3ItemGrid extends CM3ItemPoly

File: CM3ItemGrid

Settings Group: ItemGrid

Setting Name Type Options Default Comments
Type Type CMTYPE_ENUMERATED "Plane", "Sphere", "Cylinder", "Cone", "Complex", "InteriorPoles", "Conic", "Pseudocylindrical" Plane
Closed Closed CMTYPE_BOOLEAN false
NumRows Num Rows CMTYPE_INTEGER 7
NumColumns Num Columns CMTYPE_INTEGER 7
ColumnAnglesY Column Angles Y CMTYPE_FLOAT_ARRAY [45]
ColumnAnglesZ Column Angles Z CMTYPE_FLOAT_ARRAY [45]
ColumnWidths Column Widths CMTYPE_FLOAT_ARRAY [50]
RowHeights Row Heights CMTYPE_FLOAT_ARRAY [50]

Object Functions

Inherited From: CM3ItemPoly
ReturnsFunctionThrows
SetControlPoints()
SetSmoothingColumnFlag()
GetSmoothingColumnFlag()

CM3ItemLoaded extends CM3Item

File: CM3ItemLoaded

Settings Group: Source

Setting Name Type Options Default Comments
URL URL CMTYPE_STRING

CM3ItemOrigin extends CM3Item

File: CM3ItemOrigin

Settings Group: Origin

Setting Name Type Options Default Comments
AxisLength Axis Length CMTYPE_FLOAT 100

CM3ItemPoly extends CM3Item

File: CM3ItemPoly

Settings Group: Curve

Setting Name Type Options Default Comments
Coordinates Coordinates CMTYPE_COORDINATES {Xs:[],Ys:[],Smoothing:[]
Smoothing Smoothing CMTYPE_BOOLEAN_ARRAY null
ExtrusionType ExtrusionType CMTYPE_ENUMERATED "Flat", "Pointy", "ThreeJS" Pointy
CrossSectionAngle RadiusOfRotation CMTYPE_FLOAT 45
RadiusOfRotation RadiusOfRotation CMTYPE_FLOAT 40
DegreesPerSegment RadiusOfRotation CMTYPE_FLOAT 20
Smoothed Smoothed CMTYPE_BOOLEAN false
NumSteps NumSteps CMTYPE_INTEGER CM3ITEMPOLY_NUMSTEPS

Object Functions

Inherited From: CM3Item
ReturnsFunctionThrows
SetControlPoints()

CM3Layer extends CMLayer

File: CM3Layer

Settings Group: Layer

Setting Name Type Options Default Comments
IconCanvasWidth Icon Canvas Width CMTYPE_FLOAT 18 Sets the width, in pixels of the canvas used to create the icon
IconCanvasHeight Icon Canvas Height CMTYPE_FLOAT 18 Sets the height, in pixels, of the canvas used to create the icon

Name Name CMTYPE_STRING Name that appears in the item and layer lists Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree Status Status CMTYPE_INDEXES CMSTATUS_OPTIONS, Default:CMSTATUS_SELECTABLE CMSTATUS_SELECTABLE How the item appears to the user and how the user can interact with it

CM3LayerGraticule extends CMLayerGraticule

File: CM3LayerGraticule

Settings Group: Graticule3D

Setting Name Type Options Default Comments
LineWidth Line Width CMTYPE_FLOAT 20
HeightAboveSeaLevel Height Above Sea Level CMTYPE_FLOAT 20
LabelHeightAboveSeaLevel Height Above Sea Level CMTYPE_FLOAT 40
LongitudePosition Longitude Position CMTYPE_ENUMERATED CMLABEL_LOCATIONS, Default:null null Position of the longitude text, null for centered
LongitudeXOffset Longitude X Offset CMTYPE_FLOAT 50
LongitudeYOffset Longitude Y Offset CMTYPE_FLOAT 0
LatitudePosition Latitude Position CMTYPE_INDEXES CMLABEL_LOCATIONS, Default:CMLABEL_TOP_RIGHT CMLABEL_TOP_RIGHT
LatitudeXOffset Latitude X Offset CMTYPE_FLOAT 0
LatitudeYOffset Latitude Y Offset CMTYPE_FLOAT 50

Settings Group: Text3D

Setting Name Type Options Default Comments
Color Color CMTYPE_COLOR 0xffffff size of the text
opacity Opacity CMTYPE_FLOAT 1 1 for opaque, 0 for tranparent
size Size CMTYPE_FLOAT 1 size of the text
HaloSize Halo Size CMTYPE_FLOAT 10 size of the text
GlobalFontIndex Global Font Index CMTYPE_INTEGER 2 global font to use
height height CMTYPE_FLOAT 2 amount to extrude the object
curveSegments curveSegments CMTYPE_FLOAT 4 number of points on the curve
bevelEnabled bevelEnabled CMTYPE_BOOLEAN true beveled instead of 90 degree change, keep true for good looking text
bevelSegments bevelSegments CMTYPE_FLOAT 3 number of bevel layers (more makes a smoother bevel but draws slower
bevelSize bevelSize CMTYPE_FLOAT 0.1 width of bevel (distance from shape outline), keep > 0
bevelThickness bevelThickness CMTYPE_FLOAT 0.1 how deep the bevel goes into the extrusion ,keep > 0

Color Color CMTYPE_COLOR rgb(128,128,128) must be set before the OGL object is created (or recreate on set) opacity opacity CMTYPE_FLOAT 1 must be set before the OGL object is created (or recreate on set)

Object Functions

Inherited From: CMLayerGraticule
ReturnsFunctionThrows
SetLineMaterial()

CM3LayerItems extends CM3Layer

File: CM3LayerItems

CM3LayerLights extends CM3Layer

File: CM3LayerLights

CM3LayerBackgrounds extends CMLayerBackgrounds

File: CM3LayerList

CM3LayerTerrain extends CM3Layer

File: CM3LayerTerrain

Settings Group: Elevation

Setting Name Type Options Default Comments
Exaggeration Exaggeration CMTYPE_FLOAT 1
Offset Offset CMTYPE_FLOAT 0
URL URL CMTYPE_STRING
RoundEdges Round Edges CMTYPE_BOOLEAN 1
OuterDrape Outer Drape CMTYPE_BOOLEAN false
DrapeColor Drape Color CMTYPE_COLOR rgb(0,0,0)
DrapeElevation Drape Elevation CMTYPE_FLOAT 0

Settings Group: TerrainMaterial

Setting Name Type Options Default Comments
Opacity Opacity CMTYPE_FLOAT 1
Transparent Transparent CMTYPE_BOOLEAN false
Color Color CMTYPE_COLOR rgb(255,255,255)
Side Side CMTYPE_ENUMERATED THREE.DoubleSide, THREE.FrontSide, THREE.BackSide THREE.DoubleSide
map Overlaid Image (map) CMTYPE_STRING null
bumpMap Bump Map CMTYPE_STRING null
bumpScale Bump Scale CMTYPE_INTEGER 10
specularMap Reflectance Map CMTYPE_STRING null
specular Specular Color CMTYPE_COLOR grey

Object Functions

Inherited From: CM3Layer
ReturnsFunctionThrows
RequestData()
GetDEMDataset()
SetPyramidURL()

CM3LayerVector extends CMLayerDataset

File: CM3LayerVector

Settings Group: Font

Setting Name Type Options Default Comments
size Size CMTYPE_FLOAT 12 size of the text
GlobalFontIndex Global Font Index CMTYPE_INTEGER 0 global font to use

Settings Group: Elevation

Setting Name Type Options Default Comments
ZOffset ZOffset CMTYPE_FLOAT 0
ZMultiplier ZMultiplier CMTYPE_FLOAT 1
URL URL CMTYPE_STRING

Settings Group: CrossSection

Setting Name Type Options Default Comments
Radius Radius CMTYPE_FLOAT 100
NumFaces NumFaces CMTYPE_INTEGER 2

Settings Group: Shadows

Setting Name Type Options Default Comments
cast Cast Shadows CMTYPE_BOOLEAN false must be set before the OGL object is created (or recreate on set)
receive Receive Shadow CMTYPE_BOOLEAN false must be set before the OGL object is created (or recreate on set)

Color Color CMTYPE_COLOR rgb(128,128,128) must be set before the OGL object is created (or recreate on set) opacity opacity CMTYPE_FLOAT 1 must be set before the OGL object is created (or recreate on set) Extrusion Extrusion CMTYPE_OBJECT standard HTML 5 settings

Object Functions

Inherited From: CMLayerDataset
ReturnsFunctionThrows
Result In(-, -, -)
MouseDown()
MouseMove()
SetMaterial()
SetFeatureMaterials()
GetCrossSectionArray()
SetCrossSectionArray()
SetPathExtrusion()
GetPathExtrusion()

CM3Light

File: CM3Light

Settings Group: Position

Setting Name Type Options Default Comments
Translations Position Offset Vector CMTYPE_VECTOR null,Initial:[1,1,1] x,y, and z values to offset the item
Scales Scaling Vector CMTYPE_VECTOR null,Initial:[1,1,1] x,y, and z scaling values for the item's size

Settings Group: Shadows

Setting Name Type Options Default Comments
cast Cast Shadows CMTYPE_BOOLEAN false must be set before the OGL object is created (or recreate on set)
receive Receive Shadow CMTYPE_BOOLEAN false must be set before the OGL object is created (or recreate on set)

Settings Group: Light

Setting Name Type Options Default Comments
Intensity Intensity CMTYPE_FLOAT 1 0 to 1
On On CMTYPE_BOOLEAN true
AddHelper Add Helper CMTYPE_BOOLEAN false

Settings Group: ControlObject

Setting Name Type Options Default Comments
Radius Radius CMTYPE_FLOAT 100

Name Name CMTYPE_STRING Name that appears in the item and layer lists Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree Status Status CMTYPE_INDEXES CMSTATUS_OPTIONS, Default:CMSTATUS_SELECTABLE CMSTATUS_SELECTABLE How the item appears to the user and how the user can interact with it ElevationAngle Elevation Angle CMTYPE_FLOAT 0 BearingAngle Bearing Angle CMTYPE_FLOAT 0 Color Color CMTYPE_COLOR rgb(128,128,128) must be set before the OGL object is created (or recreate on set) opacity opacity CMTYPE_FLOAT 1 must be set before the OGL object is created (or recreate on set

CM3LightAmbient extends CM3Light

File: CM3Light

Settings Group: Light

Setting Name Type Options Default Comments
Intensity Intensity CMTYPE_FLOAT 1 0 to 1
On On CMTYPE_BOOLEAN true
AddHelper Add Helper CMTYPE_BOOLEAN false

Name Name CMTYPE_STRING Name that appears in the item and layer lists Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree Status Status CMTYPE_INDEXES CMSTATUS_OPTIONS, Default:CMSTATUS_SELECTABLE CMSTATUS_SELECTABLE How the item appears to the user and how the user can interact with it Color Color CMTYPE_COLOR rgb(128,128,128) must be set before the OGL object is created (or recreate on set)

CM3LightPoint extends CM3Light

File: CM3Light

CM3LightDirectional extends CM3Light

File: CM3Light
TargetPosition Target Position CMTYPE_VECTOR [0,0,0] x,y, and z values to offset the item

CM3LightSpot extends CM3LightDirectional

File: CM3Light

Settings Group: SpotLight

Setting Name Type Options Default Comments
angle angle CMTYPE_FLOAT Math.PI / 5
penumbra penumbra CMTYPE_FLOAT 0.3
castShadow castShadow CMTYPE_BOOLEAN false
ShadowNear ShadowNear CMTYPE_FLOAT 8
ShadowFar ShadowFar CMTYPE_FLOAT 300
ShadowMapWidth ShadowMapWidth CMTYPE_FLOAT 1024
ShadowMapHeight ShadowMapHeight CMTYPE_FLOAT 1024

TargetPosition Target Position CMTYPE_VECTOR [0,0,0] x,y, and z values to offset the item

CM3LightHemisphere extends CM3Light

File: CM3Light

Settings Group: PointLight

Setting Name Type Options Default Comments

CM3MeshStandardMaterial extends CM3MeshPhongMaterial

File: CM3Material

Settings Group: StandardMaterial

Setting Name Type Options Default Comments
AlphaMapURL Map URL CMTYPE_STRING null
BumpMapURL Bump Map URL CMTYPE_STRING null
bumpScale Bump Scale CMTYPE_INTEGER 10
Color Color CMTYPE_COLOR 10
EmissiveMapURL Emissive Map URL CMTYPE_STRING null
emissive Emissive Color CMTYPE_COLOR
RoughnessMapURL Roughness Map URL CMTYPE_STRING null
MapURL Map URL CMTYPE_STRING
metalness metalness CMTYPE_INTEGER 10
roughness roughness CMTYPE_INTEGER 10
specular Specular Color CMTYPE_COLOR grey
wireframeLinewidth wireframe Line Width CMTYPE_FLOAT 1

CM3PathExtrusion

File: CM3PathExtrusion

Settings Group: PathExtrusion

Setting Name Type Options Default Comments
Type Type CMTYPE_ENUMERATED "Flat", "Pointy", "ThreeJS" Flat
Smoothed Smoothed CMTYPE_BOOLEAN true
Closed Closed CMTYPE_BOOLEAN false
EndCap End Cap CMTYPE_ENUMERATED "Flat", "Open", "Pointy" Flat
CrossSectionAngle Cross Section Rotation CMTYPE_FLOAT 90 Angle to rotate the cross section can be rotated about its axis. This can be used to create a 2 sided cross section and then rotate it so it creates a flat surface similar to a road.
RadiusOfRotation Radius Of Rotation CMTYPE_FLOAT 40 Minimum radius for the path to curve. Segments that turn faster will be shortened or removed.
DegreesPerSegment DegreesPerSegment CMTYPE_FLOAT 45 Minimum angle in a curve before another segment is added. The lower the value, the smoother the curve but also the more complex.
SegementsPerLine SegementsPerLine CMTYPE_INTEGER 5 ThreeJS type places segements evenly along the extrusion so this factor if mulitplied by the number of lines in the path to smooth it out

Object Functions

ReturnsFunctionThrows
ComputeGeometryBisecting()

CM3ProjectorSpherical extends CMProjector

File: CM3ProjectorSpherical

CM3Scene extends CMScene

File: CM3Scene
Name Name CMTYPE_STRING Name that appears in the item and layer lists Style Clear Color CMTYPE_COLOR rgb(255,255,255)

Object Functions

Inherited From: CMScene
ReturnsFunctionThrows
SetBackground()

CM3SkyAndWater extends CMBase

File: CM3SkyAndWater

Settings Group: Dimensions

Setting Name Type Options Default Comments
SceneWidth Scene Width CMTYPE_INTEGER 5000
SceneDepth Scene Depth CMTYPE_INTEGER 5000

Settings Group: Sun

Setting Name Type Options Default Comments
Distance Sun Distance CMTYPE_FLOAT 400
Inclination Sun Inclination CMTYPE_FLOAT 15 angle above the horizton in degrees
Azimuth Sun Azimuth CMTYPE_FLOAT 330 angle clock wise from the north in degre

CM3SpriteText

File: CM3SpriteText

Settings Group: Box

Setting Name Type Options Default Comments
VerticalPad Vertical Pad CMTYPE_FLOAT 3
HorizontalPad Horizontal Pad CMTYPE_FLOAT 3
Radius Corner Radius CMTYPE_FLOAT 3

Style Style CMTYPE_OBJECT null standard HTML 5 settings except the defaults may change and Text Text CMTYPE_STRING null text that will appear in the item TextVisible Text Visible CMTYPE_BOOLEAN true true to make theitem visible, false for hidden TextStyle Text Style CMTYPE_OBJECT null standard HTML 5 settings except the defaults may change

CM3SurfaceGeometry

File: CM3SurfaceGeometry

CM3Text extends CM3Item

File: CM3Text

Settings Group: Font

Setting Name Type Options Default Comments
size Size CMTYPE_FLOAT 12 size of the text
URL URL CMTYPE_STRING global font to use
GlobalFontIndex GlobalFontIndex CMTYPE_INTEGER 0 global font to use

Settings Group: Extrusion

Setting Name Type Options Default Comments
height height CMTYPE_FLOAT 4 amount to extrude the object
curveSegments curveSegments CMTYPE_FLOAT 12 number of points on the curve
bevelEnabled bevelEnabled CMTYPE_BOOLEAN false beveled instead of 90 degree change, keep true for good looking text
bevelSegments bevelSegments CMTYPE_FLOAT 3 number of bevel layers (more makes a smoother bevel but draws slower
bevelSize bevelSize CMTYPE_FLOAT 0.1 width of bevel (distance from shape outline), keep > 0
bevelThickness bevelThickness CMTYPE_FLOAT 0.1 how deep the bevel goes into the extrusion ,keep > 0

CM3THREEBase

File: CM3THREEBase

Object Functions

ReturnsFunctionThrows
SetTHREEMaterial()

CM3Utilities

File: CM3Utilities

Static Functions

ReturnsFunctionThrows
GetRegularPolygonShape()
GetTHREEColor()
GetArcArrayInRadians()

CM3View

File: CM3View

Settings Group: View3D

Setting Name Type Options Default Comments
LookAt LookAt CMTYPE_VECTOR turns the view (really moves the camera controls) to look at the specified location
ShadowMapType ShadowMapType CMTYPE_ENUMERATED "None", "Basic", "PCF", "PCF Soft", "VSM" None shadow type for the renderer, see https://threejs.org/docs/#api/en/constants/Renderer

Object Functions

ReturnsFunctionThrows
ZoomIn()
ZoomOut()
ZoomToMaxBounds()
ZoomToBounds(NewBounds)
SetPosition()
SetRotation()
LookAt()