Class
RenderCorePlugin
View sourceExtendsPlugin
Adds shared rendering asset support to an App.
The plugin provides Image, Mesh, Shader, and
BasicMaterial as render asset types with their lifecycle events.
ImageImporter supports png and jpeg image assets through
AssetServerPlugin.
Typed access to the image, mesh, and basic-material pools is available
through ImageAssets, MeshAssets, and
BasicMaterialAssets. These aliases refer to the corresponding
Assets pools.
The plugin also connects Meshed and
BasicMaterialInstance to the built-in material integration. Use
MaterialInstancePlugin to configure additional material and
component pairs.
Register CorePlugin, ReflectPlugin, ColorPlugin,
MathPlugin, AssetServerPlugin, HierarchyPlugin,
Transform2DPlugin, and Transform3DPlugin with the app.
These dependencies are not installed automatically.
Examples
import { App } from '@wimaengine/app'
import { AssetServerPlugin } from '@wimaengine/asset'
import { ColorPlugin } from '@wimaengine/color'
import { CorePlugin, defaultRunner } from '@wimaengine/core'
import { HierarchyPlugin } from '@wimaengine/hierarchy'
import { MathPlugin } from '@wimaengine/math'
import { ReflectPlugin } from '@wimaengine/reflect'
import { RenderCorePlugin } from '@wimaengine/render-core'
import { Transform2DPlugin, Transform3DPlugin } from '@wimaengine/transform'
new App()
.registerPlugin(new ReflectPlugin())
.registerPlugin(new CorePlugin())
.registerPlugin(new ColorPlugin())
.registerPlugin(new MathPlugin())
.registerPlugin(new AssetServerPlugin())
.registerPlugin(new HierarchyPlugin())
.registerPlugin(new Transform2DPlugin())
.registerPlugin(new Transform3DPlugin())
.registerPlugin(new RenderCorePlugin())
.setRunner(defaultRunner)
.run()Constructor
Methods
register(app: App): void
View sourceInstalls render assets, typed asset-pool aliases, a component hook, and
built-in material integration in an App.
The app receives Image, Mesh, Shader, and
BasicMaterial support, together with the typed pools
ImageAssets, MeshAssets, and
BasicMaterialAssets. The ImageImporter handles png
and jpeg image assets. The Meshed component hook releases its
mesh handle when the component or its entity is removed, and the built-in
BasicMaterialInstance integration supports material rendering.
requires(): TypeId[]
View sourceReturns the plugin IDs required directly by this renderer.
The returned IDs identify CorePlugin, ReflectPlugin,
ColorPlugin, and MathPlugin. The app validates these
dependencies but does not install missing plugins automatically.
