DrawableModel

Extends: Drawable

Properties

  • model (Model3d) — The model to draw. After replacing it or changing its faces, call
  • useImpostor (boolean) — Experimental (#345, specs/2026-10-22-model-impostors-design.md): while the camera
  • impostorBlitRollOnly (boolean) — Experimental (#556): rotate the impostor's single blit only to follow the camera's roll.
  • useImpostorStrips (boolean) — Experimental (#556): when the impostor's single scaled blit no longer fits, try redrawing
  • impostorStripStepPx (float) — How far (px) a strip's single vertical scale may leave any of its columns from the
  • impostorStripWidth (integer) — A fixed strip width, in pixels of the captured bitmap. 0 sizes strips by
  • impostorStripKnots (integer) — Where the strips' hint points come from: 0 fits them to the bounding box's visible
  • impostorStripMaxPoints (integer) — The most visible vertices a strip fit uses (an evenly spread subset of them): each
  • impostorStripPerspective (boolean) — Interpolate the strips with perspective between hint points, exact for flat walls between
  • impostorStripMaxError (float) — How far (px) the strips may put any visible vertex from where it really is before the
  • impostorStripMaxStrips (integer) — The most strips one redraw may take; past it the model is redrawn instead.
  • impostorStripMaxAngleDegrees (float) — How far (degrees) the view may turn from the capture's and still try strips. 0 keeps the
  • impostorBlitErrorScale (float) — Strips are the middle tier between the single blit and a redraw: with them on, the single
  • impostorBlitMaxAngleDegrees (float) — With strips on, how far (degrees) the view may turn before the single blit hands over to
  • impostorBlitMaxDepthRatio (float) — How far the model may reach in depth, as a multiple of its nearest point's depth, and
  • impostorBlitAngleScale (float) — With strips on, scales the single blit's angle limit (the quality level's, or
  • impostorRedrawOnNewFace (boolean) — Redraw the impostor, at any quality level, once a side of the model that faced away at
  • impostorNewFaceMinArea (float) — Sides smaller than this fraction of the model's whole surface (a plane's faces added up)
  • impostorStripErrorScale (float) — Scales the quality level's modelImpostorError for strips, so they can hold on longer than
  • impostorStripLevel (boolean) — Fit the strips in a level view (no pitch or roll) and turn each strip as it's drawn, so

Constructor

new DrawableModel( owner: BGE.GameEntity, model: Model3d, args?: roAssociativeArray, ): DrawableModel

Parameters


Instance Methods

applyImpostorOptions(options: BGE.ImpostorOptions): void

Sets the impostor fields from a bag of short names, e.g. deep-link params (strips=1 stripStep=4), so a game can tune impostors without code per field.

Parameters

Returns

  • void

Example

CODE
model.applyImpostorOptions(params.pick(["strips", "stripStep", "blitScale"]))

addToRenderer(rendererObj: Renderer): BGE.SceneObject

Parameters

Returns