How to use the textures/tictactoeboard.png function in textures

To help you get started, we’ve selected a few textures 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 turbulenz / turbulenz_engine / samples / tsscripts / templates / datashares.ts View on Github external
clipSpace : mathDevice.v4BuildZero(),
                alphaRef : 0.01,
                color : mathDevice.v4BuildOne()
            });

            draw2D = Draw2D.create({
                graphicsDevice : graphicsDevice
            });

            draw2D.configure({
                viewportRectangle : [0, 0, stageWidth, stageHeight],
                scaleMode : 'scale'
            });

            boardSprite = Draw2DSprite.create({
                texture : textures['textures/tictactoeboard.png'],
                x: boardOffsetX,
                y: boardOffsetY,
                width : boardSizeX,
                height: boardSizeY,
                origin: [0, 0]
            });

            pieceTextures.O = textures['textures/nought.png'];
            pieceTextures.X = textures['textures/cross.png'];

            var x, y;
            var pieceWidth = boardSizeX / 3;
            var pieceHeight = boardSizeY / 3;
            for (x = 0; x < 3; x += 1)
            {
                for (y = 0; y < 3; y += 1)
github turbulenz / turbulenz_engine / apps / tictactoe / tsscripts / tictactoe / tictactoeapp.ts View on Github external
});

            this.draw2D.configure({
                viewportRectangle : [0, 0, this.stageWidth, this.stageHeight],
                scaleMode : 'scale'
            });

            var textures = this.textures;
            var pieceTextures = this.pieceTextures;
            var boardOffsetX = this.boardOffsetX;
            var boardOffsetY = this.boardOffsetY;
            var boardSizeX = this.boardSizeX;
            var boardSizeY = this.boardSizeY;

            this.boardSprite = Draw2DSprite.create({
                texture : textures['textures/tictactoeboard.png'],
                x: boardOffsetX,
                y: boardOffsetY,
                width : boardSizeX,
                height: boardSizeY,
                origin: [0, 0]
            });

            pieceTextures.O = textures['textures/nought.png'];
            pieceTextures.X = textures['textures/cross.png'];

            var pieceWidth = boardSizeX / 3;
            var pieceHeight = boardSizeY / 3;
            var pieceSprites = this.pieceSprites;
            var x, y;
            for (x = 0; x < 3; x += 1)
            {