DrawableModel
Extends: Drawable
Properties
model(Model3d) — The model to draw. After replacing it or changing its faces, calluseImpostor(boolean) — Experimental (#345, specs/2026-10-22-model-impostors-design.md): while the cameraimpostorBlitRollOnly(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 redrawingimpostorStripStepPx(float) — How far (px) a strip's single vertical scale may leave any of its columns from theimpostorStripWidth(integer) — A fixed strip width, in pixels of the captured bitmap. 0 sizes strips byimpostorStripKnots(integer) — Where the strips' hint points come from: 0 fits them to the bounding box's visibleimpostorStripMaxPoints(integer) — The most visible vertices a strip fit uses (an evenly spread subset of them): eachimpostorStripPerspective(boolean) — Interpolate the strips with perspective between hint points, exact for flat walls betweenimpostorStripMaxError(float) — How far (px) the strips may put any visible vertex from where it really is before theimpostorStripMaxStrips(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 theimpostorBlitErrorScale(float) — Strips are the middle tier between the single blit and a redraw: with them on, the singleimpostorBlitMaxAngleDegrees(float) — With strips on, how far (degrees) the view may turn before the single blit hands over toimpostorBlitMaxDepthRatio(float) — How far the model may reach in depth, as a multiple of its nearest point's depth, andimpostorBlitAngleScale(float) — With strips on, scales the single blit's angle limit (the quality level's, orimpostorRedrawOnNewFace(boolean) — Redraw the impostor, at any quality level, once a side of the model that faced away atimpostorNewFaceMinArea(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 thanimpostorStripLevel(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,
): DrawableModelParameters
owner(BGE.GameEntity)model(Model3d)args(roAssociativeArray, optional, default: "{}")
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
options(BGE.ImpostorOptions)
Returns
void
Example
CODE
model.applyImpostorOptions(params.pick(["strips", "stripStep", "blitScale"]))addToRenderer(rendererObj: Renderer): BGE.SceneObject
Parameters
rendererObj(Renderer)
Returns