Home Reference Source
import PolygonShape from 'oxygen-core/components/PolygonShape.js'
public class | source

PolygonShape

Extends:

ComponentShape → PolygonShape

Static Member Summary

Static Public Members
public static get

propsTypes: {...undefined: Object, "vertices": string}

Static Method Summary

Static Public Methods
public static

factory(): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get
public set

Method Summary

Public Methods
public

containsPoint(globalPoint: *, layer: undefined): boolean

public
public

onPropertySerialize(name: *, value: *): *

Inherited Summary

From class Component
public static get
public static

Component factory.

public get
public

[name]: *

public

deserialize(json: *)

Deserialize JSON properties into this component.

public

Destructor (dispose internal resources and detach from entity).

public

onAction(name: string, args: *)

Called when action arrived.

public

onAlterActionArguments(name: string, args: *): array | undefined

Called when asked to alter arrived action parameters.

public

Called after attached to entity.

public

Called before detached from entity.

public

onPropertySerialize(name: string, value: *): *

Called when property is serialized.

public

onPropertySetup(name: string, value: *)

Called when given property is deserialized.

public

serialize(): *

Serialize component into JSON data.

From class Shape
public static get

propsTypes: {"layers": string}

public static

factory(): *

public get
public set
public

acceptsLayer(name: *): *

public

containsPoint(globalPoint: *, layer: undefined)

public

containsPointInChildren(globalPoint: *, layer: undefined): *

public

Static Public Members

public static get propsTypes: {...undefined: Object, "vertices": string} source

Override:

Shape#propsTypes

Static Public Methods

public static factory(): * source

Component factory.

Override:

Shape#factory

Return:

*

Public Constructors

public constructor() source

Constructor.

Override:

Shape#constructor

Public Members

public get vertices: * source

public set vertices source

Public Methods

public containsPoint(globalPoint: *, layer: undefined): boolean source

Override:

Shape#containsPoint

Params:

NameTypeAttributeDescription
globalPoint *
layer undefined
  • optional
  • default: undefined

Return:

boolean

public dispose() source

Destructor (dispose internal resources and detach from entity).

Override:

Shape#dispose

public onPropertySerialize(name: *, value: *): * source

Called when property is serialized.

Override:

Component#onPropertySerialize

Params:

NameTypeAttributeDescription
name *
value *

Return:

*