new Htmltex()
Rendering html content as dynamic texture.
This system take each entity with one and only one html content, then rendering to multiple THREE.Object3D in scene with help of xv.ecs.sys.Thrender.
Htmltex is an extension of ECS.subsystems. User must add it to ECS explicitly. To create a new instance, entities definition must provided as options arg of constructor.
These definition can be generated with help of Htmltex.createEntityDefs() For exmaple, see htmltex.case.js
- Source:
Methods
(static) createEntityDefs(options) → {array.<object>}
Parameters:
Name | Type | Description |
---|---|---|
options |
object | options.objcanvas: array of [{domId, eid, texsize, visual}] |
- Source:
Returns:
entity definitions
- Type
- array.<object>
(static) h5uuid()
- Source:
refresh(tick, entities)
Parameters:
Name | Type | Description |
---|---|---|
tick |
int | |
entities |
Array.<Entity> |
- Source:
refresh(htmlId, onRefresh)
Reload a Canvas texture from html, which will be updated atuomatically when it's ready.
Parameters:
Name | Type | Description |
---|---|---|
htmlId |
string | |
onRefresh |
function |
- Source: