Always remain updated about current software development trends
To select shapes by type or class name withKineticJS, we can use theget()method with the name of the type or class name; Theget()method returns an array of nodes that match the selector string. The return array is a Kinetic.Collection array, which...
To draw things inside of clipping regions withKineticJS, we can set theclipFuncproperty of any container, including a group, a layer, or the stage. Clipping functions are passed a canvas renderer, from which we can access its context and draw a path. ...
To tween a filter usingKineticJS, we can simply tween the properties associated with the filter. In this tutorial, we'll tween the filterRadius property, which controls the amount of blur applied to the image.
To create shiny materials with Three.js, we can use theMeshPhongMaterialmaterial which can be configured withspecular,color,emissive, andshininess. The specular property defines the lightest color of light applied to the material, the color property defines...
To create a simple material which is affected by light and shadow with Three.js, we can use the MeshLambertMaterial material. Lambert materials require at least one non ambient light source, such as a directional light or point light.
To fill a 3D geometry with a flat color, we can use theMeshBasicMaterialmaterial and set thecolorproperty. Light and shadow effects cannot be applied to this material. This material does not require a light source to render.
To create a wireframe with Three.js, we can set thewireframeproperty to true when instantiating a material.
In Three.js, materials are thin 2D sheets that wrap around 3D shapes. The simplest material to work with is theNormalMaterialmaterial, which uses different colors to represent different angles of light reflection. The Normal material has no arguments.
To create a text label withKineticJS, which can be used for creating text with backgrounds, simple tooltips, or tooltips with pointers, we can instantiate aKinetic.Label()object. For a full list of attributes and methods, check out theKinetic.Label documentation.
To create custom animations withKineticJS, we can use theKinetic.Animationconstructor which takes two arguments, the required update function and an optional layer, or array of layers, that will be updated with each animation frame. The animation function...