Skip to content

Instantly share code, notes, and snippets.

View Shchvova's full-sized avatar

Vlad Svoka Shchvova

View GitHub Profile
@Shchvova
Shchvova / main.lua
Created September 8, 2017 18:06
Graph Filter Demo
display.setStatusBar( display.HiddenStatusBar )
local effect = {
language = "glsl",
category = "filter",
name = "graphDemo",
graph =
{
nodes = {
@Shchvova
Shchvova / build.settings
Last active August 15, 2017 16:37
Corona Batching
--
-- For more information on build.settings, see the Project Build Settings guide at:
-- https://docs.coronalabs.com/guide/distribution/buildSettings
--
settings =
{
orientation =
{
-- Supported values for orientation:
@Shchvova
Shchvova / TolkPlugin.cpp
Last active October 2, 2018 06:21
Developing Windows Plugin
// TolkPlugin.cpp - simple Tolk wrapper for Corona SDK
#include "CoronaLua.h"
#include "CoronaMacros.h"
#include <windows.h>
#include "Tolk.h"
#pragma comment(lib, "tolk.lib")
@Shchvova
Shchvova / CloudKit.lua
Created October 5, 2016 15:17
iCloud sample
local iCloud = require "plugin.iCloud"
local json = require "json"
local composer = require( "composer" )
local widget = require( "widget" )
local scene = composer.newScene()
local FocusEngine = require( "FocusEngine" )
local focusEngineObjects = {}
@Shchvova
Shchvova / mail.lua
Last active July 14, 2016 17:30
Corona FPS Benchmark
-- this code will introduce global function BenchmarkFPS
-- which would print out some statistics collected over 5 seconds
function BenchmarkFPS(duration, skip)
duration = duration or 5000
skip = skip or 500
local function mean( t )
local sum , count = 0, 0
for _,v in pairs(t) do
sum = sum + v
count = count + 1
#import "PluginMessages.h"
#include "CoronaRuntime.h"
#import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h>
class PluginMessages;
@Shchvova
Shchvova / Atlas.md
Created June 23, 2016 15:14
Atlas spine-runtime documentation.

Documentation:

Lua runtime: spine.Atlas.parse

Atlas.lua introduces spine.Atlas.parse(atlasPath, baseDir) funciton. This function can be use across Lua runtimes to implement their their own image sheet bindings. It will return Array of Pages or nil if error.

Page properties:

  • name - filename of the page ("raptor.png")
  • size - dimmensions of original image ([1022,1022])
  • format - texture format ("RGBA8888")
@Shchvova
Shchvova / Readme.md
Last active June 6, 2016 01:45
Loading Spine atlases into Corona

Loading images from Spine atlases instead of separate files.

Add spine-atlas-loader.lua so you can require it, and use as shown in spineboy-demo-atlas.lua.

Make sure that directory has spineboy.json, spineboy.atlas and all spineboy.png.

So far only basic features are supported. Cropped sheets aren't supported.

Update: this version requires at least 2016.2892

class Obj:
def __init__(self):
self.a = 1
def fn(self, b, c):
print(self.a,b,c)
a = Obj()
a.fn(2, 3) # (1,2,3)
@Shchvova
Shchvova / _readme.md
Last active April 11, 2022 21:27
Planets shader for Corona

#Corona planet shader v0.1#

Alt text

###Instructions###

  1. Download and unpack this gist into folder
  2. Add this assets two images and name them "red.jpg" and "[blue.jpg] (http://i.imgur.com/V3Tw97g.jpg)" in same folder (you will have to download and rename them)
  3. Open project in Corona Simulator 🤘