Owner component. When destroyed, the owner will destroy this component as well.
The PhongMaterial configuration
ID of this Component, unique within the Scene.
Components are mapped by this ID in {@link Scene.components}.
Arbitrary, user-defined metadata on this component.
The parent Scene that contains this Component.
The viewer that contains this Scene.
Gets the PhongMaterial alpha.
This is a factor in the range [0..1] indicating how transparent the PhongMaterial is.
A value of 0.0 indicates fully transparent, 1.0 is fully opaque.
Multiplies by PhongMaterial.alphaMap.
Default value is 1.0.
Sets the PhongMaterial alpha.
This is a factor in the range [0..1] indicating how transparent the PhongMaterial is.
A value of 0.0 indicates fully transparent, 1.0 is fully opaque.
Multiplies by PhongMaterial.alphaMap.
Default value is 1.0.
Gets the PhongMaterial's alpha cutoff value.
This specifies the cutoff threshold when PhongMaterial.alphaMode equals "mask". If the alpha is greater than or equal to this value then it is rendered as fully opaque, otherwise, it is rendered as fully transparent. A value greater than 1.0 will render the entire material as fully transparent. This value is ignored for other modes.
Alpha is the combined result of PhongMaterial.alpha and PhongMaterial.alphaMap.
Default value is 0.5.
Sets the PhongMaterial's alpha cutoff value.
This specifies the cutoff threshold when PhongMaterial.alphaMode equals "mask". If the alpha is greater than or equal to this value then it is rendered as fully opaque, otherwise, it is rendered as fully transparent. A value greater than 1.0 will render the entire material as fully transparent. This value is ignored for other modes.
Alpha is the combined result of PhongMaterial.alpha and PhongMaterial.alphaMap.
Default value is 0.5.
Gets the PhongMaterials's alpha {@link Fresnel}.
Applies to PhongMaterial.alpha.
Gets the PhongMaterials's alpha {@link Texture}.
Multiplies by PhongMaterial.alpha.
Gets the PhongMaterial's alpha rendering mode.
This governs how alpha is treated. Alpha is the combined result of PhongMaterial.alpha and PhongMaterial.alphaMap.
Supported values are:
Sets the PhongMaterial's alpha rendering mode.
This governs how alpha is treated. Alpha is the combined result of PhongMaterial.alpha and PhongMaterial.alphaMap.
Supported values are:
Gets the PhongMaterial's ambient color.
Default value is [0.3, 0.3, 0.3].
Sets the PhongMaterial's ambient color.
Default value is [0.3, 0.3, 0.3].
Gets the PhongMaterials's ambient {@link Texture}.
Multiplies by PhongMaterial.ambient.
Sets the PhongMaterial's diffuse color.
Multiplies by PhongMaterial.diffuseMap.
Default value is [1.0, 1.0, 1.0].
Sets the PhongMaterial's diffuse color.
Multiplies by PhongMaterial.diffuseMap.
Default value is [1.0, 1.0, 1.0].
Gets the PhongMaterials's diffuse {@link Fresnel}.
Applies to PhongMaterial.diffuse.
Gets the PhongMaterials's diffuse {@link Texture}.
Multiplies by PhongMaterial.diffuse.
Gets the PhongMaterial's emissive color.
Multiplies by PhongMaterial.emissiveMap.
Default value is [0.0, 0.0, 0.0].
Sets the PhongMaterial's emissive color.
Multiplies by PhongMaterial.emissiveMap.
Default value is [0.0, 0.0, 0.0].
Gets the PhongMaterials's emissive {@link Fresnel}.
Applies to PhongMaterial.emissive.
Gets the PhongMaterials's emissive {@link Texture}.
Multiplies by PhongMaterial.emissive.
Gets the winding direction of front faces on attached Meshes.
Default is "ccw".
Sets the winding direction of geometry front faces.
Default is "ccw".
Gets the PhongMaterial's line width.
This is not supported by WebGL implementations based on DirectX [2019].
Default value is 1.0.
Sets the PhongMaterial's line width.
This is not supported by WebGL implementations based on DirectX [2019].
Default value is 1.0.
Gets the PhongMaterials's normal map {@link Texture}.
Gets the PhongMaterials's ambient occlusion {@link Texture}.
Gets the PhongMaterial's point size.
Default value is 1.0.
Sets the PhongMaterial's point size.
Default value is 1.0.
Gets how much {@link ReflectionMap} is reflected by this PhongMaterial.
This is a scalar in range [0-1]. Default value is 1.0.
The surface will be non-reflective when this is 0, and completely mirror-like when it is 1.0.
Multiplies by PhongMaterial.reflectivityMap.
Sets how much {@link ReflectionMap} is reflected by this PhongMaterial.
This is a scalar in range [0-1]. Default value is 1.0.
The surface will be non-reflective when this is 0, and completely mirror-like when it is 1.0.
Multiplies by PhongMaterial.reflectivityMap.
Gets the PhongMaterials's reflectivity {@link Fresnel}.
Applies to PhongMaterial.reflectivity.
Gets the PhongMaterials's reflectivity {@link Texture}.
Multiplies by PhongMaterial.reflectivity.
Gets the PhongMaterial shininess.
This is a factor in range [0..128] that determines the size and sharpness of the specular highlights create by this PhongMaterial.
Larger values produce smaller, sharper highlights. A value of 0.0 gives very large highlights that are almost never desirable. Try values close to 10 for a larger, fuzzier highlight and values of 100 or more for a small, sharp highlight.
Default value is 80.0.
Sets the PhongMaterial shininess.
This is a factor in range [0..128] that determines the size and sharpness of the specular highlights create by this PhongMaterial.
Larger values produce smaller, sharper highlights. A value of 0.0 gives very large highlights that are almost never desirable. Try values close to 10 for a larger, fuzzier highlight and values of 100 or more for a small, sharp highlight.
Default value is 80.0.
Gets the PhongMaterial's specular color.
Multiplies by PhongMaterial.specularMap.
Default value is [1.0, 1.0, 1.0].
Sets the PhongMaterial's specular color.
Multiplies by PhongMaterial.specularMap.
Default value is [1.0, 1.0, 1.0].
Gets the PhongMaterials's specular {@link Fresnel}.
Applies to PhongMaterial.specular.
Gets the PhongMaterials's specular {@link Texture}.
Multiplies by PhongMaterial.specular.
Destroys all Components that are owned by this. These are Components that were instantiated with this Component as their first constructor argument.
Destroys this component.
Logs an error for this component to the JavaScript console.
The console message will have this format: [ERROR] [<component type> =<component id>: <message>
Also fires the message as an "error" event on the parent Scene.
The message to log
Fires an event on this component.
Notifies existing subscribers to the event, optionally retains the event to give to any subsequent notifications on the event as they are made.
The event type name
The event parameters
Returns true if there are any subscribers to the given event on this component.
The event
True if there are any subscribers to the given event on this component.
Tests if this component is of the given type, or is a subclass of the given type.
Logs a console debugging message for this component.
The console message will have this format: [LOG] [<component type> <component id>: <message>
Also fires the message as a "log" event on the parent Scene.
The message to log
Cancels an event subscription that was previously made with Component.on or Component.once.
Subscription ID
Subscribes to an event on this component.
The callback is be called with this component as scope.
The event
Called fired on the event
Handle to the subscription, which may be used to unsubscribe with .off.
Subscribes to the next occurrence of the given event, then un-subscribes as soon as the event is subIdd.
This is equivalent to calling Component.on, and then calling Component.off inside the callback function.
Data event to listen to
Called when fresh data is available at the event
Logs a warning for this component to the JavaScript console.
The console message will have this format: [WARN] [<component type> =<component id>: <message>
Also fires the message as a "warn" event on the parent Scene.
The message to log
Generated using TypeDoc
Configures the normal rendered appearance of Meshes using the non-physically-correct Blinn-Phong shading model.