How to use the scratch-render function in scratch-render

To help you get started, we’ve selected a few scratch-render examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LLK / scratch-gui / src / containers / stage.jsx View on Github external
mouseDownTimeoutId: null,
            mouseDownPosition: null,
            isDragging: false,
            dragOffset: null,
            dragId: null,
            colorInfo: null,
            question: null,
            sprites: null,
            stageURL: null
        };
        if (this.props.vm.renderer) {
            this.renderer = this.props.vm.renderer;
            this.canvas = this.renderer.canvas;
        } else {
            this.canvas = document.createElement('canvas');
            this.renderer = new Renderer(this.canvas);
            this.props.vm.attachRenderer(this.renderer);
        }
        this.props.vm.attachV2SVGAdapter(new V2SVGAdapter());
        this.props.vm.attachV2BitmapAdapter(new V2BitmapAdapter());
        this.props.vm.setVideoProvider(new VideoProvider());
        this.props.vm.on('LOADED_PROJECT', () => {
            console.log('LOADED PROJECT');
            requestAnimationFrame(this.step.bind(this));
        });
    }
    componentDidMount () {

scratch-render

WebGL Renderer for Scratch 3.0

BSD-3-Clause
Latest version published 1 day ago

Package Health Score

75 / 100
Full package analysis

Popular scratch-render functions