Skip to main content

Class: CSS3DRendererPlugin

Plugins.CSS3DRendererPlugin

Refs: https://adndevblog.typepad.com/cloud_and_mobile/2015/07/embedding-webpages-in-a-3d-threejs-scene.html http://learningthreejs.com/blog/2013/04/30/closing-the-gap-between-html-and-webgl/ https://github.com/jeromeetienne/threex.htmlmixer/ https://chrome.google.com/webstore/detail/ignore-x-frame-headers/gleekbfjekiniecknbkamfmkohkpodhe https://github.com/guilryder/chrome-extensions/tree/main/xframe_ignore

Extra bypass - doesn't work properly anymore: https://github.com/niutech/x-frame-bypass

<script src="https://unpkg.com/@ungap/custom-elements-builtin"></script>
<script type="module" src="https://unpkg.com/x-frame-bypass"></script>

Hierarchy

Properties

PluginType

Static Readonly PluginType: "CSS3DRenderer"

Defined in

webgi/src/plugins/threejs/CSS3DRendererPlugin.ts:43


enabled

enabled: boolean

Overrides

AViewerPlugin.enabled

Defined in

webgi/src/plugins/threejs/CSS3DRendererPlugin.ts:50


overCanvas

overCanvas: boolean = true

Defined in

webgi/src/plugins/threejs/CSS3DRendererPlugin.ts:55


uiConfig

Optional uiConfig: UiObjectConfig<any, string>

Defined in

webgi/src/plugins/threejs/CSS3DRendererPlugin.ts:298


_dirty

Protected _dirty: boolean = false

Inherited from

AViewerPlugin._dirty

Defined in

webgi/src/core/AViewerPlugin.ts:25


_viewer

Protected Optional _viewer: ViewerApp

Inherited from

AViewerPlugin._viewer

Defined in

webgi/src/core/AViewerPlugin.ts:29

Accessors

dirty

get dirty(): boolean

Returns

boolean

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:18

set dirty(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:22

Methods

onRemove

onRemove(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onRemove

Defined in

webgi/src/core/AViewerPlugin.ts:42


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Inherited from

AViewerPlugin.toJSON

Defined in

webgi/src/core/AViewerPlugin.ts:47


fromJSON

fromJSON(data, meta?): null | CSS3DRendererPlugin | Promise<null | CSS3DRendererPlugin>

Parameters

NameType
dataany
meta?any

Returns

null | CSS3DRendererPlugin | Promise<null | CSS3DRendererPlugin>

Inherited from

AViewerPlugin.fromJSON

Defined in

webgi/src/core/AViewerPlugin.ts:54


addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameType
type"" | "serialize" | "deserialize"
listener(event: IEvent<"" | "serialize" | "deserialize">) => void

Returns

void

Inherited from

AViewerPlugin.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:48


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameType
type"" | "serialize" | "deserialize"
listener(event: IEvent<"" | "serialize" | "deserialize">) => void

Returns

boolean

Inherited from

AViewerPlugin.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:56


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameType
type"" | "serialize" | "deserialize"
listener(event: IEvent<"" | "serialize" | "deserialize">) => void

Returns

void

Inherited from

AViewerPlugin.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<"" | "serialize" | "deserialize">

Returns

void

Inherited from

AViewerPlugin.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74


onAdded

onAdded(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onAdded

Defined in

webgi/src/plugins/threejs/CSS3DRendererPlugin.ts:104


attachIFrameToSelected

attachIFrameToSelected(): Promise<void>

Returns

Promise<void>

Defined in

webgi/src/plugins/threejs/CSS3DRendererPlugin.ts:179


attachIFrame

attachIFrame(modelObj, url, clientWidth): CSS3DObject

Parameters

NameType
modelObjIModel<Mesh<BufferGeometry, Material | Material[]>>
urlstring
clientWidthnumber

Returns

CSS3DObject

Defined in

webgi/src/plugins/threejs/CSS3DRendererPlugin.ts:193


attachCSS3DObject

attachCSS3DObject(cssObj, modelObj): void

Parameters

NameType
cssObjCSS3DObject
modelObjIModel<Mesh<BufferGeometry, Material | Material[]>>

Returns

void

Defined in

webgi/src/plugins/threejs/CSS3DRendererPlugin.ts:201


onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onDispose

Defined in

webgi/src/plugins/threejs/CSS3DRendererPlugin.ts:338

Constructors

constructor

new CSS3DRendererPlugin(enabled?)

Parameters

NameTypeDefault value
enabledbooleantrue

Overrides

AViewerPlugin.constructor

Defined in

webgi/src/plugins/threejs/CSS3DRendererPlugin.ts:57