Categories
Gutenberg Wordpress

Match editor style to front-end

If you create a theme for WordPress, you will probably want the front-end and the back-end (the editor) look alike in most cases. It’s not that hard if you know how to do it. wp_enqueue_style You could use the enqueue_block_editor_assets hook to add styles, using wp_enqueue_style. This is how the twentytwenty theme does it. It […]

Categories
Animation JavaScript Web development

Move eased dot along a curve

In the Bezier curve, perceived as a graph, the horizontal axis shows the time passed, on a scale of zero (at the start) to one (at the end point). The vertical axis shows the progress in distance covered, also from zero (no progress) to one (loop completed), although progress can dive below zero or exceed […]

Categories
Animation JavaScript

Move a dot along a path

Create a dot moving along a path using SVG and JavaScript

Categories
Geometry Mathematics

Bouncing in a box

How to intersect a parabola with a line, and other graphics solutions.

Categories
Geometry Mathematics

Angle bisector theorem

Intuitive approach to proof of angle bisector theorem

Categories
3D Blender

Modeling a worm with bones

Trial and error tutorial: How to model a simple worm that wriggles using an armature.

Categories
3D Blender

Scaling in Blender: mind Object vs. Edit mode

When modelling a 3D object in Blender it is important to be aware whether you are in Object Mode or Edit Mode when you change the shape of an object. A mistake that is easily made is to deform an object in Object Mode, and then to find that tools in Edit Mode do not […]

Categories
Animation CSS JavaScript Web development

Animation on page load

To bring a webpage to life, you may want to start an animation when the content of the page appears. For example, a text or an image fades in, or moves to certain position, or grows to a certain size, etc.
Here is a basic method to kick off a page load transition

Categories
Typography Web development

Understanding font size

What does it mean to specify font-size to be, say, 16px? Exactly what part of the font is 16px?

Categories
CSS Web development

Scaling grid tiles containing text

Suppose we have a design with a component that contains an image and text, with responsive dimensions and a fixed height to width ratio. The font size scales too, so the text wraps the same for each width. This is what the HTML structure of the component might look like: The height of the tile […]