Skip to content
This repository was archived by the owner on Feb 21, 2019. It is now read-only.
This repository was archived by the owner on Feb 21, 2019. It is now read-only.

How implement Stardust in a TypeScript-only project? #4

@nextlevelshit

Description

@nextlevelshit
import * as Stardust from 'stardust-core';
import { WebGLPlatform, WebGLCanvasPlatform2D } from 'stardust-webgl';

This would be my attempt to include the basic classes from stardust. Now I would like to create a platform:

const canvasEl = document.createElement('canvas');
const platform = Stardust.platform('webgl-2d', canvasEl, 100, 100);

This does not look try, even it is intuitive for me do take this approach. Finally, I've got stuck on this error:

ERROR TypeError: Cannot read property 'apply' of undefined
at Function.push../node_modules/stardust-core/dist/platform/index.js.Platform.Create (index.js:72)
at Object.platform (index.js:82)

I've already tried to back-trace that error, but of the missing documentation and TS-only examples I did not get far.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions