maze genarated galler of shaders code example

Example 1: maze genarated galler of shaders

import React, {useEffect} from 'react'
import preset from 'canvas-preset'
export default () => {
  useEffect(
    () => {
      const { size, clear, draw } = preset()
      
      size()
      draw(() => clear('#f44'))
    },
    []
  )
  return <canvas />
}

Example 2: maze genarated galler of shaders

import preset from 'canvas-preset'

export default {
  name: 'JustACircle',
  mounted () {
    const { render } = preset(null, '#justACircle')
    const circle = {
      x: 73,
      y: 42,
      radius: 17,
      color: '#001'
    }
    render(circle).arc()
  }
}

Tags:

Misc Example