DrawableSphere

Extends: DrawableCircle

A circle that always looks the same from any camera angle, because a sphere looks the same from every direction. Everything about the fill/outline is identical to DrawableCircle (which this extends unchanged, including addToScene) - the only difference is forcing drawMode to directScaled in the constructor, which billboards (never rotates/foreshortens) while still scaling with camera distance in 3D. See SceneObject.getActualDrawMode(): it only resolves the matchCamera default through the camera, so any other explicit drawMode - this one included - is used as-is.

Deliberately does NOT re-append args after forcing drawMode (DrawableCircle's own constructor already applied them once) - a caller passing {drawMode: ...} here should not be able to silently defeat a DrawableSphere's entire reason for existing. A caller who genuinely wants a different draw mode can still assign sphere.drawMode = ... directly after construction.


Constructor

new DrawableSphere( owner: GameEntity, radius: float, args?: roAssociativeArray, ): DrawableSphere

Parameters

  • owner (GameEntity)
  • radius (float)
  • args (roAssociativeArray, optional, default: "{}")