Skip to content

Instantly share code, notes, and snippets.

Storie Event Handling Demo

Interactive demo showcasing keyboard, mouse, and touch event handling.

print("=== Storie Interactive Demo ===")
print("Display size: " & $width & " x " & $height & " pixels")
print("Try moving your mouse, clicking, scrolling, and typing!")
# import raylib, std/[math, lenientops]
const
ScreenWidth = 800
ScreenHeight = 450
proc main =
# Initialization
initWindow(ScreenWidth, ScreenHeight, "raylib [shapes] example - following eyes")
setTargetFPS(60)
# ****************************************************************************************
#
# raylib [core] example - 2d camera mouse zoom
#
# Example originally created with raylib 4.2, last time updated with raylib 4.2
#
# Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
# BSD-like license that allows static linking with closed source software
#
# Copyright (c) 2022 Jeffery Myers (@JeffM2501)
# ****************************************************************************************
#
# raylib [core] example - 2D camera platformer
#
# This example has been created using raylib 2.5 (www.raylib.com)
# raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
#
# Example contributed by arvyy (@arvyy) and reviewed by Ramon Santamaria (@raysan5)
#
# Copyright (c) 2019 arvyy (@arvyy)
# ****************************************************************************************
#
# raylib [audio] example - Raw audio streaming
#
# Example originally created with raylib 1.6, last time updated with raylib 4.2
#
# Example created by Ramon Santamaria (@raysan5) and reviewed by James Hofmann (@triplefox)
#
# Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
# BSD-like license that allows static linking with closed source software
## Simple animated raylib example in Nim using naylib
const
ScreenWidth = 800
ScreenHeight = 450
type
Ball = object
position: Vector2
velocity: Vector2
radius: float32
initWindow(800, 450, "Hello from Gist!")
setTargetFPS(60)
while not windowShouldClose():
beginDrawing()
drawFPS(10, 10)
endDrawing()
closeWindow()

Audio Sine Wave with Volume Slider

Interactive audio demo with volume control.

print("=== Audio Sine Wave Demo ===")
print("Initializing audio system...")
print("Yay!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")

# Audio parameters

3D Demo - Spinning Cubes

This demo shows how to use the 3D rendering features in Storie.

Run with: ./build/storie --3d examples/3d_demo.md

Initialize

# Set up the camera

Storie demo - Custom Markdown

This is a test to verify custom markdown loading works!

print("=== Custom Markdown Loaded! ===")
print("This is from test_demo.md")