macbear_3d library

Classes

BvhAnimator
Handles playback and interpolation of BVH motion data.
BvhSkeleton
Visualizes a BVH skeleton using joint spheres and bone boxes.
GltfAnimation
glTF Animation
GltfAnimationChannel
glTF Animation Channel
GltfAnimationSampler
glTF Animation Sampler
GltfDocument
glTF 文件解析結果
GltfImage
glTF Image
GltfMaterial
glTF Material
GltfMesh
glTF Mesh
GltfNode
glTF Node
GltfPrimitive
glTF Primitive (一個 Mesh 可能有多個 Primitive)
GltfSkin
glTF Skin
GltfTexture
glTF Texture
GraphicsInfo
M3AppEngine
The main application engine singleton that manages the Flutter-ANGLE context.
M3BloomPass
M3Bounding
Bounding box and sphere for geometry.
M3BoxGeom
A rectangular box (cuboid) geometry with configurable dimensions.
M3Camera
A 3D camera with view transformation, frustum culling, and orbit controls.
M3CameraOrbitController
Camera controller for orbit, pan, and zoom interactions.
M3CapsuleGeom
A capsule geometry with hemispherical caps and a cylindrical body.
M3Collider
M3ColliderDesc
Collider descriptor
M3CompositePass
scene -> bloom -> composite -> final
M3Constants
M3CylinderGeom
A cylinder or cone geometry with configurable top and bottom radii.
M3DebugAxisGeom
A coordinate axis helper geometry for debugging and visualization.
M3DebugOptions
M3DebugSphereGeom
A wireframe sphere geometry for visualizing bounding volumes.
M3DirectionalLight
directional light
M3DofPass
Depth of Field (DOF) post-processing pass
M3EllipsoidGeom
A tri-axial ellipsoid geometry with independent X, Y, and Z radii.
M3Entity
A scene entity representing a renderable object with transform and physics.
M3ExternalTexture
A texture that can be updated from an external source like a video stream or camera.
M3Fog
Configures fog settings for a 3D scene.
M3Framebuffer
A WebGL framebuffer object for off-screen rendering (e.g., shadow maps).
M3FxaaPass
FXAA anti-aliasing pass
M3Geom
Abstract base class for all 3D geometry primitives.
M3GltfGeom
Geometry loaded from a glTF model primitive.
M3GltfLoader
Loader for glTF and GLB 3D model files from assets or binary data.
M3HeightField
Height field data for physics. Can be created from M3PlaneGeom.toHeightField, M3TerrainGeom, or directly from a heightmap image via M3HeightField.fromHeightmap.
M3InputController
Abstract interface for handling touch, scroll, and keyboard input events.
M3Light
A directional or positional light source for scene illumination.
M3LineGeom
A line geometry.
M3Log
M3Material
Material properties for rendering (diffuse color, specular, shininess, textures).
M3Mesh
A 3D mesh object that combines geometry, material properties, and optional skin for animation.
M3NoCollider
M3Node
A hierarchical node with parent/child relationships.
M3Noise
Utility class for procedural noise generation.
M3NoPhysicsEngine
No-op physics engine used when physics is disabled or not available
M3NoRigidBody
No-op rigid body used when physics is disabled or not available
M3ObjGeom
Geometry loaded from a Wavefront OBJ file.
M3OctahedralGeom
An octahedral geometry with a configurable radius.
M3Package
M3PhysicsEngine
Abstract physics engine interface.
M3PhysicsSystem
Physics-entity binding layer.
M3PinchInfo
Information about a two-finger pinch gesture (scale, center, distance).
M3PlanarReflection
M3PlaneGeom
A subdivided plane geometry with configurable segments and optional height mapping.
M3PointLight
point light
M3PointLightManager
light manager
M3PostProcess
M3Program
program for GLSL
M3ProgramEye
M3ProgramLighting
lighting program: lighting + fog
M3ProgramManager
M3ProgramShadow
abstract shadow program: lighting + shadow + fog
M3ProgramShadowCSM
M3ProgramShadowmap
shadowmap program
M3ProgramWater
water distortion shader program
M3ProgramWaterCSM
water distortion shader program with CSM
M3Projection
Manages projection matrix and viewport settings for perspective or orthographic rendering.
M3PyramidGeom
A four-sided pyramid geometry with a rectangular base and apex.
M3Rectangle2D
A 2D rectangle shape with configurable position, size, and UV mapping.
M3ReflectionProbe
M3RenderContext
M3RenderEngine
The WebGL rendering engine that manages shaders, framebuffers, and scene rendering.
M3RenderItem
Represents a single sub-mesh draw call data for sorting and batching.
M3RenderOptions
Rendering options for the engine (wireframe, helpers, shadows, FPS display).
M3RenderQueue
A queue of render items to be processed in a specific order.
M3RenderStats
Rendering statistics
M3RenderTarget
M3RenderTargetManager
render target manager
M3ResourceManager
Manager responsible for loading, caching, and providing access to various engine resources.
M3Resources
M3RigidBody
Abstract physics body for an entity.
M3RigidBodyDesc
Rigid body descriptor
M3Scene
Abstract base class for 3D scenes in the engine.
M3ScenePass
scene render pass
M3ShaderOptions
M3ShaderVariantBits
M3ShadowCascade
M3ShadowMap
Shadow map renderer for real-time shadows from directional lights.
M3Shape2D
Base class for 2D shapes with dynamic vertex buffers for lines, triangles, and images.
M3Skin
Skeletal animation skin data containing bone matrices and inverse bind matrices.
M3Skybox
A skybox rendered using a cubemap texture.
M3SphereGeom
A UV sphere geometry with configurable radius and segment count.
M3SpotLight
Spot light — a cone-shaped positional light with inner and outer angles.
M3SpotLightManager
Spotlight manager — packs up to 8 spotlights into uSpotLights[8] (1 mat4 each).
M3Sprite2D
A 2D sprite with texture atlas support (row x column grid).
M3SubMesh
M3TerrainGeom
Procedural terrain geometry.
M3TerrainLodConfig
============================================================ M3TerrainLodConfig — LOD distance thresholds / segment count table / hysteresis settings
M3TerrainLodResolver
============================================================ M3TerrainLodResolver — pure logic layer: distance -> desired LOD -> LOD after hysteresis No GL / renderer dependency, so it can be unit tested in isolation.
M3TerrainStitchBuilder
Helper class to generate stitched face (TRIANGLES) and wireframe (LINES) indices for a tile of any LOD given the current LOD level and neighbor stitch flags.
M3TerrainTileGeom
A terrain tile whose vertex/normal/UV buffers (VBO) are owned per-tile. The index buffers (IBO for faces and edges) are shared across all tiles.
M3Text2D
ASCII text renderer using a monospaced font texture atlas.
M3TextGeom
M3TextTexture
M3Texture
WebGL texture wrapper supporting 2D and cubemap textures.
M3TiledPlaneMesh
A tiled plane mesh consisting of a grid of M3SubMeshes.
M3TiledTerrain
Result of M3TiledTerrain.build / M3TiledTerrain.fromHeightField.
M3TorusGeom
A torus (donut) geometry with configurable major and minor radii.
M3Touch
Represents a single touch sequence (down, move, up) with path history.
M3TouchManager
Manages multiple touch points and provides pinch/pan gesture detection.
M3TouchPoint
A single touch point with position, button state, and timestamp.
M3TrueTypeParser
A minimal TrueType (TTF) and OpenType (OTF) font parser to extract glyph paths for 3D reconstruction.
M3View
M3Water
water effect, using plane reflection / refraction.
M3WaterFlowLayer
Layer for water wave animation
MassiveScene
Massive scene with 1000 spheres and cubes.
PlatformInfo
SampleScene
A demonstration scene with cubes, spheres, physics, and a skybox.

Enums

M3AlphaMode
Alpha blending modes for materials.
M3Axis
M3ColliderShapeType
M3DepthMode
Controls how a depth attachment is created for an M3RenderTarget.
M3FillMode
rendering mode: solid - triangle, wireframe - edges
M3HelperType
M3PlanarPass
M3ReflectionType
A WebGL shader program wrapper for GLSL vertex and fragment shaders.
M3RigidBodyType
M3ShadingMode
M3TonemapMode
M3WaterCameraState

Mixins

M3FogShader
fog shader in program
M3LightingShader
lighting shader in program
M3ShadowShader
shadow shader in program
M3WaterShader
water shader in program

Constants

NO_SHADOW_INDEX → const int